/* The sign-in page (backend/login.html). Public: served without a session. */

/* The same tokens as frontend/index.html, so the two read as one product. */
:root {
  --blue: #2563EB; --blue-hover: #1D55D4; --bg: #F1F5F9; --white: #FFFFFF;
  --border: #E5E7EB; --text: #111827; --muted: #6B7280; --red: #EF4444;
  --shadow-md: 0 4px 16px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.04);
  --radius-lg: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  font-family: 'Montserrat', system-ui, sans-serif; font-size: 14px;
  background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased;
}
.card {
  width: 100%; max-width: 380px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 32px 28px 28px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.logo-icon {
  width: 34px; height: 34px; background: var(--blue); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: -.5px;
  box-shadow: 0 2px 8px rgba(37,99,235,.30);
}
.logo-text { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
h1 { font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.sub { color: var(--muted); font-size: 13px; margin-top: 4px; margin-bottom: 24px; }
.error {
  background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C;
  border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 500;
  margin-bottom: 18px;
}
.row { margin-bottom: 16px; }
label {
  display: block; font-size: 11.5px; font-weight: 600; color: var(--muted);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px;
}
input {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--border);
  border-radius: 9px; font-size: 14px; color: var(--text); background: var(--white);
  outline: none; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.submit {
  width: 100%; margin-top: 8px; padding: 12px 20px; border: none; border-radius: 999px;
  background: var(--blue); color: #fff; font-family: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer; box-shadow: 0 1px 4px rgba(37,99,235,.30);
  transition: background .14s, box-shadow .14s, transform .1s;
}
.submit:hover { background: var(--blue-hover); box-shadow: 0 3px 10px rgba(37,99,235,.35); }
.submit:active { transform: scale(.98); }
/* Show/hide password. macOS forces a Latin keyboard layout in every password
   field (secure input) — Chrome and Safari alike — so a Ukrainian password
   cannot be typed there at all. Revealed, it is a plain text field and any
   layout works. */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle {
  position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
  width: 34px; height: 34px; border: none; border-radius: 8px;
  background: none; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pw-toggle:hover { background: var(--bg); color: var(--text); }
.pw-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.pw-toggle svg { width: 18px; height: 18px; }
.pw-toggle .eye-off, .pw-toggle.shown .eye { display: none; }
.pw-toggle.shown .eye-off { display: block; }
