/* ===================================================================
   Design tokens
   Grounded in Rotary's own identity: the Rotary wheel's royal blue and
   gold, set against a paper-like ivory background. Display face is a
   confident slab serif (nods to engraved award citations); body face
   is a clean grotesk for readability in a long nomination form.
   =================================================================== */
:root {
  --royal-blue: #17458f;
  --deep-navy: #0c2c5c;
  --gold: #f7a81b;
  --gold-deep: #c9860a;
  --ivory: #faf7f0;
  --paper: #ffffff;
  --ink: #1c2530;
  --ink-soft: #5a6474;
  --line: #e3dfd3;
  --error: #b3261e;
  --success: #1e7a4c;

  --font-display: 'Roboto Slab', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 6px;
  --shadow: 0 1px 2px rgba(12, 44, 92, 0.06), 0 4px 16px rgba(12, 44, 92, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ---------- Header / masthead ---------- */
.masthead {
  background: var(--royal-blue);
  background-image: linear-gradient(135deg, var(--royal-blue) 0%, var(--deep-navy) 100%);
  color: #fff;
  padding: 44px 20px 56px;
  position: relative;
  overflow: hidden;
}
.masthead::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border: 14px solid rgba(247, 168, 27, 0.18);
  border-radius: 50%;
}
.masthead .eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12.5px;
  color: var(--gold);
  font-weight: 700;
  margin: 0 0 10px;
}
.masthead h1 {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 10px;
  max-width: 520px;
}
.masthead p {
  margin: 0;
  color: rgba(255,255,255,0.82);
  font-size: 15px;
  max-width: 480px;
}

/* ---------- Card / form sections ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: -32px;
  position: relative;
  z-index: 2;
  padding: 32px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--deep-navy);
  margin: 0 0 4px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-title .num {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-deep);
  letter-spacing: 0.04em;
}
.section-sub {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.nominee-block {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
}
.nominee-block:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

/* ---------- Form controls ---------- */
label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--deep-navy);
  margin: 0 0 6px;
}
.required::after {
  content: " *";
  color: var(--error);
}
.field { margin-bottom: 18px; }

input[type="text"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14.5px;
  padding: 11px 12px;
  border: 1px solid #cfd3dc;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--royal-blue);
  box-shadow: 0 0 0 3px rgba(23, 69, 143, 0.14);
}
textarea { resize: vertical; min-height: 110px; }

select:disabled, input:disabled {
  background: #f2f1ec;
  color: var(--ink-soft);
  cursor: not-allowed;
}

.dg-readout {
  font-size: 12.5px;
  color: var(--ink-soft);
  padding: 0 2px;
  margin-top: -10px;
  margin-bottom: 18px;
  display: none;
}
.dg-readout.show { display: block; }
.dg-readout strong { color: var(--deep-navy); }

.word-counter {
  display: flex;
  justify-content: flex-end;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 6px;
}
.word-counter.over { color: var(--error); font-weight: 700; }

.field-error {
  color: var(--error);
  font-size: 12.5px;
  margin-top: 6px;
  display: none;
}
.field-error.show { display: block; }

/* ---------- Buttons ---------- */
.btn-submit {
  width: 100%;
  background: var(--gold);
  color: var(--deep-navy);
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15.5px;
  padding: 15px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s ease, transform .05s ease;
  margin-top: 8px;
}
.btn-submit:hover { background: var(--gold-deep); }
.btn-submit:active { transform: translateY(1px); }
.btn-submit:disabled { background: #d9d9d9; color: #888; cursor: not-allowed; }

/* ---------- Alerts / banners ---------- */
.banner {
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14px;
  margin-bottom: 20px;
}
.banner.success { background: #e9f6ee; color: var(--success); border: 1px solid #b7e2c6; }
.banner.error { background: #fbe9e7; color: var(--error); border: 1px solid #f1c1bb; }

footer.site-footer {
  text-align: center;
  color: var(--ink-soft);
  font-size: 12.5px;
  margin-top: 28px;
}

/* ---------- Admin ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-nav {
  width: 220px;
  background: var(--deep-navy);
  color: #fff;
  padding: 24px 18px;
  flex-shrink: 0;
}
.admin-nav .brand {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 28px;
}
.admin-nav a {
  display: block;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 14px;
  padding: 9px 10px;
  border-radius: 5px;
  margin-bottom: 2px;
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,0.08); color: #fff; }
.admin-main { flex: 1; padding: 32px 40px; background: var(--ivory); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.stat-card .num { font-family: var(--font-display); font-size: 30px; color: var(--royal-blue); }
.stat-card .label { font-size: 12.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }

table.data-table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.data-table th, table.data-table td {
  text-align: left; padding: 11px 14px; font-size: 13.5px; border-bottom: 1px solid var(--line);
}
table.data-table th { background: #f4f6fb; color: var(--deep-navy); font-weight: 700; }
table.data-table tr:hover td { background: #fafbfd; }

.login-shell { max-width: 380px; margin: 90px auto; }
.login-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.login-card h1 { font-family: var(--font-display); font-size: 22px; color: var(--deep-navy); margin: 0 0 4px; }
.login-card p.sub { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 22px; }

.btn-secondary {
  display: inline-block; background: transparent; color: var(--royal-blue);
  border: 1px solid #c6cfe3; padding: 8px 14px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-secondary:hover { background: #f4f6fb; }

@media (max-width: 720px) {
  .masthead h1 { font-size: 26px; }
  .card { padding: 22px; }
  .admin-shell { flex-direction: column; }
  .admin-nav { width: 100%; }
}
