/* Стиль экранов входа — отдельно от styles.css приложения.
 *
 * Тянуть 48 КБ дашборда ради карточки на 380 пикселей значит платить ту же цену, ради снятия
 * которой вынесли витрину. Здесь только переменные темы и правила, которые эта карточка правда
 * использует; всё остальное осталось в приложении.
 *
 * Шрифты системные — решение проекта, записанное в шапке styles.css, и CSP всё равно запрещает
 * внешние источники.
 */
:root {
  color-scheme: dark;

  --bg: #0c0d0f;
  --s1: #131519;
  --s2: #191c21;
  --border: #2b3037;
  --border-2: #3a4149;

  --text: #edebe5;
  --muted: #a8a79f;
  --dim: #8a8a82;

  --ember: #ff6a3d;
  --ember-2: #ff8a4c;
  --coral: #f2606a;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, .7);
  --ring: 0 0 0 3px rgba(255, 106, 61, .22);

  --sans: -apple-system, 'Segoe UI', system-ui, 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow-x: clip; }

body {
  font: 14px/1.55 var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.auth-screen {
  min-height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 20px;
  background: radial-gradient(1200px 600px at 50% -10%, #16181c, var(--bg));
}

.auth-card {
  width: 100%; max-width: 380px;
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 30px 26px;
  box-shadow: var(--shadow-lg);
}

.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.logo-mark {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--ember-2), var(--ember));
}
.logo-mark svg { width: 20px; height: 20px; fill: #1a0d07; }
.logo-name { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.logo-name span { color: var(--ember); }

h1 { font-size: 19px; font-weight: 700; }

label.fld { display: block; margin-bottom: 14px; }
label.fld span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 550; }

input {
  width: 100%; padding: 10px 12px;
  background: var(--s2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); color: var(--text);
  font: inherit;
}
input::placeholder { color: var(--dim); }
input:focus { outline: none; border-color: var(--ember); box-shadow: var(--ring); }
input[readonly] { color: var(--muted); background: #16181c; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-2); background: var(--s2); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer;
  /* Одна строка: кликаемый текст в две строки — промах в цель на телефоне. */
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease;
}
.btn-primary {
  background: linear-gradient(150deg, var(--ember-2), var(--ember));
  border-color: transparent; color: #1a0d07;
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-block { width: 100%; margin-top: 6px; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Кольцо фокуса — настоящий outline, а не только тень: тень исчезает в режиме принудительных
 * цветов, и клавиатурный пользователь остаётся без указателя. */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--ember-2); outline-offset: 3px;
}
@media (forced-colors: active) {
  a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid CanvasText; }
}

.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.mb { margin-bottom: 14px; }
.mt { margin-top: 14px; }
.r { color: var(--coral); }
.r:empty { display: none; }
.r a { color: var(--ember-2); font-weight: 600; }

.auth-switch a { color: var(--ember-2); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }
.auth-switch[hidden] { display: none; }

.notice {
  padding: 10px 12px; margin-bottom: 14px;
  border: 1px solid rgba(242, 96, 106, .45); border-radius: var(--radius-sm);
  background: rgba(242, 96, 106, .1); color: var(--text); font-size: 13px;
}
.notice--ok {
  border-color: rgba(45, 212, 191, .45);
  background: rgba(45, 212, 191, .1);
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 1ms !important; }
}
