/* ============================================================
   American Legion Post 207 — BBQ Order System
   Large-text, high-contrast, senior-friendly design
   ============================================================ */

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

:root {
  --red:      #B22234;
  --blue:     #3C3B6E;
  --gold:     #F5A623;
  --white:    #FFFFFF;
  --off-white:#F8F7F4;
  --gray-light:#E8E6E1;
  --gray:     #6B6560;
  --green:    #2D7A3A;
  --text:     #1A1A1A;
  --radius:   12px;
  --shadow:   0 4px 16px rgba(0,0,0,0.12);
}

html { font-size: 18px; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--off-white);
  color: var(--text);
  line-height: 1.6;
}

/* ---- Page Layout ---- */
.page-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 0 60px;
}

/* ---- Header ---- */
.site-header {
  background: var(--blue);
  color: var(--white);
  text-align: center;
  padding: 32px 24px 24px;
  border-bottom: 6px solid var(--red);
}

.header-logo {
  font-size: 3rem;
  margin-bottom: 8px;
}

.site-header h1 {
  font-size: 1.6rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.site-header h2 {
  font-size: 1.3rem;
  color: var(--gold);
  margin-top: 4px;
}

.event-info {
  margin-top: 10px;
  font-size: 1rem;
  color: #C8D8F0;
}

/* ---- Order Card ---- */
.order-card {
  margin: 24px 16px 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-section {
  padding: 28px 28px 24px;
  border-bottom: 2px solid var(--gray-light);
}

.form-section:last-of-type { border-bottom: none; }

.section-title {
  font-size: 1.25rem;
  color: var(--blue);
  font-weight: bold;
  margin-bottom: 16px;
}

.section-note {
  font-size: 1rem;
  color: var(--gray);
  margin-bottom: 16px;
}

/* ---- Form Fields ---- */
.field-group {
  margin-bottom: 20px;
}

.field-group label {
  display: block;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 6px;
  color: var(--text);
}

.field-group input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1.15rem;
  font-family: inherit;
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  background: var(--off-white);
  color: var(--text);
  transition: border-color 0.2s;
}

.field-group input:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
}

.field-group input.input-error { border-color: var(--red); }

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--gray);
}

/* ---- Choice Grid (meat & sides) ---- */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 10px 14px;
  background: var(--off-white);
  border: 3px solid var(--gray-light);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.choice-btn:hover {
  border-color: var(--blue);
  background: #EEF1F8;
}

.choice-btn.selected {
  border-color: var(--blue);
  background: #DDE3F5;
}

.choice-btn.selected-side {
  border-color: var(--green);
  background: #DDF0E3;
}

.choice-btn:active { transform: scale(0.97); }

.choice-icon { font-size: 2.2rem; line-height: 1; margin-bottom: 8px; }
.choice-label { font-size: 1rem; font-weight: bold; text-align: center; color: var(--text); }
.choice-price { margin-top: 6px; font-size: 1.1rem; font-weight: bold; color: var(--blue); }

/* ---- Quantity ---- */
.qty-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 12px 0;
}

.qty-btn {
  width: 60px;
  height: 60px;
  font-size: 2rem;
  border: 3px solid var(--blue);
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: background 0.15s;
}

.qty-btn:hover { background: var(--blue); color: var(--white); }

.qty-display {
  font-size: 3rem;
  font-weight: bold;
  color: var(--blue);
  min-width: 60px;
  text-align: center;
}

.qty-note {
  text-align: center;
  font-size: 0.95rem;
  color: var(--gray);
  margin-top: 8px;
}

/* ---- Summary ---- */
.summary-section { background: #F0F3FA; }

.summary-table { margin-bottom: 16px; }

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-light);
  font-size: 1.05rem;
}

.summary-row:last-child { border-bottom: none; }

.total-row {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--blue);
  padding-top: 14px;
}

.payment-note {
  font-size: 0.95rem;
  color: var(--gray);
  text-align: center;
}

/* ---- Submit ---- */
.submit-btn {
  display: block;
  width: calc(100% - 56px);
  margin: 0 28px 28px;
  padding: 20px;
  background: var(--red);
  color: var(--white);
  font-size: 1.4rem;
  font-weight: bold;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.submit-btn:hover { background: #8B1A27; }
.submit-btn:active { transform: scale(0.99); }
.submit-btn:disabled { background: var(--gray); cursor: not-allowed; }

/* ---- Errors ---- */
.field-error, .form-error {
  color: var(--red);
  font-size: 0.95rem;
  margin-top: 6px;
  font-weight: bold;
}

.form-error {
  text-align: center;
  padding: 0 28px 16px;
  display: block;
}

/* ---- Lookup Status ---- */
.lookup-status {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-top: -8px;
  margin-bottom: 8px;
}

.lookup-status.found {
  background: #DDF0E3;
  color: var(--green);
  border: 1px solid var(--green);
}

.lookup-status.new {
  background: #FFF8E1;
  color: #856000;
  border: 1px solid var(--gold);
}

/* ---- Success / Status Page ---- */
.status-card {
  margin: 24px 16px 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: center;
}

.status-badge {
  padding: 32px 24px 24px;
}

.status-badge.ordered  { background: #EEF1F8; }
.status-badge.paid     { background: #DDF0E3; }
.status-badge.picked_up { background: #DDF0E3; }

.status-icon { font-size: 4rem; margin-bottom: 12px; }

.status-label {
  font-size: 1.6rem;
  font-weight: bold;
}

.status-badge.ordered .status-label   { color: var(--blue); }
.status-badge.paid .status-label      { color: var(--green); }
.status-badge.picked_up .status-label { color: var(--green); }

.status-sublabel {
  font-size: 1rem;
  color: var(--gray);
  margin-top: 6px;
}

.order-details {
  padding: 24px 28px;
  text-align: left;
  border-top: 2px solid var(--gray-light);
}

.order-details h3 {
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 14px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-light);
  font-size: 1rem;
}

.detail-row:last-child { border-bottom: none; }

.order-number-badge {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-size: 1.2rem;
  font-weight: bold;
  padding: 6px 18px;
  border-radius: 24px;
  margin-bottom: 8px;
}

/* ---- Dashboard ---- */
.dash-header {
  background: var(--blue);
  color: var(--white);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-header h1 { font-size: 1.3rem; }
.dash-header .staff-tag { font-size: 0.9rem; color: #C8D8F0; }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--gray-light);
  border-bottom: 4px solid var(--red);
}

.stat-box {
  background: var(--white);
  padding: 16px;
  text-align: center;
}

.stat-num {
  font-size: 2rem;
  font-weight: bold;
  color: var(--blue);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.dash-controls {
  display: flex;
  gap: 10px;
  padding: 16px 16px 0;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  border: 2px solid var(--gray-light);
  border-radius: 24px;
  background: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  font-weight: bold;
}

.search-box {
  flex: 1;
  min-width: 180px;
  padding: 8px 14px;
  border: 2px solid var(--gray-light);
  border-radius: 24px;
  font-family: inherit;
  font-size: 0.95rem;
}

.search-box:focus {
  outline: none;
  border-color: var(--blue);
}

.orders-table-wrap {
  padding: 16px;
  overflow-x: auto;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.orders-table th {
  background: var(--blue);
  color: var(--white);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.orders-table td {
  padding: 12px;
  border-bottom: 1px solid var(--gray-light);
  vertical-align: middle;
}

.orders-table tr:hover td { background: #F5F6FB; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-ordered  { background: #E8EAF6; color: var(--blue); }
.badge-paid     { background: #DDF0E3; color: var(--green); }
.badge-picked_up { background: #C8E6C9; color: #1B5E20; }

.action-btn {
  padding: 7px 14px;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-pay     { background: var(--gold); color: #3D2A00; }
.btn-pay:hover { background: #D4921E; }

.btn-pickup  { background: var(--green); color: var(--white); }
.btn-pickup:hover { background: #1E5C2A; }

.btn-done    { background: var(--gray-light); color: var(--gray); cursor: default; }

.paid-image {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 24px;
  color: var(--gray);
  font-size: 0.9rem;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  html { font-size: 16px; }
  .choice-grid { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .submit-btn { font-size: 1.2rem; }
}
