:root {
  --brand-1: #1e3a8a;
  --brand-2: #0f766e;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --white: #fff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
}

/* ---- Nav ---- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: var(--white);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .5px;
}
.brand-name { font-weight: 700; font-size: 1.05rem; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.logout-form { display: inline; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px;
  font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  font-size: .95rem; transition: transform .05s ease, opacity .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: #fff; }
.btn-primary:hover { opacity: .92; }
.btn-outline { border-color: rgba(255,255,255,.7); color: #fff; background: transparent; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---- Hero ---- */
.main { flex: 1; }
.hero {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff; text-align: center; padding: 90px 24px 80px;
}
.hero-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 78px; height: 78px; border-radius: 50%; margin-bottom: 24px;
  background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.4);
  font-size: 24px; font-weight: 700; letter-spacing: 1px;
}
.hero h1 { font-size: 2.6rem; margin-bottom: 14px; }
.hero .lead { max-width: 620px; margin: 0 auto 30px; font-size: 1.15rem; opacity: .92; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- Features ---- */
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px; max-width: 1000px; margin: 56px auto; padding: 0 24px;
}
.feature-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: 26px 22px;
}
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--muted); }

/* ---- Auth forms ---- */
.auth { display: flex; justify-content: center; padding: 56px 24px; }
.auth-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 34px; width: 100%; max-width: 420px; box-shadow: 0 6px 24px rgba(0,0,0,.04);
}
.auth-card h2 { margin-bottom: 22px; text-align: center; }
.form-row { margin-bottom: 16px; display: flex; flex-direction: column; }
label { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 1rem; background: #fff;
}
.form-input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(15,118,110,.12); }
.auth-card form > label { display: block; margin-top: 4px; }
.auth-card .btn-block { margin-top: 10px; }
.auth-alt { text-align: center; margin-top: 18px; color: var(--muted); }
.help { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.field-error { color: #dc2626; font-size: .82rem; margin-top: 4px; }

/* ---- Messages ---- */
.messages { max-width: 1000px; margin: 16px auto 0; padding: 0 24px; }
.message { padding: 12px 16px; border-radius: 8px; margin-bottom: 10px; font-size: .92rem; }
.message.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.message.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ---- Dashboard ---- */
.dashboard { max-width: 900px; margin: 48px auto; padding: 0 24px; }
.dashboard h2 { margin-bottom: 4px; }
.muted { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 26px; }
.info-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.info-card h3 { margin-bottom: 14px; font-size: 1.05rem; }
.details { list-style: none; }
.details li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.details li:last-child { border-bottom: none; }
.status { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.status-active { background: #dcfce7; color: #15803d; }
.status-pending { background: #fef9c3; color: #a16207; }
.status-expired { background: #fee2e2; color: #b91c1c; }

/* ---- Footer ---- */
.footer { text-align: center; padding: 24px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); background: var(--white); }

@media (max-width: 560px) {
  .hero h1 { font-size: 2rem; }
  .nav { padding: 12px 16px; }
  .nav-links { gap: 12px; }
  .brand-name { display: none; }
}
.status-submitted { background: #dbeafe; color: #1e40af; }
.status-rejected { background: #fee2e2; color: #b91c1c; }
