/* BUTTONS */
.btn {
  padding: 8px 16px; border-radius: var(--radius2);
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #6b8fff; }
.btn-ghost { background: var(--surface2); color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface3); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 7px; }

/* CARDS */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-weight: 700; font-size: 14px; }
.card-body { padding: 16px 20px; }

/* STAT CARDS */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
}
.stat-card.blue::after { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.stat-card.green::after { background: var(--green); }
.stat-card.yellow::after { background: var(--yellow); }
.stat-card.red::after { background: var(--red); }
.stat-label { font-size: 12px; color: var(--text3); font-weight: 500; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -1px; margin-bottom: 4px; font-family: 'JetBrains Mono', monospace; }
.stat-change { font-size: 12px; color: var(--text3); }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

/* TABLE */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 10px 14px; text-align: left;
  font-size: 11px; font-weight: 600;
  color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
tr:hover td { background: var(--surface2); }
tr:last-child td { border-bottom: none; }

/* STATUS BADGES */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.status-badge.new { background: rgba(79,124,255,0.15); color: var(--accent); border: 1px solid rgba(79,124,255,0.3); }
.status-badge.progress { background: rgba(255,200,64,0.15); color: var(--yellow); border: 1px solid rgba(255,200,64,0.3); }
.status-badge.success { background: rgba(34,216,122,0.15); color: var(--green); border: 1px solid rgba(34,216,122,0.3); }
.status-badge.fail { background: rgba(255,79,79,0.15); color: var(--red); border: 1px solid rgba(255,79,79,0.3); }
.status-badge.wait { background: rgba(255,140,64,0.15); color: var(--orange); border: 1px solid rgba(255,140,64,0.3); }

/* CHANNEL TAGS */
.channel-tag {
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 3px;
}
.channel-tag.tg { background: rgba(38,169,227,0.15); color: var(--tg); border: 1px solid rgba(38,169,227,0.3); }
.channel-tag.vb { background: rgba(123,81,158,0.15); color: var(--vb); border: 1px solid rgba(123,81,158,0.3); }
.channel-tag.ig { background: rgba(225,48,108,0.15); color: var(--ig); border: 1px solid rgba(225,48,108,0.3); }

/* AVATARS */
.mini-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: white; flex-shrink: 0;
}
.mini-avatar.m2 { background: linear-gradient(135deg, var(--green), #0dad5a); }
.mini-avatar.m3 { background: linear-gradient(135deg, var(--yellow), #e0a000); color: #0d0f14; }
.mini-avatar.m4 { background: linear-gradient(135deg, var(--orange), #e06000); }
.mini-avatar.m5 { background: linear-gradient(135deg, var(--accent3), #d00040); }
.mini-avatar.m6 { background: linear-gradient(135deg, var(--tg), #1a7ab0); }

/* PRIORITY DOTS */
.priority-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.priority-dot.high { background: var(--red); }
.priority-dot.mid { background: var(--yellow); }
.priority-dot.low { background: var(--green); }

/* PROGRESS BAR */
.progress-bar { height: 4px; background: var(--surface3); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; border-radius: 2px; background: var(--accent); transition: width 0.6s ease; }

/* FUNNEL */
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-row { display: flex; align-items: center; gap: 12px; }
.funnel-label { width: 120px; font-size: 12px; color: var(--text2); flex-shrink: 0; text-align: right; }
.funnel-bar-wrap { flex: 1; height: 24px; background: var(--surface2); border-radius: 6px; overflow: hidden; }
.funnel-bar { height: 100%; border-radius: 6px; display: flex; align-items: center; padding-left: 10px; font-size: 11px; font-weight: 700; color: white; }
.funnel-count { width: 60px; font-size: 12px; font-family: 'JetBrains Mono', monospace; color: var(--text3); }

/* SOURCE LIST */
.source-list { display: flex; flex-direction: column; gap: 10px; }
.source-item { display: flex; align-items: center; gap: 10px; }
.source-name { font-size: 12px; font-weight: 600; width: 80px; flex-shrink: 0; }
.source-bar-wrap { flex: 1; height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.source-bar { height: 100%; border-radius: 4px; }
.source-val { width: 40px; text-align: right; font-size: 12px; font-family: 'JetBrains Mono', monospace; color: var(--text2); }

/* ACTIVITY */
.activity-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.activity-text { font-size: 13px; line-height: 1.5; }
.activity-text strong { color: var(--text); }
.activity-time { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* NOTIFICATIONS LIST */
.notif-list { display: flex; flex-direction: column; }
.notif-item {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  display: flex; gap: 12px; cursor: pointer; transition: background 0.12s;
}
.notif-item:hover { background: var(--surface2); }
.notif-item.unread { background: rgba(79,124,255,0.04); }
.notif-icon { font-size: 20px; flex-shrink: 0; }
.notif-body { flex: 1; }
.notif-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.notif-desc { font-size: 12px; color: var(--text3); line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text3); flex-shrink: 0; margin-top: 2px; white-space: nowrap; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 5px; }

/* TABS */
.tabs { display: flex; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tab {
  padding: 10px 18px; font-size: 13px; font-weight: 600;
  color: var(--text3); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.15s;
}
.tab:hover { color: var(--text2); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* CHART */
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 80px; padding: 0 4px; }
.chart-bar { flex: 1; border-radius: 4px 4px 0 0; cursor: pointer; transition: opacity 0.15s; }
.chart-bar:hover { opacity: 0.8; }
.chart-labels { display: flex; gap: 6px; padding: 4px 4px 0; }
.chart-label { flex: 1; text-align: center; font-size: 10px; color: var(--text3); }

/* TEAM CARDS */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.team-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  transition: all 0.15s;
}
.team-card:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--shadow); }
.team-avatar {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: white;
}
.team-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.team-role { font-size: 12px; color: var(--text3); margin-bottom: 14px; }
.team-stats { display: flex; justify-content: center; gap: 20px; }
.team-stat { text-align: center; }
.team-stat-val { font-size: 18px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.team-stat-lbl { font-size: 10px; color: var(--text3); margin-top: 2px; }

/* FORMS */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; display: block; text-transform: uppercase; letter-spacing: 0.4px; }
.form-input {
  width: 100%; padding: 9px 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius2); color: var(--text);
  font-family: inherit; font-size: 13px; outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--accent); }
textarea.form-input { resize: vertical; }
.form-select {
  width: 100%; padding: 9px 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius2); color: var(--text);
  font-family: inherit; font-size: 13px; outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23535a78' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  cursor: pointer;
}
.form-select:focus { border-color: var(--accent); outline: none; }
