/* BoxAlarm shared design tokens + base polish (app + auth shells) */
:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-2: #121a24;
  --input-bg: #121a24;
  --text: #e8eef4;
  --muted: #a8b4c0;
  --accent: #e85d04;
  --accent-hover: #f07020;
  --accent-soft: #2a1f14;
  --ok: #3fb950;
  --warn: #d29922;
  --err: #f85149;
  --border: #3d4a5c;
  --border-strong: #5a6a7e;
  --line: #3d4a5c;
  --font-sans: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --radius: 8px;
  --radius-lg: 12px;
  --focus: #e85d04;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  color-scheme: dark;
}

h1, h2, .display {
  text-wrap: balance;
}

.lead, .panel-lead, .sub, .field-hint, .hint {
  text-wrap: pretty;
}

.score, .stat-num, .card strong, [data-tabular] {
  font-variant-numeric: tabular-nums;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

a { color: var(--accent); }

label {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
input[type="search"],
select,
textarea {
  width: 100%;
  margin-top: 0.35rem;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 16px;
  min-height: 44px;
  color-scheme: dark;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a8b4c0' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: rgba(232, 93, 4, 0.65);
}

button,
.btn {
  font-family: inherit;
  min-height: 44px;
  cursor: pointer;
  border-radius: var(--radius);
  font-weight: 600;
  transition-property: transform, background-color, border-color, opacity;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

button:disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.primary,
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

button.primary:hover:not(:disabled),
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

button.secondary,
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.status { font-size: 0.875rem; color: var(--muted); }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
