/* Ubunye SADC PWA Loads Platform - Brand Refined Stylesheet (Ivory Cream, Slate Teal & Ochre Gold) */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand Color Palette (Vibrant Fintech) */
  --brand-teal: #5A22E1;      /* Electric Purple */
  --brand-teal-glow: rgba(90, 34, 225, 0.2);
  --brand-teal-light: #7A42F1;
  
  --brand-gold: #00D2FF;      /* Bright Blue */
  --brand-gold-glow: rgba(0, 210, 255, 0.2);
  
  --gradient-main: linear-gradient(135deg, #5A22E1 0%, #00D2FF 100%);
  --gradient-wallet: linear-gradient(135deg, #1A2980 0%, #26D0CE 100%);
  
  /* Layout Surfaces */
  --bg-cream-dark: #f0f4f8;   
  --bg-cream-light: #f8fafc;  
  --bg-card: #ffffff;         
  --bg-card-hover: #fcfcfc;
  
  --border-glass: rgba(0, 0, 0, 0.05);
  --border-glass-hover: rgba(0, 0, 0, 0.1);
  
  --danger: #FF3B30;
  --info: #007AFF;
  --success: #34C759;
  --warning: #FF9500;
  
  --text-primary: #121212;    
  --text-secondary: #5e5e5e;
  --text-muted: #888888;
  
  --text-card-primary: #121212;   
  --text-card-secondary: #5e5e5e;
  
  --font-display: 'Outfit', 'Segoe UI', sans-serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  
  --shadow-neon: 0 8px 32px 0 rgba(90, 34, 225, 0.2);
  --shadow-card: 0 12px 24px rgba(0, 0, 0, 0.06);
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Base resets & layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-cream-light);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Background animated glow orbs matching brand hues */
body::before, body::after {
  display: none;
}

body::before {
  background: var(--brand-teal);
  top: -120px;
  right: -50px;
}

body::after {
  background: var(--brand-gold);
  bottom: -120px;
  left: -50px;
  animation-delay: 5s;
}


  100% { transform: translate(50px, 30px) scale(1.15); }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-cream-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(19, 78, 94, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-teal);
}

/* Typography elements */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-teal);
  letter-spacing: -0.02em;
}

a {
  color: var(--brand-teal-light);
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* Glassmorphism utility card in Light Theme */
.glass-panel {
  background: var(--bg-card);
  border: none;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  color: var(--text-card-primary);
}
.glass-panel h1, .glass-panel h2, .glass-panel h3, .glass-panel h4, .glass-panel h5 {
  color: var(--brand-teal);
}
.glass-panel .text-secondary {
  color: var(--text-card-secondary);
}

.glass-panel:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px rgba(19, 78, 94, 0.22);
}

/* Top App Header bar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brand-teal);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 4px 6px var(--brand-teal-glow));
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

.brand-subtext {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* User identity with role selector */
.user-control-center {
  display: flex;
  align-items: center;
  gap: 16px;
}

.role-badge-selector {
  background: var(--bg-cream-dark);
  border: 1px solid var(--border-glass);
  border-radius: 30px;
  padding: 4px;
  display: flex;
  gap: 4px;
}

.role-tab-btn {
  background: transparent;
  border: none;
  outline: none;
  padding: 6px 16px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.role-tab-btn.active {
  background: var(--brand-teal);
  color: var(--bg-card);
  box-shadow: 0 4px 12px var(--brand-teal-glow);
}

/* Notification & Menu Buttons */
.icon-btn-badge {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--brand-teal);
  transition: var(--transition-smooth);
  box-shadow: 0 2px 6px rgba(19, 78, 94, 0.06);
}

.icon-btn-badge:hover {
  background: var(--bg-cream-dark);
  border-color: var(--border-glass-hover);
}

.badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  background-color: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* Main Container Dashboard */
.dashboard-container {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Stats Section Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-card:nth-child(1) .stat-icon { background: var(--brand-teal-glow); color: var(--brand-teal); }
.stat-card:nth-child(2) .stat-icon { background: var(--brand-gold-glow); color: var(--brand-gold); }
.stat-card:nth-child(3) .stat-icon { background: var(--brand-teal-glow); color: var(--brand-teal-light); }

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--brand-teal);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Primary actions grid layout */
.main-workspace-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media(min-width: 900px) {
  .main-workspace-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
}

/* Quick Search Filters */
.search-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 8px;
}

.search-input-group {
  display: flex;
  background: var(--bg-cream-dark);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 4px 12px;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.search-input-group:focus-within {
  border-color: var(--brand-teal);
  background: var(--bg-card);
  box-shadow: 0 0 10px var(--brand-teal-glow);
}

.search-input-group input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-card-primary);
  padding: 8px 0;
  width: 100%;
  font-size: 0.9rem;
}

.search-input-group input::placeholder {
  color: var(--text-muted);
}

.filter-tags-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.filter-tags-row::-webkit-scrollbar {
  display: none;
}

.filter-tag-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
  box-shadow: 0 1px 3px rgba(19, 78, 94, 0.04);
}

.filter-tag-pill.active, .filter-tag-pill:hover {
  background: var(--brand-teal-glow);
  border-color: var(--brand-teal);
  color: var(--brand-teal);
}

/* Dynamic Cards Lists */
.card-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 200px;
}

.load-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
}

.load-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--text-muted);
}

.load-card.available::before { background: var(--gradient-main); }
.load-card.bidded::before { background-color: var(--brand-gold); }
.load-card.allocated::before { background-color: var(--info); }

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.cargo-tag {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-teal);
}

.verified-shipper-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--brand-teal);
  background: var(--brand-teal-glow);
  padding: 4px 8px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.verified-shipper-badge svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.card-route-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  position: relative;
}

.route-stop {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.route-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  background: transparent;
  flex-shrink: 0;
}

.origin-dot { border-color: var(--brand-teal); background: var(--brand-teal); }
.destination-dot { border-color: var(--brand-gold); }

.route-connector {
  width: 2px;
  height: 16px;
  background: linear-gradient(to bottom, var(--brand-teal), var(--brand-gold));
  margin-left: 4px;
}

.card-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
  background: var(--bg-cream-light);
  border-radius: 12px;
  font-size: 0.8rem;
  margin-bottom: 16px;
  border: 1px solid var(--border-glass);
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  color: var(--text-secondary);
  font-size: 0.7rem;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.detail-val {
  font-weight: 600;
  color: var(--text-card-primary);
}

/* Premium simplified SADC Card grid matching user mockup */
.sadc-page-subtitle {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #dc2626; /* Crimson Red from SADC region logo */
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: 2px;
}

.sadc-page-title {
  font-size: 2.2rem;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--brand-teal);
  text-align: center;
  margin-bottom: 24px;
}

/* You are here breadcrumb horizontal bar */
.breadcrumb-bar {
  background: var(--bg-cream-dark);
  border-radius: 8px;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border: 1px solid var(--border-glass);
}

@media(min-width: 768px) {
  .breadcrumb-bar {
    flex-direction: row;
  }
}

.breadcrumb-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-card-primary);
}

.breadcrumb-filter-group {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 420px;
}

/* Simplified Load Card */
.sadc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.sadc-load-card {
  background: var(--bg-card);
  border: none;
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-card-primary);
}

.sadc-load-card:hover {
  transform: translateY(-2px);
  background: #ffffff;
  border-color: var(--brand-teal);
  box-shadow: 0 16px 32px -10px rgba(19, 78, 94, 0.2);
}

.sadc-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-teal);
  text-align: center;
}

.sadc-card-rate {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: -8px;
  border-bottom: 1px dashed var(--border-glass-hover);
  padding-bottom: 12px;
}

/* Horizontal Route lane */
.sadc-horizontal-route {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 1.2fr;
  align-items: center;
  text-align: center;
  padding: 8px 0;
}

.route-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.route-flag-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-card-primary);
}

.route-city-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.route-arrow-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
}

.route-arrow-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.route-distance-text {
  font-size: 0.7rem;
  font-weight: 700;
}

/* Simplified card footer indicators */
.sadc-card-indicators {
  display: flex;
  justify-content: space-around;
  background: rgba(255,255,255,0.4);
  border-radius: 8px;
  padding: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}

.indicator-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}


/* Premium Form Elements */
.input-label {
  font-size: 0.8rem;
  color: var(--text-card-primary);
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.input-field {
  width: 100%;
  background: #f9f9f9;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  padding: 12px;
  color: var(--text-card-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
}

.input-field:focus {
  border-color: var(--brand-teal);
  box-shadow: 0 0 12px var(--brand-teal-glow);
}

.input-field::placeholder {
  color: var(--text-muted);
}

/* Buttons System */
.btn-primary {
  background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-light) 100%);
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  color: var(--bg-card);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--brand-teal-glow);
  transition: var(--transition-spring);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(19, 78, 94, 0.3);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-glass-hover);
  border-radius: 12px;
  padding: 12px 24px;
  color: var(--brand-teal);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: var(--bg-cream-dark);
  border-color: var(--brand-teal);
}

/* Bids Review Section inside Loads */
.bids-drawer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-glass-hover);
}

.bid-item {
  background: var(--bg-cream-light);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition-smooth);
}

.bid-item:hover {
  border-color: var(--brand-teal);
  background: #ffffff;
}

.bid-row-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
}

.transporter-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.rating-badge {
  color: var(--brand-gold);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
}

.bid-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.bid-val {
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand-teal);
}

/* Modal Popup Window */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 28, 33, 0.7); /* translucent brand gray overlay */
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-panel {
  max-width: 980px; /* Expanded for high-fidelity 2-column cockpit */
  width: 100%;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-height: 92vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-panel {
  transform: translateY(0);
}

/* Two-column Cockpit grid for posting load details */
.modal-cockpit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media(min-width: 768px) {
  .modal-cockpit-grid {
    grid-template-columns: 1.6fr 1fr;
  }
}

.form-scroller {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-right: 8px;
}

.summary-sidebar {
  background: var(--bg-cream-light);
  border: 1px solid var(--border-glass-hover);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: fit-content;
  position: sticky;
  top: 0;
}

.summary-title-row {
  border-bottom: 2px solid var(--brand-gold);
  padding-bottom: 10px;
  margin-bottom: 8px;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.8rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--border-glass-hover);
  padding-bottom: 6px;
}

.summary-label {
  color: var(--text-secondary);
}

.summary-val {
  font-weight: 700;
  color: var(--text-card-primary);
}

.tips-card {
  background: var(--brand-teal-glow);
  border: 1px dashed var(--brand-teal);
  border-radius: 12px;
  padding: 16px;
  font-size: 0.75rem;
}

.tips-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-teal);
  font-weight: 700;
  margin-bottom: 8px;
}

.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-secondary);
}

.tips-list li::before {
  content: "• ";
  color: var(--brand-gold);
  font-weight: bold;
}


.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--brand-teal);
}

/* SADC Interactive mock Map visualization */
.sadc-map-panel {
  min-height: 280px;
  background: radial-gradient(circle at center, var(--brand-teal-glow) 0%, rgba(0, 0, 0, 0) 70%), var(--bg-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.sadc-map-svg {
  position: absolute;
  top: 10px;
  left: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 50px);
}

/* Form sections layout */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* Notification panel list */
.notification-card {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  gap: 12px;
  transition: var(--transition-smooth);
}

.notification-card:hover {
  background: var(--bg-cream-light);
}

.notification-card.unread {
  background: var(--brand-teal-glow);
  border-left: 3px solid var(--brand-teal);
}

.notification-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-teal);
  margin-bottom: 3px;
}

.notification-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.notification-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* PWA install prompt banner styles */
.pwa-banner {
  background: linear-gradient(135deg, var(--brand-teal-glow) 0%, var(--brand-gold-glow) 100%), var(--bg-card);
  border: 1px solid var(--border-glass-hover);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  animation: slideInUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideInUp {
  0% { transform: translateY(40px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.pwa-banner-text h4 {
  font-size: 1rem;
  color: var(--brand-teal);
  margin-bottom: 2px;
}

.pwa-banner-text p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.pwa-banner-actions {
  display: flex;
  gap: 10px;
}

/* Bottom Navigation Bar for Mobile */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(247, 245, 237, 0.95);
  backdrop-filter: blur(15px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-around;
  padding: 8px 12px 24px 12px;
  z-index: 100;
}

@media(min-width: 900px) {
  .bottom-nav {
    display: none;
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.nav-item.active {
  color: var(--brand-teal);
}

.nav-icon {
  font-size: 1.25rem;
}

/* Margin to account for bottom navigation */
.main-wrapper {
  flex: 1;
  padding-bottom: 80px; /* space for bottom nav */
}

@media(min-width: 900px) {
  .main-wrapper {
    padding-bottom: 24px;
  }
}

/* Breadcrumb Controls */
.breadcrumb-select {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-glass-hover);
  border-radius: 4px;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-card-primary);
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(19, 78, 94, 0.04);
}

.breadcrumb-search-btn {
  background: #dc2626; /* Crimson/red */
  border: none;
  border-radius: 4px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.breadcrumb-search-btn:hover {
  background: #b91c1c;
}

/* Custom Autocomplete suggestions dropdowns */
.autocomplete-suggestions-container {
  position: absolute;
  background: #ffffff;
  border: 1px solid var(--border-glass-hover);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: var(--shadow-card);
}

.autocomplete-suggestions-container div {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition-smooth);
  color: var(--text-card-primary);
}

.autocomplete-suggestions-container div:hover {
  background: var(--bg-cream-dark);
  color: var(--brand-teal);
}


/* --- Bank App Additions --- */

/* Splash Screen */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--gradient-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}
#splash-screen img {
  width: 80px;
  height: 80px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Login Screen */
#login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--gradient-main);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}
.login-card {
  background: var(--bg-card);
  padding: 32px;
  border-radius: 24px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  color: var(--text-card-primary);
  box-shadow: 0 16px 40px rgba(0,0,0,0.2);
}
.pin-dots {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 24px 0;
}
.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--brand-teal);
}
.pin-dot.filled {
  background: var(--gradient-main);
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.key-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  font-family: var(--font-display);
  color: var(--text-card-primary);
  padding: 16px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}
.key-btn:active {
  background: #f0f0f0;
}

/* Transaction List overrides */
.transaction-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.transaction-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--brand-teal);
}
.transaction-date {
  font-size: 0.75rem;
  color: var(--text-card-secondary);
}
.transaction-amount {
  font-weight: 800;
  font-size: 1.1rem;
  color: #121212;
}
.transaction-amount.positive {
  color: var(--info);
}

/* Make body background solid teal but cards white */
h2, h3, h4 { color: #ffffff; } /* Outside cards */
.glass-panel h2, .glass-panel h3, .glass-panel h4 { color: var(--brand-teal); }

/* Auth Additions */
#signup-screen, #reset-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--gradient-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.persona-card {
  border: 2px solid var(--border-glass-hover);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
}
.persona-card:hover {
  border-color: var(--brand-teal);
  background: var(--brand-teal-glow);
}
.persona-card h4 {
  color: var(--text-card-primary) !important;
  font-size: 1.2rem;
  margin-top: 8px;
}
.persona-card p {
  font-size: 0.8rem;
  color: var(--text-card-secondary);
}
.shake {
  animation: shake 0.4s;
}
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}


.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-success { background: rgba(52, 199, 89, 0.15); color: #28a745; }
.badge-warning { background: rgba(255, 149, 0, 0.15); color: #d35400; }
.badge-info { background: rgba(0, 122, 255, 0.15); color: #0056b3; }
.badge-purple { background: rgba(90, 34, 225, 0.15); color: #5A22E1; }
.badge-gray { background: rgba(0, 0, 0, 0.05); color: #5e5e5e; }

.btn-primary {
  background: var(--gradient-main);
  box-shadow: 0 8px 24px rgba(90, 34, 225, 0.3);
  color: #fff;
  border: none;
  font-weight: 700;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(90, 34, 225, 0.4);
}
.bottom-nav {
  background: rgba(255,255,255,0.9) !important;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0,0,0,0.05);
}
.nav-btn { color: #888888; }
.nav-btn.active { color: #5A22E1; }


/* Responsive Web/Desktop Constraints */
@media screen and (min-width: 768px) {
  body {
    background-color: #e8eef3; /* Darker frame background for desktop */
    display: flex;
    justify-content: center;
  }
  
  body > * {
    /* Instead of full width, constrain the main app elements */
  }

  /* Target the main container elements that are direct children of body or the main wrappers */
  #splash-screen,
  #app-content,
  .bottom-nav {
    max-width: 600px;
    margin: 0 auto;
    left: 0;
    right: 0;
  }
  
  #app-content {
    background-color: var(--bg-cream-light);
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0,0,0,0.05);
    position: relative;
  }
  
  .bottom-nav {
    position: fixed; /* Still fixed, but its width and left/right margins constrain it to the cockpit */
    box-shadow: 0 -4px 30px rgba(0,0,0,0.04);
  }
}
