/* ═══════════════════════════════════════════════════════════════════
   STATIC — design system
   Self-contained. No external fonts, images or scripts.
   ═══════════════════════════════════════════════════════════════════ */

:root{
  --bg: #0a0a0a;
  --bg-soft: #0d0d0d;
  --panel: #121212;
  --panel-2: #1a1a1a;
  --panel-3: #222222;
  --border: #2a2a2a;
  --border-soft: #1f1f1f;
  --text: #f0f0f0;
  --text-dim: #a0a0a0;
  --text-faint: #666666;
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, .10);
  --accent-line: rgba(255, 255, 255, .24);
  --accent-ink: #0a0a0a;
  --green: #8f8f8f;
  --red: #cc5555;
  --amber: #a8a8a8;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 30px 70px -30px rgba(0,0,0,.85);
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", ui-monospace, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 82% -8%, rgba(255,255,255,.07), transparent 60%),
    radial-gradient(760px 520px at 6% 108%, rgba(255,255,255,.06), transparent 62%);
}

h1, h2, h3, h4, p{ margin: 0; }
a{ color: inherit; text-decoration: none; }
button, input, select, textarea{ font: inherit; color: inherit; }
button{ cursor: pointer; }
img{ max-width: 100%; display: block; }
svg{ display: inline-block; vertical-align: -0.125em; }

::selection{ background: var(--accent); color: var(--accent-ink); }

::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-track{ background: transparent; }
::-webkit-scrollbar-thumb{ background: #2e2e2e; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover{ background: #3a3a3a; }

/* ───────────────────────── Reusable ───────────────────────── */

.logo{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.logo-text{
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .16em;
}
.logo-dot{ color: var(--accent); }

.title{
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.08;
}
.subtitle{
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 8px;
  max-width: 56ch;
}

.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: rgba(255,255,255,.02);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}
.dot{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  flex: 0 0 auto;
}
.pill .dot{ background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.status-inline{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-faint);
}
.status-inline .dot{ background: var(--green); box-shadow: 0 0 0 3px rgba(143,143,143,.12); }

.status-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}
.status-chip .dot{ background: var(--amber); }

.accent{ color: var(--accent) !important; }
.muted{ color: var(--text-faint); }
.strong{ color: var(--text); font-weight: 650; }
.mono{ font-family: var(--mono); font-size: 12px; }

.tag{
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 650;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-dim);
}
.tag-accent{ color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.tag-amber{ color: var(--amber); border-color: rgba(168,168,168,.28); background: rgba(168,168,168,.09); }

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:active{ transform: translateY(1px); }
.btn svg{ width: 15px; height: 15px; }
.btn-primary{
  background: linear-gradient(145deg, #ffffff, #d9d9d9);
  color: var(--accent-ink);
  box-shadow: 0 12px 26px -14px rgba(255,255,255,.18);
}
.btn-primary:hover{ filter: brightness(1.04); box-shadow: 0 16px 34px -14px rgba(255,255,255,.26); }
.btn-ghost{
  background: var(--panel-2);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover{ background: var(--panel-3); border-color: #2f2f2f; }
.btn.block{ width: 100%; }
.btn[disabled], .btn:disabled{ opacity: .45; cursor: not-allowed; box-shadow: none; }

.icon-btn{
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dim);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.icon-btn:hover{ background: var(--panel-3); color: var(--text); border-color: #2f2f2f; }
.icon-btn.small{ width: 30px; height: 30px; border-radius: 8px; font-size: 13px; }
.icon-btn.danger:hover{ color: var(--red); border-color: rgba(204,85,85,.35); background: rgba(204,85,85,.08); }
.icon-btn.success:hover{ color: var(--green); border-color: rgba(143,143,143,.35); background: rgba(143,143,143,.08); }

/* Cards */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.008));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, var(--shadow);
  overflow: hidden;
}
.card-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.card-head-left{ display: flex; align-items: center; gap: 12px; min-width: 0; }
.card-body{ padding: 20px; }

.acc-icon{
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--accent);
  font-size: 16px;
}
.acc-label{ font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; }
.acc-sub{ font-size: 12px; color: var(--text-faint); margin-top: 2px; }

/* Form controls */
.acc-input,
.modal-field input,
.mini-input{
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.acc-input::placeholder,
.modal-field input::placeholder,
.mini-input::placeholder{ color: #555555; }
.acc-input:focus,
.modal-field input:focus,
.mini-input:focus{
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--panel);
}

/* ───────────────────────── Auth ───────────────────────── */

.auth-shell{
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 1;
}
.auth-glow{
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  pointer-events: none;
}
.auth-glow-a{ width: 520px; height: 520px; top: -160px; right: -80px; background: rgba(255,255,255,.14); }
.auth-glow-b{ width: 460px; height: 460px; bottom: -180px; left: -120px; background: rgba(255,255,255,.07); }

.auth-gate{
  position: relative;
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  perspective: none;
}

.auth-float{
  position: relative;
  isolation: isolate;
  --auth-glow-x: 50%;
  --auth-glow-y: 42%;
  animation: authFloat 9s ease-in-out infinite;
  will-change: transform;
}
.auth-float-glow{
  position: absolute;
  inset: 6% 2%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(closest-side at var(--auth-glow-x) var(--auth-glow-y), rgba(255,255,255,.16), rgba(255,255,255,.04) 56%, transparent 78%);
  filter: blur(30px);
  opacity: .8;
  animation: authGlowPulse 9s ease-in-out infinite;
}

.auth-card{
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)),
    rgba(18,18,18,.96);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.02) inset;
  transform: translate3d(var(--auth-x, 0px), var(--auth-y, 0px), 0);
  transition: transform .38s ease-out;
  will-change: transform;
}
.auth-gate:hover .auth-card{ transition: transform .09s linear; }
.auth-card::before,
.auth-card::after{
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.3);
}
.auth-card::before{ top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.auth-card::after{ bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.auth-brandline{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(90deg, rgba(255,255,255,.045), transparent 62%);
}
.auth-node{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.auth-node .dot{
  background: #8f8f8f;
  box-shadow: 0 0 0 3px rgba(143,143,143,.1);
  animation: dotPulse 3.2s ease-in-out infinite;
}

.auth-switch{
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(0,0,0,.18);
}
.auth-switch-btn{
  position: relative;
  padding: 13px 12px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .02em;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.auth-switch-btn + .auth-switch-btn{ border-left: 1px solid var(--border-soft); }
.auth-switch-btn:hover{ color: var(--text-dim); }
.auth-switch-btn.active{ color: var(--text); background: rgba(255,255,255,.035); }
.auth-switch-btn.active::after{
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #f0f0f0, transparent);
  box-shadow: 0 0 8px rgba(255,255,255,.45);
}

.auth-form-view{
  padding: 24px 22px 20px;
  transition: opacity .16s ease, transform .16s ease;
}
.auth-form-view.auth-view-leave{
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}
.auth-form-view.auth-view-enter{
  animation: authViewIn .44s cubic-bezier(.22,.7,.24,1) both;
}
@keyframes authViewIn{
  from{ opacity: 0; transform: translateY(12px); }
  to{ opacity: 1; transform: translateY(0); }
}
.auth-form-head{ margin-bottom: 20px; }
.auth-form-head h2{
  margin: 0;
  font-size: 26px;
  font-weight: 720;
  letter-spacing: -.035em;
}
.auth-form-head p{ color: var(--text-faint); font-size: 13px; margin-top: 6px; }

.auth-foot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  color: #4d4d4d;
  font-size: 11px;
  letter-spacing: .04em;
}
.auth-foot .mono{ font-size: 10px; letter-spacing: .14em; }

/* Register — provisioning flow */
.auth-register{
  background:
    radial-gradient(360px 160px at 100% 0%, rgba(255,255,255,.035), transparent 70%),
    transparent;
}
.reg-steps{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #555555;
}
.reg-step{ display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.reg-step b{
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid #2c2c2c;
  color: #666666;
  font-size: 9px;
  font-weight: 600;
}
.reg-step.active{ color: #e8e8e8; }
.reg-step.active b{ border-color: #e8e8e8; background: #e8e8e8; color: #0a0a0a; animation: regStepPulse 3.6s ease-in-out infinite; }
.reg-track{ position: relative; flex: 1; height: 1px; background: linear-gradient(90deg, #333333, transparent); overflow: hidden; }
.reg-track::after{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: regTrackSweep 4.2s ease-in-out infinite;
}
@keyframes regStepPulse{
  0%, 100%{ box-shadow: 0 0 0 0 rgba(232,232,232,0); }
  50%{ box-shadow: 0 0 0 4px rgba(232,232,232,.08); }
}
@keyframes regTrackSweep{
  0%, 12%{ left: -45%; opacity: 0; }
  28%{ opacity: 1; }
  68%{ opacity: 1; }
  88%, 100%{ left: 105%; opacity: 0; }
}

.auth-register.auth-view-enter .auth-field,
.auth-register.auth-view-enter .key-slot,
.auth-register.auth-view-enter .auth-btn,
.auth-register.auth-view-enter .auth-security{
  animation: authFieldIn .5s cubic-bezier(.22,.7,.24,1) both;
}
.auth-register.auth-view-enter .auth-field:nth-of-type(1){ animation-delay: .04s; }
.auth-register.auth-view-enter .auth-field:nth-of-type(2){ animation-delay: .1s; }
.auth-register.auth-view-enter .key-slot{ animation-delay: .16s; }
.auth-register.auth-view-enter .auth-btn{ animation-delay: .22s; }
.auth-register.auth-view-enter .auth-security{ animation-delay: .28s; }
@keyframes authFieldIn{
  from{ opacity: 0; transform: translateY(9px); }
  to{ opacity: 1; transform: translateY(0); }
}

.key-slot{
  position: relative;
  margin: 4px 0 16px;
  padding: 12px;
  border: 1px dashed #303030;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.014) 0 6px, transparent 6px 12px),
    rgba(0,0,0,.22);
  overflow: hidden;
  animation: keySlotBreathe 5.4s ease-in-out infinite;
}
.key-slot::after{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 46%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.07), transparent);
  transform: translateX(-160%) skewX(-12deg);
  animation: keySlotScan 7s ease-in-out infinite;
}
@keyframes keySlotBreathe{
  0%, 100%{ border-color: #303030; box-shadow: inset 0 0 0 rgba(255,255,255,0); }
  50%{ border-color: #454545; box-shadow: inset 0 0 28px rgba(255,255,255,.045); }
}
@keyframes keySlotScan{
  0%, 52%{ transform: translateX(-160%) skewX(-12deg); opacity: 0; }
  62%{ opacity: 1; }
  86%, 100%{ transform: translateX(340%) skewX(-12deg); opacity: 0; }
}
.key-slot::before{
  content: "";
  position: absolute;
  left: -1px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: #e8e8e8;
  opacity: .55;
}
.key-slot-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7a7a7a;
}
.key-slot-head > span:first-child{ display: inline-flex; align-items: center; gap: 6px; }
.key-slot-head svg{ width: 11px; height: 11px; }
.key-slot-tag{ color: #8f8f8f; }
.key-wrap{ border-color: #333333; background: #0a0a0a; }
.key-inp{
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.key-inp::placeholder{ color: #4f4f4f; letter-spacing: .08em; }
.key-hint{
  display: block;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  color: #4d4d4d;
}
.auth-btn.auth-btn-reg{
  border: 1px solid #3a3a3a;
  background: linear-gradient(145deg, #1c1c1c, #101010);
  color: #f0f0f0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.auth-btn.auth-btn-reg:hover{
  border-color: #5a5a5a;
  background: linear-gradient(145deg, #242424, #141414);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 30px -12px rgba(255,255,255,.28);
}

.auth-field{ margin-bottom: 15px; }
.auth-field label{
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.field-wrap{
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field-wrap:focus-within{
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--panel);
}
.field-icon{
  width: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-size: 15px;
}
.field-wrap:focus-within .field-icon{ color: var(--accent); }
.fld-inp{
  flex: 1;
  min-width: 0;
  padding: 13px 4px;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13.5px;
}
.fld-inp::placeholder{ color: #555555; }
.field-toggle{
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  border-radius: 10px;
  margin-right: 2px;
}
.field-toggle:hover{ color: var(--text); background: rgba(255,255,255,.04); }

.auth-err{
  min-height: 18px;
  margin: 4px 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--red);
}
.auth-err.auth-ok{ color: var(--green); }

.auth-btn{
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff, #d9d9d9);
  color: var(--accent-ink);
  font-size: 13.5px;
  font-weight: 750;
  letter-spacing: -.01em;
  box-shadow: 0 16px 34px -16px rgba(255,255,255,.18);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.auth-btn:hover{ transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 20px 40px -16px rgba(255,255,255,.26); }
.auth-btn:active{ transform: translateY(0); }
.auth-btn svg{ width: 16px; height: 16px; }
.btn-shine{
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.35) 50%, transparent 80%);
  transform: translateX(-120%);
  animation: shine 3.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shine{ 0%, 55%{ transform: translateX(-120%); } 100%{ transform: translateX(120%); } }

.auth-security{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  font-size: 11.5px;
  color: var(--text-faint);
}
.auth-security svg{ width: 13px; height: 13px; color: var(--green); }

/* ───────────────────────── App shell ───────────────────────── */

.app-shell{
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ── Top navigation ── */
.topnav{
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.topnav::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  opacity: .7;
  pointer-events: none;
}
.topnav-inner{
  width: min(1280px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
  height: 70px;
  padding: 0 clamp(16px, 3vw, 32px);
}
.topnav .logo{ flex: 0 0 auto; }

.side-nav{
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.nav-item{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.nav-item svg{ width: 16px; height: 16px; color: var(--text-faint); transition: color .18s ease; }
.nav-item:hover{ color: var(--text); background: rgba(255,255,255,.035); border-color: var(--border-soft); }
.nav-item:hover svg{ color: var(--text-dim); }
.nav-item.active{
  color: var(--text);
  border-color: var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
}
.nav-item.active::before{
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255,255,255,.45);
}
.nav-item.active svg{ color: var(--accent); }

.topnav-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}
.topnav .user-row{
  padding: 5px 10px 5px 5px;
  gap: 9px;
  border-color: var(--border);
  background: transparent;
}
.topnav .user-row:hover{ border-color: #3a3a3a; background: var(--panel); }
.topnav .avatar{ width: 30px; height: 30px; font-size: 11px; }
.topnav .user-meta{ flex: 0 0 auto; }
.topnav .user-sub{ display: none; }
.topnav .user-name{ font-size: 12.5px; }
.topnav .avatar-edit-badge{ width: 18px; height: 18px; }

.user-row{
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.user-row:hover{ border-color: #2f2f2f; background: var(--panel-2); }
.user-meta{ min-width: 0; }
.user-name{ font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-sub{ font-size: 11px; color: var(--text-faint); }
.avatar{
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: #333333;
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.avatar.large{ width: 54px; height: 54px; font-size: 16px; }
.avatar-edit-badge{
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--text-faint);
  opacity: .7;
  font-size: 12px;
}
.user-row:hover .avatar-edit-badge{ opacity: 1; color: var(--accent); }

.main{ min-width: 0; display: flex; flex-direction: column; }

.wrap{
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(26px, 3.4vw, 44px) clamp(18px, 3vw, 34px) 72px;
}

.mobile-only{ display: none; }
.sidebar-backdrop{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}

/* ───────────────────────── Views ───────────────────────── */

.view{ display: none; }
.view.active{ display: block; }
.view.view-leave{ animation: viewOut .14s ease forwards; pointer-events: none; }
.view.view-enter{ animation: viewIn .46s cubic-bezier(.22,.7,.24,1) backwards; }
.view.view-enter > *:not(.hero):not(.profile-banner){
  animation: viewChildIn .42s cubic-bezier(.22,.7,.24,1) backwards;
}
.view.view-enter > *:nth-child(1){ animation-delay: .02s; }
.view.view-enter > *:nth-child(2){ animation-delay: .06s; }
.view.view-enter > *:nth-child(3){ animation-delay: .1s; }
.view.view-enter > *:nth-child(4){ animation-delay: .14s; }
.view.view-enter > *:nth-child(5){ animation-delay: .18s; }

.hero{
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr);
  gap: 28px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 24px;
  border: 1px solid var(--border);
  background:
    radial-gradient(620px 300px at 100% 0%, rgba(255,255,255,.09), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.008));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero::after{
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 80% 10%, #000, transparent 70%);
  pointer-events: none;
  opacity: .6;
}
.hero-main{ position: relative; z-index: 1; }
.hero-topline{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.hero .title{ font-size: clamp(34px, 4.6vw, 52px); }
.hero .subtitle{ margin-top: 10px; }
.hero-actions{ display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

.hero-side{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-self: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(10,10,10,.5);
  overflow: hidden;
}
.readout{ padding: 14px 16px; border-bottom: 1px solid var(--border-soft); }
.readout:last-child{ border-bottom: 0; }
.sr-label{ display: block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); }
.sr-value{ display: block; margin-top: 4px; font-size: 14px; font-weight: 650; }

.stat-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.stat-card{
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.006));
  transition: border-color .18s ease, transform .18s ease;
}
.stat-card:hover{ border-color: #2f2f2f; transform: translateY(-2px); }
.stat-ico{
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--accent);
  font-size: 15px;
  margin-bottom: 14px;
}
.stat-label{ font-size: 11.5px; color: var(--text-faint); letter-spacing: .04em; }
.stat-value{ margin-top: 4px; font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.stat-value span{ display: block; font-size: 11px; font-weight: 500; color: var(--text-faint); letter-spacing: 0; margin-top: 2px; }
.accent-card{ border-color: var(--accent-line); background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.01)); }

.two-col{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.info-list{ display: flex; flex-direction: column; gap: 0; padding: 6px 20px; }
.info-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.info-row:last-child{ border-bottom: 0; }
.info-row span{ color: var(--text-faint); }
.info-row strong{ font-weight: 650; }

.empty-state{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  min-height: 190px;
  color: var(--text-faint);
  font-size: 12.5px;
}
.empty-ico{
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px dashed #2e2e2e;
  color: var(--text-faint);
  font-size: 20px;
  margin-bottom: 6px;
}
.empty-state strong{ color: var(--text-dim); font-size: 13.5px; font-weight: 650; }

/* ───────────────────────── Account ───────────────────────── */

.profile-banner{
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(500px 180px at 0% 0%, rgba(255,255,255,.08), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.008));
}
.profile-banner-meta{ flex: 1; min-width: 0; }
.profile-banner .user-name{ font-size: 19px; letter-spacing: -.02em; }
.profile-ids{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.profile-ids .mono{
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.profile-sep{
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-faint);
  opacity: .55;
  flex: 0 0 auto;
}
.profile-banner-tags{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}
@media (max-width: 640px){
  .profile-banner{ flex-wrap: wrap; align-items: flex-start; }
  .profile-banner-meta{ flex: 1 1 auto; }
  .profile-banner-tags{ justify-content: flex-start; width: 100%; padding-left: 60px; }
}

.acc-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.acc-key-row{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.acc-key-masked{
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acc-meta-row{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.acc-meta-label{ font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.acc-meta-value{ margin-top: 3px; font-size: 13.5px; font-weight: 650; }
.acc-bar{
  height: 6px;
  border-radius: 99px;
  background: var(--panel-3);
  overflow: hidden;
  margin: 16px 0 12px;
}
.acc-bar-fill{
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9a9a9a, var(--accent));
}
.acc-license-foot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-faint);
}
.acc-license-foot a{ color: var(--text); font-weight: 650; }
.acc-license-foot a:hover{ color: var(--accent); }

.acc-notice{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 11px;
  border: 1px solid rgba(168,168,168,.22);
  background: rgba(168,168,168,.06);
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.55;
}
.acc-notice svg{ width: 16px; height: 16px; flex: 0 0 auto; color: var(--amber); margin-top: 1px; }

.acc-stat-boxes{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.acc-stat-box{
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  text-align: center;
}
.acc-stat-num{ font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.acc-stat-label{ margin-top: 3px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }

.identity-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 22px; }
.identity-item{
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.identity-item span{ display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.identity-item strong{ display: block; margin-top: 4px; font-size: 14.5px; font-weight: 650; }

.form-section{ padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--border-soft); }
.form-section:first-of-type{ padding-top: 0; margin-top: 0; border-top: 0; }
.form-section-title{ font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 14px; }
.form-row{
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.form-row label{ font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.form-actions{ display: flex; justify-content: flex-end; margin-top: 12px; }

/* ───────────────────────── Product ───────────────────────── */

.product-badge{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border-radius: 99px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.product-badge .dot{ background: var(--accent); }
.product-badge.muted{ color: var(--text-faint); border-color: var(--border); background: var(--panel-2); }
.product-badge.muted .dot{ background: var(--text-faint); }

.product-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.product-card{
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.008));
  box-shadow: var(--shadow);
  transition: border-color .18s ease, transform .18s ease;
}
.product-card:hover{ border-color: #2f2f2f; transform: translateY(-2px); }
.product-card-muted{ opacity: .72; }
.product-card-muted:hover{ transform: none; }
.product-card-top{ display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-card-icon{
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--accent);
  font-size: 19px;
}
.product-card-title{ font-size: 16px; font-weight: 720; letter-spacing: -.02em; }
.product-card-sub{ color: var(--text-faint); font-size: 12.5px; margin-top: -6px; }
.product-key{
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.product-key-label{ display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 7px; }
.product-key-row{ display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-key-row > span{ font-family: var(--mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-key-actions{ display: flex; gap: 6px; flex: 0 0 auto; }
.product-card .btn{ margin-top: auto; }

.feature-grid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.feature-cell{ display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-dim); }
.feature-cell svg{ width: 16px; height: 16px; color: var(--green); flex: 0 0 auto; }

/* ───────────────────────── Admin ───────────────────────── */

.table-scroll{ overflow-x: auto; }
.data-table{ width: 100%; border-collapse: collapse; text-align: left; min-width: 520px; }
.data-table th{
  padding: 0 10px 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border-soft);
}
.data-table td{ padding: 13px 10px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.data-table tr:last-child td{ border-bottom: 0; }
.data-table .right{ text-align: right; }
.row-actions{ display: inline-flex; gap: 6px; justify-content: flex-end; }
.table-foot{ display: flex; justify-content: flex-end; margin-top: 16px; }

.request-list{ display: flex; flex-direction: column; gap: 0; padding: 6px 20px; }
.request-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12.5px;
  color: var(--text-dim);
}
.request-row:last-child{ border-bottom: 0; }
.request-row strong{ color: var(--text); }
.request-row .mono{ color: var(--text-faint); }

.log-box{
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  max-height: 140px;
  overflow-y: auto;
}

/* ───────────────────────── Editor ───────────────────────── */

.segmented{
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  gap: 4px;
}
.seg{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-faint);
  font-size: 12.5px;
  font-weight: 650;
  transition: background .15s ease, color .15s ease;
}
.seg svg{ width: 14px; height: 14px; }
.seg:hover{ color: var(--text); }
.seg.active{ background: var(--accent); color: var(--accent-ink); }

.editor-tabs{
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}
.editor-tabs button{
  padding: 8px 15px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-faint);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.editor-tabs button:hover{ color: var(--text); }
.editor-tabs button.active{ background: var(--panel-3); color: var(--text); }

.editor-panel{ display: flex; flex-wrap: wrap; gap: 16px; }
.editor-card{
  flex: 1 1 300px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.008));
}
.editor-card-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px;
  font-weight: 700;
}
.editor-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12.5px;
  color: var(--text-dim);
}
.editor-row:last-child{ border-bottom: 0; }
.mini-input{ width: auto; min-width: 110px; padding: 7px 10px; font-size: 12px; }
select.mini-input{ background: var(--bg-soft); }

.switch{ position: relative; display: inline-flex; flex: 0 0 auto; }
.switch input{ position: absolute; opacity: 0; width: 0; height: 0; }
.switch span{
  width: 38px;
  height: 22px;
  border-radius: 99px;
  background: var(--panel-3);
  border: 1px solid var(--border);
  position: relative;
  transition: background .18s ease, border-color .18s ease;
}
.switch span::after{
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: transform .18s ease, background .18s ease;
}
.switch input:checked + span{ background: var(--accent-soft); border-color: var(--accent-line); }
.switch input:checked + span::after{ transform: translateX(16px); background: var(--accent); }

.editor-actions{ display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ── Config editor shell ── */
.config-shell{
  position: relative;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: visible;
}
.config-shell::before,
.config-shell::after{
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  z-index: 6;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.32);
}
.config-shell::before{ top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.config-shell::after{ bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.config-bar{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background:
    radial-gradient(420px 120px at 6% 0%, rgba(255,255,255,.05), transparent 72%),
    var(--panel-2);
  border-bottom: 1px solid var(--border);
}
.config-back{ flex: 0 0 auto; }
.runtime-chip{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
  padding: 6px 12px 6px 11px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #161616, #0e0e0e);
  overflow: hidden;
}
.runtime-chip::after{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, #f0f0f0, transparent);
  animation: lineShimmer 3.6s ease-in-out infinite;
}
.runtime-pulse{
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  background: #e8e8e8;
  animation: dotPulse 2.4s ease-in-out infinite;
}
.runtime-copy{ display: flex; flex-direction: column; line-height: 1.15; }
.runtime-name{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .16em;
  color: #6f6f6f;
}
.runtime-state{
  font-size: 12px;
  font-weight: 650;
  color: #e8e8e8;
}
.runtime-state::before{ content: "\25B8 "; color: #8a8a8a; }
.config-mode{ margin-left: 2px; background: var(--bg-soft); }
.config-mode .seg{ padding: 7px 12px; }
.loaded-pill{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 12px;
  white-space: nowrap;
}
.loaded-pill .dot{ background: #8f8f8f; }
.loaded-pill strong{ color: var(--text); font-weight: 650; }

#editor-visual-mode{ padding: 16px; background: var(--panel); }
#editor-table-mode{ padding: 16px 16px 12px; background: #0b0b0b; }

/* ── Code window ── */
.code-float-wrap{
  position: relative;
  isolation: isolate;
  --glow-x: 50%;
  --glow-y: 50%;
  animation: codeFloat 7s ease-in-out infinite;
  will-change: transform;
}
.code-float-wrap::before{
  content: "";
  position: absolute;
  inset: 5% 3%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(closest-side at var(--glow-x) var(--glow-y), rgba(255,255,255,.13), rgba(255,255,255,.03) 58%, transparent 80%);
  filter: blur(34px);
  opacity: .7;
  animation: codeGlowPulse 8s ease-in-out infinite;
}
@keyframes codeFloat{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-5px); }
}
@keyframes codeGlowPulse{
  0%, 100%{ opacity: .55; transform: scale(.98); }
  50%{ opacity: .85; transform: scale(1.02); }
}
.code-window{
  --float-x: 0px;
  --float-y: 0px;
  position: relative;
  z-index: 1;
  background: #080808;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 26px 60px -42px rgba(0,0,0,.95), 0 0 66px -26px rgba(255,255,255,.22);
  transform: translate3d(var(--float-x), var(--float-y), 0);
  transition: transform .26s ease-out, box-shadow .35s ease, border-color .35s ease;
  will-change: transform;
}
.code-window.is-floating{
  box-shadow: 0 38px 80px -38px rgba(0,0,0,.98), 0 0 116px -30px rgba(255,255,255,.34);
  border-color: #2f2f2f;
}
.code-titlebar{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background:
    radial-gradient(360px 90px at 8% 0%, rgba(255,255,255,.06), transparent 72%),
    #0d0d0d;
  border-bottom: 1px solid #1b1b1b;
}
.code-tabs{
  display: flex;
  align-items: flex-end;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.code-tabs::-webkit-scrollbar{ display: none; }
.code-tab{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 13px;
  border: 1px solid #1e1e1e;
  border-bottom: 0;
  background: #0f0f0f;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.code-tab:hover{ color: var(--text); background: #141414; }
.code-tab.active{
  background: #181818;
  color: var(--text);
  border-color: #2b2b2b;
  padding-bottom: 9px;
  margin-bottom: -1px;
}
.code-tab.active::after{
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #f0f0f0, transparent);
  box-shadow: 0 0 8px rgba(255,255,255,.5);
  animation: lineShimmer 4.5s ease-in-out infinite;
}
.code-tab svg{ width: 13px; height: 13px; color: #6d6d6d; }
.code-tab.active svg{ color: #cfcfcf; }
.code-tab-name{ max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.code-tab-dirty{
  width: 5px;
  height: 5px;
  background: #e8e8e8;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .15s ease, transform .15s ease;
  border-radius: 50% !important;
}
.code-tab.dirty .code-tab-dirty{ opacity: .9; transform: scale(1); }
.code-tab-x{
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6a6a6a;
  cursor: pointer;
}
.code-tab-x:hover{ color: #ffffff; background: #2a2a2a; }
.code-tab-x svg{ width: 11px; height: 11px; }
.code-tab-add{
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #222222;
  background: #101010;
  color: #8a8a8a;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.code-tab-add svg{ width: 14px; height: 14px; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.code-tab-add:hover{ color: #ffffff; border-color: #3a3a3a; background: #171717; }
.code-tab-add:hover svg{ transform: rotate(90deg); }

.table-shell{
  position: relative;
  display: flex;
  height: 470px;
  background: #080808;
  overflow: hidden;
  isolation: isolate;
}
.table-lines{
  flex: 0 0 58px;
  height: 100%;
  padding: 14px 12px 14px 0;
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 20px;
  color: #3f3f3f;
  background: #060606;
  border-right: 1px solid #191919;
  overflow: hidden;
  user-select: none;
}

.code-editor-wrap{
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(520px 200px at 18% -12%, rgba(255,255,255,.045), transparent 72%),
    radial-gradient(360px 200px at 98% 112%, rgba(255,255,255,.022), transparent 70%);
}
.code-editor-wrap::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 100% 20px, 24px 100%;
}

.table-content{
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 14px 18px 24px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0;
  color: #d6d6d6;
  white-space: pre;
  overflow: hidden;
  tab-size: 4;
  pointer-events: none;
  z-index: 1;
}
.table-content .code-key{ color: #d7c48a; }
.table-content .code-str{ color: #a8c0a0; }
.table-content .code-num{ color: #c9a7a0; }
.table-content .code-bool{ color: #b9a9d6; }
.table-content .code-comment{ color: #575757; font-style: italic; }

.table-editor{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 14px 18px 24px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: #f4f4f4;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0;
  white-space: pre;
  overflow: auto;
  tab-size: 4;
  z-index: 2;
  scrollbar-width: thin;
  scrollbar-color: #2c2c2c #0a0a0a;
}
.table-editor::selection{ background: rgba(255,255,255,.20); color: transparent; }
.table-editor::-webkit-scrollbar{ width: 10px; height: 10px; }
.table-editor::-webkit-scrollbar-track{ background: #0a0a0a; }
.table-editor::-webkit-scrollbar-thumb{ background: #262626; border: 2px solid #0a0a0a; }
.table-editor::-webkit-scrollbar-thumb:hover{ background: #3a3a3a; }
.table-editor::-webkit-scrollbar-corner{ background: #0a0a0a; }

.table-minimap{
  position: relative;
  flex: 0 0 70px;
  height: 100%;
  border-left: 1px solid #191919;
  background: repeating-linear-gradient(135deg, #080808 0 7px, #0b0b0b 7px 14px);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  z-index: 3;
}
.table-minimap::before{
  content: "OVERVIEW";
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .18em;
  color: #3c3c3c;
  pointer-events: none;
}
.table-minimap-track{
  position: absolute;
  top: 18px;
  left: 9px;
  right: 9px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}
.table-minimap-line{ flex: 1 1 0; min-height: 1px; max-height: 2px; background: #242424; }
.table-minimap-viewport{
  position: absolute;
  left: 4px;
  right: 4px;
  top: 18px;
  height: 40px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.42);
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), inset 0 0 12px rgba(255,255,255,.06);
  cursor: grab;
  transition: background .15s ease, border-color .15s ease;
}
.table-minimap:hover .table-minimap-viewport{
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.62);
}
.table-minimap-viewport:active{
  cursor: grabbing;
  background: rgba(255,255,255,.18);
}

.code-statusbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  background: var(--panel-2);
  border-top: 1px solid #1b1b1b;
  color: var(--text-faint);
  font-size: 11px;
}
.sb-left,
.sb-right{ display: flex; align-items: center; gap: 14px; }
.sb-item{ display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sb-item svg{ width: 12px; height: 12px; }
.sb-dirty{ color: var(--text-dim); }
.sb-encoding{ color: #4f4f4f; letter-spacing: .08em; }
.sb-btn{
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-size: 12px;
}
.sb-btn:hover{ color: var(--text); background: rgba(255,255,255,.06); }

/* ── Configs browser ── */
#editor-configs-mode{ padding: 16px; background: var(--panel); }
.configs-panel{
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.006)),
    var(--panel-2);
}
.configs-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: radial-gradient(420px 120px at 6% 0%, rgba(255,255,255,.05), transparent 72%);
}
.configs-title{ font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.configs-sub{
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.configs-hint{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--text-faint);
}
.configs-hint svg{ width: 14px; height: 14px; }
.configs-list{ display: flex; flex-direction: column; }
.config-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease;
}
.config-item:last-child{ border-bottom: 0; }
.config-item:hover{ background: rgba(255,255,255,.03); }
.config-item:focus-visible{ outline: 1px solid #8a8a8a; outline-offset: -2px; }
.config-item.is-active{
  background: linear-gradient(90deg, rgba(255,255,255,.05), transparent 58%);
  box-shadow: inset 2px 0 0 #e8e8e8;
}
.config-item-main{ min-width: 0; }
.config-item-name{
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
}
.config-item-active{
  display: none;
  padding: 2px 6px;
  background: #e8e8e8;
  color: #0a0a0a;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.config-item.is-active .config-item-active{ display: inline-block; }
.config-item-meta{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .05em;
  color: var(--text-faint);
}
.config-item-meta span{ display: inline-flex; align-items: center; gap: 5px; }
.config-item-meta svg{ width: 11px; height: 11px; }
.config-item-actions{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.config-act{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.config-act svg{ width: 14px; height: 14px; }
.config-load-btn:hover{
  border-color: #f0f0f0;
  background: #f0f0f0;
  color: #0a0a0a;
}
.config-share-act:hover{
  border-color: #5a5a5a;
  background: rgba(255,255,255,.05);
  color: var(--text);
}
.config-delete-btn{ color: #b98a8a; }
.config-delete-btn:hover{
  border-color: rgba(204,85,85,.6);
  background: rgba(204,85,85,.1);
  color: #ff9d9d;
}
.configs-empty{
  padding: 34px 18px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}
.config-shell.show-configs .config-actions,
.config-shell.show-configs .config-sharebar{ display: none; }

/* ── Config footer ── */
.config-actions{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--panel-2);
  border-top: 1px solid var(--border);
}
.config-name{
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.config-name::placeholder{ color: #555555; }
.config-name:focus{ border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.config-actions .btn{ flex: 0 0 auto; }
.config-settings{ flex: 0 0 auto; }
.config-sharebar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035), transparent 42%),
    var(--panel);
  border-top: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-size: 12px;
}
.share-status{ display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.share-kicker{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #555555;
}
.share-actions{ display: flex; gap: 8px; align-items: center; }
.share-actions .btn{ padding: 8px 12px; }
.copy-btn{
  border: 1px solid #f0f0f0;
  background: #f0f0f0;
  color: #0a0a0a;
  font-weight: 700;
}
.copy-btn:hover{ background: #ffffff; border-color: #ffffff; color: #0a0a0a; }
.copy-btn.is-done{ background: #8f8f8f; border-color: #8f8f8f; color: #0a0a0a; }
.copy-btn svg{ width: 14px; height: 14px; }

/* ───────────────────────── Modal ───────────────────────── */

.modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.modal-overlay.open{ opacity: 1; visibility: visible; }
.modal-box{
  width: min(420px, 100%);
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  transform: translateY(10px) scale(.985);
  transition: transform .2s ease;
}
.modal-overlay.open .modal-box{ transform: none; }
.modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
  font-weight: 700;
}
.modal-body{ padding: 22px 20px; }
.modal-field label{
  display: block;
  margin-bottom: 7px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.modal-footer{ padding: 0 20px 20px; }
.modal-save-btn{
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(145deg, #ffffff, #d9d9d9);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
  transition: filter .15s ease;
}
.modal-save-btn:hover{ filter: brightness(1.04); }

.avatar-big{
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: #333333;
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
}
.avatar-upload-btn{
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
}
.avatar-upload-btn:hover{ color: var(--accent); border-color: var(--accent-line); }
.color-swatches{ display: flex; justify-content: center; gap: 9px; margin-bottom: 20px; }
.swatch{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.swatch:hover{ transform: scale(1.08); }
.swatch.selected{ border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ───────────────────────── Toast ───────────────────────── */

.toast{
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(18,18,18,.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  transform: translateY(16px);
  opacity: 0;
  visibility: hidden;
  transition: transform .22s ease, opacity .22s ease, visibility .22s ease;
}
.toast.show{ transform: none; opacity: 1; visibility: visible; }
.toast svg{ width: 17px; height: 17px; flex: 0 0 auto; }
.toast.success{ border-color: rgba(143,143,143,.32); }
.toast.success svg{ color: var(--green); }
.toast.error{ border-color: rgba(204,85,85,.32); }
.toast.error svg{ color: var(--red); }

/* ───────────────────────── Animation ───────────────────────── */

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

@keyframes viewIn{
  from{ opacity: 0; transform: translateY(14px) scale(.994); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes viewOut{
  from{ opacity: 1; transform: translateY(0); }
  to{ opacity: 0; transform: translateY(-6px); }
}
@keyframes viewChildIn{
  from{ opacity: 0; transform: translateY(10px); }
  to{ opacity: 1; transform: translateY(0); }
}

@keyframes authFloat{
  0%, 100%{ transform: translate3d(0, 0, 0); }
  50%{ transform: translate3d(0, -7px, 0); }
}
@keyframes authGlowPulse{
  0%, 100%{ opacity: .6; transform: scale(.98); }
  50%{ opacity: .9; transform: scale(1.03); }
}

/* ── Sharp corners everywhere (dots and glows stay round) ── */
*, *::before, *::after{ border-radius: 0 !important; }
.dot{ border-radius: 50% !important; }
.auth-glow{ border-radius: 50% !important; }

/* ── Ambient idle motion & soft glow ── */
@keyframes ambientDrift{
  0%, 100%{ transform: translate3d(0, 0, 0) scale(1); opacity: .85; }
  50%{ transform: translate3d(-2.5%, 1.5%, 0) scale(1.08); opacity: 1; }
}
body::before{
  animation: ambientDrift 28s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes dotPulse{
  0%, 100%{ box-shadow: 0 0 0 0 rgba(255,255,255,0); opacity: .72; }
  50%{ box-shadow: 0 0 0 5px rgba(255,255,255,.06); opacity: 1; }
}
.pill .dot,
.status-inline .dot,
.product-badge .dot{ animation: dotPulse 3.8s ease-in-out infinite; }
.status-chip .dot{ animation: dotPulse 2.8s ease-in-out infinite; }

@keyframes navBreathe{
  0%, 100%{ box-shadow: inset 0 0 0 rgba(255,255,255,0); }
  50%{ box-shadow: inset 0 0 22px rgba(255,255,255,.055); }
}
.nav-item.active{ animation: navBreathe 5.5s ease-in-out infinite; }

@keyframes accentGlow{
  0%, 100%{ box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, var(--shadow); }
  50%{ box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, var(--shadow), 0 0 44px -18px rgba(255,255,255,.14); }
}
.hero,
.profile-banner,
.accent-card{ animation: accentGlow 9s ease-in-out infinite; }

@keyframes glowFloat{
  0%, 100%{ transform: translate3d(0, 0, 0) scale(1); }
  50%{ transform: translate3d(24px, 18px, 0) scale(1.1); }
}
.auth-glow-a{ animation: glowFloat 18s ease-in-out infinite; }
.auth-glow-b{ animation: glowFloat 22s ease-in-out infinite reverse; }

@keyframes lineShimmer{
  0%, 100%{ opacity: .35; transform: scaleX(.72); }
  50%{ opacity: .9; transform: scaleX(1); }
}
.topnav::after{ animation: lineShimmer 7s ease-in-out infinite; transform-origin: center; }

.card,
.stat-card,
.product-card,
.editor-card,
.acc-stat-box,
.identity-item{
  transition: border-color .25s ease, box-shadow .3s ease, transform .25s ease, background .25s ease;
}
.card:hover,
.stat-card:hover,
.product-card:hover,
.editor-card:hover{
  border-color: #383838;
  box-shadow: 0 0 0 1px rgba(255,255,255,.04), 0 28px 70px -34px rgba(0,0,0,.95), 0 0 46px -16px rgba(255,255,255,.10);
}

/* ───────────────────────── Responsive ───────────────────────── */

@media (max-width: 1080px){
  .stat-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero{ grid-template-columns: 1fr; }
  .hero-side{ align-self: stretch; }
}

@media (max-width: 920px){
  .topnav-inner{ height: 62px; gap: 12px; }
  .topnav .side-nav{
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    z-index: 45;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(10,10,10,.98);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }
  .topnav .side-nav.open{
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  .topnav .nav-item{ padding: 12px 14px; }
  .topnav .nav-item.active::before{ left: 0; right: 0; bottom: 0; }
  .sidebar-backdrop.open{ display: block; }
  .mobile-only{ display: inline-grid; }
  .topnav .status-chip{ display: none; }
  .topnav .user-meta{ display: none; }
  .topnav .user-row{ padding: 5px; }

  .acc-grid{ grid-template-columns: 1fr; }
  .product-grid{ grid-template-columns: 1fr; }
  .two-col{ grid-template-columns: 1fr; }
}

@media (max-width: 640px){
  .auth-shell{ padding: 16px; }
  .auth-brandline{ padding: 13px 16px; }
  .auth-form-view{ padding: 20px 18px; }

  .wrap{ padding: 22px 16px 56px; }
  .topnav-inner{ height: 58px; padding: 0 14px; }
  .topnav .logo-text{ font-size: 17px; }
  .topnav .side-nav{ top: 58px; }
  .topnav .status-chip{ display: none; }

  .stat-grid{ grid-template-columns: 1fr; }
  .acc-stat-boxes{ grid-template-columns: 1fr; }
  .identity-grid{ grid-template-columns: 1fr; }
  .feature-grid{ grid-template-columns: 1fr; }
  .form-row{ grid-template-columns: 1fr; gap: 6px; }
  .form-actions{ justify-content: stretch; }
  .form-actions .btn{ width: 100%; }

  .hero{ padding: 22px 18px; }
  .hero-actions .btn{ flex: 1; }

  .table-shell{ height: 380px; }
  .table-minimap{ display: block; flex: 0 0 34px; }
  .table-minimap::before{ display: none; }
  .table-minimap-track{ left: 4px; right: 4px; top: 8px; bottom: 8px; }
  .table-minimap-viewport{ left: 2px; right: 2px; }
  .code-tab-name{ max-width: 92px; }
  .runtime-chip{ min-width: 0; }

  .code-statusbar{ gap: 8px; padding: 6px 8px; font-size: 10.5px; }
  .sb-left, .sb-right{ gap: 9px; }
  .sb-left .sb-item:first-child, .sb-encoding{ display: none; }

  .config-actions{ gap: 8px; padding: 12px; }
  .config-name{ flex: 1 1 100%; min-width: 0; }
  .config-actions .btn{ flex: 1 1 0; justify-content: center; }

  .config-mode{ width: 100%; }
  .config-mode .seg{ flex: 1 1 0; justify-content: center; padding: 7px 8px; }

  #editor-configs-mode{ padding: 12px; }
  .configs-head{ padding: 14px; }
  .config-item{ flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; }
  .config-item-meta{ gap: 10px; }
  .config-item-actions{ width: 100%; }
  .config-item-actions .config-act{ flex: 1 1 0; padding: 8px 6px; }

  .toast{ left: 16px; right: 16px; bottom: 16px; }
}

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