:root {
  --ink: #05070c;
  --ink-2: #0a1018;
  --panel: rgba(10, 18, 30, 0.78);
  --panel-solid: #0d1522;
  --line: rgba(56, 189, 248, 0.16);
  --line-strong: rgba(56, 189, 248, 0.32);
  --text: #e8f4ff;
  --muted: #8aa0b8;
  --copper: #38bdf8;
  --ember: #60a5fa;
  --mint: #22d3ee;
  --bad: #ff5c6c;
  --ok: #34d399;
  --radius: 18px;
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  background: var(--ink);
  overflow-x: hidden;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--bad); min-height: 1.2em; margin: 0; font-size: 0.9rem; }
code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  padding: 0.12em 0.4em;
  border-radius: 6px;
}

/* ===== FX LAYER ===== */
.fx-root {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.fx-mesh {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 50% 40% at 15% 20%, rgba(56, 189, 248, 0.16), transparent 55%),
    radial-gradient(ellipse 45% 50% at 85% 15%, rgba(37, 99, 235, 0.14), transparent 50%),
    radial-gradient(ellipse 60% 45% at 70% 85%, rgba(34, 211, 238, 0.08), transparent 55%),
    linear-gradient(160deg, #05070c 0%, #0a1220 45%, #060910 100%);
  animation: meshDrift 22s var(--ease) infinite alternate;
}
@keyframes meshDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1.05); }
  to { transform: translate3d(2%, 2%, 0) scale(1.12); }
}
.fx-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(243, 239, 230, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 239, 230, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  animation: gridPulse 8s ease-in-out infinite;
}
@keyframes gridPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}
.fx-noise {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  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='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.fx-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  mix-blend-mode: screen;
}
.fx-orb-a {
  width: 420px; height: 420px;
  background: #38bdf8;
  top: -120px; left: -80px;
  animation: orbA 16s ease-in-out infinite;
}
.fx-orb-b {
  width: 360px; height: 360px;
  background: #2563eb;
  bottom: -100px; right: 5%;
  animation: orbB 19s ease-in-out infinite;
}
.fx-orb-c {
  width: 280px; height: 280px;
  background: #22d3ee;
  top: 40%; right: 30%;
  opacity: 0.2;
  animation: orbC 14s ease-in-out infinite;
}
@keyframes orbA {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(80px, 60px); }
}
@keyframes orbB {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-70px, -40px); }
}
@keyframes orbC {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -50px) scale(1.2); }
}
.fx-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.fx-spotlight {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.14), transparent 65%);
  transform: translate(-50%, -50%);
  transition: opacity 0.4s;
  opacity: 0;
}

/* ===== LOGIN ===== */
.login-wrap, .app { position: relative; z-index: 1; }
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.login-stage { width: min(440px, 100%); position: relative; }
.login-marque {
  overflow: hidden;
  margin-bottom: 1.25rem;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.login-marque-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: marquee 22s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: rgba(56, 189, 248, 0.7);
  text-transform: uppercase;
}
.login-marque-track span { padding-right: 1rem; white-space: nowrap; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.login-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(24, 28, 38, 0.92), rgba(14, 16, 22, 0.88));
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 1.75rem 1.6rem 1.5rem;
  display: grid;
  gap: 0.85rem;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform-style: preserve-3d;
  transition: transform 0.2s var(--ease), box-shadow 0.3s;
}
.login-card-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.07) 48%, transparent 62%);
  transform: translateX(-120%);
  animation: shineSweep 5.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shineSweep {
  0%, 40% { transform: translateX(-120%); }
  70%, 100% { transform: translateX(120%); }
}
.login-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper);
  font-weight: 600;
}
.login-logo-wrap {
  display: grid;
  place-items: center;
  margin: 0.15rem 0 0.35rem;
}
.login-logo {
  width: min(180px, 58vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(56, 189, 248, 0.25));
  animation: logoFloat 5s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.login-card h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-align: center;
  background: linear-gradient(120deg, #e8f4ff 10%, #38bdf8 55%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-kicker { text-align: center; }
.login-sub {
  margin: -0.25rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 0.65rem;
}
.status-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(93, 206, 166, 0.06);
}
.status-card b { display: block; font-size: 0.85rem; }
.status-card small { color: var(--muted); font-size: 0.72rem; }
.logout { margin-top: 0; }

.hero-banner {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(120deg, rgba(232, 162, 90, 0.14), rgba(255, 107, 61, 0.06) 45%, rgba(18, 22, 32, 0.5)),
    var(--panel);
  backdrop-filter: blur(16px);
  overflow: hidden;
  position: relative;
  animation: panelEnter 0.5s var(--ease);
}
.hero-banner h3 {
  margin: 0.35rem 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  letter-spacing: -0.03em;
}
.hero-banner p.muted { margin: 0; max-width: 42ch; }
.hero-badge {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #000;
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.22);
  overflow: hidden;
  animation: none;
  padding: 0;
}
.hero-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1rem;
  align-items: start;
}
.console-mock {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #07090d;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.55;
}
.console-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  background: #12161e;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.62rem;
}
.console-bar span {
  width: 8px; height: 8px; border-radius: 50%;
  background: #3a4250;
}
.console-bar span:nth-child(1) { background: #ff5c6c; }
.console-bar span:nth-child(2) { background: #f0b429; }
.console-bar span:nth-child(3) { background: #5dcea6; }
.console-mock pre {
  margin: 0;
  padding: 0.75rem 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.console-ok { color: #5dcea6; border-bottom: 1px solid rgba(255,255,255,0.05); }
.console-bad { color: #ff8a95; }

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: revealUp 0.7s var(--ease) forwards;
}
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.4s; }
@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== APP SHELL ===== */
.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  animation: appIn 0.55s var(--ease);
}
@keyframes appIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(12, 14, 20, 0.88), rgba(10, 12, 16, 0.75));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.4rem 1rem;
}
.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  background: #000;
  border: 1px solid var(--line-strong);
}
.brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.brand small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.62rem;
}

.side-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-height: 0;
}
.nav-pill {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(232, 162, 90, 0.18), rgba(255, 107, 61, 0.08));
  border: 1px solid var(--line-strong);
  transition: transform 0.35s var(--ease), height 0.25s var(--ease);
  pointer-events: none;
  z-index: 0;
}
.nav, .logout, button {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  text-align: left;
  font: inherit;
  position: relative;
  z-index: 1;
  transition: color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  width: 100%;
  isolation: isolate;
}
.nav:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.nav.active { color: #fff6e8; font-weight: 600; }
.nav-label {
  position: relative;
  z-index: 1;
  line-height: 1.2;
}
.nav-ico {
  position: relative;
  z-index: 1;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(232, 162, 90, 0.12);
  border: 1px solid var(--line);
  color: var(--copper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}
.logout {
  border: 1px solid var(--line);
  color: var(--muted);
}
.logout:hover {
  color: var(--bad);
  border-color: rgba(255, 92, 108, 0.4);
  background: rgba(255, 92, 108, 0.08);
}

.main {
  padding: 1.35rem 1.6rem 2.5rem;
  max-width: 1200px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.35rem;
  flex-wrap: wrap;
}
.topbar-titles {
  min-width: 0;
  position: relative;
  z-index: 2;
}
.topbar-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  line-height: 1.2;
}
.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  position: relative;
  z-index: 1;
  background: none;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}
.topbar-live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.8rem;
  color: var(--muted);
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(93, 206, 166, 0.55);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(93, 206, 166, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(93, 206, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(93, 206, 166, 0); }
}

.tab.panel-enter,
.tab:not(.hidden) {
  animation: panelEnter 0.45s var(--ease);
}
@keyframes panelEnter {
  from { opacity: 0; transform: translateY(16px) scale(0.985); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 162, 90, 0.45), transparent);
  opacity: 0.8;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.table-search {
  flex: 1 1 180px;
  max-width: 280px;
  margin-left: auto;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 0.85rem;
}
.table-search::placeholder {
  color: var(--muted);
}
.table-search:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
}
.logs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 0.85rem;
  align-items: center;
}
.logs-filters .table-search {
  margin-left: 0;
  max-width: 320px;
  flex: 1 1 200px;
}
.logs-filters select {
  min-width: 140px;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 0.85rem;
}
.dash-mini {
  margin: 0;
}
.dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.dash-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.88rem;
}
.dash-list li span:last-child {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.dash-list .empty {
  color: var(--muted);
  border-style: dashed;
}
.ip-hide {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.ip-hide .ip-masked {
  letter-spacing: 0.08em;
  color: var(--muted);
  font-size: 0.85rem;
}
.ip-hide[data-open="1"] .ip-masked {
  color: var(--text);
  letter-spacing: normal;
}
.ip-reveal {
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  color: var(--muted);
  cursor: pointer;
  border-radius: 5px;
}
.ip-reveal:hover {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.45);
}
.dl-link-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.get-reveal {
  text-align: center;
}
.get-reveal-secret {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-all;
}
.card-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.chip {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--copper);
  background: rgba(232, 162, 90, 0.08);
}
.chip.warn { color: #f0b429; border-color: rgba(240, 180, 41, 0.35); background: rgba(240, 180, 41, 0.08); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.stat {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  backdrop-filter: blur(14px);
  transform: translateY(12px);
  opacity: 0;
  animation: statIn 0.55s var(--ease) forwards;
}
.stat:nth-child(1) { animation-delay: 0.05s; }
.stat:nth-child(2) { animation-delay: 0.12s; }
.stat:nth-child(3) { animation-delay: 0.19s; }
.stat:nth-child(4) { animation-delay: 0.26s; }
@keyframes statIn {
  to { opacity: 1; transform: none; }
}
.stat::after {
  content: "";
  position: absolute;
  right: -20%;
  top: -40%;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 162, 90, 0.18), transparent 70%);
}
.stat span { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.stat b {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #fff 0%, #38bdf8 140%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pipeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.pipeline li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.pipeline li:hover {
  border-color: var(--line-strong);
  background: rgba(232, 162, 90, 0.06);
  transform: translateX(4px);
}
.pipeline li span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--copper);
  padding-top: 0.15rem;
}
.pipeline b { display: block; margin-bottom: 0.15rem; }
.pipeline p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.verify-line { margin: 1rem 0 0; word-break: break-all; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: end;
}
.form-grid .full { grid-column: 1 / -1; }
label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
input, select, textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  padding: 0.7rem 0.8rem;
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(232, 162, 90, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 162, 90, 0.12);
}
textarea {
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.45;
}

.btn-primary, button[type="submit"] {
  background: linear-gradient(120deg, #38bdf8, #2563eb);
  color: #041018;
  border: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1.1rem;
  position: relative;
  overflow: hidden;
}
.btn-primary i {
  width: 18px; height: 1px;
  background: currentColor;
  transition: width 0.25s var(--ease);
}
.btn-primary:hover i { width: 28px; }
.btn-primary:hover, button[type="submit"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.btn-primary:active, button[type="submit"]:active { transform: translateY(1px); }

.check-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
}
.check-row input { width: auto; }

.file-drop {
  position: relative;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  background: rgba(232, 162, 90, 0.04);
  transition: border-color 0.2s, background 0.2s;
}
.file-drop:hover { border-color: var(--copper); background: rgba(232, 162, 90, 0.08); }
.file-drop-label {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--copper);
  font-weight: 600;
}
.file-drop input[type="file"] { border: none; background: transparent; padding: 0; }

.table-card {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-card table {
  min-width: 640px;
}
th, td {
  text-align: left;
  padding: 0.7rem 0.45rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
tbody tr {
  transition: background 0.2s;
}
tbody tr:hover { background: rgba(232, 162, 90, 0.05); }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.row-actions button,
.row-actions .btn-file {
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
}
.row-actions button:hover,
.row-actions .btn-file:hover {
  color: var(--text);
  border-color: var(--line-strong);
}
.badge {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #243041;
}
.badge.ok { background: rgba(93, 206, 166, 0.15); color: var(--ok); }
.badge.bad { background: rgba(255, 92, 108, 0.15); color: var(--bad); }

.key-reveal {
  border-color: rgba(93, 206, 166, 0.35);
  background: linear-gradient(120deg, rgba(93, 206, 166, 0.1), rgba(18, 22, 32, 0.8));
  animation: keyPop 0.5s var(--ease);
}
@keyframes keyPop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: none; }
}
.report {
  margin-top: 0.85rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  max-height: 240px;
}

@media (max-width: 980px) {
  .dash-grid { grid-template-columns: 1fr; }
  .hero-banner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    height: auto;
    position: relative;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .side-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.35rem;
    padding-bottom: 0.25rem;
  }
  .nav {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .nav-pill { display: none; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
