/* ==========================================================================
   Smart VLE — Admin Console UI Layer
   Loaded AFTER style.css + dashboard.css on /admin/* pages.
   Prefix: .adm-*  (new components) + safe overrides of base classes.
   ========================================================================== */

:root {
  --adm-ink: #0b1220;
  --adm-ink-2: #1e293b;
  --adm-line: #e6ebf2;
  --adm-line-soft: #f1f5f9;
  --adm-lime: #bbf451;
  --adm-lime-2: #a3e635;
  --adm-lime-deep: #3f6212;
  --adm-forest: #0b2a1e;
  --adm-forest-2: #123829;
  --adm-emerald: #10b981;
  --adm-violet: #7c3aed;
  --adm-amber: #f59e0b;
  --adm-rose: #ef4444;
  --adm-sky: #0ea5e9;
  --adm-r-xl: 22px;
  --adm-r-lg: 16px;
  --adm-r-md: 12px;
  --adm-r-sm: 9px;
  --adm-sh-1: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .03);
  --adm-sh-2: 0 4px 16px -4px rgba(15, 23, 42, .08), 0 2px 6px -2px rgba(15, 23, 42, .04);
  --adm-sh-3: 0 18px 44px -14px rgba(15, 23, 42, .18), 0 6px 18px -8px rgba(15, 23, 42, .08);
  --adm-sh-lime: 0 6px 20px -6px rgba(187, 244, 81, .55);
}

/* ---------- base surface ------------------------------------------------ */
body.adm-body {
  background:
    radial-gradient(900px 420px at 100% -8%, rgba(187, 244, 81, .16), transparent 60%),
    radial-gradient(700px 380px at -6% 4%, rgba(14, 165, 233, .07), transparent 62%),
    #f6f8fb;
}

.adm-body .app-content {
  max-width: 100% !important;
  padding: 18px 24px 48px;
  box-sizing: border-box;
}

.adm-body .app-topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--adm-line, #e2e8f0);
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 8px 24px !important;
  min-height: 58px !important;
  height: 58px !important;
  gap: 14px !important;
  box-sizing: border-box !important;
}

.topbar-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 99px;
  padding: 6px 14px;
  width: 320px;
  max-width: 100%;
  transition: all 0.15s ease;
}

.topbar-search-box:focus-within {
  border-color: #10b981;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.topbar-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.78rem;
  color: #0f172a;
  width: 100%;
}

.topbar-search-kbd {
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}

.topbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
  flex-shrink: 0 !important;
}

.topbar-bell-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s ease;
}
.topbar-bell-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.topbar-bell-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

@media (max-width: 1100px) {
  .topbar-search-box {
    width: 220px;
  }
}

@media (max-width: 900px) {
  .topbar-search-box {
    display: none;
  }
}

@media (max-width: 768px) {
  .adm-body .app-topbar {
    padding: 6px 14px !important;
    gap: 8px !important;
  }
  .adm-body .app-content {
    padding: 12px 14px 30px !important;
  }
  .adm-body .user-name-label small {
    display: none;
  }
}

/* ---------- form control padding fix (base assumes a left icon) ---------- */
.adm-body .form-group .form-control:not(.has-icon),
.adm-body .modal-body .form-control:not(.has-icon),
.adm-body .adm-field .form-control:not(.has-icon) {
  padding-left: 14px;
}

.adm-body select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 38px !important;
  cursor: pointer;
}

.adm-body textarea.form-control { line-height: 1.6; resize: vertical; }

.adm-body .form-control:hover { border-color: #c9d4e0; }

/* ==========================================================================
   PAGE HERO
   ========================================================================== */
.adm-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--adm-r-xl);
  padding: 26px 28px;
  margin-bottom: 22px;
  color: #fff;
  background: linear-gradient(122deg, #07130e 0%, #0b2a1e 46%, #14452f 100%);
  box-shadow: var(--adm-sh-3);
  isolation: isolate;
}

.adm-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(680px 320px at 88% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(680px 320px at 88% 0%, #000 0%, transparent 78%);
  z-index: -1;
}

.adm-hero::after {
  content: '';
  position: absolute;
  width: 460px;
  height: 460px;
  right: -120px;
  top: -230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(187, 244, 81, .34), rgba(187, 244, 81, 0) 66%);
  filter: blur(6px);
  z-index: -1;
  animation: admFloat 11s ease-in-out infinite;
}

@keyframes admFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-26px, 22px, 0) scale(1.07); }
}

.adm-hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}

.adm-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #d9f99d;
  background: rgba(187, 244, 81, .12);
  border: 1px solid rgba(187, 244, 81, .26);
  padding: 5px 12px;
  border-radius: 99px;
  margin-bottom: 13px;
}

.adm-hero-title {
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.16;
  margin-bottom: 7px;
}

.adm-hero-title em {
  font-style: normal;
  color: var(--adm-lime);
}

.adm-hero-sub {
  font-size: .875rem;
  color: #9fb3c8;
  max-width: 62ch;
  line-height: 1.6;
}

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

.adm-hero-clock {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--adm-r-md);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.adm-hero-clock .ck-time {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  line-height: 1.1;
}

.adm-hero-clock .ck-date {
  font-size: .7rem;
  color: #9fb3c8;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* compact hero — one-breath banner instead of a full-screen block */
.adm-hero.compact { padding: 15px 20px; margin-bottom: 14px; box-shadow: var(--adm-sh-2); }
.adm-hero.compact::after { width: 300px; height: 300px; right: -110px; top: -190px; }
.adm-hero.compact .adm-hero-eyebrow { margin-bottom: 8px; padding: 4px 10px; font-size: .62rem; }
.adm-hero.compact .adm-hero-title { font-size: clamp(1.12rem, 1.9vw, 1.42rem); margin-bottom: 4px; }
.adm-hero.compact .adm-hero-sub { font-size: .78rem; line-height: 1.45; max-width: 72ch; }
.adm-hero.compact .adm-hero-actions { margin-top: 11px; gap: 7px; }
.adm-hero.compact .adm-hero-actions .adm-btn { padding: 7px 12px; font-size: .78rem; }
.adm-hero.compact .adm-hero-clock { padding: 8px 12px; gap: 10px; border-radius: var(--adm-r-md); }
.adm-hero.compact .adm-hero-clock .ck-time { font-size: 1.02rem; }
.adm-hero.compact .adm-hero-clock .ck-date { font-size: .62rem; }
.adm-hero.compact .adm-hero-inner { gap: 14px; align-items: center; }

/* hero buttons */
.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: .845rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--adm-r-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
  white-space: nowrap;
}

.adm-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.adm-btn:active { transform: translateY(1px) scale(.99); }

.adm-btn-lime {
  background: linear-gradient(135deg, #cdf86a, var(--adm-lime) 55%, #a3e635);
  color: #1a2e05;
  box-shadow: var(--adm-sh-lime);
}
.adm-btn-lime:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -6px rgba(187, 244, 81, .7); }

.adm-btn-ghost {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .18);
  color: #e8f5ff;
}
.adm-btn-ghost:hover { background: rgba(255, 255, 255, .15); transform: translateY(-2px); }

.adm-btn-solid {
  background: #0f172a;
  color: #fff;
  box-shadow: var(--adm-sh-2);
}
.adm-btn-solid:hover { background: #1e293b; transform: translateY(-2px); box-shadow: var(--adm-sh-3); }

.adm-btn-outline {
  background: #fff;
  border-color: var(--adm-line);
  color: var(--adm-ink-2);
}
.adm-btn-outline:hover { border-color: #cbd5e1; background: #f8fafc; transform: translateY(-1px); }

.adm-btn-emerald { background: #059669; color: #fff; }
.adm-btn-emerald:hover { background: #047857; transform: translateY(-1px); }

.adm-btn-rose { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.adm-btn-rose:hover { background: #fecaca; }

.adm-btn-sm { font-size: .775rem; padding: 7px 13px; border-radius: var(--adm-r-sm); }
.adm-btn-xs { font-size: .72rem; padding: 5px 10px; border-radius: 8px; gap: 5px; }

/* ==========================================================================
   KPI / STAT CARDS
   ========================================================================== */
.adm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

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

.adm-kpi {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-r-lg);
  padding: 13px 15px;
  box-shadow: var(--adm-sh-1);
  transition: transform .22s cubic-bezier(.2, .8, .3, 1), box-shadow .22s ease, border-color .22s ease;
}

.adm-kpi::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--kpi-accent, var(--adm-lime-2));
  opacity: .85;
  transition: width .22s ease;
}

.adm-kpi::after {
  content: '';
  position: absolute;
  width: 92px;
  height: 92px;
  right: -34px;
  top: -40px;
  border-radius: 50%;
  background: var(--kpi-glow, rgba(163, 230, 53, .16));
  transition: transform .35s ease;
}

.adm-kpi:hover { transform: translateY(-4px); box-shadow: var(--adm-sh-3); border-color: #dbe3ec; }
.adm-kpi:hover::before { width: 5px; }
.adm-kpi:hover::after { transform: scale(1.22); }

.adm-kpi-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.adm-kpi-ico {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--kpi-chip-bg, #f1f5f9);
  color: var(--kpi-accent, #334155);
}
.adm-kpi-ico svg { width: 16px; height: 16px; stroke-width: 2; }

.adm-kpi-label {
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--adm-line) ;
  color: #8fa0b5;
}

.adm-kpi-value {
  position: relative;
  z-index: 1;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1;
  color: var(--adm-ink);
  font-variant-numeric: tabular-nums;
}

.adm-kpi-foot {
  position: relative;
  z-index: 1;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed var(--adm-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: .72rem;
  color: #64748b;
}

.adm-kpi-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.adm-mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f6f8fb;
  border: 1px solid var(--adm-line-soft);
  border-radius: 99px;
  padding: 2px 8px;
  font-size: .685rem;
  font-weight: 700;
  color: #475569;
}
.adm-mini-chip b { color: var(--adm-ink); font-weight: 800; }

/* segmented meter inside a KPI */
.adm-segs { display: flex; gap: 3px; height: 5px; border-radius: 99px; overflow: hidden; }
.adm-segs i { display: block; height: 100%; border-radius: 99px; background: var(--adm-line); }
.adm-segs i.on { background: var(--kpi-accent, var(--adm-lime-2)); }

/* accent themes */
.adm-kpi.t-lime   { --kpi-accent: #65a30d; --kpi-glow: rgba(187, 244, 81, .22); --kpi-chip-bg: #f2fcd9; }
.adm-kpi.t-emerald{ --kpi-accent: #059669; --kpi-glow: rgba(16, 185, 129, .16); --kpi-chip-bg: #d9f7ea; }
.adm-kpi.t-sky    { --kpi-accent: #0284c7; --kpi-glow: rgba(14, 165, 233, .16); --kpi-chip-bg: #ddf1fd; }
.adm-kpi.t-amber  { --kpi-accent: #d97706; --kpi-glow: rgba(245, 158, 11, .17); --kpi-chip-bg: #fdf0d5; }
.adm-kpi.t-violet { --kpi-accent: #7c3aed; --kpi-glow: rgba(124, 58, 237, .15); --kpi-chip-bg: #ece2fd; }
.adm-kpi.t-rose   { --kpi-accent: #e11d48; --kpi-glow: rgba(244, 63, 94, .14); --kpi-chip-bg: #ffe4e8; }

/* ==========================================================================
   PANELS
   ========================================================================== */
.adm-panel {
  background: #fff;
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-r-lg);
  box-shadow: var(--adm-sh-1);
  overflow: hidden;
}

.adm-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--adm-line-soft);
  background: linear-gradient(180deg, #fdfefe, #f9fbfd);
}

.adm-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .97rem;
  font-weight: 800;
  color: var(--adm-ink);
  letter-spacing: -.015em;
}

.adm-panel-title .ttl-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #0f172a;
  color: var(--adm-lime);
  flex-shrink: 0;
}
.adm-panel-title .ttl-ico svg { width: 15px; height: 15px; stroke-width: 2.1; }
.adm-panel-title .ttl-count {
  font-size: .7rem;
  font-weight: 800;
  background: #f1f5f9;
  color: #475569;
  border-radius: 99px;
  padding: 2px 9px;
}

.adm-panel-sub {
  font-size: .775rem;
  color: #7b8ba0;
  margin-top: 3px;
  padding-left: 40px;
}

.adm-panel-body { padding: 18px 20px; }
.adm-panel-body.flush { padding: 0; }

.adm-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.adm-split-eq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

/* ==========================================================================
   TOOLBAR: search + filter pills
   ========================================================================== */
.adm-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.adm-search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 380px;
}

.adm-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
}

.adm-search input {
  width: 100%;
  font-family: inherit;
  font-size: .845rem;
  color: var(--adm-ink);
  padding: 9px 34px 9px 36px;
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-r-md);
  background: #fbfdff;
  outline: none;
  transition: all .16s ease;
}

.adm-search input:focus {
  background: #fff;
  border-color: #a3e635;
  box-shadow: 0 0 0 3px rgba(187, 244, 81, .3);
}

.adm-search .adm-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: #f1f5f9;
  color: #64748b;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: .8rem;
  line-height: 1;
  display: none;
}
.adm-search.has-value .adm-search-clear { display: grid; place-items: center; }

.adm-pills {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: var(--adm-r-md);
  padding: 3px;
  gap: 2px;
}

.adm-pill {
  font-family: inherit;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: .78rem;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 9px;
  cursor: pointer;
  transition: all .16s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.adm-pill:hover { color: var(--adm-ink); }
.adm-pill.active { background: #0f172a; color: #fff; box-shadow: 0 2px 6px rgba(15, 23, 42, .22); }
.adm-pill .pill-n { font-size: .68rem; opacity: .72; font-weight: 800; }

/* ==========================================================================
   DATA TABLE
   ========================================================================== */
.adm-table-wrap { overflow-x: auto; }

.adm-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .855rem;
}

.adm-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  padding: 11px 16px;
  font-size: .665rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8296ab;
  background: #f8fafc;
  border-bottom: 1px solid var(--adm-line);
  white-space: nowrap;
}

.adm-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid #f4f7fa;
  color: var(--adm-ink-2);
  vertical-align: middle;
}

.adm-table tbody tr { transition: background .14s ease; }
.adm-table tbody tr:hover { background: #fbfdf6; }
.adm-table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--adm-lime-2); }
.adm-table tbody tr:last-child td { border-bottom: none; }
.adm-table .num { font-variant-numeric: tabular-nums; }
.adm-table .r { text-align: right; }

.adm-empty {
  padding: 52px 20px;
  text-align: center;
  color: #94a3b8;
}
.adm-empty svg { width: 40px; height: 40px; stroke-width: 1.5; color: #cbd5e1; margin-bottom: 12px; }
.adm-empty p { font-size: .875rem; font-weight: 600; color: #64748b; }
.adm-empty span { font-size: .79rem; display: block; margin-top: 4px; }

/* ---------- identity cell ---------- */
.adm-id {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.adm-av {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: -.02em;
  color: #fff;
  background: linear-gradient(140deg, #334155, #0f172a);
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, .35);
}

.adm-av.g-lime   { background: linear-gradient(140deg, #a3e635, #4d7c0f); color: #1a2e05; }
.adm-av.g-emerald{ background: linear-gradient(140deg, #34d399, #047857); }
.adm-av.g-sky    { background: linear-gradient(140deg, #38bdf8, #0369a1); }
.adm-av.g-violet { background: linear-gradient(140deg, #a78bfa, #6d28d9); }
.adm-av.g-amber  { background: linear-gradient(140deg, #fbbf24, #b45309); }
.adm-av.g-rose   { background: linear-gradient(140deg, #fb7185, #be123c); }
.adm-av.g-forest { background: linear-gradient(140deg, #34d399, #0b2a1e); }
.adm-av.lg { width: 58px; height: 58px; border-radius: 17px; font-size: 1.35rem; }

.adm-id-txt { min-width: 0; }
.adm-id-name {
  font-weight: 700;
  color: var(--adm-ink);
  font-size: .875rem;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}
.adm-id-meta { font-size: .72rem; color: #8fa0b5; font-weight: 600; margin-top: 1px; }
.adm-id-meta code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .7rem; }

/* ---------- badges / pills ---------- */
.adm-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.adm-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.adm-tag.live .dot { animation: admPulse 1.9s ease-in-out infinite; }

@keyframes admPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.75); }
}

.adm-tag-green  { background: #e7f9ef; color: #0f7a45; border-color: #bfeed6; }
.adm-tag-lime   { background: #f3fcdd; color: #4d7c0f; border-color: #ddf5a8; }
.adm-tag-amber  { background: #fef4dd; color: #a16207; border-color: #fbe4b0; }
.adm-tag-rose   { background: #ffeaea; color: #c02626; border-color: #fbc9c9; }
.adm-tag-sky    { background: #e5f4fe; color: #0369a1; border-color: #bfe3fb; }
.adm-tag-violet { background: #f1e9fe; color: #6d28d9; border-color: #ddccfb; }
.adm-tag-slate  { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.adm-tag-dark   { background: #0f172a; color: #d9f99d; border-color: #0f172a; }

/* ---------- row action buttons ---------- */
.adm-acts { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }

.adm-act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: .735rem;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid var(--adm-line);
  background: #fff;
  color: #475569;
  cursor: pointer;
  text-decoration: none;
  transition: all .16s ease;
  white-space: nowrap;
}
.adm-act svg { width: 13px; height: 13px; stroke-width: 2.2; }
.adm-act:hover { border-color: #0f172a; color: #0f172a; background: #f8fafc; transform: translateY(-1px); }

.adm-act.plan {
  background: linear-gradient(135deg, #f6fee2, #edfbc9);
  border-color: #d8f0a0;
  color: #3f6212;
}
.adm-act.plan:hover { background: linear-gradient(135deg, #edfbc9, #e2f7ac); border-color: #bef06a; color: #2b4409; box-shadow: 0 4px 12px -4px rgba(163, 230, 53, .8); }

.adm-act.danger:hover { border-color: #fca5a5; color: #b91c1c; background: #fff5f5; }
.adm-act.ok:hover { border-color: #86efac; color: #15803d; background: #f4fdf7; }

/* ---------- subscription cell ---------- */
.adm-sub { min-width: 150px; }
.adm-sub-name { font-weight: 700; font-size: .8rem; color: var(--adm-ink); display: flex; align-items: center; gap: 6px; }
.adm-sub-exp { font-size: .7rem; color: #8fa0b5; font-weight: 600; margin-top: 3px; }

.adm-bar { height: 4px; border-radius: 99px; background: #eef2f7; overflow: hidden; margin-top: 6px; max-width: 132px; }
.adm-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #a3e635, #22c55e); }
.adm-bar.warn i { background: linear-gradient(90deg, #fbbf24, #f97316); }
.adm-bar.bad i { background: linear-gradient(90deg, #fb7185, #e11d48); }

.adm-nosub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 700;
  color: #b91c1c;
  background: #fff5f5;
  border: 1px dashed #fca5a5;
  padding: 3px 9px;
  border-radius: 99px;
}

/* ==========================================================================
   MODAL SYSTEM (upgrade)
   ========================================================================== */
.adm-body .modal-overlay {
  background: rgba(15, 23, 42, 0.28);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  padding: 16px;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.adm-body .modal-box {
  width: 100%;
  max-width: 800px;
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--adm-r-xl);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 40px 90px -22px rgba(8, 20, 32, .55), 0 0 0 1px rgba(15, 23, 42, .05);
  animation: admSheet .3s cubic-bezier(.16, 1, .3, 1) both;
  margin: auto;
}

.adm-body .modal-box > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.adm-body .modal-box .modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
  max-height: calc(100vh - 160px);
}

.adm-body .modal-box .modal-foot {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: #ffffff;
  z-index: 10;
}

.adm-body .modal-box.modal-lg { max-width: 900px; }
.adm-body .modal-box.modal-xl { max-width: 1060px; }
.adm-body .modal-box.modal-sm { max-width: 470px; }

@keyframes admSheet {
  from { opacity: 0; transform: translateY(26px) scale(.965); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.adm-body .modal-head {
  position: relative;
  padding: 18px 22px;
  border-bottom: 1px solid var(--adm-line);
  background: linear-gradient(135deg, #07130e 0%, #0b2a1e 52%, #14452f 100%);
  color: #fff;
  overflow: hidden;
}

.adm-body .modal-head::after {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  right: -70px;
  top: -150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(187, 244, 81, .3), transparent 68%);
  pointer-events: none;
}

.adm-body .modal-title { color: #fff; font-size: 1.08rem; letter-spacing: -.02em; position: relative; z-index: 1; }
.adm-body .modal-title svg { width: 18px; height: 18px; color: var(--adm-lime); stroke-width: 2.2; }
.adm-body .modal-subtitle { color: #9fb3c8; font-size: .765rem; position: relative; z-index: 1; }
.adm-body .modal-subtitle code { color: #d9f99d; font-weight: 700; }

.adm-body .modal-close {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #e2e8f0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
.adm-body .modal-close:hover { background: rgba(239, 68, 68, .9); border-color: transparent; color: #fff; transform: rotate(90deg); }

.adm-body .modal-body { padding: 20px 22px; background: #fff; }
.adm-body .modal-foot {
  padding: 14px 22px;
  background: #f8fafc;
  border-top: 1px solid var(--adm-line);
  position: sticky;
  bottom: 0;
}

/* modal identity header */
.adm-mid {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-radius: var(--adm-r-lg);
  background: linear-gradient(135deg, #f8fbf1, #f2f7fb);
  border: 1px solid #e6efdc;
  margin-bottom: 20px;
}

.adm-mid-txt { min-width: 0; flex: 1; }
.adm-mid-txt h4 { font-size: 1.02rem; font-weight: 800; color: var(--adm-ink); letter-spacing: -.02em; }
.adm-mid-txt p { font-size: .78rem; color: #7b8ba0; margin-top: 2px; }
.adm-mid-stats { display: flex; gap: 16px; flex-shrink: 0; }
.adm-mid-stat { text-align: right; }
.adm-mid-stat b { display: block; font-size: .95rem; font-weight: 800; color: var(--adm-ink); letter-spacing: -.02em; }
.adm-mid-stat span { font-size: .63rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8fa0b5; }

/* section headers inside modal */
.adm-sec {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px dashed var(--adm-line);
  font-size: .685rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #8fa0b5;
}
.adm-sec:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.adm-sec::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--adm-line), transparent); }
.adm-sec svg { width: 14px; height: 14px; color: var(--adm-lime-2); stroke-width: 2.4; }

.adm-body .modal-grid { gap: 14px 16px; }

.adm-field { display: flex; flex-direction: column; gap: 6px; }
.adm-field.full { grid-column: 1 / -1; }
.adm-lbl { font-size: .755rem; font-weight: 700; color: #475569; display: flex; align-items: center; gap: 5px; }
.adm-lbl .req { color: #e11d48; }
.adm-lbl svg { width: 13px; height: 13px; color: #94a3b8; stroke-width: 2.2; }
.adm-hint { font-size: .7rem; color: #94a3b8; line-height: 1.5; }

.adm-body .form-group { margin-bottom: 0; }
.adm-body .form-group .form-label {
  font-size: .755rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
  display: block;
}
.adm-body .form-group.full-width { grid-column: 1 / -1; }

/* read-only info tiles inside modal */
.adm-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; grid-column: 1 / -1; }
.adm-tile {
  background: #f8fafc;
  border: 1px solid var(--adm-line-soft);
  border-radius: var(--adm-r-md);
  padding: 11px 13px;
  transition: all .18s ease;
}
.adm-tile:hover { border-color: #dbe3ec; background: #fff; box-shadow: var(--adm-sh-1); }
.adm-tile span { display: block; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; margin-bottom: 4px; }
.adm-tile b { font-size: .84rem; font-weight: 700; color: var(--adm-ink); word-break: break-word; }
.adm-tile b.mute { color: #94a3b8; font-weight: 500; }

/* ==========================================================================
   PLAN PICKER (Select Plan popup)
   ========================================================================== */
.adm-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 12px;
  grid-column: 1 / -1;
}

.adm-plan-opt { position: relative; cursor: pointer; display: block; }
.adm-plan-opt input { position: absolute; opacity: 0; width: 0; height: 0; }

.adm-plan-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border: 1.5px solid var(--adm-line);
  border-radius: var(--adm-r-lg);
  background: #fff;
  transition: all .2s cubic-bezier(.2, .8, .3, 1);
  overflow: hidden;
}

.adm-plan-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(187, 244, 81, .13), transparent 58%);
  opacity: 0;
  transition: opacity .2s ease;
}

.adm-plan-opt:hover .adm-plan-card { border-color: #cbd5e1; transform: translateY(-3px); box-shadow: var(--adm-sh-2); }
.adm-plan-opt input:checked + .adm-plan-card {
  border-color: var(--adm-lime-2);
  background: linear-gradient(160deg, #fdfff5, #f6fdea);
  box-shadow: 0 0 0 3px rgba(187, 244, 81, .3), var(--adm-sh-2);
  transform: translateY(-3px);
}
.adm-plan-opt input:checked + .adm-plan-card::before { opacity: 1; }
.adm-plan-opt input:focus-visible + .adm-plan-card { outline: 2px solid var(--adm-lime-2); outline-offset: 2px; }

.adm-pc-top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.adm-pc-name { font-size: .9rem; font-weight: 800; color: var(--adm-ink); letter-spacing: -.02em; line-height: 1.25; }
.adm-pc-role { font-size: .63rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8fa0b5; margin-top: 3px; }

.adm-pc-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #d8e0ea;
  background: #fff;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: all .18s ease;
}
.adm-pc-check svg { width: 11px; height: 11px; color: #1a2e05; stroke-width: 3.4; opacity: 0; transform: scale(.5); transition: all .18s ease; }
.adm-plan-opt input:checked + .adm-plan-card .adm-pc-check { background: var(--adm-lime); border-color: var(--adm-lime); }
.adm-plan-opt input:checked + .adm-plan-card .adm-pc-check svg { opacity: 1; transform: scale(1); }

.adm-pc-price { position: relative; display: flex; align-items: baseline; gap: 5px; }
.adm-pc-price b { font-size: 1.4rem; font-weight: 800; color: var(--adm-ink); letter-spacing: -.035em; }
.adm-pc-price span { font-size: .7rem; font-weight: 700; color: #8fa0b5; }

.adm-pc-specs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: auto; }
.adm-pc-spec {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f6f8fb;
  border: 1px solid var(--adm-line-soft);
  border-radius: 8px;
  padding: 5px 7px;
  font-size: .68rem;
  font-weight: 700;
  color: #475569;
}
.adm-pc-spec svg { width: 12px; height: 12px; color: #65a30d; stroke-width: 2.4; flex-shrink: 0; }

.adm-pc-apis { position: relative; display: flex; flex-wrap: wrap; gap: 4px; }
.adm-pc-api {
  font-size: .62rem;
  font-weight: 700;
  color: #4d7c0f;
  background: #f3fcdd;
  border: 1px solid #e2f5b8;
  border-radius: 99px;
  padding: 1px 7px;
}

/* selected-plan summary bar */
.adm-pick-summary {
  grid-column: 1 / -1;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--adm-r-md);
  background: linear-gradient(135deg, #0b2a1e, #14452f);
  color: #fff;
  animation: admFadeUp .26s ease both;
}
.adm-pick-summary.show { display: flex; }
.adm-pick-summary .ps-ico { width: 32px; height: 32px; border-radius: 10px; background: rgba(187, 244, 81, .18); color: var(--adm-lime); display: grid; place-items: center; flex-shrink: 0; }
.adm-pick-summary .ps-ico svg { width: 16px; height: 16px; stroke-width: 2.3; }
.adm-pick-summary .ps-txt { flex: 1; min-width: 0; }
.adm-pick-summary .ps-txt b { display: block; font-size: .87rem; font-weight: 800; letter-spacing: -.01em; }
.adm-pick-summary .ps-txt span { font-size: .73rem; color: #9fb3c8; }

@keyframes admFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* extend-days stepper */
.adm-stepper { display: flex; align-items: stretch; border: 1px solid var(--adm-line); border-radius: var(--adm-r-md); overflow: hidden; background: #fbfdff; }
.adm-stepper button {
  width: 36px;
  border: none;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
}
.adm-stepper button:hover { background: var(--adm-lime); color: #1a2e05; }
.adm-stepper input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  text-align: center;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 800;
  color: var(--adm-ink);
  outline: none;
  padding: 8px 4px;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.adm-stepper input::-webkit-outer-spin-button,
.adm-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ==========================================================================
   PLAN CARDS (admin/plans.php grid)
   ========================================================================== */
.adm-plangrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}

.adm-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-r-lg);
  overflow: hidden;
  box-shadow: var(--adm-sh-1);
  transition: transform .22s cubic-bezier(.2, .8, .3, 1), box-shadow .22s ease, border-color .22s ease;
}
.adm-plan:hover { transform: translateY(-5px); box-shadow: var(--adm-sh-3); border-color: #d9e2ec; }
.adm-plan.inactive { opacity: .72; }
.adm-plan.inactive:hover { opacity: 1; }

.adm-plan-ribbon {
  position: absolute;
  top: 14px;
  right: -34px;
  transform: rotate(38deg);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #451a03;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 40px;
  box-shadow: 0 3px 10px -2px rgba(245, 158, 11, .6);
  z-index: 2;
}

.adm-plan-head {
  padding: 16px 18px 14px;
  background: linear-gradient(135deg, #07130e, #0b2a1e 60%, #14452f);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.adm-plan-head::after {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  right: -60px;
  top: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(187, 244, 81, .26), transparent 68%);
}
.adm-plan.is-hot .adm-plan-head { background: linear-gradient(135deg, #1c1206, #3b2607 60%, #6b4409); }
.adm-plan.is-hot .adm-plan-head::after { background: radial-gradient(circle, rgba(251, 191, 36, .3), transparent 68%); }

.adm-plan-name { position: relative; z-index: 1; font-size: 1.02rem; font-weight: 800; letter-spacing: -.02em; }
.adm-plan-role { position: relative; z-index: 1; font-size: .63rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8fb0a0; margin-top: 3px; }
.adm-plan-price { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 6px; margin-top: 12px; }
.adm-plan-price b { font-size: 1.7rem; font-weight: 800; letter-spacing: -.04em; color: var(--adm-lime); }
.adm-plan.is-hot .adm-plan-price b { color: #fcd34d; }
.adm-plan-price span { font-size: .72rem; color: #9fb3c8; font-weight: 600; }

.adm-plan-body { padding: 15px 18px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

.adm-plan-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.adm-pspec {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--adm-line-soft);
  border-radius: var(--adm-r-md);
  padding: 8px 10px;
}
.adm-pspec i {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--adm-line-soft);
  color: #65a30d;
  flex-shrink: 0;
}
.adm-pspec i svg { width: 13px; height: 13px; stroke-width: 2.3; }
.adm-pspec div { min-width: 0; }
.adm-pspec b { display: block; font-size: .8rem; font-weight: 800; color: var(--adm-ink); letter-spacing: -.01em; }
.adm-pspec span { font-size: .63rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #94a3b8; }

.adm-plan-feats { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.adm-plan-feats li { display: flex; align-items: flex-start; gap: 7px; font-size: .78rem; color: #5b6b7f; line-height: 1.45; }
.adm-plan-feats li svg { width: 13px; height: 13px; color: var(--adm-emerald); flex-shrink: 0; margin-top: 3px; stroke-width: 2.6; }

.adm-plan-apis { display: flex; flex-wrap: wrap; gap: 5px; }

.adm-plan-foot {
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px dashed var(--adm-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.adm-plan-subs { font-size: .72rem; font-weight: 700; color: #64748b; display: flex; align-items: center; gap: 5px; }
.adm-plan-subs svg { width: 13px; height: 13px; color: #94a3b8; stroke-width: 2.2; }
.adm-plan-subs b { color: var(--adm-ink); font-weight: 800; }

/* API access chips inside the plan modal */
.adm-api-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.adm-api { position: relative; cursor: pointer; display: block; }
.adm-api input { position: absolute; opacity: 0; width: 0; height: 0; }
.adm-api-box {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1.5px solid var(--adm-line);
  border-radius: var(--adm-r-md);
  background: #fff;
  font-size: .78rem;
  font-weight: 700;
  color: #475569;
  transition: all .17s ease;
}
.adm-api-box .tick {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 2px solid #d8e0ea;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all .17s ease;
}
.adm-api-box .tick svg { width: 10px; height: 10px; color: #1a2e05; stroke-width: 3.6; opacity: 0; transform: scale(.4); transition: all .17s ease; }
.adm-api:hover .adm-api-box { border-color: #cbd5e1; background: #fbfdff; }
.adm-api input:checked + .adm-api-box { border-color: var(--adm-lime-2); background: #f9fef0; color: #2b4409; }
.adm-api input:checked + .adm-api-box .tick { background: var(--adm-lime); border-color: var(--adm-lime); }
.adm-api input:checked + .adm-api-box .tick svg { opacity: 1; transform: scale(1); }
.adm-api input:focus-visible + .adm-api-box { outline: 2px solid var(--adm-lime-2); outline-offset: 2px; }

/* ==========================================================================
   TOGGLE SWITCHES
   ========================================================================== */
.adm-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.adm-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.adm-switch-txt b { display: block; font-size: .82rem; font-weight: 700; color: var(--adm-ink); }
.adm-switch-txt span { display: block; font-size: .71rem; color: #8fa0b5; margin-top: 2px; line-height: 1.45; }

.adm-track {
  position: relative;
  width: 44px;
  height: 25px;
  border-radius: 99px;
  background: #dfe6ee;
  flex-shrink: 0;
  transition: background .2s ease;
}
.adm-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .3);
  transition: transform .22s cubic-bezier(.2, .8, .3, 1);
}
.adm-switch input:checked + .adm-track { background: linear-gradient(135deg, #34d399, #059669); }
.adm-switch input:checked + .adm-track::after { transform: translateX(19px); }
.adm-switch input:focus-visible + .adm-track { box-shadow: 0 0 0 3px rgba(187, 244, 81, .45); }

/* ==========================================================================
   WHATSAPP PAGE
   ========================================================================== */
.adm-wa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.adm-tpl-card {
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-r-lg);
  background: #fff;
  overflow: hidden;
  transition: all .2s ease;
}
.adm-tpl-card:hover { border-color: #d9e2ec; box-shadow: var(--adm-sh-2); }
.adm-tpl-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--adm-line-soft);
}
.adm-tpl-head i {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.adm-tpl-head i svg { width: 13px; height: 13px; stroke-width: 2.4; }
.adm-tpl-head b { font-size: .8rem; font-weight: 800; color: var(--adm-ink); letter-spacing: -.01em; }
.adm-tpl-body { padding: 12px 14px; }
.adm-tpl-card textarea { border-color: var(--adm-line); background: #fbfdff; font-size: .815rem; }

.adm-ph-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.adm-ph {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 99px;
  padding: 2px 9px;
  cursor: pointer;
  transition: all .15s ease;
}
.adm-ph:hover { background: #d1fae5; border-color: #6ee7b7; transform: translateY(-1px); }
.adm-ph.copied { background: #0f172a; color: var(--adm-lime); border-color: #0f172a; }

/* phone frame preview */
.adm-phone {
  width: 100%;
  max-width: 330px;
  margin: 0 auto;
  border-radius: 30px;
  padding: 9px;
  background: linear-gradient(160deg, #2b3440, #111820);
  box-shadow: 0 22px 46px -16px rgba(8, 20, 32, .5), inset 0 0 0 1px rgba(255, 255, 255, .07);
}

.adm-phone-screen {
  border-radius: 23px;
  overflow: hidden;
  background: #efeae2;
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.adm-wa-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  background: #075e54;
  color: #fff;
}
.adm-wa-head .wa-back { width: 15px; height: 15px; color: #c9e9e4; flex-shrink: 0; }
.adm-wa-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(140deg, #a3e635, #047857);
  color: #06281a;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .78rem;
  flex-shrink: 0;
}
.adm-wa-who b { display: block; font-size: .82rem; font-weight: 700; line-height: 1.25; }
.adm-wa-who span { display: block; font-size: .66rem; color: #a8d5cf; }

.adm-wa-chat {
  flex: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: #efeae2;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, .5) 0 2px, transparent 2px),
    radial-gradient(circle at 72% 58%, rgba(255, 255, 255, .42) 0 2px, transparent 2px),
    radial-gradient(circle at 42% 84%, rgba(214, 205, 193, .5) 0 2px, transparent 2px);
  background-size: 130px 130px, 170px 170px, 110px 110px;
}

.adm-wa-day {
  align-self: center;
  background: rgba(255, 255, 255, .82);
  color: #5b6b7f;
  font-size: .63rem;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 99px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}

.adm-wa-bubble {
  align-self: flex-end;
  max-width: 88%;
  background: #d9fdd3;
  border-radius: 10px 10px 3px 10px;
  padding: 7px 10px 5px;
  font-size: .8rem;
  line-height: 1.5;
  color: #111b21;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .12);
  position: relative;
}
.adm-wa-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  right: -7px;
  border: 7px solid transparent;
  border-top-color: #d9fdd3;
  border-right: 0;
}
.adm-wa-bubble.in { align-self: flex-start; background: #fff; border-radius: 10px 10px 10px 3px; }
.adm-wa-bubble.in::before { right: auto; left: -7px; border-top-color: #fff; border-right: 7px solid transparent; border-left: 0; }

.adm-wa-meta { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 3px; font-size: .62rem; color: #667781; }
.adm-wa-meta svg { width: 14px; height: 14px; color: #53bdeb; stroke-width: 2.4; }

.adm-wa-empty { color: #8b98a5; font-size: .78rem; text-align: center; padding: 26px 10px; font-style: italic; }

.adm-wa-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f0f0f0;
}
.adm-wa-composer .ci {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  color: #54656f;
  flex: 1;
  font-size: .74rem;
  justify-content: flex-start;
  padding-left: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.adm-wa-composer .snd {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #00a884;
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.adm-wa-composer svg { width: 15px; height: 15px; stroke-width: 2.3; }

/* ==========================================================================
   MISC: progress list, key-value rows, code
   ========================================================================== */
.adm-list { display: flex; flex-direction: column; }
.adm-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--adm-line-soft);
}
.adm-list-row:last-child { border-bottom: none; }
.adm-list-main { flex: 1; min-width: 0; }
.adm-list-main b { display: block; font-size: .83rem; font-weight: 700; color: var(--adm-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-list-main span { font-size: .72rem; color: #8fa0b5; }
.adm-list-side { text-align: right; flex-shrink: 0; }
.adm-list-side b { display: block; font-size: .82rem; font-weight: 800; color: var(--adm-ink); font-variant-numeric: tabular-nums; }
.adm-list-side span { font-size: .68rem; color: #94a3b8; }

.adm-meter { height: 5px; border-radius: 99px; background: #eef2f7; overflow: hidden; margin-top: 6px; }
.adm-meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #a3e635, #22c55e); }

.adm-code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: .74rem;
  background: rgba(0, 0, 0, .32);
  color: #fef08a;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .08);
}

.adm-note {
  display: flex;
  gap: 11px;
  padding: 13px 15px;
  border-radius: var(--adm-r-md);
  background: #f6f9fd;
  border: 1px solid #dfe9f5;
  font-size: .79rem;
  color: #475569;
  line-height: 1.6;
}
.adm-note svg { width: 16px; height: 16px; color: #0ea5e9; flex-shrink: 0; margin-top: 2px; stroke-width: 2.2; }
.adm-note.lime { background: #f8fdf0; border-color: #e4f4c2; }
.adm-note.lime svg { color: #65a30d; }
.adm-note.warn { background: #fffbf0; border-color: #fdebc4; }
.adm-note.warn svg { color: #d97706; }

/* quick action tiles — colourful, tone-cycled (matches the shop console pattern) */
.adm-qa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 10px; }
.adm-qa {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid var(--qa-line, var(--adm-line));
  border-radius: var(--adm-r-md);
  background: var(--qa-bg, #fff);
  color: var(--qa-ink, var(--adm-ink));
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  cursor: pointer;
}
.adm-qa::after {
  content: '';
  position: absolute;
  right: -34px; top: -34px;
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--qa-accent, var(--adm-lime));
  opacity: .09;
  transition: transform .28s ease, opacity .2s ease;
}
.adm-qa:hover { transform: translateY(-3px); border-color: var(--qa-accent, var(--adm-lime)); box-shadow: 0 10px 24px -12px rgba(15, 23, 42, .35); }
.adm-qa:hover::after { transform: scale(1.5); opacity: .16; }
.adm-qa:active { transform: translateY(-1px); }
.adm-qa i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--qa-accent, var(--adm-lime));
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px -5px var(--qa-accent, var(--adm-lime));
  position: relative;
  z-index: 1;
}
.adm-qa i svg { width: 16px; height: 16px; stroke-width: 2.2; position: relative; z-index: 1; }
.adm-qa b { display: block; font-size: .81rem; font-weight: 700; color: var(--adm-ink); letter-spacing: -.01em; position: relative; z-index: 1; }
.adm-qa span { display: block; font-size: .69rem; color: #8fa0b5; margin-top: 1px; position: relative; z-index: 1; }

/* tone classes */
.adm-qa.q-lime    { --qa-accent: #84cc16; --qa-bg: #fbfef4; --qa-line: #e4f5c4; }
.adm-qa.q-emerald { --qa-accent: #10b981; --qa-bg: #f4fdfa; --qa-line: #c9f2e4; }
.adm-qa.q-sky     { --qa-accent: #0ea5e9; --qa-bg: #f3fbff; --qa-line: #cbeafa; }
.adm-qa.q-violet  { --qa-accent: #8b5cf6; --qa-bg: #f9f7ff; --qa-line: #e4dcfb; }
.adm-qa.q-amber   { --qa-accent: #f59e0b; --qa-bg: #fffcf2; --qa-line: #fbe9c4; }
.adm-qa.q-rose    { --qa-accent: #f43f5e; --qa-bg: #fff6f7; --qa-line: #fbd8dd; }
.adm-qa.q-forest  { --qa-accent: #0b2a1e; --qa-bg: #f6faf8; --qa-line: #d8e6de; }

/* auto-cycle tones so every grid is colourful without extra markup */
.adm-qa-grid > .adm-qa:nth-child(7n+1) { --qa-accent: #84cc16; --qa-bg: #fbfef4; --qa-line: #e4f5c4; }
.adm-qa-grid > .adm-qa:nth-child(7n+2) { --qa-accent: #0ea5e9; --qa-bg: #f3fbff; --qa-line: #cbeafa; }
.adm-qa-grid > .adm-qa:nth-child(7n+3) { --qa-accent: #8b5cf6; --qa-bg: #f9f7ff; --qa-line: #e4dcfb; }
.adm-qa-grid > .adm-qa:nth-child(7n+4) { --qa-accent: #f59e0b; --qa-bg: #fffcf2; --qa-line: #fbe9c4; }
.adm-qa-grid > .adm-qa:nth-child(7n+5) { --qa-accent: #f43f5e; --qa-bg: #fff6f7; --qa-line: #fbd8dd; }
.adm-qa-grid > .adm-qa:nth-child(7n+6) { --qa-accent: #10b981; --qa-bg: #f4fdfa; --qa-line: #c9f2e4; }
.adm-qa-grid > .adm-qa:nth-child(7n+7) { --qa-accent: #0b2a1e; --qa-bg: #f6faf8; --qa-line: #d8e6de; }

/* staggered entrance */
.adm-rise { animation: admRise .5s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes admRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.adm-d1 { animation-delay: .04s; } .adm-d2 { animation-delay: .09s; }
.adm-d3 { animation-delay: .14s; } .adm-d4 { animation-delay: .19s; }
.adm-d5 { animation-delay: .24s; } .adm-d6 { animation-delay: .29s; }

@media (prefers-reduced-motion: reduce) {
  .adm-body *, .adm-body *::before, .adm-body *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
  .adm-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .adm-body .app-content { padding: 18px 16px 44px; }
  .adm-hero { padding: 20px; }
  .adm-split-eq { grid-template-columns: minmax(0, 1fr); }
  .adm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-mid { flex-wrap: wrap; }
  .adm-mid-stats { width: 100%; justify-content: flex-start; gap: 22px; }
  .adm-mid-stat { text-align: left; }
}

@media (max-width: 640px) {
  .adm-kpi-grid, .adm-kpi-grid.is-3 { grid-template-columns: minmax(0, 1fr); }
  .adm-api-grid { grid-template-columns: minmax(0, 1fr); }
  .adm-hero-inner { flex-direction: column; }
  .adm-hero-clock { width: 100%; }
  .adm-plans-grid { grid-template-columns: minmax(0, 1fr); }
  .adm-id-name { max-width: 130px; }
  .adm-acts { flex-wrap: wrap; }
  .adm-body .modal-foot { flex-direction: column-reverse; }
  .adm-body .modal-foot .adm-btn { width: 100%; }
}
