/*
 * ---------------------------------------------------------------
 * Custom Script by 🛡️ DEV IMON
 * ---------------------------------------------------------------
 * Copyright © 2025
 *
 * This script is protected under copyright law.
 * Unauthorized distribution, reproduction, or modification
 * without prior permission is strictly prohibited.
 *
 * Contact Information:
 * Telegram: 🛡️ Dev_Imon
 * ---------------------------------------------------------------
 * Please respect the effort and time invested in creating
 * this script. Your support ensures continuous innovation
 * and quality development.
 * ---------------------------------------------------------------
 */
/* ============================================================
   AutoXRental — "Lumina Gloss" design system
   A fresh, glossy, volzix.io-inspired interface.
   Light by default, dark via [data-theme="dark"]. Respects the
   system preference when no stored choice exists.
   Hand-rolled, no build step.
   ============================================================ */

:root {
  /* ---- palette — light (default, volzix-inspired) ---- */
  --bg: #eef4f0;
  --bg-2: #f7faf8;
  --panel: #ffffff;
  --panel-2: #f1f6f3;
  --panel-glass: rgba(255, 255, 255, 0.9);
  --border: rgba(14, 54, 47, 0.09);
  --border-strong: rgba(14, 54, 47, 0.17);
  --text: #0c201d;
  --text-dim: #4b615c;
  --text-faint: #8ba39d;
  --accent: #0d9488;
  --accent-2: #0ea5a4;
  --violet: #7c5cff;
  --green: #10b981;
  --red: #f43f5e;
  --amber: #f59e0b;
  --coral: #fb7185;
  --accent-soft: rgba(13, 148, 136, 0.11);
  --green-soft: rgba(16, 185, 129, 0.12);
  --red-soft: rgba(244, 63, 94, 0.10);
  --amber-soft: rgba(245, 158, 11, 0.13);
  --violet-soft: rgba(124, 92, 255, 0.12);
  --cyan-soft: rgba(34, 211, 238, 0.12);
  --coral-soft: rgba(251, 113, 133, 0.12);
  --grad: linear-gradient(120deg, #0d9488 0%, #10b981 52%, #22d3ee 120%);
  --grad-soft: linear-gradient(120deg, rgba(13,148,136,.16), rgba(16,185,129,.13) 52%, rgba(34,211,238,.14));
  --glow-accent: 0 10px 26px -10px rgba(13, 148, 136, 0.55);
  --shadow-card:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 2px 0 rgba(255,255,255,0.55) inset,
    0 18px 40px -22px rgba(13, 66, 55, 0.28);
  --shadow-pop: 0 26px 60px -20px rgba(13, 66, 55, 0.34);
  --radius: 20px;
  --radius-sm: 12px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --font: "Inter", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --topbar-h: 66px;
  --spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M12 2 C12.8 8 16 11.2 22 12 C16 12.8 12.8 16 12 22 C11.2 16 8 12.8 2 12 C8 11.2 11.2 8 12 2 Z'/%3E%3C/svg%3E");
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30 Q 30 4 60 30 T 120 30 T 180 30 T 240 30' fill='none' stroke='%230d9488' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

[data-theme="dark"] {
  --bg: #08120f;
  --bg-2: #0b1713;
  --panel: #0e1b17;
  --panel-2: #13231e;
  --panel-glass: rgba(14, 27, 23, 0.9);
  --border: rgba(148, 200, 185, 0.12);
  --border-strong: rgba(148, 200, 185, 0.24);
  --text: #e7f4ef;
  --text-dim: #93b3a9;
  --text-faint: #5d7a70;
  --accent: #2dd4bf;
  --accent-2: #22d3ee;
  --violet: #a78bfa;
  --green: #34d399;
  --red: #fb7185;
  --amber: #fbbf24;
  --coral: #fb7185;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --green-soft: rgba(52, 211, 153, 0.14);
  --red-soft: rgba(251, 113, 133, 0.14);
  --amber-soft: rgba(251, 191, 36, 0.14);
  --violet-soft: rgba(167, 139, 250, 0.15);
  --cyan-soft: rgba(34, 211, 238, 0.13);
  --coral-soft: rgba(251, 113, 133, 0.14);
  --grad: linear-gradient(120deg, #14b8a6 0%, #34d399 52%, #22d3ee 120%);
  --grad-soft: linear-gradient(120deg, rgba(20,184,166,.20), rgba(52,211,153,.16) 52%, rgba(34,211,238,.16));
  --glow-accent: 0 10px 28px -10px rgba(45, 212, 191, 0.55);
  --shadow-card:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 2px 0 rgba(255,255,255,0.02) inset,
    0 20px 44px -24px rgba(0, 0, 0, 0.75);
  --shadow-pop: 0 26px 64px -20px rgba(0, 0, 0, 0.85);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* background lives on <html> (canvas) only — <body> stays transparent so the
   negative-z-index decorative layers (aurora, orbs, art) show through. */
html { background: var(--bg); }

html, body {
  margin: 0; padding: 0;
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(13, 148, 136, 0.28); }

/* ---- ambient floating aurora + soft grid ---- */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: -1;
  background:
    radial-gradient(880px 460px at 12% -6%, rgba(13, 148, 136, 0.16), transparent 62%),
    radial-gradient(760px 430px at 104% 8%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(620px 420px at 86% 108%, rgba(16, 185, 129, 0.13), transparent 62%),
    radial-gradient(480px 360px at 30% 110%, rgba(124, 92, 255, 0.08), transparent 60%);
}
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: -1;
  background-image:
    linear-gradient(rgba(14, 54, 47, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 54, 47, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 78%);
}
[data-theme="dark"] body::after {
  background-image:
    linear-gradient(rgba(148, 200, 185, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 200, 185, 0.035) 1px, transparent 1px);
}

/* floating gloss orbs */
@keyframes floaty {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-18px) translateX(8px); }
}

/* ============ DECORATIVE ART LAYER (volzix-style, auto-scattered) ============ */

.bg-art {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  transform: translateZ(0); /* promote to its own compositor layer → no full-page repaint */
}

/* rings — thin outlined circles */
.d-ring {
  position: absolute; border-radius: 50%;
  border: 2px solid var(--accent);
  animation: floaty 13s ease-in-out infinite;
}
.d-ring.dashed { border-style: dashed; }

/* plus marks */
.d-plus { position: absolute; animation: spin-slow 26s linear infinite; }
.d-plus::before, .d-plus::after {
  content: ""; position: absolute; background: currentColor; border-radius: 2px;
}
.d-plus::before { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); }
.d-plus::after { top: 50%; left: 0; height: 2px; width: 100%; transform: translateY(-50%); }

/* cross / x marks */
.d-cross { position: absolute; animation: spin-slow 30s linear infinite reverse; }
.d-cross::before, .d-cross::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; border-radius: 2px;
}
.d-cross::before { width: 2px; height: 100%; transform: translate(-50%, -50%) rotate(45deg); }
.d-cross::after { height: 2px; width: 100%; transform: translate(-50%, -50%) rotate(45deg); }

/* sparkles — 4-point star */
.d-spark {
  position: absolute;
  background: currentColor;
  -webkit-mask: var(--spark) center/contain no-repeat;
  mask: var(--spark) center/contain no-repeat;
  animation: twinkle 5s ease-in-out infinite;
}

/* single dots */
.d-dot {
  position: absolute; border-radius: 50%;
  background: currentColor;
  animation: twinkle 6s ease-in-out infinite;
}

/* soft color blobs (pure radial-gradient — no blur filter, no animation) */
.d-blob {
  position: absolute; border-radius: 50%;
}

/* dotted field */
.d-dots {
  position: absolute; width: 140px; height: 140px; opacity: 0.5;
  background-image: radial-gradient(var(--text-faint) 1.6px, transparent 1.6px);
  background-size: 16px 16px;
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle, #000 0%, transparent 72%);
}
[data-theme="dark"] .d-dots { opacity: 0.3; }

/* wavy line at top / bottom (static — no repaint-heavy animation) */
.d-wave {
  position: absolute; height: 60px; left: 0; right: 0; opacity: 0.5;
  background: var(--wave) repeat-x;
  background-size: 240px 60px;
}
[data-theme="dark"] .d-wave { opacity: 0.3; }

@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 0.85; transform: scale(1.12); }
}


/* scrollbars */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

h1,h2,h3,h4 { font-weight: 720; letter-spacing: -0.015em; }

/* gradient text helper */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- icons ---------- */
.ic { flex-shrink: 0; display: inline-block; vertical-align: -0.16em; }
.ic-sm { width: 14px !important; height: 14px !important; }
.ic-lg { width: 24px !important; height: 24px !important; }

/* ============ APP SHELL ============ */

.shell { display: flex; min-height: 100vh; position: relative; }

/* ---------- sidebar ---------- */
.sidebar {
  width: 256px; flex-shrink: 0;
  background: var(--panel-glass);
  border-right: 1px solid var(--border);
  padding: 18px 14px 14px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 2px;
  z-index: 40;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px 20px;
  font-weight: 760; font-size: 16.5px; letter-spacing: 0.1px;
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0;
  background: var(--grad);
  display: grid; place-items: center;
  box-shadow: var(--glow-accent), inset 0 1px 0 rgba(255,255,255,0.45);
  color: #fff; font-size: 15px; font-weight: 800; letter-spacing: 0.4px;
  position: relative; overflow: hidden;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.45), transparent 45%);
  border-radius: inherit;
}
.brand-mark::before {
  content: ""; position: absolute; top: -60%; left: -30%; width: 40%; height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: rotate(20deg);
  animation: shine 5.5s ease-in-out infinite;
}
@keyframes shine {
  0%, 60% { transform: translateX(0) rotate(20deg); opacity: 0; }
  70% { opacity: 1; }
  100% { transform: translateX(320%) rotate(20deg); opacity: 0; }
}
.brand small { display: block; font-weight: 600; color: var(--text-faint); font-size: 11px; letter-spacing: 0.4px; text-transform: uppercase; }

.nav-section {
  font-size: 10.5px; font-weight: 750; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text-faint); padding: 14px 12px 6px;
}

.nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 13px;
  color: var(--text-dim); font-weight: 560; font-size: 14px;
  position: relative;
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}
.nav-link .nav-ico {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--text-faint);
  transition: inherit;
}
.nav-link:hover { background: var(--accent-soft); color: var(--text); text-decoration: none; transform: translateX(2px); }
.nav-link:hover .nav-ico { color: var(--accent); }
.nav-link.active {
  background: var(--grad);
  color: #fff; font-weight: 680;
  box-shadow: var(--glow-accent), inset 0 1px 0 rgba(255,255,255,0.35);
}
.nav-link.active .nav-ico {
  background: rgba(255,255,255,0.18); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.nav-link .nav-count {
  margin-left: auto; font-size: 11px; font-weight: 750;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text-dim); border-radius: 999px; padding: 1px 8px;
}
.nav-link.active .nav-count { border-color: transparent; background: rgba(255,255,255,0.22); color: #fff; }

.sidebar .spacer { flex: 1; }

/* user chip */
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 14px;
  background: var(--panel-2); border: 1px solid var(--border);
  margin: 6px 2px 8px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
}
.avatar {
  width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  font-size: 13.5px; font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
}
.user-chip .meta { min-width: 0; flex: 1; }
.user-chip .meta b { display: block; font-size: 13px; font-weight: 680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .meta span { font-size: 11px; color: var(--text-faint); text-transform: capitalize; letter-spacing: 0.3px; }
.user-chip-link { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-decoration: none; color: inherit; border-radius: 10px; }
.user-chip-link:hover .meta b { color: var(--accent); }

.sidebar-actions { display: flex; gap: 8px; padding: 0 2px; }
.sidebar-actions .btn { flex: 1; justify-content: center; }

/* ---------- main / topbar ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px; height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  background: var(--panel-glass);
  position: sticky; top: 0; z-index: 30;
}
.topbar .page-title { margin-right: auto; min-width: 0; }
.topbar .page-title h1 {
  margin: 0; font-size: 18px; font-weight: 750;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.015em;
}
.topbar .clock, .topbar .badge, .topbar .top-avatar { flex-shrink: 0; }
.topbar .page-title .crumb { font-size: 11.5px; color: var(--text-faint); display: flex; align-items: center; gap: 5px; }
.topbar .page-title .crumb .ic { opacity: 0.7; }

.hamburger {
  display: none;
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--panel-2);
  color: var(--text-dim); cursor: pointer;
  place-items: center; flex-shrink: 0;
}
.hamburger:hover { color: var(--text); border-color: var(--border-strong); }

.scrim {
  display: none; position: fixed; inset: 0; z-index: 35;
  background: rgba(4, 16, 12, 0.5);
}

.clock {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12.5px; color: var(--text-dim);
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 11px; padding: 7px 11px; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
}
.clock .tick { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: blink 2s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* topbar avatar chip */
.top-avatar {
  display: flex; align-items: center; gap: 9px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 5px 11px 5px 6px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
  white-space: nowrap;
}
.top-avatar .avatar { width: 28px; height: 28px; border-radius: 9px; font-size: 11.5px; }
.top-avatar .nm { font-size: 12.5px; font-weight: 640; color: var(--text-dim); }
a.top-avatar { text-decoration: none; color: inherit; transition: border-color .15s ease, background .15s ease; }
a.top-avatar:hover { border-color: var(--border-strong); background: var(--panel-2); }
a.top-avatar:hover .nm { color: var(--text); }

/* topbar primary action (New order) */
.topbar .btn-top { flex-shrink: 0; }
.theme-label { margin-left: 2px; }

.content { padding: 26px 26px 48px; max-width: 1400px; width: 100%; margin: 0 auto; }

/* page hero (greeting) */
.page-hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 20px;
}
.page-hero h1 {
  margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
}
.page-hero .sub { margin: 5px 0 0; color: var(--text-dim); font-size: 14px; }
.page-hero .greet-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 650; color: var(--accent);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  border-radius: 999px; padding: 5px 12px; margin-bottom: 8px;
}

/* decorative squiggle underline beneath the hero heading */
.squiggle {
  display: inline-block; width: 150px; height: 12px; margin-top: 12px;
  background: var(--wave) repeat-x;
  background-size: 150px 12px;
  opacity: 0.55;
}
[data-theme="dark"] .squiggle { opacity: 0.4; }

/* ============ CARDS ============ */

.card {
  position: relative;
  background:
    radial-gradient(320px 200px at 100% 0%, var(--accent-soft), transparent 68%),
    linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.18) 42%, transparent),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.75), transparent);
  pointer-events: none;
}
[data-theme="dark"] .card::before { background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent); }
[data-theme="dark"] .card {
  background:
    radial-gradient(320px 200px at 100% 0%, var(--accent-soft), transparent 68%),
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01) 42%, transparent),
    var(--panel);
}
.card h2 {
  margin: 0 0 14px; font-size: 15px; font-weight: 720;
  display: flex; align-items: center; gap: 9px;
}
.card h2 .card-ico {
  width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  box-shadow: var(--glow-accent), inset 0 1px 0 rgba(255,255,255,0.4);
}
.card h3 { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-dim); }

/* sparkle accent at the end of every card heading */
.card h2::after {
  content: ""; width: 13px; height: 13px; flex: none; margin-left: 3px;
  background: var(--accent); opacity: 0.55;
  -webkit-mask: var(--spark) center/contain no-repeat;
  mask: var(--spark) center/contain no-repeat;
  animation: twinkle 6s ease-in-out infinite;
}
[data-theme="dark"] .card h2::after { opacity: 0.45; }

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

.grid { display: grid; gap: 18px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1180px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 780px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .content { padding: 18px 14px 40px; }
  .topbar { padding: 0 14px; }
}

/* ---------- stat cards ---------- */
.stat {
  position: relative; overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); border-color: var(--border-strong); }
.stat::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(240px 130px at 85% -18%, var(--stat-glow, var(--accent-soft)), transparent 70%);
}
.stat.ok { --stat-glow: var(--green-soft); }
.stat.warn { --stat-glow: var(--amber-soft); }
.stat.bad { --stat-glow: var(--red-soft); }
.stat .label { font-size: 11.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.stat .value { font-size: 32px; font-weight: 820; margin-top: 8px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.stat.ok .value { color: var(--green); }
.stat.warn .value { color: var(--amber); }
.stat.bad .value { color: var(--red); }
.stat .stat-ico {
  position: absolute; top: 18px; right: 18px;
  width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  box-shadow: var(--glow-accent), inset 0 1px 0 rgba(255,255,255,0.4);
}
.stat.ok .stat-ico { background: linear-gradient(120deg, #10b981, #34d399); }
.stat.warn .stat-ico { background: linear-gradient(120deg, #f59e0b, #fbbf24); }
.stat.bad .stat-ico { background: linear-gradient(120deg, #f43f5e, #fb7185); }

/* ---------- list rows (recent items) ---------- */
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text) !important;
  border-radius: 10px;
  transition: background 0.14s ease, transform 0.14s ease;
}
.list-row:hover { background: var(--panel-2); text-decoration: none; transform: translateX(2px); }
.list-row:last-child { border-bottom: none; }
.list-row .row-ico {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--border);
  color: var(--accent);
}
.list-row .row-body { min-width: 0; flex: 1; }
.list-row .row-body b { display: block; font-size: 13.5px; font-weight: 660; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .row-body span { font-size: 12px; color: var(--text-faint); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* empty state */
.empty {
  text-align: center; padding: 36px 16px; color: var(--text-dim);
}
.empty .empty-ico {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--border);
  color: var(--accent);
}
.empty p { margin: 0 0 10px; font-size: 13.5px; }
.empty .sub { color: var(--text-faint); font-size: 12.5px; }

/* ============ TABLES ============ */

.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }

table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.9px;
  color: var(--text-faint); font-weight: 750;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: 0; background: var(--panel);
}
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background 0.12s ease; }
.table tbody tr:hover { background: var(--panel-2); }
.table tbody tr:last-child td { border-bottom: none; }
.table .mono { font-family: var(--mono); font-size: 12.5px; }
.table .domain-cell b { font-size: 13.5px; font-weight: 680; }
.table .domain-cell .sub { font-size: 11.5px; color: var(--text-faint); font-family: var(--mono); margin-top: 1px; }

/* ============ BADGES ============ */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3.5px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 680; white-space: nowrap;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset;
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}
.badge.green { color: var(--green); background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.badge.red { color: var(--red); background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.badge.amber { color: var(--amber); background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 32%, transparent); }
.badge.blue { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.badge.cyan { color: var(--accent-2); background: var(--cyan-soft); border-color: color-mix(in srgb, var(--accent-2) 30%, transparent); }
.badge.gray { color: var(--text-dim); background: var(--panel-2); border-color: var(--border); }
.badge.violet { color: var(--violet); background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet) 30%, transparent); }
.badge.coral { color: var(--coral); background: var(--coral-soft); border-color: color-mix(in srgb, var(--coral) 30%, transparent); }
.badge.pulse::before { animation: blink 1.4s infinite; }

/* ============ FORMS ============ */

label.field { display: block; margin-bottom: 15px; }
label.field > span, .field-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 680; color: var(--text-dim); margin-bottom: 6px;
  letter-spacing: 0.2px;
}
label.field > span .ic, .field-label .ic { color: var(--text-faint); }

.input-wrap { position: relative; }
.input-wrap .lead-ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); pointer-events: none;
  display: grid; place-items: center;
}
.input-wrap input, .input-wrap select { padding-left: 40px; }

input, select, textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
}
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset; }
input::placeholder, textarea::placeholder { color: var(--text-faint); opacity: 0.8; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 1px rgba(13,148,136,0.3);
  background: var(--panel);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238ba39d' stroke-width='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;
  padding-right: 36px;
}
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2393b3a9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
select:disabled { opacity: 0.55; cursor: not-allowed; }
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
textarea.mono, input.mono { font-family: var(--mono); font-size: 12.5px; }
input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--accent);
  cursor: pointer; flex-shrink: 0;
}
input[type="file"] {
  padding: 8px; font-size: 12.5px; background: var(--bg-2);
  color: var(--text-dim); border-style: dashed;
}
input[type="date"] { color-scheme: light; }
[data-theme="dark"] input[type="date"] { color-scheme: dark; }

.row { display: flex; gap: 13px; row-gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 150px; }
.row .auto { flex: 0 0 auto; min-width: 0; }

.hint { font-size: 12px; color: var(--text-faint); margin-top: 6px; line-height: 1.55; }
.hint a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }
.field-error { font-size: 12px; color: var(--red); margin-top: 5px; display: flex; align-items: center; gap: 5px; }

/* checkboxes rows */
.check-row { display: flex; gap: 18px; row-gap: 12px; flex-wrap: wrap; }
.check-row label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dim); cursor: pointer;
}
.check-row label:hover { color: var(--text); }

/* ============ BUTTONS ============ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad); color: #fff;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 18px; font-size: 13.5px; font-weight: 680;
  line-height: 1.4;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  font-family: inherit; letter-spacing: 0.1px;
  background-image:
    radial-gradient(140px 90px at 88% 8%, rgba(255,255,255,0.34), transparent 60%),
    var(--grad);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), var(--glow-accent);
  transition: transform 0.12s ease, box-shadow 0.16s ease, filter 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  position: relative; overflow: hidden;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
}
.btn::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), transparent 50%);
  pointer-events: none;
}
.btn::before {
  content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
  pointer-events: none;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; color: #fff; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 14px 30px -10px rgba(13,148,136,0.6); }
.btn:hover::before { left: 120%; }
.btn:active { transform: translateY(0); filter: brightness(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

.btn.ghost {
  background: var(--panel-2); color: var(--text-dim);
  border-color: var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}
[data-theme="dark"] .btn.ghost { box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); }
.btn.ghost::after, .btn.ghost::before { display: none; }
.btn.ghost:hover { color: var(--text); border-color: var(--border-strong); background: var(--panel); box-shadow: inset 0 1px 0 rgba(255,255,255,0.6); }
.btn.ghost.danger, .btn.danger.ghost { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); background: var(--red-soft); }
.btn.ghost.danger:hover, .btn.danger.ghost:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }

.btn.danger {
  background: linear-gradient(120deg, #f43f5e, #fb7185);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 8px 22px -8px rgba(244, 63, 94, 0.5);
}
.btn.ok {
  background: linear-gradient(120deg, #10b981, #34d399);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 8px 22px -8px rgba(16, 185, 129, 0.5);
}
.btn.sm { padding: 7px 13px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
.btn.icon { padding: 0; width: 34px; height: 34px; flex-shrink: 0; }
.btn.lg { padding: 13px 26px; font-size: 15px; border-radius: 14px; }

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

/* space between a form's last field/row and its submit button */
form > .btn, form > .btn-group { margin-top: 16px; }

/* icon-only action buttons in tables */
.icon-btn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--panel-2);
  color: var(--text-dim); cursor: pointer;
  transition: all 0.14s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
}
[data-theme="dark"] .icon-btn { box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.icon-btn.danger:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.icon-btn.warn:hover { color: var(--amber); border-color: var(--amber); background: var(--amber-soft); }
.icon-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn:focus-visible, .icon-btn:focus-visible, .copy-btn:focus-visible, .hamburger:focus-visible, .theme-fab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
}

/* copy-to-clipboard */
.copy-btn {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid transparent; background: transparent;
  color: var(--text-faint); cursor: pointer;
  transition: all 0.14s ease;
}
.copy-btn:hover { color: var(--accent); background: var(--accent-soft); border-color: var(--border); }
.copy-btn.copied { color: var(--green); background: var(--green-soft); }

/* ============ TOOLBAR (page filters) ============ */
.toolbar {
  display: flex; align-items: flex-end; gap: 13px; row-gap: 12px; flex-wrap: wrap;
}
.toolbar .grow { flex: 1; min-width: 200px; }
.toolbar .auto { flex: 0 0 auto; }

/* ============ STEPPER ============ */

.stepper { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 15px; position: relative; padding-bottom: 22px; }
.step:last-child { padding-bottom: 0; }
.step .dot {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 780;
  background: var(--panel-2); color: var(--text-faint);
  border: 2px solid var(--border); z-index: 1;
  position: relative;
}
.step:not(:last-child)::before {
  content: ""; position: absolute; left: 16px; top: 34px; bottom: 2px; width: 2px;
  background: var(--border); border-radius: 2px;
}
.step .body { padding-top: 4px; min-width: 0; flex: 1; }
.step .name { font-weight: 660; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.step .meta { font-size: 12px; color: var(--text-faint); margin-top: 1px; font-family: var(--mono); }
.step .err {
  font-size: 12px; color: var(--red); font-family: var(--mono);
  margin-top: 6px; word-break: break-word;
  background: var(--red-soft); border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
  border-radius: 8px; padding: 8px 10px;
}

.step.done .dot {
  background: var(--green-soft); color: var(--green);
  border-color: color-mix(in srgb, var(--green) 60%, transparent);
}
.step.done:not(:last-child)::before {
  background: linear-gradient(180deg, color-mix(in srgb, var(--green) 55%, transparent), color-mix(in srgb, var(--green) 25%, var(--border)));
}
.step.failed .dot { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.step.failed:not(:last-child)::before { background: color-mix(in srgb, var(--red) 35%, var(--border)); }
.step.active .dot {
  background: var(--accent-soft); color: var(--accent); border-color: var(--accent);
}
.step.active .dot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent); border-right-color: var(--accent-2);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.step.active .dot > * { position: relative; z-index: 1; }

/* ============ MISC ============ */

.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }
.mt-sm { margin-top: 8px; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex.between { justify-content: space-between; }
.flex.wrap { flex-wrap: wrap; }
.text-right { text-align: right; }

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 9px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--text-dim); font-weight: 560; display: flex; align-items: center; gap: 7px; }
.kv dt .ic { color: var(--text-faint); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 12.5px; word-break: break-all; display: flex; align-items: center; gap: 8px; }

.callout {
  border-radius: 14px; padding: 13px 15px; font-size: 13.5px; margin: 12px 0;
  border: 1px solid;
  display: flex; gap: 11px; align-items: flex-start;
  line-height: 1.55;
}
.callout .callout-ico { margin-top: 1px; flex-shrink: 0; }
.callout.warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 35%, transparent); color: color-mix(in srgb, var(--amber) 78%, var(--text)); }
.callout.warn .callout-ico { color: var(--amber); }
.callout.danger { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 35%, transparent); color: color-mix(in srgb, var(--red) 78%, var(--text)); }
.callout.danger .callout-ico { color: var(--red); }
.callout.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 32%, transparent); }
.callout.info .callout-ico { color: var(--accent); }
.callout.ok { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.callout.ok .callout-ico { color: var(--green); }
.callout .body { min-width: 0; flex: 1; }
.callout code, .callout .mono-inline { font-family: var(--mono); font-size: 12px; background: rgba(13,42,38,0.07); padding: 1.5px 6px; border-radius: 6px; word-break: break-all; }
[data-theme="dark"] .callout code, [data-theme="dark"] .callout .mono-inline { background: rgba(0,0,0,0.22); }

/* ---------- global search ---------- */
.search-box { position: relative; flex: 0 1 380px; min-width: 180px; }
.search-box input { padding-left: 40px; padding-right: 40px; background: var(--panel-2); border-radius: 12px; }
.search-box .lead-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-faint); display: grid; place-items: center; pointer-events: none; }
.search-box .kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.kbd {
  font-family: var(--mono); font-size: 10.5px; color: var(--text-faint);
  border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 6px; padding: 1.5px 6px; background: var(--panel);
}
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 50;
  background: var(--panel); border: 1px solid var(--border-strong);
  border-radius: 14px; box-shadow: var(--shadow-pop); overflow: hidden;
  animation: drop-in 0.16s ease-out;
}
@keyframes drop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.search-results a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; color: var(--text);
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--panel-2); text-decoration: none; }
.search-results a .row-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.search-results a .body { min-width: 0; flex: 1; }
.search-results a .sub { color: var(--text-faint); font-size: 11.5px; display: block; }

/* ============ AUTH PAGES (split-screen) ============ */

.auth-shell {
  min-height: 100vh; position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 1fr;
}

/* ---------- left showcase ---------- */
.auth-showcase {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 56px;
  color: #fff;
  background:
    radial-gradient(600px 420px at 20% 0%, rgba(255,255,255,0.14), transparent 60%),
    radial-gradient(480px 360px at 100% 100%, rgba(34,211,238,0.25), transparent 60%),
    linear-gradient(135deg, #0b3f3a 0%, #0d9488 48%, #10b981 100%);
}
.auth-showcase::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 100% 90% at 50% 0%, #000, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 90% at 50% 0%, #000, transparent 80%);
}
.showcase-inner { position: relative; z-index: 1; max-width: 460px; width: 100%; }
.auth-showcase .brand { color: #fff; padding: 0 0 28px; }
.auth-showcase .brand small { color: rgba(255,255,255,0.66); }
.auth-showcase .brand-mark { background: rgba(255,255,255,0.18); box-shadow: inset 0 1px 0 rgba(255,255,255,0.35); }

.showcase-hero .greet-badge {
  background: rgba(255,255,255,0.14); color: #fff;
  border-color: rgba(255,255,255,0.25);
}
.showcase-hero h1 {
  margin: 14px 0 12px; font-size: 34px; font-weight: 820; line-height: 1.15;
  letter-spacing: -0.025em; color: #fff;
}
.showcase-grad {
  background: linear-gradient(120deg, #fff, #a7f3d0);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.showcase-hero p { margin: 0; font-size: 14.5px; line-height: 1.65; color: rgba(255,255,255,0.85); }

.showcase-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.sc-feat {
  display: flex; gap: 11px; align-items: flex-start;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px; padding: 13px 14px;
}
.sc-feat-ico {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.16); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.sc-feat-body { min-width: 0; }
.sc-feat-body b { display: block; font-size: 13px; font-weight: 700; color: #fff; }
.sc-feat-body span { display: block; font-size: 11.5px; color: rgba(255,255,255,0.72); margin-top: 2px; line-height: 1.45; }

.showcase-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.sc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 650; color: #fff;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px; padding: 5px 11px;
}

/* ---------- right form ---------- */
.auth-main {
  display: grid; place-items: center; padding: 40px 28px;
  position: relative; z-index: 1;
}
.auth-card {
  width: 100%; max-width: 430px;
  padding: 34px 30px 26px;
  position: relative;
  animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 26px 60px -24px rgba(13, 66, 55, 0.4),
    0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent),
    0 20px 55px -18px color-mix(in srgb, var(--accent) 42%, transparent);
}
[data-theme="dark"] .auth-card {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 26px 64px -24px rgba(0, 0, 0, 0.8),
    0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent),
    0 22px 60px -18px color-mix(in srgb, var(--accent) 45%, transparent);
}
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head .brand-mark { width: 56px; height: 56px; border-radius: 17px; font-size: 21px; margin: 0 auto 15px; }
.auth-head .brand-mark.show-mobile { display: none; }
.auth-head h1 { margin: 0 0 5px; font-size: 23px; font-weight: 800; letter-spacing: -0.02em; }
.auth-head p { margin: 0; font-size: 13.5px; color: var(--text-dim); }

.auth-feats {
  display: flex; flex-direction: column; gap: 9px; margin-top: 20px;
  padding-top: 18px; border-top: 1px solid var(--border);
}
.auth-feats .feat { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-dim); }
.auth-feats .feat .ic { color: var(--accent); }

.qr {
  width: 210px; height: 210px; margin: 16px auto; display: block;
  border-radius: 16px; background: #fff; padding: 10px;
  box-shadow: var(--shadow-card); border: 1px solid var(--border);
}
.secret-line {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--bg-2); border: 1px dashed var(--border-strong);
  border-radius: 10px; padding: 10px 12px; word-break: break-all; text-align: center;
  position: relative;
}
.otp-input {
  text-align: center !important; letter-spacing: 10px !important;
  font-size: 22px !important; font-family: var(--mono) !important;
  font-weight: 700; padding: 13px !important;
}

/* account page — 2FA enrollment inline QR */
.2fa-setup { margin-top: 4px; }
.qr-wrap {
  display: flex; justify-content: center;
  padding: 12px; border-radius: 16px;
  background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  margin: 4px 0 4px;
}
.qr-wrap svg { display: block; }

.theme-fab {
  position: fixed; top: 18px; right: 18px; z-index: 50;
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--panel-glass);
  color: var(--text-dim); cursor: pointer;
  display: grid; place-items: center;
  box-shadow: var(--shadow-card);
}
.theme-fab:hover { color: var(--text); border-color: var(--border-strong); }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-showcase { display: none; }
  .auth-main { padding: 24px 16px; }
  .auth-head .brand-mark.show-mobile { display: block; }
}

/* ============ MODAL ============ */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5, 18, 14, 0.55);
  display: grid; place-items: center; z-index: 100; padding: 20px;
  animation: fade-in 0.15s ease-out;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 480px;
  animation: rise 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal .modal-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.modal .modal-head .modal-ico {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--red-soft); color: var(--red);
  border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
}
.modal .modal-head h2 { margin: 0; font-size: 16.5px; }
.modal .modal-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-dim); }

/* ============ TOASTS ============ */

#toasts { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--panel); border: 1px solid var(--border-strong);
  border-left: 3px solid var(--green);
  border-radius: 14px; padding: 13px 16px; font-size: 13.5px; max-width: 400px;
  box-shadow: var(--shadow-pop);
  animation: slide-in 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast .toast-ico { color: var(--green); margin-top: 1px; }
.toast.error { border-left-color: var(--red); }
.toast.error .toast-ico { color: var(--red); }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.out { transition: all 0.3s ease; opacity: 0; transform: translateX(24px); }

/* ============ PAGINATION ============ */

.livewire-paginator { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.livewire-paginator a, .livewire-paginator span {
  padding: 5px 13px; border-radius: 9px; font-size: 12.5px; color: var(--text-dim);
  border: 1px solid var(--border); background: var(--panel-2);
  transition: all 0.14s ease;
}
.livewire-paginator a:hover { color: var(--text); border-color: var(--border-strong); }
.livewire-paginator .active {
  background: var(--grad); color: #fff; border-color: transparent; font-weight: 680;
  box-shadow: var(--glow-accent);
}

.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 4px 2px;
}
.pager .page-info { font-size: 12.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* ============ CODE / PAYLOADS ============ */

details.payload summary {
  cursor: pointer; color: var(--text-faint); font-size: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  list-style: none; user-select: none;
}
details.payload summary::-webkit-details-marker { display: none; }
details.payload summary:hover { color: var(--text-dim); }
details.payload pre {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; font-size: 11.5px;
  overflow-x: auto; max-height: 280px; margin: 8px 0 0;
  font-family: var(--mono); line-height: 1.6;
}

/* code block (one-time api keys etc.) */
.code-block {
  font-family: var(--mono); font-size: 12.5px; word-break: break-all;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; margin-top: 8px;
  display: flex; align-items: center; gap: 10px;
}

/* ============ SETTINGS LAYOUT ============ */

.settings-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.server-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 4px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.server-row:last-of-type { border-bottom: none; }
.server-row .srv-ico {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--grad-soft); color: var(--accent); border: 1px solid var(--border);
}
.server-row .srv-body { min-width: 0; flex: 1; }
.server-row .srv-body b { font-size: 13.5px; font-weight: 680; }
.server-row .srv-body .sub { font-size: 12px; color: var(--text-faint); font-family: var(--mono); margin-top: 1px; }
.server-row .srv-body .meta { font-size: 11.5px; color: var(--text-faint); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* pipeline strip (order create page) */
.pipeline-strip {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px;
}
.pipeline-strip .pip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 650; color: var(--text-dim);
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 4.5px 11px 4.5px 8px;
}
.pipeline-strip .pip .n {
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--grad); color: #fff;
  font-size: 9.5px; font-weight: 800;
  display: grid; place-items: center;
}

/* ============ RESPONSIVE: DRAWER SIDEBAR ============ */

@media (max-width: 1180px) {
  .topbar { gap: 10px; }
  .search-box { flex: 0 1 240px; }
  .topbar .badge { display: none; }
}

@media (max-width: 960px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-104%);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: var(--shadow-pop);
    background: var(--panel);
    width: 280px;
  }
  body.drawer-open .sidebar { transform: translateX(0); }
  body.drawer-open .scrim { display: block; }
  .hamburger { display: grid; }
  .clock { display: none; }
  .topbar .page-title .crumb { display: none; }
  .topbar .btn-top { display: none; }
  .kv { grid-template-columns: 110px 1fr; }
  .top-avatar .nm { display: none; }
  .top-avatar { padding: 5px; }
}
@media (max-width: 560px) {
  .search-box { flex: 1 1 auto; }
  .search-box .kbd { display: none; }
  .badge { padding: 3px 8px; font-size: 11px; }
  .btn.lg { width: 100%; }
  .row > * { min-width: 100%; }
  .page-hero h1 { font-size: 22px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============ LOGIN CAPTCHA ============ */
.captcha-wrap {
  margin: 4px 0 16px;
  display: flex;
  justify-content: center;
}
.captcha-wrap > div {
  min-height: 65px;
}
/* keep the widget from overflowing the narrow auth card */
.captcha-wrap iframe { max-width: 100%; }

/* ============ ACTIVE SESSIONS ============ */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.session-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.session-card.current {
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 18%, transparent);
}
.session-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--grad-soft);
  color: var(--accent);
  border: 1px solid var(--border);
}
.session-card.current .session-ico {
  background: var(--green-soft);
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 30%, transparent);
}
.session-body { min-width: 0; flex: 1; }
.session-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.session-title b { font-size: 14px; font-weight: 680; }
.session-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--text-faint);
}
.session-meta span { display: inline-flex; align-items: center; gap: 6px; }
.session-actions { flex-shrink: 0; }

@media (max-width: 560px) {
  .session-card { flex-wrap: wrap; align-items: flex-start; gap: 12px; }
  .session-ico { width: 40px; height: 40px; }
  .session-actions { width: 100%; margin-left: 0; margin-top: 2px; }
  .session-actions .btn { width: 100%; }
  .session-meta { gap: 10px; }
  .page-hero > .btn { width: 100%; }
}

/* ============ SITE LOGO ============ */

/* replaces the "AX" brand-mark when a logo is uploaded */
.brand-logo {
  width: 40px; height: 40px; max-width: 100%; border-radius: 13px; flex-shrink: 0;
  object-fit: contain; display: block;
  background: transparent;
}
.auth-head .brand-logo {
  width: 56px; height: 56px; border-radius: 17px;
  margin: 0 auto 15px;
}
.auth-head .brand-logo.show-mobile { display: none; }
@media (max-width: 900px) {
  .auth-head .brand-logo.show-mobile { display: block; }
}

/* account page — logo picker */
.card-sep {
  border: 0; border-top: 1px solid var(--border);
  margin: 18px 0;
}
.logo-row {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}
.logo-preview {
  width: 58px; height: 58px; max-width: 100%; border-radius: 14px; flex-shrink: 0;
  object-fit: contain; display: block; padding: 6px;
  border: 1px solid var(--border);
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #d8d8d8 25%, transparent 25%, transparent 75%, #d8d8d8 75%),
    linear-gradient(45deg, #d8d8d8 25%, transparent 25%, transparent 75%, #d8d8d8 75%);
  background-size: 14px 14px; background-position: 0 0, 7px 7px;
}
.logo-preview.small { width: 44px; height: 44px; padding: 4px; }
.logo-placeholder {
  display: grid; place-items: center;
  color: var(--text-faint); border-style: dashed;
  background: var(--panel-2);
}
.logo-meta { min-width: 0; }
.logo-meta b { display: block; font-size: 13.5px; font-weight: 680; margin-bottom: 3px; }
.logo-meta span { display: block; font-size: 12px; color: var(--text-faint); line-height: 1.45; }
