/* ==========================================================================
   KdoDnesJede - Clean, Minimalist, Mobile-First Theme
   Palette:
   - #93827F (Warm Taupe)
   - #F3F9D2 (Pale Cream)
   - #BDC4A7 (Muted Sage)
   - #2F2F2F (Deep Charcoal)
   - #92B4A7 (Sage Teal)
   ========================================================================== */

:root {
  --c-taupe: #93827F;
  --c-cream: #F3F9D2;
  --c-sage: #BDC4A7;
  --c-charcoal: #2F2F2F;
  --c-teal: #92B4A7;

  /* Semantic mappings */
  --bg-page: #F6F9E9;
  --bg-card: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-subtle: #EDF3D7;
  --bg-input: #FFFFFF;

  --border-light: rgba(189, 196, 167, 0.45);
  --border-strong: #BDC4A7;

  --text-primary: #2F2F2F;
  --text-muted: #6E6866;
  --text-soft: #93827F;

  --accent-primary: #92B4A7;
  --accent-primary-hover: #7ea395;
  --accent-dark: #2F2F2F;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 3px rgba(47, 47, 47, 0.06);
  --shadow-md: 0 4px 12px rgba(47, 47, 47, 0.08);
  --shadow-sheet: 0 -8px 30px rgba(47, 47, 47, 0.15);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Google Material Symbols Configuration & Utilities
   ========================================================================== */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: 500;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'liga';
  vertical-align: middle;
  user-select: none;
  flex-shrink: 0;
}

.material-symbols-rounded.icon-xs { font-size: 14px; }
.material-symbols-rounded.icon-sm { font-size: 16px; }
.material-symbols-rounded.icon-md { font-size: 20px; }
.material-symbols-rounded.icon-lg { font-size: 24px; }
.material-symbols-rounded.icon-xl { font-size: 32px; }

/* Day ride passengers icon */
.day-passengers-icon {
  font-size: 13px;
  margin-right: 2px;
  vertical-align: -1px;
}

/* Payment tile icons */
.payment-arrow-icon {
  font-size: 13px;
  vertical-align: middle;
  line-height: 1;
}

.payment-paid-icon {
  font-size: 12px;
  vertical-align: -1px;
  margin-right: 2px;
}

/* Info button icon */
.btn-month-info .info-icon {
  font-size: 18px;
  vertical-align: middle;
}

/* Settled empty icon */
.settled-empty-icon {
  font-size: 2.4rem;
  color: #556B42;
}

/* ==========================================================================
   Header & Segmented Tabs (Sticky Top)
   ========================================================================== */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 249, 233, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid #D5DEC7;
  padding: 8px 16px;
}

/* Month Switcher Strip (Above Calendar & Summary) */
.cal-month-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cal-nav-arrow {
  background: var(--c-charcoal);
  border: 1px solid var(--c-charcoal);
  color: #FFFFFF;
  font-size: 1.5rem;
  line-height: 1;
  width: 54px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  border-radius: 8px;
  flex-shrink: 0;
  transition: all 0.15s ease;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cal-nav-arrow:hover {
  background: #111111;
  border-color: #111111;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.22);
}

.cal-nav-arrow:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.cal-month-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--c-charcoal);
  letter-spacing: -0.01em;
  text-align: center;
  user-select: none;
}

/* Nav Actions (Fuel & Login) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fuel-summary-btn {
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  color: var(--c-charcoal);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.fuel-summary-btn:hover {
  border-color: var(--c-teal);
  background: var(--bg-subtle);
}

.btn-login-pill {
  background: var(--c-charcoal);
  color: #FFFFFF;
  border: none;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
}

.btn-login-pill:hover {
  opacity: 0.9;
}

.auth-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-logout-link {
  background: none;
  border: none;
  color: var(--c-taupe);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0 4px;
}

/* Segmented Tabs (3 Top Navigation Buttons) */
.segment-tabs {
  background: transparent;
  padding: 0;
}

.tabs-container {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  background: #EDF3D7;
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1.5px solid #9EAF84;
  box-shadow: 0 1px 4px rgba(30, 89, 72, 0.08);
}

.tab-link {
  flex: 1;
  background: none;
  border: none;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 0.92rem;
  color: #556B42;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.tab-link:hover {
  color: #1e5948;
}

.tab-link.active {
  background: var(--c-charcoal);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */

.main-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 16px 60px;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

/* Section Title Bar */
.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.section-title-bar h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-charcoal);
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   1. Calendar Section (Minimal & Clean)
   ========================================================================== */

.clean-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.sum-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sum-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sum-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-charcoal);
  margin-top: 2px;
}

.sum-item.highlight .sum-val {
  color: #1e5948;
}

.sum-divider {
  width: 1px;
  height: 28px;
  background: var(--border-light);
}

/* ==========================================================================
   Clean & Compact Fuel Prices Strip (Matching Calendar Aesthetic)
   ========================================================================== */

.cal-fuel-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  background: #B6C6A0;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-fuel-item {
  background: #EDF3D7;
  border: 1.5px solid #9EAF84;
  border-radius: 6px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(30, 89, 72, 0.06);
  user-select: none;
}

.cal-fuel-strip:hover .cal-fuel-item,
.cal-fuel-item:hover {
  background: #E4ECC9;
  border-color: var(--c-teal);
  box-shadow: 0 2px 6px rgba(30, 89, 72, 0.14);
}

.cal-fuel-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--c-charcoal);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-fuel-val {
  font-size: 1rem;
  font-weight: 800;
  color: #1e5948;
}

.cal-fuel-val strong {
  font-size: 1.05rem;
}

.cal-fuel-val small {
  font-size: 0.75rem;
  font-weight: 500;
  color: #555555;
  margin-left: 2px;
}

@media (max-width: 480px) {
  .cal-fuel-strip {
    gap: 4px;
    padding: 4px;
  }
  .cal-fuel-item {
    padding: 6px 10px;
  }
  .cal-fuel-name {
    font-size: 0.82rem;
  }
  .cal-fuel-val {
    font-size: 0.9rem;
  }
}

/* Calendar Card & Grid */
.calendar-card {
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--bg-subtle);
  border-bottom: 1.5px solid #AEC09A;
  text-align: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--c-charcoal);
  padding: 9px 0;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 6px;
  background: #B6C6A0;
}

/* Day Cell */
.cal-day-cell {
  background: #FFFFFF;
  border: 1px solid #A4B68E;
  border-radius: 8px;
  min-height: 88px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.cal-day-cell:active, .cal-day-cell:hover {
  background: #FFFFFF;
  border-color: var(--c-teal);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.cal-day-cell.has-ride {
  background: #EDF3D7;
  border: 1.5px solid #9EAF84;
  box-shadow: 0 1px 4px rgba(30, 89, 72, 0.08);
}

.cal-day-cell.has-ride:active, .cal-day-cell.has-ride:hover {
  background: #E4ECC9;
  border-color: var(--c-teal);
  box-shadow: 0 3px 10px rgba(30, 89, 72, 0.16);
}

.cal-day-cell.other-month {
  background: rgba(255, 255, 255, 0.2);
  border: 1px dashed rgba(0, 0, 0, 0.15);
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}

/* Day Top (Date Number + Divider Line) */
.day-num-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
  margin-bottom: 5px;
  border-bottom: 1px solid #E5EAD8;
}

.cal-day-cell.has-ride .day-num-row {
  border-bottom: 1px solid rgba(30, 89, 72, 0.16);
}

.day-num {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--c-charcoal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cal-day-cell.has-ride .day-num {
  color: #1e5948;
}

.cal-day-cell.is-today .day-num {
  background: var(--c-charcoal);
  color: #FFFFFF !important;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

/* Day Ride Body (Directly across the full cell, no inner block) */
.day-ride-body {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.day-ride-driver-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.day-driver-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--c-charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-ride-passengers {
  font-size: 0.72rem;
  font-weight: 600;
  color: #1e5948;
  background: rgba(30, 89, 72, 0.12);
  padding: 1px 5px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.day-ride-passengers.is-partial {
  color: #b45309;
  background: rgba(245, 158, 11, 0.18);
}

.day-ride-dest {
  font-size: 0.74rem;
  font-weight: 500;
  color: #555555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-ride-price {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e5948;
  margin-top: 2px;
}

.day-ride-price small {
  font-weight: 500;
  font-size: 0.7rem;
  color: #666666;
}

.cal-helper-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
}

/* ==========================================================================
   2. Auta (Cars) Section (Style aligned with Calendar)
   ========================================================================== */

.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  padding: 8px;
  background: #B6C6A0;
  border: 1px solid #9EAF84;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.car-card {
  background: #EDF3D7;
  border: 1.5px solid #9EAF84;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(30, 89, 72, 0.08);
}

.car-card:hover, .car-card:active {
  background: #E4ECC9;
  border-color: var(--c-teal);
  box-shadow: 0 3px 10px rgba(30, 89, 72, 0.16);
  transform: translateY(-1px);
}

.car-card:focus-visible {
  outline: 2px solid var(--c-teal);
  outline-offset: 2px;
}

.car-card-name {
  font-weight: 800;
  font-size: 0.98rem;
  color: #1e5948;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(30, 89, 72, 0.16);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.car-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.car-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  line-height: 1.35;
}

.car-card-lbl {
  color: #556B42;
  font-weight: 600;
  font-size: 0.78rem;
}

.car-card-val {
  color: var(--c-charcoal);
  font-weight: 700;
  font-size: 0.84rem;
}

.car-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 16px;
  background: #EDF3D7;
  border: 1.5px dashed #9EAF84;
  border-radius: 8px;
  color: #4B5A38;
  font-weight: 600;
  font-size: 0.88rem;
}

@media (max-width: 480px) {
  .cars-grid {
    grid-template-columns: 1fr;
    padding: 6px;
    gap: 6px;
  }
}

/* ==========================================================================
   3. Platby (Payments) Section - All Months & Clean Blocks
   ========================================================================== */

.payments-months-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Month Block */
.month-payments-block {
  background: #B6C6A0;
  border: 1.5px solid #9EAF84;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(30, 89, 72, 0.08);
  transition: all 0.15s ease;
}

.month-payments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #FFFFFF;
  border-bottom: 1.5px solid #9EAF84;
}

.month-payments-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e5948;
  letter-spacing: -0.01em;
  margin: 0;
}

.btn-month-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--c-charcoal);
  border: 1.5px solid var(--c-charcoal);
  color: #FFFFFF;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
  letter-spacing: 0.01em;
  user-select: none;
}

.btn-month-info:hover {
  background: #153e32;
  border-color: #153e32;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.btn-month-info:active {
  transform: translateY(0);
}

/* Payments Grid (wide & compact blocks matching calendar aesthetic) */
.month-payments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  padding: 8px;
  background: #B6C6A0;
}

/* Compact Wide Payment Tile */
.payment-tile {
  background: #EDF3D7;
  border: 1.5px solid #9EAF84;
  border-radius: 8px;
  padding: 7px 11px;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(30, 89, 72, 0.08);
  user-select: none;
}

.payment-tile:hover, .payment-tile:active {
  background: #E4ECC9;
  border-color: var(--c-teal);
  box-shadow: 0 3px 8px rgba(30, 89, 72, 0.16);
  transform: translateY(-1px);
}

.payment-tile:focus-visible {
  outline: 2px solid var(--c-teal);
  outline-offset: 2px;
}

.payment-tile-names,
.payment-tile-bottom {
  position: relative;
  z-index: 2;
}

.payment-tile-names {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e5948;
  line-height: 1.2;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.payment-tile-from {
  color: var(--c-charcoal);
  font-weight: 700;
}

.payment-tile-arrow {
  color: #556B42;
  font-size: 0.72rem;
  font-weight: 800;
}

.payment-tile-to {
  color: #1e5948;
  font-weight: 800;
}

.payment-tile-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.payment-tile-amount {
  font-size: 1.18rem;
  font-weight: 800;
  color: #1e5948;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* Paid state (white background as requested) */
.payment-tile.is-paid {
  background: #FFFFFF;
  border-color: #9EAF84;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.payment-tile.is-paid:hover, .payment-tile.is-paid:active {
  background: #FFFFFF;
  border-color: var(--c-teal);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.payment-tile.is-paid .payment-tile-amount {
  color: #1e5948;
}

/* Corner-to-corner cross lines on paid block */
.payment-tile-cross {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.payment-tile-cross line {
  stroke: #9EAF84;
  stroke-width: 2.2;
  opacity: 0.75;
}

.payment-tile-paid-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #1e5948;
  background: #EDF3D7;
  border: 1px solid #C4D3AF;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1.1;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .month-payments-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 6px;
  }
  .payment-tile {
    min-height: 52px;
    padding: 6px 9px;
  }
  .payment-tile-names {
    font-size: 0.75rem;
  }
  .payment-tile-amount {
    font-size: 1.05rem;
  }
  .payment-tile-paid-tag {
    font-size: 0.62rem;
    padding: 1px 4px;
  }
}

/* Empty & All Settled Cards */
.payments-all-settled-card,
.payments-empty-card {
  text-align: center;
  background: #EDF3D7;
  border: 1.5px solid #9EAF84;
  border-radius: 14px;
  padding: 32px 20px;
  margin: 12px 0;
  box-shadow: 0 2px 6px rgba(30, 89, 72, 0.08);
}

.settled-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.payments-all-settled-card h3,
.payments-empty-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1e5948;
  margin-bottom: 6px;
}

.payments-all-settled-card p,
.payments-empty-card p {
  font-size: 0.88rem;
  color: #4B5A38;
  margin: 0;
}

/* Month Info Modal */
.modal-info-sheet {
  max-width: 500px;
}

.modal-info-content {
  padding: 16px 18px;
  overflow-y: auto;
  max-height: 70vh;
}

.month-info-members-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #B6C6A0;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #9EAF84;
}

.month-info-member-card {
  background: #EDF3D7;
  border: 1.5px solid #9EAF84;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(30, 89, 72, 0.08);
}

.info-member-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(30, 89, 72, 0.16);
}

.info-member-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--c-charcoal);
}

.info-balance-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.info-balance-badge.is-positive {
  background: #FFFFFF;
  color: #1e5948;
  border: 1.5px solid #1e5948;
}

.info-balance-badge.is-negative {
  background: #FFFFFF;
  color: #b91c1c;
  border: 1.5px solid #fca5a5;
}

.info-balance-badge.is-zero {
  background: #FFFFFF;
  color: #555555;
  border: 1.5px solid #D5DEC7;
}

.info-member-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
  align-items: flex-start;
}

.info-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.info-stat-lbl {
  font-size: 0.72rem;
  color: #556B42;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
  margin-bottom: 3px;
  white-space: nowrap;
}

.info-stat-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--c-charcoal);
  line-height: 1.2;
}

@media (max-width: 500px) {
  .info-member-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* QR Payment Modal Styles */
.qr-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #EDF3D7;
  border: 1.5px solid #9EAF84;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.qr-summary-pill .transfer-badge.from {
  color: var(--c-charcoal);
  font-weight: 700;
}

.qr-summary-pill .transfer-arrow-icon {
  color: #556B42;
  font-weight: 800;
  font-size: 0.8rem;
}

.qr-summary-pill .transfer-badge.to {
  color: #1e5948;
  font-weight: 800;
}

.qr-amount-display {
  font-size: 1.9rem;
  font-weight: 800;
  color: #1e5948;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

/* Paid state notice in modal */
.qr-paid-notice-box {
  background: #EDF3D7;
  border: 1.5px solid #9EAF84;
  border-radius: 12px;
  padding: 22px 16px;
  margin: 6px 0 16px 0;
  text-align: center;
}

.qr-paid-icon-circle {
  width: 46px;
  height: 46px;
  background: #1e5948;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 auto 10px auto;
  box-shadow: 0 2px 8px rgba(30, 89, 72, 0.22);
}

.qr-paid-heading {
  font-size: 1.12rem;
  font-weight: 800;
  color: #1e5948;
  margin-bottom: 6px;
}

.qr-paid-desc {
  font-size: 0.84rem;
  color: #4B5A38;
  line-height: 1.4;
  margin: 0;
}

.qr-code-wrapper {
  background: #FFFFFF;
  border: 2px solid #9EAF84;
  border-radius: 12px;
  padding: 12px;
  width: 230px;
  height: 230px;
  margin: 0 auto 14px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(30, 89, 72, 0.1);
  position: relative;
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.qr-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #556B42;
  font-size: 0.82rem;
  font-weight: 600;
}

.spinner-circle {
  width: 28px;
  height: 28px;
  border: 3px solid #D5DEC7;
  border-top-color: #1e5948;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.qr-details-box {
  background: #EDF3D7;
  border: 1.5px solid #9EAF84;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.qr-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(30, 89, 72, 0.2);
  gap: 8px;
}

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

.qr-detail-label {
  color: #556B42;
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
}

.qr-detail-val {
  color: #1e5948;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.qr-detail-copyable {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qr-detail-copyable code {
  font-family: monospace;
  font-size: 0.8rem;
  background: #FFFFFF;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #9EAF84;
  color: #1e5948;
}

.btn-copy-mini {
  background: #FFFFFF;
  border: 1px solid #9EAF84;
  border-radius: 4px;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.78rem;
  line-height: 1;
  color: #1e5948;
  transition: all 0.15s ease;
}

.btn-copy-mini:hover {
  background: #EDF3D7;
  border-color: #1e5948;
}

.qr-hint {
  font-size: 0.75rem;
  color: #556B42;
  line-height: 1.35;
  margin-bottom: 14px;
  padding: 0 8px;
}

.qr-sheet-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1.5px solid #9EAF84;
  background: #FAFCF2;
}

.qr-sheet-actions .btn-muted {
  background: #FFFFFF;
  border: 1.5px solid #9EAF84;
  color: var(--c-charcoal);
  border-radius: 8px;
  font-weight: 600;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.qr-sheet-actions .btn-muted:hover {
  background: #EDF3D7;
  border-color: #1e5948;
}

.btn-pay-confirm {
  background: #1e5948;
  border: 1.5px solid #1e5948;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 9px 20px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(30, 89, 72, 0.25);
}

.btn-pay-confirm:hover {
  background: #153e32;
  border-color: #153e32;
  box-shadow: 0 4px 10px rgba(30, 89, 72, 0.35);
  transform: translateY(-1px);
}

.btn-pay-cancel {
  background: #FFFFFF;
  border: 1.5px solid #DC2626;
  color: #DC2626;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-pay-cancel:hover {
  background: #FEE2E2;
  border-color: #B91C1C;
  color: #B91C1C;
}

/* ==========================================================================
   Buttons & Inputs
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--c-charcoal);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: #1a1a1a;
}

.btn-action {
  background: var(--c-teal);
  color: #FFFFFF;
}

.btn-action:hover {
  background: var(--accent-primary-hover);
}

.btn-muted {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  color: var(--c-charcoal);
}

.btn-muted:hover {
  background: #e5ecd0;
}

.btn-danger-text {
  background: none;
  border: none;
  color: #a33827;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-danger-text:hover {
  text-decoration: underline;
}

.btn-edit-text {
  background: none;
  border: none;
  color: var(--c-charcoal);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-edit-text:hover {
  text-decoration: underline;
}

.btn-block {
  width: 100%;
}

/* Forms */
.form-field {
  margin-bottom: 12px;
}

.form-field label, .field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-charcoal);
  margin-bottom: 5px;
}

.input-text, .input-select {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  color: var(--c-charcoal);
  outline: none;
  transition: border-color 0.15s ease;
}

.input-text:focus, .input-select:focus {
  border-color: var(--c-charcoal);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.text-center { text-align: center; }
.text-large { font-size: 1.25rem !important; letter-spacing: 0.2em; }
.mt-3 { margin-top: 12px; }
.mb-3 { margin-bottom: 12px; }

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.mini-calc-box {
  background: #EDF3D7;
  border: 1.5px solid #9EAF84;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #1e5948;
  font-weight: 600;
  margin-top: 6px;
}

.btn-delete-car {
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
  background: #fef2f2 !important;
  font-weight: 600;
}

.btn-delete-car:hover {
  background: #fee2e2 !important;
  border-color: #f87171 !important;
}

/* ==========================================================================
   Modals & Bottom Sheets (Mobile-First)
   ========================================================================== */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end; /* Bottom sheet on mobile! */
  justify-content: center;
}

@media (min-width: 600px) {
  .modal-layer {
    align-items: center; /* Center modal on desktop */
  }
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(47, 47, 47, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-sheet {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 500px;
  background: #FFFFFF;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-sheet);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@media (min-width: 600px) {
  .modal-sheet {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

.modal-sheet-sm {
  max-width: 400px;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes scaleIn {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: var(--radius-pill);
  margin: 8px auto 0;
}

@media (min-width: 600px) {
  .sheet-handle { display: none; }
}

.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
}

.modal-top h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-charcoal);
}

.btn-close-sheet {
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--c-taupe);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  transition: all 0.15s ease;
}

.btn-close-sheet:hover {
  color: var(--c-charcoal);
  background: rgba(0, 0, 0, 0.06);
}

.modal-content {
  padding: 16px 18px;
  overflow-y: auto;
  max-height: 65vh;
}

.sheet-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--border-light);
  background: #FAFCF2;
}

/* ==========================================================================
   Clean & Compact Day Selection Modal
   ========================================================================== */

.modal-day-sheet {
  max-width: 440px;
}

.modal-day-content {
  padding: 12px 16px;
  overflow-y: auto;
  max-height: calc(85vh - 110px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 1. Car Picker Stack (clean & compact) */
.car-options-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.car-opt-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1.5px solid #D5DEC7;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.car-opt-btn:hover {
  border-color: var(--c-teal);
  background: #FAFDFB;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.car-opt-btn.selected {
  background: #EDF3D7;
  border-color: #9EAF84;
  box-shadow: 0 1px 4px rgba(30, 89, 72, 0.08);
}

.car-opt-btn.selected:hover {
  background: #E4ECC9;
  border-color: var(--c-teal);
}

.car-opt-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.car-opt-radio {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid #CBD5E1;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.car-opt-btn.selected .car-opt-radio {
  border-color: var(--c-teal);
  background: var(--c-teal);
  box-shadow: inset 0 0 0 2.5px #EDF3D7;
}

.car-opt-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.car-opt-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--c-charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.car-opt-owner {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(47, 47, 47, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.car-opt-btn.selected .car-opt-owner {
  background: rgba(30, 89, 72, 0.1);
  color: #1e5948;
}

.car-opt-price-val {
  font-weight: 800;
  font-size: 0.9rem;
  color: #1e5948;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  margin-left: 8px;
}

/* 2. Passengers Toggle Row (Clean text chips matching calendar) */
.passengers-toggle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 3px 0;
}

.passenger-chip-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border-radius: 8px;
  border: 1.5px solid #D5DEC7;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  width: 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.passenger-chip-btn:hover {
  border-color: var(--c-teal);
  background: #FAFDFB;
}

.passenger-chip-btn.is-active {
  background: #EDF3D7;
  border-color: #9EAF84;
  box-shadow: 0 1px 3px rgba(30, 89, 72, 0.08);
}

.passenger-chip-btn.is-active:hover {
  background: #E4ECC9;
  border-color: var(--c-teal);
}

.passenger-chip-btn.is-active .passenger-chip-name {
  color: var(--c-charcoal);
  font-weight: 700;
}

.passenger-chip-btn.is-inactive {
  background: #F3F4F6;
  border-color: #E5E7EB;
  opacity: 0.45;
  box-shadow: none;
}

.passenger-chip-btn.is-inactive .passenger-chip-name {
  color: #888888;
  font-weight: 500;
}

.passenger-chip-name {
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* 3. Route Selector Segmented Group */
.route-selector-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 3px;
}

.route-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 8px;
  border: 1.5px solid #D5DEC7;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.route-btn:hover {
  background: #FAFDFB;
  border-color: var(--c-teal);
}

.route-btn.active {
  background: var(--c-charcoal);
  border-color: var(--c-charcoal);
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.route-btn-name {
  font-size: 0.82rem;
  font-weight: 700;
}

.route-btn-km {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.route-btn.active .route-btn-km {
  color: rgba(255, 255, 255, 0.85);
}

/* Custom KM input */
.custom-km-container {
  padding: 6px 10px;
  background: #EDF3D7;
  border: 1px solid #9EAF84;
  border-radius: 8px;
}

.custom-km-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.custom-km-input {
  width: 80px;
  text-align: center;
  padding: 4px 6px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
}

.custom-km-unit {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* 4. Live Day Cost Preview (matching calendar) */
.day-cost-live-card {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #EDF3D7;
  border: 1.5px solid #9EAF84;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 4px;
  box-shadow: 0 1px 3px rgba(30, 89, 72, 0.06);
}

.preview-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.preview-lbl {
  font-size: 0.65rem;
  color: #555555;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.preview-val {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--c-charcoal);
  margin-top: 1px;
}

.preview-metric.highlight .preview-val {
  color: #1e5948;
  font-size: 1.02rem;
}

.preview-divider {
  width: 1px;
  height: 22px;
  background: #CBD8B5;
}

/* ==========================================================================
   Car Modal Styling (Matching Calendar & Day Modal)
   ========================================================================== */

.modal-car-sheet {
  max-width: 440px;
}

.modal-car-sheet .modal-top {
  border-bottom: 1px solid #E5EAD8;
  padding: 13px 18px;
}

.modal-car-sheet .modal-top h3 {
  font-size: 1.12rem;
  font-weight: 800;
  color: #1e5948;
  letter-spacing: -0.01em;
}

.modal-car-content {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-field-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #4B5A38;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 5px;
  display: block;
}

.car-modal-input,
.car-modal-select {
  width: 100%;
  background: #FFFFFF;
  border: 1.5px solid #D5DEC7;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-charcoal);
  transition: all 0.15s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.car-modal-input:hover,
.car-modal-select:hover {
  border-color: #9EAF84;
}

.car-modal-input:focus,
.car-modal-select:focus {
  border-color: #1e5948;
  background: #FAFDFB;
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 89, 72, 0.12);
}



.car-sheet-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid #E5EAD8;
  background: #FAFCF2;
}

.car-sheet-actions .btn-primary {
  background: var(--c-charcoal);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 700;
  padding: 9px 20px;
  font-size: 0.88rem;
  transition: all 0.15s ease;
  cursor: pointer;
}

.car-sheet-actions .btn-primary:hover {
  background: #111111;
  transform: translateY(-1px);
}

.car-sheet-actions .btn-muted {
  background: #FFFFFF;
  border: 1.5px solid #D5DEC7;
  border-radius: var(--radius-pill);
  color: var(--c-charcoal);
  font-weight: 600;
  padding: 8px 16px;
  font-size: 0.88rem;
  transition: all 0.15s ease;
  cursor: pointer;
}

.car-sheet-actions .btn-muted:hover {
  background: #F3F4F6;
  border-color: #CBD5E1;
}

.car-sheet-actions .btn-delete-car {
  background: #FEF2F2 !important;
  color: #DC2626 !important;
  border: 1.5px solid #FCA5A5 !important;
  border-radius: var(--radius-pill) !important;
  font-weight: 600 !important;
  padding: 8px 14px !important;
  font-size: 0.84rem !important;
  transition: all 0.15s ease !important;
  cursor: pointer !important;
}

.car-sheet-actions .btn-delete-car:hover {
  background: #FEE2E2 !important;
  border-color: #F87171 !important;
}

/* Helper flex utilities */
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

/* Day cell route & passenger badges in Calendar grid */
.day-cell-route-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(47, 47, 47, 0.06);
  color: var(--c-charcoal);
  margin-top: 2px;
}

.day-cell-passengers-badge {
  font-size: 0.64rem;
  color: #1e5948;
  font-weight: 600;
  background: #e6f4ea;
  padding: 0 4px;
  border-radius: 3px;
  margin-left: 3px;
}

.day-cell-passengers-badge.is-partial {
  background: #fef3c7;
  color: #92400e;
}

.error-msg {
  background: #FDF1ED;
  color: #a33827;
  border: 1px solid #e8a599;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  margin-top: 10px;
  text-align: center;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-stack {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 90%;
  max-width: 360px;
  pointer-events: none;
}

.toast {
  background: var(--c-charcoal);
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-md);
  animation: toastPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

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

/* ==========================================================================
   Mobile-Specific Optimizations
   ========================================================================== */

@media (max-width: 760px) {
  .payments-overview-card {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 14px;
    padding: 16px;
  }

  .overview-metric:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding-right: 0;
    padding-bottom: 12px;
  }

  /* In mobile cards, hide button in header, show full-width button at bottom */
  .member-pay-head-actions .btn-status-toggle {
    display: none;
  }

  .member-pay-mobile-action {
    display: block;
    margin-top: 4px;
  }

  .member-pay-mobile-action .btn-status-toggle {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 44px;
    font-size: 0.9rem;
  }

  .member-pay-stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pay-stat-cell:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding-right: 0;
    padding-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .cal-month-nav-bar {
    padding: 5px 8px;
    margin-bottom: 8px;
  }
  .cal-nav-arrow {
    width: 46px;
    height: 32px;
    font-size: 1.35rem;
    border-radius: 6px;
  }
  .cal-month-title {
    font-size: 1.05rem;
  }
  .fuel-summary-btn {
    padding: 4px 8px;
    font-size: 0.72rem;
  }
  .cal-days-grid {
    gap: 3px;
    padding: 3px;
  }
  .cal-day-cell {
    min-height: 72px;
    padding: 4px 4px;
    border-radius: 6px;
  }
  .day-num {
    font-size: 0.8rem;
  }
  .cal-day-cell.is-today .day-num {
    width: 20px;
    height: 20px;
    font-size: 0.74rem;
  }
  .day-ride-passengers {
    font-size: 0.62rem;
    padding: 0 3px;
  }
  .day-driver-name {
    font-size: 0.75rem;
  }
  .day-ride-dest {
    font-size: 0.66rem;
  }
  .day-ride-price {
    font-size: 0.74rem;
  }
}

/* ==========================================================================
   Dedicated Full-Screen Login Page (Gatekeeper)
   ========================================================================== */

.login-screen-view {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background-color: var(--bg-page);
  box-sizing: border-box;
}

.login-card-wrapper {
  width: 100%;
  max-width: 430px;
  animation: loginFadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.login-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  box-shadow: 0 10px 28px rgba(47, 47, 47, 0.08);
  text-align: center;
}

.login-brand-badge {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 12px;
}

.login-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--c-charcoal);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.login-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.login-members-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.member-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  color: var(--c-charcoal);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.login-card-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 6px;
}

.login-form-group {
  text-align: left;
}

.login-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--c-charcoal);
  margin-bottom: 8px;
  text-align: center;
}

.login-pin-wrap {
  width: 100%;
}

.login-pin-input {
  width: 100%;
  height: 54px;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.3em;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  color: var(--c-charcoal);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: var(--font-family);
}

.login-pin-input:focus {
  outline: none;
  border-color: var(--c-teal);
  box-shadow: 0 0 0 3px rgba(146, 180, 167, 0.35);
}

.login-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

.login-error-alert {
  background: #FDF1ED;
  color: #a33827;
  border: 1px solid #e8a599;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: center;
  margin-top: 10px;
}

.btn-login-submit {
  width: 100%;
  height: 48px;
  background: var(--c-charcoal);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn-login-submit:hover {
  background: #1a1a1a;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-login-submit:active {
  transform: scale(0.98);
}

.btn-submit-arrow {
  font-size: 1.1rem;
  transition: transform 0.15s ease;
}

.btn-login-submit:hover .btn-submit-arrow {
  transform: translateX(3px);
}

.login-footer-info {
  font-size: 0.74rem;
  color: var(--text-soft);
  margin-top: 22px;
  line-height: 1.4;
}

/* Logout button in header */
.btn-logout-pill {
  background: #FFFFFF;
  border: 1.5px solid var(--border-strong);
  color: var(--c-charcoal);
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-logout-pill:hover {
  border-color: #a33827;
  color: #a33827;
  background: #FDF1ED;
}

.logout-dot {
  color: #10b981;
  font-size: 0.7rem;
}
