/* =========================================================================
   ВИЗАН — экраны входа и первого запуска
   ========================================================================= */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/manrope-cyr-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/manrope-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/manrope-lat.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;
}

:root {
  --bg: #f7f6f1;
  --bg-tint: #f1efe6;
  --panel: #ffffff;
  --panel-2: #fbfaf6;
  --ink: #16211c;
  --ink-2: #33413a;
  --muted: #626c65;
  --faint: #68716a;
  --line: #e7e3d8;
  --line-strong: #d6d1c2;
  --brand: #17453a;
  --brand-2: #0f2d26;
  --accent: #c4a46a;
  --accent-2: #ad8d56;
  --accent-soft: #f4eddd;
  --ok: #2f7d5b;
  --danger: #b42318;
  --danger-soft: #fdf2f1;
  --danger-line: #f2cfcb;
  --shadow-md: 0 1px 2px rgba(22, 33, 28, .04), 0 18px 50px rgba(22, 33, 28, .10);
  --shadow-sm: 0 1px 2px rgba(22, 33, 28, .05);
  --r-sm: 10px;
  --r-md: 13px;
  --r-lg: 16px;
  --r-xl: 22px;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1512;
    --bg-tint: #111a16;
    --panel: #15201b;
    --panel-2: #1a2620;
    --ink: #eef2ee;
    --ink-2: #c9d2cb;
    --muted: #9aa69e;
    --faint: #8b968e;
    --line: #253129;
    --line-strong: #34443a;
    --brand: #1f5a4b;
    --brand-2: #17453a;
    --accent: #cfb078;
    --accent-2: #b8975f;
    --accent-soft: #2a2619;
    --ok: #4ca47d;
    --danger: #ef7b6f;
    --danger-soft: #2a1715;
    --danger-line: #4a2622;
    --shadow-md: 0 1px 2px rgba(0, 0, 0, .25), 0 18px 50px rgba(0, 0, 0, .4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(900px 460px at 82% -12%, rgba(196, 164, 106, .16), transparent 62%),
    radial-gradient(700px 420px at 4% 108%, rgba(23, 69, 58, .08), transparent 58%),
    var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center;
  padding: 18px;
  min-height: 100dvh;
}
@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(900px 460px at 82% -12%, rgba(196, 164, 106, .09), transparent 62%),
      radial-gradient(700px 420px at 4% 108%, rgba(31, 90, 75, .26), transparent 58%),
      var(--bg);
  }
}

.card {
  width: min(432px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 30px 28px 26px;
  position: relative;
  overflow: hidden;
}
.card::before {
  /* тонкая латунная полоска — фирменная деталь */
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent) 20%, var(--accent) 80%, transparent);
  opacity: .9;
}

.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: linear-gradient(150deg, #d8bb85, var(--accent) 55%, var(--accent-2));
  color: var(--brand-2);
  display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), var(--shadow-sm);
}
.mark svg { width: 22px; height: 22px; }
.brand-name {
  font-weight: 800; font-size: 15px; letter-spacing: .17em; line-height: 1.2;
  text-transform: uppercase;
}
.brand-sub { color: var(--muted); font-size: 10.5px; margin-top: 3px; letter-spacing: .02em; }

h1 {
  font-size: 25px;
  margin: 0 0 7px;
  letter-spacing: -.03em;
  line-height: 1.15;
}
p.lead { color: var(--muted); margin: 0 0 22px; font-size: 13.5px; line-height: 1.5; }

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  margin: 14px 0 6px;
  letter-spacing: .01em;
}
input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 11px 12px;
  outline: none;
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input::placeholder { color: var(--faint); }
input:hover { border-color: var(--line-strong); }
input:focus {
  border-color: var(--brand);
  background: var(--panel);
  box-shadow: 0 0 0 3px rgba(23, 69, 58, .14);
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--panel-2) inset;
  transition: background-color 9999s ease-out 0s;
}

button {
  width: 100%;
  border: 0;
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: var(--brand);
  color: #f3f6f3;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: .01em;
  margin-top: 20px;
  box-shadow: 0 2px 10px rgba(23, 69, 58, .22);
  transition: filter .15s ease, transform .1s ease, opacity .15s ease;
}
button:hover { filter: brightness(1.09); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .6; cursor: default; box-shadow: none; transform: none; }

.err {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid var(--danger-line);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.45;
  margin-top: 14px;
  display: none;
}
.err.show { display: block; }

.note {
  color: var(--faint);
  font-size: 11.5px;
  margin-top: 16px;
  text-align: center;
  line-height: 1.5;
}
.foot {
  color: var(--faint);
  font-size: 10.5px;
  text-align: center;
  margin-top: 22px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  body { padding: 14px 12px; align-items: start; padding-top: max(18px, 6vh); }
  .card { padding: 24px 20px 20px; border-radius: var(--r-lg); }
  h1 { font-size: 23px; }
}

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