/* Boje iz design systema (mobile/lib/app/theme/color_schemes.dart, IMP-020); tema prati sistem. */
:root {
  color-scheme: light dark;
  --primary: #805310;
  --on-primary: #ffffff;
  --surface: #faf6f0;
  --surface-container: #f2ebe1;
  --on-surface: #1f1a14;
  --on-surface-variant: #5a5047;
  --outline: #857a6e;
  --outline-variant: #ddd3c6;
  --error: #ba1a1a;
  --success: #2e6b3a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #f7bc70;
    --on-primary: #2a1800;
    --surface: #18120c;
    --surface-container: #251e17;
    --on-surface: #f4ece1;
    --on-surface-variant: #cfc2b2;
    --outline: #8c7f72;
    --outline-variant: #4a5a4d;
    --error: #ffb4ab;
    --success: #9fd7a5;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--surface);
  color: var(--on-surface);
  font-family:
    Manrope,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.card {
  width: 100%;
  max-width: 440px;
  padding: 32px 24px;
  border-radius: 24px;
  background: var(--surface-container);
}

.logo img {
  display: block;
  margin-bottom: 16px;
}

h1 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 700;
}

h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
}

.hint {
  color: var(--on-surface-variant);
}

label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 600;
}

input[type='password'],
input[type='text'] {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--outline);
  border-radius: 12px;
  background: var(--surface);
  color: var(--on-surface);
  font: inherit;
}

input:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 500;
}

.rules {
  margin-top: 16px;
  color: var(--on-surface-variant);
}

.rules p {
  margin: 0;
}

.rules ul {
  margin: 4px 0 0;
  padding-left: 20px;
}

.rules li.met {
  color: var(--success);
}

.button {
  width: 100%;
  min-height: 48px;
  margin-top: 20px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.field-error {
  margin: 6px 0 0;
  color: var(--error);
}

.status {
  display: flex;
  gap: 12px;
  align-items: center;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--outline-variant);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}

[hidden] {
  display: none !important;
}

/* Informativne stranice (DN-071) */
.info {
  text-align: left;
}

.info section p {
  line-height: 1.55;
  margin: 0 0 0.9rem;
}

.links {
  list-style: none;
  padding: 0;
}

.links li {
  margin: 0.6rem 0;
}

.links a {
  color: inherit;
}
