/* Smart Timekeeper — shared styles for the public/auth pages.
   Palette mirrors lib/theme/app_theme.dart so the web pages feel like the app. */

:root {
  --bg: #15181d;
  --surface: #1c2027;
  --surface2: #242a32;
  --line: #333b45;
  --text: #ecead3;
  --text: #ecEAE3;
  --text-dim: #aab0ba;
  --muted: #7c828d;
  --amber: #f2a93b;
  --amber-deep: #d98e1f;
  --amber-ink: #1a1206;
  --red: #ff5b4d;
  --red-bg: #39201d;
  --green: #4bc58c;
  --green-bg: #16302a;
  --radius-card: 16px;
  --radius-ctl: 11px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 48px;
}

.shell {
  width: 100%;
  max-width: 440px;
}

/* ---- header ---- */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: block;
}

.brand-name {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.2px;
}

.brand-sub {
  font-size: 12.5px;
  color: var(--muted);
}

/* ---- card ---- */

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

h1 {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 680;
  letter-spacing: -0.4px;
  margin: 0 0 8px;
}

h2 {
  font-size: 15px;
  font-weight: 640;
  margin: 0 0 8px;
}

p {
  margin: 0 0 14px;
  color: var(--text-dim);
  font-size: 14.5px;
}

p.tight { margin-bottom: 8px; }

p.fine {
  font-size: 13px;
  color: var(--muted);
}

.email-chip {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 9px;
  font-size: 13.5px;
  color: var(--text);
  word-break: break-all;
}

/* ---- form ---- */

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin: 16px 0 6px;
}

input[type="password"],
input[type="text"],
input[type="email"] {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px; /* 16px keeps iOS Safari from zooming on focus */
  padding: 13px 14px;
  outline: none;
}

input:focus {
  border-color: var(--amber);
}

.field-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.toggle {
  background: none;
  border: none;
  color: var(--amber);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  padding: 0;
  margin: 16px 0 6px;
  cursor: pointer;
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
  margin: 7px 0 0;
}

.btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  background: var(--amber);
  color: var(--amber-ink);
  border: none;
  border-radius: var(--radius-ctl);
  font-family: var(--font);
  font-size: 15.5px;
  font-weight: 680;
  padding: 14px 18px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { background: var(--amber-deep); }

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn.secondary:hover { background: var(--surface2); }

/* ---- banners ---- */

.banner {
  border-radius: var(--radius-ctl);
  padding: 11px 13px;
  font-size: 13.5px;
  margin: 16px 0 0;
}

.banner.error {
  background: var(--red-bg);
  border: 1px solid var(--red);
  color: #ffd9d5;
}

.banner.ok {
  background: var(--green-bg);
  border: 1px solid var(--green);
  color: #c9f2df;
}

/* ---- spinner ---- */

.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--line);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 6px auto 14px;
}

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

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

.center { text-align: center; }

/* ---- store links ---- */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.store-link {
  flex: 1 1 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  padding: 12px 14px;
  text-decoration: none;
}

.store-link:hover { border-color: var(--muted); }

.checks {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.checks li {
  color: var(--text-dim);
  font-size: 14px;
  padding: 5px 0 5px 24px;
  position: relative;
}

.checks li::before {
  content: "✓";
  position: absolute;
  left: 4px;
  color: var(--green);
  font-weight: 700;
}

/* ---- footer ---- */

footer {
  width: 100%;
  max-width: 440px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

footer a {
  color: var(--muted);
}

.hidden { display: none !important; }
