/* ===== Rotary Club of Stockton — Events · design tokens ===== */
:root {
  --blue-900: #0c2340;
  --blue-700: #17458f;
  --gold: #f7a81b;
  --gold-200: #f7d488;
  --bg: #f6f4ef;
  --beige: #fbf3e2;
  --beige-border: #eeddbb;
  --surface: #fff;
  --border: #e7e2d6;
  --ink: #1b2733;
  --muted: #6b7785;
  --muted-2: #8a93a0;
  --success: #1f9d57;
  --success-bg: #e8f5ec;
  --danger: #b3261e;

  --serif: 'Lora', Georgia, serif;
  --sans: 'Open Sans', system-ui, -apple-system, sans-serif;
  --maxw: 1120px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0; }
a { color: var(--blue-700); }
img { display: block; max-width: 100%; }

/* ===== Rotary mark (official logo image) ===== */
.rotary-mark {
  width: 40px; height: 40px; flex: 0 0 auto;
  background: url('/assets/partner-rotary.png') center / contain no-repeat;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 700; font-size: 15px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: filter .15s ease, transform .15s ease;
}
.btn:hover { filter: brightness(0.96); }
.btn-gold { background: var(--gold); color: var(--blue-900); }
.btn-blue { background: var(--blue-700); color: #fff; }
.btn-outline { background: #fff; border-color: #c9d2de; color: var(--blue-700); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== Site shell ===== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--blue-900); color: #fff;
  box-shadow: 0 2px 14px rgba(12,35,64,.18);
}
.site-header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.05; }
.brand-tag { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-200); }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: #e8ecf3; text-decoration: none; font-weight: 600; font-size: 14px; }
.site-nav a:hover { color: #fff; }

.site-footer { background: var(--blue-900); color: #b9c2d4; margin-top: 60px; }
.site-footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 28px 22px; text-align: center; font-size: 13px; line-height: 1.7; }

.page { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ===== Events listing ===== */
.listing-hero {
  background: linear-gradient(120deg, var(--blue-900), var(--blue-700));
  color: #fff;
}
.listing-hero-inner { max-width: var(--maxw); margin: 0 auto; padding: 54px 22px; }
.listing-hero h1 { font-size: 40px; color: #fff; }
.listing-hero p { font-size: 17px; color: #d7deea; max-width: 38em; margin: 12px 0 0; }
.eyebrow { font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); font-weight: 700; }

.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; margin: 32px 0; }
.event-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 10px 26px -20px rgba(12,35,64,.5);
}
.event-card-cover { height: 120px; background: linear-gradient(120deg, var(--blue-700), var(--blue-900)); position: relative; }
.event-card-badge { position: absolute; top: 12px; left: 12px; background: var(--gold); color: var(--blue-900); font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.event-card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.event-card-date { font-size: 13px; color: var(--blue-700); font-weight: 700; }
.event-card-title { font-size: 21px; }
.event-card-meta { font-size: 14px; color: var(--muted); }
.event-card-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; }

.sponsor-callout {
  background: var(--beige); border: 1px solid var(--beige-border); border-radius: var(--radius);
  padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}

/* ===== Event microsite ===== */
.event-hero { background: linear-gradient(120deg, var(--blue-900), var(--blue-700)); color: #fff; }
.event-hero-inner { max-width: var(--maxw); margin: 0 auto; padding: 50px 22px; }
.event-hero h1 { font-size: 42px; color: #fff; margin-top: 8px; }
.event-hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; font-size: 15px; color: #dbe2ee; }
.back-link { color: var(--gold-200); text-decoration: none; font-size: 14px; font-weight: 600; }

.impact-strip { display: flex; flex-wrap: wrap; gap: 18px; margin: 26px 0 0; }
.impact { flex: 1 1 160px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: 16px; text-align: center; }
.impact-num { font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--gold); }
.impact-label { font-size: 13px; color: #cdd6e6; margin-top: 4px; }

.event-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .9fr); gap: 36px; margin: 36px 0; align-items: start; }
@media (max-width: 900px) { .event-body { grid-template-columns: 1fr; } }

.section-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 22px; }
.section-card h2 { font-size: 24px; margin-bottom: 4px; }
.section-sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

.line-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); }
.line-item:first-of-type { border-top: 0; }
.line-item-name { font-weight: 700; font-size: 16px; }
.line-item-desc { color: var(--muted); font-size: 14px; margin-top: 2px; }
.line-item-price { color: var(--blue-700); font-weight: 700; white-space: nowrap; }

.stepper { display: inline-flex; align-items: center; gap: 12px; }
.stepper button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid #cfd6df; background: #fff; color: var(--blue-700); font-size: 18px; font-weight: 700; cursor: pointer; line-height: 1; }
.stepper button.plus { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.stepper-qty { min-width: 22px; text-align: center; font-weight: 700; }

/* Sponsor tiers */
.tier { border: 1px solid var(--beige-border); background: var(--beige); border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.tier.selected { border: 2px solid var(--blue-700); background: #fff; }
.tier-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tier-name { font-family: var(--serif); font-weight: 700; font-size: 19px; }
.tier-price { color: var(--blue-700); font-weight: 700; }
.tier-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--blue-900); background: var(--gold-200); padding: 2px 8px; border-radius: 999px; }
.tier-perks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.tier-perks li { font-size: 14px; color: var(--ink); padding-left: 20px; position: relative; }
.tier-perks li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }

/* Sticky order summary */
.order-summary { position: sticky; top: 86px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: 0 12px 30px -22px rgba(12,35,64,.6); }
.order-summary h3 { font-size: 19px; margin-bottom: 6px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 7px 0; }
.summary-row.muted { color: var(--muted); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--border); margin-top: 10px; padding-top: 12px; }
.summary-total .amt { font-family: var(--serif); font-weight: 700; font-size: 26px; color: var(--blue-900); }
.summary-empty { color: var(--muted-2); font-size: 14px; padding: 8px 0; }
.secure-note { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-top: 12px; }

/* ===== Event builder ===== */
.stepper-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0; }
.step-pill { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--muted); }
.step-pill.active { background: var(--blue-900); color: #fff; border-color: var(--blue-900); }
.step-pill.done { background: var(--success-bg); color: var(--success); border-color: #c2e0cd; }
.step-pill-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,0.08); font-size: 12px; font-weight: 800; }
.step-pill.active .step-pill-num { background: var(--gold); color: var(--blue-900); }
.builder-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.builder-row .grow { flex: 1; min-width: 0; }
.builder-row input, .section-card textarea { font-family: var(--sans); font-size: 14px; padding: 9px 11px; border: 1px solid #d5dbe3; border-radius: 8px; }
.section-card textarea { width: 100%; resize: vertical; }
.btn-x { width: 32px; height: 32px; flex: 0 0 auto; border: 1px solid #f0d3d0; background: #fdf3f2; color: var(--danger); border-radius: 8px; cursor: pointer; font-weight: 700; }

/* ===== Organizer dashboard ===== */
.dash-header { background: linear-gradient(120deg, var(--blue-900), var(--blue-700)); padding: 30px 0; margin-bottom: 26px; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
@media (max-width: 760px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.kpi-label { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.kpi-value { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--blue-900); margin-top: 6px; }
.kpi-value .kpi-of { font-size: 16px; color: var(--muted-2); }
.kpi-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.goalbar { height: 14px; background: #e7ecf3; border-radius: 999px; overflow: hidden; margin: 12px 0 8px; }
.goalbar-fill { height: 100%; background: linear-gradient(90deg, var(--blue-900), var(--blue-700)); border-radius: 999px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .dash-grid { grid-template-columns: 1fr; } }
.recent-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.recent-row:first-of-type { border-top: 0; }
.tier-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--gold-200); color: var(--blue-900); white-space: nowrap; }

/* ===== Checkout / forms ===== */
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #4a5663; }
.fld input { font-family: var(--sans); font-size: 15px; padding: 11px 13px; border: 1px solid #d5dbe3; border-radius: 9px; }
.fld input:focus { outline: none; border-color: var(--blue-700); }
.muted { color: var(--muted); font-weight: 400; }
.paymethods { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.paymethod { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #d5dbe3; border-radius: 10px; padding: 14px; cursor: pointer; font-size: 14px; }
.paymethod.active { border: 2px solid var(--blue-700); background: #eef3fb; padding: 13px; }
.notice { background: #fff7e6; border: 1px solid #f0d9a8; color: #8a6d1f; border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 14px 0; }
.notice.err { background: #fdf3f2; border-color: #f0d3d0; color: var(--danger); }
.confirm-badge { width: 64px; height: 64px; border-radius: 50%; background: var(--success-bg); color: var(--success); border: 2px solid #c2e0cd; display: inline-flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; }
.confirm-badge.err { background: #fdf3f2; color: var(--danger); border-color: #f0d3d0; }

/* ===== Demo-mode banner ===== */
.demo-banner { background: var(--gold); color: var(--blue-900); text-align: center; font-weight: 700; font-size: 14px; padding: 9px 16px; line-height: 1.35; }

/* ===== Will-call / check-in ===== */
.checkin-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 18px 0 8px; }
.checkin-search { flex: 1 1 320px; padding: 10px 14px; border: 1px solid #d6dbe2; border-radius: 10px; font-size: 15px; }
.checkin-stats { font-size: 15px; color: #1b2733; white-space: nowrap; }
.checkin-table { width: 100%; border-collapse: collapse; }
.checkin-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid #e3e7ec; }
.checkin-table td { padding: 12px 10px; border-bottom: 1px solid #eef1f4; vertical-align: middle; }
.checkin-table tr.is-in td { background: #f4faf6; }
.checkin-table .col-check { width: 34px; }
.checkin-table .col-seats { width: 56px; text-align: center; font-weight: 700; color: var(--blue-700); }
.checkin-table .col-action { width: 124px; text-align: right; }
.checkin-table .col-action .btn { white-space: nowrap; min-width: 112px; }
.checkin-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: #1b2733; white-space: nowrap; cursor: pointer; user-select: none; }
.checkin-toggle input { width: 16px; height: 16px; }
.cbox { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 2px solid #c2c9d2; border-radius: 5px; color: var(--success); font-weight: 700; font-size: 15px; }
.cbox.on { border-color: #c2e0cd; background: var(--success-bg); }
.g-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.g-sub { font-size: 13px; margin-top: 2px; }
.g-contact { font-size: 12px; margin-top: 1px; }
.print-head h1 { font-size: 22px; }
.print-head p { color: var(--muted); margin-top: 2px; }

@media print {
    .no-print, .site-header, .site-footer, footer { display: none !important; }
    .print-head { display: block !important; margin-bottom: 12px; }
    .page { max-width: none !important; padding: 0 !important; }
    .checkin-table tr.is-in td { background: transparent; }
    .checkin-table td, .checkin-table th { border-color: #bbb; }
    a[href]:after { content: ""; }
}

/* ===== Blazor framework bits ===== */
h1:focus { outline: none; }
.validation-message { color: var(--danger); }
#blazor-error-ui {
  background: #fff3cd; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none;
  left: 0; padding: 0.6rem 1.25rem 0.7rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "An error has occurred."; }
