/* ============================================================
   XFX.SYSTEMS — Dashboard workspace
   Restyles the existing .dash-* markup only (ids are untouched).
   ============================================================ */
.dash-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 30px 24px 80px;
  display: grid;
  grid-template-columns: 266px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}
.dash-sidebar {
  position: sticky;
  top: 96px;
  z-index: 5;
  display: flex; flex-direction: column;
  gap: 14px;
  padding: 16px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.dash-user {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0c0c0f;
}
.dash-user .dash-avatar,
.dash-avatar {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
  font-weight: 800; font-size: 14px;
  background: linear-gradient(160deg, #22222a, #14141a);
  color: var(--text);
  border: 1px solid var(--line-2);
  text-transform: uppercase;
}
.dash-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dash-avatar.role-owner { border-color: rgba(255, 215, 0, .5); color: #ffd766; }
.dash-avatar.role-admin { border-color: rgba(255, 255, 255, .5); color: #c9c9c9; }
.dash-username { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.dash-user-meta { display: flex; align-items: center; gap: 7px; margin-top: 5px; }
.dash-role,
.dash-user-id {
  font-family: var(--xfx-mono);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text-3);
}
.dash-user-id { border: 0; padding: 0; color: var(--text-4); letter-spacing: .08em; }
.dash-role.role-user  { color: var(--text-3); }
.dash-role.role-admin { color: #c9c9c9; border-color: rgba(255, 255, 255, .42); background: var(--accent-soft); }
.dash-role.role-owner { color: #ffd766; border-color: rgba(255, 215, 0, .42); background: rgba(255, 215, 0, .1); }

.dash-nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav-section {
  font-family: var(--xfx-mono);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-4);
  padding: 12px 12px 6px;
}
.dash-nav-item {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13.5px; font-weight: 600;
  color: var(--text-2);
  transition: background .14s, color .14s, border-color .14s;
}
.dash-nav-item svg { flex: 0 0 auto; color: var(--text-3); transition: color .14s; }
.dash-nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .045); }
.dash-nav-item:hover svg { color: var(--text-2); }
.dash-nav-item.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07));
  border-color: rgba(255, 255, 255, .42);
}
.dash-nav-item.active svg { color: var(--accent-2); }
.dash-nav-item.danger { color: #b8b8b8; }
.dash-nav-item.danger:hover { background: rgba(255, 255, 255, .1); color: #b8b8b8; }
.dash-nav-item[hidden] { display: none !important; }

.dash-main { min-width: 0; display: flex; flex-direction: column; }
.dash-tab { display: none; }
.dash-tab.active { display: block; }
.dash-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.dash-hero {
  position: relative; overflow: hidden;
  padding: 26px 28px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(255, 255, 255, .17), transparent 62%),
    linear-gradient(180deg, #131317, #0d0d10);
}
.dash-hero::after { display: none; }
.dash-title {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -.03em;
  text-transform: none;
  line-height: 1.12;
}
.dash-subtitle { color: var(--text-3); font-size: 13.5px; margin-top: 7px; }

@media (max-width: 1080px) {
  .dash-wrap { grid-template-columns: 1fr; padding: 20px 18px 70px; }
  .dash-sidebar { position: static; max-height: none; }
  .dash-nav { flex-direction: row; flex-wrap: wrap; }
  .dash-nav-section { display: none; }
}

/* ── License / stat cards ────────────────────────────────── */
.license-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 20px; }
.license-stat {
  position: relative; overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  transition: border-color .2s, transform .2s;
}
.license-stat::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--accent), rgba(255, 255, 255, 0));
}
.license-stat:hover { border-color: var(--line-3); transform: translateY(-2px); }
.license-stat-label { font-family: var(--xfx-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); }
.license-stat-value { font-family: var(--font-body); font-weight: 800; font-size: 34px; letter-spacing: -.03em; margin-top: 6px; }
.license-stat-value .unit { font-size: 14px; color: var(--text-3); }
.license-stat-foot { margin-top: 10px; font-size: 12px; color: var(--text-4); display: flex; justify-content: space-between; gap: 10px; }
.days-bar { height: 4px; background: #0a0a0a; border-radius: 4px; margin-top: 12px; overflow: hidden; }
.days-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 4px; transition: width .4s ease; }
.days-bar-fill.warning { background: var(--warn); }
.days-bar-fill.danger { background: var(--danger); }
.license-name, .license-meta { font-size: 13px; }
.license-meta { color: var(--text-3); }
.license-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 13px;
  background: rgba(255, 255, 255, .014);
  margin-bottom: 10px;
}

/* ── Settings / configs workspace ────────────────────────── */
.settings-wrap { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 820px) { .settings-wrap { grid-template-columns: 1fr; } }
.settings-sidebar, #settingsSidebar {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  max-height: 70vh; overflow-y: auto;
}
.settings-nav-item {
  padding: 10px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--text-2); text-align: left;
  transition: background .14s, color .14s, border-color .14s;
  border: 1px solid transparent;
}
.settings-nav-item:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.settings-nav-item.active { color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07)); border-color: rgba(255, 255, 255, .38); }
.settings-panel, #settingsContent {
  border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  min-width: 0;
}
.settings-h { font-family: var(--xfx-mono); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.setting-row:last-child { border-bottom: 0; }
.slider-row { display: grid; grid-template-columns: 1fr 140px 56px; gap: 12px; align-items: center; }
.slider-val { font-family: var(--xfx-mono); font-size: 12px; color: var(--text-2); text-align: right; }
.color-input { width: 46px; height: 30px; padding: 2px; border-radius: 9px; border: 1px solid var(--line-2); background: #0c0c0f; }
.cfg-preview {
  border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  background: #0a0a0a; font-family: var(--xfx-mono); font-size: 12px;
  color: var(--text-2); max-height: 340px; overflow: auto; white-space: pre-wrap;
}
.hours-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.profile-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.profile-row:last-child { border-bottom: 0; }
.profile-k { font-family: var(--xfx-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.profile-avatar-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile-avatar-big {
  width: 88px; height: 88px; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line-2); background: #14141a;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; text-transform: uppercase;
}
.profile-avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-actions { display: flex; flex-direction: column; gap: 10px; }
.profile-avatar-hint { font-size: 12px; color: var(--text-3); max-width: 42ch; }
.lic-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.lic-cover { width: 100%; height: 120px; object-fit: cover; display: block; background: #111; }
.lic-body { padding: 16px 16px 18px; }
.lic-pause-row { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.lic-pause-days { background: #141416; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.lic-pause { margin-top: 12px; }
.avatar-crop-title { font-weight: 700; margin-bottom: 12px; }
.avatar-crop-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
#radarCanvas, #avatarCropCanvas { border-radius: 14px; border: 1px solid var(--line); max-width: 100%; }
.discord-link-code { font-family: var(--xfx-mono); font-size: 13px; letter-spacing: .12em; color: var(--accent-2); }
.dl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.dl-card {
  padding: 18px; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  transition: border-color .2s, transform .2s;
}
.dl-card:hover { border-color: rgba(255, 255, 255, .42); transform: translateY(-2px); }
.dl-card-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-2); margin-bottom: 12px; }
.dl-card-title { font-weight: 700; font-size: 14.5px; }
.dl-card-desc { font-size: 12.5px; color: var(--text-3); margin: 6px 0 14px; line-height: 1.6; }
.dl-card-cta { font-family: var(--xfx-mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.dl-card-badge { display: inline-block; margin-left: 8px; font-family: var(--xfx-mono); font-size: 9.5px; letter-spacing: .12em; color: var(--text-3); }

/* ── Quick actions on Overview ───────────────────────────── */
.dash-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(186px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.dash-quick-card {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .014);
  color: var(--text-2);
  font-size: 13.5px; font-weight: 600;
  transition: border-color .18s, color .18s, transform .18s, background .18s;
}
.dash-quick-card:hover {
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .07);
  color: #fff;
  transform: translateY(-2px);
}
.dash-quick-card svg { flex: 0 0 auto; color: var(--accent-2); }
/* ============================================================
   Dashboard layout pass 2 — organisation + polish
   Appended after pass 1, so these win on equal specificity. Nothing here
   touches markup contracts: ids, data-tab values and inline handlers are
   all untouched.
   ============================================================ */

/* ── Grid: a touch wider, calmer rhythm ──────────────────── */
.dash-wrap { max-width: 1500px; padding: 34px 28px 96px; gap: 30px; }

/* ── Sidebar ─────────────────────────────────────────────── */
.dash-sidebar {
  top: 100px; padding: 18px; gap: 16px;
}
.dash-user { padding: 13px; gap: 13px; border-radius: 15px; }
.dash-nav { gap: 3px; }
.dash-nav-section { padding: 16px 12px 7px; }
.dash-nav-item {
  padding: 10px 13px; border-radius: 10px;
  position: relative;
}
.dash-nav-item.active { border-color: transparent; }
.dash-nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--accent); box-shadow: 0 0 9px var(--accent-glow);
}
.dash-nav-item.active svg { color: var(--accent); }

/* "running now" pill under the user card */
.dash-live {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: #0c0c0f;
  font-size: 12px; color: var(--text-3);
}
.dash-live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line-4); flex: 0 0 auto;
}
.dash-live.on { color: var(--text-2); border-color: var(--line-2); }
.dash-live.on i { background: var(--accent); box-shadow: 0 0 9px var(--accent-glow); }
.dash-live b { color: var(--text); font-weight: 600; }

/* ── Tab panels: quiet entrance, consistent header ───────── */
.dash-tab.active { animation: dashIn .22s ease-out both; }
@keyframes dashIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.dash-header {
  padding-bottom: 18px; margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  gap: 18px;
}
.dash-title { font-size: 26px; font-weight: 800; letter-spacing: -.025em; }
.dash-subtitle { font-size: 13.5px; color: var(--text-3); margin-top: 6px; max-width: 78ch; }

/* ── Hero (Overview) ─────────────────────────────────────── */
.dash-hero, .dash-tab > .dash-hero {
  position: relative;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(255, 255, 255, .07), transparent 58%),
    linear-gradient(180deg, var(--card-2), var(--card));
  overflow: hidden;
}
.dash-hero::after {
  content: ""; position: absolute; inset: 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: 42px 42px;
  mask-image: linear-gradient(180deg, #000, transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 78%);
}
.dash-hero > * { position: relative; z-index: 1; }

/* ── Status strip: at-a-glance account state ─────────────── */
.dash-status {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px; margin: 20px 0 24px;
}
.dash-stat {
  padding: 14px 15px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .014);
}
.dash-stat-k {
  font-family: var(--xfx-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--text-4);
  margin-bottom: 8px;
}
.dash-stat-v { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.dash-stat-v.sm { font-size: 14px; font-weight: 600; word-break: break-all; }
.dash-stat-sub { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }

/* ── Cards ───────────────────────────────────────────────── */
.card { border-radius: var(--radius-lg); }
.card-title {
  position: relative; padding-left: 15px;
  font-size: 15.5px; letter-spacing: -.01em;
}
.card-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 15px; border-radius: 2px;
  background: var(--accent);
}
.card-sub { color: var(--text-3); }

/* license / product tiles */
.license-stat {
  border-radius: 15px;
  transition: border-color .18s, transform .18s, background .18s;
}
.license-stat:hover { border-color: var(--line-3); transform: translateY(-2px); }
.product-badge-dash { font-size: 11.5px; }

/* ── Tables (license keys, admin) ────────────────────────── */
.admin-table { border-collapse: separate; border-spacing: 0; }
.admin-table th {
  font-family: var(--xfx-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-3);
  padding: 12px 14px;
}
.admin-table td { padding: 13px 14px; border-top: 1px solid var(--line); }
.admin-table tbody tr { transition: background .14s; }
.admin-table tbody tr:hover { background: rgba(255, 255, 255, .022); }

/* ── Menu & Settings editor ──────────────────────────────── */
.settings-wrap { gap: 22px; align-items: start; }
.settings-sidebar {
  position: sticky; top: 104px;
  padding: 12px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--card);
  max-height: calc(100vh - 140px); overflow-y: auto;
}
.settings-nav { display: flex; flex-direction: column; gap: 3px; }
.settings-nav-item {
  text-align: left; padding: 10px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  transition: background .14s, color .14s;
}
.settings-nav-item:hover { background: rgba(255, 255, 255, .045); color: var(--text); }
.settings-nav-item.active {
  color: var(--text);
  background: linear-gradient(90deg, var(--accent-soft), rgba(255, 255, 255, .015));
}
.settings-content { border-radius: var(--radius-lg); }
.settings-h { font-size: 15px; font-weight: 700; }
.setting-row { padding: 12px 2px; border-bottom: 1px solid rgba(255, 255, 255, .045); }
.setting-label { font-size: 13.5px; color: var(--text-2); }

/* switch (shared with the web menu look) */
.toggle {
  width: 40px; height: 22px; border-radius: 999px;
  border: 1px solid var(--line-3); background: #131313;
  position: relative; flex: 0 0 auto;
  transition: background .16s, border-color .16s;
}
.toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-4); transition: transform .16s, background .16s;
}
.toggle.on { background: var(--accent); border-color: var(--accent); }
.toggle.on::after { transform: translateX(18px); background: #0a0a0a; }

.slider-input { -webkit-appearance: none; appearance: none; height: 3px; border-radius: 3px; background: var(--line-2); }
.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 0; cursor: pointer;
}
.slider-input::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 0; cursor: pointer; }
.slider-val { font-family: var(--xfx-mono); font-size: 12px; min-width: 46px; text-align: right; }
.color-input { width: 46px; height: 26px; border-radius: 7px; border: 1px solid var(--line-3); padding: 0; }

/* ── Forms: redeem + profile ─────────────────────────────── */
.redeem-wrap { gap: 10px; }
.redeem-input {
  background: #0d0d0d; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 11px 13px; color: var(--text); font: inherit; font-size: 13.5px;
}
.redeem-input:focus { outline: none; border-color: var(--line-4); }
.redeem-btn { border-radius: 10px; padding: 11px 18px; font-weight: 700; font-size: 13px; }
.msg { border-radius: 10px; padding: 10px 13px; font-size: 13px; }
.msg.ok  { background: rgba(142, 224, 176, .08); border: 1px solid rgba(142, 224, 176, .28); color: var(--ok); }
.msg.err { background: rgba(192, 57, 43, .09);  border: 1px solid rgba(192, 57, 43, .3);  color: #eb9a90; }

/* ── Misc panels ─────────────────────────────────────────── */
.dl-card { border-radius: 16px; }
.profile-avatar-big { border-radius: 20px; }
.cfg-preview { border-radius: 14px; }
.hours-grid { gap: 12px; }

/* ── Responsive: sidebar to top, tighter padding ─────────── */
@media (max-width: 1180px) {
  .dash-wrap { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 24px 18px 80px; }
  .dash-sidebar { position: static; max-height: none; }
  .dash-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 6px; }
  .dash-nav-section { grid-column: 1 / -1; padding: 12px 4px 4px; }
  .dash-nav-item.active::before { display: none; }
  .settings-sidebar { position: static; max-height: none; }
  .settings-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .dash-title { font-size: 22px; }
  .dash-header { flex-direction: column; align-items: flex-start; }
  .dash-quick { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
/* ============================================================
   Dashboard — pass 3: depth, hierarchy and polish
   Appended last, so it wins on equal specificity. Markup contracts
   (ids, data-tab, inline handlers) are untouched.
   ============================================================ */

/* ── Shell: more room, calmer rhythm ─────────────────────── */
.dash-wrap { max-width: 1620px; gap: 34px; padding: 36px 30px 110px; }

/* ── Sidebar ─────────────────────────────────────────────── */
.dash-sidebar {
  top: 104px; padding: 20px 18px; gap: 18px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(255, 255, 255, .05), transparent 60%),
    linear-gradient(180deg, var(--card-2), #0a0a0a);
  border-color: var(--line-2);
  box-shadow: var(--shadow-2);
}
.dash-user {
  padding: 14px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  border-color: var(--line-2);
}
.dash-avatar { width: 46px; height: 46px; border-radius: 14px; font-size: 15px; }
.dash-username { font-size: 15px; }

.dash-live { border-radius: 14px; padding: 11px 13px; }

/* Nav: roomier rows, a real active state, external links get an arrow */
.dash-nav { gap: 4px; }
.dash-nav-section { padding: 18px 12px 8px; font-size: 9px; letter-spacing: .24em; }
.dash-nav-item {
  padding: 11px 13px; border-radius: 11px;
  font-size: 13.5px; letter-spacing: -.005em;
}
.dash-nav-item svg { width: 16px; height: 16px; }
.dash-nav-item:hover { background: rgba(255, 255, 255, .055); }
.dash-nav-item.active {
  background: linear-gradient(90deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03));
  border-color: var(--line-3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
}
.dash-nav-item.active::before { top: 10px; bottom: 10px; width: 3px; }
/* "opens a page" affordance on link-style nav items */
.dash-nav-ext { margin-left: auto; font-size: 12px; color: var(--text-4); transition: color .15s; }
.dash-nav-item:hover .dash-nav-ext { color: var(--text-2); }

/* ── Page header ─────────────────────────────────────────── */
.dash-header {
  position: relative; padding-bottom: 20px; margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.dash-header::after {
  content: ''; position: absolute; left: 0; bottom: -1px;
  width: 92px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.dash-title { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.dash-subtitle { font-size: 14px; margin-top: 8px; }

/* ── Hero ────────────────────────────────────────────────── */
.dash-hero {
  padding: 30px 30px 28px;
  border-color: var(--line-2);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255, 255, 255, .09), transparent 55%),
    radial-gradient(90% 120% at 100% 0%, rgba(255, 255, 255, .05), transparent 60%),
    linear-gradient(180deg, var(--card-2), var(--card));
  box-shadow: var(--shadow-1);
}
.dash-hero::after { background-size: 48px 48px; opacity: .8; }

/* ── Status strip: real tiles with icons ─────────────────── */
.dash-status { gap: 14px; margin: 24px 0 30px; }
.dash-stat {
  position: relative; overflow: hidden;
  padding: 17px 18px; border-radius: 16px;
  border-color: var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  transition: border-color .2s, transform .2s, background .2s;
}
.dash-stat:hover { border-color: var(--line-3); transform: translateY(-2px); }
.dash-stat::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: .55;
}
.dash-stat-k { font-size: 9px; letter-spacing: .22em; }
.dash-stat-v { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.dash-stat-v.sm { font-size: 15px; font-weight: 700; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  border-radius: var(--radius-lg);
  border-color: var(--line);
  transition: border-color .2s, box-shadow .2s;
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.card-title { font-size: 16px; padding-left: 16px; }
.card-title::before { height: 16px; width: 3px; }

/* ── Quick actions ──────────────────────────────────────── */
.dash-quick { gap: 14px; margin-bottom: 26px; }
.dash-quick-card {
  padding: 17px 18px; border-radius: 16px;
  border-color: var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .008));
  font-size: 14px;
}
.dash-quick-card svg { width: 20px; height: 20px; }
.dash-quick-card:hover { border-color: var(--line-4); box-shadow: var(--shadow-1); }
.dash-quick-card:hover svg { color: var(--accent); }

/* ── Licence / product tiles ─────────────────────────────── */
.license-grid { gap: 16px; }
.license-stat {
  position: relative; overflow: hidden;
  padding: 20px; border-radius: 18px;
  border-color: var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01));
}
.license-stat:hover { border-color: var(--line-4); transform: translateY(-3px); box-shadow: var(--shadow-1); }
.license-stat-value { letter-spacing: -.04em; }
.product-badge-dash {
  font-family: var(--xfx-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-2);
}
.days-bar { height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.days-bar-fill { box-shadow: 0 0 12px -2px var(--accent); }

/* ── Tables: sticky header, monospace keys, row hover ────── */
.admin-table { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.admin-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: #0d0d0e; backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-2);
}
.admin-table td { font-size: 13px; }
.admin-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .012); }
.admin-table tbody tr:hover { background: rgba(255, 255, 255, .035); }
.copy-btn { border-radius: 8px; }
.admin-badge {
  font-family: var(--xfx-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--text-3);
}

/* ── Menu & Settings editor ─────────────────────────────── */
.settings-sidebar { padding: 14px; }
.settings-nav-item { padding: 11px 13px; }
.settings-content {
  padding: 24px 26px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card), #0b0b0b);
}
.setting-row { padding: 13px 2px; }
.settings-h { font-size: 16px; margin-bottom: 4px; }
.input, .redeem-input { border-radius: 10px; }
#cfgPreview { border-radius: 16px; }
.toggle { width: 42px; height: 23px; }
.toggle::after { width: 17px; height: 17px; }
.toggle.on::after { transform: translateX(19px); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1180px) {
  .dash-wrap { padding: 26px 18px 90px; }
  .dash-header::after { width: 64px; }
  .dash-title { font-size: 26px; }
}
@media (max-width: 640px) {
  .dash-hero { padding: 22px 18px; }
  .dash-stat-v { font-size: 19px; }
  .dash-status { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
.license-stat.lic-card { padding: 0; }
.license-stat.lic-card .lic-cover { border-radius: 18px 18px 0 0; }