/* ===== Booking Page — 3-Column Full-Viewport Layout ===== */
/* Allow booking to use full viewport width */
.main:has(.booking-3col) {
  max-width: none;
  padding: var(--space-3) var(--space-4);
}

.booking-3col {
  display: grid;
  grid-template-columns: 1fr 1.15fr 0.5fr;
  gap: var(--space-4);
  height: calc(100vh - var(--header-height) - 36px - var(--space-6));
  min-height: 0;
}

.booking-3col__items,
.booking-3col__form,
.booking-3col__summary {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.booking-3col__scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: var(--space-1);
  /* Thin custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
.booking-3col__scroll::-webkit-scrollbar { width: 5px; }
.booking-3col__scroll::-webkit-scrollbar-track { background: transparent; }
.booking-3col__scroll::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: var(--radius-pill); }

/* Summary column — flex layout with CTA pinned to bottom */
.booking-3col__summary-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
.booking-3col__summary-body::-webkit-scrollbar { width: 5px; }
.booking-3col__summary-body::-webkit-scrollbar-track { background: transparent; }
.booking-3col__summary-body::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: var(--radius-pill); }

.booking-3col__cta {
  margin-top: auto;
  flex-shrink: 0;
  padding-top: var(--space-3);
}

/* Section labels — refined with icon accent */
.section-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 2px solid var(--color-border-light);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ---- Tap-to-Add Item Cards ---- */
.item-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}

.tap-card {
  position: relative;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-2);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  -webkit-user-select: none;
}
.tap-card:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.tap-card:active {
  transform: scale(0.97);
}
.tap-card.is-selected {
  border-color: var(--color-primary);
  background: linear-gradient(180deg, #FFF8F0 0%, #FFF3E6 100%);
  box-shadow: 0 0 0 2px rgba(255, 111, 0, 0.12), var(--shadow-sm);
}

.tap-card__emoji {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 4px;
  display: block;
}

.tap-card__name {
  font-size: 0.7rem;
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text);
}

.tap-card__price {
  font-size: 0.7rem;
  font-weight: var(--fw-bold);
  color: var(--color-primary);
}

.tap-card__unit {
  font-size: 0.55rem;
  color: var(--color-text-muted);
  font-weight: var(--fw-normal);
}

/* Count badge */
.tap-card__count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--gradient-primary);
  color: white;
  font-size: 0.65rem;
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 8px rgba(255, 111, 0, 0.4);
  animation: badgePop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid var(--color-surface);
}

@keyframes badgePop {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Minus button */
.tap-card__minus {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-circle);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  color: var(--color-error);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
.tap-card__minus:hover {
  background: var(--color-error);
  color: white;
  border-color: var(--color-error);
  box-shadow: 0 2px 8px rgba(198, 40, 40, 0.3);
}

/* Tap hint */
.tap-hint {
  text-align: center;
  font-size: 0.6rem;
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  font-style: italic;
}

/* ---- Devotee Search Suggestions ---- */
.devotee-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: var(--z-dropdown);
  background: var(--color-surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--color-border-light);
  border-top: none;
}

.devotee-suggestion {
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--transition-fast);
}
.devotee-suggestion:last-child { border-bottom: none; }
.devotee-suggestion:hover { background: var(--color-surface-alt); }

.devotee-suggestion__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}

.devotee-suggestion__detail {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.devotee-suggestion--empty {
  cursor: default;
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  text-align: center;
  padding: var(--space-4);
}
.devotee-suggestion--empty:hover { background: transparent; }

/* ---- Compact Form ---- */
.compact-form {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  padding: var(--space-3);
}

.compact-form .form-group {
  margin-bottom: var(--space-2);
}

.compact-form .form-label {
  font-size: 0.65rem;
  margin-bottom: 2px;
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
}

.compact-form .form-input {
  padding: 6px var(--space-2);
  font-size: var(--fs-xs);
  border-radius: var(--radius-sm);
}

.compact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

/* ---- Payment Pills ---- */
.pay-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.pay-pill {
  display: block;
  cursor: pointer;
}

.pay-pill input[type="radio"] { display: none; }

.pay-pill__face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-1) var(--space-1);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.6rem;
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  text-align: center;
  transition: all var(--transition-fast);
  background: var(--color-surface);
}
.pay-pill__face:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary);
  background: var(--color-surface-alt);
}

.pay-pill input:checked + .pay-pill__face {
  border-color: var(--color-primary);
  background: linear-gradient(180deg, #FFF8F0 0%, #FFF3E6 100%);
  color: var(--color-primary);
  font-weight: var(--fw-bold);
  box-shadow: 0 0 0 2px rgba(255, 111, 0, 0.12);
}

.pay-pill__icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* ---- Live Summary ---- */
.live-summary {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  padding: var(--space-3);
  min-height: 40px;
}

.live-summary__empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  padding: var(--space-2) 0;
  font-style: italic;
}

.live-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  padding: 3px 0;
  color: var(--color-text-secondary);
}

.live-summary__total {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  padding-top: var(--space-3);
  margin-top: var(--space-3);
  border-top: 2px solid var(--color-border);
  color: var(--color-text);
}

/* Order Summary */
.order-summary__items {
  margin-bottom: var(--space-4);
}

.order-summary__row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  font-size: var(--fs-sm);
}

.order-summary__row--total {
  border-top: 2px solid var(--color-border);
  padding-top: var(--space-3);
  margin-top: var(--space-3);
  font-weight: var(--fw-bold);
  font-size: var(--fs-md);
}

/* ===== Receipt Page ===== */
.receipt {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.receipt__qr {
  display: flex;
  justify-content: center;
  margin: var(--space-6) 0;
  padding: var(--space-8);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 2px dashed var(--color-border);
  position: relative;
}
/* Decorative corner marks */
.receipt__qr::before,
.receipt__qr::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--color-primary);
  border-style: solid;
}
.receipt__qr::before {
  top: 12px;
  left: 12px;
  border-width: 2px 0 0 2px;
  border-radius: 4px 0 0 0;
}
.receipt__qr::after {
  bottom: 12px;
  right: 12px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 4px 0;
}

.receipt__id {
  font-family: monospace;
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--color-secondary);
  margin-bottom: var(--space-4);
  letter-spacing: 0.06em;
  background: var(--color-surface-alt);
  display: inline-block;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-md);
}

.receipt__details {
  text-align: left;
}

.receipt__detail-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--fs-sm);
  gap: var(--space-4);
}
.receipt__detail-row:last-child {
  border-bottom: none;
}

.receipt__detail-label {
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.receipt__detail-value {
  font-weight: var(--fw-medium);
  text-align: right;
}

.receipt__actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-8);
  justify-content: center;
}

/* ===== Scanner Pages ===== */
.scanner-page {
  max-width: 640px;
  margin: 0 auto;
}

.scanner {
  position: relative;
  padding: var(--space-10) var(--space-8);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  text-align: center;
  margin-bottom: var(--space-6);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
}

.scanner__line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--color-primary) 30%, var(--color-primary-light) 50%, var(--color-primary) 70%, transparent 100%);
  animation: scanLine 2.5s ease-in-out infinite;
  opacity: 0.8;
}

@keyframes scanLine {
  0%, 100% { top: 0; }
  50% { top: calc(100% - 3px); }
}

.scanner__icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.scanner__input-wrap {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}

.scanner__input {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  padding-right: var(--space-12);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  text-align: center;
  letter-spacing: 0.08em;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-alt);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.scanner__input:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
  outline: none;
  background: var(--color-surface);
}
.scanner__input::placeholder {
  font-weight: var(--fw-normal);
  font-size: var(--fs-sm);
  letter-spacing: normal;
}

.scanner__submit {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
}

.scanner__recent {
  margin-top: var(--space-6);
}

.scanner__recent-label {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  font-weight: var(--fw-medium);
}

.scanner__recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

.scanner__recent-btn {
  padding: var(--space-1) var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-family: monospace;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  transition: all var(--transition-fast);
}
.scanner__recent-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-surface-alt);
}

/* Scan Result */
.scan-result {
  animation: fadeSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeSlideUp {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.scan-result__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
}

.scan-result__devotee {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
}

.scan-result__booking-id {
  font-family: monospace;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
}

/* Collection Table */
.collection-table th,
.collection-table td {
  text-align: center;
}

.collection-table .item-name {
  text-align: left;
  font-weight: var(--fw-medium);
}

.collection-table .qty-remaining {
  font-weight: var(--fw-bold);
  color: var(--color-primary);
}

.collection-table .qty-done {
  color: var(--color-success);
}

/* ===== Partial Collection ===== */
.collection-input {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.collection-input__item-name {
  font-size: var(--fs-2xl);
  font-family: var(--font-heading);
  margin-bottom: var(--space-2);
}

.collection-input__number {
  width: 120px;
  height: 80px;
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  text-align: center;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin: var(--space-4) auto;
  display: block;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.collection-input__number:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
  outline: none;
}

.collection-input__stepper-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin: var(--space-4) 0;
}

.collection-input__stepper-btn {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-circle);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-border);
  color: var(--color-primary);
  background: var(--color-surface);
  transition: all var(--transition-fast);
}
.collection-input__stepper-btn:hover:not(:disabled) {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary-glow);
}
.collection-input__stepper-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ===== Success Page ===== */
.success-page {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-10) 0;
}

.success-page__heading {
  font-size: var(--fs-2xl);
  color: var(--color-success);
  margin-bottom: var(--space-4);
}

.success-page__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-8);
}

/* ===== Dashboard ===== */
.dashboard-section {
  margin-bottom: var(--space-8);
}

.dashboard-section__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-5);
}

.chart-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  transition: box-shadow var(--transition-normal);
}
.chart-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.chart-card__title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chart-canvas-wrap {
  position: relative;
  height: 250px;
}

/* Dashboard Controls */
.dashboard-controls {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  align-items: center;
}

.dashboard-controls .form-input {
  max-width: 280px;
}

.filter-select {
  padding: var(--space-2) var(--space-4);
  padding-right: 36px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--fs-sm);
  color: var(--color-text);
  min-width: 160px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238E8E9E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.filter-select:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
  outline: none;
}

.dashboard-actions {
  margin-left: auto;
  display: flex;
  gap: var(--space-2);
}

/* ===== Payment Page ===== */
.payment-page {
  max-width: 720px;
  margin: 0 auto;
}

.payment-layout {
  display: grid;
  gap: var(--space-6);
}

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.payment-method {
  display: block;
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  transition: all var(--transition-fast);
  position: relative;
}
.payment-method:hover {
  border-color: var(--color-primary-light);
  background: var(--color-surface-alt);
}
.payment-method.is-selected {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, #FFF8F0 0%, #FFF3E6 100%);
  box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.1);
}
/* Selected indicator dot */
.payment-method.is-selected::after {
  content: '';
  position: absolute;
  top: 50%;
  right: var(--space-5);
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: var(--radius-circle);
  background: var(--gradient-primary);
  box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.15);
}

.payment-method input[type="radio"] {
  display: none;
}

.payment-method__content {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.payment-method__icon {
  font-size: var(--fs-2xl);
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
}

.payment-method__name {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  color: var(--color-text);
}

.payment-method__desc {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Payment Processing Overlay */
.payment-processing {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
}

.payment-processing__content {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-12);
  text-align: center;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border-light);
}

.payment-processing__content h3 {
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.payment-processing__content p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.payment-processing__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-border-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  margin: 0 auto var(--space-5);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Login Page ===== */
.login-page {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4A0E1E 0%, #800020 30%, #5a1a30 60%, #1a1a2e 100%);
  z-index: 9999;
  padding: var(--space-4);
  /* Subtle mesh gradient overlay */
  background-image:
    radial-gradient(at 20% 80%, rgba(212, 175, 55, 0.08) 0px, transparent 50%),
    radial-gradient(at 80% 20%, rgba(255, 111, 0, 0.06) 0px, transparent 50%),
    linear-gradient(135deg, #4A0E1E 0%, #800020 30%, #5a1a30 60%, #1a1a2e 100%);
}

.login-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  animation: loginCardAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginCardAppear {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.login-card__header {
  text-align: center;
  padding: var(--space-8) var(--space-6) var(--space-6);
  background: linear-gradient(135deg, #4A0E1E, #800020, #A3274F);
  color: white;
  position: relative;
}
/* Gold accent line under header */
.login-card__header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  opacity: 0.5;
}

.login-card__logo {
  font-size: 2.8rem;
  margin-bottom: var(--space-3);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
  display: block;
}

.login-card__title {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-1);
  color: white;
}

.login-card__subtitle {
  font-size: var(--fs-xs);
  opacity: 0.7;
  color: var(--color-gold-light);
  letter-spacing: 0.04em;
}

.login-card__body {
  padding: var(--space-8) var(--space-6) var(--space-6);
}

.login-card__error {
  background: var(--color-error-bg);
  color: var(--color-error);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-xs);
  margin-top: var(--space-3);
  border: 1px solid rgba(198, 40, 40, 0.12);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.login-card__footer {
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface-alt);
  border-top: 1px solid var(--color-border-light);
}

.login-card__demo-title {
  font-size: 0.65rem;
  font-weight: var(--fw-bold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-card__demo-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
  padding: var(--space-1) 0;
}

.login-card__demo-row code {
  font-size: 0.7rem;
  background: var(--color-surface);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-light);
  font-weight: var(--fw-medium);
}

.login-card__demo-role {
  font-size: 0.6rem;
  font-weight: var(--fw-bold);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  min-width: 56px;
  text-align: center;
  letter-spacing: 0.02em;
}

/* ===== Role Badges ===== */
.role-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: var(--fw-bold);
  color: white;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ===== Permissions Grid ===== */
.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.perm-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--color-surface);
}
.perm-item:hover {
  background: var(--color-surface-alt);
  border-color: var(--color-primary-light);
}

.perm-item input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}

.perm-item__label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  color: var(--color-text);
}

.perm-item__desc {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  line-height: 1.3;
  margin-top: 1px;
}

/* ===== Variant Rows (Prasad Master) ===== */
.variants-section {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-light);
}

.variants-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.variants-section__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.variants-section__hint {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: var(--lh-relaxed);
}

.variants-section__note {
  font-size: var(--fs-xs);
  color: var(--color-primary);
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: rgba(255, 111, 0, 0.06);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Individual variant row */
.variant-row {
  display: grid;
  grid-template-columns: 1fr 140px auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  animation: fadeSlideUp 0.2s ease;
}
.variant-row:hover {
  border-color: var(--color-border);
  box-shadow: var(--shadow-xs);
}
.variant-row:focus-within {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 2px rgba(255, 111, 0, 0.08);
}

.variant-row .form-input {
  margin-bottom: 0;
  padding: 8px var(--space-3);
  font-size: var(--fs-sm);
}

.variant-row__label {
  flex: 1;
}

.variant-row__price {
  font-weight: var(--fw-semibold);
}

.variant-row__remove {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.variant-row__remove:hover {
  background: var(--color-error-bg);
  color: var(--color-error);
}

/* Add variant button */
#add-variant-btn,
.variant-add-btn {
  margin-top: var(--space-2);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-lg);
  width: 100%;
  padding: var(--space-3);
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
#add-variant-btn:hover,
.variant-add-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(255, 111, 0, 0.03);
}

/* Emoji input — larger with preview feel */
.emoji-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.emoji-input-wrap .form-input {
  max-width: 80px;
  font-size: var(--fs-xl);
  text-align: center;
  padding: var(--space-2) var(--space-3);
}

.emoji-input-preview {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border-light);
}

/* Form actions bar */
.form-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border-light);
}

/* ===== Devotee Cards ===== */
.devotee-card {
  transition: box-shadow var(--transition-normal), transform var(--transition-fast);
}
.devotee-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.devotee-history {
  animation: fadeSlideUp 0.25s ease;
  border-top: 1px solid var(--color-border-light);
  padding-top: var(--space-4);
}

/* ===== Header User Info ===== */
.header-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-user__info {
  text-align: right;
  display: none;
}

.header-user__name {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: white;
  line-height: 1.2;
}

.header-user__role {
  font-size: 0.6rem;
  opacity: 0.7;
  color: var(--color-gold-light);
}

.header-user__logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-circle);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.header-user__logout:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

@media (min-width: 768px) {
  .header-user__info {
    display: block;
  }
}

/* ===== Variant Modal (Booking Page) ===== */
.variant-modal {
  max-width: 420px;
  width: 100%;
}
.variant-modal__subtitle {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}
.variant-option-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.variant-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.variant-option:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-alt);
}
.variant-option__info {
  flex: 1;
}
.variant-option__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}
.variant-option__price {
  font-size: var(--fs-xs);
  color: var(--color-primary);
  font-weight: var(--fw-bold);
}
.variant-option__stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.variant-option__stepper .stepper__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  background: var(--color-surface-alt);
  transition: background var(--transition-fast);
  border: none;
  cursor: pointer;
}
.variant-option__stepper .stepper__btn:hover:not(:disabled) {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.variant-option__stepper .stepper__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.variant-option__stepper .stepper__value {
  width: 40px;
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  background: transparent;
}
.tap-card__variant-hint {
  font-size: 0.55rem;
  color: var(--color-text-muted);
  margin-top: 1px;
  font-style: italic;
}
