/* ==========================================================================
   QM567.VIP Admin Control Center — Theme-27 Obsidian / Fiery Orange / Gold
   ========================================================================== */

:root {
  --bg-l00: #141414;
  --bg-l01: #1a1a1a;
  --bg-l02: #202020;
  --bg-l03: #262626;
  --bg-l04: #2e2e2e;
  --bg-l05: #353535;
  --border-subtle: #2b2b2b;
  --border-card: #2e2e2e;
  --border-input: #353535;
  --txt-main: #ffffff;
  --txt-soft: rgba(255, 255, 255, 0.8);
  --txt-muted: #999999;
  --txt-dim: #6b6b6b;
  --orange: #ff5900;
  --orange-600: #db5e26;
  --orange-light: #fc974c;
  --orange-dark-fill: #2d0b03;
  --gold: #ffdc00;
  --gold-soft: #f5c84c;
  --ok: #22c55e;
  --ok-dark: #14532d;
  --danger: #ef4444;
  --danger-dark: #7f1d1d;
  --warn: #f59e0b;
  --cta-grad: linear-gradient(90deg, #ff5900 0%, #ff9d00 55%, #ffdc00 100%);
  --font-main: "Prompt", "Inter", -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;
  --font-display: "Archivo Black", "Prompt", sans-serif;
  --sidebar-w: 248px;
  --topbar-h: 60px;
  --mobile-nav-h: 64px;
  --radius-card: 14px;
  --radius-ctrl: 10px;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  background: var(--bg-l01);
  color: var(--txt-main);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  outline: none;
}

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

img {
  max-width: 100%;
  display: block;
}

/* Custom Dark Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #161616;
}
::-webkit-scrollbar-thumb {
  background: #353535;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4a4a4a;
}

/* ==========================================================================
   1. Admin Auth View (.adm-login-wrap)
   ========================================================================== */

.adm-login-wrap {
  min-height: 100dvh;
  width: 100%;
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 89, 0, 0.16) 0%, transparent 52%),
    radial-gradient(circle at 82% 84%, rgba(255, 220, 0, 0.08) 0%, transparent 45%),
    #141414;
}

/* Low-poly geometric ambient facet grid */
.adm-login-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(125deg, rgba(255, 89, 0, 0.05) 0%, transparent 38%),
    linear-gradient(245deg, rgba(255, 220, 0, 0.04) 0%, transparent 42%),
    linear-gradient(35deg, rgba(255, 255, 255, 0.02) 25%, transparent 25%);
  background-size: 100% 100%, 100% 100%, 96px 96px;
}

.adm-login-card,
.adm-auth-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, #222222 0%, #1c1c1c 100%);
  border: 1px solid #303030;
  border-top: 3px solid var(--orange);
  border-radius: 22px;
  padding: 28px 22px 24px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.72),
    0 -6px 28px rgba(255, 89, 0, 0.24);
  z-index: 2;
}

/* Curved top border halo + subtle geometric facet sheen */
.adm-login-card::before,
.adm-auth-card::before {
  content: "";
  position: absolute;
  top: -70px;
  left: 50%;
  transform: translateX(-50%);
  width: 130%;
  height: 135px;
  background: radial-gradient(ellipse at center, rgba(255, 89, 0, 0.28) 0%, rgba(255, 220, 0, 0.07) 48%, transparent 74%);
  pointer-events: none;
}

.adm-login-card::after,
.adm-auth-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 180px;
  height: 180px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 89, 0, 0.04) 45%, transparent 70%);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  pointer-events: none;
}

.adm-login-header {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 22px;
}

.adm-login-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 89, 0, 0.14);
  border: 1px solid rgba(255, 89, 0, 0.42);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.adm-login-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.03em;
  line-height: 1.15;
  background: var(--cta-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.adm-login-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--txt-muted);
}

.adm-login-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adm-login-err {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 12.5px;
  font-weight: 600;
}

.adm-login-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--txt-muted);
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   2. App Shell, Fixed Sidebar & Topbar (Desktop >= 900px)
   ========================================================================== */

.adm-shell {
  display: flex;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  background: var(--bg-l01);
  overflow-x: clip;
}

.adm-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-l00);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 60;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.adm-sidebar-head {
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: radial-gradient(circle at 0% 0%, rgba(255, 89, 0, 0.14), transparent 70%);
}

.adm-brand {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.adm-brand-wordmark {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.adm-brand-wordmark span {
  color: var(--orange);
}

.adm-gold-pill,
.adm-role-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 220, 0, 0.2), rgba(255, 89, 0, 0.2));
  border: 1px solid rgba(255, 220, 0, 0.45);
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.adm-sidebar-close {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #333333;
  background: #202020;
  color: #cccccc;
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.adm-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.adm-nav-group {
  padding: 10px 10px 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--txt-dim);
}

.adm-nav-item {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--txt-soft);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.adm-nav-item:hover {
  background: #1d1d1d;
  color: #ffffff;
}

.adm-nav-item.active {
  background: linear-gradient(90deg, rgba(255, 89, 0, 0.2) 0%, rgba(45, 11, 3, 0.65) 100%);
  border-color: rgba(255, 89, 0, 0.38);
  color: #ffffff;
  font-weight: 700;
}

/* Orange active left accent pill */
.adm-nav-item.active::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 7px;
  bottom: 7px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--orange);
  box-shadow: 0 0 10px rgba(255, 89, 0, 0.75);
}

.adm-nav-ico {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
  color: var(--txt-muted);
}

.adm-nav-item.active .adm-nav-ico {
  color: var(--orange-light);
}

.adm-nav-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-nav-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--orange);
  color: #111111;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.adm-nav-badge.gold {
  background: var(--gold);
  color: #111111;
}

.adm-nav-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 8px 6px;
}

.adm-nav-ext {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  margin-top: 4px;
  border-radius: 10px;
  background: #1b1b1b;
  border: 1px dashed #353535;
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 700;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.adm-nav-ext:hover {
  border-color: var(--orange);
  background: rgba(255, 89, 0, 0.08);
}

.adm-sidebar-foot {
  padding: 12px;
  border-top: 1px solid var(--border-subtle);
  background: #121212;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.adm-admin-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.adm-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff5900, #ffdc00);
  color: #111111;
  font-weight: 900;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.adm-admin-meta {
  min-width: 0;
  flex: 1;
}

.adm-admin-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-admin-role {
  font-size: 11px;
  color: var(--txt-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Workspace */
.adm-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  width: calc(100% - var(--sidebar-w));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-l01);
}

.adm-topbar {
  height: var(--topbar-h);
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0 22px;
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.adm-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.adm-burger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid #323232;
  background: #202020;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.adm-topbar-title-wrap {
  min-width: 0;
}

.adm-topbar-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-topbar-sub {
  font-size: 11.5px;
  color: var(--txt-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.adm-topbar-search {
  width: 210px;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  background: #232323;
  border: 1px solid #333333;
  color: #ffffff;
  font-size: 12.5px;
  transition: border-color 0.16s ease, width 0.16s ease;
}

.adm-topbar-search:focus {
  border-color: var(--orange);
}

.adm-topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--orange-dark-fill);
  border: 1px solid rgba(255, 89, 0, 0.45);
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 700;
}

.adm-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  flex-shrink: 0;
}

.adm-content {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 22px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* Mobile Drawer Backdrop & Bottom Quick Nav (hidden on desktop) */
.adm-drawer-bg {
  display: none;
}

.adm-mobile-nav {
  display: none;
}

/* ==========================================================================
   3. Cards, Grids & KPI Stat Tiles
   ========================================================================== */

.adm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 14px;
  width: 100%;
}

.adm-kpi-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 89, 0, 0.16) 0%, rgba(255, 220, 0, 0.05) 35%, transparent 65%),
    var(--bg-l02);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.adm-kpi-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 76px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), var(--gold));
  opacity: 0.85;
}

.adm-kpi-card.clickable,
button.adm-kpi-card,
a.adm-kpi-card {
  cursor: pointer;
}

.adm-kpi-card.clickable:hover,
button.adm-kpi-card:hover,
a.adm-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 89, 0, 0.55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), 0 0 18px rgba(255, 89, 0, 0.14);
}

.adm-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.adm-kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.adm-kpi-ico {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 89, 0, 0.14);
  border: 1px solid rgba(255, 89, 0, 0.3);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.adm-kpi-val {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.15;
  color: #ffffff;
  word-break: break-word;
}

.adm-kpi-val.gold {
  color: var(--gold);
}

.adm-kpi-val.orange {
  color: var(--orange-light);
}

.adm-kpi-val.ok {
  color: var(--ok);
}

.adm-kpi-sub {
  font-size: 12px;
  color: var(--txt-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.adm-kpi-link {
  color: var(--orange-light);
  font-weight: 700;
  font-size: 11.5px;
}

.adm-card {
  background: var(--bg-l02);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 16px;
  min-width: 0;
  width: 100%;
}

.adm-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.adm-card-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.adm-card-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--txt-muted);
}

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

.adm-grid-2 > .adm-card {
  min-width: 0;
  overflow: hidden;
}

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

/* ==========================================================================
   4. Theme-27 Tabs, Toolbars & Filter Chips
   ========================================================================== */

.adm-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  max-width: 100%;
}

.adm-tabs::-webkit-scrollbar {
  display: none;
}

.adm-tab {
  position: relative;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--txt-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.16s ease;
}

.adm-tab:hover {
  color: #ffffff;
}

.adm-tab.active {
  color: var(--gold);
}

.adm-tab.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--orange);
  box-shadow: 0 0 10px rgba(255, 89, 0, 0.7);
}

.adm-tab-count {
  padding: 1px 6px;
  border-radius: 999px;
  background: #2a2a2a;
  color: var(--txt-soft);
  font-size: 11px;
  font-weight: 700;
}

.adm-tab.active .adm-tab-count {
  background: rgba(255, 89, 0, 0.25);
  color: var(--gold);
}

.adm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.adm-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.adm-chip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.adm-chip {
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: #262626;
  border: 1px solid #353535;
  color: var(--txt-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.adm-chip.active {
  background: var(--orange-dark-fill);
  border-color: var(--orange);
  color: var(--gold);
}

/* ==========================================================================
   5. Tables & Status Pills
   ========================================================================== */

.adm-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #1b1b1b;
}

.adm-ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  min-width: 640px;
}

.adm-table.adm-table-compact {
  min-width: 0;
}

.adm-table.adm-table-compact th,
.adm-table.adm-table-compact td,
.adm-table-compact thead th,
.adm-table-compact tbody td {
  padding: 8px 9px;
  font-size: 12.5px;
  white-space: nowrap;
}

.adm-table thead th {
  background: #262626;
  color: var(--txt-soft);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid #333333;
  white-space: nowrap;
}

.adm-table thead th:first-child {
  border-top-left-radius: 10px;
}

.adm-table thead th:last-child {
  border-top-right-radius: 10px;
}

.adm-table tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid #262626;
  color: var(--txt-main);
  vertical-align: middle;
}

.adm-table tbody tr:last-child td {
  border-bottom: none;
}

.adm-table tbody tr:hover td {
  background: #252525;
}

.adm-table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.adm-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  background: #2a2a2a;
  color: var(--txt-soft);
  border: 1px solid #3a3a3a;
}

.adm-pill.ok {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.42);
  color: #86efac;
}

.adm-pill.warn {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fde68a;
}

.adm-pill.err {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.adm-pill.gold {
  background: rgba(255, 220, 0, 0.16);
  border-color: rgba(255, 220, 0, 0.45);
  color: var(--gold);
}

.adm-pill.orange {
  background: var(--orange-dark-fill);
  border-color: rgba(255, 89, 0, 0.55);
  color: var(--orange-light);
}

.adm-pill.muted {
  background: #242424;
  border-color: #343434;
  color: var(--txt-muted);
}

.adm-pill.info {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.48);
  color: #93c5fd;
}

/* ==========================================================================
   6. Forms, Inputs & Theme-27 Toggle Switches
   ========================================================================== */

.adm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.adm-form-full {
  grid-column: 1 / -1;
}

.adm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.adm-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--txt-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.adm-input,
.adm-select,
.adm-field input,
.adm-field select {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border-radius: var(--radius-ctrl);
  background: var(--bg-l03);
  border: 1px solid var(--border-input);
  color: #ffffff;
  font-size: 13.5px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.adm-input-sm {
  height: 36px;
  padding: 0 11px;
  font-size: 12.5px;
}

.adm-textarea,
.adm-field textarea {
  width: 100%;
  min-height: 92px;
  padding: 10px 13px;
  border-radius: var(--radius-ctrl);
  background: var(--bg-l03);
  border: 1px solid var(--border-input);
  color: #ffffff;
  font-size: 13.5px;
  resize: vertical;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.adm-input::placeholder,
.adm-textarea::placeholder,
.adm-field input::placeholder,
.adm-field textarea::placeholder {
  color: var(--txt-dim);
}

.adm-input:focus,
.adm-select:focus,
.adm-textarea:focus,
.adm-field input:focus,
.adm-field select:focus,
.adm-field textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 89, 0, 0.16);
}

.adm-help {
  font-size: 11.5px;
  color: var(--txt-muted);
}

/* Switch Row */
.adm-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1b1b1b;
  border: 1px solid #2b2b2b;
}

.adm-switch-info {
  min-width: 0;
  flex: 1;
}

.adm-switch-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.adm-switch-desc {
  font-size: 11.5px;
  color: var(--txt-muted);
  margin-top: 2px;
}

/* Theme-27 Toggle Switch */
.adm-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

.adm-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.adm-switch-track,
.adm-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #333333;
  border: 1px solid #444444;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.adm-switch-track::after,
.adm-switch-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e5e5e5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background 0.18s ease;
}

.adm-switch input:checked + .adm-switch-track,
.adm-switch input:checked + .adm-switch-slider,
.adm-switch.on .adm-switch-track,
.adm-switch.on .adm-switch-slider {
  background: linear-gradient(90deg, #ff5900 0%, #ff8c00 100%);
  border-color: #ff9d4d;
  box-shadow: 0 0 12px rgba(255, 89, 0, 0.42);
}

.adm-switch input:checked + .adm-switch-track::after,
.adm-switch input:checked + .adm-switch-slider::after,
.adm-switch.on .adm-switch-track::after,
.adm-switch.on .adm-switch-slider::after {
  transform: translateX(22px);
  background: #ffffff;
}

/* Fallback if .adm-switch is used directly as a button without inner track span */
button.adm-switch {
  border-radius: 999px;
  background: #333333;
  border: 1px solid #444444;
  padding: 0;
}

button.adm-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e5e5e5;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

button.adm-switch.on,
button.adm-switch[aria-checked="true"] {
  background: linear-gradient(90deg, #ff5900 0%, #ff8c00 100%);
  border-color: #ff9d4d;
  box-shadow: 0 0 12px rgba(255, 89, 0, 0.42);
}

button.adm-switch.on::after,
button.adm-switch[aria-checked="true"]::after {
  transform: translateX(22px);
  background: #ffffff;
}

/* ==========================================================================
   7. Buttons (Primary, Slant, Ok, Danger, Ghost)
   ========================================================================== */

.adm-btn {
  height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.adm-btn:active {
  transform: scale(0.98);
}

.adm-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.adm-btn-sm {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}

.adm-btn-lg {
  height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 14.5px;
}

.adm-btn-block {
  width: 100%;
}

.adm-btn-primary {
  background: var(--cta-grad);
  color: #111111;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(255, 89, 0, 0.28);
}

.adm-btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.adm-btn-slant {
  transform: skewX(-14deg);
  border-radius: 7px;
  background: var(--orange);
  color: #111111;
  font-weight: 800;
}

.adm-btn-slant > span {
  transform: skewX(14deg);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.adm-btn-slant.gold {
  background: var(--gold);
  color: #111111;
}

.adm-btn-ok {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.adm-btn-ok:hover:not(:disabled) {
  background: var(--ok);
  border-color: var(--ok);
  color: #052e16;
}

.adm-btn-danger {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.adm-btn-danger:hover:not(:disabled) {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.adm-btn-ghost {
  background: #2b2b2b;
  border-color: #3a3a3a;
  color: #ffffff;
}

.adm-btn-ghost:hover:not(:disabled) {
  background: #343434;
  border-color: #4a4a4a;
}

.adm-btn-warn {
  background: var(--orange-dark-fill);
  border-color: rgba(255, 89, 0, 0.55);
  color: var(--orange-light);
}

/* ==========================================================================
   8. Live Support Desk (.adm-support-split)
   ========================================================================== */

.adm-support-split {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  height: calc(100dvh - 148px);
  min-height: 520px;
  width: 100%;
}

.adm-thread-pane {
  background: var(--bg-l02);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.adm-thread-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adm-thread-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.adm-thread-item {
  width: 100%;
  padding: 11px 12px;
  border-radius: 11px;
  background: #1b1b1b;
  border: 1px solid #292929;
  color: var(--txt-main);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.adm-thread-item:hover {
  background: #242424;
}

.adm-thread-item.active {
  background: linear-gradient(90deg, rgba(255, 89, 0, 0.16) 0%, #241914 100%);
  border-color: rgba(255, 89, 0, 0.55);
}

.adm-thread-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.adm-thread-user {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-thread-time {
  font-size: 11px;
  color: var(--txt-muted);
  flex-shrink: 0;
}

.adm-thread-preview {
  font-size: 12px;
  color: var(--txt-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-chat-pane {
  background: var(--bg-l02);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.adm-chat-head {
  padding: 12px 16px;
  background: #1c1c1c;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.adm-chat-back {
  display: none;
}

.adm-chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #171717;
}

.adm-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 76%;
  gap: 4px;
}

.adm-msg-row.user {
  align-self: flex-start;
}

.adm-msg-row.admin {
  align-self: flex-end;
  align-items: flex-end;
}

.adm-msg-bubble {
  padding: 10px 13px;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.adm-msg-row.user .adm-msg-bubble {
  background: #262626;
  border: 1px solid #353535;
  color: #ffffff;
  border-bottom-left-radius: 4px;
}

.adm-msg-row.admin .adm-msg-bubble {
  background: linear-gradient(135deg, #3c1808 0%, #2d0b03 100%);
  border: 1px solid rgba(255, 89, 0, 0.55);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.adm-msg-img {
  margin-top: 6px;
  max-width: 240px;
  max-height: 200px;
  border-radius: 10px;
  border: 1px solid #3a3a3a;
  object-fit: cover;
  cursor: pointer;
}

.adm-msg-meta {
  font-size: 10.5px;
  color: var(--txt-dim);
}

.adm-chat-compose {
  padding: 12px 14px;
  background: #1d1d1d;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}

.adm-chat-compose .adm-input {
  height: 40px;
  flex: 1;
  min-width: 0;
}

/* ==========================================================================
   9. Modals & Toasts
   ========================================================================== */

.adm-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.adm-modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--bg-l02);
  border: 1px solid #3a3a3a;
  border-top: 3px solid var(--orange);
  border-radius: 18px;
  padding: 18px;
  position: relative;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.78),
    0 -4px 22px rgba(255, 89, 0, 0.22);
}

.adm-modal-card.wide {
  max-width: 720px;
}

.adm-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.adm-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.adm-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #3d3d3d;
  background: #2a2a2a;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.adm-modal-close:hover {
  border-color: var(--orange);
  color: var(--gold);
}

.adm-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.adm-modal-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.adm-toast-root {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 140;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 24px));
  pointer-events: none;
}

.adm-toast {
  pointer-events: auto;
  padding: 11px 14px;
  border-radius: 12px;
  background: #232323;
  border: 1px solid #3b3b3b;
  border-left: 4px solid var(--orange);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

.adm-toast.ok {
  border-left-color: var(--ok);
  background: #142a1d;
}

.adm-toast.err {
  border-left-color: var(--danger);
  background: #2d1414;
}

.adm-toast.warn {
  border-left-color: var(--warn);
}

/* ==========================================================================
   10. Utility Helpers
   ========================================================================== */

.adm-kv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adm-kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #1a1a1a;
  border: 1px solid #282828;
  font-size: 12.5px;
}

.adm-kv-k {
  color: var(--txt-muted);
}

.adm-kv-v {
  color: #ffffff;
  font-weight: 700;
  text-align: right;
  word-break: break-all;
}

.adm-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.adm-img-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #353535;
  background: #141414;
  flex-shrink: 0;
}

.adm-empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--txt-muted);
  font-size: 13px;
}

.adm-loading {
  padding: 28px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--txt-muted);
  font-size: 13px;
}

.adm-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #383838;
  border-top-color: var(--orange);
  animation: admSpin 0.75s linear infinite;
}

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

/* ==========================================================================
   11. Responsive Mobile & Tablet (< 900px)
   ========================================================================== */

@media (max-width: 899px) {
  .adm-sidebar {
    transform: translateX(-100%);
    width: 272px;
    max-width: 84vw;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.7);
  }

  .adm-sidebar.open {
    transform: translateX(0);
  }

  .adm-sidebar-close {
    display: inline-flex;
  }

  .adm-drawer-bg {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .adm-drawer-bg.open {
    opacity: 1;
    pointer-events: auto;
  }

  .adm-main {
    margin-left: 0;
    width: 100%;
    padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  }

  .adm-topbar {
    padding: 0 10px;
    height: 54px;
    gap: 8px;
  }

  .adm-topbar-left {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
    overflow: hidden;
  }

  .adm-burger {
    display: inline-flex;
  }

  .adm-topbar-sub {
    display: none;
  }

  .adm-topbar-title {
    font-size: 14px;
  }

  .adm-topbar-actions {
    gap: 5px;
    flex-shrink: 0;
  }

  .adm-topbar-actions .adm-btn {
    height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }

  #adm-top-pwd,
  #adm-top-refresh span,
  #adm-top-logout span {
    display: none;
  }

  .adm-topbar-search {
    display: none;
  }

  .adm-topbar-badge {
    display: none;
  }

  .adm-content {
    padding: 14px 12px 24px;
    gap: 12px;
  }

  .adm-grid-2,
  .adm-grid-3 {
    grid-template-columns: 1fr;
  }

  /* Support Desk single-column toggle on mobile */
  .adm-support-split {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 460px;
  }

  .adm-support-split .adm-chat-pane {
    display: none;
    min-height: 480px;
  }

  .adm-support-split.chat-active .adm-thread-pane {
    display: none;
  }

  .adm-support-split.chat-active .adm-chat-pane {
    display: flex;
  }

  .adm-chat-back {
    display: inline-flex;
  }

  .adm-msg-row {
    max-width: 88%;
  }

  /* Theme-27 Curved Bottom Quick-Nav Bar (5 items: Dashboard, Users, Orders, Games, Controls) */
  .adm-mobile-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: linear-gradient(180deg, #211d1b 0%, #141414 100%);
    border-top: 1px solid rgba(255, 89, 0, 0.35);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.72), 0 -2px 14px rgba(255, 89, 0, 0.16);
    z-index: 48;
  }

  .adm-mnav-item {
    height: 100%;
    background: transparent;
    border: none;
    color: #8b8b8b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    min-width: 0;
  }

  .adm-mnav-item.active {
    color: var(--orange);
    font-weight: 800;
  }

  .adm-mnav-item.active::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    border-radius: 999px;
    background: var(--orange);
    box-shadow: 0 0 8px rgba(255, 89, 0, 0.7);
  }

  .adm-mnav-ico {
    font-size: 16px;
    line-height: 1;
  }

  .adm-mnav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .adm-mnav-badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 18px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--orange);
    color: #111111;
    font-size: 9.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 699px) {
  .adm-form-grid {
    grid-template-columns: 1fr;
  }

  .adm-card {
    padding: 13px;
  }

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

  .adm-kpi-card {
    padding: 12px;
  }

  .adm-kpi-val {
    font-size: 19px;
  }

  .adm-toast-root {
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

@media (max-width: 379px) {
  .adm-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   12. Multi-Site Picker, Read-Only Banner, Websites, Team & Providers DnD
   ========================================================================== */

.adm-site-picker-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px 3px 4px;
  border-radius: 10px;
  background: #1f1f1f;
  border: 1px solid #353535;
  max-width: 100%;
  min-width: 0;
}

.adm-site-select {
  height: 28px;
  min-width: 150px;
  max-width: 220px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid #3b3b3b;
  background: #282828;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.adm-site-select:focus {
  border-color: var(--orange);
}

.adm-readonly-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 22px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.14) 0%, rgba(245, 158, 11, 0.14) 100%);
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  font-size: 12.5px;
  font-weight: 600;
}

.adm-readonly-banner strong {
  color: #ffffff;
}

.adm-scope-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 11px;
  background: linear-gradient(90deg, rgba(255, 89, 0, 0.12) 0%, rgba(255, 220, 0, 0.06) 100%);
  border: 1px solid rgba(255, 89, 0, 0.32);
  font-size: 12.5px;
  color: var(--txt-soft);
}

.adm-scope-banner strong {
  color: var(--gold);
}

/* Websites Manager Grid */
.adm-sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  gap: 16px;
  width: 100%;
}

.site-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 89, 0, 0.12) 0%, transparent 55%),
    var(--bg-l02);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.site-card.active-site {
  border-color: rgba(255, 89, 0, 0.65);
  box-shadow: 0 0 0 1px rgba(255, 89, 0, 0.25), 0 10px 24px rgba(0, 0, 0, 0.35);
}

.site-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.site-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  word-break: break-word;
}

.site-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--txt-muted);
}

.site-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.site-stat-box {
  padding: 8px 10px;
  border-radius: 10px;
  background: #181818;
  border: 1px solid #292929;
  min-width: 0;
}

.site-stat-k {
  font-size: 10.5px;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.site-stat-v {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-card-toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.site-mini-tog {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #1b1b1b;
  border: 1px solid #2b2b2b;
  font-size: 12px;
  font-weight: 600;
  color: var(--txt-soft);
}

.site-mini-tog .adm-switch {
  width: 40px;
  height: 22px;
}

.site-mini-tog .adm-switch-track::after {
  width: 16px;
  height: 16px;
}

.site-mini-tog .adm-switch input:checked + .adm-switch-track::after {
  transform: translateX(18px);
}

.site-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
}

/* Team & Access */
.adm-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 14px;
}

.adm-team-card {
  background: var(--bg-l02);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
}

.adm-team-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.adm-team-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.adm-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.adm-site-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 7px;
}

.adm-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 7px;
}

.adm-check-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #1a1a1a;
  border: 1px solid #2d2d2d;
  font-size: 12px;
  font-weight: 600;
  color: var(--txt-soft);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.adm-check-tile.checked {
  background: rgba(255, 89, 0, 0.12);
  border-color: rgba(255, 89, 0, 0.5);
  color: #ffffff;
}

.adm-check-tile input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--orange);
  flex-shrink: 0;
  margin: 0;
}

/* Providers Drag & Drop List */
.adm-prov-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adm-prov-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #1b1b1b;
  border: 1px solid #2c2c2c;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.adm-prov-row:hover {
  border-color: #3d3d3d;
  background: #212121;
}

.adm-prov-row.dragging {
  opacity: 0.45;
  border-style: dashed;
  border-color: var(--orange);
}

.adm-prov-row.drag-over {
  border-color: var(--gold);
  background: rgba(255, 89, 0, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 220, 0, 0.35);
}

.adm-prov-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.adm-drag-handle {
  width: 28px;
  height: 32px;
  border-radius: 7px;
  background: #262626;
  border: 1px solid #353535;
  color: var(--txt-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  font-size: 14px;
  flex-shrink: 0;
  user-select: none;
}

.adm-drag-handle:active {
  cursor: grabbing;
  color: var(--gold);
  border-color: var(--orange);
}

.adm-pos-input {
  width: 56px;
  height: 30px;
  padding: 0 6px;
  border-radius: 7px;
  background: #262626;
  border: 1px solid #383838;
  color: var(--gold);
  font-weight: 800;
  font-size: 12px;
  text-align: center;
  flex-shrink: 0;
}

.adm-prov-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.adm-order-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.adm-order-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid #383838;
  background: #262626;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.adm-order-btn:hover:not(:disabled) {
  border-color: var(--orange);
  color: var(--gold);
}

.adm-order-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 899px) {
  .adm-topbar {
    height: auto;
    min-height: 54px;
    padding: 7px 10px;
    flex-wrap: wrap;
    gap: 7px;
  }

  .adm-topbar-left {
    flex: 1 1 160px;
  }

  .adm-topbar-actions {
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
  }

  .adm-site-picker-wrap {
    flex: 1 1 210px;
    min-width: 0;
  }

  .adm-site-select {
    flex: 1 1 auto;
    min-width: 110px;
    padding: 0 22px 0 8px;
    max-width: 100%;
    width: 100%;
  }

  .adm-readonly-banner {
    padding: 8px 12px;
    font-size: 12px;
  }

  .adm-prov-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .adm-prov-right {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 479px) {
  .site-card-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .site-card-toggles {
    grid-template-columns: 1fr;
  }
}
