/* McAllen Chamber — Ribbon Cutting Scheduler */
:root {
  --blue: #26429B; --blue-deep: #1B2F70; --gold: #F2B84B; --gold-ink: #8A5A00;
  --ink: #1B2430; --ink-2: #3D4757; --muted: #556070; --line: #D9DEE6; --line-2: #E3E8F0;
  --ground: #F4F6F9; --white: #FFFFFF; --field: #B8C1CF;
  --green: #1E7A46; --green-bg: #EAF5EE; --red: #A8463A; --red-bg: #FBEDEA;
  --hol-bg: #FBF1DC; --hol-line: #E8C77A; --hol-ink: #7A5200;
  --radius: 10px;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--ground); line-height: 1.5; }
a { color: var(--blue); }
a:hover { color: var(--blue-deep); }
h1, h2, h3 { color: var(--blue); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 28px; } h2 { font-size: 20px; } h3 { font-size: 17px; }
input, select, textarea, button { font: inherit; color: inherit; }
img { max-width: 100%; }
code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line-2); margin: 18px 0; }
[hidden] { display: none !important; }
.visually-hidden, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.visually-hidden-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.visually-hidden-file:focus + *, .visually-hidden-file:focus-visible { outline: 3px solid var(--gold); }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.mt { margin-top: 24px; } .mt-sm { margin-top: 12px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea, .inline-form input, .inline-form select, .search input {
  min-height: 44px; border: 1px solid var(--field); border-radius: 8px; padding: 8px 12px; background: var(--white); width: 100%;
}
.field textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
.check, .radio { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; margin: 4px 0 10px; }
.check input, .radio input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--blue); }
.check-row { display: flex; gap: 20px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.grid2 .span2, .span2 { grid-column: span 2; }
.stack > * + * { margin-top: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; margin: 0 0 18px; }
.stack-sm legend { font-weight: 700; color: var(--blue); margin-bottom: 8px; font-size: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 140px; }
.code-input { font-size: 22px !important; letter-spacing: .25em; max-width: 220px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px;
  border: 1.5px solid transparent; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; text-align: center; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--blue-deep); }
.btn-gold:hover { background: #E5A834; color: var(--blue-deep); }
.btn-secondary { background: var(--white); color: var(--blue); border-color: var(--blue); }
.btn-secondary:hover { background: #EEF3FA; }
.btn-success { background: var(--green); color: var(--white); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger-outline { background: var(--white); color: var(--red); border-color: var(--red); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row form { margin: 0; }
.btn-col { display: flex; flex-direction: column; gap: 10px; }
.linklike { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; cursor: pointer; font-size: 14px; min-height: 0; }
.linklike.danger { color: var(--red); }
.icon-btn { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--white); border-radius: 8px; color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center; font-size: 24px; text-decoration: none; cursor: pointer; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---------- alerts / pills ---------- */
.alert { border-radius: 8px; padding: 12px 14px; margin: 0 0 16px; font-size: 14px; border: 1px solid; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert-success { background: var(--green-bg); border-color: #BFDFCB; color: #1E5F3A; }
.alert-error { background: var(--red-bg); border-color: #E6BDB6; color: #7E2E24; }
.alert-warning { background: var(--hol-bg); border-color: var(--hol-line); color: var(--hol-ink); }
.alert-info { background: #EEF3FA; border-color: #C9D6EA; color: var(--blue-deep); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.pill-pending { background: var(--hol-bg); color: var(--hol-ink); }
.pill-proposed { background: #EEF3FA; color: var(--blue-deep); }
.pill-approved { background: var(--green-bg); color: #1E5F3A; }
.pill-denied, .pill-cancelled { background: var(--red-bg); color: #7E2E24; }
.ok-line { color: #1E5F3A; font-weight: 600; }

/* ---------- public ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.site-header { background: var(--blue); color: var(--white); }
.header-inner { padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 16px; color: var(--white); text-decoration: none; flex-wrap: wrap; }
.brand-logo { height: 48px; width: auto; display: block; }
.brand-sub { border-left: 1px solid rgba(255,255,255,.4); padding-left: 16px; font-weight: 600; }
.header-stripe { height: 6px; background: var(--gold); }
.main { padding-top: 40px; padding-bottom: 56px; }
.hero { margin-bottom: 24px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 7vw, 64px); line-height: .95; text-transform: uppercase; margin: 10px 0 12px; }
.hero p { max-width: 640px; font-size: 18px; color: var(--ink-2); margin: 0; }
.steps { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.steps li { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-weight: 600; }
.steps span { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--blue); color: var(--white); display: flex; align-items: center; justify-content: center; }
.booking { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; align-items: start; }
.card, .panel { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.panel.no-pad { padding: 0; overflow-x: auto; }
.card.narrow { max-width: 640px; margin: 0 auto; }
.center-card { text-align: center; }
.big-check { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--green-bg); color: var(--green); font-size: 34px; display: flex; align-items: center; justify-content: center; }
.big-when { font-family: var(--display); font-size: 34px; font-weight: 700; color: var(--blue); margin: 8px 0 16px; }
blockquote { margin: 0 0 16px; padding: 12px 16px; background: var(--ground); border-radius: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav span { min-width: 140px; text-align: center; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dows span { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding-bottom: 6px; }
.cal-cell { min-height: 58px; border-radius: 8px; border: 1px solid var(--ground); background: var(--ground); color: #8A93A2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 2px; }
.cal-cell.blank { background: transparent; border: 0; }
.cal-num { font-weight: 700; font-size: 15px; }
.cal-tag { font-size: 10px; font-weight: 600; line-height: 1.1; text-align: center; min-height: 11px; }
.cal-cell.open { background: var(--white); color: var(--blue); border: 1.5px solid var(--blue); cursor: pointer; }
.cal-cell.open:hover { background: #EEF3FA; }
.cal-cell.selected { background: var(--blue) !important; color: var(--white) !important; }
.cal-cell.holiday { background: var(--hol-bg); border-color: var(--hol-line); color: var(--hol-ink); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-2); margin-top: 14px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.lg { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.lg-open { background: var(--white); border: 1.5px solid var(--blue); } .lg-sel { background: var(--blue); }
.lg-hol { background: var(--hol-bg); border: 1px solid var(--hol-line); } .lg-off { background: var(--ground); border: 1px solid var(--line); }
.lg-approved { background: var(--blue); } .lg-pending { background: var(--hol-bg); border: 1px solid #C99A3A; }
.lg-block { background: repeating-linear-gradient(45deg, var(--line) 0 3px, var(--white) 3px 6px); border: 1px solid #8A93A2; }
.slots-wrap { border-top: 1px solid var(--line-2); margin-top: 18px; padding-top: 18px; }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.slot { min-height: 52px; border-radius: 8px; font-weight: 700; border: 1.5px solid var(--blue); background: var(--white); color: var(--blue); cursor: pointer; }
.slot.selected { background: var(--blue); color: var(--white); }
.slot.off { background: var(--ground); color: #8A93A2; border-color: var(--ground); cursor: default; }
.slot-note { display: block; font-size: 11px; font-weight: 500; }
.selected-banner { background: #EEF3FA; border: 1px solid #C9D6EA; border-radius: 8px; padding: 12px 14px; font-weight: 700; margin-bottom: 16px; }
.dropzone { display: flex; align-items: center; gap: 16px; border: 2px dashed var(--field); border-radius: 10px; padding: 16px; cursor: pointer; background: #FAFBFC; }
.dropzone:hover { border-color: var(--blue); }
.dz-icon { width: 52px; height: 52px; flex-shrink: 0; border-radius: 10px; background: #EEF3FA; color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.cf-turnstile { margin: 6px 0 14px; }
.site-footer { background: var(--white); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 20px; font-size: 13px; color: var(--muted); }

/* ---------- auth ---------- */
body.auth { background: var(--blue); min-height: 100vh; }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 48px 16px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #DCE3EE; margin-bottom: 20px; font-size: 14px; }
.auth-brand img { width: 260px; height: auto; }
.auth-card { background: var(--white); border-radius: 12px; padding: 28px; border-top: 6px solid var(--gold); }
.auth-note { color: #DCE3EE; font-size: 13px; text-align: center; }

/* ---------- admin ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-nav { width: 240px; flex-shrink: 0; background: var(--blue); color: var(--white); display: flex; flex-direction: column; gap: 4px; padding: 22px 14px; }
.admin-brand { padding: 0 10px 18px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #DCE3EE; }
.admin-brand img { width: 180px; height: auto; }
.admin-nav > a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 12px; border-radius: 8px; color: #E6EBF4; text-decoration: none; font-size: 15px; }
.admin-nav > a:hover { background: rgba(255,255,255,.08); color: var(--white); }
.admin-nav > a.active { background: rgba(255,255,255,.16); color: var(--white); font-weight: 600; }
.badge { background: var(--gold); color: var(--blue-deep); border-radius: 10px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.admin-user { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255,255,255,.18); font-size: 13px; color: #DCE3EE; display: flex; flex-direction: column; gap: 4px; }
.admin-user strong { color: var(--white); }
.admin-user a, .admin-user .linklike { color: var(--white); font-size: 13px; text-align: left; }
.admin-user form { margin: 0; }
.admin-main { flex: 1; min-width: 0; padding: 28px 32px; }
.version { color: var(--muted); font-size: 12px; margin-top: 40px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; } .page-head p { margin: 4px 0 0; }
.search { display: flex; gap: 8px; }
.search input { width: 260px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a, .tabs button { min-height: 44px; padding: 0 14px; display: flex; align-items: center; text-decoration: none; color: var(--ink-2); border: 0; background: none; border-bottom: 3px solid transparent; cursor: pointer; font-size: 15px; }
.tabs a.active, .tabs button.active { border-bottom-color: var(--gold); color: var(--blue); font-weight: 700; }
.tabs-pills { border: 0; margin: 0; }
.tabs-pills button { border-radius: 6px; background: var(--ground); border: 0; min-height: 40px; }
.tabs-pills button.active { background: var(--blue); color: var(--white); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--ink-2); background: #F7F9FB; padding: 12px 16px; }
.table td { padding: 12px 16px; border-top: 1px solid var(--line-2); vertical-align: top; }
.table tr.inactive td { opacity: .55; }
.small-table th, .small-table td { padding: 8px 10px; font-size: 13px; }
.row-link { font-weight: 700; text-decoration: none; }
.row-link:hover { text-decoration: underline; }
.empty { padding: 28px; color: var(--muted); margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.actions form { margin: 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.detail-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.detail-head h1 { margin: 6px 0 2px; }
.detail-head p { margin: 0; }
.logo-box { width: 104px; height: 104px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #FAFBFC; overflow: hidden; }
.logo-box img { max-width: 92px; max-height: 92px; }
.logo-box.empty { border-style: dashed; font-size: 11px; color: var(--muted); text-align: center; }
.details { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; margin: 0 0 16px; font-size: 14px; }
.details dt { color: var(--muted); } .details dd { margin: 0; }
.danger-zone { border-color: #E6BDB6; }
.grid-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; align-items: start; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.acal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.acal-dow { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 0 6px 4px; }
.acal-day { min-height: 92px; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acal-day.blank { border: 0; }
.acal-day.weekend { background: var(--ground); }
.acal-day.holiday { background: var(--hol-bg); border-color: var(--hol-line); }
.acal-day.blocked { background: repeating-linear-gradient(45deg, #EEF1F5 0 6px, var(--white) 6px 12px); border-color: #8A93A2; }
.acal-day.today { box-shadow: inset 0 0 0 2px var(--gold); }
.acal-num { font-weight: 700; font-size: 14px; }
.chip { font-size: 11px; font-weight: 600; border-radius: 4px; padding: 2px 5px; line-height: 1.25; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.chip-approved { background: var(--blue); color: var(--white); }
.chip-pending, .chip-proposed { background: var(--hol-bg); color: #6B3F00; border: 1px solid #C99A3A; }
.chip-holiday { background: var(--white); color: var(--hol-ink); border: 1px solid var(--hol-line); }
.chip-holiday.off { opacity: .5; text-decoration: line-through; }
.chip-block { background: var(--white); color: var(--ink-2); border: 1px solid #8A93A2; }
.seg { display: flex; gap: 8px; border: 0; padding: 0; margin: 0 0 14px; }
.seg label { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--field); border-radius: 8px; font-size: 14px; cursor: pointer; }
.seg input { accent-color: var(--blue); }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.plain-list form { margin: 0; }
.toggle { width: 46px; height: 26px; border-radius: 13px; border: 0; background: #C3CAD5; position: relative; cursor: pointer; padding: 0; }
.toggle span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); transition: left .15s; }
.toggle.on { background: var(--blue); }
.toggle.on span { left: 23px; }
.slot-days { display: flex; flex-direction: column; gap: 10px; }
.slot-day { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; }
.slot-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-chip { margin: 0; display: inline-flex; align-items: center; gap: 4px; background: #EEF3FA; border-radius: 6px; padding: 3px 8px; font-size: 13px; }
.slot-chip .linklike { text-decoration: none; font-size: 16px; color: var(--muted); }
.setup-steps { padding-left: 20px; font-size: 14px; }
.setup-steps li { margin-bottom: 10px; }
.secret-key { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; font-weight: 700; letter-spacing: .08em; background: var(--ground); border-radius: 8px; padding: 10px 12px; margin: 8px 0 4px; word-break: break-all; }
.settings-form .panel { margin: 0; }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--ground) 30%); padding: 18px 0 8px; margin-top: 8px; }
.color-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.color-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.color-field input { width: 64px; height: 44px; border: 1px solid var(--field); border-radius: 8px; padding: 3px; background: var(--white); cursor: pointer; }
.narrow-panel { max-width: 640px; }
/* flyer builder */
.flyer-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: start; }
.preset-row { display: flex; gap: 8px; flex-wrap: wrap; }
.preset { min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--blue); color: var(--white); font-size: 13px; font-weight: 600; cursor: pointer; }
.preset-gold { background: var(--gold); color: var(--blue-deep); }
.preset-light { background: var(--white); color: var(--blue); }
.preset-deep { background: var(--blue-deep); color: var(--white); }
.preview-box { background: var(--line-2); border-radius: 10px; padding: 20px; display: flex; justify-content: center; }
.preview-box canvas { display: block; box-shadow: 0 8px 24px rgba(38,66,155,.18); background: var(--white); height: auto; }
.preview-square { width: min(100%, 540px); }
.preview-story { width: min(100%, 320px); }
.preview-banner { width: min(100%, 640px); }
.preview-letter { width: min(100%, 440px); }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

@media (max-width: 960px) {
  .admin-shell { flex-direction: column; }
  .admin-nav { width: 100%; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .admin-brand { width: 100%; padding-bottom: 8px; }
  .admin-user { margin-top: 0; width: 100%; flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .admin-main { padding: 20px 16px; }
  .detail-grid, .cal-layout, .flyer-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .steps { grid-template-columns: 1fr; }
  .booking { grid-template-columns: 1fr; }
  .card, .panel { padding: 18px; }
  .grid2 { grid-template-columns: 1fr; }
  .grid2 .span2, .span2 { grid-column: auto; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-cell { min-height: 48px; }
  .cal-tag { font-size: 9px; }
  .brand-logo { height: 38px; }
  .search input { width: 100%; }
  .acal-day { min-height: 64px; }
  .chip { font-size: 9px; }
  .download-grid { grid-template-columns: 1fr; }
  .details { grid-template-columns: 1fr; }
}
