/* One stylesheet for the directory, organizer sites, admin and the door.
   Each organizer's brand color arrives as --brand / --brand-ink on <body>. */

:root {
  --paper: #f7f4ee;
  --card: #ffffff;
  --ink: #1d1f1e;
  --ink-2: #4a4f4c;
  --ink-3: #7b817d;
  --line: #e3ded4;
  --line-2: #d2ccc0;
  --brand: #2f5d50;
  --brand-ink: #ffffff;
  --brand-soft: color-mix(in srgb, var(--brand) 10%, white);
  --brand-text: color-mix(in srgb, var(--brand) 72%, black);
  --ok: #1f7a4d;
  --ok-soft: #e4f3ea;
  --warn: #9a6200;
  --warn-soft: #fbf0d9;
  --bad: #b3261e;
  --bad-soft: #fbe5e3;
  --info: #2a5ea8;
  --info-soft: #e5edf9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(30, 25, 15, .06), 0 2px 8px rgba(30, 25, 15, .05);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.5 var(--sans);
}
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font: 700 2rem/1.15 var(--display); letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--ink-3); }
.mono { font-family: var(--mono); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

/* ---------- layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 680px; margin: 0 auto; padding: 0 16px; }
main { padding: 28px 0 64px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cols { display: grid; gap: 24px; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.spacer { flex: 1; }

/* ---------- header ---------- */
.topbar { background: var(--brand); color: var(--brand-ink); }
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.topbar a { color: inherit; text-decoration: none; }
.topbar .brand { font: 700 1.2rem/1 var(--display); }
.topbar .brand small { display: block; color: inherit; opacity: .75; font: 400 .75rem/1.4 var(--sans); margin-top: 2px; }
.topbar nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.topbar nav a, .topbar nav button {
  padding: 8px 12px; border-radius: 8px; font-size: .92rem; opacity: .9;
  background: none; border: 0; color: inherit; font-family: inherit; cursor: pointer;
}
.topbar nav a:hover, .topbar nav button:hover, .topbar nav a.on { background: rgba(255, 255, 255, .14); opacity: 1; }
.topbar.light nav a:hover, .topbar.light nav a.on { background: rgba(0, 0, 0, .08); }
.poc-ribbon { background: #1d1f1e; color: #f7f4ee; font-size: .78rem; text-align: center; padding: 4px 16px; }
.poc-ribbon a { color: #f4d48a; }

footer.site { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--ink-3); font-size: .88rem; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 16px 20px; }

.event-card { display: flex; gap: 16px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.event-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.datebox {
  flex: 0 0 64px; height: 68px; border-radius: 8px; background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, white);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.datebox .m { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-text); font-weight: 700; }
.datebox .d { font: 700 1.6rem/1.1 var(--display); }
.datebox .w { font-size: .7rem; color: var(--ink-3); }
.event-card h3 { margin: 0 0 4px; font-size: 1.08rem; }
.event-card .meta { color: var(--ink-2); font-size: .9rem; }

/* ---------- badges & pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 999px; background: #eeeae2; color: var(--ink-2); white-space: nowrap;
}
.badge.paid, .badge.ok, .badge.published { background: var(--ok-soft); color: var(--ok); }
.badge.pending, .badge.review, .badge.info { background: var(--info-soft); color: var(--info); }
.badge.approved, .badge.warn, .badge.draft, .badge.waitlisted, .badge.overdue { background: var(--warn-soft); color: var(--warn); }
.badge.declined, .badge.cancelled, .badge.bad, .badge.incomplete { background: var(--bad-soft); color: var(--bad); }
.badge.brand { background: var(--brand-soft); color: var(--brand-text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .8rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--card); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card);
  color: var(--ink); font: 600 .95rem/1.2 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.small { padding: 6px 10px; font-size: .85rem; }
.btn.big { padding: 14px 20px; font-size: 1.05rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.hint { font-weight: 400; color: var(--ink-3); font-size: .84rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], input[type=tel], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff;
  font: inherit; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, white); outline-offset: 0; border-color: var(--brand); }
input[type=color] { width: 56px; height: 40px; padding: 2px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; }
.fields-2 { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.error-text { color: var(--bad); font-size: .85rem; margin-top: 4px; }
.hp { position: absolute; left: -9999px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 4px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; }

/* ---------- alerts ---------- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid transparent; }
.alert.ok { background: var(--ok-soft); color: #14532d; border-color: #bfe3cc; }
.alert.bad { background: var(--bad-soft); color: #7f1d1d; border-color: #f2c3be; }
.alert.warn { background: var(--warn-soft); color: #6b4300; border-color: #efd9a8; }
.alert.info { background: var(--info-soft); color: #1e3a6b; border-color: #c6d6ef; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.list th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fbfaf7; }
table.list td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click:hover td { background: #fbfaf7; }
table.list .num { text-align: right; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .93rem; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }

/* ---------- stats ---------- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font: 700 1.6rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.stat .l { font-size: .82rem; color: var(--ink-3); }
.meter { height: 6px; background: #eeeae2; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.meter > span { display: block; height: 100%; background: var(--brand); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .93rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--brand); }

/* ---------- event page ---------- */
.hero { background: var(--card); border-bottom: 1px solid var(--line); padding: 32px 0 28px; }
.hero h1 { font-size: 2.3rem; margin-bottom: 8px; }
.hero .when { font-size: 1.05rem; color: var(--ink-2); }
.hero .actions { margin-top: 18px; }
.notice-banner { padding: 12px 16px; font-weight: 600; text-align: center; }
.notice-banner.cancelled { background: var(--bad); color: #fff; }
.notice-banner.rescheduled { background: #f4d48a; color: #3a2a00; }
.space-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.space-row:last-child { border-bottom: 0; }
.vendor-tile { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; padding: 10px; border-radius: 8px; }
a.vendor-tile:hover { background: #fbfaf7; }
.avatar { flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.avatar.lg { flex-basis: 72px; height: 72px; font-size: 1.5rem; }

/* ---------- tickets ---------- */
.ticket { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: center; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 14px; background: #fff; }
.ticket img { width: 140px; height: 140px; }
.ticket .code { font: 700 1.3rem/1 var(--mono); letter-spacing: .06em; }
@media (max-width: 480px) { .ticket { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* ---------- door check-in ---------- */
.door { max-width: 560px; margin: 0 auto; padding: 0 12px 48px; }
.door .stats { grid-template-columns: repeat(3, 1fr); }
.door .stat .n { font-size: 1.4rem; }
.door input.code { font: 600 1.4rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; text-align: center; padding: 14px; }
.result { border-radius: var(--radius); padding: 18px; text-align: center; margin-bottom: 14px; }
.result h2 { margin: 0 0 4px; font-size: 1.5rem; }
.result.ok { background: var(--ok); color: #fff; }
.result.warn { background: #f4d48a; color: #3a2a00; }
.result.bad { background: var(--bad); color: #fff; }
.door-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.door-buttons .btn { padding: 16px 10px; font-size: 1rem; flex-direction: column; gap: 2px; }
.door-buttons .btn small { color: inherit; opacity: .8; font-weight: 400; }
.vendor-check { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.vendor-check.in { background: var(--ok-soft); }
.vendor-check .btn { min-width: 96px; }

/* ---------- test checkout ---------- */
.checkout-box { max-width: 440px; margin: 40px auto; }
.checkout-box .amount { font: 700 2.4rem/1 var(--display); margin: 8px 0 4px; }
.test-tag { display: inline-block; background: #f4d48a; color: #3a2a00; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; letter-spacing: .06em; }

/* ---------- directory ---------- */
.dir-hero { padding: 40px 0 8px; }
.dir-hero h1 { font-size: 2.5rem; max-width: 18ch; }
.filters { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; margin: 20px 0 24px; }
.filters .field { margin: 0; }
.org-line { font-size: .84rem; color: var(--ink-3); }
.type-tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--brand-text); font-weight: 700; }

@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  .hero h1, .dir-hero h1 { font-size: 1.9rem; }
  main { padding-top: 20px; }
  .card { padding: 16px; }
}

@media print {
  .topbar, .poc-ribbon, footer.site, .no-print { display: none !important; }
  body { background: #fff; }
}
