/* InterviewLens superadmin design system — dark by default, light via [data-theme="light"].
   Shared by the user and superadmin portals (superadmin appends its extras). */
:root {
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --bg: #0b0c18; --bg2: #11122a; --card: #15172f; --card2: #1b1e3c; --line: #262a52; --line2: #31366a;
  --text: #ecebfa; --muted: #9a9cc4; --accent: #7b6cff; --accent2: #b05cf6; --accent3: #29d3ff;
  --accent-soft: rgba(123,108,255,.14); --glass: rgba(21,23,47,.72);
  --green: #2ecc8f; --amber: #f5b342; --red: #ff5d6c; --blue: #4aa8ff; --purple: #b57bff;
  --radius: 16px; --shadow: 0 12px 40px rgba(0,0,0,.28); --shadow-sm: 0 4px 14px rgba(0,0,0,.18);
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f4f5fc; --bg2: #ffffff; --card: #ffffff; --card2: #f3f3fb; --line: #e4e5f2; --line2: #d5d7ea;
  --text: #17182c; --muted: #64678a; --accent-soft: rgba(123,108,255,.10); --glass: rgba(255,255,255,.78);
  --shadow: 0 12px 34px rgba(30,30,90,.09); --shadow-sm: 0 3px 10px rgba(30,30,90,.06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); min-height: 100vh; -webkit-font-smoothing: antialiased; transition: background .35s, color .35s; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent2); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.015em; }
code, .mono { font-family: "Cascadia Mono", Consolas, monospace; }
code { font-size: .9em; background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; } .hidden { display: none !important; }
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 2px solid var(--bg); }

/* Background decoration */
.bg-deco { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-deco i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .22; animation: drift 22s ease-in-out infinite; }
.bg-deco i:nth-child(1) { width: 520px; height: 520px; background: var(--accent); top: -180px; right: -120px; }
.bg-deco i:nth-child(2) { width: 420px; height: 420px; background: var(--accent2); bottom: -160px; left: 20%; animation-delay: -8s; opacity: .14; }
.bg-deco i:nth-child(3) { width: 300px; height: 300px; background: var(--accent3); top: 40%; left: -120px; animation-delay: -14s; opacity: .1; }
[data-theme="light"] .bg-deco i { opacity: .12; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-50px, 60px) scale(1.1); } }

/* Page load bar */
#loadbar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 999; background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3)); box-shadow: 0 0 12px var(--accent); transition: width .3s var(--ease), opacity .3s; }
#loadbar.go { width: 75%; transition: width 6s cubic-bezier(.1,.9,.2,1); }
#loadbar.done { width: 100%; opacity: 0; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff !important; font: 650 14px var(--font);
  padding: 10px 18px; border-radius: 12px; text-decoration: none !important; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(123,108,255,.28); transition: transform .15s var(--ease), box-shadow .25s, filter .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(123,108,255,.38); filter: brightness(1.06); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-ghost { background: var(--card2); color: var(--text) !important; border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.btn-danger { background: linear-gradient(135deg, #ff5d6c, #e0436f); box-shadow: 0 6px 18px rgba(255,93,108,.25); }
.btn-green { background: linear-gradient(135deg, #2ecc8f, #18a876); box-shadow: 0 6px 18px rgba(46,204,143,.25); }
.btn-amber { background: linear-gradient(135deg, #f7c15a, #f09a2c); color: #2a1d00 !important; box-shadow: 0 6px 18px rgba(245,179,66,.25); }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.45); animation: ripple .6s linear; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.icon-btn { background: var(--card2); border: 1px solid var(--line); color: var(--text); border-radius: 12px; width: 38px; height: 38px;
  display: inline-grid; place-items: center; cursor: pointer; position: relative; font-size: 16px; text-decoration: none !important; transition: transform .15s, border-color .2s, background .2s; }
.icon-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid var(--card2); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(255,93,108,.6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(255,93,108,0); } }

/* ── Forms ───────────────────────────────────────────────────────────────── */
label { display: block; font-weight: 650; font-size: 13px; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local],
input[type=search], input[type=tel], input[type=url], input[type=file], select, textarea {
  width: 100%; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 13px; font: inherit; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
input:hover, select:hover, textarea:hover { border-color: var(--line2); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type=file] { padding: 8px; } input[type=file]::file-selector-button { border: 0; border-radius: 8px; padding: 6px 12px; margin-right: 10px; cursor: pointer; background: var(--accent-soft); color: var(--text); font: inherit; }
textarea { min-height: 110px; resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 500; margin: 10px 0; cursor: pointer; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.input-group { display: flex; gap: 8px; align-items: center; } .input-group input, .input-group select { flex: 1; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 252px; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-right: 1px solid var(--line);
  padding: 18px 12px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; z-index: 30; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; flex: 1; }
.sidebar nav a, .sidebar-foot a { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; color: var(--muted);
  text-decoration: none; font-weight: 600; font-size: 14px; transition: background .2s, color .2s, transform .2s; }
.sidebar nav a span { width: 22px; text-align: center; transition: transform .25s var(--ease); }
.sidebar nav a:hover { background: var(--card2); color: var(--text); transform: translateX(3px); }
.sidebar nav a:hover span { transform: scale(1.2); }
.sidebar nav a.active { background: linear-gradient(90deg, var(--accent-soft), transparent); color: var(--text); }
.sidebar nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(var(--accent), var(--accent2)); }
.sidebar-foot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.pill { margin-left: auto; background: linear-gradient(135deg, var(--red), #e0436f); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 10px; animation: pop .4s var(--ease); }
@keyframes pop { from { transform: scale(0); } }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text) !important; text-decoration: none !important; padding: 0 8px; letter-spacing: -.02em; }
.logo { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 6px 16px rgba(123,108,255,.4); animation: logo-glow 4s ease-in-out infinite; }
@keyframes logo-glow { 50% { box-shadow: 0 6px 24px rgba(176,92,246,.6); } }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--glass);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.topbar.public { justify-content: space-between; }
.page-title { font-size: 21px; margin: 0; flex: 1; font-weight: 800; animation: slide-in .5s var(--ease) both; }
@keyframes slide-in { from { opacity: 0; transform: translateX(-12px); } }
.top-actions, .top-links { display: flex; align-items: center; gap: 10px; }
.top-links a:not(.btn) { color: var(--muted); font-weight: 600; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff !important;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; overflow: hidden; text-decoration: none !important; box-shadow: 0 0 0 3px var(--accent-soft); cursor: pointer; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.main { padding: 26px 28px 40px; max-width: 1240px; width: 100%; animation: page-in .5s var(--ease) backwards; }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } }
.public-main { max-width: 1150px; margin: 0 auto; padding: 24px 20px 40px; animation: page-in .5s var(--ease) backwards; }
.footer { display: flex; gap: 18px; flex-wrap: wrap; padding: 18px 28px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); margin-top: auto; }
.footer a { color: var(--muted); } .footer a:hover { color: var(--text); }
.mobile-only { display: none; }

/* ── Cards, stats ────────────────────────────────────────────────────────── */
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 20px; transition: border-color .25s, box-shadow .25s; }
.card:hover { border-color: var(--line2); box-shadow: var(--shadow); }
.card h2 { font-size: 17px; font-weight: 750; } .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 18px; } .grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat { position: relative; overflow: hidden; display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; color: var(--text);
  text-decoration: none !important; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.stat::after { content: ""; position: absolute; width: 140px; height: 140px; right: -50px; top: -60px; border-radius: 50%; background: radial-gradient(var(--accent-soft), transparent 70%); transition: transform .5s var(--ease); }
a.stat:hover, .stat:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); color: var(--text); }
.stat:hover::after { transform: scale(1.6); }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; } .stat .value { font-size: 27px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.stat .sub { font-size: 12px; color: var(--muted); }
.center-card, .auth-card { max-width: 460px; margin: 6vh auto; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 32px; box-shadow: var(--shadow); animation: page-in .6s var(--ease) backwards; }
.center-card h1, .auth-card h1 { font-size: 24px; text-align: center; } .big-emoji { font-size: 48px; text-align: center; animation: bounce-in .8s var(--ease) both; }
@keyframes bounce-in { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: none; } }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2);
  color: var(--text) !important; font-weight: 650; text-decoration: none !important; transition: border-color .2s, transform .2s; }
.google-btn:hover { border-color: var(--accent); transform: translateY(-2px); }

/* Entrance animation for blocks (JS sets --i for stagger) */
.anim-in { animation: rise-in .55s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } }

/* ── Alerts, badges, toasts ──────────────────────────────────────────────── */
.alert { position: relative; padding: 12px 16px; border-radius: 14px; margin-bottom: 16px; border: 1px solid; border-left-width: 4px; animation: alert-in .45s var(--ease) both; }

@keyframes alert-in { from { opacity: 0; transform: translateY(-8px); } }
.alert-success { background: rgba(46,204,143,.09); border-color: rgba(46,204,143,.35); }
.alert-info { background: rgba(74,168,255,.09); border-color: rgba(74,168,255,.35); }
.alert-warning { background: rgba(245,179,66,.1); border-color: rgba(245,179,66,.4); }
.alert-danger { background: rgba(255,93,108,.09); border-color: rgba(255,93,108,.4); }
.alert.leaving { animation: alert-out .35s var(--ease) forwards; } @keyframes alert-out { to { opacity: 0; transform: translateY(-8px); height: 0; padding: 0; margin: 0; } }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { background: rgba(46,204,143,.14); color: var(--green); } .badge-red { background: rgba(255,93,108,.14); color: var(--red); }
.badge-amber { background: rgba(245,179,66,.15); color: var(--amber); } .badge-blue { background: rgba(74,168,255,.14); color: var(--blue); }
.badge-purple { background: rgba(181,123,255,.15); color: var(--purple); } .badge-gray { background: rgba(154,156,196,.14); color: var(--muted); }
.impersonate-bar { background: repeating-linear-gradient(45deg, #f5b342, #f5b342 14px, #f7c15a 14px, #f7c15a 28px); color: #2a1d00; padding: 9px 16px; text-align: center; font-size: 14px; font-weight: 600; position: sticky; top: 0; z-index: 50; }
.impersonate-bar .btn { margin-left: 10px; background: #2a1d00; box-shadow: none; }
.toast-wrap { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 300; }
.toast { min-width: 220px; max-width: 380px; padding: 12px 16px; border-radius: 14px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  font-weight: 600; box-shadow: var(--shadow); animation: toast-in .4s var(--ease) both; }
.toast.out { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px); } } @keyframes toast-out { to { opacity: 0; transform: translateX(40px); } }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { position: sticky; top: 0; color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; background: var(--card2); white-space: nowrap; z-index: 1; }
th.sortable { cursor: pointer; user-select: none; } th.sortable:hover { color: var(--text); } th.sortable::after { content: " ↕"; opacity: .35; } th.asc::after { content: " ↑"; opacity: 1; } th.desc::after { content: " ↓"; opacity: 1; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; } tbody tr:hover { background: var(--accent-soft); }
.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.pager .muted { margin-right: auto; }
.empty { text-align: center; color: var(--muted); padding: 34px; }
.empty::before { content: "🗂"; display: block; font-size: 30px; margin-bottom: 6px; opacity: .7; }
.table-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.table-tools input { max-width: 260px; padding: 7px 12px; }

/* ── Dropdown menus ──────────────────────────────────────────────────────── */
.menu { position: relative; display: inline-block; } .menu > summary { list-style: none; cursor: pointer; } .menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px; min-width: 220px; box-shadow: var(--shadow);
  z-index: 80; display: flex; flex-direction: column; gap: 2px; animation: menu-in .2s var(--ease) both; transform-origin: top right; }
@keyframes menu-in { from { opacity: 0; transform: scale(.95) translateY(-6px); } }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 9px; color: var(--text); font: 500 13.5px var(--font); background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none; }
.menu-list a:hover, .menu-list button:hover { background: var(--accent-soft); color: var(--text); }
.menu-list form { margin: 0; } .menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.menu-list .danger { color: var(--red); }
.kebab { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--card2); color: var(--text); font-size: 16px; line-height: 1; }

/* ── Plans ───────────────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--accent); }
.plan.featured { border: 1px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, var(--accent), var(--accent2), var(--accent3)) border-box; }
.plan-badge { position: absolute; top: -12px; right: 18px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 20px; box-shadow: 0 6px 16px rgba(123,108,255,.4); }
.plan h3 { font-size: 20px; margin: 0; } .plan-days { color: var(--muted); font-weight: 600; }
.plan-price { font-size: 38px; font-weight: 800; margin: 10px 0 2px; letter-spacing: -.03em; } .plan-price s { font-size: 18px; color: var(--muted); font-weight: 400; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 20px; flex: 1; } .plan li { padding: 4px 0; font-size: 14px; }
.plan.selected { outline: 3px solid var(--green); }

/* Old landing classes (still used on a few pages) */
.hero { text-align: center; padding: 60px 10px 40px; } .hero h1 { font-size: clamp(32px, 6vw, 56px); font-weight: 800; }
.section { padding: 40px 0; } .feature { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
details.faq { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 18px; margin-bottom: 10px; transition: border-color .2s; }
details.faq[open] { border-color: var(--accent); } details.faq summary { cursor: pointer; font-weight: 650; }

/* ── Wizard ──────────────────────────────────────────────────────────────── */
.wizard { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; counter-reset: wz; }
.wizard .step { flex: 1; min-width: 130px; padding: 13px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 13px; color: var(--muted);
  text-decoration: none; transition: transform .25s var(--ease), border-color .25s; counter-increment: wz; }
.wizard .step:hover { transform: translateY(-3px); }
.wizard .step b { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.wizard .step b::before { content: counter(wz); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--card2); border: 1px solid var(--line); font-size: 12px; }
.wizard .step.done { border-color: rgba(46,204,143,.5); } .wizard .step.done b::before { content: "✓"; background: var(--green); color: #fff; border-color: var(--green); }
.wizard .step.current { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); } .wizard .step.current b::before { background: var(--accent); color: #fff; border-color: var(--accent); animation: pulse-dot 2s infinite; }

/* ── License visuals ─────────────────────────────────────────────────────── */
.key-box { position: relative; overflow: hidden; font-family: "Cascadia Mono", Consolas, monospace; font-size: 18px; letter-spacing: 1px; background: var(--accent-soft); border: 1px dashed var(--accent);
  border-radius: 12px; padding: 10px 14px; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; word-break: break-all; }
.key-box::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent); animation: sheen 4s ease-in-out infinite; }
@keyframes sheen { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.ring { --p: 50; --c: var(--accent); width: 124px; height: 124px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); animation: ring-fill 1.4s var(--ease) both; }
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes ring-fill { from { --p: 0; } }
.ring > div { width: 100px; height: 100px; border-radius: 50%; background: var(--card); display: grid; place-content: center; text-align: center; }
.ring b { font-size: 30px; line-height: 1; } .ring span { font-size: 11px; color: var(--muted); }
.lic { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; font-size: 14px; margin: 0; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
.progress { height: 9px; background: var(--line); border-radius: 9px; overflow: hidden; } .progress > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 9px; animation: bar-grow 1.2s var(--ease) both; transform-origin: left; }
@keyframes bar-grow { from { transform: scaleX(0); } }
.timeline { list-style: none; padding: 0; margin: 0; } .timeline li { padding: 10px 0 10px 20px; border-left: 2px solid var(--line); position: relative; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.chat { display: flex; flex-direction: column; gap: 12px; } .msg { max-width: 80%; padding: 12px 15px; border-radius: 16px 16px 16px 4px; background: var(--card2); white-space: pre-wrap; animation: rise-in .4s var(--ease) both; }
.msg.me { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: linear-gradient(135deg, rgba(123,108,255,.22), rgba(176,92,246,.16)); } .msg .meta { font-size: 11px; color: var(--muted); margin-top: 5px; }
.notif { display: flex; gap: 12px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); border-radius: 12px; transition: background .2s; } .notif.unread { background: var(--accent-soft); }
.notif.unread::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.qr { background: #fff; padding: 12px; border-radius: 14px; display: inline-block; box-shadow: var(--shadow); }
.wa-float { position: fixed; right: 20px; bottom: 20px; width: 54px; height: 54px; border-radius: 50%; background: #25d366; display: grid; place-items: center; font-size: 24px;
  box-shadow: 0 10px 30px rgba(37,211,102,.4); text-decoration: none !important; z-index: 40; animation: bounce-in .8s .6s var(--ease) both; }
.strength { height: 6px; border-radius: 6px; background: var(--line); margin-top: 6px; overflow: hidden; } .strength div { height: 100%; width: 0; transition: width .3s, background .3s; }
.tabs { position: relative; display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { position: relative; padding: 10px 14px; color: var(--muted); text-decoration: none !important; font-weight: 650; border-radius: 10px 10px 0 0; transition: color .2s, background .2s; }
.tabs a:hover { color: var(--text); background: var(--accent-soft); }
.tabs a.active { color: var(--text); } .tabs a.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2)); animation: bar-grow .35s var(--ease); }

/* Quick actions */
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.qa { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border-radius: 16px; background: var(--card2); border: 1px solid var(--line); color: var(--text) !important;
  text-decoration: none !important; font-weight: 650; font-size: 14px; cursor: pointer; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; font-family: var(--font); text-align: left; width: 100%; }
.qa:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.qa span:first-child { font-size: 24px; transition: transform .3s var(--ease); } .qa:hover span:first-child { transform: scale(1.2) rotate(-6deg); }
.qa small { color: var(--muted); font-weight: 500; font-size: 12px; }

/* ── Dialog (styled confirm) & command palette ───────────────────────────── */
.dlg-bg { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: rgba(5,6,15,.55); backdrop-filter: blur(6px); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.dlg { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: 0 30px 90px rgba(0,0,0,.45); animation: dlg-in .3s var(--ease) both; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.dlg h3 { margin: 0 0 8px; font-size: 19px; } .dlg p { color: var(--muted); margin: 0 0 16px; white-space: pre-line; }
.dlg .btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.cmdk { width: min(620px, 100%); align-self: start; margin-top: 12vh; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 90px rgba(0,0,0,.5); animation: dlg-in .25s var(--ease) both; }
.cmdk input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 18px 20px; font-size: 17px; background: transparent; box-shadow: none !important; }
.cmdk ul { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.cmdk li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 600; text-decoration: none; }
.cmdk li a small { margin-left: auto; color: var(--muted); font-weight: 500; }
.cmdk li.sel a { background: var(--accent-soft); }
.cmdk .foot { padding: 8px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; gap: 16px; }
kbd { font-family: inherit; font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--card2); }
.to-top2 { position: fixed; right: 22px; bottom: 86px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; z-index: 35;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(16px); transition: .3s var(--ease); }
.to-top2.show { opacity: 1; transform: none; }

/* Avatar upload */
.avatar-lg { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 0 0 5px var(--accent-soft); flex-shrink: 0; }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: -270px; transition: left .3s var(--ease); box-shadow: var(--shadow); }
  .sidebar.open { left: 0; }
  .mobile-only { display: inline-grid; }
  .main { padding: 18px 16px 30px; } .topbar { padding: 12px 16px; }
  .top-links a:not(.btn):not(.icon-btn) { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
@media print {
  .sidebar, .topbar, .footer, .no-print, .impersonate-bar, .wa-float, .bg-deco, #loadbar, .to-top2, .toast-wrap, .tabs, .filters, .bulk-bar, .pager { display: none !important; }
  body { background: #fff; color: #000; font-size: 12px; } .main { padding: 0; max-width: none; animation: none; }
  .card, .stat { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; background: #fff; } .table-wrap { border: 1px solid #ddd; }
  th { background: #f3f3f8 !important; color: #333; } * { animation: none !important; transition: none !important; }
}

/* ── Superadmin extras ───────────────────────────────────────────────────── */
:root { --accent: #5b8cff; --accent2: #8b6cff; --accent3: #29d3ff; --accent-soft: rgba(91,140,255,.14); }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 16px 12px 5px; opacity: .75; font-weight: 800; }
.sidebar nav a { padding: 7px 12px; font-size: 13.5px; }
.top-search { flex: 0 1 360px; position: relative; } .top-search input { padding: 8px 12px 8px 34px; border-radius: 12px; }
.top-search::before { content: "🔎"; position: absolute; left: 11px; top: 8px; font-size: 13px; opacity: .6; }
.cmd-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card2); color: var(--muted); font: 600 13px var(--font); cursor: pointer; }
.cmd-btn:hover { border-color: var(--accent); color: var(--text); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.filters input, .filters select { width: auto; min-width: 140px; padding: 7px 11px; border-radius: 10px; }
.filters input[type=search] { min-width: 240px; } .filters label { margin: 0; }
table.compact td, table.compact th { padding: 8px 11px; font-size: 13px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .actions form { display: inline; }
.bulk-bar { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: var(--card2); border: 1px dashed var(--line2); border-radius: 12px; margin-bottom: 12px; flex-wrap: wrap; transition: border-color .25s, background .25s; }
.bulk-bar.active { border-color: var(--accent); background: var(--accent-soft); } .bulk-count { color: var(--accent); margin-right: 6px; }
.bulk-bar select, .bulk-bar input { width: auto; padding: 6px 10px; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: pulse-green 1.6s infinite; vertical-align: middle; }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(46,204,143,.7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(46,204,143,0); } }
.feed { max-height: 520px; overflow-y: auto; font-size: 13px; }
.feed div { padding: 8px 10px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; border-radius: 8px; }
.feed div.new { animation: feed-in .9s var(--ease); } @keyframes feed-in { from { background: var(--accent-soft); transform: translateX(-10px); opacity: 0; } }
.feed time { color: var(--muted); white-space: nowrap; font-family: Consolas, monospace; }
.sql-box { font-family: "Cascadia Mono", Consolas, monospace; font-size: 13px; min-height: 140px; }
.code-block { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; white-space: pre-wrap; max-height: 420px; overflow: auto; }
.cell-trunc { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feature-group { columns: 2 320px; } .feature-group li { break-inside: avoid; padding: 3px 0; font-size: 14px; }
.chart-box { position: relative; height: 270px; }
.kpi-up { color: var(--green); } .kpi-down { color: var(--red); }
.hello { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px; border-radius: 20px; margin-bottom: 20px; color: #fff;
  background: linear-gradient(120deg, #3a4fd9, #6b4fe0 50%, #a347c9); position: relative; overflow: hidden; }
.hello::after { content: ""; position: absolute; inset: -60%; background: conic-gradient(from 0deg, transparent, rgba(255,255,255,.14), transparent 30%); animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hello > * { position: relative; z-index: 1; } .hello h2 { margin: 0; font-size: 22px; } .hello p { margin: 4px 0 0; opacity: .85; }
.hello .btn { background: rgba(255,255,255,.18); box-shadow: none; border: 1px solid rgba(255,255,255,.3); }
/* ── Animated sidebar ────────────────────────────────────────────────────── */
.sidebar nav { position: relative; }
.nav-hl { position: absolute; left: 0; right: 0; top: 0; height: 0; border-radius: 12px; pointer-events: none; z-index: 0; opacity: 0;
  background: linear-gradient(90deg, rgba(123,108,255,.20), rgba(176,92,246,.08)); border: 1px solid rgba(123,108,255,.28);
  box-shadow: 0 6px 20px rgba(123,108,255,.15); transition: top .38s var(--ease), height .38s var(--ease), opacity .25s; }
.sidebar nav:has(.nav-hl) a:hover { background: transparent; }
.sidebar nav a { z-index: 1; animation: nav-in .55s var(--ease) backwards; animation-delay: calc(var(--n, 0) * 32ms); overflow: hidden; }
@keyframes nav-in { from { opacity: 0; transform: translateX(-22px); } }
.sidebar nav a span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--card2); border: 1px solid var(--line);
  flex-shrink: 0; transition: transform .35s var(--ease), background .3s, border-color .3s, box-shadow .3s; }
.sidebar nav a:hover span { transform: rotate(-10deg) scale(1.15); border-color: var(--accent); animation: wiggle .5s var(--ease); }
@keyframes wiggle { 30% { transform: rotate(12deg) scale(1.15); } 60% { transform: rotate(-12deg) scale(1.15); } }
.sidebar nav a:hover { transform: translateX(4px); }
.sidebar nav a.active { font-weight: 750; background: linear-gradient(90deg, rgba(123,108,255,.22), rgba(176,92,246,.06)); }
.sidebar nav a.active span { background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; box-shadow: 0 6px 16px rgba(123,108,255,.45); animation: icon-pop .6s var(--ease) both .3s; }
@keyframes icon-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: none; } }
.sidebar nav a.active::before { animation: bar-glow 2.4s ease-in-out infinite; box-shadow: 0 0 12px var(--accent); }
@keyframes bar-glow { 50% { box-shadow: 0 0 20px var(--accent2); opacity: .7; } }
.sidebar nav a.active::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -50%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent); animation: nav-sheen 3.5s ease-in-out infinite 1s; }
@keyframes nav-sheen { 0%, 55% { left: -50%; } 100% { left: 120%; } }
.sidebar nav a .pill { animation: pop .4s var(--ease) both, pill-pulse 2s ease-in-out infinite 1s; }
@keyframes pill-pulse { 50% { transform: scale(1.12); } }
.nav-group { position: relative; display: flex; align-items: center; gap: 8px; animation: nav-in .55s var(--ease) both; animation-delay: calc(var(--n, 0) * 32ms); }
.nav-group::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent); transform-origin: left; animation: bar-grow .8s var(--ease) both .3s; }
.sidebar .brand .logo { transition: transform .5s var(--ease); } .sidebar .brand:hover .logo { transform: rotate(-12deg) scale(1.1); }
.sidebar-foot a:hover { color: var(--red); background: rgba(255,93,108,.08); }
.sidebar::-webkit-scrollbar { width: 6px; }
.menu-list.floating { position: fixed; right: auto; z-index: 500; overflow-y: auto; }