/* AustNet Admin2 Portal - app.css */

/* Strip all hover lift/shadow from every element - no exceptions */
*:hover, *:focus, *:active {
  transform: none !important;
  box-shadow: none !important;
}

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Sidebar (always dark) */
  --sidebar-bg: #0f1623;
  --sidebar-text: rgba(255,255,255,0.55);
  --sidebar-text-hover: rgba(255,255,255,0.9);
  --sidebar-active-bg: rgba(67,97,238,0.18);
  --sidebar-active-border: #4361ee;
  --sidebar-group-label: rgba(255,255,255,0.25);
  --sidebar-width: 255px;

  /* Light mode */
  --bg: #f0f3f8;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #e2e8f0;
  --text: #1a202c;
  --text-muted: #64748b;
  --accent: #4361ee;
  --accent-hover: #3451d1;
  --accent-light: rgba(67,97,238,0.1);
  --topbar-bg: #ffffff;
  --topbar-border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --radius: 10px;
  --radius-sm: 6px;
}

[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c2230;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #4361ee;
  --accent-hover: #3451d1;
  --accent-light: rgba(67,97,238,0.15);
  --topbar-bg: #161b22;
  --topbar-border: #30363d;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
  min-height: 100vh;
}

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

code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.85em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text);
}

/* ============================================================
   LAYOUT - SIDEBAR + CONTENT
   ============================================================ */
.a2-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.a2-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  transition: transform 0.25s ease;
}

.a2-sidebar::-webkit-scrollbar { width: 4px; }
.a2-sidebar::-webkit-scrollbar-track { background: transparent; }
.a2-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Brand */
.a2-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
}

.a2-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}

.a2-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.a2-brand-name {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
}

.a2-brand-sub {
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Navigation */
.a2-nav {
  flex: 1;
  padding: 12px 0 16px;
}

.a2-nav-group {
  margin-top: 16px;
}

.a2-nav-group-label {
  color: var(--sidebar-group-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 0 20px 6px;
  display: block;
  margin-top: 4px;
}

.a2-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: color 0.15s, background 0.15s;
  position: relative;
}

.a2-nav-item:hover {
  color: var(--sidebar-text-hover);
  background: rgba(255,255,255,0.05);
  text-decoration: none;
}

.a2-nav-item.active {
  color: #fff;
  background: var(--sidebar-active-bg);
  border-left-color: var(--sidebar-active-border);
}

.a2-nav-item .nav-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.8;
}

.a2-nav-item.active .nav-icon { opacity: 1; }

/* Sidebar footer */
.a2-sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 10px;
}

.a2-sidebar-avatar {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.a2-sidebar-user {
  flex: 1;
  min-width: 0;
}

.a2-sidebar-username {
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.a2-sidebar-logout {
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  text-decoration: none;
  display: block;
  transition: color 0.15s;
}

.a2-sidebar-logout:hover { color: #fc5c65; }

/* ---- Main area ---- */
.a2-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Top bar ---- */
.a2-topbar {
  height: 60px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.2s, border-color 0.2s;
}

.a2-topbar-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.a2-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.a2-topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.a2-topbar-user i { color: var(--accent); }

/* Hamburger */
.a2-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.a2-hamburger:hover { background: var(--surface-2); }

/* ---- Content ---- */
.a2-content {
  flex: 1;
  padding: 28px 28px 40px;
}

/* ============================================================
   DARK MODE TOGGLE BUTTON
   ============================================================ */
.a2-theme-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.15s;
}

.a2-theme-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.a2-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.a2-page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.a2-page-header p {
  color: var(--text-muted);
  margin: 0;
  font-size: 13.5px;
}

/* ============================================================
   CARDS
   ============================================================ */
.a2-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background 0.2s, border-color 0.2s;
  overflow: hidden;
}

.a2-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.a2-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.a2-card-body { padding: 20px; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.a2-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.a2-stat-card:hover {
  box-shadow: var(--shadow-md);
}

.a2-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.a2-stat-icon.blue   { background: rgba(67,97,238,0.12);  color: #4361ee; }
.a2-stat-icon.green  { background: rgba(34,197,94,0.12);   color: #16a34a; }
.a2-stat-icon.orange { background: rgba(249,115,22,0.12);  color: #ea580c; }
.a2-stat-icon.purple { background: rgba(139,92,246,0.12);  color: #7c3aed; }
.a2-stat-icon.red    { background: rgba(239,68,68,0.12);   color: #dc2626; }
.a2-stat-icon.teal   { background: rgba(20,184,166,0.12);  color: #0d9488; }

.a2-stat-body { flex: 1; }

.a2-stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.a2-stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   TABLES
   ============================================================ */
.a2-table-wrap {
  overflow-x: auto;
}

.a2-table {
  width: 100%;
  border-collapse: collapse;
}

.a2-table thead th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.a2-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13.5px;
  vertical-align: middle;
}

.a2-table tbody tr:last-child td { border-bottom: none; }

.a2-table tbody tr:hover td { background: var(--surface-2); }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.a2-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.a2-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.a2-badge-online    { background: rgba(34,197,94,0.12);  color: #16a34a; }
.a2-badge-offline   { background: rgba(239,68,68,0.12);  color: #dc2626; }
.a2-badge-active    { background: rgba(67,97,238,0.12);  color: #4361ee; }
.a2-badge-draft     { background: rgba(156,163,175,0.15); color: #6b7280; }
.a2-badge-published { background: rgba(34,197,94,0.12);  color: #16a34a; }
.a2-badge-closed    { background: rgba(156,163,175,0.15); color: #6b7280; }
.a2-badge-success   { background: rgba(34,197,94,0.12);  color: #16a34a; }
.a2-badge-failed    { background: rgba(239,68,68,0.12);  color: #dc2626; }
.a2-badge-pending   { background: rgba(249,115,22,0.12); color: #ea580c; }
.a2-badge-decom     { background: rgba(156,163,175,0.15); color: #6b7280; }
.a2-badge-yes       { background: rgba(34,197,94,0.12);  color: #16a34a; }
.a2-badge-no        { background: rgba(156,163,175,0.15); color: #9ca3af; }

/* ============================================================
   BUTTONS
   ============================================================ */
.a2-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.a2-btn-primary {
  background: var(--accent);
  color: #fff;
}

.a2-btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 4px 12px rgba(67,97,238,0.3);
}

.a2-btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.a2-btn-secondary:hover {
  background: var(--border);
  color: var(--text);
}

.a2-btn-secondary.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.a2-btn-danger {
  background: rgba(239,68,68,0.1);
  color: #dc2626;
  border: 1px solid rgba(239,68,68,0.2);
}

.a2-btn-danger:hover {
  background: #dc2626;
  color: #fff;
}

.a2-btn-sm {
  padding: 5px 11px;
  font-size: 12px;
}

.a2-btn-xs {
  padding: 3px 8px;
  font-size: 11px;
}

.a2-btn-icon {
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Under-construction banner */
.a2-wip-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(234,179,8,0.08);
  border: 1px solid rgba(234,179,8,0.3);
  border-radius: var(--radius-sm);
  color: #b45309;
  font-size: 12.5px;
  padding: 8px 14px;
  margin-bottom: 20px;
}
[data-theme="dark"] .a2-wip-banner {
  color: #fbbf24;
}

/* Group pill toggles */
.a2-group-pill {
  border-radius: 50px;
  font-size: 11.5px;
  padding: 3px 13px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  user-select: none;
  transition: none;
  white-space: nowrap;
}
.btn-check:checked + .a2-group-pill {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ============================================================
   FORMS
   ============================================================ */
.a2-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.a2-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.a2-input::placeholder { color: var(--text-muted); }

.a2-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.a2-search-wrap {
  position: relative;
}

.a2-search-wrap i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}

.a2-search-wrap .a2-input {
  padding-left: 34px;
}

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.a2-progress {
  height: 8px;
  background: var(--surface-2);
  border-radius: 50px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.a2-progress-bar {
  height: 100%;
  border-radius: 50px;
  background: var(--accent);
  transition: width 0.6s ease;
}

.a2-progress-bar.green  { background: #16a34a; }
.a2-progress-bar.orange { background: #ea580c; }
.a2-progress-bar.red    { background: #dc2626; }

/* ============================================================
   ACCORDION OVERRIDE
   ============================================================ */
.a2-accordion .accordion-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) !important;
  margin-bottom: 10px;
  overflow: hidden;
}

.a2-accordion .accordion-button {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  padding: 14px 18px;
  border-radius: var(--radius) !important;
  box-shadow: none !important;
}

.a2-accordion .accordion-button:not(.collapsed) {
  background: var(--surface-2);
  color: var(--accent);
  border-bottom: 1px solid var(--border);
}

.a2-accordion .accordion-button::after {
  filter: none;
}

[data-theme="dark"] .a2-accordion .accordion-button::after {
  filter: invert(1);
}

.a2-accordion .accordion-body {
  background: var(--surface);
  padding: 16px 18px;
}

/* ============================================================
   CHART PLACEHOLDER
   ============================================================ */
.a2-chart-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  background: var(--surface-2);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.a2-chart-placeholder i { font-size: 32px; opacity: 0.4; }
.a2-chart-placeholder span { font-size: 13px; }

/* ============================================================
   QUICK LINKS GRID
   ============================================================ */
.a2-quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

/* ── Per-group palette ─────────────────────────────────── */
.a2-quick-link                        { --ql-c: var(--accent); }
.a2-quick-link[data-group="support"]  { --ql-c: #3b82f6; }
.a2-quick-link[data-group="web"]      { --ql-c: #10b981; }
.a2-quick-link[data-group="services"] { --ql-c: #f59e0b; }
.a2-quick-link[data-group="network"]  { --ql-c: #8b5cf6; }
.a2-quick-link[data-group="admin"]    { --ql-c: #ef4444; }
.a2-quick-link[data-group="system"]   { --ql-c: #64748b; }

.a2-quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 10px;
  background: color-mix(in srgb, var(--ql-c) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--ql-c) 30%, var(--border));
  border-top: 3px solid var(--ql-c);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.a2-quick-link:hover {
  background: color-mix(in srgb, var(--ql-c) 22%, var(--surface));
  border-color: var(--ql-c);
}
.a2-quick-link i {
  font-size: 20px;
  color: var(--ql-c);
}
.a2-quick-link-name {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
}
.a2-quick-link-group {
  font-size: 10px;
  font-weight: 600;
  color: var(--ql-c);
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: -2px;
}

/* ============================================================
   ALERT BOX
   ============================================================ */
.a2-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
}

.a2-alert i { margin-top: 2px; flex-shrink: 0; }

.a2-alert-info    { background: rgba(67,97,238,0.08);  border-left: 3px solid #4361ee;  color: var(--text); }
.a2-alert-warning { background: rgba(249,115,22,0.08); border-left: 3px solid #ea580c; color: var(--text); }
.a2-alert-success { background: rgba(34,197,94,0.08);  border-left: 3px solid #16a34a;  color: var(--text); }
.a2-alert-danger  { background: rgba(239,68,68,0.08);  border-left: 3px solid #dc2626;  color: var(--text); }

/* ============================================================
   CONFIG PAGE
   ============================================================ */
.a2-config-table { width: 100%; border-collapse: collapse; }
.a2-config-table tr + tr td { border-top: 1px solid var(--border); }
.a2-config-table td { padding: 10px 0; vertical-align: middle; }
.a2-config-table td:first-child {
  width: 45%;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding-right: 12px;
}

.a2-autosave {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.a2-login-body {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.a2-login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  padding: 40px 36px;
}

.a2-login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.a2-login-brand-icon {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
}

.a2-login-brand-text { line-height: 1.2; }
.a2-login-brand-name { font-size: 18px; font-weight: 700; color: var(--text); display: block; }
.a2-login-brand-sub  { font-size: 12px; color: var(--text-muted); }

.a2-login-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.a2-login-sub   { font-size: 13.5px; color: var(--text-muted); margin-bottom: 24px; }

.a2-login-form-group { margin-bottom: 16px; }

.a2-login-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.a2-login-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
  background: var(--surface);
}

.a2-login-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 4px;
}

.a2-login-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(67,97,238,0.35);
}

.a2-login-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  color: #dc2626;
  font-size: 13.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   VOTE BARS
   ============================================================ */
.a2-vote-bar-wrap { margin-top: 6px; }
.a2-vote-option { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.a2-vote-option-label { width: 80px; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a2-vote-option-track { flex: 1; height: 10px; background: var(--surface-2); border-radius: 50px; overflow: hidden; border: 1px solid var(--border); }
.a2-vote-option-fill  { height: 100%; border-radius: 50px; }
.a2-vote-option-count { font-size: 12px; color: var(--text-muted); width: 40px; text-align: right; }

/* ============================================================
   SIDEBAR OVERLAY (MOBILE)
   ============================================================ */
.a2-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .a2-sidebar {
    transform: translateX(-100%);
  }

  .a2-sidebar.open {
    transform: translateX(0);
  }

  .a2-sidebar-overlay.active { display: block; }

  .a2-main {
    margin-left: 0;
  }

  .a2-hamburger { display: flex; }

  .a2-content { padding: 20px 16px 32px; }

  .a2-page-header { flex-direction: column; align-items: flex-start; }

  .a2-stat-value { font-size: 22px; }
}

@media (max-width: 600px) {
  .a2-topbar { padding: 0 14px; }
  .a2-topbar-user span { display: none; }
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-muted   { color: var(--text-muted) !important; }
.text-accent  { color: var(--accent); }
.fw-600       { font-weight: 600; }
.fw-700       { font-weight: 700; }
.gap-2        { gap: 8px; }
.d-flex       { display: flex; }
.align-items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; }
.w-100 { width: 100%; }
.small { font-size: 12px; }

/* Override Bootstrap card styles inside our layout */
.a2-content .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.a2-content .card-header {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
}

.a2-content .card-header .card-title {
  color: var(--text);
  margin-bottom: 0;
}

.a2-content .card-body {
  background: var(--surface);
  color: var(--text);
}

.a2-content .accordion-item {
  background: var(--surface);
  border: 1px solid var(--border);
}

.a2-content .accordion-button {
  background: var(--surface);
  color: var(--text);
}

.a2-content .accordion-button:not(.collapsed) {
  background: var(--surface-2);
  color: var(--accent);
  box-shadow: none;
}

.a2-content .accordion-body {
  background: var(--surface);
  color: var(--text);
}

.a2-content .table {
  color: var(--text);
}

.a2-content .table > :not(caption) > * > * {
  background-color: transparent;
  border-bottom-color: var(--border);
  color: var(--text);
}

.a2-content .alert-info {
  background: rgba(67,97,238,0.08);
  border-color: rgba(67,97,238,0.2);
  color: var(--text);
}

.a2-content .alert-warning {
  background: rgba(249,115,22,0.08);
  border-color: rgba(249,115,22,0.2);
  color: var(--text);
}

.a2-content .badge.bg-success {
  background: rgba(34,197,94,0.2) !important;
  color: #16a34a !important;
}

.a2-content .badge.bg-warning {
  background: rgba(249,115,22,0.15) !important;
  color: #ea580c !important;
}

.a2-content code { color: var(--text); }

.a2-content img.img-fluid { border-color: var(--border) !important; }

/* WIP overlay - covers main content, leaves sidebar/header untouched */
.a2-wip-overlay-wrap {
  position: relative;
}
.a2-wip-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(10, 14, 26, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}
.a2-wip-overlay-inner {
  text-align: center;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 2rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.a2-wip-overlay-inner i {
  font-size: 2.2rem;
  opacity: 0.85;
}
.a2-wip-overlay-inner p {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* Sync badge */
.a2-sync-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.a2-sync-fresh  { background: rgba(16,185,129,.15); color: #10b981; }
.a2-sync-warn   { background: rgba(245,158,11,.15);  color: #f59e0b; }
.a2-sync-stale  { background: rgba(239,68,68,.15);   color: #ef4444; }
.a2-sync-never  { background: rgba(107,114,128,.15); color: #6b7280; }
.a2-sync-live   { background: rgba(59,130,246,.15);  color: #3b82f6; }
