:root {
  color-scheme: light;
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --surface-strong: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #1a56db;
  --accent-strong: #1c64f2;
  --accent-ink: #1e429f;
  --success: #057a55;
  --warning: #c27803;
  --danger: #e02424;
  --success-bg: #def7ec;
  --warning-bg: #fdf6b2;
  --danger-bg: #fde8e8;
  --shadow: 0 10px 25px rgba(17, 24, 39, 0.08);
  --shadow-soft: 0 4px 16px rgba(17, 24, 39, 0.06);
  --shadow-card: 0 1px 3px rgba(17, 24, 39, 0.08);
  --transition: 220ms cubic-bezier(0.22, 1, 0.36, 1);
  --radius-lg: 18px;
  --radius-md: 12px;
  --sidebar-width: 286px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: "DIN", "DIN Pro", "DIN Next", "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
}

button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  transition: grid-template-columns var(--transition);
}

html.sidebar-compact .app-shell {
  grid-template-columns: 92px minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  top: 0;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  padding: 18px 14px;
  background: #ffffff;
  color: var(--text);
  border-right: 1px solid var(--line);
  box-shadow: none;
  display: grid;
  align-content: start;
  gap: 22px;
  transition: width var(--transition), min-width var(--transition);
}

html.sidebar-compact .app-sidebar {
  width: 92px;
  min-width: 92px;
}

.sidebar-brand-logo {
  display: inline-flex;
  align-items: center;
  min-height: 62px;
}

.sidebar-brand-image {
  display: block;
  width: auto;
  height: 46px;
  transition: height var(--transition), opacity var(--transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fafb;
  color: #374151;
  font-weight: 800;
}

html.sidebar-compact .sidebar-brand {
  justify-content: center;
}

html.sidebar-compact .sidebar-brand-image {
  height: 42px;
}

html.sidebar-compact .sidebar-toggle {
  display: none;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-nav a,
.sidebar-nav button,
.sidebar-logout {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-weight: 650;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

html.sidebar-compact .sidebar-nav a,
html.sidebar-compact .sidebar-nav button,
html.sidebar-compact .sidebar-logout {
  justify-content: center;
  padding: 0;
}

html.sidebar-compact .nav-label,
html.sidebar-compact .sidebar-panel {
  display: none;
}

.sidebar-nav a:hover,
.sidebar-nav button:hover,
.sidebar-nav .active,
.sidebar-logout:hover {
  background: #ebf5ff;
  color: var(--accent);
  transform: none;
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: inherit;
}

.nav-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-panel {
  padding: 18px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid var(--line);
  box-shadow: none;
}

.sidebar-panel strong {
  display: block;
  margin-bottom: 8px;
}

.sidebar-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.86rem;
}

.app-main {
  min-width: 0;
  padding: 22px 26px 34px;
}

.page-hero,
.topbar,
.column,
.logs-view,
.auth-card,
.panel-form,
.table-wrap,
.site-footer-inner {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  backdrop-filter: none;
}

.page-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 18px 20px;
  border-radius: 8px;
  border-color: var(--line);
}

.page-hero h1 {
  max-width: none;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.08;
  font-weight: 800;
  margin: 0;
}

.content-copy {
  max-width: 58ch;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f9fafb;
  box-shadow: none;
  font-weight: 700;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  border-color: var(--line);
}

.top-actions,
.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: .72rem;
  text-transform: uppercase;
  font-weight: 750;
  letter-spacing: 0;
}

.eyebrow-light { color: var(--accent); }
.muted { color: var(--muted); margin: 4px 0 0; }
h1, h2 { margin: 0; letter-spacing: 0; }
h2 { font-size: 1.08rem; }

label span,
label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

input,
select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--text);
  padding: 10px 13px;
  outline: none;
  transition: border var(--transition), box-shadow var(--transition), background var(--transition);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 38px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ff6b00' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

select::-ms-expand {
  display: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #e1effe;
  background: white;
}

.month-input { min-width: 164px; }

.workspace {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) minmax(320px, 1.15fr);
  gap: 14px;
}

.dashboard-band {
  grid-column: 1 / -1;
}

.kpi-grid {
  display: grid;
  grid-template-columns: minmax(180px, .75fr) minmax(220px, .95fr) minmax(320px, 1.8fr);
  gap: 14px;
}

.kpi-card,
.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.kpi-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 150px;
}

.kpi-card span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.kpi-card strong {
  color: var(--text);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1;
  min-height: 1.05em;
  font-variant-numeric: tabular-nums;
}

.kpi-card small {
  color: var(--muted);
  font-weight: 650;
}

.chart-card {
  min-width: 0;
}

.chart-card canvas {
  width: 100%;
  display: block;
}

.column {
  min-height: 620px;
  padding: 15px;
  border-radius: 8px;
  border-color: var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.card-list,
.category-grid {
  display: grid;
  gap: 12px;
}

.data-card,
.category-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 13px;
  display: grid;
  gap: 10px;
  text-align: left;
  color: var(--text);
  box-shadow: none;
  transition: transform var(--transition), border var(--transition), box-shadow var(--transition);
}

.data-card:hover {
  transform: none;
  border-color: #bfdbfe;
  background: #f9fbff;
  box-shadow: none;
}

.data-card.selected {
  border-color: var(--accent);
  background: #ebf5ff;
  box-shadow: 0 0 0 1px var(--accent);
}

.load-more-btn {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #374151;
  font-weight: 800;
  box-shadow: none;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.load-more-btn:hover {
  transform: none;
  background: #f9fafb;
  box-shadow: none;
}

.data-card small,
.category-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  font-size: .78rem;
  color: var(--muted);
}

.metrics b { color: var(--text); }

.status-pill {
  width: max-content;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .76rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.status-pill.complete { color: #17633f; background: var(--success-bg); border-color: rgba(31, 143, 95, 0.18); }
.status-pill.partial { color: #845511; background: var(--warning-bg); border-color: rgba(183, 121, 31, 0.2); }
.status-pill.pending { color: #96312c; background: var(--danger-bg); border-color: rgba(194, 65, 58, 0.18); }
.status-pill.complete::before { content: "OK "; }
.status-pill.partial::before { content: "! "; }
.status-pill.pending::before { content: "x "; }

.category-card {
  position: relative;
  padding: 16px;
}

.category-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: absolute;
  top: 18px;
  right: 18px;
}

.category-dot.green { background: var(--success); }
.category-dot.yellow { background: var(--warning); }
.category-dot.red { background: var(--danger); }

.primary-btn {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  padding: 11px 14px;
  font-weight: 700;
  box-shadow: none;
  transition: transform var(--transition), filter var(--transition);
}

.primary-btn:hover {
  transform: none;
  filter: brightness(.96);
}

.primary-btn:disabled {
  opacity: .65;
  cursor: wait;
}

.ghost {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
  background: #ffffff;
  color: #374151;
  font-weight: 700;
}

.full { width: 100%; }

.empty {
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  background: #f9fafb;
}

.alert {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  font-weight: 800;
}

.alert.success { color: #166534; background: var(--success-bg); }
.alert.error { color: #991b1b; background: var(--danger-bg); }

.loader {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid hsla(210 92% 68% / 0.18);
  border-top-color: var(--accent-strong);
  animation: spin .8s linear infinite;
}

.logs-view {
  padding: 18px;
  border-radius: 8px;
}

.new-center-form {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) minmax(220px, 1fr) minmax(240px, 1.2fr) auto;
  gap: 14px;
  align-items: end;
}

.access-panel {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
}

.access-sidebar {
  border-radius: 8px;
  padding: 18px;
  color: white;
  background: var(--accent);
  box-shadow: none;
}

.access-sidebar h2 {
  max-width: 12ch;
  font-size: clamp(1.45rem, 2.3vw, 2.1rem);
  line-height: 1.02;
  margin-bottom: 12px;
  font-weight: 850;
}

.access-sidebar .muted {
  color: hsla(0 0% 100% / 0.86);
}

.access-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.access-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.2fr) auto;
  gap: 12px;
  align-items: end;
}

.access-lists {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px minmax(220px, 1fr);
  gap: 16px;
  align-items: center;
}

.dual-list {
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--text);
  padding: 8px;
  box-shadow: none;
}

.dual-list option {
  padding: 7px 8px;
  border-radius: 8px;
}

.access-actions {
  display: grid;
  gap: 10px;
}

.edit-center-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 107, 0, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.1), rgba(20, 20, 20, 0.66));
}

.edit-center-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.edit-center-card {
  cursor: default;
}

.edit-center-card.inactive {
  opacity: 0.7;
  border-style: dashed;
}

.edit-center-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.edit-center-actions .ghost {
  min-height: 34px;
  padding: 7px 10px;
}

.danger-action {
  border-color: rgba(239, 68, 68, 0.34);
  color: #fecaca;
}

.danger-action:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.48);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border-color: var(--line);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: .88rem;
}

th {
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 0;
  background: #f9fafb;
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover {
  background: #f9fafb;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(520px, 100%);
  padding: 32px;
  display: grid;
  gap: 20px;
  text-align: center;
}

.home-brand {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 118px;
}

.home-brand-default {
  display: block;
  width: min(250px, 78vw);
  height: auto;
}

.auth-panel h1 {
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  line-height: 1.02;
}

.auth-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-weight: 800;
  color: var(--accent-strong);
}

.hero-copy {
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

.stack {
  display: grid;
  gap: 14px;
  text-align: left;
}

.admin-page {
  min-height: 100vh;
  padding: 28px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  padding: 20px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.admin-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 18px;
}

.panel-form {
  padding: 20px;
  display: grid;
  gap: 12px;
  border-radius: 8px;
}

.panel-form p {
  margin: 0;
  display: grid;
  gap: 6px;
}

.site-footer {
  padding: 0 18px 28px;
}

.site-footer-inner {
  width: min(1320px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 15px 20px;
  border-radius: 8px;
  text-align: center;
}

.command-palette {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: start center;
  padding-top: 12vh;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(8px);
}

.command-palette.is-open {
  display: grid;
}

.command-dialog {
  width: min(520px, calc(100vw - 28px));
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.command-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.command-head button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--text);
  font-size: 1.2rem;
}

.command-list {
  display: grid;
  padding: 8px;
}

.command-list a {
  padding: 12px 13px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 750;
}

.command-list a:hover {
  background: #eff6ff;
  color: var(--accent-strong);
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  background: rgba(249, 250, 251, 0.78);
  backdrop-filter: blur(6px);
}

.page-loader.is-visible {
  display: grid;
}

.page-loader-card {
  width: min(320px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: var(--shadow);
  padding: 22px;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.page-loader-card p {
  margin: 0;
  color: var(--muted);
}

.page-loader-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid #dbeafe;
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}

.site-footer-image {
  display: block;
  height: 48px;
  width: auto;
}

.site-footer-inner p {
  margin: 0;
  font-weight: 800;
  color: var(--muted);
}

.fade-in {
  animation: page-rise-in 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes page-rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    position: static;
    width: 100%;
    min-width: 0;
    height: auto;
    grid-template-columns: 1fr;
  }
  .sidebar-brand-logo { min-height: 70px; }
  .sidebar-brand-image { height: 62px; }
  .sidebar-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace,
  .kpi-grid,
  .admin-grid { grid-template-columns: 1fr; }
  .column { min-height: auto; }
}

@media (max-width: 720px) {
  .app-main,
  .admin-page { padding: 16px; }
  .page-hero,
  .topbar,
  .admin-header {
    flex-direction: column;
    align-items: stretch;
  }
  .page-hero h1 { max-width: none; }
  .top-actions,
  .filters-row,
  .new-center-form,
  .access-panel,
  .access-filters,
  .access-lists,
  .sidebar-nav {
    display: grid;
    grid-template-columns: 1fr;
  }
  .metrics { grid-template-columns: 1fr; }
  .site-footer { padding-inline: 12px; }
}

/* Dark premium theme inspired by Gentelella: compact panels, strong contrast and orange accents. */
:root {
  color-scheme: dark;
  --bg: #101722;
  --surface: #182231;
  --surface-soft: #111a27;
  --surface-strong: #1f2b3b;
  --text: #edf2f7;
  --muted: #9aa8b8;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #f97316;
  --accent-strong: #fb923c;
  --accent-ink: #fed7aa;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --success-bg: rgba(34, 197, 94, 0.14);
  --warning-bg: rgba(245, 158, 11, 0.16);
  --danger-bg: rgba(239, 68, 68, 0.15);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.24);
  --shadow-card: 0 10px 22px rgba(0, 0, 0, 0.22);
}

body {
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 34rem),
    linear-gradient(135deg, #0b111b 0%, #121b28 48%, #0d1520 100%);
}

.app-sidebar {
  background: linear-gradient(180deg, #121b29 0%, #0b111b 100%);
  border-right-color: rgba(249, 115, 22, 0.22);
  box-shadow: 12px 0 34px rgba(0, 0, 0, 0.2);
  padding: 22px 16px;
}

.sidebar-brand {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-logo {
  min-height: 48px;
}

.sidebar-brand-image {
  max-width: 160px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
}

.sidebar-toggle,
.ghost,
.load-more-btn,
.command-head button {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
}

.sidebar-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
}

.sidebar-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.sidebar-toggle:hover,
.ghost:hover,
.load-more-btn:hover {
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.42);
  color: #fff7ed;
}

.sidebar-nav a,
.sidebar-nav button,
.sidebar-logout {
  color: #cbd5e1;
  min-height: 42px;
  border-radius: 6px;
  font-size: .92rem;
}

.sidebar-nav a:hover,
.sidebar-nav button:hover,
.sidebar-nav .active,
.sidebar-logout:hover {
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.22), rgba(249, 115, 22, 0.06));
  color: #fff7ed;
  box-shadow: inset 3px 0 0 var(--accent);
  transform: translateX(2px);
}

.nav-icon {
  width: 30px;
  height: 30px;
  background: transparent;
  border: 0;
}

.sidebar-nav .active .nav-icon,
.sidebar-nav a:hover .nav-icon,
.sidebar-nav button:hover .nav-icon {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.42);
}

.sidebar-panel,
.page-hero,
.topbar,
.column,
.logs-view,
.auth-card,
.panel-form,
.table-wrap,
.site-footer-inner,
.admin-header,
.kpi-card,
.chart-card {
  background: linear-gradient(180deg, rgba(31, 43, 59, 0.96), rgba(21, 31, 46, 0.96));
  border-color: var(--line);
  box-shadow: var(--shadow-card);
}

.page-hero,
.topbar,
.column,
.logs-view,
.chart-card,
.table-wrap,
.panel-form,
.admin-header {
  border-top: 1px solid rgba(249, 115, 22, 0.24);
}

.page-hero {
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(251, 146, 60, 0), #22c55e);
}

.content-copy,
.muted,
.kpi-card small,
.data-card small,
.category-card small,
.site-footer-inner p,
label span,
label {
  color: var(--muted);
}

.eyebrow,
.eyebrow-light {
  color: var(--accent-strong);
}

.user-chip {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.34);
  color: #ffedd5;
}

input,
select,
.dual-list {
  background: rgba(8, 13, 21, 0.72);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

input::placeholder {
  color: #64748b;
}

input:focus,
select:focus {
  background: rgba(12, 20, 31, 0.96);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

select option,
.dual-list option {
  background: #111827;
  color: var(--text);
}

.primary-btn {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff7ed;
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.26);
}

.primary-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.data-card,
.category-card {
  background: rgba(15, 23, 35, 0.82);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.data-card:hover,
.category-card:hover {
  background: rgba(24, 35, 52, 0.98);
  border-color: rgba(249, 115, 22, 0.42);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

.data-card.selected {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(15, 23, 35, 0.94));
  border-color: rgba(249, 115, 22, 0.72);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.42), 0 18px 30px rgba(0, 0, 0, 0.24);
}

.metrics {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.metrics b,
.kpi-card strong {
  color: #ffffff;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 160px;
}

.kpi-card::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -54px;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.kpi-card span {
  color: rgba(255, 255, 255, 0.76);
}

.kpi-pending {
  background: linear-gradient(135deg, #b45309 0%, #ea580c 48%, #7f1d1d 100%);
  border-color: rgba(251, 146, 60, 0.52);
}

.kpi-total {
  background: linear-gradient(135deg, #166534 0%, #0f766e 48%, #134e4a 100%);
  border-color: rgba(45, 212, 191, 0.42);
}

.kpi-pending small,
.kpi-total small,
.kpi-pending span,
.kpi-total span {
  color: rgba(255, 255, 255, 0.82);
}

.chart-card {
  background:
    linear-gradient(180deg, rgba(31, 43, 59, 0.98), rgba(15, 23, 35, 0.98)),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.16), transparent 18rem);
}

.chart-card canvas {
  margin-top: 10px;
}

.status-pill.complete {
  color: #bbf7d0;
  background: var(--success-bg);
  border-color: rgba(34, 197, 94, 0.28);
}

.status-pill.partial {
  color: #fde68a;
  background: var(--warning-bg);
  border-color: rgba(245, 158, 11, 0.32);
}

.status-pill.pending {
  color: #fecaca;
  background: var(--danger-bg);
  border-color: rgba(239, 68, 68, 0.3);
}

.empty {
  background: rgba(8, 13, 21, 0.48);
  border-color: rgba(255, 255, 255, 0.14);
}

.alert.success {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.24);
}

.alert.error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.24);
}

.loader,
.page-loader-spinner {
  border-color: rgba(249, 115, 22, 0.18);
  border-top-color: var(--accent-strong);
}

.access-sidebar {
  background: linear-gradient(145deg, #ea580c, #9a3412);
  border: 1px solid rgba(251, 146, 60, 0.35);
}

th {
  background: rgba(8, 13, 21, 0.72);
  color: #cbd5e1;
}

td,
th {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

tbody tr:hover {
  background: rgba(249, 115, 22, 0.08);
}

.command-palette {
  background: rgba(3, 7, 18, 0.66);
}

.command-dialog,
.page-loader-card {
  background: #111827;
  border-color: rgba(249, 115, 22, 0.24);
}

.command-list a:hover {
  background: rgba(249, 115, 22, 0.13);
  color: #fed7aa;
}

.page-loader {
  background: rgba(3, 7, 18, 0.72);
}

html.sidebar-compact .app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

html.sidebar-compact .app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
}

html.sidebar-compact .sidebar-brand {
  justify-content: space-between;
}

html.sidebar-compact .sidebar-brand-image {
  height: auto;
}

html.sidebar-compact .nav-label,
html.sidebar-compact .sidebar-panel {
  display: initial;
}

html.sidebar-compact .sidebar-nav a,
html.sidebar-compact .sidebar-nav button,
html.sidebar-compact .sidebar-logout {
  justify-content: flex-start;
  padding: 0 12px;
}

.sidebar-toggle,
html.sidebar-compact .sidebar-toggle {
  display: none;
}

/* Video-led palette: deep black, dark graphite surfaces and neon orange accents. */
:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-soft: #101010;
  --surface-strong: #1c1c1c;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --line: rgba(244, 244, 245, 0.11);
  --accent: #ff6b00;
  --accent-strong: #ff8a2a;
  --accent-ink: #0a0a0a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.56);
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.42);
  --shadow-card: 0 14px 32px rgba(0, 0, 0, 0.38);
}

body {
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 107, 0, 0.13), transparent 30rem),
    linear-gradient(135deg, #050505 0%, #0a0a0a 52%, #111111 100%);
}

.global-video-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  filter: saturate(1.28) contrast(1) brightness(1.26);
  pointer-events: none;
  user-select: none;
}

.global-video-bg::-webkit-media-controls,
.global-video-bg::-webkit-media-controls-enclosure,
.global-video-bg::-webkit-media-controls-panel,
.global-video-bg::-webkit-media-controls-play-button,
.global-video-bg::-webkit-media-controls-current-time-display,
.global-video-bg::-webkit-media-controls-time-remaining-display,
.global-video-bg::-webkit-media-controls-timeline,
.global-video-bg::-webkit-media-controls-volume-slider,
.global-video-bg::-webkit-media-controls-mute-button,
.global-video-bg::-webkit-media-controls-fullscreen-button,
.global-video-bg::-webkit-media-controls-overlay-play-button,
.global-video-bg::-webkit-media-controls-start-playback-button {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.app-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(5, 5, 5, 0.88) 0 7rem, rgba(5, 5, 5, 0.52) 14rem, transparent 25rem),
    radial-gradient(circle at 70% 16%, rgba(255, 107, 0, 0.12), transparent 28rem),
    linear-gradient(90deg, rgba(5, 5, 5, 0.88), rgba(5, 5, 5, 0.48), rgba(5, 5, 5, 0.84));
  pointer-events: none;
}

.app-sidebar {
  background: linear-gradient(180deg, #141414 0%, #050505 100%);
  border-right-color: rgba(255, 107, 0, 0.28);
}

.page-hero,
.topbar,
.column,
.logs-view,
.auth-card,
.panel-form,
.table-wrap,
.site-footer-inner,
.admin-header,
.kpi-card,
.chart-card,
.sidebar-panel {
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.94), rgba(20, 20, 20, 0.94));
  border-color: rgba(244, 244, 245, 0.11);
}

.auth-shell {
  position: relative;
  overflow: hidden;
}

.auth-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 55% 35%, rgba(255, 107, 0, 0.18), transparent 22rem),
    linear-gradient(90deg, rgba(5, 5, 5, 0.92), rgba(5, 5, 5, 0.52), rgba(5, 5, 5, 0.9));
  pointer-events: none;
}

.auth-panel {
  position: relative;
  z-index: 1;
}

.auth-card {
  border-color: rgba(255, 107, 0, 0.28);
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.5), rgba(20, 20, 20, 0.58));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28), 0 0 45px rgba(255, 107, 0, 0.2);
  backdrop-filter: blur(6px);
}

.page-hero {
  min-height: 168px;
  background:
    linear-gradient(112deg, rgba(28, 28, 28, 0.92) 0%, rgba(65, 29, 7, 0.8) 48%, rgba(255, 107, 0, 0.28) 100%),
    linear-gradient(180deg, rgba(28, 28, 28, 0.96), rgba(14, 14, 14, 0.94));
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.18), transparent 55%, rgba(10, 10, 10, 0.26)),
    linear-gradient(0deg, rgba(255, 107, 0, 0.11), transparent 72%);
  pointer-events: none;
}

.page-hero > * {
  position: relative;
  z-index: 1;
}

.primary-btn {
  background: linear-gradient(135deg, #ff8a2a, #ff6b00);
  color: #0a0a0a;
  box-shadow: 0 14px 34px rgba(255, 107, 0, 0.32);
}

.primary-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 18px 40px rgba(255, 107, 0, 0.42);
}

input,
select,
.dual-list {
  background: rgba(5, 5, 5, 0.72);
  border-color: rgba(244, 244, 245, 0.12);
}

select {
  background-image:
    linear-gradient(rgba(5, 5, 5, 0.72), rgba(5, 5, 5, 0.72)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ff6b00' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: left top, right 12px center;
  background-size: 100% 100%, 16px 16px;
}

input:focus,
select:focus {
  border-color: #ff6b00;
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.22);
}

.sidebar-nav a:hover,
.sidebar-nav button:hover,
.sidebar-nav .active,
.sidebar-logout:hover,
.data-card.selected {
  background: linear-gradient(90deg, rgba(255, 107, 0, 0.22), rgba(255, 107, 0, 0.06));
}

.data-card,
.category-card {
  background: rgba(20, 20, 20, 0.88);
}

.data-card:hover,
.category-card:hover,
.ghost:hover,
.load-more-btn:hover {
  border-color: rgba(255, 107, 0, 0.48);
}

.kpi-pending {
  background: linear-gradient(135deg, #ff6b00 0%, #b94700 58%, #1c1c1c 100%);
  color: #ffffff;
  border-color: rgba(255, 107, 0, 0.62);
}

.kpi-total {
  background: linear-gradient(135deg, #1c1c1c 0%, #232323 44%, #ff6b00 150%);
  border-color: rgba(255, 107, 0, 0.42);
}

.chart-card {
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.98), rgba(10, 10, 10, 0.98));
}

.glosa-dashboard {
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(170px, .65fr) minmax(170px, .65fr) minmax(340px, 1.8fr);
  gap: 14px;
  margin-bottom: 14px;
}

.glosa-layout {
  display: grid;
  grid-template-columns: minmax(320px, .85fr) minmax(420px, 1.4fr);
  gap: 14px;
  align-items: start;
}

.glosa-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.glosa-form .wide {
  grid-column: 1 / -1;
}

textarea {
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 5, 5, 0.72);
  color: var(--text);
  padding: 10px 13px;
  outline: none;
  transition: border var(--transition), box-shadow var(--transition), background var(--transition);
}

textarea:focus {
  border-color: #ff6b00;
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.22);
}

.glosa-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.glosa-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(244, 244, 245, 0.1);
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.84);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.24);
}

.glosa-card-head,
.glosa-actions,
.glosa-meta,
.glosa-inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.glosa-card-head {
  justify-content: space-between;
}

.glosa-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.glosa-meta {
  color: var(--muted);
  font-size: .82rem;
}

.glosa-meta b {
  color: var(--text);
}

.glosa-actions .ghost,
.glosa-inline-form .ghost {
  min-height: 34px;
  padding: 7px 10px;
}

.center-picker {
  position: relative;
}

.center-picker-list {
  position: absolute;
  z-index: 25;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 242px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(255, 107, 0, 0.28);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.96);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(10px);
}

.center-picker-list button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
}

.center-picker-list button:hover {
  background: rgba(255, 107, 0, 0.14);
  color: #fff7ed;
}

.glosa-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
}

.glosa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(8px);
}

.glosa-modal-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  border-color: rgba(255, 107, 0, 0.34);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58), 0 0 48px rgba(255, 107, 0, 0.12);
}

.glosa-modal-card .glosa-inline-form {
  display: grid;
  gap: 12px;
}

.glosa-analysis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.glosa-analysis-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.25fr) minmax(340px, .9fr);
  gap: 14px;
  align-items: start;
}

.glosa-analysis-layout .insight-panel {
  grid-column: 1 / -1;
}

.analysis-bars {
  display: grid;
  gap: 10px;
}

.analysis-bars article {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 107, 0, 0.22);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 107, 0, 0.16), rgba(20, 20, 20, 0.82));
}

.analysis-bars strong,
.analysis-bars small {
  display: block;
}

.analysis-bars span {
  min-width: 42px;
  border-radius: 999px;
  background: #ff6b00;
  color: #0a0a0a;
  padding: 8px 10px;
  text-align: center;
  font-weight: 900;
}

.access-request-shell {
  padding-block: 32px;
}

.access-request-card {
  width: min(760px, calc(100vw - 28px));
}

.access-request-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.access-request-form .wide {
  grid-column: 1 / -1;
}

.request-dual-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.compact-head {
  margin-bottom: 8px;
}

.compact-head h2 {
  font-size: .92rem;
}

.request-actions {
  padding-bottom: 2px;
}

.request-actions .primary-btn,
.request-actions .ghost {
  min-width: 126px;
}

.center-link {
  justify-content: center;
}

.access-request-list {
  display: grid;
  gap: 10px;
}

.access-request-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(244, 244, 245, 0.1);
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.82);
}

.access-request-item small,
.access-request-item p {
  color: var(--muted);
}

.access-request-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.glosa-command-center {
  display: grid;
  gap: 14px;
}

.analytics-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 2px;
}

.analytics-topbar h1 {
  margin: 2px 0 0;
  font-size: clamp(1.55rem, 2vw, 2.35rem);
}

.analytics-filter-panel {
  border: 1px solid rgba(244, 244, 245, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 107, 0, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(20, 20, 20, 0.74), rgba(5, 5, 5, 0.58));
  backdrop-filter: blur(10px);
  padding: 13px;
}

.filter-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.filter-panel-head h2 {
  margin: 3px 0 0;
  color: #fff;
  font-size: 1.05rem;
}

.filter-panel-head p {
  margin: 0;
}

.analytics-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(170px, .8fr) auto auto;
  align-items: end;
  gap: 10px;
}

.analytics-filters label {
  gap: 5px;
}

.analytics-filters span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.analytics-active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 0;
}

.analytics-active-filters button {
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.13);
  color: #fff7ed;
  padding: 7px 11px;
  font-size: .78rem;
  font-weight: 850;
}

.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
}

.analytics-kpi {
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(244, 244, 245, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 22%, rgba(255, 107, 0, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(28, 28, 28, 0.94), rgba(12, 12, 12, 0.94));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.analytics-kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 107, 0, 0.44);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32), 0 0 24px rgba(255, 107, 0, 0.1);
}

.analytics-kpi span,
.analytics-kpi small {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.analytics-kpi strong {
  display: block;
  margin: 12px 0 7px;
  color: #fff;
  font-size: clamp(1.25rem, 2vw, 2rem);
  letter-spacing: 0;
  min-height: 1.05em;
  font-variant-numeric: tabular-nums;
}

.metrics b,
.status-pill,
.chart-card canvas,
.glosa-card b {
  font-variant-numeric: tabular-nums;
}

.success-ring {
  background:
    radial-gradient(circle at 88% 54%, rgba(34, 197, 94, 0.34) 0 12px, rgba(34, 197, 94, 0.12) 13px 24px, transparent 25px),
    linear-gradient(180deg, rgba(28, 28, 28, 0.94), rgba(12, 12, 12, 0.94));
}

.penalty-ring,
.warning-kpi {
  background:
    radial-gradient(circle at 88% 54%, rgba(239, 68, 68, 0.34) 0 12px, rgba(239, 68, 68, 0.12) 13px 24px, transparent 25px),
    linear-gradient(180deg, rgba(28, 28, 28, 0.94), rgba(12, 12, 12, 0.94));
}

.warning-kpi {
  border-color: rgba(255, 107, 0, 0.28);
}

.analytics-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, .98fr);
  gap: 14px;
}

.analytics-main-grid .wide-panel {
  grid-column: span 1;
}

.chart-panel {
  min-height: 250px;
}

.chart-panel canvas {
  width: 100%;
  display: block;
}

.aging-list,
.funnel-list,
.insight-feed {
  display: grid;
  gap: 12px;
}

.aging-row div,
.funnel-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 850;
}

.aging-row,
.funnel-list button,
.analytics-alert-grid button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  padding: 8px;
  text-align: left;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.aging-row:hover,
.aging-row.is-active,
.funnel-list button:hover,
.analytics-alert-grid button:hover {
  background: rgba(255, 107, 0, 0.1);
  border-color: rgba(255, 107, 0, 0.24);
  transform: translateX(2px);
}

.aging-row i,
.funnel-list i {
  display: block;
  height: 7px;
  margin-top: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--c) var(--w), rgba(244, 244, 245, 0.08) var(--w));
}

.insight-feed p {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(244, 244, 245, 0.09);
  border-radius: 8px;
  background: rgba(5, 5, 5, 0.44);
  color: #f4f4f5;
  font-weight: 750;
}

.insight-feed .danger { border-left: 3px solid #ef4444; }
.insight-feed .warning { border-left: 3px solid #ff6b00; }
.insight-feed .success { border-left: 3px solid #22c55e; }

.embedded-table {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.embedded-table table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.embedded-table th button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
  transition: color var(--transition);
}

.embedded-table th button::after {
  content: "+";
  color: rgba(244, 244, 245, 0.38);
  font-size: .76rem;
}

.embedded-table th button[data-dir="asc"]::after {
  content: "^";
  color: var(--orange);
}

.embedded-table th button[data-dir="desc"]::after {
  content: "v";
  color: var(--orange);
}

.embedded-table th button:hover,
.embedded-table th button.is-active {
  color: #fff;
}

.embedded-table tbody tr {
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.embedded-table tbody tr:hover,
.embedded-table tbody tr.is-active {
  background: rgba(255, 107, 0, 0.1);
}

.analytics-alert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.analytics-alert-grid .logs-view {
  display: grid;
  align-content: start;
  gap: 10px;
}

.analytics-alert-grid h2 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.analytics-alert-grid p {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid rgba(244, 244, 245, 0.08);
}

.analytics-alert-grid button {
  border-top: 1px solid rgba(244, 244, 245, 0.08);
}

.aging-row i,
.funnel-list i {
  transition: background 520ms cubic-bezier(0.22, 1, 0.36, 1), transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.aging-row:hover i,
.funnel-list button:hover i {
  transform: scaleX(1.01);
  transform-origin: left center;
}

.analytics-alert-grid strong,
.analytics-alert-grid small {
  display: block;
}

.analytics-alert-grid small {
  color: var(--muted);
  margin-top: 3px;
}

@media (max-width: 1100px) {
  .glosa-dashboard,
  .glosa-layout,
  .glosa-analysis-grid,
  .glosa-analysis-layout,
  .analytics-kpis,
  .analytics-main-grid,
  .analytics-alert-grid,
  .analytics-filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .glosa-form,
  .access-request-form,
  .request-dual-list,
  .access-request-item {
    grid-template-columns: 1fr;
  }

  .request-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.app-sidebar .sidebar-brand {
  align-items: center;
  justify-content: center;
  min-height: 118px;
  padding: 10px 8px 22px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(255, 107, 0, 0.22);
}

.app-sidebar .sidebar-brand-logo {
  width: 100%;
  min-height: 96px;
  display: flex;
  justify-content: center;
  padding: 10px 8px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 107, 0, 0.12), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
}

.app-sidebar .sidebar-brand-image {
  width: min(238px, 100%);
  max-width: none;
  height: auto;
  max-height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.14));
}

.app-sidebar .sidebar-toggle {
  position: absolute;
  top: 18px;
  right: 14px;
}

html.sidebar-compact .app-sidebar .sidebar-brand {
  min-height: 92px;
  padding: 8px 4px 16px;
}

html.sidebar-compact .app-sidebar .sidebar-brand-image {
  width: 70px;
  max-height: 44px;
}

.app-sidebar {
  overflow: hidden auto;
  align-content: stretch;
  grid-template-rows: auto 1fr auto auto;
  gap: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 107, 0, 0.16), transparent 10rem),
    linear-gradient(180deg, rgba(16, 16, 16, 0.98), rgba(5, 5, 5, 0.98));
}

.app-sidebar .sidebar-brand {
  position: relative;
  min-height: 136px;
  padding: 14px 10px 24px;
  border: 1px solid rgba(255, 107, 0, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 107, 0, 0.12), rgba(255, 255, 255, 0.02) 52%, rgba(0, 0, 0, 0)),
    rgba(255, 255, 255, 0.025);
}

.app-sidebar .sidebar-brand::after {
  content: "RADAR";
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  color: #ff6b00;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .14em;
}

.app-sidebar .sidebar-brand-logo {
  min-height: 88px;
  padding: 0;
  background: transparent;
}

.app-sidebar .sidebar-brand-image {
  width: min(252px, 100%);
  max-height: 96px;
}

.sidebar-nav {
  align-content: start;
  gap: 7px;
}

.sidebar-nav a,
.sidebar-nav button,
.sidebar-logout {
  position: relative;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.018);
}

.sidebar-nav a:hover,
.sidebar-nav button:hover,
.sidebar-nav .active,
.sidebar-logout:hover {
  border-color: rgba(255, 107, 0, 0.28);
  background:
    linear-gradient(90deg, rgba(255, 107, 0, 0.24), rgba(255, 107, 0, 0.06)),
    rgba(255, 255, 255, 0.025);
  box-shadow: inset 3px 0 0 #ff6b00, 0 10px 24px rgba(0, 0, 0, 0.22);
  color: #fff7ed;
  transform: translateX(2px);
}

.sidebar-nav .active {
  color: #ffffff;
}

.sidebar-nav .active::after {
  content: "";
  position: absolute;
  right: 12px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ff6b00;
  box-shadow: 0 0 14px rgba(255, 107, 0, 0.8);
}

.nav-icon {
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.sidebar-nav .active .nav-icon,
.sidebar-nav a:hover .nav-icon,
.sidebar-nav button:hover .nav-icon {
  background: rgba(255, 107, 0, 0.24);
  color: #fff;
}

.app-sidebar .sidebar-panel {
  align-self: end;
  border-color: rgba(255, 107, 0, 0.18);
  background:
    radial-gradient(circle at top right, rgba(255, 107, 0, 0.14), transparent 8rem),
    linear-gradient(180deg, rgba(28, 28, 28, 0.9), rgba(12, 12, 12, 0.92));
}

.sidebar-logout-form {
  margin: 0;
}

.sidebar-logout {
  justify-content: flex-start;
}

.app-sidebar .sidebar-brand {
  min-height: 112px;
  padding: 12px 4px 16px;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.app-sidebar .sidebar-brand::after {
  content: none;
}

.app-sidebar .sidebar-brand-logo {
  min-height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.app-sidebar .sidebar-brand-image {
  width: min(238px, 100%);
  max-height: 86px;
}
