/* Digital Architect - project portal. Theme: "Dark glass". */

:root {
  --bg: #06060b;
  --bg-raise: #0d0c18;
  --text: #eeebf8;
  --muted: #a8a3c0;
  --faint: #6f6a89;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --glass: rgba(255, 255, 255, 0.045);
  --violet: #8b5cf6;
  --violet-soft: #a78bfa;
  --blue: #38bdf8;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 18px;
  --radius-sm: 11px;
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
  --grad: linear-gradient(120deg, var(--violet) 0%, #6366f1 45%, var(--blue) 100%);
  --topbar-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: var(--violet-soft); text-decoration: none; }
a:hover { color: #c4b5fd; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -0.02em; font-weight: 650; }
h1 { font-size: clamp(1.7rem, 2.6vw, 2.35rem); }
h2 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--violet); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--violet-soft); outline-offset: 2px; }
ul.plain { list-style: none; margin: 0; padding: 0; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 1.1rem 0; }

/* ---------------------------------------------------------------- backdrop */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(99, 102, 241, .10), transparent 70%),
    linear-gradient(180deg, #07070d 0%, #06060b 100%); }
.backdrop::after { /* faint architectural grid */
  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: 56px 56px; mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 26s ease-in-out infinite alternate; }
.glow-a { width: 520px; height: 520px; left: -120px; top: -140px; background: radial-gradient(circle, #7c3aed 0%, transparent 70%); }
.glow-b { width: 600px; height: 600px; right: -180px; top: 18%; background: radial-gradient(circle, #2563eb 0%, transparent 70%); animation-delay: -8s; }
.glow-c { width: 420px; height: 420px; left: 30%; bottom: -220px; background: radial-gradient(circle, #0ea5e9 0%, transparent 70%); opacity: .35; animation-delay: -15s; }
.wireframe { position: absolute; right: -60px; bottom: -40px; width: min(560px, 60vw); opacity: .16; animation: float 14s ease-in-out infinite; }
body.auth .wireframe { right: auto; left: max(-80px, calc(50% - 720px)); top: 8%; bottom: auto; opacity: .22; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.12); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* ------------------------------------------------------------------- glass */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.03));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 18px 50px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
}
.panel { padding: 1.6rem; margin-bottom: 1.25rem; }

/* ------------------------------------------------------------------ topbar */
.topbar { position: sticky; top: 12px; z-index: 10; margin: 12px auto 0; width: min(1200px, calc(100% - 24px));
  height: var(--topbar-h); display: flex; align-items: center; gap: 1.5rem; padding: 0 1rem 0 1.25rem; border-radius: 16px; }
body.is-wide .topbar { width: calc(100% - 24px); }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; }
.brand-text { font-size: 1.02rem; letter-spacing: .01em; font-weight: 450; }
.brand-text strong { font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mainnav { display: flex; align-items: center; gap: .25rem; flex: 1; min-width: 0; overflow-x: auto; }
.navlink { color: var(--muted); padding: .45rem .8rem; border-radius: 10px; white-space: nowrap; font-size: .93rem; }
.navlink:hover { color: var(--text); background: rgba(255,255,255,.05); }
.navlink.is-active { color: var(--text); background: rgba(139, 92, 246, .16); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .28); }
.nav-sep { width: 1px; height: 20px; background: var(--line); margin: 0 .35rem; }
.topbar-right { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.user-chip { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); padding: .25rem .6rem .25rem .25rem; border-radius: 999px; border: 1px solid transparent; }
.user-chip:hover, .user-chip.is-active { color: var(--text); border-color: var(--line); background: rgba(255,255,255,.04); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--grad); color: #fff; }
.user-name { font-size: .9rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
form.inline { display: inline; margin: 0; }

.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.2); margin: 0; }
.lang-switch button { font: 600 .74rem/1 var(--mono); letter-spacing: .06em; color: var(--muted); background: transparent; border: 0; padding: .42rem .62rem; border-radius: 999px; cursor: pointer; }
.lang-switch button.is-active { color: #fff; background: rgba(139, 92, 246, .35); }
.lang-switch button:hover:not(.is-active) { color: var(--text); }

/* ------------------------------------------------------------------ layout */
.container { width: min(1200px, calc(100% - 32px)); margin: 2.25rem auto 3rem; }
body.is-wide .container { width: calc(100% - 24px); margin-top: 12px; margin-bottom: 12px; }
.narrow { max-width: 720px; margin: 0 auto; }
.center { text-align: center; }
.page-head { margin-bottom: 1.6rem; }
.page-head.row-between { align-items: flex-end; }
.eyebrow { color: var(--violet-soft); font-size: .74rem; letter-spacing: .18em; margin-bottom: .5rem; }
.eyebrow a { color: inherit; }
.lead { color: var(--muted); font-size: 1.04rem; max-width: 62ch; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.row-between > div { flex: 1 1 260px; }
.row-between p { margin: .2rem 0 0; }
.grid-2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.25rem; align-items: start; }
.grid-2 > .panel { margin-bottom: 0; }
.grid-2 + .panel { margin-top: 1.25rem; }
.footer { text-align: center; color: var(--faint); font-size: .8rem; padding: 1rem 0 2rem; }
body.is-wide .footer { display: none; }
.footer .mono { letter-spacing: .14em; }
.hint { color: var(--faint); font-size: .86rem; margin-top: 1rem; }
.empty { text-align: center; color: var(--muted); padding: 3rem 1.5rem; }

/* ----------------------------------------------------------------- buttons */
.btn { --b: transparent; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: 600 .93rem/1 var(--font); padding: .78rem 1.15rem; border-radius: 12px; border: 1px solid var(--b);
  cursor: pointer; color: var(--text); background: rgba(255,255,255,.06); transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; white-space: nowrap; }
.btn:hover { color: var(--text); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 26px rgba(124, 58, 237, .35), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 34px rgba(99, 102, 241, .5), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-ghost { --b: var(--line-strong); background: rgba(255,255,255,.03); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-danger { --b: rgba(248, 113, 113, .45); background: rgba(248, 113, 113, .12); color: #fecaca; }
.btn-danger:hover { background: rgba(248, 113, 113, .22); color: #fff; }
.btn-sm { padding: .5rem .8rem; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1.2rem; }

/* ------------------------------------------------------------------- forms */
.form { display: grid; gap: 1rem; }
.form-inline { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.form-inline .field { flex: 1 1 200px; }
.field { display: grid; gap: .4rem; }
.field > span:first-child { font-size: .86rem; color: var(--muted); font-weight: 500; }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; font: 1rem/1.4 var(--font); color: var(--text); background: rgba(5, 5, 12, .55);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: .78rem .9rem; transition: border-color .2s, box-shadow .2s; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
select option { background: #15132a; color: var(--text); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet-soft); box-shadow: 0 0 0 4px rgba(139, 92, 246, .22); }
input::placeholder { color: var(--faint); }
.code-input { font-family: var(--mono); letter-spacing: .35em; font-size: 1.25rem; text-align: center; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 4.5rem; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 600 .78rem var(--font); color: var(--muted);
  background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 8px; padding: .35rem .55rem; cursor: pointer; }
.pw-toggle:hover { color: var(--text); }
.check { display: flex; gap: .65rem; align-items: flex-start; cursor: pointer; }
.check input { margin-top: .25rem; width: 1.05rem; height: 1.05rem; accent-color: var(--violet); flex: none; }
.input-affix { display: flex; align-items: stretch; }
.input-affix input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.affix { display: grid; place-items: center; padding: 0 .8rem; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted); font-size: .85rem; background: rgba(255,255,255,.03); white-space: nowrap; }
.meter { display: block; height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.meter-bar { display: block; height: 100%; width: 0; background: var(--danger); transition: width .25s, background .25s; }
.meter-bar.w1 { width: 25%; background: var(--danger); } .meter-bar.w2 { width: 50%; background: var(--warn); }
.meter-bar.w3 { width: 75%; background: #a3e635; } .meter-bar.w4 { width: 100%; background: var(--ok); }
.field-sm select { padding: .45rem 2rem .45rem .65rem; font-size: .85rem; }

/* ------------------------------------------------------------------ alerts */
.alert { padding: .8rem 1rem; border-radius: 12px; border: 1px solid; margin-bottom: 1rem; font-size: .93rem; }
.alert-error { color: #fecaca; background: rgba(248, 113, 113, .10); border-color: rgba(248, 113, 113, .35); }
.alert-ok { color: #bbf7d0; background: rgba(52, 211, 153, .10); border-color: rgba(52, 211, 153, .32); }
.alert-warn { color: #fde68a; background: rgba(251, 191, 36, .10); border-color: rgba(251, 191, 36, .32); }

/* ------------------------------------------------------------------ badges */
.badge { display: inline-block; font: 600 .7rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: .35rem .55rem;
  border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.06); border: 1px solid var(--line); vertical-align: middle; }
.badge-development { color: #c4b5fd; background: rgba(139, 92, 246, .14); border-color: rgba(139, 92, 246, .35); }
.badge-review { color: #fde68a; background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .32); }
.badge-live, .badge-ok { color: #a7f3d0; background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .32); }
.badge-paused { color: var(--muted); }
.badge-wp { color: #bae6fd; background: rgba(56, 189, 248, .10); border-color: rgba(56, 189, 248, .3); }

/* ------------------------------------------------------------------- auth */
body.auth { display: grid; min-height: 100vh; }
.auth-top { position: fixed; top: 18px; right: 18px; z-index: 5; }
.auth-wrap { width: min(440px, calc(100% - 32px)); margin: auto; padding: 4rem 0; }
.auth-brand { text-align: center; margin-bottom: 1.6rem; }
.auth-brand .brand { font-size: 1.15rem; }
.auth-brand .brand-mark { width: 40px; height: 40px; }
.auth-brand .brand-text { font-size: 1.35rem; }
.auth-sub { color: var(--faint); font-size: .72rem; letter-spacing: .32em; margin: .7rem 0 0; }
.auth-card { padding: 2rem; }
.card-title { font-size: 1.6rem; }
.auth-foot { text-align: center; color: var(--faint); font-size: .8rem; margin-top: 1.4rem; }

/* ------------------------------------------------------------------- cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.card { position: relative; display: flex; flex-direction: column; color: var(--text); overflow: hidden; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.card:hover { color: var(--text); transform: translateY(-4px); border-color: rgba(167, 139, 250, .45); box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(139, 92, 246, .25), 0 0 60px rgba(99, 102, 241, .18); }
.card-visual { position: relative; height: 150px; display: grid; place-items: center; color: rgba(167, 139, 250, .65);
  background: radial-gradient(240px 140px at 70% 30%, rgba(99, 102, 241, .28), transparent 70%), radial-gradient(200px 120px at 20% 90%, rgba(14, 165, 233, .2), transparent 70%);
  border-bottom: 1px solid var(--line); }
.card-visual svg { width: 120px; transition: transform .4s ease, color .3s; }
.card:hover .card-visual svg { transform: translateY(-4px) scale(1.06); color: #c4b5fd; }
.card-index { position: absolute; left: 1rem; top: .9rem; font-size: .75rem; color: var(--faint); letter-spacing: .12em; }
.card-body { padding: 1.25rem 1.4rem 1.4rem; }
.card-body h2 { margin-top: .75rem; font-size: 1.25rem; }
.card-body .host { color: var(--faint); font-size: .78rem; margin: .6rem 0 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-arrow { position: absolute; right: 1.2rem; bottom: 1.15rem; color: var(--violet-soft); font-size: 1.2rem; transition: transform .25s; }
.card:hover .card-arrow { transform: translateX(4px); }

/* ------------------------------------------------------------------ viewer */
.viewer { display: flex; flex-direction: column; gap: 12px; }
.viewer-bar { display: flex; align-items: center; gap: 1rem; padding: .7rem .9rem; flex-wrap: wrap; border-radius: 16px; }
.viewer-title { display: flex; align-items: center; gap: .8rem; flex: 1 1 260px; min-width: 0; }
.viewer-title h1 { font-size: 1.15rem; margin: 0; }
.viewer-title .host { margin: .1rem 0 0; color: var(--faint); font-size: .78rem; }
.viewer-tools { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.2); }
.seg { font: 600 .82rem var(--font); color: var(--muted); background: transparent; border: 0; padding: .45rem .8rem; border-radius: 9px; cursor: pointer; }
.seg.is-active { color: #fff; background: rgba(139, 92, 246, .32); }
.viewer-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.viewer-stage { display: flex; justify-content: center; }
.frame-wrap { width: 100%; max-width: 100%; height: calc(100vh - var(--topbar-h) - 120px); min-height: 480px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line-strong); background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 6px rgba(255,255,255,.03); transition: width .35s ease; }
.frame-wrap iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.viewer-note { font-size: .88rem; padding: 0 .4rem; }

/* ------------------------------------------------------------------ tables */
.table-wrap { padding: .4rem; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font: 600 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.table td { padding: .85rem 1rem; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255,255,255,.025); }
.table .num { text-align: right; }
.table tr.is-muted td { opacity: .55; }
.table tr.is-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.table-dense td { padding: .55rem 1rem; }
.actions-cell { text-align: right; white-space: nowrap; }
.actions-cell .btn + .btn { margin-left: .35rem; }

/* ------------------------------------------------------------ admin bits */
.access-list { display: grid; gap: .6rem; }
.access-item { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; padding: .85rem 1rem;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.15); transition: border-color .2s, background .2s; }
.access-item.is-on { border-color: rgba(167, 139, 250, .4); background: rgba(139, 92, 246, .08); }
.access-item.is-muted { opacity: .6; }
.access-wp { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.access-wp.is-disabled { opacity: .35; pointer-events: none; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.5rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.credentials { padding: 1rem 1.1rem; border-radius: 12px; border: 1px dashed rgba(167, 139, 250, .45); background: rgba(139, 92, 246, .06); margin-bottom: 1rem; }
.secret-pw { color: #fff; font-weight: 700; letter-spacing: .04em; }
.danger-zone { border-color: rgba(248, 113, 113, .22); }

/* ------------------------------------------------------------------- 2FA */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 1.6rem; }
.steps > li { counter-increment: s; position: relative; padding-left: 3rem; }
.steps > li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: -.1rem; font: 600 .8rem var(--mono); color: var(--violet-soft);
  border: 1px solid rgba(167, 139, 250, .4); border-radius: 8px; padding: .3rem .4rem; }
.qr-row { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.qr { width: 196px; height: 196px; border-radius: 14px; background: #fff; display: grid; place-items: center; padding: 10px; flex: none; }
.qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.secret { display: inline-block; padding: .55rem .75rem; border-radius: 10px; background: rgba(0,0,0,.35); border: 1px solid var(--line); font-size: .95rem; letter-spacing: .08em; user-select: all; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem 1.5rem; list-style: none; padding: 1.1rem 1.3rem; margin: 0; border-radius: 12px; background: rgba(0,0,0,.3); border: 1px solid var(--line); font-size: 1.02rem; }

/* ------------------------------------------------- projects / import / jobs */
.wide-narrow { max-width: 920px; }
.actions-inline { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.actions-inline form { margin: 0; }
h3.sub { font-size: .8rem; font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--violet-soft); margin: 1.4rem 0 .6rem; }
.check-card { padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.15); }
.check-card:has(input:checked) { border-color: rgba(167, 139, 250, .45); background: rgba(139, 92, 246, .08); }

.dropzone { display: grid; gap: .3rem; place-items: center; text-align: center; padding: 1.6rem 1rem; border: 1.5px dashed rgba(167, 139, 250, .45);
  border-radius: 14px; background: rgba(139, 92, 246, .05); cursor: pointer; transition: background .2s, border-color .2s; }
.dropzone:hover, .dropzone.is-over { background: rgba(139, 92, 246, .12); border-color: var(--violet-soft); }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone strong { color: var(--violet-soft); }

.file-rows { display: grid; gap: .5rem; margin-top: .7rem; }
.file-row { position: relative; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .65rem .85rem; border: 1px solid var(--line);
  border-radius: 11px; background: rgba(0,0,0,.18); overflow: hidden; }
.file-row.selectable { cursor: pointer; }
.file-row.is-on { border-color: rgba(167, 139, 250, .45); background: rgba(139, 92, 246, .08); }
.file-row.is-done { border-color: rgba(52, 211, 153, .3); }
.file-row.is-failed { border-color: rgba(248, 113, 113, .45); }
.file-name { flex: 1 1 220px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.file-size { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.file-status { font-size: .8rem; color: var(--muted); min-width: 7rem; }
.file-row.is-done .file-status { color: #a7f3d0; }
.file-row.is-failed .file-status { color: #fecaca; }
.type-select { width: auto; padding: .4rem 2rem .4rem .6rem; font-size: .82rem; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.progress-bar { display: block; height: 100%; width: 0; background: var(--grad); transition: width .3s; }
.file-row.is-done .progress, .file-row.is-failed .progress { display: none; }
.advanced { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.advanced summary { cursor: pointer; color: var(--muted); font-size: .9rem; margin-bottom: .8rem; }
button[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }

/* job status + steps */
.job-headline { margin-left: .6rem; font-size: 1.05rem; }
.job-status.status-failed { border-color: rgba(248, 113, 113, .4); }
.job-status.status-done { border-color: rgba(52, 211, 153, .35); }
.job-status.status-needs_input, .question { border-color: rgba(251, 191, 36, .4); }
.job-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.job-step { padding: .75rem .9rem; border-radius: 11px; border: 1px solid var(--line); background: rgba(0,0,0,.15); }
.step-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.step-head form { margin: 0 0 0 auto; }
.step-icon { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--faint); flex: none; }
.step-done .step-icon { border-color: var(--ok); background: radial-gradient(circle, var(--ok) 45%, transparent 50%); }
.step-skipped .step-icon { border-color: var(--warn); }
.step-failed { border-color: rgba(248, 113, 113, .45); background: rgba(248, 113, 113, .06); }
.step-failed .step-icon { border-color: var(--danger); background: radial-gradient(circle, var(--danger) 45%, transparent 50%); }
.step-running { border-color: rgba(167, 139, 250, .5); }
.step-running .step-icon { border-color: var(--violet-soft); border-top-color: transparent; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.step-msg { margin: .45rem 0 0 2.05rem; color: var(--muted); font-size: .88rem; word-break: break-word; }
.step-error { margin: .7rem 0 0 2.05rem; }
.step-hint { padding: .7rem .9rem; border-radius: 10px; background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .28); color: #fde68a; font-size: .9rem; }
.step-error details { margin: .6rem 0; }
.step-error summary { cursor: pointer; color: var(--muted); font-size: .85rem; }
.pre { margin: .5rem 0 0; padding: .8rem 1rem; border-radius: 10px; background: rgba(0,0,0,.45); border: 1px solid var(--line); font: .78rem/1.5 var(--mono);
  color: #d4d0e6; white-space: pre-wrap; word-break: break-all; max-height: 420px; overflow: auto; }
.pre.log { max-height: 360px; }
.job-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.job-list a { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; padding: .55rem .7rem; border-radius: 10px; color: var(--text); border: 1px solid transparent; }
.job-list a:hover { border-color: var(--line); background: rgba(255,255,255,.03); }

/* status badges */
.badge-job-queued, .badge-step-pending, .badge-prov-none { color: var(--muted); }
.badge-job-running, .badge-step-running, .badge-prov-provisioning { color: #c4b5fd; background: rgba(139, 92, 246, .14); border-color: rgba(139, 92, 246, .35); }
.badge-job-needs_input, .badge-step-skipped { color: #fde68a; background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .32); }
.badge-job-failed, .badge-step-failed, .badge-prov-failed { color: #fecaca; background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .35); }
.badge-job-done, .badge-step-done, .badge-prov-ready { color: #a7f3d0; background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .32); }
.badge-job-cancelled { color: var(--faint); }
a.badge:hover { filter: brightness(1.2); }

/* -------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { height: auto; flex-wrap: wrap; padding: .7rem .9rem; gap: .6rem; }
  .mainnav { order: 3; flex-basis: 100%; }
  .user-name { display: none; }
}
@media (max-width: 560px) {
  .panel, .auth-card { padding: 1.2rem; }
  .codes { grid-template-columns: 1fr; }
  .viewer-tools { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
