/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --border: #e0e0e0;
  --text: #202124;
  --text-muted: #5f6368;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --brand: #1a73e8;
  --brand-dark: #1557b0;
  --danger: #ea4335;
  --success: #34a853;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: #f0f2f5;
  line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 700; color: var(--text);
  text-decoration: none;
}

.client-pill {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  background: var(--surface-2);
  padding: 4px 12px; border-radius: 20px;
  border: 1px solid var(--border);
}

.client-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.navbar-center { display: flex; align-items: center; gap: 28px; }
.navbar-actions { display: flex; align-items: center; gap: 28px; }
.nav-link { color: var(--text-muted); font-size: 14px; font-weight: 500; }

/* ── Main Layout ───────────────────────────────────────────────────────────── */
main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}
.page-header h1 {
  font-size: 22px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}

.breadcrumb { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.text-muted { color: var(--text-muted); }

/* ── Flash Messages ─────────────────────────────────────────────────────────── */
.flash-container { max-width: 1200px; margin: 16px auto 0; padding: 0 20px; }
.flash {
  padding: 12px 16px; border-radius: var(--radius); margin-bottom: 8px;
  font-size: 13px; font-weight: 500;
}
.flash-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.flash-error { background: #fce8e6; color: #c5221f; border: 1px solid #f5c6c2; }
.flash-info { background: #e8f0fe; color: #1a56db; border: 1px solid #93c5fd; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  margin-bottom: 20px; overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-header h2 { font-size: 15px; font-weight: 600; }
.card-header p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.card-body { padding: 20px; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; font-size: 13px;
  font-weight: 500; border: none; cursor: pointer;
  transition: all .15s ease; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; color: white; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); text-decoration: none; }
.btn-outline { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn-outline:hover { background: var(--brand); color: white; text-decoration: none; }
.btn-danger { background: var(--danger); color: white; border: none; }
.btn-danger:hover { background: #c5221f; text-decoration: none; }
.btn-success { background: #1e8e3e; color: white; border: none; }
.btn-success:hover { background: #166d30; text-decoration: none; color: white; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 14px; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.form-control {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: var(--surface); color: var(--text);
  transition: border-color .15s; width: 100%;
}
.form-control:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,115,232,.15); }
.form-control small { font-size: 11px; color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 10px; align-items: center; padding-top: 8px; }
small { font-size: 11px; color: var(--text-muted); }

/* ── Color Picker ───────────────────────────────────────────────────────────── */
.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.color-input-wrap { display: flex; gap: 8px; align-items: center; }
.color-swatch {
  width: 40px; height: 38px; padding: 2px; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; background: none;
}
.color-hex { flex: 1; }

/* ── Brand Preview ──────────────────────────────────────────────────────────── */
.brand-preview {
  border-radius: 8px; border: 2px solid; overflow: hidden;
  margin-top: 8px;
}
.preview-header { padding: 10px 14px; font-size: 12px; }
.preview-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.preview-bar { height: 10px; border-radius: 5px; }

/* ── Logo ───────────────────────────────────────────────────────────────────── */
.logo-preview { margin-bottom: 8px; }
.logo-preview img { max-height: 60px; border-radius: 6px; border: 1px solid var(--border); padding: 4px; }
.header-logo { max-height: 32px; border-radius: 4px; }

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 500;
}
.badge-connected { background: #e8f5e9; color: #1b5e20; }
.badge-disconnected { background: #f5f5f5; color: #9e9e9e; }
.badge-error { background: #fce8e6; color: #c5221f; }
.badge-ai { background: #e8f0fe; color: var(--brand); }

/* ── Client Grid ─────────────────────────────────────────────────────────────── */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.client-card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 20px; display: flex; flex-direction: column; gap: 16px;
}
.client-card-header { display: flex; gap: 14px; align-items: flex-start; }
.client-logo { max-height: 48px; border-radius: 6px; }
.client-avatar {
  width: 48px; height: 48px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: white; flex-shrink: 0;
}
.client-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.platform-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.client-card-actions { display: flex; gap: 8px; }

/* ── Empty State ─────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
  max-width: 400px; margin: 0 auto;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h2 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; }

/* ── Modal ──────────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 500;
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: var(--surface); border-radius: 12px; padding: 0;
  width: 440px; max-width: 95vw; box-shadow: 0 20px 60px rgba(0,0,0,.2);
  overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 16px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); }
.modal form { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }

/* ── Settings Layout ─────────────────────────────────────────────────────────── */
.settings-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.settings-sidebar { position: sticky; top: 76px; }
.setup-guide { background: #f8f9fa; }

/* ── Platform Rows ───────────────────────────────────────────────────────────── */
.platform-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.platform-row:last-child { border-bottom: none; }
.platform-info { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 13px; }
.platform-icon { display: flex; align-items: center; }
.status-connected { color: var(--success); font-size: 12px; font-weight: 600; }

/* ── Dashboard ───────────────────────────────────────────────────────────────── */
.generate-card .card-header { flex-direction: column; align-items: flex-start; }
.quick-dates { justify-content: flex-end; }
.quick-date-btns { display: flex; gap: 6px; }

.platform-checkboxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.platform-checkbox {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); cursor: pointer;
  background: var(--surface); transition: all .15s;
}
.platform-checkbox:not(.disabled):hover { border-color: var(--brand); background: #f0f7ff; }
.platform-checkbox.disabled { opacity: .6; cursor: default; }
.platform-checkbox input { margin-top: 2px; }
.checkbox-label { font-size: 13px; font-weight: 500; }
.checkbox-label small { display: block; font-size: 11px; font-weight: 400; }

.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.status-item {
  padding: 12px; border-radius: 8px; background: var(--surface-2);
  border: 1px solid var(--border);
}
.status-name { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.status-indicator { font-size: 12px; }
.status-indicator.connected { color: var(--success); }
.status-indicator.disconnected { color: var(--text-muted); }

/* ── Report ──────────────────────────────────────────────────────────────────── */
.report-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 16px;
}

.download-group { display: flex; gap: 8px; flex-shrink: 0; }

.demo-notice {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  color: white; padding: 12px 20px; border-radius: 10px;
  font-size: 13px; margin-bottom: 20px;
}
.demo-notice a { color: #ffe082; font-weight: 600; }
.report-title-area { display: flex; align-items: center; gap: 14px; flex: 1; }
.report-logo { max-height: 48px; border-radius: 6px; }

.insight-card { border-left: 4px solid var(--brand); }
.executive-summary { font-size: 15px; line-height: 1.7; margin-bottom: 16px; }
.insights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.insight-col h4 { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.insight-col ul { padding-left: 18px; }
.insight-col li { font-size: 13px; margin-bottom: 4px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi-card {
  padding: 16px; text-align: center;
  border-radius: 8px; background: var(--surface-2);
}
.kpi-value { font-size: 24px; font-weight: 700; color: var(--brand); }
.kpi-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.chart-card { padding: 0; overflow: hidden; }
.chart-container { min-height: 320px; }

.platform-breakdown .metrics-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 16px; }
.metric-item { padding: 12px; text-align: center; background: var(--surface-2); border-radius: 8px; }
.metric-value { font-size: 17px; font-weight: 700; color: var(--brand); }
.metric-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; text-transform: capitalize; }

.platform-insight-box {
  padding: 10px 14px; border-radius: 0 6px 6px 0;
  background: #f0f7ff; font-size: 13px;
  margin-bottom: 12px;
}

/* ── Per-platform AI insights (DC Experts style) ──────────────────────────── */
.platform-headline {
  font-size: 13px; font-style: italic; color: var(--text-muted);
  margin: 0 0 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.platform-insights-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin-bottom: 14px;
}
@media (max-width: 700px) { .platform-insights-cols { grid-template-columns: 1fr; } }
.pi-heading {
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; margin: 0 0 8px;
  color: var(--text-muted);
}
.pi-heading-rec { color: var(--brand); }
.pi-list {
  margin: 0; padding-left: 16px; font-size: 12.5px;
  color: var(--text); line-height: 1.6;
  display: flex; flex-direction: column; gap: 6px;
}
.pi-list-rec li { color: #1a5c2a; }
.pi-list li::marker { color: var(--text-muted); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th {
  background: var(--brand); color: white; padding: 9px 12px;
  text-align: left; font-size: 11px; font-weight: 600;
}
.data-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.data-table tr:hover td { background: var(--surface-2); }

.error-box {
  padding: 12px 16px; background: #fce8e6; border-radius: 8px;
  font-size: 13px; color: #c5221f;
}

.recommendations-list { display: flex; flex-direction: column; gap: 10px; }
.rec-item {
  display: flex; gap: 14px; padding: 14px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.rec-priority {
  font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  height: fit-content; white-space: nowrap; margin-top: 2px;
}
.priority-high .rec-priority { background: #fce8e6; color: #c5221f; }
.priority-medium .rec-priority { background: #fff3e0; color: #e65100; }
.priority-low .rec-priority { background: #e8f5e9; color: #1b5e20; }
.rec-content strong { font-size: 13px; font-weight: 600; display: block; margin-bottom: 4px; }
.rec-content p { font-size: 12px; color: var(--text-muted); }

/* ── App footer ──────────────────────────────────────────────────────────────── */
.app-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  max-width: 1200px; margin: 40px auto 0; padding: 20px 20px 32px;
  border-top: 1px solid var(--border); font-size: 11px; color: var(--text-muted);
}
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }

/* ── Credits navbar badge ────────────────────────────────────────────────────── */
.credit-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: #e8f0fe; color: var(--brand);
  border: 1px solid #c5d8fd; text-decoration: none; transition: all .15s;
}
.credit-badge:hover { text-decoration: none; background: #d2e3fc; }
.credit-badge-warn { background: #fff3e0; color: #e65100; border-color: #ffcc80; }
.credit-badge-warn:hover { background: #ffe0b2; }
.credit-badge-low  { background: #fce8e6; color: #c5221f; border-color: #f5c6c2; }
.credit-badge-low:hover  { background: #fad1ce; }

/* ── Dashboard credit meter ──────────────────────────────────────────────────── */
.credit-meter {
  display: flex; flex-direction: column; gap: 5px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; min-width: 160px;
}
.credit-meter-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 500; color: var(--text-muted);
}
.credit-meter-bar {
  height: 5px; border-radius: 3px; background: var(--border); overflow: hidden;
}
.credit-meter-fill { height: 100%; border-radius: 3px; background: var(--brand); transition: width .3s; }
.credit-meter-fill.fill-warn { background: #f9ab00; }
.credit-meter-fill.fill-danger { background: var(--danger); }
.plan-chip {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  background: var(--brand); color: white; padding: 2px 6px; border-radius: 10px;
}
.credit-note {
  font-size: 10px; font-weight: 400; color: var(--text-muted);
  text-transform: none; letter-spacing: 0; margin-left: 6px;
}

/* ── Channel checkboxes (updated) ────────────────────────────────────────────── */
.platform-icon-lg { font-size: 18px; flex-shrink: 0; }
.credit-cost-tag {
  display: inline-block; font-size: 10px; color: var(--brand);
  font-weight: 500; margin-top: 1px;
}

/* ── Option checkboxes (AI / PDF) ────────────────────────────────────────────── */
.option-checkboxes { display: flex; flex-direction: column; gap: 8px; }
.option-checkbox {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 8px;
  border: 1px solid var(--border); cursor: pointer;
  background: var(--surface); transition: all .15s;
}
.option-checkbox:hover { border-color: var(--brand); background: #f0f7ff; }
.option-checkbox input { flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--brand); }
.option-body { flex: 1; }
.option-title { font-size: 13px; font-weight: 600; }
.option-desc  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.option-credit {
  font-size: 11px; font-weight: 600; color: var(--brand);
  background: #e8f0fe; padding: 3px 8px; border-radius: 12px; white-space: nowrap;
}

/* ── Live credit calculator ──────────────────────────────────────────────────── */
.credit-calculator {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px; margin-top: 16px;
}
.calc-breakdown { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.calc-row {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-muted); padding: 2px 0;
}
.calc-total {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border); padding-top: 10px; margin-bottom: 8px;
}
.calc-total-label { font-size: 13px; font-weight: 600; }
.calc-total-value { font-size: 18px; font-weight: 700; color: var(--brand); }
.calc-balance { font-size: 12px; color: var(--text-muted); }

/* ── Insufficient credits warning ────────────────────────────────────────────── */
.credit-warning {
  display: flex; align-items: center; gap: 8px;
  background: #fce8e6; color: #c5221f; border: 1px solid #f5c6c2;
  border-radius: 8px; padding: 10px 14px; font-size: 13px; font-weight: 500;
  margin-top: 12px;
}
.credit-warning a { color: #c5221f; text-decoration: underline; }

/* ── Billing page ────────────────────────────────────────────────────────────── */
.billing-summary-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 0;
}
.billing-plan-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.credit-track {
  height: 8px; border-radius: 4px; background: var(--border); overflow: hidden;
}
.credit-track-fill { height: 100%; border-radius: 4px; background: var(--brand); transition: width .3s; }

/* ── Plan switcher ───────────────────────────────────────────────────────────── */
.plan-switch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan-switch-card {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; text-align: center;
}
.plan-switch-current { border-color: var(--brand); background: #f0f7ff; }
.plan-switch-name   { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.plan-switch-credits { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.plan-switch-price  { font-size: 15px; font-weight: 600; color: var(--brand); }
.plan-switch-active {
  font-size: 12px; font-weight: 600; color: var(--brand);
  margin-top: 8px; padding: 5px 0;
}

/* ── Top-up packs ────────────────────────────────────────────────────────────── */
.topup-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-bottom: 20px;
}
.topup-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px; text-align: center;
  box-shadow: var(--shadow);
}
.topup-credits { font-size: 36px; font-weight: 700; color: var(--brand); line-height: 1; }
.topup-label   { font-size: 13px; color: var(--text-muted); margin: 4px 0 10px; }
.topup-price   { font-size: 20px; font-weight: 700; }
.topup-per     { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Pricing page ────────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  max-width: 900px; margin: 0 auto 40px;
}
.pricing-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px 24px; position: relative;
  box-shadow: var(--shadow);
}
.pricing-card-featured {
  border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand), var(--shadow);
}
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: white; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px; white-space: nowrap;
}
.pricing-plan-name { font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted); margin-bottom: 12px; }
.pricing-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.price-amount  { font-size: 36px; font-weight: 800; }
.price-period  { font-size: 14px; color: var(--text-muted); }
.pricing-credits { font-size: 14px; font-weight: 600; color: var(--brand); margin-bottom: 8px; }
.pricing-desc  { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.pricing-features { list-style: none; padding: 0; margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.pricing-features li { font-size: 13px; }

/* ── Credit cost explainer ───────────────────────────────────────────────────── */
.credit-explainer-grid { display: flex; flex-direction: column; gap: 12px; }
.credit-explainer-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px; border-radius: 8px; background: var(--surface-2);
}
.ce-icon  { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.ce-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.ce-desc  { font-size: 12px; color: var(--text-muted); }
.ce-cost  {
  margin-left: auto; font-size: 12px; font-weight: 700; color: var(--brand);
  background: #e8f0fe; padding: 4px 10px; border-radius: 12px; white-space: nowrap; flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .settings-layout { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .color-grid { grid-template-columns: 1fr; }
  .settings-sidebar { position: static; order: -1; }
}

@media (max-width: 900px) {
  .pricing-grid      { grid-template-columns: 1fr; max-width: 400px; }
  .billing-summary-grid { grid-template-columns: 1fr; }
  .plan-switch-grid  { grid-template-columns: 1fr; }
  .topup-grid        { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  main { padding: 16px 12px; }
  .navbar { padding: 0 16px; }
  .page-header { flex-direction: column; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .report-toolbar { flex-wrap: wrap; }
  .insights-grid { grid-template-columns: 1fr; }
  .credit-meter { display: none; }
}

/* Hide public centre links from the actions bar on desktop */
.nav-public-mobile { display: none; }

@media (max-width: 680px) {
  .nav-public-mobile { display: block; }
}

/* ── Mobile nav ──────────────────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 680px) {
  .nav-hamburger { display: flex; }
  .navbar-center { display: none; }

  .navbar-actions {
    display: none;
    position: absolute; top: 56px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 12px 20px 16px;
    gap: 4px; z-index: 99;
  }
  .navbar-actions.open { display: flex; }
  .navbar-actions .nav-link {
    width: 100%; padding: 10px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
  }
  .navbar-actions .nav-link:last-of-type { border-bottom: none; }
  .navbar-actions .btn { margin-top: 8px; width: 100%; justify-content: center; }
  .navbar-actions .credit-badge { margin-bottom: 4px; }
}
