:root {
  --bg: #020617;
  --bg-solid: #020617;
  --panel: rgba(15, 23, 42, 0.8);
  --panel-solid: #0f172a;
  --line: #1e293b;
  --line-strong: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --heading: #ffffff;
  --accent: #f97316;
  --accent-hover: #fb923c;
  --danger: #fb7185;
  --success: #34d399;
  --radius-xl: 1.75rem;
  --radius-lg: 1.2rem;
  --shadow: 0 30px 90px rgba(2, 6, 23, 0.45);
  --bg-gradient-top: rgba(249, 115, 22, 0.18);
  --bg-gradient-bottom: var(--bg);
  --panel-overlay: rgba(2, 6, 23, 0.64);
  --table-head: rgba(2, 6, 23, 0.4);
  --table-row-hover: rgba(30, 41, 59, 0.32);
  --field-bg: #020617;
  --placeholder: #64748b;
  --theme-toggle-bg: rgba(15, 23, 42, 0.7);
  --theme-toggle-text: var(--text);
}

body.app-page[data-theme='light'] {
  --bg: #f8fafc;
  --bg-solid: #f8fafc;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --line: #dbe3ee;
  --line-strong: #cbd5e1;
  --text: #1e293b;
  --muted: #64748b;
  --heading: #0f172a;
  --accent: #ea580c;
  --accent-hover: #f97316;
  --danger: #e11d48;
  --success: #059669;
  --shadow: 0 22px 60px rgba(148, 163, 184, 0.22);
  --bg-gradient-top: rgba(249, 115, 22, 0.14);
  --bg-gradient-bottom: #f8fafc;
  --panel-overlay: rgba(241, 245, 249, 0.92);
  --table-head: rgba(241, 245, 249, 0.95);
  --table-row-hover: rgba(226, 232, 240, 0.7);
  --field-bg: #ffffff;
  --placeholder: #94a3b8;
  --theme-toggle-bg: rgba(255, 255, 255, 0.9);
  --theme-toggle-text: #0f172a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.app-page {
  background: var(--bg-solid);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  position: relative;
  isolation: isolate;
  transition: background-color 260ms ease, color 260ms ease;
}

body.app-page::before,
body.app-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  transition: opacity 260ms ease;
}

body.app-page::before {
  background:
    radial-gradient(circle at top, rgba(249, 115, 22, 0.18), transparent 38%),
    linear-gradient(180deg, #020617 0%, #020617 100%);
  opacity: 1;
}

body.app-page::after {
  background:
    radial-gradient(circle at top, rgba(249, 115, 22, 0.14), transparent 38%),
    linear-gradient(180deg, #f8fafc 0%, #f8fafc 100%);
  opacity: 0;
}

body.app-page[data-theme='light']::before {
  opacity: 0;
}

body.app-page[data-theme='light']::after {
  opacity: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea,
svg,
path,
th,
td,
.eyebrow,
.page-title,
.section-title,
.panel-title,
.body-copy,
.support-copy,
.muted-copy,
.route-list,
.flow-list,
.cell-title,
.cell-subtitle,
.pagination-info,
.empty-state {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    fill 160ms ease,
    stroke 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.hero-card,
.surface-card,
.side-card,
.quote-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-card,
.surface-card,
.side-card,
.quote-card,
.table-shell {
  transition:
    background-color 260ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.hero-card,
.surface-card,
.side-card {
  border-radius: var(--radius-xl);
}

.hero-card,
.surface-card,
.side-card {
  padding: 28px;
}

.landing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.85fr);
  gap: 28px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 30px;
  align-items: center;
  min-height: calc(100vh - 80px);
}

.auth-simple-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.7fr);
  gap: 36px;
}

.auth-simple-intro {
  display: grid;
  gap: 18px;
}

.auth-mini-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.9;
}

.auth-inline-actions {
  display: flex;
  gap: 12px;
}

.auth-simple-card {
  gap: 18px;
  max-width: 460px;
  width: 100%;
  margin-left: auto;
}

.auth-card-head {
  display: grid;
  gap: 8px;
}

.input-with-action {
  position: relative;
}

.input-with-action input {
  padding-right: 76px;
}

.input-action {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.input-action:hover {
  color: var(--heading);
  background: rgba(30, 41, 59, 0.5);
}

.field-hint {
  display: none;
  color: var(--muted);
  font-size: 0.78rem;
}

.field-hint.is-visible {
  display: block;
}

.field-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

.form-note {
  display: none;
}

.form-note.is-visible {
  display: block;
}

.is-hidden {
  display: none !important;
}

.password-panel {
  display: none;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.password-panel.is-visible {
  display: grid;
}

.dashboard-layout {
  display: grid;
  gap: 24px;
}

.dashboard-hero {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: end;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr);
  gap: 24px;
}

.management-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.management-grid.management-grid-split {
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.38fr);
  align-items: start;
}

.section-stack,
.stat-grid,
.info-grid,
.toolbar-stack {
  display: grid;
  gap: 16px;
}

.stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card,
.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-overlay);
  padding: 18px;
}

.stat-card {
  display: grid;
  gap: 8px;
}

.stat-label,
.info-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.stat-value,
.info-value {
  margin: 0;
  color: var(--heading);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.stat-copy,
.info-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.stat-value.is-small,
.info-value.is-small {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.helper-text {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.field textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--field-bg);
  color: var(--text);
  padding: 11px 13px;
  font: inherit;
  outline: none;
  resize: vertical;
}

.field textarea::placeholder {
  color: var(--placeholder);
}

.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.three-up {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.surface-card.is-muted {
  background: linear-gradient(180deg, var(--panel), var(--panel-overlay));
}

.table-wrap table {
  min-width: 760px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.page-title,
.section-title,
.panel-title {
  margin: 0;
  color: var(--heading);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.page-title {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.05;
}

.section-title {
  font-size: 1.55rem;
}

.panel-title {
  font-size: 1rem;
}

.body-copy,
.support-copy,
.muted-copy {
  color: var(--muted);
  line-height: 1.8;
}

.body-copy {
  margin: 16px 0 0;
  font-size: 0.95rem;
}

.support-copy,
.muted-copy {
  margin: 10px 0 0;
}

.route-list,
.flow-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.9;
}

.route-list strong,
.flow-list strong {
  color: var(--heading);
}

.quote-card {
  margin-top: 28px;
  border-radius: var(--radius-lg);
  padding: 20px;
}

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

.actions-row,
.section-actions,
.right-actions,
.pagination-controls,
.meta-row,
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.actions-row {
  margin-top: 28px;
}

.section-actions {
  align-items: center;
  justify-content: flex-end;
}

.meta-row,
.table-toolbar {
  align-items: center;
  justify-content: space-between;
}

.right-actions {
  justify-content: flex-end;
}

.button,
.button-secondary,
.button-danger,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: 160ms ease;
  cursor: pointer;
}

.button {
  background: var(--accent);
  color: #0f172a;
}

.button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.button:disabled,
.button-secondary:disabled,
.button-danger:disabled,
.theme-toggle:disabled,
.input-action:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.button-secondary:hover {
  background: rgba(30, 41, 59, 0.65);
  transform: translateY(-1px);
}

.button-danger {
  background: transparent;
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.35);
}

.button-danger:hover {
  background: rgba(251, 113, 133, 0.1);
  transform: translateY(-1px);
}

.theme-toggle {
  background: var(--theme-toggle-bg);
  color: var(--theme-toggle-text);
  border: 1px solid var(--line-strong);
  gap: 0;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
}

.theme-toggle:hover {
  background: var(--panel);
  transform: translateY(-1px);
}

.theme-toggle-icon {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.block-button {
  width: 100%;
}

.form-stack,
.field,
.auth-card {
  display: grid;
  gap: 16px;
}

.field label {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
}

.field input,
.field select,
.pagination-select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--field-bg);
  color: var(--text);
  padding: 11px 13px;
  font: inherit;
  outline: none;
}

.field input::placeholder {
  color: var(--placeholder);
}

.field input:focus,
.field select:focus,
.pagination-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.message {
  display: none;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.86rem;
  border: 1px solid transparent;
}

.message.is-visible {
  display: block;
}

.message-success {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
}

.message-error {
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.12);
  color: #fecdd3;
}

.table-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.table-toolbar {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-overlay);
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 12px 14px;
  text-align: left;
}

thead {
  background: var(--table-head);
}

th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

tbody tr {
  border-top: 1px solid var(--line);
}

tbody tr:hover {
  background: var(--table-row-hover);
}

.align-right {
  text-align: right;
}

.icon-button {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
}

.table-action-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  pointer-events: none;
}

.animate-pop {
  animation-duration: 420ms;
}

.cell-title {
  color: var(--heading);
  font-weight: 700;
}

.cell-subtitle {
  margin-top: 4px;
  color: #64748b;
  font-size: 0.74rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-active {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #86efac;
}

body.app-page[data-theme='light'] .status-active {
  color: #047857;
}

.status-inactive {
  background: rgba(71, 85, 105, 0.45);
  border: 1px solid rgba(100, 116, 139, 0.3);
  color: #cbd5e1;
}

body.app-page[data-theme='light'] .status-inactive {
  background: rgba(226, 232, 240, 0.9);
  color: #475569;
}

body.app-page[data-theme='light'] .input-action:hover {
  background: rgba(226, 232, 240, 0.8);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: var(--panel-overlay);
}

.pagination-info {
  color: var(--muted);
  font-size: 0.82rem;
}

.pagination-select {
  min-width: 110px;
}

.search-field {
  min-width: 240px;
}

.simple-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 16px;
}

.simple-list {
  display: grid;
  gap: 12px;
}

.simple-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-overlay);
}

.simple-list-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.simple-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
}

@media (max-width: 960px) {
  .landing-grid,
  .auth-layout,
  .dashboard-grid,
  .management-grid {
    grid-template-columns: 1fr;
  }

  .stat-grid,
  .info-grid,
  .three-up {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    align-items: start;
    flex-direction: column;
  }

  .auth-simple-card {
    margin-left: 0;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding: 24px 0;
  }

  .hero-card,
  .surface-card,
  .side-card {
    padding: 20px;
  }

  .two-up,
  .three-up,
  .meta-row,
  .table-toolbar,
  .simple-list-toolbar,
  .simple-list-item,
  .actions-row,
  .section-actions,
  .right-actions,
  .pagination-controls,
  .pagination-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .button-secondary,
  .button-danger {
    width: 100%;
  }

  .search-field {
    min-width: 100%;
  }

  .simple-list-copy {
    width: 100%;
  }

  .top-actions {
    margin-bottom: 12px;
  }
}

body.app-page.dashboard-app {
  background: #f3f4f6;
  color: #111827;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

body.app-page.dashboard-app::before,
body.app-page.dashboard-app::after {
  display: none;
}

.dashboard-app {
  --bg: #f3f4f6;
  --bg-solid: #f3f4f6;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --text: #111827;
  --muted: #6b7280;
  --heading: #0f172a;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  --panel-overlay: #f8fafc;
  --table-head: #f8fafc;
  --table-row-hover: #f8fafc;
  --field-bg: #ffffff;
  --placeholder: #9ca3af;
}

.dashboard-app .app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.dashboard-app .dashboard-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  align-content: start;
  gap: 28px;
  min-height: 100vh;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(99, 102, 241, 0.08), rgba(255, 255, 255, 0)),
    #ffffff;
}

.dashboard-app .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dashboard-app .brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 28px rgba(99, 102, 241, 0.24);
}

.dashboard-app .sidebar-kicker {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.dashboard-app .sidebar-title {
  color: var(--heading);
  font-size: 1.1rem;
  font-weight: 800;
}

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

.dashboard-app .sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  color: #374151;
  font-size: 0.95rem;
  font-weight: 700;
}

.dashboard-app .sidebar-link:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--accent);
  transform: translateX(3px);
}

.dashboard-app .sidebar-link.is-active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(99, 102, 241, 0.06));
  color: var(--accent);
}

.dashboard-app .sidebar-link.is-disabled {
  opacity: 0.7;
}

.dashboard-app .sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.72rem;
  font-weight: 800;
}

.dashboard-app .sidebar-card {
  padding: 18px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.08), rgba(255, 255, 255, 0.95));
  box-shadow: 0 16px 36px rgba(99, 102, 241, 0.08);
}

.dashboard-app .dashboard-stage {
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 28px;
}

.dashboard-app .dashboard-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-app .dashboard-main {
  display: grid;
  gap: 24px;
}

.dashboard-app .topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dashboard-app .topbar-search {
  display: block;
  min-width: 320px;
}

.dashboard-app .topbar-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  color: var(--text);
  padding: 12px 16px;
  font: inherit;
  box-shadow: var(--shadow);
}

.dashboard-app .topbar-search input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.dashboard-app .profile-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.dashboard-app .profile-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
}

.dashboard-app .profile-name {
  color: var(--heading);
  font-size: 0.92rem;
  font-weight: 800;
}

.dashboard-app .profile-role {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.dashboard-app .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-app .stat-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
}

.dashboard-app .stat-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.12);
}

.dashboard-app .stat-primary {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.12), rgba(255, 255, 255, 0.98));
}

.dashboard-app .stat-secondary {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.12), rgba(255, 255, 255, 0.98));
}

.dashboard-app .stat-accent {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.14), rgba(255, 255, 255, 0.98));
}

.dashboard-app .stat-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 16px 30px rgba(99, 102, 241, 0.22);
}

.dashboard-app .stat-secondary .stat-icon {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 16px 30px rgba(34, 197, 94, 0.22);
}

.dashboard-app .stat-accent .stat-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.22);
}

.dashboard-app .stat-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.dashboard-app .stat-copy {
  display: grid;
  gap: 8px;
}

.dashboard-app .stat-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.dashboard-app .stat-value {
  color: var(--heading);
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.dashboard-app .stat-growth {
  color: #16a34a;
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-app .analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.8fr);
  gap: 20px;
}

.dashboard-app .dashboard-lower-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
}

.dashboard-app .chart-card,
.dashboard-app .activity-card,
.dashboard-app .admin-note-card,
.dashboard-app .surface-card,
.dashboard-app .side-card,
.dashboard-app .hero-card {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.dashboard-app .chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-app .chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-app .legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 999px;
}

.dashboard-app .legend-primary {
  background: #6366f1;
}

.dashboard-app .legend-secondary {
  background: #22c55e;
}

.dashboard-app .legend-accent {
  background: #f59e0b;
}

.dashboard-app .chart-surface {
  min-height: 280px;
}

.dashboard-app .chart-svg-wrap {
  position: relative;
  padding-bottom: 36px;
}

.dashboard-app .trend-svg {
  width: 100%;
  height: 260px;
}

.dashboard-app .trend-line {
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: drawChart 1.2s ease forwards;
}

.dashboard-app .trend-line-primary {
  stroke: #6366f1;
}

.dashboard-app .trend-line-secondary {
  stroke: #22c55e;
}

.dashboard-app .trend-line-accent {
  stroke: #f59e0b;
}

.dashboard-app .chart-label-row {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 24px;
}

.dashboard-app .chart-label {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.dashboard-app .bar-chart {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  min-height: 280px;
}

.dashboard-app .bar-item {
  display: grid;
  justify-items: center;
  gap: 10px;
  flex: 1;
}

.dashboard-app .bar-track {
  display: flex;
  align-items: end;
  width: 100%;
  height: 180px;
  padding: 6px;
  border-radius: 22px;
  background: #f8fafc;
}

.dashboard-app .bar-fill {
  width: 100%;
  border-radius: 18px;
  animation: riseBar 850ms ease forwards;
  transform-origin: bottom;
}

.dashboard-app .bar-primary {
  background: linear-gradient(180deg, #818cf8, #6366f1);
}

.dashboard-app .bar-secondary {
  background: linear-gradient(180deg, #4ade80, #22c55e);
}

.dashboard-app .bar-accent {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.dashboard-app .bar-value {
  color: var(--heading);
  font-size: 1rem;
  font-weight: 800;
}

.dashboard-app .bar-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.dashboard-app .admin-note-card {
  align-content: start;
}

.dashboard-app .button {
  background: #6366f1;
  color: #ffffff;
}

.dashboard-app .button:hover {
  background: #4f46e5;
}

.dashboard-app .button-secondary {
  border-color: var(--line);
  background: #ffffff;
  color: #111827;
}

.dashboard-app .button-secondary:hover {
  background: #f8fafc;
}

.dashboard-app .button-danger {
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.22);
}

.dashboard-app .field input,
.dashboard-app .field select,
.dashboard-app .pagination-select {
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: none;
}

.dashboard-app .field input:focus,
.dashboard-app .field select:focus,
.dashboard-app .pagination-select:focus {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.dashboard-app .table-shell {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: none;
}

.dashboard-app .table-toolbar,
.dashboard-app .pagination-bar {
  background: #ffffff;
}

.dashboard-app thead {
  background: #f8fafc;
}

.dashboard-app tbody tr:hover {
  background: #f8fafc;
}

.dashboard-app .status-neutral {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
  color: #4f46e5;
}

@keyframes drawChart {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes riseBar {
  from {
    transform: scaleY(0.1);
    opacity: 0.4;
  }

  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@media (max-width: 1200px) {
  .dashboard-app .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-app .analytics-grid,
  .dashboard-app .dashboard-lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .dashboard-app .app-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-app .dashboard-sidebar {
    position: static;
    min-height: auto;
  }

  .dashboard-app .dashboard-topbar,
  .dashboard-app .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-app .topbar-search {
    min-width: 100%;
  }
}

@media (max-width: 640px) {
  .dashboard-app .dashboard-stage {
    padding: 18px;
  }

  .dashboard-app .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-app .chart-head,
  .dashboard-app .chart-legend,
  .dashboard-app .sidebar-brand {
    flex-direction: column;
    align-items: flex-start;
  }
}
