:root {
  color-scheme: dark;
  --bg: #07090d;
  --bg-soft: #0c1118;
  --surface: #111821;
  --surface-2: #151f2b;
  --surface-3: #1b2736;
  --line: #263447;
  --line-strong: #34465d;
  --text: #f3f7fb;
  --muted: #a5b2c4;
  --subtle: #748296;
  --accent: #2fe0ad;
  --accent-strong: #15bd8c;
  --blue: #68a7ff;
  --rose: #ff6f8e;
  --amber: #ffd166;
  --danger: #ff6b6b;
  --shadow: 0 22px 70px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(47, 224, 173, .11), transparent 28rem),
    linear-gradient(220deg, rgba(104, 167, 255, .10), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, Segoe UI, Arial, sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: .45;
}

a { color: #b7dcff; text-decoration: none; }
a:hover { color: #ffffff; }

input, select, textarea, button { font: inherit; }

input, select, textarea {
  width: 100%;
  background: #0a1018;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 13px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(47, 224, 173, .75);
  box-shadow: 0 0 0 4px rgba(47, 224, 173, .12);
  background: #0d151f;
}

textarea { min-height: 108px; resize: vertical; }

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #c8f7e8;
  background: rgba(47, 224, 173, .09);
  border: 1px solid rgba(47, 224, 173, .19);
  border-radius: 7px;
  padding: 3px 7px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px;
  background: rgba(7, 9, 13, .78);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 20px;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  align-items: center;
  justify-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #06120f;
  background: linear-gradient(135deg, var(--accent), #a8ffd9);
  box-shadow: 0 12px 32px rgba(47, 224, 173, .22);
  font-size: 13px;
}

.topbar nav {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.topbar nav a {
  color: #c4cfdd;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 700;
  font-size: 14px;
}

.topbar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }

body.app-layout {
  background: var(--bg);
}

body.app-layout::before {
  opacity: .18;
}

body.app-layout .topbar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  align-items: stretch;
  justify-content: flex-start;
  flex-direction: column;
  gap: 18px;
  padding: 20px 14px;
  overflow-y: auto;
  background: rgba(10, 16, 24, .96);
  border-right: 1px solid rgba(255,255,255,.08);
  border-bottom: 0;
}

body.app-layout .brand {
  padding: 2px 6px 12px;
}

body.app-layout .topbar nav {
  display: block;
}

.sidebar-toggle {
  display: none;
  width: 100%;
  min-height: 38px;
  box-shadow: none;
}

.sidebar-panel {
  display: grid;
  gap: 14px;
}

.sidebar-admin-block {
  padding: 10px 12px;
  margin: 0 0 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.2s ease;
}

.sidebar-admin-card {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  width: 100%;
  cursor: default;
  user-select: none;
}

.sidebar-admin-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sidebar-admin-role {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.sidebar-admin-badge,
.sidebar-admin-email {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent, #2fe0ad);
  line-height: 1.3;
  margin-top: 2px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

html[data-theme="light"] .sidebar-admin-badge,
body.theme-light .sidebar-admin-badge {
  color: #059669 !important;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  padding: 4px 10px 6px;
}

.tab-group {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line, rgba(255,255,255,0.08));
  padding-bottom: 12px;
}

.tab-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  color: var(--muted, #94a3b8);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: rgba(47, 224, 173, 0.15);
  color: var(--accent, #2fe0ad);
  border-color: rgba(47, 224, 173, 0.35);
}

.sidebar-section {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border-radius: 8px;
  color: #c8d3e1;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 750;
}

.side-link:hover {
  background: rgba(255,255,255,.055);
  color: #fff;
}

.side-link.active {
  background: rgba(47, 224, 173, .13);
  color: #dcfff4;
  box-shadow: inset 3px 0 0 var(--accent);
}

.side-link.danger-link {
  color: #ffd4d4;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(255,255,255,.07);
  color: #e8f2ff;
  font-size: 11px;
  font-weight: 900;
}

body.app-layout .shell {
  width: auto;
  max-width: none;
  margin-left: 280px;
  padding: 32px 36px 70px;
}

.shell {
  position: relative;
  width: 1200px;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  padding: 38px 0 70px;
}

.hero {
  min-height: calc(100vh - 118px);
  display: grid;
  grid-template-columns: calc(100% - 438px) 390px;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 850;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 86px;
  line-height: .86;
  margin: 0 0 22px;
}

.lede {
  font-size: 21px;
  color: #c7d3e3;
  max-width: 720px;
}

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #3af0bd, var(--accent-strong));
  color: #04130f;
  font-weight: 850;
  padding: 12px 16px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(47, 224, 173, .18);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

.button:hover, button:hover {
  color: #04130f;
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 16px 36px rgba(47, 224, 173, .22);
}

.button.ghost {
  background: #172130;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button.small {
  min-height: 34px;
  padding: 8px 11px;
  font-size: 14px;
}

.link-button {
  background: transparent;
  color: #b7dcff;
  padding: 8px 0;
  box-shadow: none;
}

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

.hero-panel, .panel, .auth-card, .feature-grid article {
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), transparent),
    linear-gradient(180deg, var(--surface), #0d131c);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 26px;
  background:
    linear-gradient(155deg, rgba(47, 224, 173, .12), rgba(104, 167, 255, .06)),
    linear-gradient(180deg, #111b26, #0d131c);
}

.fake-qr {
  width: 210px;
  height: 210px;
  margin: 0 auto 20px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.95) 12px, transparent 12px) 0 0 / 42px 42px,
    linear-gradient(rgba(255,255,255,.95) 12px, transparent 12px) 0 0 / 42px 42px,
    linear-gradient(135deg, var(--accent), var(--blue));
  padding: 12px;
  border-radius: 8px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(255,255,255,.09);
  padding: 15px 0;
  color: var(--muted);
}

.metric-row strong { color: var(--text); }

.feature-grid {
  display: grid;
  grid-template-columns: calc(33.33% - 12px) calc(33.33% - 12px) calc(33.33% - 12px);
  gap: 18px;
}

.feature-grid article { min-height: 170px; }

.feature-grid h2, .panel h1, .auth-card h1 { margin-top: 0; }

.feature-grid p, .panel p, .auth-card p { color: var(--muted); }

.auth-card {
  width: 470px;
  max-width: 100%;
  margin: 44px auto;
}

.auth-card.wide {
  width: 780px;
  max-width: 100%;
}

.stack { display: grid; gap: 16px; }

.notice {
  border: 1px solid rgba(255, 209, 102, .28);
  background: rgba(255, 209, 102, .10);
  color: #ffe3a1;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 18px;
}

.notice p { margin: 0; }

.toast-stack {
  position: fixed;
  right: 20px;
  top: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(420px, calc(100vw - 40px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  background: #151f2b;
  color: #f3f7fb;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: toastSlideIn 0.22s ease-out;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast.success {
  background: #0f241d;
  color: #6ee7b7;
  border: 1px solid rgba(47, 224, 173, 0.4);
  border-left: 5px solid #2fe0ad;
}

.toast.error {
  background: #2a1215;
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-left: 5px solid #ef4444;
}

.toast.info {
  background: #111d2e;
  color: #93c5fd;
  border: 1px solid rgba(104, 167, 255, 0.4);
  border-left: 5px solid #68a7ff;
}

.toast button {
  min-height: 24px;
  width: 24px;
  border-radius: 6px;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  flex-shrink: 0;
}

.toast button:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Light Theme Toast Styles */
html[data-theme="light"] .toast,
body.theme-light .toast {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.15), 0 4px 10px -2px rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] .toast.success,
body.theme-light .toast.success {
  background: #f0fdf4 !important;
  color: #166534 !important;
  border: 1px solid #86efac !important;
  border-left: 5px solid #16a34a !important;
}

html[data-theme="light"] .toast.error,
body.theme-light .toast.error {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fca5a5 !important;
  border-left: 5px solid #dc2626 !important;
}

html[data-theme="light"] .toast.info,
body.theme-light .toast.info {
  background: #eff6ff !important;
  color: #1e40af !important;
  border: 1px solid #93c5fd !important;
  border-left: 5px solid #2563eb !important;
}

html[data-theme="light"] .toast button,
body.theme-light .toast button {
  background: rgba(0, 0, 0, 0.07) !important;
  color: #334155 !important;
}

html[data-theme="light"] .toast button:hover,
body.theme-light .toast button:hover {
  background: rgba(0, 0, 0, 0.15) !important;
  color: #0f172a !important;
}

/* Light Theme Button Ghost */
html[data-theme="light"] .button.ghost,
body.theme-light .button.ghost {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .button.ghost:hover,
body.theme-light .button.ghost:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #000000 !important;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.56);
}

.confirm-dialog {
  width: min(440px, 100%);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: var(--surface);
  padding: 22px;
  box-shadow: var(--shadow);
}

.confirm-dialog h2 {
  margin: 0 0 8px;
}

.admin-user-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
}

details summary {
  color: #b7dcff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  margin-top: 6px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 0;
  font-size: 38px;
}

.page-head p {
  margin: 7px 0 0;
  color: var(--muted);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.summary-grid h2 {
  margin: 4px 0 0;
  font-size: 34px;
}

.metric-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.section-title h2 {
  margin: 0;
}

.section-title p {
  margin: 5px 0 0;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  background: rgba(17, 24, 33, .76);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 12px;
}

.inline-form { display: flex; gap: 10px; }

.folder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 18px;
}

.folder-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid rgba(104, 167, 255, .22);
  border-radius: 999px;
  background: rgba(104, 167, 255, .11);
  color: #cbe4ff;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 800;
}

.folder-chip-form {
  margin: 0;
}

.folder-chip button {
  min-height: 20px;
  width: 20px;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 107, 107, .16);
  color: #ffd5d5;
  box-shadow: none;
  font-size: 13px;
}

.folder-chip button:hover {
  color: #fff;
  background: rgba(255, 107, 107, .28);
  transform: none;
  box-shadow: none;
}

.folder-chip.compact {
  min-height: 24px;
  padding: 3px 9px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(12, 18, 28, .86);
  box-shadow: var(--shadow);
}

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

th, td {
  text-align: left;
  padding: 14px 15px;
  border-bottom: 1px solid rgba(255,255,255,.075);
  vertical-align: middle;
}

tbody tr { transition: background .14s ease; }
tbody tr:hover { background: rgba(255,255,255,.035); }

th {
  color: var(--subtle);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

td form { display: inline; }

.row-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

.row-actions a, .row-actions button {
  min-height: 30px;
  border-radius: 7px;
  background: rgba(104, 167, 255, .10);
  color: #c7e2ff;
  padding: 5px 8px;
  box-shadow: none;
  font-size: 13px;
}

.row-actions a:hover, .row-actions button:hover {
  background: rgba(104, 167, 255, .18);
  transform: none;
  color: #fff;
}

.row-actions .danger {
  color: #ffd0d0;
  background: rgba(255, 107, 107, .11);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #2a3445;
  color: #d7e4f7;
  padding: 4px 9px;
  font-weight: 800;
  font-size: 12px;
}

.pill.active {
  background: rgba(47, 224, 173, .13);
  color: #a7f5da;
  border: 1px solid rgba(47, 224, 173, .24);
}

.two-col, .detail-grid {
  display: grid;
  grid-template-columns: calc(100% - 420px) 400px;
  gap: 20px;
}

.qr-form .panel { align-self: start; }

.color-row {
  display: block;
}

.color-row input[type="color"] {
  min-height: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.color-row input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 11px 0;
}

.color-row input[type="color"]::-webkit-color-swatch {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.color-row input[type="color"]::-moz-color-swatch {
  min-height: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.color-swatch {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: inset 0 0 0 4px rgba(0,0,0,.16), 0 10px 22px rgba(0,0,0,.22);
}

.color-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.color-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
  color: var(--muted);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 750;
}

.color-meta i {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,.25);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check input {
  width: 17px;
  height: 17px;
}

.qr-preview {
  background:
    linear-gradient(45deg, #e8edf5 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(45deg, transparent 75%, #e8edf5 75%) 0 0 / 20px 20px,
    #fff;
  border-radius: 8px;
  padding: 22px;
  display: grid;
  align-items: center;
  justify-items: center;
  box-shadow: var(--shadow);
}

.qr-preview img {
  width: 100%;
  max-width: 340px;
  height: auto;
}

.break {
  word-break: break-word;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: calc(25% - 10.5px) calc(25% - 10.5px) calc(25% - 10.5px) calc(25% - 10.5px);
  gap: 14px;
  margin-bottom: 20px;
}

.stats div {
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), transparent),
    var(--surface-2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 18px;
}

.stats span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.stats strong {
  display: block;
  margin-top: 6px;
  font-size: 32px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: calc(33.33% - 12px) calc(33.33% - 12px) calc(33.33% - 12px);
  gap: 18px;
  margin-bottom: 20px;
}

.chart-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), transparent),
    linear-gradient(180deg, var(--surface), #0d131c);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.chart-card h2 {
  margin: 0 0 16px;
}

.chart-card p {
  color: var(--muted);
}

.bar-row {
  display: grid;
  grid-template-columns: 82px calc(100% - 136px) 34px;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.bar-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row strong {
  color: var(--text);
  text-align: right;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.bar-track i {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.empty-chart {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.empty-chart span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.empty-chart span:nth-child(1) { width: 78%; }
.empty-chart span:nth-child(2) { width: 52%; }
.empty-chart span:nth-child(3) { width: 64%; }

.plan-add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.plan-add-form > * {
  flex: 1 1 120px;
}

.plan-grid {
  display: grid;
  grid-template-columns: calc(50% - 9px) calc(50% - 9px);
  gap: 18px;
}

.plan-editor {
  display: grid;
  gap: 14px;
}

.plan-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.plan-editor-head h2 {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: calc(50% - 6px) calc(50% - 6px);
  gap: 12px;
}

.profile-grid {
  display: block;
  max-width: 920px;
  width: 100%;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.profile-hero h2 {
  margin: 0 0 4px;
}

.avatar {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.14);
  background: var(--surface-2);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-stats span {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
  padding: 12px;
  font-size: 13px;
  font-weight: 750;
}

.mini-stats strong {
  color: var(--text);
  font-size: 24px;
}

.clean-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.clean-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: 8px 0;
  color: var(--muted);
}

.clean-list li:last-child {
  border-bottom: 0;
}

.clean-list span,
.muted {
  color: var(--subtle);
  font-size: 13px;
}

.danger-zone {
  border-color: rgba(255, 107, 107, .32);
}

.button.danger,
button.danger {
  background: rgba(255, 107, 107, .18);
  color: #ffe2e2;
  border: 1px solid rgba(255, 107, 107, .34);
  box-shadow: none;
}

.button.danger:hover,
button.danger:hover {
  color: #fff;
  background: rgba(255, 107, 107, .26);
}

@media (max-width: 860px) {
  .hero, .two-col, .detail-grid, .feature-grid, .analytics-grid, .plan-grid, .summary-grid, .profile-grid {
    grid-template-columns: 100%;
  }

  .hero {
    padding: 34px 0;
    min-height: auto;
  }

  .hero-panel { order: -1; }

  .topbar {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .topbar nav { width: 100%; }
  .topbar nav a { padding: 7px 8px; }

  .stats { grid-template-columns: calc(50% - 7px) calc(50% - 7px); }

  .admin-user-toolbar {
    grid-template-columns: 100%;
  }

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

  .inline-form {
    width: 100%;
    flex-direction: column;
  }

  .plan-add-form {
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  body.app-layout .topbar {
    width: 100%;
    height: auto;
    bottom: auto;
    z-index: 20;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  body.app-layout .brand {
    padding-bottom: 0;
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  .sidebar-panel {
    display: none;
    max-height: calc(100vh - 120px);
    overflow: auto;
  }

  body.sidebar-open .sidebar-panel {
    display: grid;
  }

  body.app-layout .shell {
    margin-left: 0;
    padding: 118px 16px 56px;
  }
}

@media (max-width: 520px) {
  .shell {
    width: auto;
    max-width: calc(100% - 24px);
    padding-top: 24px;
  }

  .stats { grid-template-columns: 100%; }
  .hero h1 { font-size: 56px; }
  .hero-panel, .panel, .auth-card, .feature-grid article { padding: 18px; }
  .actions, .toolbar { align-items: stretch; flex-direction: column; }
  .actions .button, .toolbar .button { width: 100%; }
}

/* ── Plan Cards with Features & Admin Activation Checkbox ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 1.25rem;
}
.plan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface-2, #151f2b);
  border: 1px solid var(--line, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 1.25rem;
  transition: all 0.2s ease;
  min-height: auto !important;
}
.plan-card.current-plan-card {
  border-color: rgba(47, 224, 173, 0.5);
  box-shadow: 0 0 24px rgba(47, 224, 173, 0.12);
}
.plan-card-head h2 { margin: 0; font-size: 1.35rem; }
.plan-desc { color: var(--muted, #94a3b8); font-size: 0.88rem; margin: 6px 0 10px; }
.plan-limits { font-size: 0.82rem; color: var(--accent, #2fe0ad); font-weight: 700; margin-bottom: 8px; }
.plan-price { font-size: 1.5rem; display: block; margin-bottom: 1rem; color: #fff; }
.plan-cycle { font-size: 0.85rem; color: var(--muted, #94a3b8); font-weight: 400; }

.plan-features {
  margin: 0.75rem 0 1.25rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line, rgba(255,255,255,0.08));
  border-bottom: 1px solid var(--line, rgba(255,255,255,0.08));
  flex-grow: 1;
}
.features-label {
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.83rem;
  line-height: 1.35;
  color: #cbd5e1;
}
.feat-check {
  color: var(--accent, #2fe0ad);
  font-weight: 800;
  flex-shrink: 0;
}

.plan-card-footer {
  margin-top: auto;
  padding-top: 1rem;
}

.plan-option-check {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #e2e8f0);
  margin: 0 !important;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.plan-option-check:hover {
  color: #ffffff;
}

.plan-option-check input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  cursor: pointer;
  accent-color: #82b1ff !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.plan-option-check.is-active {
  font-weight: 700;
  color: #ffffff;
}

/* ─── Light Theme System ─── */
:root[data-theme="light"],
html[data-theme="light"],
body.theme-light {
  color-scheme: light !important;
  --bg: #f8fafc !important;
  --bg-soft: #f1f5f9 !important;
  --surface: #ffffff !important;
  --surface-2: #f8fafc !important;
  --surface-3: #e2e8f0 !important;
  --line: #cbd5e1 !important;
  --line-strong: #94a3b8 !important;
  --text: #0f172a !important;
  --muted: #475569 !important;
  --subtle: #64748b !important;
  --accent: #059669 !important;
  --accent-strong: #047857 !important;
  --blue: #2563eb !important;
  --danger: #ef4444 !important;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] body,
body.theme-light,
body.theme-light.app-layout {
  background: #f8fafc !important;
  color: #0f172a !important;
}

html[data-theme="light"] body::before,
body.theme-light::before {
  opacity: .05;
  background-image:
    linear-gradient(rgba(0, 0, 0, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, .08) 1px, transparent 1px);
}

html[data-theme="light"] body.app-layout .topbar,
body.theme-light.app-layout .topbar {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03);
}

html[data-theme="light"] .brand,
body.theme-light .brand {
  color: #0f172a;
}

html[data-theme="light"] .sidebar-section-title,
body.theme-light .sidebar-section-title {
  color: #94a3b8;
}

html[data-theme="light"] .side-link,
body.theme-light .side-link {
  color: #475569;
}

html[data-theme="light"] .side-link:hover,
body.theme-light .side-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="light"] .side-link.active,
body.theme-light .side-link.active {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  border-color: rgba(5, 150, 105, 0.3);
}

html[data-theme="light"] .side-link.danger-link,
body.theme-light .side-link.danger-link {
  color: #ef4444;
}

html[data-theme="light"] .sidebar-admin-block,
body.theme-light .sidebar-admin-block {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html[data-theme="light"] .sidebar-admin-block:hover,
body.theme-light .sidebar-admin-block:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

html[data-theme="light"] .sidebar-admin-role,
body.theme-light .sidebar-admin-role {
  color: #0f172a;
}

html[data-theme="light"] .sidebar-admin-email,
body.theme-light .sidebar-admin-email {
  color: #64748b;
}

html[data-theme="light"] .panel,
html[data-theme="light"] .hero-panel,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .feature-grid article,
body.theme-light .panel,
body.theme-light .hero-panel,
body.theme-light .auth-card,
body.theme-light .feature-grid article {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .summary-grid article,
body.theme-light .summary-grid article {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

html[data-theme="light"] .metric-label,
body.theme-light .metric-label {
  color: #64748b;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
body.theme-light h1,
body.theme-light h2,
body.theme-light h3 {
  color: #0f172a;
}

html[data-theme="light"] p.muted,
html[data-theme="light"] .muted,
body.theme-light p.muted,
body.theme-light .muted {
  color: #64748b;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
body.theme-light input,
body.theme-light select,
body.theme-light textarea {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus,
body.theme-light input:focus,
body.theme-light select:focus,
body.theme-light textarea:focus {
  background: #ffffff;
  border-color: #059669;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

html[data-theme="light"] label,
body.theme-light label {
  color: #334155;
}

html[data-theme="light"] table,
body.theme-light table {
  color: #0f172a;
}

html[data-theme="light"] th,
body.theme-light th {
  background: #f8fafc;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

html[data-theme="light"] td,
body.theme-light td {
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

html[data-theme="light"] tr:hover,
body.theme-light tr:hover {
  background: #f8fafc;
}

html[data-theme="light"] a,
body.theme-light a {
  color: #2563eb;
}

html[data-theme="light"] a:hover,
body.theme-light a:hover {
  color: #1d4ed8;
}

html[data-theme="light"] .pill,
body.theme-light .pill {
  border-color: #cbd5e1;
  color: #475569;
}

html[data-theme="light"] .pill.active,
body.theme-light .pill.active {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  border-color: rgba(5, 150, 105, 0.3);
}

html[data-theme="light"] .plan-card,
body.theme-light .plan-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

html[data-theme="light"] .plan-card.current-plan-card,
body.theme-light .plan-card.current-plan-card {
  border-color: #059669;
  box-shadow: 0 8px 30px rgba(5, 150, 105, 0.12);
}

html[data-theme="light"] .plan-price,
body.theme-light .plan-price {
  color: #0f172a;
}

html[data-theme="light"] .plan-option-check,
body.theme-light .plan-option-check {
  color: #1e293b;
}

html[data-theme="light"] .plan-option-check:hover,
body.theme-light .plan-option-check:hover {
  color: #000000;
}

html[data-theme="light"] .plan-option-check.is-active,
body.theme-light .plan-option-check.is-active {
  color: #0f172a;
}

html[data-theme="light"] .features-list li,
body.theme-light .features-list li {
  color: #334155;
}

html[data-theme="light"] .button.ghost,
body.theme-light .button.ghost {
  border-color: #cbd5e1;
  color: #0f172a;
}

html[data-theme="light"] .button.ghost:hover,
body.theme-light .button.ghost:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}


/* Crisp Nav Icon in Light Theme */
html[data-theme="light"] .nav-icon,
body.theme-light .nav-icon {
  background: #f1f5f9 !important;
  color: #2563eb !important;
  border: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .nav-icon.admin-badge,
body.theme-light .nav-icon.admin-badge {
  background: rgba(5, 150, 105, 0.12) !important;
  color: #059669 !important;
  border-color: rgba(5, 150, 105, 0.3) !important;
}

html[data-theme="light"] .side-link.active .nav-icon,
body.theme-light .side-link.active .nav-icon {
  background: rgba(5, 150, 105, 0.18) !important;
  color: #059669 !important;
  border-color: rgba(5, 150, 105, 0.4) !important;
}

/* ─── Light Theme Table & Recent QR Codes Styling ─── */
html[data-theme="light"] .table-wrap,
body.theme-light .table-wrap {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03) !important;
}

html[data-theme="light"] table,
body.theme-light table {
  background: #ffffff !important;
  color: #1e293b !important;
}

html[data-theme="light"] thead,
body.theme-light thead {
  background: #f8fafc !important;
}

html[data-theme="light"] th,
body.theme-light th {
  background: #f8fafc !important;
  color: #64748b !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 12px 16px !important;
}

html[data-theme="light"] tbody,
body.theme-light tbody {
  background: #ffffff !important;
}

html[data-theme="light"] tr,
body.theme-light tr {
  background: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

html[data-theme="light"] td,
body.theme-light td {
  background: #ffffff !important;
  color: #334155 !important;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 14px 16px !important;
  font-size: 13px !important;
}

html[data-theme="light"] tr:hover td,
body.theme-light tr:hover td {
  background: #f8fafc !important;
}

/* Link in name column */
html[data-theme="light"] td a,
body.theme-light td a {
  color: #2563eb !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

html[data-theme="light"] td a:hover,
body.theme-light td a:hover {
  color: #1d4ed8 !important;
  text-decoration: underline !important;
}

/* Status Pill in Table */
html[data-theme="light"] .pill,
body.theme-light .pill {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .pill.active,
body.theme-light .pill.active {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
}

html[data-theme="light"] .pill.inactive,
html[data-theme="light"] .pill.disabled,
body.theme-light .pill.inactive,
body.theme-light .pill.disabled {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
}

/* Action Buttons (PNG, Analytics, Edit, Deactivate, Delete) */
html[data-theme="light"] .row-actions a,
html[data-theme="light"] .row-actions button,
body.theme-light .row-actions a,
body.theme-light .row-actions button {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  padding: 5px 10px !important;
  border-radius: 6px !important;
  min-height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.15s ease !important;
}

html[data-theme="light"] .row-actions a:hover,
html[data-theme="light"] .row-actions button:hover,
body.theme-light .row-actions a:hover,
body.theme-light .row-actions button:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
  transform: translateY(-1px) !important;
  text-decoration: none !important;
}

html[data-theme="light"] .row-actions .danger,
html[data-theme="light"] .row-actions button.danger,
body.theme-light .row-actions .danger,
body.theme-light .row-actions button.danger {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
}

html[data-theme="light"] .row-actions .danger:hover,
html[data-theme="light"] .row-actions button.danger:hover,
body.theme-light .row-actions .danger:hover,
body.theme-light .row-actions button.danger:hover {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-color: #f87171 !important;
}

/* ─── Theme Switch Button Control ─── */
.theme-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-field .field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.theme-switch-control {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-height: 42px;
}

/* Modern Toggle Switch Button */
.theme-toggle-switch {
  position: relative;
  display: inline-block;
  width: 68px;
  height: 36px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.theme-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.theme-switch-track {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 36px;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.theme-switch-icon {
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.2s ease;
}

.theme-switch-icon.moon-icon {
  opacity: 0.95;
}

.theme-switch-icon.sun-icon {
  opacity: 0.35;
}

.theme-switch-knob {
  position: absolute;
  content: "";
  height: 28px;
  width: 28px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.theme-toggle-switch input:checked + .theme-switch-track {
  background: #059669;
  border-color: #047857;
}

.theme-toggle-switch input:checked + .theme-switch-track .theme-switch-knob {
  transform: translateX(32px);
  background: #ffffff;
}

.theme-toggle-switch input:checked + .theme-switch-track .moon-icon {
  opacity: 0.35;
}

.theme-toggle-switch input:checked + .theme-switch-track .sun-icon {
  opacity: 0.95;
}

/* Segmented Theme Pill Buttons */
.theme-pill-buttons {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.theme-pill-btn {
  border: none;
  background: transparent;
  color: var(--muted, #94a3b8);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: auto;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.theme-pill-btn:hover {
  color: var(--text, #ffffff);
  background: rgba(255, 255, 255, 0.06);
  transform: none;
}

.theme-pill-btn.active {
  background: var(--accent, #2fe0ad);
  color: #04130f !important;
  box-shadow: 0 2px 8px rgba(47, 224, 173, 0.25);
}

/* Light Theme Overrides */
html[data-theme="light"] .theme-field .field-label,
body.theme-light .theme-field .field-label {
  color: #0f172a !important;
}

html[data-theme="light"] .theme-switch-track,
body.theme-light .theme-switch-track {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] .theme-toggle-switch input:checked + .theme-switch-track,
body.theme-light .theme-toggle-switch input:checked + .theme-switch-track {
  background: #059669 !important;
  border-color: #047857 !important;
}

html[data-theme="light"] .theme-pill-buttons,
body.theme-light .theme-pill-buttons {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] .theme-pill-btn,
body.theme-light .theme-pill-btn {
  color: #64748b !important;
}

html[data-theme="light"] .theme-pill-btn:hover,
body.theme-light .theme-pill-btn:hover {
  color: #0f172a !important;
  background: #e2e8f0 !important;
}

html[data-theme="light"] .theme-pill-btn.active,
body.theme-light .theme-pill-btn.active {
  background: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25) !important;
}

/* ─── Sidebar Colour Swap & Quick Actions ─── */
.sidebar-theme-swap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin: 0 0 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sidebar-theme-swap:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(47, 224, 173, 0.35);
}

.theme-swap-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text, #ffffff);
  user-select: none;
}

.theme-swap-indicator {
  font-size: 14px;
  line-height: 1;
}

.theme-swap-title {
  letter-spacing: 0.2px;
}

.theme-swap-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  margin: 0;
}

.theme-swap-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.theme-swap-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.theme-swap-knob {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: #ffffff;
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.theme-swap-toggle input:checked + .theme-swap-slider {
  background: #059669;
  border-color: #047857;
}

.theme-swap-toggle input:checked + .theme-swap-slider .theme-swap-knob {
  transform: translateX(20px);
}

/* User Card Row & Quick Actions */
.sidebar-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.sidebar-user-row .sidebar-admin-card {
  flex: 1;
  min-width: 0;
}

.sidebar-user-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sidebar-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.18s ease;
  padding: 0;
  box-shadow: none;
  cursor: pointer;
}

.sidebar-quick-btn:hover {
  background: rgba(47, 224, 173, 0.15);
  border-color: var(--accent, #2fe0ad);
  color: var(--accent, #2fe0ad);
  transform: translateY(-1px);
}

.sidebar-quick-btn.active {
  background: var(--accent, #2fe0ad);
  border-color: var(--accent, #2fe0ad);
  color: #04130f !important;
  box-shadow: 0 2px 8px rgba(47, 224, 173, 0.25);
}

.sidebar-quick-icon {
  width: 17px;
  height: 17px;
  display: block;
}

/* Light Theme Overrides */
html[data-theme="light"] .sidebar-theme-swap,
body.theme-light .sidebar-theme-swap {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html[data-theme="light"] .sidebar-theme-swap:hover,
body.theme-light .sidebar-theme-swap:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

html[data-theme="light"] .theme-swap-info,
body.theme-light .theme-swap-info {
  color: #0f172a;
}

html[data-theme="light"] .theme-swap-slider,
body.theme-light .theme-swap-slider {
  background: #cbd5e1;
  border-color: #94a3b8;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .theme-swap-toggle input:checked + .theme-swap-slider,
body.theme-light .theme-swap-toggle input:checked + .theme-swap-slider {
  background: #059669;
  border-color: #047857;
}

html[data-theme="light"] .sidebar-quick-btn,
body.theme-light .sidebar-quick-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}

html[data-theme="light"] .sidebar-quick-btn:hover,
body.theme-light .sidebar-quick-btn:hover {
  background: rgba(5, 150, 105, 0.1);
  border-color: #059669;
  color: #059669;
}

html[data-theme="light"] .sidebar-quick-btn.active,
body.theme-light .sidebar-quick-btn.active {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.sidebar-quick-btn.logout-btn:hover {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}

html[data-theme="light"] .sidebar-quick-btn,
body.theme-light .sidebar-quick-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

html[data-theme="light"] .sidebar-quick-btn:hover,
body.theme-light .sidebar-quick-btn:hover {
  background: #ecfdf5;
  border-color: #059669;
  color: #059669;
}

html[data-theme="light"] .sidebar-quick-btn.logout-btn:hover,
body.theme-light .sidebar-quick-btn.logout-btn:hover {
  background: #fef2f2 !important;
  border-color: #dc2626 !important;
  color: #dc2626 !important;
}

html[data-theme="light"] .sidebar-quick-btn.active,
body.theme-light .sidebar-quick-btn.active {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
}

/* ==========================================================================
   Interactive Working Demo: How to Generate & Access QR Codes
   ========================================================================== */

.demo-modal-tabs {
  display: flex;
  gap: 10px;
  margin: 1.25rem 0 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}

.demo-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a5b2c4;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.demo-tab-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.demo-tab-btn.active {
  background: rgba(47, 224, 173, 0.16);
  border-color: #2fe0ad;
  color: #2fe0ad;
  box-shadow: 0 0 14px rgba(47, 224, 173, 0.25);
}

.demo-workspace-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 780px) {
  .demo-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.demo-card-pane {
  background: #121926;
  border: 1px solid #1f2e42;
  border-radius: 12px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-sizing: border-box;
}

.demo-pane-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-step-tag {
  background: rgba(47, 224, 173, 0.18);
  color: #2fe0ad;
  border: 1px solid rgba(47, 224, 173, 0.4);
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.demo-pane-header h4 {
  margin: 0;
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 700;
}

.demo-step-explainer {
  margin: 0;
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1.45;
}

.demo-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
}

.demo-input {
  background: #080c14;
  border: 1px solid #233147;
  border-radius: 7px;
  padding: 9px 12px;
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.demo-input:focus {
  border-color: #2fe0ad;
}

.demo-type-pill-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.demo-type-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a5b2c4;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.demo-type-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.demo-type-pill.active {
  background: rgba(47, 224, 173, 0.18);
  border-color: #2fe0ad;
  color: #2fe0ad;
}

.demo-color-picker-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #cbd5e1;
  background: #080c14;
  border: 1px solid #233147;
  padding: 4px 10px;
  border-radius: 6px;
}

.demo-color-input {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  background: none;
  padding: 0;
}

.demo-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.demo-color-input::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.demo-dynamic-badge {
  background: rgba(47, 224, 173, 0.08);
  border: 1px solid rgba(47, 224, 173, 0.25);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.demo-dynamic-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2fe0ad;
  box-shadow: 0 0 8px #2fe0ad;
  flex-shrink: 0;
  animation: demoPulse 1.8s infinite;
}

@keyframes demoPulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.demo-primary-btn {
  background: linear-gradient(135deg, #2fe0ad, #14b886);
  border: none;
  border-radius: 7px;
  color: #04130f;
  padding: 11px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  width: 100%;
  margin-top: 4px;
}

.demo-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(47, 224, 173, 0.4);
}

.demo-qr-preview-box {
  background: #080c14;
  border: 1px solid #1f2d42;
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.demo-qr-img-frame {
  background: #ffffff;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.demo-qr-img-frame.scan-flash {
  animation: qrScanFlash 0.6s ease;
}

@keyframes qrScanFlash {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.05); filter: brightness(1.3) drop-shadow(0 0 16px #2fe0ad); }
  100% { transform: scale(1); filter: brightness(1); }
}

.demo-qr-img-frame img {
  width: 160px;
  height: 160px;
  display: block;
}

.demo-qr-caption {
  font-size: 0.78rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-telemetry-box {
  background: #080c14;
  border: 1px solid #1f2d42;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.8rem;
}

.demo-telemetry-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.demo-access-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.demo-action-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  color: #e2e8f0;
  padding: 9px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.demo-action-btn-secondary:hover {
  background: rgba(47, 224, 173, 0.14);
  border-color: #2fe0ad;
  color: #2fe0ad;
}

.demo-dynamic-updater {
  background: rgba(148, 0, 255, 0.08);
  border: 1px solid rgba(148, 0, 255, 0.25);
  border-radius: 8px;
  padding: 10px;
}

.demo-action-btn-small {
  background: #9400FF;
  border: none;
  border-radius: 6px;
  color: #ffffff;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.demo-action-btn-small:hover {
  background: #a82eff;
}

/* ==========================================================================
   Floating "GET A DEMO" Button & Modal (Reference Purple Design)
   ========================================================================== */

.floating-get-demo-btn {
  position: fixed;
  bottom: max(24px, calc(16px + env(safe-area-inset-bottom, 0px)));
  left: 50%;
  transform: translateX(-50%);
  width: 270px;
  height: 50px;
  background: #9400FF;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 2px;
  color: #ffffff !important;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(148, 0, 255, 0.45), 0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  z-index: 9998;
  outline: none;
  text-decoration: none;
  user-select: none;
  animation: qeFloatDemo 3.2s infinite ease-in-out;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, filter 0.25s ease, transform 0.25s ease;
  box-sizing: border-box;
}

@keyframes qeFloatDemo {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-3px);
  }
}

.floating-get-demo-btn:hover {
  background: #a31aff;
  filter: brightness(1.08);
  border-color: #ffffff;
  box-shadow: 0 10px 32px rgba(148, 0, 255, 0.75), 0 0 15px rgba(255, 255, 255, 0.35);
  transform: translateX(-50%) translateY(-2px);
  color: #ffffff !important;
}

.floating-get-demo-btn:active {
  transform: translateX(-50%) translateY(1px);
  box-shadow: 0 4px 16px rgba(148, 0, 255, 0.5);
}

@media (max-width: 600px) {
  .floating-get-demo-btn {
    width: 85%;
    max-width: 270px;
    height: 50px;
    font-size: 14px;
    bottom: max(16px, calc(12px + env(safe-area-inset-bottom, 0px)));
  }
}

/* ==========================================================================
   Step-by-Step Guide Modal: How to Create & View QR Codes (Premium UI)
   ========================================================================== */

.demo-modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 8, 16, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.demo-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.demo-modal-dialog {
  background: #0b1120;
  border: 1px solid rgba(47, 224, 173, 0.45);
  border-radius: 16px;
  max-width: 820px;
  width: 95%;
  height: 86vh;
  max-height: 700px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.95), 0 0 50px rgba(47, 224, 173, 0.14);
  color: #f3f7fb;
  position: relative;
  transform: scale(0.97) translateY(8px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  overflow: hidden;
}

.demo-modal-backdrop.active .demo-modal-dialog {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.demo-guide-header {
  padding: 1.35rem 1.6rem 0.9rem 1.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.65);
  position: relative;
  flex-shrink: 0;
}

.demo-guide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(47, 224, 173, 0.15);
  color: #2fe0ad;
  border: 1px solid rgba(47, 224, 173, 0.35);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}

.demo-guide-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.demo-guide-subtitle {
  margin: 0.25rem 0 0 0;
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.45;
}

.demo-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.demo-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ffffff;
}

/* Stepper Tabs Navigation (Clean & Equal Distribution) */
.demo-stepper-nav {
  display: flex;
  background: #080d17;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 1rem;
  gap: 0.4rem;
  overflow-x: hidden;
  flex-shrink: 0;
  justify-content: space-between;
}

.demo-stepper-btn {
  flex: 1;
  text-align: center;
  justify-content: center;
  background: none;
  border: 1px solid transparent;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 7px 6px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.demo-stepper-btn:hover {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
}

.demo-stepper-btn.active {
  background: rgba(47, 224, 173, 0.14);
  border-color: rgba(47, 224, 173, 0.45);
  color: #2fe0ad;
}

.demo-stepper-btn.completed {
  color: #94a3b8;
}

.demo-stepper-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
}

.demo-stepper-btn.active .demo-stepper-num {
  background: #2fe0ad;
  color: #070a12;
  font-weight: 800;
}

/* Scrollable Step Body */
.demo-guide-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.4rem 1.6rem;
  box-sizing: border-box;
}

.demo-guide-body::-webkit-scrollbar {
  width: 6px;
}
.demo-guide-body::-webkit-scrollbar-track {
  background: #080d17;
}
.demo-guide-body::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 3px;
}
.demo-guide-body::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

.demo-step-pane {
  display: none;
  animation: qeStepFadeIn 0.25s ease-out;
}

.demo-step-pane.active {
  display: block;
}

@keyframes qeStepFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.demo-step-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.45rem;
}

.demo-step-pill {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(148, 0, 255, 0.18);
  color: #c084fc;
  border: 1px solid rgba(148, 0, 255, 0.35);
}

.demo-step-heading {
  margin: 0 0 0.65rem 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.demo-step-description {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin: 0 0 1.2rem 0;
}

/* UI Mockup Illustration Card */
.demo-mockup-card {
  background: #0d1522;
  border: 1px solid #1e2d42;
  border-radius: 10px;
  padding: 1.15rem;
  margin-bottom: 1.2rem;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.demo-mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e2d42;
  padding-bottom: 0.55rem;
  margin-bottom: 0.9rem;
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-key-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

@media (max-width: 600px) {
  .demo-key-points {
    grid-template-columns: 1fr;
  }
}

.demo-point-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.8rem 0.95rem;
}

.demo-point-box h5 {
  margin: 0 0 0.25rem 0;
  color: #2fe0ad;
  font-size: 0.84rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-point-box p {
  margin: 0;
  font-size: 0.81rem;
  color: #94a3b8;
  line-height: 1.45;
}

/* Modal Footer Navigation (Always Visible) */
.demo-guide-footer {
  padding: 0.85rem 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #080d17;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.demo-dots-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.demo-dot.active {
  background: #2fe0ad;
  width: 20px;
  border-radius: 4px;
}

.demo-nav-btn {
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
}

.demo-nav-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.demo-nav-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.demo-nav-btn.primary {
  background: #2fe0ad;
  color: #070a12;
}

.demo-nav-btn.primary:hover {
  background: #4ef2c2;
  box-shadow: 0 0 16px rgba(47, 224, 173, 0.4);
}

.demo-nav-btn.purple-btn {
  background: #9400FF;
  color: #ffffff;
}

.demo-nav-btn.purple-btn:hover {
  background: #a31aff;
  box-shadow: 0 0 16px rgba(148, 0, 255, 0.4);
}\n


/* ==========================================================================
   Topbar Demo Button & Clean Restorations
   ========================================================================== */

.topbar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

body.app-layout .topbar .topbar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 14px 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  width: 100%;
}

body.app-layout .topbar .topbar-brand-row .brand {
  padding: 0;
  border-bottom: none;
  margin-bottom: 0;
}

.topbar-demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 224, 173, 0.14);
  border: 1px solid rgba(47, 224, 173, 0.4);
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(47, 224, 173, 0.12);
  transition: all 0.15s ease;
}

.topbar-demo-btn:hover {
  background: var(--accent);
  color: #050d18;
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(47, 224, 173, 0.4);
  transform: translateY(-1px);
}

html[data-theme="light"] .topbar-demo-btn,
body.theme-light .topbar-demo-btn {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #059669 !important;
}

html[data-theme="light"] .topbar-demo-btn:hover,
body.theme-light .topbar-demo-btn:hover {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
}

/* Hide floating demo button at bottom */
.floating-get-demo-btn {
  display: none !important;
}

/* Ensure Guide Modal displays perfectly when active */
.demo-modal-backdrop.active,
.demo-modal-backdrop.is-open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 100000 !important;
}

.demo-modal-backdrop.active .demo-modal-dialog,
.demo-modal-backdrop.is-open .demo-modal-dialog {
  transform: scale(1) translateY(0) !important;
}
