:root {
  --blue: #0a66c2;
  --blue-dark: #004182;
  --bg: #f3f2ef;
  --card-bg: #ffffff;
  --text: #191919;
  --text-muted: #666666;
  --border: #e0e0e0;
  --green: #057642;
  --red: #cc1016;
  --radius: 8px;
  --row-even: #ffffff;
  --row-odd: #f8f8f6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

/* Header */
header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header h1 {
  font-size: 1.1rem;
  color: var(--blue-dark);
}

/* Buttons */
.btn {
  border: none;
  border-radius: var(--radius);
  padding: 7px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Main */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 20px;
}

/* Center message (login/setup) */
.center-message {
  display: flex;
  justify-content: center;
  padding-top: 80px;
}
.center-message .card { text-align: center; max-width: 420px; }
.center-message .card h2 { margin-bottom: 12px; }
.center-message .card p { margin-bottom: 20px; color: var(--text-muted); }
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* Error banner */
.error-banner {
  background: var(--red);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}
.error-close { background: none; border: none; color: #fff; font-size: 1.1rem; cursor: pointer; }

/* Tab bar */
.tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.tab-btn {
  border: none;
  background: none;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* Controls */
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.controls label { font-weight: 600; font-size: 0.82rem; }
.controls select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.82rem;
  background: var(--card-bg);
}

/* KPI cards */
.kpi-cards {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}
.kpi-card {
  flex: 1;
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.15s;
}
.kpi-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 900px) {
  .kpi-cards { flex-wrap: wrap; }
  .kpi-card { flex: 1 1 calc(50% - 8px); }
}

/* Projects date-range controls */
.controls-projects {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.date-range-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.date-range-picker > label {
  font-weight: 600;
  font-size: 0.82rem;
}

.date-range-selects {
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-range-field {
  display: flex;
  align-items: center;
  gap: 4px;
}

.date-range-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.date-range-selects select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.82rem;
  background: var(--card-bg);
}

/* Preset buttons */
.date-range-presets {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.btn-preset {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-preset:hover {
  background: var(--bg);
  color: var(--text);
}

.btn-preset.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* Cache info */
.cache-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}

.cache-info .missing-months {
  color: var(--red);
  font-weight: 600;
}

/* Loading */
.loading { text-align: center; padding: 60px 0; color: var(--text-muted); }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  margin: 0 auto 10px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Progress bar */
.progress-bar { margin-top: 16px; width: 100%; max-width: 480px; margin-left: auto; margin-right: auto; }
.progress-track { width: 100%; height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; position: relative; }
.progress-fill {
  height: 100%; width: 0%; border-radius: 5px; position: relative;
  background: linear-gradient(90deg, var(--blue) 0%, #1a5db8 100%);
  transition: width 0.3s ease-out;
}
.progress-fill::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
  animation: progress-shimmer 1.5s infinite;
}
@keyframes progress-shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.progress-text { display: block; margin-top: 6px; font-size: 0.85rem; font-weight: 700; color: #1a5db8; }
.progress-detail { margin-top: 4px; font-size: 0.78rem; color: var(--text-muted); min-height: 1.2em; }

/* ===== Compact accounts table ===== */
.accounts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.accounts-table thead th {
  background: #f0f0ed;
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.accounts-table th.num,
.accounts-table td.num { text-align: right; }
.accounts-table .col-expand { width: 28px; min-width: 28px; text-align: center; }
.accounts-table .col-billing { width: 28px; min-width: 28px; text-align: center; padding: 0 2px !important; }
.accounts-table .col-id { color: var(--text-muted); font-size: 0.78rem; }

/* Billing toggle (dollar icon) */
.billing-toggle {
  cursor: pointer;
  font-size: 1rem;
  user-select: none;
  transition: opacity 0.15s, filter 0.15s;
  line-height: 1;
}
.billing-toggle.billed-by-us {
  opacity: 0.85;
  filter: none;
}
.billing-toggle.client-pays {
  opacity: 0.25;
  filter: grayscale(1);
}
.billing-toggle:hover { opacity: 1; transform: scale(1.15); }

/* Invoice checkbox column */
.accounts-table .col-invoice-cb { width: 28px; min-width: 28px; text-align: center; padding: 0 2px !important; }
.invoice-checkbox { cursor: pointer; width: 16px; height: 16px; accent-color: var(--primary); }
.already-invoiced { font-size: 1rem; line-height: 1; }

/* Invoice actions bar */
#invoice-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  padding: 8px 12px;
  background: #f0f4f8;
  border-radius: 6px;
}
.invoice-info-text { font-size: 0.85rem; color: var(--text-muted); }

/* Billing (Fakturering) table */
.billing-table th, .billing-table td { padding: 8px 12px; }
.col-invoiced-toggle { text-align: center; }
.invoiced-toggle-label { cursor: pointer; display: flex; align-items: center; gap: 6px; justify-content: center; }
.invoiced-toggle { cursor: pointer; width: 16px; height: 16px; accent-color: #22c55e; }
.invoiced-toggle-text { font-size: 0.85rem; }

/* Green row for invoiced items */
.row-invoiced { background: #f0fdf4 !important; }
.row-invoiced td { color: #166534; }
.row-invoiced:hover { background: #dcfce7 !important; }

/* Fixed column widths so sub-table can align */
.accounts-table th:nth-child(4) { width: 60px; }   /* Valuta */
.accounts-table th:nth-child(5) { width: 90px; }   /* Kampanjer */
.accounts-table th:nth-child(6) { width: 110px; }  /* Visningar */
.accounts-table th:nth-child(7) { width: 90px; }   /* Klick */
.accounts-table th:nth-child(8) { width: 120px; }  /* Spend */

/* Striped rows */
.account-row { cursor: pointer; user-select: none; transition: background 0.1s; }
.account-row td { padding: 7px 10px; border-bottom: 1px solid #eee; }
.row-even { background: var(--row-even); }
.row-odd { background: var(--row-odd); }
.account-row:hover { background: #e8eef4; }

/* Zero-spend rows */
.zero-spend td { color: var(--text-muted); }
.zero-spend .spend-cell { color: #bbb; }

/* Spend highlight */
.spend-cell { font-weight: 600; color: var(--blue-dark); }

/* Chevron */
.chevron {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s;
  display: inline-block;
}
.chevron.open { transform: rotate(90deg); }

/* ===== Campaign detail (sub-table) ===== */
.campaign-detail-row td {
  padding: 3px !important;
  background: #fafaf8;
  border-bottom: 2px solid var(--border);
}

.campaigns-sub-table {
  width: 94%;
  border-collapse: collapse;
  font-size: 0.78rem;
  margin: 0 auto;
  table-layout: fixed;
}
.campaigns-sub-table thead th {
  padding: 6px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  background: #f4f3f0;
  border-bottom: 1px solid var(--border);
}
.campaigns-sub-table th.num,
.campaigns-sub-table td.num { text-align: right; }
.campaigns-sub-table td {
  padding: 5px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Match last 3 columns (Visningar, Klick, Spend) with accounts-table widths */
.campaigns-sub-table th:nth-last-child(3),
.campaigns-sub-table td:nth-last-child(3) { width: 110px; }  /* Visningar */
.campaigns-sub-table th:nth-last-child(2),
.campaigns-sub-table td:nth-last-child(2) { width: 90px; }   /* Klick */
.campaigns-sub-table th:nth-last-child(1),
.campaigns-sub-table td:nth-last-child(1) { width: 120px; }  /* Spend */
/* Status + Typ columns */
.campaigns-sub-table th:nth-child(2),
.campaigns-sub-table td:nth-child(2) { width: 100px; }  /* Status */
.campaigns-sub-table th:nth-child(3),
.campaigns-sub-table td:nth-child(3) { width: 150px; }  /* Typ */
.sub-even { background: #fafaf8; }
.sub-odd { background: #f4f3f0; }

/* ===== Campaign → Ads expand (Meta) ===== */
.campaign-expandable { cursor: pointer; user-select: none; }
.campaign-expandable:hover { background: #eef2f5 !important; }

.camp-chevron {
  font-size: 0.6rem;
  color: var(--text-muted);
  transition: transform 0.2s;
  display: inline-block;
  margin-right: 2px;
}
.camp-chevron.open { transform: rotate(90deg); }

.ads-detail-row td {
  padding: 2px 0 2px 20px !important;
  background: #f6f5f2;
  border-bottom: none;
}

.ads-sub-table {
  width: 92%;
  border-collapse: collapse;
  font-size: 0.74rem;
  margin: 4px auto 4px 28px;
  table-layout: fixed;
}
.ads-sub-table thead th {
  padding: 4px 8px;
  text-align: left;
  font-weight: 600;
  font-size: 0.66rem;
  text-transform: uppercase;
  color: var(--text-muted);
  background: #eeedea;
  border-bottom: 1px solid var(--border);
}
.ads-sub-table th.num,
.ads-sub-table td.num { text-align: right; }
.ads-sub-table td {
  padding: 3px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #444;
}
/* Match widths with campaign sub-table */
.ads-sub-table th:nth-last-child(3),
.ads-sub-table td:nth-last-child(3) { width: 100px; }  /* Visningar */
.ads-sub-table th:nth-last-child(2),
.ads-sub-table td:nth-last-child(2) { width: 80px; }   /* Klick */
.ads-sub-table th:nth-last-child(1),
.ads-sub-table td:nth-last-child(1) { width: 110px; }  /* Spend */
.ads-sub-table th:nth-child(2),
.ads-sub-table td:nth-child(2) { width: 80px; }         /* Status */
.ad-even { background: #f6f5f2; }
.ad-odd { background: #eeedea; }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.status-active { background: #e6f4ea; color: var(--green); }
.status-paused { background: #fff3e0; color: #e65100; }
.status-archived { background: #f0f0f0; color: #888; }
.status-draft { background: #e8eef4; color: var(--blue); }
.status-completed { background: #f0f0f0; color: #555; }

/* Platform badges */
.platform-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.platform-linkedin { background: #e8f0fe; color: #0a66c2; }
.platform-meta { background: #e7f3ff; color: #1877f2; }
.platform-tiktok { background: #f0f0f0; color: #000; }
.platform-snap { background: #fffde7; color: #fffc00; text-shadow: 0 0 1px #999; }
.platform-snapchat { background: #fffc00; color: #000; }
.platform-googleads { background: #e8f5e9; color: #34a853; }
.platform-bidtheatre { background: #fde8e8; color: #e74c3c; }

/* Inline platform SVG icons */
.platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  vertical-align: middle;
  margin-right: 4px;
  flex-shrink: 0;
}
.platform-icon svg {
  width: 100%; height: 100%;
  display: block;
}
.platform-icon-badge {
  width: 16px; height: 16px;
  margin-right: 6px;
}
.platform-icon-linkedin { color: #0a66c2; }
.platform-icon-meta { color: #1877f2; }
.platform-icon-snapchat { color: #fffc00; filter: drop-shadow(0 0 0.5px #999); }
.platform-icon-googleads { color: #4285f4; }
.platform-icon-bidtheatre { color: #e74c3c; }

/* Platform-specific buttons */
.btn-snapchat { background: #fffc00; color: #000; border-color: #e6e300; }
.btn-snapchat:hover { background: #e6e300; }
.btn-meta { background: #1877f2; color: #fff; border-color: #1565c0; }
.btn-meta:hover { background: #1565c0; }
.btn-googleads { background: #4285f4; color: #fff; border-color: #3367d6; }
.btn-googleads:hover { background: #3367d6; }
.btn-bidtheatre { background: #e74c3c; color: #fff; border-color: #c0392b; }
.btn-bidtheatre:hover { background: #c0392b; }

/* Setup tabs */
.setup-tabs { display: flex; gap: 4px; margin-bottom: 16px; }

/* Auth badges */
.auth-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 600; margin-right: 6px; }
.auth-badge-linkedin { background: #e8f0fe; color: #0a66c2; }
.auth-badge-snapchat { background: #fffc00; color: #000; }
.auth-badge-meta { background: #e7f3ff; color: #1877f2; }
.auth-badge-googleads { background: #e8f0fe; color: #4285f4; }
.auth-badge-bidtheatre { background: #fde8e8; color: #e74c3c; }

/* Project number */
.col-project-num { font-weight: 700; color: var(--blue-dark); }

.no-data {
  padding: 12px 20px;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.82rem;
}

/* Sortable headers */
.accounts-table thead th[data-sort] { cursor: pointer; }
.accounts-table thead th[data-sort]:hover { background: #e4e3e0; }

/* Zero-spend toggle */
.btn-show-zero { margin-top: 20px; }
#zero-spend-section { margin-top: 8px; }
#zero-spend-container { margin-top: 12px; }

/* Cache timestamp */
.fetched-at-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}

/* ===== Setup form ===== */
.setup-card { text-align: left; max-width: 480px; width: 100%; }
.setup-card h2 { margin-bottom: 8px; }
.setup-card p { margin-bottom: 20px; color: var(--text-muted); font-size: 0.9rem; }
.setup-card a { color: var(--blue); text-decoration: none; }
.setup-card a:hover { text-decoration: underline; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 4px; }
.form-group input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.9rem; font-family: inherit; transition: border-color 0.15s;
}
.form-group input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.15);
}
.setup-error { background: #fde8e8; color: var(--red); padding: 10px 14px; border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 12px; }
.setup-success { background: #e6f4ea; color: var(--green); padding: 10px 14px; border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 12px; }
.setup-card .btn { width: 100%; padding: 12px; font-size: 0.95rem; margin-top: 4px; }

/* ===== Orders tab ===== */
.controls-orders {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

/* Order form */
.order-form-card {
  margin-bottom: 16px;
  max-width: 800px;
}
.order-form-card h3 {
  margin-bottom: 12px;
  font-size: 1rem;
  color: var(--blue-dark);
}
.order-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.order-form-grid .form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 4px;
}
.order-form-grid .form-group input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: inherit;
}
.order-form-grid .form-group input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.15);
}
.order-form-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

/* Margin colors */
.margin-positive { color: var(--green); font-weight: 600; }
.margin-negative { color: var(--red); font-weight: 600; }

/* Small action buttons in tables */
.btn-sm {
  padding: 3px 10px;
  font-size: 0.72rem;
}
.col-actions {
  white-space: nowrap;
  width: 160px;
}
.col-actions .btn { margin-right: 4px; }

/* Settings gear button */
#settings-btn .gear-icon { font-size: 1.3rem; vertical-align: middle; line-height: 1; }

/* ===== Settings / Integrations page ===== */
.settings-header { margin-bottom: 20px; }
.settings-header h2 { font-size: 1.1rem; color: var(--blue-dark); }
.settings-integrations h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; }

.integration-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  max-width: 560px;
}
.integration-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.integration-card-platform {
  display: flex;
  align-items: center;
  gap: 10px;
}
.integration-card-platform h4 {
  font-size: 1rem;
  margin: 0;
}
.integration-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}
.integration-status-connected { background: #e6f4ea; color: var(--green); }
.integration-status-disconnected { background: #fde8e8; color: var(--red); }
.integration-status-unconfigured { background: #f0f0f0; color: var(--text-muted); }

.integration-card-details {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.integration-card-details p { margin: 4px 0; }
.integration-card-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

/* Credentials toggle & form inside integration card */
.integration-credentials {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
}
.integration-credentials-toggle {
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0;
}
.integration-credentials-toggle:hover { text-decoration: underline; }
.integration-credentials-form { margin-top: 12px; }
.integration-credentials-form .form-group { margin-bottom: 12px; }
.integration-credentials-form .btn { margin-top: 4px; }

/* ===== Invoices per channel tab ===== */
.controls-invoices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.channel-summary-cards {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.channel-summary-card {
  flex: 1;
  min-width: 160px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.15s;
  cursor: pointer;
}
.channel-summary-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.channel-summary-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(10, 102, 194, 0.2);
}
.channel-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.channel-card-header .platform-badge {
  font-size: 0.78rem;
  padding: 2px 8px;
}
.channel-card-stat {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.channel-card-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue-dark);
}
.channel-card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.channel-section {
  margin-bottom: 24px;
}
.channel-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
}
.channel-section-header h3 {
  font-size: 0.95rem;
  margin: 0;
  color: var(--blue-dark);
}
.channel-section-header .channel-totals {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .accounts-table { font-size: 0.75rem; }
  .accounts-table thead th, .accounts-table td { padding: 5px 6px; }
  .campaigns-sub-table { font-size: 0.72rem; }
  .campaigns-sub-table td { padding: 4px 6px 4px 12px; }
  .order-form-grid { grid-template-columns: 1fr; }
}
