/* ARMARIA — mobile-first, dark by default. */

:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1f2430;
  --border: #2a3040;
  --text: #eef1f6;
  --text-muted: #9aa4b8;
  --accent: #d6a15b;
  --accent-ink: #1a1206;
  --danger: #e5675f;
  --radius: 14px;
  --gap: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top) var(--gap) 0;
  min-height: 56px;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.content {
  flex: 1;
  padding: var(--gap);
  padding-bottom: calc(var(--gap) + env(safe-area-inset-bottom));
}

h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 12px; }

.lead { color: var(--text-muted); margin: 0 0 20px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.hero { padding: 8px 0 24px; }

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 12px;
}

.feature-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text-muted);
}

.feature-list strong { color: var(--text); }

.button {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  min-height: 48px;
}

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

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.button-google { background: #fff; color: #1f1f1f; border-color: #fff; }

.link-button {
  background: none;
  border: none;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
  padding: 10px 0;
  font-size: 0.95rem;
  min-height: 44px;
}

.form { display: grid; gap: 10px; margin-top: 8px; }

.form label { font-size: 0.9rem; color: var(--text-muted); }

.form input[type="email"],
.form input[type="password"],
.form select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  min-height: 48px;
}

.checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text);
  font-size: 0.95rem;
  padding: 6px 0;
}

.checkbox input { margin-top: 4px; width: 20px; height: 20px; flex-shrink: 0; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 18px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-card { margin-top: 12px; }

.notice {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.notice-warning { border-color: var(--danger); color: var(--danger); }

.fineprint {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 16px;
  text-align: center;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.status-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
}

.status-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-value { display: block; font-weight: 600; margin-top: 4px; }

.dev-box {
  margin-top: 24px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  max-width: 90vw;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.toast[data-variant="error"] { border-color: var(--danger); color: var(--danger); }

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7f9;
    --surface: #ffffff;
    --surface-2: #f0f1f4;
    --border: #e0e2e8;
    --text: #16181d;
    --text-muted: #5f6673;
    --accent-ink: #ffffff;
    --accent: #9a6b23;
  }
}
