:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e3e7f0;
  --text: #10203f;          /* navy ink */
  --muted: #5c6884;
  --navy: #0c2154;          /* logo background navy */
  --navy-dark: #081536;
  --accent: #cf142b;        /* flag red */
  --accent-dark: #a60f22;
  --accent-bright: #ff4d5e; /* red on dark backgrounds */
  --accent-soft: #fdecef;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(12, 33, 84, .05), 0 10px 30px rgba(12, 33, 84, .08);
  --maxw: 1040px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-logo {
  width: 42px; height: 42px;
  border-radius: 11px;
  object-fit: cover;
  display: block;
  box-shadow: 0 1px 3px rgba(12, 33, 84, .22);
}
.brand-text { display: flex; flex-direction: column; font-weight: 800; font-size: 16px; color: var(--navy); }
.brand-text em { font-style: normal; font-weight: 600; font-size: 11px; letter-spacing: .04em; color: var(--accent); text-transform: uppercase; }

.site-nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.site-nav a { text-decoration: none; color: var(--muted); font-weight: 600; }
.site-nav a:hover { color: var(--accent); }
.site-nav .who { color: var(--text); font-weight: 600; }
.header-cta {
  color: var(--accent) !important;
  padding: 8px 14px;
  border-radius: 9px;
}
.header-cta:hover { background: var(--accent-soft); }

/* ── Layout ──────────────────────────────────────────────────────────────── */
main {
  flex: 1;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 16px 24px 56px;
}

/* ── Hero (navy panel, echoes the logo) ──────────────────────────────────── */
.hero {
  text-align: center;
  padding: 60px 28px 54px;
  background: radial-gradient(120% 140% at 50% 0%, #14306e 0%, var(--navy) 45%, var(--navy-dark) 100%);
  border-radius: 22px;
  color: #fff;
}
.hero-logo {
  width: 150px; height: 150px;
  border-radius: 26px;
  object-fit: cover;
  display: block;
  margin: 0 auto 26px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  outline: 3px solid rgba(255, 255, 255, .12);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 14px;
}
.hero .eyebrow { color: var(--accent-bright); }
.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 18px;
  color: #fff;
}
.hero h1 span { color: #fff; border-bottom: 4px solid var(--accent-bright); padding-bottom: 2px; }
.lead {
  max-width: 620px;
  margin: 0 auto 28px;
  font-size: 18px;
  color: var(--muted);
}
.hero .lead { color: #c8d2ea; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 10px;
  transition: background .15s ease, transform .05s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

/* ── About ───────────────────────────────────────────────────────────────── */
.about {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.about-photo { width: 100%; border-radius: 14px; object-fit: cover; display: block; }
.about-text h2 { font-size: 24px; color: var(--navy); margin: 4px 0 12px; }
.about-text p:last-child { color: var(--muted); }

/* ── Features ────────────────────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--accent);
}
.card-icon { font-size: 28px; display: block; margin-bottom: 12px; }
.card h2 { font-size: 18px; color: var(--navy); margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

/* ── Coming soon (navy panel bookend) ────────────────────────────────────── */
.soon {
  margin-top: 40px;
  text-align: center;
  background: var(--navy);
  border-radius: var(--radius);
  padding: 44px 24px;
  color: #fff;
}
.soon-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.soon h2 { font-size: 22px; margin-bottom: 10px; color: #fff; }
.soon p { max-width: 560px; margin: 0 auto; color: #c8d2ea; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .version { font-size: 11px; opacity: .7; }

/* ── Auth (login) ────────────────────────────────────────────────────────── */
.auth { display: flex; justify-content: center; padding: 40px 12px; }
.auth-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  border-top: 4px solid var(--accent);
}
.auth-header { text-align: center; margin-bottom: 22px; }
.auth-logo {
  width: 76px; height: 76px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  margin: 0 auto 14px;
  box-shadow: 0 2px 8px rgba(12, 33, 84, .2);
}
.auth-header h1 { font-size: 22px; color: var(--navy); margin-bottom: 6px; }
.auth-header .muted { font-size: 14px; }
.muted { color: var(--muted); }
.auth form { display: flex; flex-direction: column; gap: 12px; }
.auth input {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
}
.auth input:focus { outline: none; border-color: var(--accent); }
.auth .btn-primary { border: none; cursor: pointer; margin-top: 4px; text-align: center; }
.auth-error {
  background: var(--accent-soft); color: var(--accent-dark); border: 1px solid #f6c9c4;
  border-radius: 9px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px;
}
.auth-note { margin-top: 18px; font-size: 13px; color: var(--muted); text-align: center; }

/* ── Admin ───────────────────────────────────────────────────────────────── */
.admin h1 { color: var(--navy); margin: 12px 0 24px; }
.admin-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}
.admin-section h2 { font-size: 18px; color: var(--navy); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.admin-section .count { font-size: 13px; color: var(--muted); font-weight: 500; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.admin-table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tag {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark);
}
.tag-admin { background: #e6ecfb; color: var(--navy); }
.tag-ok { background: #dcfce7; color: #15803d; }
.tag-off { background: #fee2e2; color: #b91c1c; }
.table-scroll { overflow-x: auto; }
.you { font-size: 12px; color: var(--muted); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Flash banner */
.flash { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 18px; font-weight: 600; }
.flash-ok  { background: #dcfce7; color: #15803d; border: 1px solid #b6e6c5; }
.flash-err { background: var(--accent-soft); color: var(--accent-dark); border: 1px solid #f6c9c4; }

/* Create-user form */
.user-create { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.user-create input[type="email"],
.user-create input[type="password"] {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 14px; background: var(--bg); color: var(--text); min-width: 180px;
}
.user-create input:focus { outline: none; border-color: var(--accent); }
.user-create .btn-primary { border: none; cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }

/* Inline row forms + small buttons */
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline input[type="password"] {
  padding: 6px 9px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; background: var(--bg); color: var(--text); width: 130px;
}
.inline input:focus { outline: none; border-color: var(--accent); }
.btn-sm {
  padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; white-space: nowrap;
}
.btn-sm:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { border-color: #f3c2c2; color: var(--accent); }
.btn-danger:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .about { grid-template-columns: 1fr; text-align: center; }
  .about-photo { max-width: 220px; margin: 0 auto; }
}
