/* ── Design Tokens ───────────────────────────── */
:root {
  --color-brand: #F20000;
  --color-brand-dark: #BC0000;
  --color-brand-light: #fef2f2;
  --color-bg: #f4f5f7;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #1e293b;
  --color-text-heading: #0f172a;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-success: #16a34a;
  --color-success-light: #f0fdf4;
  --color-error: #dc2626;
  --color-error-light: #fef2f2;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 100px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.08);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ── Reset ──────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

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

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }
input, select, textarea { font-family: inherit; }

/* ── Header ─────────────────────────────────── */
.app-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header .logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
}

.app-header .logo-group svg { flex-shrink: 0; }

.app-header .logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.app-header .brand {
  font-size: 18px;
  font-weight: 700;
  color: #231F20;
  letter-spacing: -0.3px;
}

.app-header .domain {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav a {
  font-size: 14px;
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: color 200ms;
}

.header-nav a:hover { color: var(--color-brand); }

.header-nav .nav-back {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Footer ─────────────────────────────────── */
.app-footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

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

.app-footer a {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.app-footer a:hover { color: var(--color-brand); }

/* ── Main content ───────────────────────────── */
#app-main {
  min-height: calc(100vh - 64px - 97px);
  padding-bottom: 48px;
}

/* ── Utility ────────────────────────────────── */
.hidden { display: none !important; }
