/* Server-rendered pages (auth) — same design tokens as the React app. */

:root {
  --bg-app: #110E0C;
  --surface: #1A1613;
  --surface-2: #221E1A;
  --surface-3: #322C27;
  --border: rgba(255, 255, 255, 0.07);
  --text: #F3EDE4;
  --text-muted: #8C8680;
  --text-faint: #5a5550;
  --verdigris: #2F8B82;
  --danger: #E34A5C;
  --verified: #43d9a3;
  --radius: 20px;
  --radius-sm: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg-app);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.flash {
  max-width: 420px;
  margin: 16px auto 0;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
}
.flash-notice { background: rgba(67, 217, 163, 0.12); color: var(--verified); }
.flash-alert { background: rgba(255, 93, 93, 0.12); color: var(--danger); }

/* ---------- Auth pages ---------- */

.auth-wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

.auth-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.auth-logo span { color: var(--verdigris); }

.auth-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 36px;
}
.auth-sub { color: var(--text-muted); font-size: 14px; margin-top: 8px; }

.auth-form { margin-top: 28px; }

.field { margin-top: 16px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.field input[type="email"],
.field input[type="password"],
.field input[type="text"],
.admin-search input[type="search"] {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  padding: 16px;
  outline: none;
}
.field input:focus { border-color: rgba(47, 139, 130, 0.5); }

.field-hint { color: var(--text-faint); font-size: 12px; margin-top: 6px; }

.remember { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--text-muted); font-size: 14px; }
.remember input { accent-color: var(--verdigris); width: 17px; height: 17px; }

.btn-primary {
  display: block;
  width: 100%;
  margin-top: 24px;
  background: var(--verdigris);
  color: #F3EDE4;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 800;
  padding: 17px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(47, 139, 130, 0.25);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  padding: 15px;
  cursor: pointer;
  text-decoration: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-links { margin-top: 28px; text-align: center; font-size: 14px; color: var(--text-muted); }
.auth-links a { color: var(--verdigris); text-decoration: none; font-weight: 700; }
.auth-links p + p { margin-top: 10px; }

.error-messages {
  margin-top: 20px;
  background: rgba(255, 93, 93, 0.1);
  border: 1px solid rgba(255, 93, 93, 0.3);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--danger);
}
.error-messages ul { margin-left: 16px; margin-top: 6px; }

/* ---------- Printable QR stickers ---------- */

.print-body { background: #f4f1e8; color: #0b0e12; }
.print-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #110E0C;
  color: #F3EDE4;
}
.print-toolbar a { color: #2F8B82; text-decoration: none; font-weight: 700; }
.print-toolbar button {
  background: #2F8B82; color: #F3EDE4; border: none; border-radius: 10px;
  font-weight: 800; padding: 10px 16px; cursor: pointer;
}
.print-hint { padding: 16px 24px; color: #5a6172; font-size: 13px; }

.sticker-sheet {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 24px;
}
.sticker {
  background: #f4f1e8; /* brand chalk — matches the QR fill so it reads as one card */
  border: 1.5px dashed #8a93a3;
  border-radius: 16px;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
  padding: 20px 18px 16px;
  text-align: center;
  break-inside: avoid;
}
.sticker-gym { border-color: #2F8B82; }
.sticker-qr { position: relative; margin: 4px auto 10px; width: 172px; }
.sticker-qr svg { display: block; width: 100%; height: auto; }
/* The branded knockout: same chalk as the QR fill so it reads as whitespace,
   not a box floating on top. Kept ≤ ~35% of the QR's width — inside what
   level-H error correction can absorb. */
.qr-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: #f4f1e8;
  border-radius: 12px;
  padding: 6px 8px;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.qr-badge-mark {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.qr-badge-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 9px;
  letter-spacing: -0.01em;
  color: #0b0e12;
  line-height: 1;
}
.qr-badge-name span { color: inherit; }
.sticker h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0b0e12;
  margin-top: 2px;
}
.sticker p { color: #5a6172; font-size: 12px; margin-top: 4px; }

@media print {
  .no-print { display: none !important; }
  .print-body { background: #fff; }
  .sticker-sheet { padding: 0; gap: 10px; }
  .sticker { border-style: solid; }
}

/* Exercise list rows carry an archive toggle beside the link, so hiding a
   movement is one click from the list. */
.adm-listrow { display: flex; align-items: stretch; gap: 8px; }
.adm-listrow .admin-row { flex: 1 1 auto; min-width: 0; }
.adm-listrow form { display: flex; margin: 0; }
.adm-listrow-action { white-space: nowrap; }
.adm-badge-archived { background: var(--surface-3); color: var(--text-faint); }
