/* AdBuyer theme — dark (default) uses Tailwind slate utilities; light overrides below. */

html[data-theme="light"] {
  color-scheme: light;
  --ab-card-bg: #ffffff;
  --ab-card-border: #cbd5e1;
  --ab-table-head: #475569;
  --ab-table-cell: #0f172a;
  --ab-table-border: #cbd5e1;
  --ab-table-border-soft: #e2e8f0;
  --ab-ctr-alarm: #dc2626;
  --ab-ctr-monitor: #d97706;
  --ab-ctr-ok: #059669;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ab-card-bg: rgba(2, 6, 23, 0.45);
  --ab-card-border: rgba(51, 65, 85, 0.85);
  --ab-table-head: rgb(148 163 184);
  --ab-table-cell: rgb(226 232 240);
  --ab-table-border: rgb(51 65 85);
  --ab-table-border-soft: rgba(51, 65, 85, 0.55);
  --ab-ctr-alarm: #f87171;
  --ab-ctr-monitor: #fbbf24;
  --ab-ctr-ok: #86efac;
}


/* Surfaces */
html[data-theme="light"] .bg-slate-950,
html[data-theme="light"] body.bg-slate-950 {
  background-color: #f8fafc !important;
}

html[data-theme="light"] .bg-slate-900,
html[data-theme="light"] .from-slate-900 {
  background-color: #f1f5f9 !important;
}

html[data-theme="light"] .to-slate-950 {
  --tw-gradient-to: #f8fafc !important;
}

html[data-theme="light"] .bg-slate-900\/50,
html[data-theme="light"] .bg-slate-900\/40,
html[data-theme="light"] .bg-slate-900\/60,
html[data-theme="light"] .bg-slate-900\/30 {
  background-color: rgba(255, 255, 255, 0.92) !important;
}

html[data-theme="light"] .bg-slate-950\/80,
html[data-theme="light"] .bg-slate-950\/50 {
  background-color: #ffffff !important;
}

html[data-theme="light"] .bg-slate-800,
html[data-theme="light"] .hover\:bg-slate-800:hover,
html[data-theme="light"] .bg-slate-800.text-white {
  background-color: #e2e8f0 !important;
}

html[data-theme="light"] .hover\:bg-slate-900:hover,
html[data-theme="light"] .hover\:bg-slate-700:hover {
  background-color: #f1f5f9 !important;
}

html[data-theme="light"] .bg-sky-950\/30 {
  background-color: #e0f2fe !important;
}

html[data-theme="light"] .bg-emerald-950\/20,
html[data-theme="light"] .bg-emerald-950\/30,
html[data-theme="light"] .bg-emerald-950\/50 {
  background-color: #ecfdf5 !important;
}

html[data-theme="light"] .bg-red-950\/30,
html[data-theme="light"] .bg-red-950\/50 {
  background-color: #fef2f2 !important;
}

html[data-theme="light"] .bg-amber-950\/50 {
  background-color: #fffbeb !important;
}

html[data-theme="light"] .bg-blue-950 {
  background-color: #eff6ff !important;
}

html[data-theme="light"] .bg-red-950 {
  background-color: #fef2f2 !important;
}

html[data-theme="light"] .bg-amber-950 {
  background-color: #fffbeb !important;
}

/* Text */
html[data-theme="light"] .text-slate-100,
html[data-theme="light"] .text-white,
html[data-theme="light"] body.text-slate-100 {
  color: #0f172a !important;
}

html[data-theme="light"] .text-slate-200,
html[data-theme="light"] .text-slate-300 {
  color: #1e293b !important;
}

html[data-theme="light"] .text-slate-400 {
  color: #475569 !important;
}

html[data-theme="light"] .text-slate-500,
html[data-theme="light"] .text-slate-600 {
  color: #334155 !important;
}

html[data-theme="light"] .text-sky-200\/90 {
  color: #0369a1 !important;
}

html[data-theme="light"] .text-sky-400,
html[data-theme="light"] .text-sky-300 {
  color: #0284c7 !important;
}

html[data-theme="light"] .text-sky-100,
html[data-theme="light"] .overview-cta-title {
  color: #0c4a6e !important;
}

html[data-theme="light"] .text-sky-200,
html[data-theme="light"] .text-sky-200\/80,
html[data-theme="light"] .overview-cta-sub {
  color: #075985 !important;
}

html[data-theme="light"] .overview-cta-banner {
  background-color: #dbeafe !important;
  border-color: #60a5fa !important;
}

html[data-theme="light"] .text-emerald-400,
html[data-theme="light"] .text-emerald-100 {
  color: #059669 !important;
}

html[data-theme="light"] .text-red-300,
html[data-theme="light"] .text-red-400,
html[data-theme="light"] .text-red-100 {
  color: #dc2626 !important;
}

html[data-theme="light"] .text-amber-100,
html[data-theme="light"] .text-amber-400 {
  color: #d97706 !important;
}

html[data-theme="light"] .text-blue-100 {
  color: #2563eb !important;
}

html[data-theme="light"] .hover\:text-slate-100:hover,
html[data-theme="light"] .hover\:text-slate-200:hover,
html[data-theme="light"] .hover\:text-slate-300:hover,
html[data-theme="light"] .hover\:text-white:hover {
  color: #0f172a !important;
}

/* Borders */
html[data-theme="light"] .border-slate-800,
html[data-theme="light"] .border-slate-700,
html[data-theme="light"] .border-slate-600,
html[data-theme="light"] .divide-slate-800 > :not([hidden]) ~ :not([hidden]) {
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] .border-sky-800,
html[data-theme="light"] .border-sky-800\/50,
html[data-theme="light"] .border-sky-700\/60 {
  border-color: #7dd3fc !important;
}

html[data-theme="light"] .border-emerald-800,
html[data-theme="light"] .border-emerald-800\/60 {
  border-color: #6ee7b7 !important;
}

html[data-theme="light"] .border-red-800,
html[data-theme="light"] .border-red-700\/60,
html[data-theme="light"] .border-amber-700\/60 {
  border-color: #fca5a5 !important;
}

html[data-theme="light"] .border-dashed.border-slate-700 {
  border-color: #94a3b8 !important;
}

/* Form controls */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] select option {
  color: #0f172a;
  background-color: #ffffff;
}

html[data-theme="light"] header.bg-slate-950 {
  background-color: #f8fafc !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #94a3b8 !important;
}

html[data-theme="light"] code.text-slate-300,
html[data-theme="light"] code.text-slate-400,
html[data-theme="light"] code.text-amber-50 {
  color: #475569 !important;
}

/* Sidebar active link in light mode */
html[data-theme="light"] .sidebar-link.bg-slate-800.text-white {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
}

/* Progress bars (dashboard) */
html[data-theme="light"] progress::-webkit-progress-bar {
  background: #e2e8f0 !important;
}

html[data-theme="light"] .pending-focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35) !important;
}

html[data-theme="light"] .ad-metric-tile {
  color: #0f172a !important;
}

html[data-theme="light"] .ad-metric-tile .text-slate-500 {
  color: #475569 !important;
}

html[data-theme="light"] .ad-metric-tile.is-selected {
  border-color: #0284c7 !important;
  background-color: #e0f2fe !important;
}

html[data-theme="light"] #ad-detail-trend-wrap {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] #ad-detail-trend-footnote {
  color: #64748b !important;
}

html[data-theme="light"] #spend-actual {
  color: #0f172a !important;
}

html[data-theme="light"] progress::-webkit-progress-bar {
  background: #e2e8f0 !important;
}

html[data-theme="light"] #ad-detail-creative img {
  border-color: #cbd5e1 !important;
}

@media (max-width: 640px) {
  html[data-theme="light"] .app-sidebar {
    border-bottom-color: #cbd5e1 !important;
  }
}

html[data-theme="dark"] .app-sidebar {
  border-color: rgb(30 41 59);
}

html[data-theme="light"] .app-sidebar {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

/* Extra slate opacity surfaces (morning briefing cards, spend panel, modals) */
html[data-theme="light"] .bg-slate-950\/30,
html[data-theme="light"] .bg-slate-950\/40,
html[data-theme="light"] .bg-slate-950\/50,
html[data-theme="light"] .bg-slate-950\/80 {
  background-color: #ffffff !important;
}

html[data-theme="light"] .bg-slate-800\/80,
html[data-theme="light"] .bg-slate-800\/50,
html[data-theme="light"] .bg-slate-800\/40,
html[data-theme="light"] .bg-slate-800\/30,
html[data-theme="light"] .hover\:bg-slate-800\/50:hover,
html[data-theme="light"] .hover\:bg-slate-800\/40:hover,
html[data-theme="light"] .hover\:bg-slate-800\/30:hover,
html[data-theme="light"] .hover\:bg-slate-900\/40:hover {
  background-color: #f1f5f9 !important;
}

html[data-theme="light"] .border-slate-800\/80 {
  border-color: #cbd5e1 !important;
}

/* Sky / violet / amber accents used in briefing & recommendations */
html[data-theme="light"] .text-sky-300,
html[data-theme="light"] .hover\:text-sky-300:hover,
html[data-theme="light"] .text-sky-300\/80,
html[data-theme="light"] .text-sky-300\/90 {
  color: #0369a1 !important;
}

html[data-theme="light"] .text-violet-200 {
  color: #5b21b6 !important;
}

html[data-theme="light"] .border-violet-800 {
  border-color: #c4b5fd !important;
}

html[data-theme="light"] .bg-violet-950\/50 {
  background-color: #f5f3ff !important;
}

html[data-theme="light"] .text-amber-200,
html[data-theme="light"] .text-amber-200\/90 {
  color: #b45309 !important;
}

html[data-theme="light"] .text-amber-50 {
  color: #92400e !important;
}

html[data-theme="light"] kbd.rounded {
  background-color: #e2e8f0 !important;
  color: #334155 !important;
}

/* Alert cards */
html[data-theme="light"] .alert-card-warn {
  border-color: #fdba74 !important;
  background-color: #fff7ed !important;
}

html[data-theme="light"] .alert-card-critical {
  border-color: #fca5a5 !important;
  background-color: #fef2f2 !important;
}

html[data-theme="light"] .campaign-brief-block {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .campaign-brief-block.objective-reach {
  border-left-color: #a855f7 !important;
}

html[data-theme="light"] .campaign-brief-block.objective-retargeting {
  border-left-color: #94a3b8 !important;
}

html[data-theme="light"] .campaign-brief-block.objective-hiring {
  border-left-color: #10b981 !important;
}

html[data-theme="light"] .campaign-brief-block:not(.objective-reach):not(.objective-retargeting):not(.objective-hiring) {
  border-left-color: #0ea5e9 !important;
}

/* Section panels (performing / watch collapsibles) */
html[data-theme="light"] section.rounded-xl.border {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
