/*
 * Shoe Session — shared styles.
 * Dark theme, mobile-first. No frameworks. Modern browsers only.
 *
 * Pages compose with one .card-shell wrapper; they may add inline
 * <style> for page-specific tweaks.
 */

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --border: #2a2a2a;
  --text: #e0e0e0;
  --text-muted: #888;
  --text-faint: #555;
  --accent: #d4a574;          /* warm tan — flattering on dark, not white */
  --accent-hover: #e6b888;
  --accent-soft: rgba(212, 165, 116, 0.12);
  --error: #ef5350;
  --error-soft: rgba(239, 83, 80, 0.10);
  --success: #66bb6a;
  --success-soft: rgba(102, 187, 106, 0.10);
  --warn: #ffb74d;
  --warn-soft: rgba(255, 183, 77, 0.10);
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem;
}

/* -----------------------------------------------------------------------
 * Layout — single column on phone, max-width on tablet+
 * --------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: 440px;
  margin: 2rem auto;
}

.shell-wide {
  max-width: 720px;
}

.brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.brand a {
  color: var(--accent);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.card h1, .card h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.card .subtitle {
  margin: 0 0 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* -----------------------------------------------------------------------
 * Forms
 * --------------------------------------------------------------------- */

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  background: var(--bg);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.form-group input[type="file"] {
  padding: 0.5rem;
  cursor: pointer;
}

.form-group .help {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* -----------------------------------------------------------------------
 * Buttons
 * --------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: var(--accent);
  color: #1a1a1a;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  background: var(--text-faint);
  color: #2a2a2a;
  cursor: not-allowed;
}

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

.btn-secondary:hover:not(:disabled) {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

/* -----------------------------------------------------------------------
 * Spinner (inline in buttons)
 * --------------------------------------------------------------------- */

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-secondary .spinner {
  border-color: rgba(212, 165, 116, 0.3);
  border-top-color: var(--accent);
}

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

/* -----------------------------------------------------------------------
 * Status messages
 * --------------------------------------------------------------------- */

.msg {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
}

.msg-error {
  background: var(--error-soft);
  color: var(--error);
  border-left-color: var(--error);
}

.msg-success {
  background: var(--success-soft);
  color: var(--success);
  border-left-color: var(--success);
}

.msg-info {
  background: var(--accent-soft);
  color: var(--accent);
  border-left-color: var(--accent);
}

.msg-warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-left-color: var(--warn);
}

/* -----------------------------------------------------------------------
 * Misc — links bar, separator, dividers
 * --------------------------------------------------------------------- */

.links {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.links a {
  color: var(--accent);
  text-decoration: none;
}

.links a:hover {
  text-decoration: underline;
}

.links .sep {
  margin: 0 0.5rem;
  color: var(--text-faint);
}

.forgot-link {
  text-align: right;
  margin: -0.5rem 0 0.75rem 0;
  font-size: 0.85rem;
}

.forgot-link a {
  color: var(--text-muted);
  text-decoration: none;
}

.forgot-link a:hover {
  color: var(--accent);
}

.divider {
  margin: 1.25rem 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.8rem;
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 1.5rem);
  height: 1px;
  background: var(--border);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

/* -----------------------------------------------------------------------
 * Cloudflare Turnstile container — keep margin consistent
 * --------------------------------------------------------------------- */

.cf-turnstile {
  margin: 0.5rem 0 1rem 0;
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -----------------------------------------------------------------------
 * Tablet+ breakpoint — wider cards, slightly larger type
 * --------------------------------------------------------------------- */

@media (min-width: 600px) {
  body { padding: 2rem; }
  .card { padding: 2.25rem; }
  .card h1, .card h2 { font-size: 1.75rem; }
}
