/* A/C Authority Shared Theme v2.4 */
/* Used by: index.html, home.html, dashboard.html, alerts.html, summary.html */

:root {
  /* Brand colors */
  --brand-blue: #00558e;
  --brand-blue-dark: #003d67;
  --brand-accent: #0a8bc2;
  --brand-red: #d7252e;

  /* Surfaces */
  --bg: #f5f7fa;
  --bg-grad-top: #f5f7fa;
  --bg-grad-bottom: #e8eef5;
  --surface: #ffffff;
  --surface-muted: #f9fafc;
  --border: #e5e9ef;
  --border-strong: #cfd6df;

  /* Text */
  --text: #0e1a2b;
  --text2: #4a5568;
  --text3: #8a95a3;
  --text-on-brand: #ffffff;

  /* Status */
  --green: #16a34a;
  --green-bg: #f0fdf4;
  --green-border: #86efac;
  --yellow: #ca8a04;
  --yellow-bg: #fefce8;
  --yellow-border: #fde047;
  --orange: #ea580c;
  --orange-bg: #fff7ed;
  --orange-border: #fdba74;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-border: #fca5a5;

  /* Chart colors (brand-consistent) */
  --chart-blue: #00558e;
  --chart-accent: #0a8bc2;
  --chart-teal: #0891b2;
  --chart-purple: #7c3aed;
  --chart-pink: #ec4899;
  --chart-amber: #f59e0b;
  --chart-emerald: #10b981;
  --chart-rose: #f43f5e;
  --chart-indigo: #4f46e5;
  --chart-grid: #edf0f5;
  --chart-axis: #8a95a3;

  /* Fonts */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Inter', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(14,26,43,0.04);
  --shadow: 0 2px 8px rgba(14,26,43,0.05);
  --shadow-md: 0 4px 12px rgba(14,26,43,0.08);
  --shadow-lg: 0 8px 24px rgba(14,26,43,0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  background: linear-gradient(180deg, var(--bg-grad-top) 0%, var(--bg-grad-bottom) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* SHARED HEADER */
.ac-header {
  background: var(--brand-blue);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,61,103,0.15);
  flex-wrap: wrap; gap: 12px;
  position: relative; z-index: 10;
}
.ac-header-brand { display: flex; align-items: center; gap: 14px; flex-shrink: 1; min-width: 0; }
.ac-header-logo {
  width: 44px; height: 44px; background: white; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: var(--brand-blue);
  letter-spacing: -0.5px; flex-shrink: 0;
}
.ac-header-text { color: white; min-width: 0; }
.ac-header-title { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-header-sub { font-size: 11px; opacity: 0.9; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ac-header-phone {
  color: white; font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 8px 14px; border: 1.5px solid rgba(255,255,255,0.3); border-radius: 6px;
  transition: all 0.15s; white-space: nowrap;
}
.ac-header-phone:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); }

/* SEGMENTED VIEW TOGGLE */
.view-toggle {
  display: inline-flex; background: rgba(255,255,255,0.12); border-radius: 7px;
  padding: 3px; border: 1px solid rgba(255,255,255,0.2);
}
.view-toggle a {
  padding: 6px 14px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.75);
  text-decoration: none; border-radius: 5px; transition: all 0.15s; white-space: nowrap;
}
.view-toggle a:hover { color: white; }
.view-toggle a.active { background: white; color: var(--brand-blue); }

/* SHARED FOOTER */
.ac-footer {
  background: white; border-top: 1px solid var(--border);
  padding: 16px 20px; margin-top: auto;
}
.ac-footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--text3);
}
.ac-footer-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.ac-footer-badge { padding: 3px 9px; background: var(--surface-muted); border-radius: 4px; color: var(--text2); font-weight: 500; font-size: 10px; }

/* SHARED CARD */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card-title { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -0.2px; margin-bottom: 4px; }
.card-sub { font-size: 12px; color: var(--text3); margin-bottom: 14px; line-height: 1.5; }

/* SHARED BUTTON */
.btn {
  padding: 8px 14px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-family: var(--sans); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: var(--brand-accent); color: var(--brand-blue); background: var(--surface-muted); }
.btn.primary { background: var(--brand-blue); color: white; border-color: var(--brand-blue); }
.btn.primary:hover { background: var(--brand-blue-dark); color: white; }

/* SCROLLBARS (subtle) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* MOBILE */
@media (max-width: 700px) {
  .ac-header { padding: 12px 16px; }
  .ac-header-title { font-size: 14px; }
  .ac-header-sub { font-size: 10px; }
  .ac-header-phone { font-size: 12px; padding: 6px 12px; }
  .view-toggle a { padding: 5px 10px; font-size: 11px; }
  .ac-footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}
