/* Saturn — „Naktis“. Reikšmės perimtos iš Saturn 02 dizaino. */
@font-face { font-family: Inter; src: url(/web/fonts/inter-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; src: url(/web/fonts/inter-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Grotesk"; src: url(/web/fonts/space-grotesk-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 300 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; src: url(/web/fonts/space-grotesk-latin-wght-normal.woff2) format("woff2"); font-weight: 300 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; src: url(/web/fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 100 800; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; src: url(/web/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2"); font-weight: 100 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

:root {
  --bg: #14171B; --bg-deep: #101317; --panel: #1A1E23; --ink: #EAE6DD; --muted: #8E959C;
  --dim: #59606A; --faint: #6F767D; --line: #252A30; --line-2: #2B3037; --line-3: #343A41;
  --line-4: #3A4048; --amber: #E3B26B; --ok: #9FC7B0; --bad: #E08A7B;
  --sans: Inter, system-ui, sans-serif; --display: "Space Grotesk", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, monospace; --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; overflow: hidden; }
button, input, textarea, select { font-family: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ink); }
[hidden] { display: none !important; }
::selection { background: rgba(234,230,221,.22); }
* { scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

.af-grid { background-color: var(--bg); background-image: linear-gradient(rgba(234,230,221,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(234,230,221,.035) 1px, transparent 1px); background-size: 96px 96px; background-position: -1px -1px; }
#app { height: 100vh; display: flex; position: relative; overflow: hidden; }
.af-mark { position: absolute; right: -3vw; bottom: -14vw; font-family: var(--display); font-weight: 300; font-size: clamp(320px, 46vw, 760px); line-height: 1; letter-spacing: -.06em; pointer-events: none; user-select: none; -webkit-text-stroke: 1px rgba(234,230,221,.07); color: transparent; }

/* Kairė juosta */
#nav { width: 66px; flex: 0 0 auto; border-right: 1px solid var(--line); background: rgba(20,23,27,.82); padding: 16px 12px; display: flex; flex-direction: column; gap: 28px; transition: width 320ms var(--ease); overflow: hidden; position: relative; z-index: 2; }
#nav.open { width: 232px; }
.nav-head { display: flex; align-items: center; gap: 12px; height: 40px; }
.nav-toggle { width: 40px; height: 40px; flex: 0 0 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: 10px; background: transparent; }
.nav-list { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; overflow-x: hidden; }
.nav-item { display: flex; align-items: center; gap: 14px; height: 40px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 13.5px; text-align: left; white-space: nowrap; width: 100%; }
.nav-item svg { flex: 0 0 16px; }
.nav-item:hover, .btn:hover, .nav-toggle:hover, .pill:hover, .chip:hover { background: rgba(234,230,221,.06); }
.nav-item[aria-current="page"] { background: rgba(234,230,221,.07); color: var(--ink); }
.nav-item.ghost { border: 1px dashed var(--line-2); color: var(--dim); }
.nav-item .nav-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-item .nav-key { font-family: var(--mono); font-size: 10px; color: var(--dim); }
#nav:not(.open) .nav-text, #nav:not(.open) .nav-key, #nav:not(.open) .nav-brand { display: none; }

main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; z-index: 1; }
#top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; flex: 0 0 72px; padding: 0 clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-name { font-family: var(--display); font-weight: 500; font-size: 19px; letter-spacing: -.03em; line-height: 1; }
.brand-sep { width: 1px; height: 14px; background: var(--line-3); }
.pill { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; font-size: 12.5px; letter-spacing: .04em; }
.pill .count { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.pill .need { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; color: var(--amber); }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); display: inline-block; }
.dot.amber { background: var(--amber); } .dot.dim { background: var(--dim); } .dot.bad { background: var(--bad); }
.chev { transition: transform 280ms ease; }
.clock { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--muted); }

#strip { max-height: 0; opacity: 0; overflow: hidden; transition: max-height 360ms var(--ease), opacity 260ms ease; border-bottom: 1px solid transparent; flex: 0 0 auto; }
#strip.open { max-height: 320px; opacity: 1; border-bottom-color: var(--line); overflow-y: auto; }
.strip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 18px clamp(16px, 3vw, 40px); }
.chip { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; font-size: 12.5px; letter-spacing: .02em; }
.proposal { display: flex; align-items: center; gap: 14px; padding: 10px clamp(16px, 3vw, 40px); border-top: 1px solid var(--line); font-size: 13px; }
.proposal .what { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

#view { flex: 1; min-height: 0; overflow: auto; position: relative; outline: none; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: transparent; font-size: 12.5px; white-space: nowrap; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 500; }
.btn.primary:hover { background: #fff; }
.btn.small { height: 26px; padding: 0 9px; font-size: 11.5px; border-radius: 6px; }
.btn.quiet { border-color: transparent; color: var(--muted); }
.btn:disabled { opacity: .45; cursor: default; }
.field { width: 100%; background: rgba(26,30,35,.85); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; outline: none; }
.field:focus { border-color: var(--line-4); }
textarea.field { resize: vertical; line-height: 1.55; font-family: var(--mono); font-size: 12.5px; }
.field::placeholder { color: var(--muted); }

/* Apatinė juosta ir konsolė */
#dock { border-top: 1px solid var(--line); background: rgba(20,23,27,.92); display: flex; flex-direction: column; flex: 0 0 auto; }
.dock-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 40px; padding: 0 clamp(12px, 2vw, 24px); }
.dock-tabs { display: flex; align-items: center; gap: 4px; }
.dock-tab { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; }
.dock-tab[aria-pressed="true"] { background: rgba(234,230,221,.08); color: var(--ink); }
.dock-stats { display: flex; align-items: center; gap: 22px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; min-width: 0; }
.dock-stats .last { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.dock-toggle { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px; background: transparent; font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; }
.console { max-height: 0; opacity: 0; overflow: hidden; transition: max-height 380ms var(--ease), opacity 260ms ease; border-top: 1px solid transparent; }
#dock.open .console { max-height: 260px; opacity: 1; border-top-color: var(--line); }
.console-in { display: flex; flex-direction: column; height: 260px; background: var(--bg-deep); }
.con-lines { list-style: none; margin: 0; padding: 12px clamp(12px, 2vw, 24px) 8px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 12px; line-height: 1.5; }
.con-lines li { display: grid; grid-template-columns: 58px 110px minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.con-time { color: var(--dim); } .con-src { color: var(--muted); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.con-src.sat { color: var(--ink); } .con-src.you { color: var(--amber); } .con-src.sys { color: var(--dim); }
.con-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.con-text.undone { text-decoration: line-through; color: var(--dim); }
.con-text.wait { color: var(--amber); } .con-text.bad { color: var(--bad); }
.con-empty { color: var(--dim); font-family: var(--mono); font-size: 12px; padding: 4px 0; }
.con-prompt { display: flex; align-items: center; gap: 10px; padding: 8px clamp(12px, 2vw, 24px) 12px; border-top: 1px solid #1F242A; font-family: var(--mono); font-size: 12px; }
.con-prompt input { flex: 1; min-width: 0; height: 32px; border: 0; background: transparent; outline: none; font: inherit; }
.con-prompt input::placeholder { color: var(--muted); }
.caret { width: 7px; height: 14px; background: var(--ink); animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Prisijungimas ir pranešimai */
#login { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 20; }
.login-card { width: min(380px, 90vw); display: flex; flex-direction: column; gap: 18px; align-items: center; text-align: center; }
.login-title { font-family: var(--display); font-weight: 300; font-size: 15px; letter-spacing: .6em; padding-left: .6em; text-transform: uppercase; margin: 0; }
.login-card form { width: 100%; display: flex; gap: 8px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(26,30,35,.85); padding: 6px 6px 6px 22px; }
.login-card input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; outline: none; font-size: 14px; }
.round { width: 44px; height: 44px; flex: 0 0 44px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(234,230,221,.08); transition: background 200ms ease; }
.round.on { background: var(--ink); color: var(--bg); }
.login-error { color: var(--bad); font-size: 13px; min-height: 18px; margin: 0; }
#toasts { position: fixed; right: 20px; top: 84px; display: flex; flex-direction: column; gap: 8px; z-index: 30; pointer-events: none; }
.toast { pointer-events: auto; max-width: 380px; background: var(--panel); border: 1px solid var(--line-3); border-radius: 10px; padding: 10px 14px; font-size: 13px; display: flex; gap: 12px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: rise 240ms var(--ease); }
.toast.bad { border-color: var(--bad); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(234,230,221,.55); border-color: var(--ink); } 100% { box-shadow: 0 0 0 14px rgba(234,230,221,0); } }
.flash { animation: flash 1.4s ease-out 2; border-color: var(--ink) !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
