/* Desire Client - Admin panel
   Same visual language as the site (css/style.css): #030818 background with the shader, Plus Jakarta Sans,
   glass cards with a blue hairline, white primary buttons, navbar-like sidebar. */
:root {
  --adm-bg: #030818;
  --adm-surface: rgba(14, 20, 36, 0.65);          /* .feature-card */
  --adm-surface-solid: rgba(14, 17, 24, 0.90);    /* .navbar */
  --adm-surface-2: rgba(255, 255, 255, 0.05);     /* .btn-secondary */
  --adm-surface-3: rgba(255, 255, 255, 0.10);
  --adm-line: rgba(255, 255, 255, 0.07);
  --adm-line-blue: rgba(80, 150, 255, 0.18);
  --adm-line-strong: rgba(255, 255, 255, 0.12);
  --adm-text: #ffffff;
  --adm-soft: #c4d3eb;
  --adm-muted: #8c9eb8;
  --adm-faint: #5d6e86;
  --adm-accent: #3b82f6;
  --adm-accent-2: #60a5fa;
  --adm-accent-soft: rgba(59, 130, 246, 0.14);
  --adm-ok: #34d399;
  --adm-warn: #fbbf24;
  --adm-danger: #f87171;
  --adm-violet: #c084fc;
  --adm-sky: #38bdf8;
  --adm-radius: 16px;
  --adm-sidebar: 256px;
  --adm-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --adm-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.adm-shell {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: var(--adm-sidebar) minmax(0, 1fr);
  min-height: 100vh;
  color: var(--adm-text);
}

.adm-icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

code {
  padding: 2px 7px;
  border-radius: 6px;
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 0.82em;
  color: var(--adm-accent-2);
  background: var(--adm-accent-soft);
  border: 1px solid var(--adm-line-blue);
}

/* ---------- Sidebar (same surface as the site navbar) ---------- */
.adm-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 14px 16px;
  background: var(--adm-surface-solid);
  border-right: 1px solid var(--adm-line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 10px 0 32px rgba(0, 0, 0, 0.4);
}

.adm-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 10px 18px;
  text-decoration: none;
  color: var(--adm-text);
}
.adm-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #070b14;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25), 0 2px 8px rgba(0, 0, 0, 0.4);
}
.adm-brand-name { font-weight: 600; letter-spacing: 0.02em; font-size: 0.94rem; line-height: 1.1; text-transform: uppercase; }
.adm-brand-sub { margin-top: 2px; font-size: 0.66rem; color: var(--adm-muted); letter-spacing: 0.1em; text-transform: uppercase; }

.adm-nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.adm-nav-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--adm-faint);
  padding: 14px 12px 6px;
}
.admin-tab-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--adm-muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.25s var(--adm-ease), color 0.25s var(--adm-ease), border-color 0.25s var(--adm-ease);
}
.admin-tab-item:hover { background: var(--adm-surface-2); color: var(--adm-text); }
.admin-tab-item:focus-visible { outline: 2px solid var(--adm-accent); outline-offset: 2px; }
.admin-tab-item.active {
  color: #ffffff;
  background: var(--adm-accent-soft);
  border-color: rgba(90, 160, 255, 0.32);
}
.admin-tab-item.active .adm-icon { color: var(--adm-accent-2); }

.adm-sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--adm-line);
}
.adm-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: var(--adm-surface-2);
  border: 1px solid var(--adm-line);
}
.adm-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #070b14;
  background: linear-gradient(135deg, #ffffff, #c4d3eb);
  flex: none;
}
.adm-user-name { font-weight: 700; font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-user-meta { font-size: 0.7rem; color: var(--adm-muted); font-family: ui-monospace, Consolas, monospace; }
.adm-user-text { min-width: 0; }

/* ---------- Main ---------- */
/* a light veil over the shader keeps headings and hints readable on the bright rays */
.adm-main {
  min-width: 0;
  padding: 30px clamp(18px, 3vw, 40px) 60px;
  background: linear-gradient(180deg, rgba(3, 8, 24, 0.74) 0%, rgba(3, 8, 24, 0.5) 55%, rgba(3, 8, 24, 0.4) 100%);
}
.adm-inner { max-width: 1240px; margin: 0 auto; }

.adm-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.adm-title { font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.adm-subtitle { margin-top: 6px; font-size: 0.9rem; color: var(--adm-soft); max-width: 640px; line-height: 1.55; }
.adm-conn { display: inline-flex; align-items: center; gap: 8px; font-size: 0.74rem; font-weight: 600; color: var(--adm-ok); margin-bottom: 10px; }
.adm-conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--adm-ok); box-shadow: 0 0 10px var(--adm-ok); }

/* ---------- Buttons / inputs ---------- */
.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid var(--adm-line-strong);
  background: var(--adm-surface-2);
  color: var(--adm-soft);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.25s var(--adm-ease);
}
.adm-btn:hover { background: var(--adm-surface-3); border-color: rgba(255, 255, 255, 0.25); color: #ffffff; transform: translateY(-2px); }
.adm-btn:active { transform: translateY(0); }
.adm-btn:focus-visible { outline: 2px solid var(--adm-accent); outline-offset: 2px; }
.adm-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.adm-btn.primary {
  border: none;
  background: #ffffff;
  color: #070b14;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25), 0 2px 8px rgba(0, 0, 0, 0.4);
}
.adm-btn.primary:hover { background: #f0f5ff; color: #070b14; box-shadow: 0 6px 28px rgba(255, 255, 255, 0.45), 0 4px 12px rgba(0, 0, 0, 0.5); }
.adm-btn.danger { color: var(--adm-danger); border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); }
.adm-btn.danger:hover { background: rgba(248, 113, 113, 0.18); color: #fecaca; }
.adm-btn.block { width: 100%; }

.btn-act {
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid var(--adm-line-strong);
  background: var(--adm-surface-2);
  color: var(--adm-soft);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--adm-ease);
  white-space: nowrap;
}
.btn-act:hover { background: var(--adm-surface-3); color: #fff; }
.btn-act:focus-visible { outline: 2px solid var(--adm-accent); outline-offset: 2px; }
.btn-act.role { color: var(--adm-violet); border-color: rgba(192, 132, 252, 0.4); }
.btn-act.sub { color: var(--adm-ok); border-color: rgba(52, 211, 153, 0.4); }
.btn-act.hwid { color: var(--adm-sky); border-color: rgba(56, 189, 248, 0.4); }
.btn-act.ban { color: var(--adm-warn); border-color: rgba(251, 191, 36, 0.4); }
.btn-act.del { color: var(--adm-danger); border-color: rgba(248, 113, 113, 0.4); }
.btn-act.role:hover { background: rgba(192, 132, 252, 0.18); }
.btn-act.sub:hover { background: rgba(52, 211, 153, 0.18); }
.btn-act.hwid:hover { background: rgba(56, 189, 248, 0.18); }
.btn-act.ban:hover { background: rgba(251, 191, 36, 0.18); }
.btn-act.del:hover { background: rgba(248, 113, 113, 0.18); }

.adm-field { margin-bottom: 16px; }
.adm-field > label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--adm-muted);
}
.adm-input, .adm-select {
  width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--adm-line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--adm-text);
  font: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s var(--adm-ease), box-shadow 0.2s var(--adm-ease), background 0.2s var(--adm-ease);
}
.adm-input::placeholder { color: var(--adm-faint); }
.adm-input:focus, .adm-select:focus {
  border-color: var(--adm-accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}
.adm-select option { background: #0b1226; color: #fff; }
.adm-select-sm { width: auto; min-width: 170px; padding: 9px 12px; font-size: 0.84rem; }

.adm-search { position: relative; flex: 1; max-width: 400px; }
.adm-search .adm-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--adm-faint); pointer-events: none; }
.adm-search .adm-input { padding-left: 39px; }

/* ---------- Surfaces: the site's feature-card look ---------- */
.adm-kpi, .adm-card, .adm-table-wrap, .adm-state {
  position: relative;
  background: var(--adm-surface);
  border: 1px solid var(--adm-line-blue);
  box-shadow: var(--adm-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.adm-kpi::before, .adm-card::before, .adm-state::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(90, 160, 255, 0.35), transparent);
  pointer-events: none;
}

/* ---------- KPI ---------- */
.adm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 26px; }
.adm-kpi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-radius: var(--adm-radius);
  transition: all 0.3s var(--adm-ease);
}
.adm-kpi:hover { transform: translateY(-3px); border-color: rgba(90, 170, 255, 0.38); box-shadow: 0 16px 40px rgba(0, 5, 25, 0.65), 0 0 28px rgba(35, 110, 255, 0.2); }
.adm-kpi-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--adm-muted); }
.adm-kpi-value { margin-top: 6px; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.adm-kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.adm-kpi-icon .adm-icon { width: 20px; height: 20px; }
.tone-violet { background: rgba(192, 132, 252, 0.14); color: var(--adm-violet); }
.tone-sky { background: rgba(56, 189, 248, 0.14); color: var(--adm-sky); }
.tone-ok { background: rgba(52, 211, 153, 0.14); color: var(--adm-ok); }
.tone-warn { background: rgba(251, 191, 36, 0.14); color: var(--adm-warn); }

/* ---------- Panels / cards / tables ---------- */
.admin-tab-panel { display: none; animation: adm-fade 0.3s var(--adm-ease); }
.admin-tab-panel.active { display: block; }
@keyframes adm-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.adm-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.adm-panel-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.adm-panel-desc { font-size: 0.86rem; color: var(--adm-muted); margin-top: 4px; line-height: 1.55; }
.adm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1; justify-content: flex-start; }
.adm-tools .adm-search { flex: 1 1 260px; }

.adm-card { padding: 26px; border-radius: var(--adm-radius); }
.adm-card + .adm-card { margin-top: 18px; }
.adm-card-narrow { max-width: 940px; }

.adm-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 330px);
  min-height: 140px;
  border-radius: var(--adm-radius);
}
.adm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.86rem; }
.adm-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 13px 16px;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--adm-muted);
  background: rgba(10, 14, 28, 0.97);
  border-bottom: 1px solid var(--adm-line);
  white-space: nowrap;
}
.adm-table td { padding: 13px 16px; vertical-align: middle; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.adm-table tbody tr { transition: background 0.2s var(--adm-ease); }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover td { background: rgba(80, 150, 255, 0.05); }
.adm-table .is-banned td { opacity: 0.6; background: rgba(248, 113, 113, 0.05); }
.adm-empty { text-align: center; padding: 38px 16px !important; color: var(--adm-muted); }
.adm-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.adm-mono { font-family: ui-monospace, 'SF Mono', Consolas, monospace; }
.adm-table td.adm-mono { white-space: nowrap; }
.adm-strong { font-weight: 700; color: #fff; }
.adm-sub { font-size: 0.76rem; color: var(--adm-muted); margin-top: 2px; }
.adm-dim { color: var(--adm-faint); }
.adm-ok { color: var(--adm-ok); font-weight: 600; }
.adm-bad { color: var(--adm-danger); font-weight: 600; }
.adm-gold { color: var(--adm-warn); font-weight: 700; }
.adm-action { color: var(--adm-accent-2); font-weight: 700; white-space: nowrap; }

/* Badges */
.admin-badge-role, .adm-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--adm-surface-3);
  border: 1px solid var(--adm-line-strong);
  color: #aab8cc;
  white-space: nowrap;
}
.badge-owner { background: rgba(251, 191, 36, 0.14); border-color: rgba(251, 191, 36, 0.4); color: #fbbf24; }
.badge-admin { background: rgba(96, 165, 250, 0.14); border-color: rgba(96, 165, 250, 0.4); color: #93c5fd; }
.badge-media { background: rgba(56, 189, 248, 0.14); border-color: rgba(56, 189, 248, 0.4); color: #7dd3fc; }
.badge-ok { background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.4); color: #6ee7b7; }

/* Notice */
.adm-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.84rem;
  color: #dbeafe;
  background: var(--adm-accent-soft);
  border: 1px solid var(--adm-line-blue);
}
.adm-hint {
  margin-bottom: 18px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--adm-muted);
  background: var(--adm-surface-2);
  border: 1px dashed var(--adm-line-strong);
}

/* ---------- Key generator ---------- */
.adm-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.adm-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 16px 14px;
  border-radius: 14px;
  text-align: left;
  font: inherit;
  color: var(--adm-text);
  cursor: pointer;
  background: var(--adm-surface-2);
  border: 1px solid var(--adm-line-strong);
  transition: all 0.25s var(--adm-ease);
}
.adm-plan:hover { transform: translateY(-2px); border-color: rgba(90, 170, 255, 0.4); background: rgba(80, 150, 255, 0.07); }
.adm-plan:focus-visible { outline: 2px solid var(--adm-accent); outline-offset: 2px; }
.adm-plan.active {
  border-color: rgba(90, 170, 255, 0.7);
  background: var(--adm-accent-soft);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18), 0 10px 28px rgba(35, 110, 255, 0.18);
}
.adm-plan.active::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--adm-accent-2);
  box-shadow: 0 0 10px var(--adm-accent-2);
}
.adm-plan-name { font-size: 0.92rem; font-weight: 700; padding-right: 16px; }
.adm-plan-dur { font-size: 0.78rem; color: var(--adm-muted); }
.adm-plan-price { margin-top: 6px; font-size: 0.8rem; font-weight: 700; color: var(--adm-accent-2); }

.adm-custom {
  margin-bottom: 8px;
  padding: 16px 16px 4px;
  border-radius: 14px;
  background: var(--adm-surface-2);
  border: 1px solid var(--adm-line);
}
.adm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.adm-chip {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--adm-line-strong);
  background: var(--adm-surface-2);
  color: var(--adm-soft);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--adm-ease);
}
.adm-chip:hover { background: var(--adm-accent-soft); border-color: rgba(90, 170, 255, 0.45); color: #fff; }
.adm-chip:focus-visible { outline: 2px solid var(--adm-accent); outline-offset: 2px; }

.adm-gen-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: end; margin-top: 12px; }
.adm-gen-summary { margin-bottom: 16px; padding: 10px 14px; border-radius: 10px; font-size: 0.86rem; font-weight: 600; color: var(--adm-accent-2); background: var(--adm-accent-soft); border: 1px solid var(--adm-line-blue); }

.adm-keybox { display: flex; flex-direction: column; gap: 8px; }
.adm-keyrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--adm-accent-soft);
  border: 1px solid var(--adm-line-blue);
}
.adm-keyrow > span:first-child { flex: 1; font-family: ui-monospace, Consolas, monospace; font-weight: 800; letter-spacing: 0.04em; color: #dbeafe; overflow-wrap: anywhere; }
.adm-keyrow-meta { font-size: 0.74rem; font-weight: 600; color: var(--adm-muted); white-space: nowrap; }
.adm-placeholder { padding: 18px; text-align: center; font-size: 0.84rem; color: var(--adm-faint); border-radius: 10px; background: var(--adm-surface-2); }

.adm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.adm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.adm-section-title {
  margin: 8px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--adm-line);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--adm-muted);
}
.adm-section-title:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- States ---------- */
.adm-state { max-width: 460px; margin: 12vh auto 0; text-align: center; padding: 36px 30px; border-radius: 22px; }
.adm-state-icon { width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 16px; display: grid; place-items: center; }
.adm-state-icon .adm-icon { width: 26px; height: 26px; }
.adm-state h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 8px; }
.adm-state p { font-size: 0.88rem; color: var(--adm-muted); line-height: 1.6; margin-bottom: 22px; }
.adm-spinner { width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.12); border-top-color: var(--adm-accent); animation: adm-spin 0.8s linear infinite; }
@keyframes adm-spin { to { transform: rotate(360deg); } }

/* ---------- Modals ---------- */
.admin-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 5, 14, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.admin-dialog-overlay.open { display: flex; animation: adm-fade 0.2s var(--adm-ease); }
.admin-dialog-box {
  position: relative;
  width: 100%;
  max-width: 460px;
  padding: 26px;
  border-radius: 18px;
  background: rgba(10, 14, 28, 0.96);
  border: 1px solid var(--adm-line-blue);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7), 0 0 40px rgba(35, 110, 255, 0.12);
}
.adm-dialog-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.adm-dialog-sub { font-size: 0.82rem; color: var(--adm-muted); margin-bottom: 18px; }
.adm-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---------- Toasts ---------- */
.toast-box { position: fixed; right: 22px; bottom: 22px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.adm-toast {
  min-width: 240px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  background: rgba(10, 14, 28, 0.96);
  border: 1px solid var(--adm-accent);
  color: #bfdbfe;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: adm-fade 0.25s var(--adm-ease);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.adm-toast.success { border-color: #10b981; color: #6ee7b7; }
.adm-toast.error { border-color: #ef4444; color: #fca5a5; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  /* minmax(0, ...) lets the tab row scroll instead of stretching the whole page wider than the screen */
  .adm-shell { grid-template-columns: minmax(0, 1fr); }
  .adm-sidebar { min-width: 0; }
  .adm-nav { min-width: 0; }
  .adm-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--adm-line);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
  }
  .adm-brand { padding: 0; }
  .adm-brand-sub, .adm-nav-label, .adm-user-card { display: none; }
  .adm-nav { flex: 1; flex-direction: row; overflow-x: auto; gap: 6px; }
  .admin-tab-item { width: auto; white-space: nowrap; padding: 8px 12px; }
  .adm-sidebar-foot { margin: 0; padding: 0; border: 0; flex-direction: row; flex: none; gap: 6px; }
  .adm-sidebar-foot .adm-btn { width: auto; padding: 8px 10px; }
  .adm-sidebar-foot .adm-btn span { display: none; }
  .adm-table-wrap { max-height: none; }
}
@media (max-width: 640px) {
  .adm-main { padding-top: 20px; }
  .adm-card { padding: 20px 16px; }
  .adm-grid-2, .adm-grid-3, .adm-gen-row { grid-template-columns: 1fr; }
  .adm-search { max-width: none; }
  .adm-brand-name { display: none; }
  .adm-keyrow { flex-wrap: wrap; }
  .adm-select-sm { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
