/* ═══════════════════════════════════════════════════════════════
   ECM Park Services — Shared Styles
   Design: Apple Liquid Glass (Light)
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  /* Brand */
  --brand:        #0096c7;
  --brand-dark:   #0077a8;
  --brand-light:  rgba(0, 180, 216, 0.14);

  /* Glass surfaces */
  --glass-card:     rgba(255, 255, 255, 0.62);
  --glass-sidebar:  rgba(255, 255, 255, 0.75);
  --glass-input:    rgba(255, 255, 255, 0.55);
  --glass-btn:      rgba(255, 255, 255, 0.55);
  --glass-inset:    rgba(255, 255, 255, 0.38);
  --glass-overlay:  rgba(255, 255, 255, 0.85);
  --glass-border:   rgba(255, 255, 255, 0.80);
  --glass-border-subtle: rgba(255,255,255,0.50);

  /* Background */
  --bg:      transparent;
  --bg-card: var(--glass-card);
  --bg-inset: var(--glass-inset);

  /* Text */
  --text:       #0d2d36;
  --text-muted: #4a7a87;
  --text-hint:  #8ab4be;

  /* Borders */
  --border:        rgba(120, 200, 220, 0.22);
  --border-strong: rgba(80, 160, 185, 0.35);

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  /* Shadows — soft, glassy */
  --shadow-sm: 0 2px 8px rgba(0,100,140,0.08), 0 1px 2px rgba(0,100,140,0.04);
  --shadow-md: 0 8px 32px rgba(0,100,140,0.12), 0 2px 8px rgba(0,100,140,0.06);
  --shadow-lg: 0 16px 48px rgba(0,100,140,0.16), 0 4px 12px rgba(0,100,140,0.08);
  --shadow-glow: 0 0 0 3px rgba(0, 180, 216, 0.22);

  /* Semantic colours */
  --green-bg:    rgba(52, 199, 89,  0.15); --green-text:  #1a7a34;
  --amber-bg:    rgba(255,149,  0,  0.15); --amber-text:  #8a5a00;
  --red-bg:      rgba(255, 59, 48,  0.14); --red-text:    #c0392b;
  --blue-bg:     rgba(0, 180, 216,  0.14); --blue-text:   #005f80;
  --purple-bg:   rgba(88, 86, 214,  0.14); --purple-text: #4040c0;

  --success: #34c759; --warning: #ff9500; --danger: #ff3b30;

  /* Blur */
  --blur-card:    blur(20px) saturate(180%);
  --blur-sidebar: blur(28px) saturate(200%);
  --blur-heavy:   blur(40px) saturate(220%);
}

/* ── GLOBAL ─────────────────────────────────────────────────── */
html { -webkit-font-smoothing: antialiased; height: 100%; }

body {
  font-family: -apple-system, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  /* Liquid glass gradient background — fixed so it stays as you scroll */
  background:
    radial-gradient(ellipse at 0% 0%,   rgba(186, 230, 253, 0.9) 0%,  transparent 60%),
    radial-gradient(ellipse at 100% 0%,  rgba(167, 243, 208, 0.7) 0%,  transparent 55%),
    radial-gradient(ellipse at 50% 80%,  rgba(196, 181, 253, 0.5) 0%,  transparent 60%),
    radial-gradient(ellipse at 100% 100%,rgba(147, 197, 253, 0.8) 0%,  transparent 55%),
    linear-gradient(160deg, #e0f7ff 0%, #f0fffe 40%, #eef6ff 70%, #f8f0ff 100%);
  background-attachment: fixed;
}

/* ── SIDEBAR LAYOUT ─────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--glass-sidebar);
  backdrop-filter: var(--blur-sidebar);
  -webkit-backdrop-filter: var(--blur-sidebar);
  border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100; overflow-y: auto;
  /* Specular highlight at right edge */
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.6), 2px 0 16px rgba(0,100,140,0.08);
}

.sidebar-logo { padding: 20px 16px 16px; border-bottom: 1px solid var(--glass-border-subtle); }
.sidebar-logo img { height: 48px; width: auto; display: block; margin: 0 auto; }
.sidebar-app-name { text-align: center; font-size: 12px; font-weight: 600; color: var(--brand); margin-top: 8px; letter-spacing: 0.2px; }

.sidebar-section { padding: 8px 10px; }
.sidebar-section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-hint); padding: 8px 8px 4px; }

.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-md);
  text-decoration: none; font-size: 13px; font-weight: 500;
  color: var(--text-muted); transition: all 0.18s ease;
  margin-bottom: 2px;
}
.nav-link:hover {
  background: rgba(255,255,255,0.55);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), var(--shadow-sm);
}
.nav-link.active {
  background: linear-gradient(135deg, rgba(0,180,216,0.18) 0%, rgba(0,180,216,0.09) 100%);
  color: var(--brand-dark);
  font-weight: 600;
  border: 1px solid rgba(0,180,216,0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), var(--shadow-sm);
}
.nav-link .nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar-footer { margin-top: auto; padding: 12px 10px; border-top: 1px solid var(--glass-border-subtle); }

.sync-status { font-size: 11px; display: flex; align-items: center; gap: 6px; color: var(--text-muted); padding: 4px 4px 8px; }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-hint); flex-shrink: 0; transition: background 0.3s; }
.sync-dot.ok { background: var(--success); }
.sync-dot.saving { background: var(--warning); animation: pulse 1s ease infinite; }
.sync-dot.error { background: var(--danger); }

.user-info { font-size: 12px; color: var(--text-muted); padding: 6px 4px 4px; }
.user-info strong { display: block; color: var(--text); font-size: 13px; margin-bottom: 4px; }
.user-role {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(0,180,216,0.2), rgba(0,150,199,0.15));
  color: var(--brand-dark); border: 1px solid rgba(0,180,216,0.3);
  text-transform: uppercase; letter-spacing: 0.3px;
}

.signout-btn {
  margin-top: 8px; width: 100%; padding: 7px; border: none;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.45);
  color: var(--text-muted); font-size: 12px;
  cursor: pointer; font-family: inherit; transition: all 0.15s;
  border: 1px solid var(--glass-border-subtle);
}
.signout-btn:hover { background: rgba(255,59,48,0.1); color: var(--red-text); border-color: rgba(255,59,48,0.2); }

.main-content { margin-left: 220px; flex: 1; min-width: 0; }
.app-body { max-width: 1060px; margin: 0 auto; padding: 28px 24px; }

/* Mobile sidebar */
.sidebar-toggle { display: none; position: fixed; top: 12px; left: 12px; z-index: 200; background: rgba(255,255,255,0.7); backdrop-filter: blur(12px); color: var(--text); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); width: 36px; height: 36px; font-size: 18px; cursor: pointer; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,50,80,0.2); backdrop-filter: blur(2px); z-index: 99; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-220px); transition: transform 0.25s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .app-body { padding: 60px 12px 24px; }
}

/* ── TABS ───────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 0; margin-bottom: 24px;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 3px;
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), var(--shadow-sm);
  overflow-x: auto;
}
.tab {
  flex: 1; padding: 7px 16px;
  font-size: 13px; font-weight: 500;
  background: none; border: none; border-radius: 11px;
  cursor: pointer; color: var(--text-muted);
  white-space: nowrap; transition: all 0.18s; text-align: center;
}
.tab.active {
  background: rgba(255,255,255,0.85);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,100,140,0.10), inset 0 1px 0 rgba(255,255,255,0.95);
}
.section { display: none; }
.section.active { display: block; animation: fadeSlideIn 0.22s ease both; }

/* ── CARDS ──────────────────────────────────────────────────── */
.card {
  background: var(--glass-card);
  backdrop-filter: var(--blur-card);
  -webkit-backdrop-filter: var(--blur-card);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 14px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(0,100,140,0.08), inset 0 1px 0 rgba(255,255,255,0.9);
}
.card-title { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 1rem; }

/* ── METRICS ────────────────────────────────────────────────── */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.metric {
  background: var(--glass-card);
  backdrop-filter: var(--blur-card);
  -webkit-backdrop-filter: var(--blur-card);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(0,100,140,0.07), inset 0 1px 0 rgba(255,255,255,0.9);
  animation: fadeSlideIn 0.2s ease both;
}
.metric:nth-child(1) { animation-delay: 0.00s; }
.metric:nth-child(2) { animation-delay: 0.04s; }
.metric:nth-child(3) { animation-delay: 0.08s; }
.metric:nth-child(4) { animation-delay: 0.12s; }
.metric-label { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.metric-val { font-size: 30px; font-weight: 700; letter-spacing: -1px; color: var(--text); }
.metric-val.ok     { color: #1a7a34; }
.metric-val.warn   { color: #8a5a00; }
.metric-val.danger { color: #c0392b; }

/* ── FORMS ──────────────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form-row.c3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.c4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 5px; }
label { font-size: 12px; font-weight: 600; color: var(--text-muted); }

input, select, textarea {
  font-size: 15px; padding: 9px 12px;
  border: 1px solid rgba(200,230,240,0.5);
  border-radius: var(--radius-sm);
  background: var(--glass-input);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text); width: 100%;
  font-family: inherit; outline: none;
  -webkit-appearance: none;
  transition: all 0.18s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
input:focus, select:focus, textarea:focus {
  background: rgba(255,255,255,0.82);
  border-color: rgba(0,180,216,0.45);
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255,255,255,0.9);
}
textarea { resize: vertical; min-height: 72px; line-height: 1.5; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--glass-border);
  background: var(--glass-btn);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text); font-family: inherit;
  transition: all 0.15s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), var(--shadow-sm);
}
.btn:hover { background: rgba(255,255,255,0.75); box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), var(--shadow-md); transform: translateY(-1px); }
.btn:active { transform: scale(0.97) translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, rgba(0,180,216,0.85) 0%, rgba(0,150,199,0.90) 100%);
  border-color: rgba(0,180,216,0.5);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,150,199,0.30), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-primary:hover { background: linear-gradient(135deg, rgba(0,200,240,0.9) 0%, rgba(0,170,215,0.95) 100%); box-shadow: 0 6px 20px rgba(0,150,199,0.40), inset 0 1px 0 rgba(255,255,255,0.35); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-danger  { background: rgba(255,59,48,0.12);  border-color: rgba(255,59,48,0.25);  color: var(--red-text); }
.btn-danger:hover  { background: rgba(255,59,48,0.20); }
.btn-edit    { background: rgba(0,180,216,0.12);   border-color: rgba(0,180,216,0.25);  color: var(--blue-text); }
.btn-edit:hover    { background: rgba(0,180,216,0.22); }
.btn-success { background: rgba(52,199,89,0.12);   border-color: rgba(52,199,89,0.25);  color: var(--green-text); }
.btn-success:hover { background: rgba(52,199,89,0.22); }

.actions { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  letter-spacing: 0.1px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid transparent;
}
.badge-ok        { background: rgba(52,199,89,0.16);   color: #1a7a34;        border-color: rgba(52,199,89,0.25); }
.badge-warn      { background: rgba(255,149,0,0.15);   color: #8a5a00;        border-color: rgba(255,149,0,0.25); }
.badge-due       { background: rgba(255,59,48,0.14);   color: #c0392b;        border-color: rgba(255,59,48,0.22); }
.badge-none      { background: rgba(180,210,220,0.25); color: var(--text-muted); border-color: rgba(180,210,220,0.35); }
.badge-open      { background: rgba(255,59,48,0.14);   color: #c0392b;        border-color: rgba(255,59,48,0.22); }
.badge-progress  { background: rgba(255,149,0,0.15);   color: #8a5a00;        border-color: rgba(255,149,0,0.25); }
.badge-closed    { background: rgba(52,199,89,0.16);   color: #1a7a34;        border-color: rgba(52,199,89,0.25); }
.badge-solid     { background: rgba(0,180,216,0.14);   color: var(--blue-text);  border-color: rgba(0,180,216,0.25); }
.badge-effluent  { background: rgba(52,199,89,0.14);   color: #1a7a34;        border-color: rgba(52,199,89,0.22); }
.badge-cesspool  { background: rgba(255,149,0,0.14);   color: #8a5a00;        border-color: rgba(255,149,0,0.22); }
.badge-grease-trap { background: rgba(88,86,214,0.14); color: var(--purple-text); border-color: rgba(88,86,214,0.22); }
.badge-soon      { background: rgba(255,149,0,0.15);   color: #8a5a00;        border-color: rgba(255,149,0,0.25); }
.badge-scheduled { background: rgba(52,199,89,0.14);   color: #1a7a34;        border-color: rgba(52,199,89,0.22); }
.badge-reg       { background: rgba(52,199,89,0.14);   color: #1a7a34;        border-color: rgba(52,199,89,0.22); }
.badge-maint     { background: rgba(0,180,216,0.14);   color: var(--blue-text);  border-color: rgba(0,180,216,0.22); }
.badge-repair    { background: rgba(255,149,0,0.14);   color: #8a5a00;        border-color: rgba(255,149,0,0.22); }
.badge-em        { background: rgba(255,59,48,0.14);   color: #c0392b;        border-color: rgba(255,59,48,0.22); }
.badge-reported  { background: rgba(255,149,0,0.14);   color: #8a5a00;        border-color: rgba(255,149,0,0.22); }
.badge-resolved  { background: rgba(52,199,89,0.14);   color: #1a7a34;        border-color: rgba(52,199,89,0.22); }

.lot-tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 500; background: rgba(0,180,216,0.14); color: var(--brand-dark); border: 1px solid rgba(0,180,216,0.25); margin: 1px 2px 1px 0; }

/* ── TABLES ─────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 700; font-size: 11px; color: var(--text-muted); padding: 8px 12px; border-bottom: 1px solid rgba(0,150,190,0.15); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5px; }
td { padding: 10px 12px; border-bottom: 1px solid rgba(0,150,190,0.08); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.35); }
.overdue-row td { background: rgba(255,59,48,0.04); }
.overdue-row:hover td { background: rgba(255,59,48,0.08); }

/* ── MISC ───────────────────────────────────────────────────── */
.empty { padding: 3rem; text-align: center; color: var(--text-hint); font-size: 14px; }
.sh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: 8px; }
.sh h3 { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.fr { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.fr select { font-size: 13px; padding: 7px 12px; border: 1px solid var(--glass-border); border-radius: var(--radius-sm); background: var(--glass-btn); backdrop-filter: blur(8px); color: var(--text); width: auto; box-shadow: var(--shadow-sm); -webkit-appearance: none; cursor: pointer; }
mono { font-family: 'SF Mono', 'Menlo', monospace; font-size: 12px; }

/* ── SEPTIC SPECIFIC ─────────────────────────────────────────── */
.sys-card {
  background: var(--glass-card);
  backdrop-filter: var(--blur-card);
  -webkit-backdrop-filter: var(--blur-card);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(0,100,140,0.07), inset 0 1px 0 rgba(255,255,255,0.9);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.18s;
  animation: fadeSlideIn 0.18s ease both;
}
.sys-card:hover { box-shadow: 0 8px 32px rgba(0,100,140,0.12), inset 0 1px 0 rgba(255,255,255,0.9); transform: translateY(-1px); }
.sys-card-head { padding: 14px 18px; display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid rgba(0,150,190,0.12); background: linear-gradient(135deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.20) 100%); }
.sys-card-body { padding: 8px 18px 12px; }
.tank-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(0,150,190,0.08); overflow: hidden; }
.tank-row:last-child { border-bottom: none; }
.inline-form { background: rgba(255,255,255,0.40); backdrop-filter: blur(8px); border-radius: var(--radius-md); padding: 1rem; margin-top: 10px; border: 1px solid var(--glass-border-subtle); }
.cb-group { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.cb-item { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm); transition: background 0.15s; }
.cb-item:hover { background: rgba(255,255,255,0.45); }
.cb-item input[type=checkbox] { width: auto; cursor: pointer; accent-color: var(--brand); }
.maint-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warning); margin-right: 5px; vertical-align: middle; }

/* ── RESPONSIVE TABLE ────────────────────────────────────────── */
.r-table { width: 100%; border-collapse: collapse; }
.r-table th { font-weight: 700; font-size: 11px; color: var(--text-muted); padding: 8px 12px; border-bottom: 1px solid rgba(0,150,190,0.15); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5px; }
.r-table td { padding: 10px 12px; border-bottom: 1px solid rgba(0,150,190,0.08); vertical-align: middle; font-size: 13px; }
.r-table tr:last-child td { border-bottom: none; }
.r-table tr:hover td { background: rgba(255,255,255,0.35); }
.r-table .overdue-row td { background: rgba(255,59,48,0.04); }
@media (max-width: 720px) {
  .r-table thead { display: none; }
  .r-table, .r-table tbody { display: block; }
  .r-table tr { display: block; background: rgba(255,255,255,0.55); border-radius: var(--radius-md); margin-bottom: 10px; padding: 4px 14px 10px; box-shadow: var(--shadow-sm); border: 1px solid var(--glass-border); }
  .r-table tr:hover { box-shadow: var(--shadow-md); }
  .r-table .overdue-row { border-left: 3px solid var(--danger); }
  .r-table td { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border: none; border-bottom: 1px solid rgba(0,150,190,0.08); font-size: 13px; gap: 12px; }
  .r-table td:last-child { border-bottom: none; padding-top: 10px; }
  .r-table td::before { content: attr(data-label); font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; flex-shrink: 0; min-width: 80px; }
  .r-table td[data-label=""] { justify-content: flex-end; }
  .r-table td[data-label=""]::before { display: none; }
  .r-table td.hide-sm { display: none; }
}

/* ── DASHBOARD CARDS ─────────────────────────────────────────── */
.hub-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.hub-card {
  background: var(--glass-card);
  backdrop-filter: var(--blur-card);
  -webkit-backdrop-filter: var(--blur-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(0,100,140,0.07), inset 0 1px 0 rgba(255,255,255,0.9);
  text-decoration: none; color: inherit; display: block;
  transition: box-shadow 0.2s, transform 0.18s;
  /* Subtle left accent via gradient */
  background-image: linear-gradient(135deg, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.50) 100%);
}
.hub-card:hover { box-shadow: 0 8px 32px rgba(0,100,140,0.13), inset 0 1px 0 rgba(255,255,255,0.95); transform: translateY(-2px); }
.hub-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hub-card-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.hub-card-sub { font-size: 12px; color: var(--text-muted); }
.hub-rows { display: flex; flex-direction: column; gap: 0; margin-top: 4px; }
.hub-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; padding: 7px 0; border-bottom: 1px solid rgba(0,150,190,0.08); }
.hub-row:last-child { border-bottom: none; }
.hub-empty { font-size: 13px; color: var(--text-hint); padding: 8px 0; }

/* ── LOGIN ───────────────────────────────────────────────────── */
.login-wrap { width: 100%; max-width: 390px; padding: 24px 16px; }
.login-card {
  background: rgba(255,255,255,0.72);
  backdrop-filter: var(--blur-heavy);
  -webkit-backdrop-filter: var(--blur-heavy);
  border-radius: 24px;
  padding: 36px 32px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 48px rgba(0,100,140,0.14), inset 0 1px 0 rgba(255,255,255,0.95);
}
.login-logo { display: block; height: 60px; margin: 0 auto 20px; }
.login-title { text-align: center; font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.login-sub { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }
.login-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.login-field label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.login-field input { background: rgba(255,255,255,0.65); border: 1px solid rgba(0,180,216,0.25); border-radius: var(--radius-md); }
.login-field input:focus { background: rgba(255,255,255,0.88); }
.remember-row { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.remember-row input { width: auto; accent-color: var(--brand); }
.login-btn {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, rgba(0,180,216,0.88) 0%, rgba(0,150,199,0.92) 100%);
  color: #fff; border: none; border-radius: var(--radius-md);
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 16px rgba(0,150,199,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: all 0.15s;
}
.login-btn:hover { background: linear-gradient(135deg, rgba(0,200,240,0.92) 0%, rgba(0,170,215,0.96) 100%); box-shadow: 0 6px 24px rgba(0,150,199,0.45); transform: translateY(-1px); }
.login-btn:active { transform: scale(0.98); }
.login-error { background: rgba(255,59,48,0.12); color: var(--red-text); border-radius: var(--radius-sm); border: 1px solid rgba(255,59,48,0.2); padding: 10px 14px; font-size: 13px; margin-bottom: 16px; display: none; }
.login-error.show { display: block; }

/* ── LOADING & TOAST ─────────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(224,247,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; z-index: 2000;
}
.loading-overlay p { font-size: 15px; color: var(--text-muted); font-weight: 500; }
.spinner { width: 36px; height: 36px; border: 3px solid rgba(0,180,216,0.18); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.7s linear infinite; }

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: rgba(13,45,54,0.88);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  color: #fff; padding: 10px 22px; border-radius: 20px;
  font-size: 14px; font-weight: 500; opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none; z-index: 9999;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── COLLAPSIBLE ─────────────────────────────────────────────── */
.collapsible { display: block !important; max-height: 0; overflow: hidden; transition: max-height 0.28s cubic-bezier(0.4,0,0.2,1), opacity 0.22s; opacity: 0; }
.collapsible.open { max-height: 600px; opacity: 1; }

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin        { to { transform: rotate(360deg); } }
@keyframes pulse       { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 680px) {
  .metrics { grid-template-columns: repeat(2,1fr); }
  .form-row, .form-row.c3, .form-row.c4 { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
}
