/* =============================================================================
 * style.css — the complete stylesheet for VideoDownloader (frontend).
 *
 * PURPOSE   Single source of visual truth. Holds, in order:
 *             1. Design tokens (:root)        — colour, radius, type, motion, z.
 *             2. Reset + document defaults.
 *             3. Utilities + shared primitives — only the ones this app uses.
 *             4. App layout (header + split panes).
 *             5. Control pane (link · format · quality · summary · action).
 *             6. Preview pane states (empty · loading skeleton · result).
 *             7. "Other formats" dropdown.
 *             8. Animations (stage transitions · result entrance).
 *             9. Responsive + reduced-motion.
 * PROVIDES  Every class referenced by index.html and javascript.js.
 * REQUIRES  Tabler icons web-font (loaded in index.html via CDN) for .ti glyphs.
 * NOTE      tonkiOS language: light mode only, one blue action accent, no
 *           gradients, no purple, no glow. Animate transform/opacity/blur only.
 * ============================================================================= */

/* ── 1. Design tokens ─────────────────────────────────────────────────────── */
:root {
  /* Accent — the one action / focus colour */
  --accent: #2563eb;
  --accent-strong: #1d4ed8;        /* hover */
  --accent-soft: #eff6ff;          /* selected row tint */
  --accent-ring: rgb(37 99 235 / .12);

  /* Neutral ramp */
  --ink: #171717;
  --ink-2: #404040;
  --muted: #737373;
  --faint: #a3a3a3;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --surface: #ffffff;
  --surface-1: #fafafa;            /* subtle row / pane background */
  --surface-2: #f5f5f5;            /* tracks, muted badges, skeletons */

  /* Status (never used as the action accent) */
  --ok: #059669;
  --danger: #dc2626;
  --danger-soft: #fef2f2;

  /* Radii */
  --r-sm: .5rem;
  --r-md: .6rem;
  --r-lg: .75rem;
  --r-pill: 9999px;

  /* Horizontal page gutter — widens with viewport (see media queries) */
  --pad-x: 1rem;

  /* Type scale */
  --fs-xs: 10.5px;
  --fs-sm: 11px;
  --fs-base: 12px;
  --fs-md: 12.5px;
  --fs-lg: 13px;
  --fs-xl: 15px;

  /* Sizing */
  --header-h: 3.5rem;

  /* Elevation */
  --shadow-pop: 0 14px 36px -14px rgb(0 0 0 / .28);
  --shadow-lift: 0 10px 22px -16px rgb(0 0 0 / .28);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .06);

  /* Z-index scale (no arbitrary z values elsewhere) */
  --z-pop: 40;                     /* the formats dropdown */
  --z-toast: 60;

  /* Motion */
  --ease: cubic-bezier(.16, .84, .3, 1);
  --t-fast: .15s;
}
@media (min-width: 481px)  { :root { --pad-x: 1.25rem; } }
@media (min-width: 1025px) { :root { --pad-x: 1.5rem; } }

/* ── 2. Reset & document defaults ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--fs-base);
  color: var(--ink);
  background: var(--surface);
  overflow: hidden;                /* the .app shell owns the viewport; .pane scrolls */
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv01";
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── 3. Utilities & shared primitives ─────────────────────────────────────── */
.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; }
.tnum { font-variant-numeric: tabular-nums; }
.balance { text-wrap: balance; }
.pretty { text-wrap: pretty; }

/* Thin, unobtrusive scrollbar for any scroll container */
.scroll-thin { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.scroll-thin::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll-thin::-webkit-scrollbar-track { background: transparent; }
.scroll-thin::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: var(--r-pill); border: 2px solid transparent; background-clip: content-box; }
.scroll-thin::-webkit-scrollbar-thumb:hover { background: #c8c8c8; background-clip: content-box; }

/* Entrance: fade-in up + blur. `.reveal` fires immediately; add d1..d3 to stagger. */
@keyframes enter { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.reveal { opacity: 0; animation: enter .5s var(--ease) forwards; }
.reveal.d1 { animation-delay: .05s; }
.reveal.d2 { animation-delay: .10s; }
.reveal.d3 { animation-delay: .15s; }

.section-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .025em; text-transform: uppercase; color: var(--faint); }

/* Brand badge (rounded ink square + white glyph) */
.icon-badge { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: var(--r-lg); background: var(--ink); color: #fff; }
.icon-badge--sm { border-radius: var(--r-sm); }
.icon-badge--muted { background: var(--surface-2); color: var(--faint); }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; }
.brand-mark svg { width: 1.2rem; height: 1.2rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 2rem; padding-inline: .75rem; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font-family: inherit; font-size: var(--fs-base); font-weight: 500; cursor: pointer; white-space: nowrap; transition: background var(--t-fast) ease-out, border-color var(--t-fast) ease-out, color var(--t-fast) ease-out, transform var(--t-fast) ease-out; }
.btn:hover { background: var(--surface-1); border-color: var(--border-strong); }
.btn:active { transform: translateY(.5px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn--ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn--muted { color: var(--muted); }
.btn--lg { height: 2.5rem; padding-inline: 1.1rem; font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn--block { width: 100%; }
.btn .ti { font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--accent); border-color: var(--accent); }
.download-btn { gap: .55rem; }
.download-btn__sep { width: 1px; height: 1.05rem; background: rgb(255 255 255 / .3); flex: none; }
.download-btn__size {
  display: inline-flex;
  align-items: center;
  height: 1.25rem;
  padding-inline: .42rem;
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / .14);
  border: 1px solid rgb(255 255 255 / .18);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 750;
  letter-spacing: .035em;
  text-transform: uppercase;
  line-height: 1;
}

/* Neutral info chip (header "All platforms") */
.chip { display: inline-flex; align-items: center; gap: .3rem; flex: none; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px 9px 3px 7px; }
.chip .ti { font-size: 13px; color: var(--faint); }

/* Video thumbnail + duration badge */
.thumb {
  --video-aspect: 1.7777778;
  position: relative;
  width: min(100%, calc((100dvh - 220px) * var(--video-aspect)));
  max-height: calc(100dvh - 220px);
  aspect-ratio: var(--video-aspect);
  margin-inline: auto;
  background: #000;
  overflow: hidden;
}
.thumb img,
.thumb video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.thumb video:not([hidden]) + img { display: none; }
.thumb__dur { position: absolute; right: .5rem; bottom: .5rem; padding: 2px 7px; border-radius: var(--r-sm); background: rgb(0 0 0 / .78); color: #fff; font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Quality radio list */
.qopts { display: grid; gap: .4rem; }
.qopt { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; transition: border-color var(--t-fast) ease-out, background var(--t-fast) ease-out; }
.qopt:hover { border-color: var(--border-strong); background: var(--surface-1); }
.qopt[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.qopt__radio { width: 1rem; height: 1rem; border-radius: var(--r-pill); border: 1.5px solid var(--border-strong); flex: none; display: grid; place-items: center; transition: border-color var(--t-fast) ease-out; }
.qopt[aria-checked="true"] .qopt__radio { border-color: var(--accent); }
.qopt[aria-checked="true"] .qopt__radio::after { content: ""; width: .5rem; height: .5rem; border-radius: var(--r-pill); background: var(--accent); }
.qopt__label { font-weight: 600; }
.qopt__sub { color: var(--faint); font-size: var(--fs-sm); animation: quality-detail-in .28s var(--ease) both; }
.qopt__meta { margin-left: auto; color: var(--faint); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; animation: quality-detail-in .28s var(--ease) both .04s; }
@keyframes quality-detail-in {
  from { opacity: 0; transform: translateY(3px); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* Toast (download-started feedback) */
.toast-wrap { position: fixed; left: 50%; bottom: max(1.25rem, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: var(--z-toast); display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none; }
.toast { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .8rem; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: var(--fs-base); font-weight: 500; box-shadow: var(--shadow-pop); animation: toast-in .25s var(--ease); }
.toast .ti { font-size: 16px; color: #fff; }
.toast--ok .ti { color: #6ee7b7; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Spinner (caption + button "starting" state) */
.spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 4. App layout ────────────────────────────────────────────────────────── */
.app { display: flex; flex-direction: column; height: 100dvh; }
.topbar { flex: none; display: flex; align-items: center; gap: .6rem; height: var(--header-h); padding-inline: var(--pad-x); border-bottom: 1px solid var(--border); }
.topbar__spacer { flex: 1; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand .icon-badge { width: 2rem; height: 2rem; }
.brand b { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.01em; }

.split { flex: 1; display: grid; grid-template-columns: 372px 1fr; min-height: 0; }
.pane { min-height: 0; overflow-y: auto; }
.pane--ctrl { border-right: 1px solid var(--border); padding: 1.5rem var(--pad-x) 2rem; }
.pane--view { background: var(--surface-1); display: flex; flex-direction: column; }

/* ── 5. Control pane ──────────────────────────────────────────────────────── */
.group { margin-bottom: 1.5rem; }
.group__label { display: block; margin-bottom: .5rem; }

/* Label row: section label on the left, detected-platform tag on the right */
.group__labelrow { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 1.35rem; margin-bottom: .5rem; }
.group__labelrow .section-label { margin: 0; flex: none; }
.detwrap { min-width: 0; max-width: 72%; display: flex; justify-content: flex-end; }
/* Detected-platform tag — neutral grey, monochrome icon (never the accent) */
.det-chip { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-pill); padding: 2px 9px 2px 7px; animation: det-in .18s var(--ease); }
.det-chip .ti { font-size: 13px; color: var(--muted); flex: none; }
.det-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes det-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.det-chip[data-leaving="true"] { animation: det-out .14s var(--ease) forwards; }
@keyframes det-out { to { opacity: 0; transform: translateY(-3px); } }

/* Link input field */
.linkfield { display: flex; align-items: center; gap: .4rem; height: 2.6rem; padding: 0 .35rem 0 .7rem; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); transition: border-color var(--t-fast) ease-out, box-shadow var(--t-fast) ease-out; }
.linkfield:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.linkfield.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.linkfield i.lead { color: var(--faint); font-size: 16px; }
.linkfield input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-family: inherit; font-size: var(--fs-base); color: var(--ink); }
.linkfield input::placeholder { color: var(--faint); }
.err { display: none; align-items: center; gap: .35rem; margin-top: .45rem; color: var(--danger); font-size: var(--fs-sm); }
.err.show { display: flex; }
.err .ti { font-size: 14px; }

/* Format toggle (video / audio) */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-md); background: var(--surface-2); width: 100%; }
.seg button { flex: 1; height: 2rem; border: 0; background: transparent; border-radius: var(--r-sm); color: var(--muted); font-family: inherit; font-weight: 600; font-size: var(--fs-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; transition: background var(--t-fast) ease-out, color var(--t-fast) ease-out, box-shadow var(--t-fast) ease-out; }
.seg button .ti { font-size: 18px; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg button[aria-selected="true"] .ti { color: var(--accent); }

/* Sticky action footer (selection summary + primary button) */
.ctrl-foot { margin-top: .5rem; }
.summary { display: flex; align-items: center; justify-content: space-between; padding: .7rem .85rem; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-1); margin-bottom: .75rem; }
.summary b { font-weight: 650; }
.summary small { color: var(--faint); }

/* ── 6. Preview pane states ───────────────────────────────────────────────── */
.viewbody { flex: 1; display: grid; place-items: center; padding: 1.5rem; min-height: 0; }
.stage { width: min(560px, 100%); }

/* Empty state */
.empty { text-align: center; color: var(--muted); }
.empty__icon { width: 3.5rem; height: 3.5rem; margin: 0 auto .9rem; }
.empty__icon .ti { font-size: 24px; }
.empty h2 { font-size: var(--fs-xl); font-weight: 650; color: var(--ink); }
.empty p { margin-top: .35rem; font-size: var(--fs-md); }

/* Loading — skeleton shimmer with sequential dots inside the thumbnail */
.load { display: flex; flex-direction: column; align-items: center; }
.sk { width: 100%; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-lift); }
.sk__img { position: relative; aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; }
.sk__shine { position: absolute; top: 0; bottom: 0; left: 0; width: 45%; background: rgb(255 255 255 / .55); transform: translateX(-180%) skewX(-18deg); animation: sk-shine 1.5s var(--ease) infinite; }
@keyframes sk-shine { to { transform: translateX(360%) skewX(-18deg); } }
.sk__body { padding: 1rem 1.1rem 1.15rem; }
.sk__ln { height: 11px; border-radius: 6px; background: var(--surface-2); position: relative; overflow: hidden; }
.sk__ln + .sk__ln { margin-top: .6rem; }
.sk__ln--title { height: 15px; width: 72%; margin-bottom: .85rem; }
.sk__ln--a { width: 90%; }
.sk__ln--b { width: 40%; }
.sk__ln .sk__shine { width: 80px; }
.load__dots { position: relative; z-index: 2; display: flex; gap: 8px; }
.load__dots i { width: 9px; height: 9px; border-radius: var(--r-pill); background: var(--surface-2); display: block; animation: load-dots 1.3s var(--ease) infinite; }
.load__dots i:nth-child(2) { animation-delay: .13s; }
.load__dots i:nth-child(3) { animation-delay: .26s; }
.load__dots i:nth-child(4) { animation-delay: .39s; }
.load__dots i:nth-child(5) { animation-delay: .52s; }
@keyframes load-dots { 0%, 65% { background: var(--surface-2); transform: scale(1); } 28% { background: var(--accent); transform: scale(1.32); } }
.load__cap { margin-top: 1.1rem; display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-size: var(--fs-base); }
.load__cap .ti { font-size: 15px; }
.load__cancel { margin-top: 1rem; }

/* Result */
.preview .thumb { border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--shadow-lift); }
.preview-tags { position: absolute; top: .6rem; right: .6rem; z-index: 2; display: flex; align-items: center; justify-content: flex-end; gap: 6px; max-width: calc(100% - 1.2rem); pointer-events: none; }
.preview-tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding-inline: 8px; border-radius: var(--r-pill); background: rgb(255 255 255 / .94); color: var(--ink); border: 1px solid rgb(0 0 0 / .08); box-shadow: var(--shadow-pop); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.preview-tag i { color: var(--muted); font-size: 14px; }

/* ── 7. "Other formats" dropdown ──────────────────────────────────────────── */
.actions { margin-top: 1.25rem; display: flex; gap: .6rem; justify-content: center; }
.reset-row { margin-top: .85rem; text-align: center; }
.fmt-menu { position: relative; }
.fmt-pop { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) scale(.97) translateY(6px); transform-origin: bottom center; width: min(20rem, calc(100vw - 2 * var(--pad-x))); max-height: 18rem; overflow-y: auto; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); z-index: var(--z-pop); opacity: 0; pointer-events: none; transition: opacity var(--t-fast) ease-out, transform var(--t-fast) ease-out; }
.fmt-menu[data-open="true"] .fmt-pop { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); pointer-events: auto; }
.fmt-group { padding: 6px 8px 2px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .025em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: .4rem; }
.fmt-group .ti { font-size: 13px; }
.fmt-item { display: flex; align-items: center; gap: .6rem; width: 100%; padding: 8px 9px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); font-family: inherit; font-size: var(--fs-base); text-align: left; cursor: pointer; transition: background var(--t-fast) ease-out, color var(--t-fast) ease-out; }
/* .is-hover mirrors :hover — set by JS so scrolling without a mouse-move still highlights */
.fmt-item:hover, .fmt-item.is-hover, .fmt-item:focus-visible { background: var(--surface-2); color: var(--ink); outline: none; }
.fmt-item__ic { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); flex: none; transition: background var(--t-fast) ease-out, color var(--t-fast) ease-out; }
.fmt-item:hover .fmt-item__ic, .fmt-item.is-hover .fmt-item__ic { background: var(--ink); color: #fff; }
.fmt-item__ic .ti { font-size: 15px; }
.fmt-item__main { flex: 1; min-width: 0; }
.fmt-item__label { font-weight: 600; }
.fmt-item__sub { color: var(--faint); font-size: var(--fs-sm); }
.fmt-item__size { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; flex: none; }
.fmt-sep { height: 1px; margin: 5px 6px; background: var(--border); }

/* ── 8. Animations ────────────────────────────────────────────────────────── */
/* Stage exit: the leaving pane fades + blurs out before the next enters. */
@keyframes stage-leave { from { opacity: 1; transform: none; filter: none; } to { opacity: 0; transform: translateY(-8px); filter: blur(5px); } }
.stage.is-leaving { animation: stage-leave .18s var(--ease) forwards; }

/* Result entrance — spring pop on the video, then the metadata cascades in deferred. */
.preview.result--in .thumb { animation: springpop .75s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes springpop { 0% { opacity: 0; transform: scale(.8) rotate(-1.5deg); } 60% { opacity: 1; } 100% { opacity: 1; transform: scale(1) rotate(0); } }
.preview.result--in .preview-tags  { animation: defer .5s var(--ease) both .42s; }
.preview.result--in .actions       { animation: defer .5s var(--ease) both .52s; }
@keyframes defer { 0% { opacity: 0; transform: translateY(10px); filter: blur(4px); } 100% { opacity: 1; transform: none; filter: none; } }

/* ── 9. Responsive & reduced motion ───────────────────────────────────────── */
@media (max-width: 880px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100dvh; }
  .split { grid-template-columns: 1fr; }
  .pane { overflow: visible; }
  .pane--ctrl { border-right: 0; border-bottom: 1px solid var(--border); }
  .pane--view { min-height: 56dvh; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
  .sk__shine, .load__dots i, .spin { animation: none !important; }
  .det-chip { animation: none; }
  .qopt__sub, .qopt__meta { animation: none !important; opacity: 1; transform: none; filter: none; }
  .preview.result--in .thumb, .preview.result--in .preview-tags,
  .preview.result--in .actions { animation: none !important; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ── 10. Password-only login shell ───────────────────────────────────────── */
.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--bg);
}

.login-panel {
  width: min(100%, 360px);
  display: grid;
  gap: 18px;
}

.login-panel .brand {
  justify-self: start;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-field {
  height: 44px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: 0 12px;
}

.login-field:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus);
}

.login-field i {
  color: var(--muted);
  font-size: 17px;
}

.login-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.login-error {
  min-height: 18px;
  color: var(--bad);
  font-size: 12px;
  line-height: 1.4;
}
