/* MDC Cloud · Light A. Shared components, auth, responsive dashboard. */
:root {
  color-scheme: light;
  --sidebar-bg: #fff; --topbar-bg: rgba(255,255,255,.96);
  --card-bg: #fff; --card-border: #e2e8f0; --input-bg: #fff;
  --input-border: #cbd5e1; --primary: #2563eb; --primary-hover: #1d4ed8;
  --bg-base: #f5f7fb; --bg-elevated: #fff; --bg-subtle: #f8fafc;
  --bg-input: #fff; --border-default: #e2e8f0; --border-soft: #eef2f7;
  --text-primary: #172b4d; --text-secondary: #475569; --text-muted: #64748b;
  --text-faint: #64748b; --body-bg: #f5f7fb;
  --shadow-card: 0 2px 8px rgba(15,23,42,.035);
}
body { background: var(--bg-base); color: var(--text-primary); }
::selection { background: #dbeafe; color: #172b4d; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-color: #f8fafc; }
.brand-name { background: none; -webkit-text-fill-color: #172b4d; color: #172b4d; }
.brand-icon { background: #2563eb; box-shadow: none; }
.sidebar-link { color: #475569; padding-top: 11px; padding-bottom: 11px; }
.sidebar-link:hover { background: #f1f5f9; color: #172b4d; }
.sidebar-link.active { background: #eaf2ff; color: #1d4ed8; }
.sidebar-link.active::before { background: #2563eb; }
.nav-section-label { color: #64748b; }
.nav-section-label:hover { background: #f8fafc; color: #172b4d; }
.card, .stat-card-v2, .auth-card { box-shadow: var(--shadow-card); }
.card-hover:hover { box-shadow: 0 5px 16px rgba(15,23,42,.07); }
.btn-primary { background: #2563eb; border-color: #2563eb; box-shadow: none; color: #fff; }
.btn-primary:hover { background: #1d4ed8; box-shadow: 0 3px 8px rgba(37,99,235,.15); }
.btn-secondary { background: #fff; color: #334155; border-color: #cbd5e1; }
.btn-secondary:hover { background: #eff6ff; color: #1d4ed8; }
.btn-warning { background: #92400e; color: #fff; }
.badge-blue { color: #1d4ed8; background: #eff6ff; }
.badge-green { color: #166534; background: #dcfce7; }
.badge-yellow { color: #92400e; background: #fef3c7; }
.badge-red { color: #b91c1c; background: #fee2e2; }
.badge-gray { color: #475569; background: #f1f5f9; }
.data-table thead th { background: #f8fafc; color: #475569; }
.data-table tbody tr:hover { background: #f8fafc; }
input, select, textarea { color-scheme: light; }
input::placeholder, textarea::placeholder { color: #64748b; opacity: 1; }
:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }
.swal2-popup { background: #fff !important; color: #172b4d !important; box-shadow: 0 20px 70px rgba(15,23,42,.18); }
.swal2-title, .swal2-html-container { color: #172b4d !important; }
.swal2-cancel { background: #e2e8f0 !important; color: #334155 !important; }
.auth-logo-ring::before { animation: none; background: #dbeafe; }
.auth-logo h1 { background: none; -webkit-text-fill-color: #172b4d; color: #172b4d; }
.auth-flash.error { color: #b91c1c; }
.auth-flash.success { color: #166534; }
.auth-link, .auth-link:hover { color: #1d4ed8; }
.light-summary { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.light-stat { padding: 20px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; position: relative; min-width: 0; }
.light-stat-blue { background: #f5f9ff; border-color: #dbeafe; }
.light-stat-green { background: #f3fbf6; border-color: #d9f0e0; }
.light-stat-amber { background: #fffcf5; border-color: #f3e8cf; }
.light-stat-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: #2563eb; background: #eaf2ff; border-radius: 9px; margin-bottom: 14px; }
.light-stat-green .light-stat-icon { background: #dcfce7; color: #15803d; }
.light-stat-amber .light-stat-icon { background: #fef3c7; color: #92400e; }
.light-stat h3 { font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 8px; }
.light-stat strong { display: block; font-size: clamp(21px,2.2vw,28px); font-weight: 800; line-height: 1.35; letter-spacing: -.03em; overflow-wrap: anywhere; }
.light-stat strong small { font-size: 14px; font-weight: 500; }
.light-stat strong.light-forecast { font-size: 20px; letter-spacing: 0; }
.light-stat p { color: #64748b; font-size: 12px; margin-top: 8px; }
.light-stat .btn { margin-top: 12px; }
.light-billing-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 18px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; margin-bottom: 20px; font-size: 13px; }
.light-billing-notice a { color: #92400e; font-weight: 600; margin-left: auto; }
.light-spend-card { padding: 20px; margin-bottom: 24px; }
.light-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.light-section-heading h3 { font-size: 16px; font-weight: 700; }
.light-section-heading p, .light-chart-data { color: #64748b; font-size: 12px; margin-top: 4px; }
.light-section-heading a { color: #2563eb; font-size: 13px; font-weight: 600; }
.light-chart { height: 200px; }
.light-chart-data { margin-top: 12px; }
.light-chart-data summary { cursor: pointer; padding: 6px 0; }
.light-empty { color: #64748b; padding: 24px 0; }
.light-wallet-details { margin-bottom: 24px; color: #475569; font-size: 13px; }
.light-wallet-details > summary { cursor: pointer; padding: 10px 0; color: #2563eb; font-weight: 600; }
.vm-page .bg-slate-50 { background: #fff; }
@media (max-width: 1023px) {
  .vm-page > .flex { flex-wrap: wrap; }
  .vm-page > .flex > .text-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; text-align: left; }
  .vm-page > .flex > .text-right > * { margin-left: 0 !important; }
}
@media (max-width: 1100px) { .light-summary { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 640px) {
  #topbar .topbar-title { flex-shrink: 1 !important; overflow: hidden; }
  #topbar .user-menu-trigger > span { display: none; }
  #topbar { gap: 8px; }
  main.page-content { padding: 16px !important; }
  .light-stat { padding: 14px; }
  .light-stat strong.light-forecast { font-size: 16px; }
  .light-spend-card { padding: 16px; }
  .data-table { min-width: 540px; }
  .light-chart-data { overflow-x: auto; }
  .light-billing-stats { grid-template-columns: 1fr !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
