/* ============================================================
   CodeVault — UI
   ============================================================ */

:root {
  --bg: #060912;
  --bg-2: #0a0f1c;
  --panel: rgba(15, 21, 36, 0.72);
  --panel-solid: #0e1524;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --txt: #e9edf8;
  --muted: #8b96b0;
  --muted-2: #5f6a84;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --cyan: #22d3ee;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px -30px rgba(0, 0, 0, 0.9);
  --font: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  --sidebar: 264px;
}

* { box-sizing: border-box; }
*::selection { background: rgba(124, 92, 255, 0.4); color: #fff; }

html, body { min-height: 100%; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); background-clip: padding-box; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ic {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.ic.tiny { width: 15px; height: 15px; }
.muted { color: var(--muted); }

.grad-text {
  background: linear-gradient(100deg, #a78bfa 0%, #22d3ee 55%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: gradShift 7s ease infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---------------- background ---------------- */
.bg-layer { position: fixed; inset: 0; z-index: -1; overflow: hidden; background:
  radial-gradient(1200px 700px at 85% -10%, rgba(124, 92, 255, 0.16), transparent 60%),
  radial-gradient(900px 600px at 0% 100%, rgba(34, 211, 238, 0.10), transparent 60%),
  linear-gradient(180deg, #060912, #080d18 50%, #060912);
}
.aurora {
  position: absolute;
  width: 55vw; height: 55vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  will-change: transform;
}
.aurora.a1 { background: radial-gradient(circle, rgba(124,92,255,.5), transparent 65%); top: -22vw; right: -10vw; animation: drift1 24s ease-in-out infinite alternate; }
.aurora.a2 { background: radial-gradient(circle, rgba(34,211,238,.35), transparent 65%); bottom: -28vw; left: -12vw; animation: drift2 30s ease-in-out infinite alternate; }
.aurora.a3 { background: radial-gradient(circle, rgba(244,114,182,.24), transparent 65%); top: 35%; left: 35%; width: 40vw; height: 40vw; animation: drift3 36s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate3d(-6vw, 5vw, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(7vw, -4vw, 0) scale(1.18); } }
@keyframes drift3 { to { transform: translate3d(-4vw, -6vw, 0) scale(.9); } }

.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 20%, transparent 75%);
}
.noise {
  position: absolute; inset: 0; opacity: .045; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------- glass ---------------- */
.glass {
  background: linear-gradient(160deg, rgba(20, 27, 45, 0.75), rgba(11, 16, 29, 0.62));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: var(--shadow);
  position: relative;
}
.glass::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255,255,255,.16), transparent 32%, transparent 70%, rgba(124,92,255,.16));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass-strong {
  background: linear-gradient(160deg, rgba(24, 32, 53, 0.9), rgba(10, 15, 27, 0.92));
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  backdrop-filter: blur(26px) saturate(140%);
  box-shadow: 0 40px 100px -40px #000, 0 0 0 1px rgba(124,92,255,.06) inset;
}
.card { padding: 22px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.card-head h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.card-head p { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ---------------- buttons ---------------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--txt);
  background: rgba(255,255,255,.05);
  transition: transform .18s ease, background .2s ease, border-color .2s ease, box-shadow .25s ease;
  overflow: hidden;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.99); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn .ic { width: 17px; height: 17px; }

.btn.primary {
  background: linear-gradient(135deg, #7c5cff 0%, #6d4bff 45%, #4f46e5 100%);
  border-color: rgba(167, 139, 250, .55);
  box-shadow: 0 10px 30px -10px rgba(124, 92, 255, .75), inset 0 1px 0 rgba(255,255,255,.22);
  color: #fff;
}
.btn.primary::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  transform: translateX(-220%) skewX(-18deg);
  transition: transform .7s ease;
}
.btn.primary:hover::after { transform: translateX(320%) skewX(-18deg); }
.btn.primary:hover { box-shadow: 0 16px 40px -12px rgba(124, 92, 255, .9), inset 0 1px 0 rgba(255,255,255,.28); }
.btn.ghost { background: rgba(255,255,255,.035); border-color: var(--line); color: var(--txt); }
.btn.ghost:hover { background: rgba(255,255,255,.075); border-color: var(--line-strong); }
.btn.danger-ghost { background: rgba(251,113,133,.07); border-color: rgba(251,113,133,.25); color: #fda4af; }
.btn.danger-ghost:hover { background: rgba(251,113,133,.14); }
.btn.sm { padding: 8px 13px; font-size: 12.5px; border-radius: 10px; }
.btn.tiny { padding: 6px 10px; font-size: 11.5px; border-radius: 9px; gap: 6px; }
.btn.lg { padding: 14px 24px; font-size: 15px; border-radius: 14px; }
.btn.block { width: 100%; }

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  transition: .2s ease;
}
.icon-btn:hover { color: var(--txt); background: rgba(255,255,255,.07); transform: translateY(-1px); }

.ghost-icon {
  background: none; border: 0; color: var(--muted);
  width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center;
  transition: .2s;
}
.ghost-icon:hover { color: var(--txt); background: rgba(255,255,255,.06); }

/* ---------------- chips ---------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid rgba(124,92,255,.3);
  background: rgba(124,92,255,.12);
  color: #c4b5fd;
  white-space: nowrap;
}
.chip.subtle { border-color: var(--line); background: rgba(255,255,255,.04); color: var(--muted); }
.chip.amber { border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.1); color: #fcd34d; }
.chip.green { border-color: rgba(52,211,153,.3); background: rgba(52,211,153,.1); color: #6ee7b7; }
.chip.red { border-color: rgba(251,113,133,.3); background: rgba(251,113,133,.1); color: #fda4af; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.green { background: var(--green); box-shadow: 0 0 12px rgba(52,211,153,.8); }
.dot.red { background: var(--red); box-shadow: 0 0 12px rgba(251,113,133,.7); }
.dot.amber { background: var(--amber); box-shadow: 0 0 12px rgba(251,191,36,.7); }
.dot.cyan { background: var(--cyan); box-shadow: 0 0 12px rgba(34,211,238,.7); }

.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  position: relative;
  flex: none;
  box-shadow: 0 0 10px rgba(52,211,153,.9);
}
.pulse-dot::after {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%; border: 1px solid rgba(52,211,153,.7);
  animation: pulseRing 1.8s ease-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(.5); opacity: 1; }
  100% { transform: scale(1.9); opacity: 0; }
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-inline-start: auto; box-shadow: 0 0 10px rgba(52,211,153,.8); animation: blink 2s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------------- login ---------------- */
.login-screen {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 24px;
  transition: opacity .5s ease, visibility .5s;
}
.login-screen.out { opacity: 0; visibility: hidden; pointer-events: none; }
.login-orbit { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; border: 1px solid rgba(124,92,255,.14); animation: orbitSpin 26s linear infinite; }
.orb.o1 { width: 640px; height: 640px; top: 50%; left: 50%; margin: -320px; }
.orb.o2 { width: 880px; height: 880px; top: 50%; left: 50%; margin: -440px; animation-duration: 40s; animation-direction: reverse; border-color: rgba(34,211,238,.1); }
.orb.o3 { width: 1140px; height: 1140px; top: 50%; left: 50%; margin: -570px; animation-duration: 60s; border-style: dashed; border-color: rgba(255,255,255,.05); }
@keyframes orbitSpin { to { transform: rotate(360deg); } }

.login-card {
  width: min(440px, 100%);
  padding: 42px 36px 30px;
  text-align: center;
  position: relative;
  animation: loginIn .8s cubic-bezier(.2,.9,.2,1) both;
}
@keyframes loginIn { from { opacity: 0; transform: translateY(26px) scale(.97); } }

.vault-logo { width: 92px; height: 92px; margin: 0 auto 20px; position: relative; display: grid; place-items: center; }
.vault-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(124,92,255,.45); animation: orbitSpin 14s linear infinite; }
.vault-ring.r2 { inset: 11px; border-style: solid; border-color: rgba(34,211,238,.25); animation-direction: reverse; animation-duration: 9s; }
.vault-core {
  width: 54px; height: 54px; border-radius: 17px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(124,92,255,.32), rgba(34,211,238,.16));
  border: 1px solid rgba(167,139,250,.45);
  box-shadow: 0 0 40px -6px rgba(124,92,255,.65), inset 0 1px 0 rgba(255,255,255,.2);
  color: #d8ccff;
}
.vault-core .ic { width: 26px; height: 26px; }
.login-card h1 { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.login-sub { color: var(--muted); font-size: 13px; margin: 10px 0 28px; line-height: 1.7; }
.field-label { display: block; text-align: right; font-size: 12px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.field {
  display: flex; align-items: center; gap: 10px;
  background: rgba(5, 9, 18, .65);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 4px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field:focus-within { border-color: rgba(124,92,255,.6); box-shadow: 0 0 0 4px rgba(124,92,255,.12); }
.field-ic { color: var(--muted-2); }
.field input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none;
  padding: 12px 0;
  font-size: 14px;
  letter-spacing: .04em;
}
.field input::placeholder { color: var(--muted-2); letter-spacing: .08em; }
.check-line { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); margin: 14px 0 18px; cursor: pointer; user-select: none; }
.check-line input { display: none; }
.check-line .box {
  width: 18px; height: 18px; border-radius: 6px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  background: rgba(255,255,255,.03);
  transition: .2s;
}
.check-line .box .ic { width: 11px; height: 11px; opacity: 0; transform: scale(.5); transition: .2s; color: #fff; }
.check-line input:checked + .box { background: linear-gradient(135deg, #7c5cff, #4f46e5); border-color: transparent; }
.check-line input:checked + .box .ic { opacity: 1; transform: scale(1); }
.login-error { min-height: 20px; color: var(--red); font-size: 12.5px; margin-top: 12px; font-weight: 600; }
.login-error.shake { animation: shake .45s ease; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-7px)} 40%{transform:translateX(7px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }
.login-hint { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 11.5px; color: var(--muted-2); margin-top: 18px; }
.login-hint code { font-family: var(--mono); color: var(--muted); background: rgba(255,255,255,.05); padding: 2px 7px; border-radius: 6px; direction: ltr; }
.login-foot { position: absolute; bottom: 26px; font-size: 11px; color: var(--muted-2); letter-spacing: .02em; }

/* ---------------- shell ---------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  flex: none;
  height: 100vh;
  position: sticky; top: 0;
  padding: 26px 18px 18px;
  display: flex; flex-direction: column;
  border-inline-start: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10,15,26,.85), rgba(7,11,20,.72));
  backdrop-filter: blur(20px);
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(124,92,255,.28), rgba(34,211,238,.14));
  border: 1px solid rgba(167,139,250,.4);
  box-shadow: 0 0 26px -8px rgba(124,92,255,.8);
  color: #cdbcff;
  flex: none;
}
.brand-text strong { display: block; font-size: 19px; letter-spacing: -.02em; font-weight: 800; line-height: 1.2; }
.brand-text small { color: var(--muted-2); font-size: 10.5px; letter-spacing: .04em; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  text-align: start;
  transition: .2s ease;
  position: relative;
}
.nav-item .ic { width: 18px; height: 18px; opacity: .85; }
.nav-item:hover { color: var(--txt); background: rgba(255,255,255,.04); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(124,92,255,.18), rgba(124,92,255,.04));
  border-color: rgba(124,92,255,.22);
}
.nav-item.active::before {
  content: ''; position: absolute; inset-inline-start: -19px; top: 50%;
  width: 3px; height: 22px; margin-top: -11px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(#a78bfa, #22d3ee);
  box-shadow: 0 0 16px rgba(124,92,255,.9);
}
.nav-badge {
  margin-inline-start: auto;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  color: var(--muted);
}
.nav-item.active .nav-badge { background: rgba(124,92,255,.25); color: #d8ccff; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.server-card {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(52,211,153,.045);
}
.server-card strong { display: block; font-size: 11.5px; color: #a7f3d0; }
.server-card small { font-size: 10px; color: var(--muted-2); font-family: var(--mono); direction: ltr; display: block; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(52,211,153,.9); flex: none; }
.key-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px dashed var(--line);
  background: none;
  color: var(--muted-2);
  font-size: 10.5px;
  font-family: var(--mono);
  direction: ltr;
  transition: .2s;
  overflow: hidden;
}
.key-chip:hover { border-color: rgba(124,92,255,.4); color: var(--muted); }
.key-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.key-chip .ic { width: 13px; height: 13px; }

.main { flex: 1; min-width: 0; padding: 26px 34px 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.crumb { font-size: 11px; color: var(--muted-2); display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.crumb .sep { opacity: .5; }
.topbar h1 { font-size: 25px; font-weight: 800; letter-spacing: -.02em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.live-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 99px;
  border: 1px solid rgba(52,211,153,.22);
  background: rgba(52,211,153,.07);
  color: #a7f3d0;
  font-size: 11.5px;
  font-weight: 700;
}
.live-pill.small { padding: 6px 11px; font-size: 10.5px; }
.live-pill.off { border-color: rgba(251,113,133,.25); background: rgba(251,113,133,.08); color: #fda4af; }
.live-pill.off .pulse-dot { background: var(--red); box-shadow: 0 0 10px rgba(251,113,133,.9); }
.live-pill.off .pulse-dot::after { border-color: rgba(251,113,133,.7); }
.avatar {
  width: 40px; height: 40px; border-radius: 13px;
  border: 1px solid rgba(167,139,250,.35);
  background: linear-gradient(145deg, rgba(124,92,255,.3), rgba(34,211,238,.12));
  color: #e2d9ff;
  font-weight: 800; font-size: 12px;
  display: grid; place-items: center;
  letter-spacing: .03em;
  transition: .2s;
}
.avatar:hover { transform: translateY(-1px); box-shadow: 0 0 22px -4px rgba(124,92,255,.7); }

/* ---------------- views ---------------- */
.views { max-width: 1440px; }
.view { display: none; }
.view.active { display: block; animation: viewIn .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head h2 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.page-head p { color: var(--muted); font-size: 12.5px; margin-top: 0; }
.page-actions { display: flex; gap: 8px; }

/* ---------------- hero ---------------- */
.hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px;
  padding: 38px 40px;
  margin-bottom: 22px;
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 12% 10%, rgba(124,92,255,.16), transparent 60%),
    radial-gradient(500px 300px at 90% 100%, rgba(34,211,238,.1), transparent 60%),
    linear-gradient(160deg, rgba(22,29,49,.8), rgba(10,15,27,.7));
}
.hero-copy { max-width: 620px; position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,.03); margin-bottom: 16px; }
.hero h2 { font-size: 32px; line-height: 1.3; font-weight: 800; letter-spacing: -.025em; }
.hero p { color: var(--muted); font-size: 13.5px; line-height: 1.9; margin: 12px 0 22px; max-width: 540px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-visual { position: relative; width: 280px; height: 240px; flex: none; display: grid; place-items: center; }
.hv-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(124,92,255,.2); }
.hv-ring.r1 { inset: 40px; border-style: dashed; animation: orbitSpin 18s linear infinite; }
.hv-ring.r2 { inset: 20px; border-color: rgba(34,211,238,.13); animation: orbitSpin 26s linear infinite reverse; }
.hv-ring.r3 { inset: 62px; border-color: rgba(255,255,255,.08); }
.hv-core {
  width: 86px; height: 86px; border-radius: 26px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(124,92,255,.32), rgba(34,211,238,.12));
  border: 1px solid rgba(167,139,250,.45);
  box-shadow: 0 0 60px -10px rgba(124,92,255,.8), inset 0 1px 0 rgba(255,255,255,.2);
  color: #d9ccff;
  animation: coreFloat 6s ease-in-out infinite;
}
.hv-core .ic { width: 40px; height: 40px; }
@keyframes coreFloat { 0%,100% { transform: translateY(-4px); } 50% { transform: translateY(6px); } }
.hv-chip {
  position: absolute;
  display: flex; align-items: center; gap: 7px;
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(10,15,27,.85);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  box-shadow: 0 12px 30px -14px #000;
  animation: chipFloat 7s ease-in-out infinite;
}
.hv-chip i { width: 6px; height: 6px; border-radius: 50%; }
.hv-chip i.ok { background: var(--green); box-shadow: 0 0 8px rgba(52,211,153,.9); }
.hv-chip i.bad { background: var(--red); box-shadow: 0 0 8px rgba(251,113,133,.9); }
.hv-chip.c1 { top: 8px; left: 0; animation-delay: 0s; }
.hv-chip.c2 { bottom: 44px; right: -6px; animation-delay: 1.4s; }
.hv-chip.c3 { bottom: 6px; left: 14px; animation-delay: 2.6s; }
.hv-chip.c4 { top: 34px; right: 2px; animation-delay: 3.6s; color: #c4b5fd; }
.hv-chip .ic { width: 13px; height: 13px; }
@keyframes chipFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---------------- stats ---------------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-card {
  display: flex; align-items: center; gap: 14px;
  padding: 20px;
  overflow: hidden;
  animation: statIn .6s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: var(--d, 0ms);
}
@keyframes statIn { from { opacity: 0; transform: translateY(16px); } }
.stat-card:hover { transform: translateY(-2px); transition: transform .25s; }
.stat-ic {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  flex: none;
  border: 1px solid transparent;
}
.stat-ic .ic { width: 21px; height: 21px; }
.stat-ic.purple { background: rgba(124,92,255,.13); border-color: rgba(124,92,255,.24); color: #c4b5fd; }
.stat-ic.amber { background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.22); color: #fcd34d; }
.stat-ic.cyan { background: rgba(34,211,238,.1); border-color: rgba(34,211,238,.22); color: #67e8f9; }
.stat-ic.red { background: rgba(251,113,133,.1); border-color: rgba(251,113,133,.22); color: #fda4af; }
.stat-body { display: flex; flex-direction: column; min-width: 0; position: relative; z-index: 2; }
.stat-body span { font-size: 11.5px; color: var(--muted); }
.stat-body strong { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-body small { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-glow { position: absolute; width: 120px; height: 120px; border-radius: 50%; filter: blur(40px); opacity: .28; inset-inline-start: -30px; bottom: -60px; pointer-events: none; }
.stat-glow.purple { background: #7c5cff; }
.stat-glow.amber { background: #fbbf24; }
.stat-glow.cyan { background: #22d3ee; }
.stat-glow.red { background: #fb7185; }

/* ---------------- layout grids ---------------- */
.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-2:last-child { margin-bottom: 0; }
.grid-2 > .card { min-width: 0; }

/* ---------------- chart ---------------- */
.chart-card { display: flex; flex-direction: column; }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.chart {
  display: flex; align-items: flex-end; gap: 5px;
  height: 170px;
  padding-top: 10px;
  position: relative;
}
.chart::before {
  content: ''; position: absolute; inset: 10px 0 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 100% 33.33%;
  pointer-events: none;
}
.bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; height: 100%; position: relative; min-width: 0; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 100%; width: 100%; justify-content: center; }
.bar { width: 46%; max-width: 12px; border-radius: 4px 4px 2px 2px; min-height: 2px; transition: height .7s cubic-bezier(.2,.8,.2,1), filter .2s; position: relative; }
.bar.ok { background: linear-gradient(180deg, #34d399, rgba(52,211,153,.25)); box-shadow: 0 0 12px -2px rgba(52,211,153,.5); }
.bar.bad { background: linear-gradient(180deg, #fb7185, rgba(251,113,133,.2)); box-shadow: 0 0 12px -2px rgba(251,113,133,.45); }
.bar-group:hover .bar { filter: brightness(1.35); }
.chart-axis { display: flex; gap: 5px; margin-top: 8px; }
.chart-axis span { flex: 1; font-size: 8.5px; color: var(--muted-2); text-align: center; font-family: var(--mono); overflow: hidden; white-space: nowrap; }
.bar-tip {
  position: absolute; bottom: calc(100% + 6px);
  background: #141b2c; border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 5px 8px; font-size: 10px; white-space: nowrap;
  opacity: 0; transform: translateY(4px); pointer-events: none; transition: .18s; z-index: 5;
  font-family: var(--mono);
}
.bar-group:hover .bar-tip { opacity: 1; transform: translateY(0); }

/* ---------------- donut ---------------- */
.donut-card { display: flex; flex-direction: column; }
.donut-wrap { display: flex; align-items: center; gap: 26px; flex: 1; }
.donut {
  width: 148px; height: 148px; border-radius: 50%;
  flex: none;
  background: conic-gradient(#2a3350 0 100%);
  display: grid; place-items: center;
  position: relative;
  transition: background .8s ease;
  box-shadow: inset 0 0 30px rgba(0,0,0,.4);
}
.donut::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.06); }
.donut-hole {
  width: 104px; height: 104px; border-radius: 50%;
  background: #0b1120;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,.05), inset 0 8px 20px rgba(0,0,0,.5);
  z-index: 2;
}
.donut-hole strong { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.donut-hole span { font-size: 10px; color: var(--muted); }
.donut-legend { display: flex; flex-direction: column; gap: 11px; flex: 1; }
.dl-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.dl-row strong { margin-inline-start: auto; color: var(--txt); font-variant-numeric: tabular-nums; }

/* ---------------- mini lists ---------------- */
.mini-logs { display: flex; flex-direction: column; gap: 2px; }
.mini-log {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px;
  border-radius: 9px;
  font-size: 12px;
  transition: background .2s;
  border-bottom: 1px solid rgba(255,255,255,.035);
}
.mini-log:last-child { border-bottom: 0; }
.mini-log:hover { background: rgba(255,255,255,.035); }
.mini-log .ml-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; background: rgba(52,211,153,.1); color: #6ee7b7; }
.mini-log .ml-ic .ic { width: 13px; height: 13px; }
.mini-log.warn .ml-ic { background: rgba(251,191,36,.1); color: #fcd34d; }
.mini-log.danger .ml-ic { background: rgba(251,113,133,.12); color: #fda4af; }
.mini-log .ml-body { min-width: 0; flex: 1; }
.mini-log .ml-body strong { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-log .ml-body span { font-size: 10px; color: var(--muted-2); font-family: var(--mono); direction: ltr; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-log time { font-size: 9.5px; color: var(--muted-2); font-family: var(--mono); flex: none; }

.expiring-list { display: flex; flex-direction: column; gap: 8px; }
.expiring-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(251,191,36,.04);
  border: 1px solid rgba(251,191,36,.1);
}
.expiring-item code { font-family: var(--mono); font-size: 11px; color: #fde68a; direction: ltr; }
.expiring-item .ex-note { font-size: 10px; color: var(--muted-2); margin-inline-start: auto; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expiring-item .ex-time { font-size: 10px; color: #fcd34d; font-weight: 700; font-family: var(--mono); }
.progress-mini { height: 4px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; margin-top: 5px; }
.progress-mini i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #fbbf24, #fb7185); }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 44px 20px; color: var(--muted-2); font-size: 12px; text-align: center; }
.empty.small { padding: 26px 14px; }
.empty-ic { width: 34px; height: 34px; opacity: .35; margin-bottom: 4px; }
.empty strong { color: var(--muted); font-size: 13px; }

/* ---------------- generator ---------------- */
.generator { padding: 24px; margin-bottom: 16px; }
.gen-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.gen-title { display: flex; align-items: center; gap: 13px; }
.gen-ic {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(124,92,255,.24), rgba(34,211,238,.1));
  border: 1px solid rgba(124,92,255,.3);
  color: #c4b5fd;
  flex: none;
}
.gen-title h3 { font-size: 16px; font-weight: 700; }
.gen-title p { font-size: 12px; color: var(--muted); margin-top: 2px; }

.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.preset {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: .2s ease;
  position: relative;
}
.preset:hover { color: var(--txt); border-color: var(--line-strong); background: rgba(255,255,255,.05); transform: translateY(-1px); }
.preset.active {
  color: #fff;
  border-color: rgba(124,92,255,.55);
  background: linear-gradient(135deg, rgba(124,92,255,.25), rgba(79,70,229,.1));
  box-shadow: 0 0 22px -6px rgba(124,92,255,.6), inset 0 1px 0 rgba(255,255,255,.1);
}
.preset small { font-size: 9px; opacity: .6; margin-inline-start: 4px; }

.gen-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gfield { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.gfield > span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.gfield > span em { font-style: normal; color: var(--muted-2); font-size: 10px; }
.gfield input, .gfield select, .select {
  width: 100%;
  background: rgba(5,9,18,.6);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
}
.gfield input:focus, .gfield select:focus, .select:focus { border-color: rgba(124,92,255,.55); box-shadow: 0 0 0 3px rgba(124,92,255,.1); }
.gfield input::placeholder { color: var(--muted-2); }
.gfield select, .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b96b0' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 32px;
}
.gfield input[type=number] { font-variant-numeric: tabular-nums; }
.gfield.wide { grid-column: span 2; }
.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; }
.input-group select { width: 110px; flex: none; }
.switch-field { justify-content: flex-start; }
.switch { position: relative; width: 46px; height: 26px; display: inline-block; flex: none; margin-top: 2px; }
.switch input { display: none; }
.switch .track { position: absolute; inset: 0; border-radius: 99px; background: rgba(255,255,255,.09); border: 1px solid var(--line); transition: .25s; }
.switch .thumb { position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #6b7690; transition: .25s cubic-bezier(.3,1.4,.5,1); }
.switch input:checked + .track { background: linear-gradient(135deg, #7c5cff, #4f46e5); border-color: rgba(167,139,250,.5); box-shadow: 0 0 16px -4px rgba(124,92,255,.8); }
.switch input:checked + .track + .thumb { inset-inline-start: 23px; background: #fff; }

.gen-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.gen-summary { display: flex; gap: 8px; flex-wrap: wrap; }
.gen-btn { min-width: 190px; }
.gen-btn.loading span { opacity: .6; }
.gen-btn.loading .ic { animation: orbitSpin 1s linear infinite; }

.gen-result { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; animation: viewIn .4s ease both; }
.gen-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.gen-result-head h4 { font-size: 13px; font-weight: 700; color: #a7f3d0; display: flex; align-items: center; gap: 7px; }
.result-codes { display: flex; flex-direction: column; gap: 7px; }
.result-code {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(52,211,153,.05);
  border: 1px solid rgba(52,211,153,.15);
  animation: resultIn .45s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: var(--d, 0ms);
}
@keyframes resultIn { from { opacity: 0; transform: translateX(10px); } }
.result-code code { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; color: #d1fae5; direction: ltr; }
.result-code .rc-meta { margin-inline-start: auto; font-size: 10px; color: var(--muted-2); font-family: var(--mono); }
.result-actions { display: flex; gap: 6px; }

/* ---------------- table ---------------- */
.table-card { padding: 0; overflow: hidden; }
.table-toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 200px;
  background: rgba(5,9,18,.6);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  transition: border-color .2s;
}
.search-box:focus-within { border-color: rgba(124,92,255,.5); }
.search-box .ic { width: 15px; height: 15px; color: var(--muted-2); }
.search-box input { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 10px 0; font-size: 12.5px; }
.search-box input::placeholder { color: var(--muted-2); }
.search-box.sm { flex: 0 1 220px; min-width: 160px; }

.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); gap: 2px; }
.segmented button {
  border: 0; background: none; color: var(--muted);
  padding: 6px 12px; border-radius: 8px;
  font-size: 11.5px; font-weight: 600;
  transition: .2s;
  white-space: nowrap;
}
.segmented button:hover { color: var(--txt); }
.segmented button.active { background: rgba(124,92,255,.22); color: #fff; box-shadow: inset 0 0 0 1px rgba(124,92,255,.3); }

.table-wrap { overflow-x: auto; }
.codes-table { width: 100%; border-collapse: collapse; min-width: 940px; }
.codes-table th {
  text-align: start;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.015);
  white-space: nowrap;
}
.codes-table td { padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.035); font-size: 12.5px; vertical-align: middle; }
.codes-table tbody tr { transition: background .18s; animation: rowIn .35s ease both; }
@keyframes rowIn { from { opacity: 0; } }
.codes-table tbody tr:hover { background: rgba(255,255,255,.025); }
.codes-table tbody tr:last-child td { border-bottom: 0; }
.th-actions { text-align: center !important; }
.code-cell { display: flex; align-items: center; gap: 9px; }
.code-cell code {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .05em;
  color: #ddd6fe;
  direction: ltr;
  white-space: nowrap;
}
.copy-mini { background: none; border: 0; color: var(--muted-2); padding: 3px; border-radius: 5px; display: grid; place-items: center; transition: .2s; }
.copy-mini:hover { color: #c4b5fd; background: rgba(124,92,255,.12); }
.copy-mini .ic { width: 13px; height: 13px; }
.code-note { font-size: 10px; color: var(--muted-2); margin-top: 2px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 99px; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.status-pill i { width: 5px; height: 5px; border-radius: 50%; }
.status-pill.active { background: rgba(52,211,153,.1); color: #6ee7b7; border: 1px solid rgba(52,211,153,.22); }
.status-pill.active i { background: var(--green); box-shadow: 0 0 8px rgba(52,211,153,.9); }
.status-pill.expired { background: rgba(251,191,36,.08); color: #fcd34d; border: 1px solid rgba(251,191,36,.2); }
.status-pill.expired i { background: var(--amber); }
.status-pill.revoked { background: rgba(251,113,133,.08); color: #fda4af; border: 1px solid rgba(251,113,133,.2); }
.status-pill.revoked i { background: var(--red); }

.time-cell { min-width: 120px; }
.time-cell .countdown { font-family: var(--mono); font-size: 11px; color: var(--muted); direction: ltr; display: block; }
.time-cell .countdown.soon { color: #fcd34d; }
.time-cell .countdown.done { color: #fda4af; }
.time-cell .progress-mini { max-width: 120px; }
.time-cell .progress-mini i { background: linear-gradient(90deg, #7c5cff, #22d3ee); }
.time-cell .progress-mini i.soon { background: linear-gradient(90deg, #fbbf24, #fb7185); }

.devices-cell { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.devices-cell .ic { width: 14px; height: 14px; color: var(--muted-2); }
.devices-cell b { color: var(--txt); font-weight: 700; }
.last-use { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }
.last-use strong { display: block; color: var(--muted); font-weight: 600; font-size: 10.5px; }
.row-actions { display: flex; gap: 4px; justify-content: center; }
.row-btn { width: 29px; height: 29px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--muted-2); display: grid; place-items: center; transition: .18s; }
.row-btn .ic { width: 14px; height: 14px; }
.row-btn:hover { background: rgba(255,255,255,.06); color: var(--txt); border-color: var(--line); }
.row-btn.danger:hover { background: rgba(251,113,133,.12); color: #fda4af; border-color: rgba(251,113,133,.25); }
.row-btn.warn:hover { background: rgba(251,191,36,.1); color: #fcd34d; border-color: rgba(251,191,36,.25); }

/* mobile code cards */
.codes-mobile { display: none; }
.mcode-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
  padding: 13px;
  animation: rowIn .3s ease both;
}
.mcode-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mcode-top .code-cell code { font-size: 12px; }
.mcode-note { font-size: 10.5px; color: var(--muted-2); margin-top: 4px; }
.mcode-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; margin-top: 11px; }
.mcode-grid > div { min-width: 0; }
.mcode-grid span { display: block; font-size: 9px; color: var(--muted-2); margin-bottom: 3px; }
.mcode-grid strong { display: block; font-size: 12px; font-weight: 700; }
.mcode-grid .countdown { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.mcode-grid .countdown.soon { color: #fcd34d; }
.mcode-grid .countdown.done { color: #fda4af; }
.mcode-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.mcode-actions .btn { flex: 1; min-width: 66px; }
.mcode-actions .btn:last-child { flex: 0 0 40px; min-width: 0; }

/* ---------------- logs ---------------- */
.logs-card { padding: 0; overflow: hidden; }
.logs-toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.logs-toolbar .select.sm { width: auto; min-width: 150px; flex: none; }
.logs-toolbar .search-box.sm { flex: 1 1 200px; }
.log-stream { max-height: 640px; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 3px; }
.log-row {
  display: grid;
  grid-template-columns: 74px 26px 96px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .16s, border-color .16s;
  animation: logIn .35s ease both;
}
@keyframes logIn { from { opacity: 0; transform: translateY(-5px); } }
.log-row:hover { background: rgba(255,255,255,.04); border-color: var(--line); }
.log-row.danger { background: rgba(251,113,133,.045); border-color: rgba(251,113,133,.13); }
.log-row.danger:hover { background: rgba(251,113,133,.09); }
.log-row.warn { background: rgba(251,191,36,.03); border-color: rgba(251,191,36,.1); }
.log-time { font-family: var(--mono); font-size: 9.5px; color: var(--muted-2); direction: ltr; text-align: center; }
.log-level-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(52,211,153,.1); color: #6ee7b7; }
.log-level-ic .ic { width: 13px; height: 13px; }
.log-row.warn .log-level-ic { background: rgba(251,191,36,.1); color: #fcd34d; }
.log-row.danger .log-level-ic { background: rgba(251,113,133,.13); color: #fda4af; }
.log-row.info .log-level-ic { background: rgba(34,211,238,.1); color: #67e8f9; }
.log-event-tag { font-family: var(--mono); font-size: 9.5px; color: var(--muted); background: rgba(255,255,255,.045); border-radius: 5px; padding: 3px 6px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.log-body { min-width: 0; }
.log-body strong { display: block; font-size: 11.5px; font-weight: 600; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-body span { display: flex; gap: 8px; font-size: 9.5px; color: var(--muted-2); font-family: var(--mono); direction: ltr; white-space: nowrap; overflow: hidden; justify-content: flex-end; }
.log-body span b { color: var(--muted); font-weight: 500; }
.log-right { display: flex; align-items: center; gap: 8px; }
.risk-badge { font-size: 9px; font-weight: 800; padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,.05); color: var(--muted-2); font-family: var(--mono); }
.risk-badge.high { background: rgba(251,113,133,.14); color: #fda4af; box-shadow: 0 0 12px -4px rgba(251,113,133,.6); }
.risk-badge.mid { background: rgba(251,191,36,.12); color: #fcd34d; }
.flag-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.log-foot { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted-2); }

/* ---------------- apps ---------------- */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin-bottom: 18px; }
.app-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; animation: statIn .5s ease both; }
.app-head { display: flex; align-items: center; gap: 12px; }
.app-logo {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(34,211,238,.18), rgba(124,92,255,.14));
  border: 1px solid rgba(34,211,238,.24);
  color: #67e8f9;
  font-weight: 800;
  font-size: 15px;
  flex: none;
}
.app-head h3 { font-size: 14.5px; font-weight: 700; }
.app-head small { display: block; font-family: var(--mono); font-size: 9.5px; color: var(--muted-2); direction: ltr; margin-top: 2px; }
.app-head .chip { margin-inline-start: auto; }
.app-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.app-stat { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.app-stat strong { display: block; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.app-stat span { font-size: 9.5px; color: var(--muted-2); }
.key-row { display: flex; align-items: center; gap: 8px; background: rgba(5,9,18,.55); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; }
.key-row .kr-label { font-size: 9px; color: var(--muted-2); font-family: var(--mono); flex: none; }
.key-row code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 10px; color: var(--muted); direction: ltr; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.info-card { display: flex; gap: 16px; align-items: flex-start; }
.info-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: rgba(124,92,255,.1); border: 1px solid rgba(124,92,255,.2); color: #c4b5fd; flex: none; }
.info-card h3 { font-size: 14px; margin-bottom: 5px; }
.info-card p { font-size: 12px; color: var(--muted); line-height: 1.9; }
.info-card code, .about-card code { font-family: var(--mono); font-size: 11px; background: rgba(255,255,255,.05); padding: 1px 5px; border-radius: 4px; direction: ltr; display: inline-block; }

/* ---------------- integration ---------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.step { display: flex; gap: 13px; padding: 18px; align-items: flex-start; }
.step-n {
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(124,92,255,.3), rgba(34,211,238,.15));
  border: 1px solid rgba(124,92,255,.3);
  font-weight: 800; font-size: 13px; color: #d8ccff;
  flex: none;
}
.step strong { display: block; font-size: 12.5px; margin-bottom: 4px; }
.step p { font-size: 11px; color: var(--muted); line-height: 1.7; }

.integration-card { padding: 0; overflow: hidden; margin-bottom: 16px; }
.integration-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { border: 1px solid transparent; background: none; color: var(--muted); padding: 6px 13px; border-radius: 8px; font-size: 11.5px; font-weight: 600; transition: .2s; }
.tabs button:hover { color: var(--txt); }
.tabs button.active { background: rgba(255,255,255,.06); border-color: var(--line); color: var(--txt); }
.code-block {
  margin: 0;
  padding: 20px;
  background: rgba(4, 7, 14, .7);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.85;
  color: #c9d4ec;
  overflow: auto;
  max-height: 480px;
  white-space: pre;
  direction: ltr;
  text-align: left;
  tab-size: 2;
}
.code-block.small { max-height: 220px; font-size: 10.5px; padding: 16px; }
.code-block.tiny { max-height: 140px; font-size: 10.5px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); }
.integration-foot { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.integration-foot .chip { margin-inline-start: auto; font-family: var(--mono); }
.guard-box { display: flex; flex-direction: column; gap: 12px; }
.guard-box p { font-size: 12px; color: var(--muted); line-height: 1.8; }
.guard-list { display: flex; flex-wrap: wrap; gap: 12px; font-size: 10.5px; color: var(--muted); }
.guard-list span { display: flex; align-items: center; gap: 5px; }
.guard-list .ic { color: var(--green); }

/* ---------------- settings ---------------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
.settings-form { display: flex; flex-direction: column; gap: 13px; }
.form-actions { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.danger-zone .card-head h3 { color: #fda4af; }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.danger-row:last-child { border-bottom: 0; padding-bottom: 0; }
.danger-row strong { display: block; font-size: 12.5px; }
.danger-row p { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.about-card { display: flex; gap: 16px; align-items: flex-start; }
.about-card h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.about-card p { font-size: 11.5px; color: var(--muted); line-height: 1.9; }

/* ---------------- modal ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(3, 5, 10, .72);
  backdrop-filter: blur(10px);
  display: grid; place-items: center;
  padding: 20px;
  animation: fadeIn .22s ease both;
  overflow-y: auto;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: linear-gradient(165deg, #131a2c, #0a0f1c);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: 0 50px 120px -30px #000;
  padding: 26px;
  animation: modalIn .35s cubic-bezier(.2,.9,.3,1) both;
  position: relative;
}
.modal.wide { width: min(720px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-head p { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.modal-close { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); display: grid; place-items: center; transition: .2s; flex: none; }
.modal-close:hover { background: rgba(251,113,133,.1); color: #fda4af; border-color: rgba(251,113,133,.25); }
.modal-body { display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modal .gfield input, .modal .gfield select { background: rgba(5,9,18,.7); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-item { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.detail-item span { display: block; font-size: 9.5px; color: var(--muted-2); margin-bottom: 3px; }
.detail-item strong { font-size: 11.5px; font-weight: 600; font-family: var(--mono); direction: ltr; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-item.full { grid-column: span 2; }
.detail-json { background: rgba(4,7,14,.8); border: 1px solid var(--line); border-radius: 10px; padding: 13px; font-family: var(--mono); font-size: 10.5px; line-height: 1.7; color: #a9b6d4; max-height: 260px; overflow: auto; direction: ltr; text-align: left; white-space: pre-wrap; word-break: break-word; }
.flag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.flag { font-size: 9.5px; font-family: var(--mono); padding: 3px 8px; border-radius: 6px; background: rgba(251,113,133,.1); border: 1px solid rgba(251,113,133,.2); color: #fda4af; }
.flag.info { background: rgba(34,211,238,.08); border-color: rgba(34,211,238,.18); color: #67e8f9; }

/* ---------------- toasts ---------------- */
.toasts { position: fixed; bottom: 22px; left: 22px; z-index: 300; display: flex; flex-direction: column; gap: 9px; max-width: 360px; }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 15px;
  border-radius: 13px;
  background: rgba(16, 23, 39, .95);
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 50px -16px #000;
  font-size: 12px;
  line-height: 1.6;
  animation: toastIn .4s cubic-bezier(.2,1.2,.4,1) both;
  backdrop-filter: blur(14px);
}
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-20px); } }
.toast .t-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: rgba(52,211,153,.12); color: #6ee7b7; }
.toast .t-ic .ic { width: 14px; height: 14px; }
.toast.error .t-ic { background: rgba(251,113,133,.13); color: #fda4af; }
.toast.warn .t-ic { background: rgba(251,191,36,.12); color: #fcd34d; }
.toast.info .t-ic { background: rgba(34,211,238,.1); color: #67e8f9; }
.toast div strong { display: block; font-size: 12px; }
.toast div span { font-size: 10.5px; color: var(--muted); }

/* ---------------- misc ---------------- */
.hidden { display: none !important; }
.spin { animation: orbitSpin 1s linear infinite; }

@media (max-width: 1240px) {
  :root { --sidebar: 232px; }
  .main { padding: 22px 24px 50px; }
  .hero { padding: 30px; }
  .hero h2 { font-size: 27px; }
  .hero-visual { width: 230px; height: 210px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .gen-grid { grid-template-columns: repeat(3, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: sticky; top: 0;
    flex-direction: row; align-items: center;
    padding: 10px 14px; gap: 10px;
    border-inline-start: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }
  .brand { padding: 0; flex: none; }
  .brand-text { display: none; }
  .nav { flex-direction: row; flex: 1; overflow-x: auto; padding-bottom: 2px; }
  .nav-item { padding: 9px; }
  .nav-item span:not(.nav-badge):not(.live-dot) { display: none; }
  .nav-item.active::before { display: none; }
  .nav-badge { display: none; }
  .side-foot { display: none; }
  .top-actions .icon-btn { display: none; }
  .main { padding: 18px 16px 50px; }
  .topbar { margin-bottom: 18px; }
  .topbar h1 { font-size: 20px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 24px; }
  .hero-visual { display: none; }
  .hero h2 { font-size: 24px; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 15px; }
  .stat-body strong { font-size: 23px; }
  .gen-grid { grid-template-columns: repeat(2, 1fr); }
  .gfield.wide { grid-column: span 2; }
  .apps-grid { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: column; gap: 18px; }
  .log-row { grid-template-columns: 56px 24px 1fr; }
  .log-event-tag { display: none; }
  .log-right { grid-column: 2 / -1; justify-content: flex-end; }
  .log-stream { max-height: 520px; }
  .toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

@media (max-width: 760px) {
  .table-wrap { display: none; }
  .codes-mobile { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
}

@media (max-width: 560px) {
  .page-head { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr; }
  .gen-grid { grid-template-columns: 1fr; }
  .gfield.wide { grid-column: span 1; }
  .gen-foot { flex-direction: column; align-items: stretch; }
  .gen-btn { width: 100%; }
  .top-actions .live-pill { display: none; }
  .login-card { padding: 32px 22px 24px; }
  .login-card h1 { font-size: 28px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item.full { grid-column: span 1; }
  .page-actions { flex-wrap: wrap; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
}

/* ---------------- protect view ---------------- */
.protect-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.protect-form .gfield { margin-top: 12px; }
.path-row { display: flex; gap: 8px; }
.path-row input { flex: 1; min-width: 0; }
.protect-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.protect-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 15px 0 14px; }
.switch-row {
  display: flex; align-items: center; gap: 9px; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255,255,255,.015); color: var(--muted);
  font-size: 11px; line-height: 1.5; cursor: pointer; transition: .18s;
}
.switch-row:hover { border-color: rgba(124,92,255,.3); }
.switch-row input { width: 14px; height: 14px; accent-color: #7c5cff; flex: none; cursor: pointer; }
.switch-row:has(input:checked) { color: var(--text); border-color: rgba(124,92,255,.38); background: rgba(124,92,255,.07); }
.protect-build-btn { width: 100%; height: 44px; margin-top: 4px; }
.protect-build-btn:disabled { opacity: .6; cursor: progress; }
.protect-progress {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 13px 14px;
  border: 1px solid rgba(124,92,255,.24); border-radius: 12px; background: rgba(124,92,255,.07);
}
.pp-spinner {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  border: 2.5px solid rgba(124,92,255,.22); border-top-color: #a78bfa;
  animation: orbitSpin 1s linear infinite;
}
.protect-progress strong { display: block; font-size: 12px; }
.protect-progress small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 3px; }

.protect-steps { list-style: none; display: flex; flex-direction: column; gap: 14px; margin: 4px 0 18px; }
.protect-steps li { display: flex; gap: 12px; align-items: flex-start; }
.protect-steps li b {
  width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #c4b5fd;
  background: rgba(124,92,255,.13); border: 1px solid rgba(124,92,255,.22);
}
.protect-steps li strong { display: block; font-size: 12.5px; margin-bottom: 2px; }
.protect-steps li span { display: block; font-size: 11px; color: var(--muted); line-height: 1.65; }
.protect-note {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px;
  border-radius: 11px; border: 1px solid rgba(251,191,36,.22); background: rgba(251,191,36,.06);
}
.protect-note .ic { width: 15px; height: 15px; color: #fcd34d; flex: none; margin-top: 2px; }
.protect-note p { font-size: 10.8px; color: #d8c9a3; line-height: 1.7; }
.protect-note b { color: #fde68a; }

.protect-result { margin-bottom: 16px; border-color: rgba(52,211,153,.24); }
.protect-result-body { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.protect-file-ic {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, rgba(52,211,153,.2), rgba(34,211,238,.1));
  border: 1px solid rgba(52,211,153,.3); color: #6ee7b7;
}
.protect-file-ic .ic { width: 23px; height: 23px; }
.protect-result-info { flex: 1; min-width: 200px; }
.protect-result-info strong { display: block; font-size: 14px; margin-bottom: 5px; }
.protect-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.protect-hash {
  display: block; font-size: 9.5px; color: var(--muted-2); font-family: ui-monospace, monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}

.protect-builds { display: flex; flex-direction: column; }
.build-row {
  display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 10px; align-items: center;
  padding: 12px 4px; border-top: 1px solid var(--line);
}
.build-row:first-child { border-top: 0; }
.build-ic {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: rgba(124,92,255,.1); border: 1px solid rgba(124,92,255,.2); color: #c4b5fd;
}
.build-ic .ic { width: 17px; height: 17px; }
.build-info { min-width: 0; }
.build-info strong { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.build-info small { display: block; font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.build-tags { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 1240px) {
  .protect-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .protect-row2, .protect-options { grid-template-columns: 1fr; }
  .protect-result-body { align-items: flex-start; }
  .protect-result-body .btn { width: 100%; }
  .build-row { grid-template-columns: auto 1fr auto auto; row-gap: 8px; }
  .build-tags { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ============================================================
   Management extras — delete builds, app management, bulk codes
   ============================================================ */

.gfield-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.link-btn {
  border: 0; background: none; color: #c4b5fd; font-family: inherit; font-size: 10.5px;
  cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; opacity: .85;
}
.link-btn:hover { opacity: 1; color: #ddd6fe; }

.app-select-row { display: flex; gap: 8px; align-items: stretch; }
.app-select-row select { flex: 1; min-width: 0; }
.app-select-row .btn { flex: none; white-space: nowrap; }

.inline-alert {
  display: flex; align-items: center; gap: 7px; margin-top: 7px;
  padding: 8px 10px; border-radius: 9px; font-size: 11px; line-height: 1.6;
  background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.24); color: #fcd34d;
}
.inline-alert[hidden] { display: none; }

.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.build-del { color: var(--muted-2); }
.build-del:hover { color: #fda4af; }

/* linked EXE file */
.app-exe {
  display: flex; align-items: center; gap: 9px; margin: 10px 0 2px; padding: 9px 10px;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.025);
}
.app-exe > .ic { width: 15px; height: 15px; color: #c4b5fd; flex: none; }
.app-exe-info { flex: 1; min-width: 0; }
.app-exe-info strong { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-exe-info small { display: block; font-size: 9.5px; color: var(--muted-2); margin-top: 2px; }
.app-exe.missing { border-color: rgba(251,113,133,.28); background: rgba(251,113,133,.06); }
.app-exe.missing > .ic { color: #fda4af; }
.app-exe .btn { flex: none; }

.field-hint { display: block; font-size: 10px; line-height: 1.8; color: var(--muted-2); }
.field-hint .ic { width: 11px; height: 11px; vertical-align: -2px; margin-inline-end: 3px; color: #a78bfa; }
.field-hint b { color: #ddd6fe; font-weight: 600; }
.field-hint.missing { color: #fcd34d; }

.exe-hint {
  display: flex; align-items: center; gap: 7px; margin-top: 7px;
  padding: 8px 10px; border-radius: 9px; font-size: 10.5px; line-height: 1.6;
  background: rgba(124,92,255,.08); border: 1px solid rgba(124,92,255,.22); color: #c4b5fd;
}
.exe-hint[hidden] { display: none; }
.exe-hint .ic { width: 14px; height: 14px; flex: none; }
.exe-hint span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.exe-hint b { font-weight: 600; }
.exe-hint small { display: block; margin-top: 2px; font-size: 9.5px; opacity: .72; }
.exe-hint.missing { background: rgba(251,191,36,.07); border-color: rgba(251,191,36,.24); color: #fcd34d; }

.exe-current {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 11px 12px;
  border-radius: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.03);
}
.exe-current > .ic { width: 18px; height: 18px; color: #c4b5fd; flex: none; margin-top: 2px; }
.exe-current strong { display: block; font-size: 12px; }
.exe-current small { display: block; font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.exe-hash {
  display: block; font-size: 9px; color: var(--muted-2); margin-top: 6px; word-break: break-all;
  font-family: ui-monospace, monospace; max-height: 28px; overflow: hidden;
}

/* bulk selection */
.th-check, .td-check { width: 36px; text-align: center; padding-left: 0 !important; padding-right: 0 !important; }
.th-check input, .td-check input, .mcode-check {
  width: 15px; height: 15px; accent-color: #7c5cff; cursor: pointer; vertical-align: middle;
}
.mcode-check { margin-inline-end: 8px; flex: none; }

.bulk-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 18px; border-bottom: 1px solid rgba(124,92,255,.25);
  background: linear-gradient(90deg, rgba(124,92,255,.12), rgba(34,211,238,.06));
}
.bulk-bar[hidden] { display: none; }
.bulk-info { font-size: 11.5px; color: var(--muted); }
.bulk-info b { color: #c4b5fd; font-size: 13px; }
.bulk-actions { display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .bulk-bar { align-items: flex-start; }
  .bulk-actions { width: 100%; }
  .app-select-row .btn { padding-inline: 10px; }
}

