/* ═══════════════════════════════════════════════════════
   DASHBOARD CSS — Design System + Components
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --card: #21253a;
  --border: #2e3352;
  --accent: #4f6ef7;
  --accent2: #7c3aed;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --high: #22c55e;
  --med: #f59e0b;
  --low: #ef4444;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; font-size: 14px; min-height: 100vh; }

/* NAV */
nav { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 56px; position: sticky; top: 0; z-index: 200; }
.nav-logo { font-weight: 700; font-size: 18px; color: var(--accent); letter-spacing: -0.5px; cursor:pointer; }
.nav-logo span { color: var(--text); }
.nav-tabs { display: flex; gap: 4px; align-items: center; }
.nav-tab { padding: 6px 14px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 500; transition: all .2s; border: none; background: none; font-size: 13px; }
.nav-tab:hover { color: var(--text); background: var(--card); }
.nav-tab.active { color: #fff; background: var(--accent); }
.nav-right { color: var(--muted); font-size: 12px; }

/* DROPDOWN NAV */
.nav-dropdown { position: relative; }
.nav-dropdown-btn { padding: 6px 14px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 500; transition: all .2s; border: none; background: none; font-size: 13px; display:flex; align-items:center; gap:4px; }
.nav-dropdown-btn:hover { color: var(--text); background: var(--card); }
.nav-dropdown-btn.has-active { color: var(--accent); }
.nav-dropdown-btn .arrow { font-size: 10px; transition: transform .2s; }
.nav-dropdown.open .arrow { transform: rotate(180deg); }
.nav-dropdown-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px; min-width: 200px; box-shadow: 0 8px 32px rgba(0,0,0,.4); z-index: 300; }
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-item { display: block; width: 100%; padding: 8px 14px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 13px; border: none; background: none; text-align: left; transition: all .15s; }
.nav-dropdown-item:hover { color: var(--text); background: var(--card); }
.nav-dropdown-item.active { color: #fff; background: var(--accent); }

/* LAYOUT */
.page { display: none; padding: 24px; max-width: 1400px; margin: 0 auto; }
.page.active { display: block; }

/* GRID */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 20px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; margin-bottom: 20px; }

/* CARD */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.card-title { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px; }
.card-big { font-size: 36px; font-weight: 700; color: var(--text); line-height: 1; }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.card-accent { color: var(--accent); }
.card-green { color: var(--green); }

/* KPI CARDS */
.kpi-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 12px; }
.kpi-blue { background: rgba(79,110,247,.15); }
.kpi-green { background: rgba(34,197,94,.15); }
.kpi-yellow { background: rgba(245,158,11,.15); }
.kpi-purple { background: rgba(124,58,237,.15); }

/* PROGRESS BAR */
.progress-wrap { margin: 8px 0; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width .6s ease; }
.fill-blue { background: var(--accent); }
.fill-green { background: var(--green); }
.fill-yellow { background: var(--yellow); }
.fill-purple { background: var(--accent2); }

/* CHART CONTAINER */
.chart-wrap { position: relative; height: 240px; }
.chart-wrap-sm { position: relative; height: 180px; }
.chart-wrap-lg { position: relative; height: 320px; }

/* INSIGHT BADGES */
.insight { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.insight-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.insight-text { font-size: 13px; color: var(--text); line-height: 1.5; }
.insight-text strong { color: var(--accent); }
.insight.green { border-left: 3px solid var(--green); }
.insight.yellow { border-left: 3px solid var(--yellow); }
.insight.blue { border-left: 3px solid var(--accent); }

/* TABLE */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { padding: 10px 12px; text-align: left; color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; user-select: none; }
thead th:hover { color: var(--text); }
tbody tr { border-bottom: 1px solid var(--border); transition: background .15s; }
tbody tr:hover { background: rgba(79,110,247,.06); }
tbody td { padding: 10px 12px; color: var(--text); vertical-align: middle; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; text-transform: uppercase; letter-spacing: .4px; }
.badge-high { background: rgba(34,197,94,.15); color: var(--green); }
.badge-med { background: rgba(245,158,11,.15); color: var(--yellow); }
.badge-low { background: rgba(239,68,68,.15); color: var(--red); }
.badge-tech { background: rgba(79,110,247,.15); color: var(--accent); }
.badge-channel { background: rgba(124,58,237,.15); color: #a78bfa; font-size: 10px; padding: 2px 6px; margin: 1px; }
.badge-success { background: rgba(34,197,94,.12); color: var(--green); }
.badge-warning { background: rgba(245,158,11,.12); color: var(--yellow); }
.badge-info    { background: rgba(79,110,247,.12); color: var(--accent); }
.badge-muted   { background: rgba(148,163,184,.1); color: var(--muted); }
.badge-purple  { background: rgba(124,58,237,.12); color: var(--accent2); }

.score-bar { width: 60px; height: 6px; background: var(--border); border-radius: 3px; display: inline-block; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.score-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--yellow), var(--green)); }

/* FILTERS */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.filter-label { font-size: 12px; color: var(--muted); font-weight: 600; }
select, input[type="text"] { background: var(--card); border: 1px solid var(--border); color: var(--text); padding: 7px 12px; border-radius: 8px; font-size: 13px; outline: none; cursor: pointer; }
select:focus, input:focus { border-color: var(--accent); }

/* BUTTONS */
.btn { padding: 8px 14px; border-radius: 7px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; font-family: inherit; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #3d5ce5; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #16a34a; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn-outline:hover { border-color: var(--accent); color: var(--text); }
.btn-danger { background: rgba(239,68,68,.15); color: var(--red); border: 1px solid rgba(239,68,68,.3); }
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn-lg { padding: 12px 20px; font-size: 15px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-green { background: rgba(34,197,94,.15); color: var(--green); border: 1px solid rgba(34,197,94,.3); }
.btn-green:hover { background: var(--green); color: #000; }

/* SECTION HEADER */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.section-sub { font-size: 12px; color: var(--muted); margin-top: 2px; margin-bottom: 20px; }

/* CHANNEL STATS */
.channel-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.channel-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.channel-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.ch-email { background: rgba(79,110,247,.15); }
.ch-wa { background: rgba(34,197,94,.15); }
.ch-li { background: rgba(10,102,194,.15); }
.channel-name { font-weight: 700; font-size: 15px; }
.channel-count { font-size: 28px; font-weight: 700; color: var(--text); }
.channel-pct { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* RANK DOTS */
.rank-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot-high { background: var(--green); }
.dot-med { background: var(--yellow); }
.dot-low { background: var(--red); }

/* SEARCH */
.search-input { flex: 1; min-width: 200px; }

/* PAGINATION */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 12px; }
.page-btn { padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--card); color: var(--muted); cursor: pointer; font-size: 12px; transition: all .2s; }
.page-btn:hover, .page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* TAG */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }

.divider { height: 1px; background: var(--border); margin: 20px 0; border: none; border-top: 1px solid var(--border); }

/* TEMPLATE CARDS */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 24px; }
.tpl-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; cursor: pointer; transition: border-color .2s, transform .15s; position: relative; }
.tpl-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tpl-card.selected { border-color: var(--green); box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.tpl-icon { font-size: 28px; margin-bottom: 10px; }
.tpl-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.tpl-desc { font-size: 12px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.tpl-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tag-cold { background: rgba(79,110,247,.15); color: var(--accent); }
.tag-warm { background: rgba(245,158,11,.15); color: var(--yellow); }
.tag-close { background: rgba(34,197,94,.15); color: var(--green); }
.tag-followup { background: rgba(124,58,237,.15); color: var(--accent2); }
.tag-whatsapp { background: rgba(37,211,102,.15); color: #25d366; }
.tpl-stats { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.tpl-stat strong { color: var(--text); }
.tpl-actions { display: flex; gap: 8px; margin-top: 14px; }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.modal-overlay.open { display: flex; }
.modal { background: var(--card); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 680px; max-height: 90vh; overflow-y: auto; }
.modal-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--card); z-index: 1; }
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-body { padding: 24px; }

/* EMAIL PREVIEW */
.email-preview { background: #fff; border-radius: 10px; overflow: hidden; }
.ep-header { background: #f8f9fa; padding: 14px 18px; border-bottom: 1px solid #e5e7eb; }
.ep-row { display: flex; gap: 8px; margin-bottom: 4px; font-size: 13px; color: #374151; }
.ep-label { font-weight: 600; color: #6b7280; width: 50px; flex-shrink: 0; }
.ep-subject { font-size: 15px; font-weight: 700; color: #111827; margin-top: 8px; }
.ep-body { padding: 20px 18px; font-size: 14px; color: #374151; line-height: 1.7; white-space: pre-wrap; }

/* FORM ELEMENTS (dark) */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 7px; }
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 13px; color: var(--text); font-size: 14px;
  font-family: inherit; outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,110,247,.15);
}
.form-input::placeholder, .form-textarea::placeholder { color: #475569; }
.form-select option { background: var(--card); }
.form-textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-hint { font-size: 11px; color: #475569; margin-top: 5px; }
.token-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.token { background: rgba(79,110,247,.1); border: 1px solid rgba(79,110,247,.25); color: var(--accent); font-size: 11px; padding: 2px 7px; border-radius: 4px; cursor: pointer; font-family: monospace; }
.token:hover { background: rgba(79,110,247,.2); }

/* CAMPAIGN TABLE */
.camp-table { width: 100%; border-collapse: collapse; }
.camp-table th { padding: 10px 12px; text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; border-bottom: 1px solid var(--border); }
.camp-table td { padding: 12px 12px; font-size: 13px; border-bottom: 1px solid rgba(46,51,82,.5); vertical-align: middle; }
.camp-table tr:last-child td { border-bottom: none; }
.camp-table tr:hover td { background: rgba(79,110,247,.04); }

/* STAT ROW */
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-box { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; flex: 1; min-width: 100px; }
.stat-box .val { font-size: 26px; font-weight: 700; line-height: 1; }
.stat-box .lbl { font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }

/* SMTP STATUS */
.smtp-status { padding: 12px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; margin-top: 12px; display: none; }
.smtp-ok  { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); color: var(--green); }
.smtp-err { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: var(--red); }

/* PROGRESS CAMPAIGN */
.camp-progress-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-top: 16px; display: none; }
.camp-progress-wrap.visible { display: block; }
.camp-prog-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin: 10px 0; }
.camp-prog-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); border-radius: 4px; transition: width .3s ease; }
.camp-log { max-height: 160px; overflow-y: auto; font-size: 12px; color: var(--muted); font-family: monospace; padding: 10px; background: rgba(0,0,0,.3); border-radius: 6px; }
.camp-log div { margin-bottom: 2px; }
.camp-log .ok  { color: var(--green); }
.camp-log .err { color: var(--red); }

/* LEADS PIPELINE */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.pipe-col { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.pipe-col h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; color: var(--muted); }
.pipe-lead { background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 10px; margin-bottom: 8px; font-size: 12px; cursor: pointer; }
.pipe-lead:hover { border-color: var(--accent); }
.pipe-lead .lead-name { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.pipe-lead .lead-meta { color: var(--muted); font-size: 11px; }

/* WEEKLY QUOTA */
.quota-bar-wrap { margin-top: 8px; }
.quota-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.quota-bar { height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.quota-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 5px; transition: width .6s ease; }

/* UTILITIES */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-yellow { color: var(--yellow); }
.text-red { color: var(--red); }
.fw-bold { font-weight: 700; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.empty { color: var(--muted); font-style: italic; font-size: 13px; padding: 20px; text-align: center; }

/* TOOLTIP */
[title] { cursor: help; }

/* LOADING */
.loading { display: flex; align-items: center; justify-content: center; height: 100px; color: var(--muted); gap: 8px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ═══ CAMPAIGN DETAIL — Full Page ═══ */
.cd-page-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.cd-page-title { font-size: 20px; font-weight: 800; color: var(--text); margin: 0; flex: 1; min-width: 200px; }
.cd-header-actions { display: flex; align-items: center; gap: 10px; }
.cd-loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 80px 0; color: var(--muted); font-size: 15px; }
.cd-spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: cdSpin .7s linear infinite; }
@keyframes cdSpin { to { transform: rotate(360deg); } }

/* KPI Row */
.cd-kpi-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 24px; }
.cd-kpi { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px 16px; text-align: center; transition: transform .15s, box-shadow .15s; }
.cd-kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.cd-kpi-val { font-size: 28px; font-weight: 800; line-height: 1.1; }
.cd-kpi-lbl { font-size: 12px; color: var(--muted); margin-top: 6px; text-transform: uppercase; letter-spacing: .4px; }
.cd-kpi-pct { display: inline-block; font-size: 11px; color: var(--accent); font-weight: 600; margin-left: 4px; }

/* Charts */
.cd-charts-row { display: flex; gap: 16px; margin-bottom: 24px; }
.cd-chart-panel { flex: 1; min-width: 0; }

/* Segment Cards */
.cd-segments-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cd-seg-card { position: relative; overflow: hidden; }
.cd-seg-header { display: flex; justify-content: space-between; align-items: flex-start; cursor: pointer; user-select: none; margin-bottom: 12px; }
.cd-seg-title { font-weight: 700; font-size: 15px; }
.cd-seg-subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cd-seg-badge { font-size: 18px; font-weight: 800; padding: 6px 14px; border-radius: 8px; line-height: 1; }
.cd-seg-actions-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cd-seg-contacts { max-height: 400px; overflow-y: auto; border-top: 1px solid var(--border); margin: 0 -20px -20px; padding: 0; }

/* Contact Rows */
.cd-contact-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; border-bottom: 1px solid rgba(46,51,82,.15); transition: background .1s; }
.cd-contact-row:hover { background: rgba(79,110,247,.04); }
.cd-contact-row:last-child { border-bottom: none; }
.cd-contact-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cd-contact-name { font-weight: 600; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.cd-contact-email { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.cd-contact-clicks { font-size: 11px; color: var(--accent); background: rgba(79,110,247,.1); padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.cd-contact-btns { display: flex; gap: 4px; flex-shrink: 0; }
.cd-action-btn { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-size: 13px; cursor: pointer; transition: background .15s, border-color .15s; text-decoration: none; color: inherit; display: inline-flex; align-items: center; }
.cd-action-btn:hover { background: rgba(79,110,247,.1); border-color: var(--accent); }

/* Load More */
.cd-load-more { display: block; width: calc(100% - 40px); margin: 8px 20px 12px; text-align: center; }

/* Responsive */
@media (max-width: 1100px) {
  .cd-kpi-row { grid-template-columns: repeat(3, 1fr); }
  .cd-segments-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .cd-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .cd-charts-row { flex-direction: column; }
  .cd-page-header { gap: 10px; }
  .cd-kpi-val { font-size: 22px; }
  .cd-contact-main { flex-direction: column; align-items: flex-start; gap: 2px; }
}
@media (max-width: 480px) {
  .cd-kpi-row { grid-template-columns: 1fr 1fr; }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
  .tpl-grid { grid-template-columns: 1fr 1fr; }
  .pipeline { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  nav .nav-tabs { display: none; }
  .mobile-menu { display: flex; }
  .tpl-grid { grid-template-columns: 1fr; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; }
}
