/* Auth and account pages. Visual system: docs/ui-screens.md. Fonts: fonts.css. */
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh;
  background-color: #1B5E34;
  background-image:
    radial-gradient(ellipse at center, rgba(255,255,255,0.12) 0%, rgba(0,0,0,0.38) 100%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.05) 0px, rgba(0,0,0,0.05) 1px, transparent 1px, transparent 3px);
  background-attachment: fixed;
  font-family: 'Roboto', system-ui, Arial, sans-serif; font-size: 16px; line-height: 1.45; color: #1d1d1b;
}
main.auth { max-width: 400px; margin: 0 auto; padding: 40px 16px; }
main.account { max-width: 440px; margin: 0 auto; padding: 28px 20px; display: grid; gap: 20px; }
.wordmark-big { display: block; margin: 0 0 20px; font-weight: 900; font-size: 40px; color: #FAF7EF; text-align: center; text-decoration: none; }
.page-title { margin: 0; font-weight: 700; font-size: 26px; color: #FAF7EF; }
.card {
  background: #FAF7EF; border-radius: 12px; padding: 32px 28px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  display: grid; gap: 20px;
}
.card h1 { margin: 0; font-weight: 700; font-size: 24px; }
.card h2 { margin: 0; font-weight: 700; font-size: 18px; }
.card p { margin: 0; }
.muted { color: #55554e; }
form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: 14px; }
.field .hint { font-size: 13px; color: #55554e; }
.field .error { font-weight: 500; font-size: 13px; color: #B71C1C; }
input[type=text], input[type=email], input[type=password], .field select {
  height: 48px; width: 100%; font: 16px 'Roboto', system-ui, Arial, sans-serif; padding: 0 12px;
  border: 1px solid #6b6b64; border-radius: 8px; background: #fff; color: #1d1d1b;
}
input.invalid { border-color: #B71C1C; }
.pw-wrap { position: relative; display: block; }
.pw-wrap .pw-input { padding-right: 48px; }
.pw-toggle { position: absolute; top: 0; right: 0; width: 48px; height: 48px; padding: 0; border: 0; background: none;
  color: #55554e; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 0 8px 8px 0; }
.pw-toggle:hover { color: #1d1d1b; }
input:disabled { background: #eeece4; }
.field select:focus-visible { outline: 3px solid #F9A825; outline-offset: 2px; }
button, .button {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; padding: 0 16px;
  font: 500 16px 'Roboto', system-ui, Arial, sans-serif; border-radius: 8px; cursor: pointer; text-decoration: none;
}
.primary { background: #1B5E34; color: #fff; border: 0; }
.secondary { background: transparent; color: #1B5E34; border: 1.5px solid #1B5E34; }
.danger { background: #B71C1C; color: #fff; border: 0; }
button:disabled { opacity: .55; cursor: default; }
a { color: #1B5E34; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #F9A825; outline-offset: 2px; }
.row { text-align: center; font-size: 15px; }
.right { text-align: right; font-size: 15px; margin-top: -6px; }
.alert { border-radius: 8px; padding: 12px 14px; font-size: 15px; }
.alert.error { background: #FDECEA; color: #7f1111; border: 1px solid #e0a4a0; }
.alert.ok { background: #E6F2EA; color: #14472A; border: 1px solid #9cc7ab; }
.warning { font-weight: 500; font-size: 14px; color: #B71C1C; }
.sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sessions li { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sessions .device { font-weight: 500; }
.sessions .when { font-size: 13px; color: #55554e; }
.sessions button { width: auto; height: 44px; }
.pill { font-size: 13px; font-weight: 500; color: #14472A; background: #E6F2EA; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
[hidden] { display: none !important; }
/* Moj nalog "Karte" (2026-11-17): compact rows, the select as wide as its longest option, and an
   ace of the chosen deck in the top right corner, its top level with the "Karte" heading. */
.deck-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.deck-main { display: grid; gap: 16px; min-width: 0; }
.deck-main h2 { line-height: 1; }
.deck-main select {
  /* As wide as the longest option: 12 px padding each side of the text, plus a small CSS-drawn
     arrow (no image: the CSP allows no data: URLs) instead of the wider native one. */
  -webkit-appearance: none; appearance: none; width: auto; max-width: 100%; padding: 0 30px 0 12px;
  justify-self: start; /* do not stretch to the hint text below */
  background-image: linear-gradient(45deg, transparent 50%, #1d1d1b 50%), linear-gradient(135deg, #1d1d1b 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.deck-preview { flex: none; width: auto; height: 96px; /* height set by nalog.ts to the text block */ border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.25); background: #fff; }
/* Moj nalog (2026-11-17): one spacing rhythm in every section: 16 px between rows (heading, text,
   fields, buttons, list items), 6 px inside a field (label, input, hint). Other pages unchanged. */
.account .card, .account form { gap: 16px; }
.account .field { gap: 6px; }
.account .sessions { gap: 16px; }
/* Moj nalog, "Moja podešavanja" (§10, 81, 82): Zvuk as a speaker (off by default), the volume slider and its number. */
.field-label { font-weight: 500; font-size: 14px; }
/* "Oblik u tekstu igre" (§10, 95): radio buttons, one per line. */
.radios { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.radios legend { font-weight: 500; font-size: 14px; padding: 0; margin-bottom: 6px; }
.radios label { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 400; cursor: pointer; }
.radios input { width: 18px; height: 18px; margin: 0; accent-color: #1B5E34; }
.sound-row { display: flex; align-items: center; gap: 12px; }
.sound-row .spk { flex: none; width: 40px; height: 40px; min-height: 0; padding: 0; display: grid; place-items: center; }
.sound-row .spk svg { width: 22px; height: 22px; display: block; }
.sound-row .spk.on { background: #1B5E34; color: #FAF7EF; }
.sound-row input[type=range] { flex: 1; min-width: 0; height: 40px; margin: 0; accent-color: #1B5E34; cursor: pointer; }
.sound-row.muted input[type=range] { accent-color: #8a8f88; opacity: .7; }
.sound-row .pct { width: 48px; text-align: right; font-variant-numeric: tabular-nums; }
.sound-row.muted .pct { color: #6f7a72; }
