/* ═══════════════════════════════════════════════════════
   assets/css/portal.css
   Styles for portal pages only (login, dashboard,
   download, settings). Requires style.css to be loaded first.
═══════════════════════════════════════════════════════ */

/* ── Portal layout shell ── */
.portal-body { background: var(--bg); }

.portal-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: 248px; flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 4px; bottom: 0; left: 0;
  z-index: 60; overflow-y: auto;
}

.sidebar-brand {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.sidebar-logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--navy-900);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(7,24,48,0.3);
}
.sidebar-wordmark strong { display: block; font-size: 13px; font-weight: 700; color: var(--navy-900); letter-spacing: -0.2px; }
.sidebar-wordmark span   { font-size: 10px; color: var(--text-xlt); letter-spacing: 0.6px; text-transform: uppercase; }

/* District switcher */
.district-switcher {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.district-label { font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-xlt); margin-bottom: 6px; }
.district-list { display: flex; flex-direction: column; gap: 2px; }
.district-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--r-sm);
  cursor: pointer; text-decoration: none;
  border: none; background: none; width: 100%; text-align: left;
  font-family: var(--font);
  transition: background 0.15s;
}
.district-item:hover { background: var(--bg); }
.district-item.active { background: var(--gold-pale); }
.district-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border-md); flex-shrink: 0;
}
.district-item.active .district-dot { background: var(--gold); }
.district-name { font-size: 13px; font-weight: 500; color: var(--text-md); flex: 1; }
.district-item.active .district-name { color: var(--gold); font-weight: 600; }
.district-count { font-size: 11px; color: var(--text-xlt); font-family: var(--font-mono); }

/* Nav */
.sidebar-nav {
  flex: 1; padding: 10px 10px;
  display: flex; flex-direction: column; gap: 1px;
}
.nav-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-xlt);
  padding: 8px 8px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm);
  text-decoration: none; cursor: pointer;
  color: var(--text-lt); font-size: 13px; font-weight: 500;
  border: none; background: none; width: 100%; text-align: left;
  font-family: var(--font);
  transition: all 0.15s;
  position: relative;
}
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active { background: var(--gold-pale); color: var(--gold); font-weight: 600; }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-badge {
  margin-left: auto; background: var(--gold);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 10px;
  min-width: 18px; text-align: center;
}

/* Company chip at bottom */
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.company-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r); margin-bottom: 8px;
}
.company-avatar {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--navy-900); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: 0.3px;
}
.company-info { flex: 1; min-width: 0; }
.company-info strong { display: block; font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.company-info span { font-size: 10px; color: var(--text-lt); }

.license-badge {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500;
  color: var(--green); margin-bottom: 8px;
  padding: 5px 8px;
  background: var(--green-bg); border: 1px solid var(--green-bd);
  border-radius: var(--r-sm);
}
.license-badge svg { width: 12px; height: 12px; }
.license-badge .expiry { margin-left: auto; color: var(--text-lt); font-size: 10px; }

.btn-logout {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 7px 8px; border-radius: var(--r-sm);
  background: none; border: none; cursor: pointer;
  color: var(--text-lt); font-size: 13px; font-weight: 500;
  font-family: var(--font);
  transition: all 0.15s; text-align: left;
}
.btn-logout:hover { background: var(--red-bg); color: var(--red); }
.btn-logout svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Main content ── */
.portal-main {
  margin-left: 248px; flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* Topbar */
.topbar {
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  position: sticky; top: 4px; z-index: 40;
  gap: 16px;
}
.topbar-title { font-size: 15px; font-weight: 600; color: var(--text); flex: 1; }
.topbar-title .sub { font-size: 12px; font-weight: 400; color: var(--text-lt); margin-left: 8px; font-family: var(--font-hindi); }
.topbar-chips { display: flex; align-items: center; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; color: var(--text-md);
  background: var(--bg); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: var(--r-sm);
}
.chip svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }

/* Page content area */
.page { padding: 24px 28px; flex: 1; }

/* ── Dashboard stats ── */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  transition: box-shadow 0.18s, transform 0.18s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.stat-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.stat-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat-icon.blue   { background: var(--blue-bg); color: var(--blue); }
.stat-icon.green  { background: var(--green-bg); color: var(--green); }
.stat-icon.gold   { background: var(--gold-pale); color: var(--gold); }
.stat-icon.amber  { background: var(--amber-bg); color: #D97706; }
.stat-num { font-size: 36px; font-weight: 700; color: var(--navy-900); line-height: 1; margin-bottom: 4px; letter-spacing: -1px; }
.stat-label { font-size: 13px; color: var(--text-lt); }
.stat-label-hi { font-family: var(--font-hindi); font-size: 11px; color: var(--text-xlt); display: block; margin-top: 1px; }

/* ── Road map ── */
.roadmap-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px 24px;
  margin-bottom: 20px;
}
.roadmap-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.roadmap-title { font-size: 14px; font-weight: 600; color: var(--text); }
.roadmap-title span { font-family: var(--font-hindi); font-size: 12px; font-weight: 400; color: var(--text-lt); display: block; }
.roadmap-cycle { font-size: 12px; color: var(--text-lt); }

.road-wrap { position: relative; padding: 0 16px; }
.road-track { height: 3px; background: var(--border); border-radius: 2px; position: relative; margin: 28px 0 32px; }
.road-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-lt)); transition: width 1.2s cubic-bezier(0.4,0,0.2,1); }
.road-nodes { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); display: flex; justify-content: space-between; }
.rn { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--border); background: var(--surface); transition: all 0.4s; }
.rn.done   { background: var(--gold); border-color: var(--gold); }
.rn.active { background: var(--surface); border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-ring); }

.road-stages { display: flex; justify-content: space-between; }
.stage { width: 20%; text-align: center; }
.stage-ico { width: 40px; height: 40px; border-radius: 10px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--border); background: var(--surface); }
.stage-ico svg { width: 18px; height: 18px; stroke: var(--text-lt); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stage.done .stage-ico { background: var(--gold-pale); border-color: var(--gold); }
.stage.done .stage-ico svg { stroke: var(--gold); }
.stage.active .stage-ico { background: var(--navy-50); border-color: var(--navy-400); }
.stage.active .stage-ico svg { stroke: var(--navy-700); }
.stage-name { font-size: 12px; font-weight: 600; color: var(--text-lt); }
.stage-name .hi { font-family: var(--font-hindi); font-weight: 400; font-size: 11px; color: var(--text-xlt); display: block; }
.stage.done .stage-name   { color: var(--gold); }
.stage.active .stage-name { color: var(--navy-700); }
.stage-val { font-size: 11px; color: var(--text-xlt); margin-top: 3px; font-family: var(--font-mono); }

/* ── Table ── */
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.table-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.table-title { font-size: 14px; font-weight: 600; color: var(--text); }
.table-actions { display: flex; gap: 8px; }

table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--bg); }
th { padding: 9px 16px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-xlt); border-bottom: 1px solid var(--border); }
td { padding: 11px 16px; font-size: 13px; color: var(--text-md); border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg); }
.td-mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-lt); }
.td-strong { font-weight: 500; color: var(--text); }
.td-lt { font-size: 12px; color: var(--text-xlt); }

/* ── Alert banner ── */
.alert {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--r);
  margin-bottom: 18px; font-size: 13px;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.alert-blue { background: var(--blue-bg); border: 1px solid var(--blue-bd); color: var(--blue); }
.alert-green { background: var(--green-bg); border: 1px solid var(--green-bd); color: var(--green); }
.alert-amber { background: var(--amber-bg); border: 1px solid var(--amber-bd); color: var(--amber); }
.alert-action { margin-left: auto; font-weight: 600; cursor: pointer; text-decoration: underline; white-space: nowrap; }

/* ── Settings ── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; }
.settings-card.full { grid-column: 1 / -1; }
.settings-card-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.settings-card-title svg { width: 16px; height: 16px; stroke: var(--text-lt); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-fields { display: flex; flex-direction: column; gap: 14px; }
.settings-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.settings-row:last-child { border-bottom: none; }
.settings-row .k { color: var(--text-lt); }
.settings-row .v { font-weight: 500; color: var(--text); }
.settings-row .v.mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-lt); letter-spacing: 0.5px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ── Download page ── */
.download-hero {
  background: var(--navy-900); border-radius: var(--r-xl);
  padding: 32px 36px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 32px;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative; overflow: hidden;
}
.download-hero::after {
  content: '';
  position: absolute; right: -80px; top: -80px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,0.025);
  pointer-events: none;
}
.dh-app-icon { font-size: 56px; flex-shrink: 0; z-index: 1; }
.dh-info { flex: 1; z-index: 1; }
.dh-name { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -0.3px; margin-bottom: 4px; }
.dh-name em { font-style: normal; color: var(--gold-lt); }
.dh-sub { font-size: 13px; color: rgba(255,255,255,0.55); margin-bottom: 3px; }
.dh-sub-hi { font-family: var(--font-hindi); font-size: 12px; color: rgba(255,255,255,0.35); margin-bottom: 18px; display: block; }
.dh-meta { display: flex; gap: 18px; }
.dh-meta-item { font-size: 12px; color: rgba(255,255,255,0.45); }
.dh-meta-item strong { color: rgba(255,255,255,0.8); }
.dh-action { z-index: 1; flex-shrink: 0; }
.btn-download {
  display: flex; flex-direction: column; align-items: center;
  background: var(--gold); color: #fff;
  padding: 14px 28px; border-radius: var(--r-lg);
  border: none; cursor: pointer; font-family: var(--font);
  text-decoration: none; transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(200,134,10,0.45);
}
.btn-download:hover { background: var(--gold-lt); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,134,10,0.5); }
.btn-download .dl-icon { font-size: 24px; margin-bottom: 4px; }
.btn-download .dl-label { font-size: 15px; font-weight: 700; }
.btn-download .dl-size { font-size: 11px; opacity: 0.8; margin-top: 2px; font-family: var(--font-mono); }

.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.dl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.dl-card h3 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }
.dl-card h3 svg { width: 15px; height: 15px; stroke: var(--text-lt); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 10px; font-size: 13px; color: var(--text-md); line-height: 1.5; counter-increment: step; }
.steps li::before { content: counter(step); min-width: 20px; height: 20px; border-radius: 50%; background: var(--navy-900); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; flex-shrink: 0; }
.steps li .hi { font-family: var(--font-hindi); font-size: 11px; color: var(--text-lt); display: block; margin-top: 2px; }
.req-list { list-style: none; display: flex; flex-direction: column; gap: 0; }
.req-item { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.req-item:last-child { border-bottom: none; }
.req-item .k { color: var(--text-lt); }
.req-item .v { font-weight: 500; color: var(--text); }
.req-item .v.ok { color: var(--green); }
.req-item .v.no { color: var(--red); }

.changelog { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.changelog h3 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 16px; display: flex; align-items: center; gap: 7px; }
.cl-item { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cl-item:last-child { border-bottom: none; }
.cl-ver { font-family: var(--font-mono); font-size: 11px; font-weight: 500; background: var(--navy-50); color: var(--navy-700); padding: 3px 8px; border-radius: var(--r-xs); height: fit-content; white-space: nowrap; flex-shrink: 0; }
.cl-body .cl-date { font-size: 11px; color: var(--text-xlt); margin-bottom: 3px; font-family: var(--font-mono); }
.cl-body .cl-note { font-size: 13px; color: var(--text-md); line-height: 1.5; }

/* ── Login page specific ── */
.login-page {
  min-height: 100vh; background: var(--navy-950);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 16px;
  position: relative; overflow: hidden;
}
.login-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
.login-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(22,54,106,0.7) 0%, transparent 65%);
  pointer-events: none;
}
.login-card {
  background: var(--surface); border-radius: var(--r-xl);
  padding: 40px 36px; width: 100%; max-width: 400px;
  position: relative; z-index: 1;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.login-logo-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--navy-900); display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 2px 8px rgba(7,24,48,0.4); }
.login-logo-text strong { display: block; font-size: 14px; font-weight: 700; color: var(--navy-900); }
.login-logo-text span { font-size: 11px; color: var(--text-xlt); letter-spacing: 0.4px; }

.login-heading { font-size: 24px; font-weight: 700; color: var(--navy-900); margin-bottom: 4px; letter-spacing: -0.3px; }
.login-sub { font-size: 13px; color: var(--text-lt); margin-bottom: 28px; }
.login-sub .hi { font-family: var(--font-hindi); }

.login-error { background: var(--red-bg); border: 1px solid var(--red-bd); border-radius: var(--r-sm); padding: 9px 12px; font-size: 13px; color: var(--red); margin-bottom: 16px; display: none; }
.login-error.show { display: flex; align-items: center; gap: 8px; }
.login-error svg { width: 14px; height: 14px; stroke: currentColor; fill: none; flex-shrink: 0; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.login-form { display: flex; flex-direction: column; gap: 14px; }
.input-group { position: relative; }
.input-group .input { padding-right: 40px; }
.input-suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-xlt); padding: 4px; transition: color 0.15s; }
.input-suffix:hover { color: var(--text-md); }
.input-suffix svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }

.login-row { display: flex; align-items: center; justify-content: space-between; }
.checkbox-label { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13px; color: var(--text-md); }
.checkbox-label input { accent-color: var(--gold); width: 14px; height: 14px; }
.forgot { font-size: 13px; color: var(--gold); text-decoration: none; font-weight: 500; }
.forgot:hover { color: var(--gold-lt); }

.btn-login { width: 100%; padding: 12px; font-size: 14px; font-weight: 700; position: relative; }
.btn-login.loading .btn-text { opacity: 0; }
.btn-login.loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; animation: spin 0.65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-footer { text-align: center; margin-top: 16px; }
.login-footer a { font-size: 13px; color: var(--text-lt); text-decoration: none; }
.login-footer a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .portal-main { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dl-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-card.full { grid-column: auto; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .download-hero { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════════════════
   SIDEBAR REDESIGN — cleaner, no district switcher
   ══════════════════════════════════════════════════════ */

/* New sidebar top section: app version tag */
.sidebar-version {
  padding: 6px 18px 10px;
  border-bottom: 1px solid var(--border);
}
.sidebar-version-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--text-xlt);
  background: var(--bg); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 20px;
}

/* Sidebar nav section divider */
.nav-divider {
  height: 1px; background: var(--border);
  margin: 8px 10px;
}

/* Active nav item — stronger indicator */
.nav-item.active {
  background: var(--gold-pale);
  color: var(--gold);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--gold);
}

/* Sidebar footer restructure */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.company-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r); margin-bottom: 10px;
}
.company-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--navy-900); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: 0.3px;
}
.company-info { flex: 1; min-width: 0; }
.company-info strong {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.company-info span { font-size: 10px; color: var(--text-lt); }

/* License badge — slimmer */
.license-badge {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500; color: var(--green);
  padding: 5px 8px; margin-bottom: 8px;
  background: var(--green-bg); border: 1px solid var(--green-bd);
  border-radius: var(--r-sm);
}
.license-badge svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.license-badge .expiry { margin-left: auto; color: var(--text-lt); font-size: 10px; }

/* Sign out button — secondary, less prominent */
.btn-logout {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 7px 8px; border-radius: var(--r-sm);
  background: none; border: none; cursor: pointer;
  color: var(--text-xlt); font-size: 12px; font-weight: 500;
  font-family: var(--font); transition: all 0.15s; text-align: left;
}
.btn-logout:hover { background: var(--red-bg); color: var(--red); }
.btn-logout svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ══════════════════════════════════════════════════════
   SIGN OUT CONFIRM MODAL
   ══════════════════════════════════════════════════════ */
.signout-overlay {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(4,14,28,0.55); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.signout-overlay.open { display: flex; }
.signout-modal {
  background: var(--surface); border-radius: var(--r-xl);
  padding: 32px 28px; width: 100%; max-width: 340px;
  box-shadow: 0 24px 64px rgba(4,14,28,0.3);
  animation: modalIn 0.22s cubic-bezier(0.16,1,0.3,1);
  text-align: center;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.signout-modal-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--red-bg); border: 1px solid var(--red-bd);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.signout-modal-icon svg { width: 22px; height: 22px; stroke: var(--red); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.signout-modal h3 { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.signout-modal p  { font-size: 13px; color: var(--text-lt); line-height: 1.6; margin-bottom: 22px; }
.signout-modal-actions { display: flex; gap: 10px; }
.signout-modal-actions .btn { flex: 1; justify-content: center; }

/* ══════════════════════════════════════════════════════
   DISTRICT SUMMARY TILES — card-style grid on dashboard
   ══════════════════════════════════════════════════════ */
.district-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.district-tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 20px;
  transition: box-shadow 0.18s, transform 0.18s;
}
.district-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.district-tile-name {
  font-size: 14px; font-weight: 700; color: var(--navy-900);
  margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between;
}
.district-tile-name svg { width: 14px; height: 14px; stroke: var(--text-xlt); fill: none; stroke-width: 1.8; stroke-linecap: round; }
.district-tile-stat {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.district-tile-stat:last-child { border-bottom: none; }
.district-tile-stat .k { color: var(--text-lt); }
.district-tile-stat .v { font-weight: 600; color: var(--text); font-family: var(--font-mono); font-size: 12px; }
.district-tile-bar {
  height: 3px; background: var(--border); border-radius: 2px; margin-top: 12px; overflow: hidden;
}
.district-tile-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-lt));
  border-radius: 2px; transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* ══════════════════════════════════════════════════════
   DISTRICTS TABLE — settings page
   ══════════════════════════════════════════════════════ */
.districts-table {
  width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px;
}
.districts-table th {
  text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--text-xlt);
  padding: 8px 12px; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.districts-table td {
  padding: 11px 12px; color: var(--text-md);
  border-bottom: 1px solid var(--border);
}
.districts-table tbody tr:last-child td { border-bottom: none; }
.districts-table tbody tr:hover td { background: var(--bg); }
