/* ── Layout ── */
.attendant-layout {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.attendant-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ── Greeting header ── */
.attendant-greeting {
  background: var(--surface);
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.greeting-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.greeting-avatar {
  width: 38px;
  height: 38px;
  background: var(--unit4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

.greeting-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.greeting-role {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.greeting-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}

.greeting-stat {
  text-align: center;
}

.greeting-stat-val {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
}

.greeting-stat-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 2px;
}

.greeting-stat-alert .greeting-stat-val { color: var(--amber); }
.greeting-stat-alert .greeting-stat-label { color: var(--amber); }

/* ── Intake card ── */
.intake-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.intake-title {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

/* Accordion */
.accordion-section { border-top: 1px solid var(--line); }
.accordion-section:first-of-type { border-top: none; }

.accordion-header {
  width: 100%;
  background: none;
  color: var(--ink);
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 0;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 0;
}

.section-num {
  width: 28px; height: 28px;
  background: var(--unit4);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.section-summary {
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
  margin-left: 4px;
}

.accordion-body {
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input { width: auto; min-height: 0; }

/* ── Service grid ── */
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.service-card {
  background: var(--service-tint);
  color: var(--ink);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  min-height: 96px;
  text-align: left;
}

.service-card.selected {
  border-color: var(--blue);
  background: #e8f4fb;
}

.service-name { font-weight: 700; font-size: 15px; }

/* ── Add-ons panel ── */
.addon-panel-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}

.addon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}

.addon-card {
  background: var(--soft);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  min-height: 72px;
}

.addon-card.included {
  background: var(--place-tint);
  border-color: var(--green);
  cursor: default;
}

.addon-card.selected:not(.included) {
  border-color: var(--blue);
  background: var(--car-tint);
}

.addon-name { font-weight: 600; }

.addon-included-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.addon-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--unit4);
}

.service-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--soft);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
}

.service-total button {
  min-height: 0;
  padding: 10px 20px;
  font-size: 14px;
}

/* ── Payment addon breakdown ── */
.pay-addon-line {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Bay destination choices ── */
.bay-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bay-choice-card {
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  border: 2px solid transparent;
  position: relative;
  cursor: pointer;
}

.bay-choice-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.bay-choice-card.bay-available { background: var(--place-tint); color: var(--ink); }
.bay-choice-card.bay-queue { background: var(--queue-tint); color: var(--ink); }
.bay-choice-card.selected { border-color: var(--green); }

.bay-choice-name { font-weight: 700; }
.bay-choice-action { color: var(--muted); font-size: 13px; }

.bay-choice-park {
  margin-left: auto;
  min-height: 0;
  padding: 6px 12px;
  font-size: 13px;
  background: var(--surface);
  color: var(--amber);
  border: 1px solid var(--amber);
}

.intake-summary {
  background: var(--soft);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Bay strip — card grid ── */
.bay-strip {
  background: var(--surface);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.strip-title {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* One card per bay — fills available width */
.bay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

/* Individual bay card */
.bay-card {
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 130px;
}

.bay-card.bay-available  { background: var(--place-tint); }
.bay-card.bay-parked     { background: var(--queue-tint); }
.bay-card.bay-inprogress { background: var(--service-tint); }
.bay-card.bay-closed     { background: var(--line); opacity: 0.6; }

/* Header: dot + name */
.bay-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.bay-card-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Body: plate / service / timer or "Available" */
.bay-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.bay-card-plate {
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: 0.03em;
  line-height: 1;
}

.bay-card-svc {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bay-card-timer {
  font-size: 13px;
  font-weight: 700;
  color: var(--unit4);
  margin-top: 2px;
}

.bay-card-avail {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: auto;
}

/* Action buttons — stack at bottom of card */
.bay-card-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: auto;
}

/* Two side-by-side secondary buttons */
.bca-row {
  display: flex;
  gap: 5px;
}

.bca-row .bca-btn { flex: 1; }

/* Status dot */
.bay-status-dot-sm {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bsdot-avail { background: #4ade80; }
.bsdot-park  { background: var(--amber); }
.bsdot-busy  { background: var(--unit4); box-shadow: 0 0 6px rgba(244,114,30,0.5); }
.bsdot-off   { background: var(--muted); opacity: 0.4; }

/* Bay action buttons */
.bca-btn {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}

.bca-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.bca-start { background: var(--green); color: #fff; }
.bca-done  { background: var(--green); color: #fff; }
.bca-clear { background: var(--blue);  color: #fff; }
.bca-sec   { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.bca-queue { background: transparent; color: var(--muted); border: 1px solid var(--line); font-size: 11px; }

/* ── Queue panel ── */
.queue-panel {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

/* ── Pending payment panel ── */
.pending-payment-panel {
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.pending-pay-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.pending-pay-icon {
  font-size: 26px;
  flex-shrink: 0;
  color: var(--amber);
}

.pending-pay-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.pending-pay-sub {
  font-size: 13px;
  color: var(--amber);
  font-weight: 700;
  margin: 2px 0 0;
}

.pending-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(245,158,11,0.08);
  border-radius: 8px;
  padding: 12px 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pending-pay-row:last-child { margin-bottom: 0; }

.pending-pay-amount {
  font-weight: 900;
  font-size: 15px;
  color: var(--amber);
  margin-left: auto;
  white-space: nowrap;
}

.pay-now-btn {
  min-height: 0;
  padding: 8px 16px;
  font-size: 13px;
  background: var(--amber);
  color: #fff;
  border: none;
  border-radius: 8px;
  white-space: nowrap;
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.queue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--queue-tint);
  border-radius: 8px;
  padding: 12px 14px;
  flex-wrap: wrap;
}

.queue-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.queue-plate   { font-size: 15px; }
.queue-service { color: var(--muted); font-size: 13px; }
.queue-wait    { color: var(--amber); font-size: 12px; font-weight: 600; margin-left: auto; white-space: nowrap; }

.queue-bays {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bay-assign-btn {
  min-height: 0;
  padding: 6px 14px;
  font-size: 13px;
  background: var(--green);
  color: #fff;
  border: none;
}

.bay-assign-btn:disabled { opacity: 0.5; }

.queue-no-bays { color: var(--muted); font-size: 13px; }

.queue-cancel-btn {
  min-height: 0;
  padding: 4px 10px;
  background: none;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  flex-shrink: 0;
}
.queue-cancel-btn:hover { color: var(--red); border-color: var(--red); }

/* ── Action sheet ── */
.action-sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
}

.action-sheet {
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-sheet-title { margin: 0 0 4px; font-size: 16px; }

/* ── Buttons ── */
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-finish {
  background: var(--green);
  color: #fff;
}

.btn-pickup {
  background: var(--unit4);
  color: #fff;
}

.action-cancel {
  background: none;
  color: var(--muted);
  border: none;
  font-size: 14px;
  min-height: 0;
  padding: 8px 0;
}

/* ── Feedback ── */
.success-msg { color: var(--green); font-weight: 600; }
.form-error  { color: var(--red); }

/* ── Payment sheet ── */
.payment-sheet {
  max-height: 90vh;
  overflow-y: auto;
}

.pay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.pay-order-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pay-plate        { font-weight: 700; font-size: 18px; }
.pay-service-name { color: var(--muted); font-size: 13px; }
.pay-due          { font-size: 22px; font-weight: 700; color: var(--unit4); }

.pay-po-badge {
  align-self: flex-start;
  background: var(--car-tint);
  border: 1px solid rgba(244, 114, 30, 0.35);
  border-radius: 999px;
  color: var(--unit4);
  font-size: 11px;
  font-weight: 800;
  margin-top: 4px;
  padding: 4px 8px;
  text-transform: uppercase;
}

.pay-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.pay-po-note {
  background: var(--soft);
  border-left: 4px solid var(--unit4);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0 0 14px;
  padding: 10px 12px;
}

.pay-btn {
  background: var(--soft);
  color: var(--ink);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 700;
  min-height: 0;
  text-align: center;
}

.pay-btn.selected {
  border-color: var(--unit4);
  background: var(--car-tint);
  color: var(--unit4);
}

.pay-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.pay-change,
.pay-net {
  background: var(--soft);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin: 0;
}

.pay-freebie-note {
  background: var(--soft);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--green);
  font-weight: 600;
  margin: 0;
}

.pay-optional { font-weight: 400; color: var(--muted); font-size: 12px; }

.pay-tip-row { margin-bottom: 12px; }

.pay-tip-cash {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  margin: 8px 0;
}
.pay-tip-cash input[type="checkbox"] { width: auto; }

/* ── Cash Drawer ── */
.drawer-section {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.drawer-log-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.drawer-log-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.drawer-log-type {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.drawer-open       { background: var(--place-tint);   color: var(--green); }
.drawer-close      { background: var(--queue-tint);   color: var(--amber); }
.drawer-liquidated { background: var(--service-tint); color: var(--blue); }
.drawer-tip        { background: #f3e8ff;             color: #7c3aed; }

.drawer-log-amount { font-weight: 700; }
.drawer-log-time   { color: var(--muted); font-size: 12px; margin-left: auto; }

.drawer-empty {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
}

.drawer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.drawer-btn {
  flex: 1;
  min-width: 140px;
  font-size: 14px;
}

.drawer-form-label {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 10px;
}

.drawer-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-form-actions {
  display: flex;
  gap: 8px;
}

/* ── Service price in card ── */
.service-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--unit4);
}

/* ── Vehicle autocomplete ── */
.autocomplete-wrap {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  max-height: 280px;
  overflow-y: auto;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}

.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--soft); }

.autocomplete-item-name { flex: 1; }

.autocomplete-add {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--unit4);
  cursor: pointer;
  font-style: italic;
}

.autocomplete-add:hover { background: var(--soft); }

/* ── Selected vehicle display ── */
.selected-vehicle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--soft);
  border-radius: 8px;
  padding: 10px 14px;
}

.selected-vehicle-name { font-size: 15px; font-weight: 600; flex: 1; }

.btn-link {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 13px;
  min-height: 0;
  padding: 0;
  font-weight: 600;
  cursor: pointer;
}

/* ── Size badges ── */
.size-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.size-s   { background: #dbeafe; color: #1d4ed8; }
.size-m   { background: #dcfce7; color: #15803d; }
.size-l   { background: #fef9c3; color: #a16207; }
.size-xl  { background: #ffe4e6; color: #be123c; }
.size-2xl { background: #f3e8ff; color: #7c3aed; }

/* ── Add model form ── */
.add-model-form {
  background: var(--soft);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
}

.add-model-title {
  font-weight: 700;
  font-size: 14px;
  margin: 0;
}

.add-model-actions {
  display: flex;
  gap: 8px;
}

/* ── Returning vehicle hint ── */
.plate-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--service-tint);
  border: 1px solid #c3e6f5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  flex-wrap: wrap;
}

.plate-hint-icon  { font-size: 16px; flex-shrink: 0; }
.plate-hint-body  { flex: 1; line-height: 1.4; }
.plate-hint-visits { font-size: 12px; font-weight: 700; color: var(--unit4); white-space: nowrap; }

/* ── Media queries ── */

/* Greeting header only shown on small screens (tablet/phone — desktop has nav) */
@media (min-width: 800px) {
  .attendant-greeting { display: none; }
}

/* Tablet: two-column main content (intake left, queue/drawer right) */
@media (min-width: 860px) {
  .attendant-main {
    display: grid;
    grid-template-columns: 1fr 320px;
    align-items: start;
    gap: 20px;
  }

  .intake-card           { grid-column: 1; grid-row: 1; }
  .queue-panel           { grid-column: 2; }
  .pending-payment-panel { grid-column: 2; }
  .drawer-section        { grid-column: 2; }
}

@media (max-width: 640px) {
  /* Bay cards: 2-col on phones */
  .bay-grid        { grid-template-columns: repeat(2, 1fr); }
  .service-grid    { grid-template-columns: 1fr; }
  .addon-grid      { grid-template-columns: 1fr; }
  .greeting-stats  { gap: 14px; }

  /* Larger touch targets for bay action buttons */
  .bca-btn { min-height: 44px; font-size: 13px; }

  /* Payment method buttons: slightly taller for fat-finger taps */
  .pay-btn { min-height: 52px; font-size: 13px; }

  /* Action sheet takes full width on phones */
  .action-sheet { border-radius: 16px 16px 0 0; }

  /* Reduce horizontal padding on intake card */
  .intake-card { padding: 16px; }

  /* Drawer buttons stack on narrow screens */
  .drawer-actions { flex-direction: column; }
  .drawer-btn { min-width: 0; }
}

/* Very small phones (320px): payment methods 2-col */
@media (max-width: 380px) {
  .pay-methods { grid-template-columns: repeat(2, 1fr); }
  .greeting-stat-val { font-size: 18px; }
}
