/* rys auth — tokeny systemu Tally (jak w Neko 2.0). */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/static/geist-latin-wght-normal.woff2) format("woff2"); 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: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/static/geist-latin-ext-wght-normal.woff2) format("woff2"); 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; }

:root {
  color-scheme: light;
  --canvas: #f7f7f6; --tile: #eeeeec; --card: #fcfcfb; --track: #e3e3e1; --line: #e3e3e1;
  --ink: #161616; --ink-muted: #5f5f5c; --ink-subtle: #878783; --inverse: #161616; --on-inverse: #fcfcfb;
  --accent: #22bc52; --accent-from: #22bc52; --accent-to: #96da21; --on-accent: #0c2a12; --accent-ink: #136c30;
  --accent-soft: #d6f0d5; --accent-soft-to: #edf7d4; --danger: #c93a2e; --on-danger: #ffffff;
  --shadow-card: 0 1px 2px rgba(22,22,22,.04), 0 8px 24px rgba(22,22,22,.06);
  --shadow-float: 0 2px 6px rgba(22,22,22,.06), 0 16px 40px rgba(22,22,22,.12);
  --ease-out-soft: cubic-bezier(.22,1,.36,1); --ease-spring: cubic-bezier(.34,1.56,.64,1);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --canvas: #0f0f0f; --tile: #1a1a19; --card: #252524; --track: #333331; --line: #333331;
    --ink: #f5f5f3; --ink-muted: #a3a3a0; --ink-subtle: #7d7d79; --inverse: #f5f5f3; --on-inverse: #161616;
    --accent: #2fd063; --accent-from: #2fd063; --accent-to: #a6e635; --accent-ink: #5fdc85;
    --accent-soft: #1d3a24; --accent-soft-to: #2c3a1a; --danger: #f0685b; --on-danger: #1a0806;
    --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --shadow-float: 0 2px 6px rgba(0,0,0,.35), 0 16px 40px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--canvas); color: var(--ink); }
body { font: 14px/20px Geist, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--ink-subtle); }

.wrap { width: 100%; max-width: 440px; display: grid; gap: 12px; animation: enter 700ms var(--ease-out-soft) both; }
.wrap.wide { max-width: 640px; }
@keyframes enter { from { opacity: 0; transform: translateY(12px) scale(.96); filter: blur(8px); } }
.tile { background: var(--tile); border-radius: 24px; padding: 16px; display: grid; gap: 12px; }
.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow-card); padding: 16px; display: grid; gap: 16px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; line-height: 20px; padding: 4px 4px 0; }
.mark { width: 22px; height: 22px; border-radius: 8px; background: linear-gradient(135deg, var(--accent-from), var(--accent-to)); flex: none; }
.brand .domain { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--ink-muted); }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px; }
h1 { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: 15px; line-height: 20px; font-weight: 600; }
.muted { color: var(--ink-muted); font-size: 12px; line-height: 16px; }
.lead { color: var(--ink-muted); font-size: 13px; line-height: 18px; }

.btn { appearance: none; border: 0; cursor: pointer; font: 600 13px/18px inherit; font-family: inherit; height: 40px; padding: 0 20px; border-radius: 999px; background: var(--inverse); color: var(--on-inverse); display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: relative; overflow: hidden; text-decoration: none; transition: scale 150ms var(--ease-out-soft), color 250ms var(--ease-out-soft), opacity 150ms; white-space: nowrap; }
.btn:active { scale: .97; }
.btn::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--accent-from), var(--accent-to)); opacity: 0; transition: opacity 450ms var(--ease-out-soft); }
.btn > * { position: relative; }
.btn.is-done { color: var(--on-accent); }
.btn.is-done::before { opacity: 1; }
.btn[disabled] { cursor: not-allowed; }
.btn.is-busy { opacity: .7; }
.btn.block { width: 100%; }
.btn.sm { height: 32px; padding: 0 14px; }
.btn.quiet { background: var(--track); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink-muted); padding: 0 10px; }
.btn.ghost:hover { color: var(--ink); }
.btn.danger { background: var(--danger); color: var(--on-danger); }
.btn svg { width: 16px; height: 16px; flex: none; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 6px; }
.field label { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-muted); }
.input, select.input { width: 100%; height: 40px; border: 0; border-radius: 12px; background: var(--track); color: var(--ink); font: 14px/20px inherit; font-family: inherit; padding: 0 12px; }
.input::placeholder { color: var(--ink-subtle); }
.error { color: var(--danger); font-size: 12px; line-height: 16px; font-weight: 500; min-height: 0; }
.error:empty { display: none; }
.note { border-radius: 12px; background: var(--track); padding: 10px 12px; font-size: 12px; line-height: 16px; color: var(--ink-muted); overflow-wrap: anywhere; }
.wash { background: linear-gradient(90deg, var(--accent-soft), var(--accent-soft-to)); color: var(--ink); }

.list { display: grid; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 10px 0; min-width: 0; }
.list > li + li { border-top: 1px solid var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--track); color: var(--ink); }
.avatar.signal { background: var(--accent); color: var(--on-accent); }
.avatar svg { width: 16px; height: 16px; }
.main { flex: 1; min-width: 0; }
.title { font-weight: 600; font-size: 13px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { font-size: 12px; line-height: 16px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--track); font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge.signal { background: linear-gradient(90deg, var(--accent-from), var(--accent-to)); color: var(--on-accent); }
.row-actions { display: flex; gap: 4px; flex: none; }
.rename { display: none; gap: 8px; width: 100%; }
li.is-editing .rename { display: flex; }
li.is-editing .main, li.is-editing .row-actions { display: none; }
.rename .input { height: 32px; }
.split { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.split > .input { flex: 1; min-width: 160px; }
.empty { color: var(--ink-muted); font-size: 13px; }

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