/* ==============================================================================
   SMART MOBILITY ICA — SISTEMA DE DISEÑO OFICIAL (V2 SENIOR ARCHITECTURE)
   Paleta Oficial del PDF:
   - Primario:    #0F766E (Teal Oscuro)
   - Fondo:       #0F172A (Slate 900)
   - Tarjetas:    #1E293B (Slate 800)
   - Controles:   #334155 (Slate 700)
   - Acción:      #14B8A6 (Teal Vibrante)
   - Advertencia: #F59E0B (Ámbar / Precio Económico)
   - Blanco:      #FFFFFF
   ============================================================================== */

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

:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Paleta Oficial Smart Mobility Ica según PDF */
  --primary: #0f766e;
  --primary-hover: #115e59;
  --primary-glow: rgba(15, 118, 110, 0.4);
  
  --accent-action: #14b8a6;
  --accent-action-hover: #0d9488;
  --accent-glow: rgba(20, 184, 166, 0.4);

  --secondary-success: #10b981;
  --warning-amber: #f59e0b;
  --danger: #ef4444;
  --yape-purple: #742284;

  /* Estructura de Fondos y Superficies */
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-surface: #334155;
  --bg-glass: rgba(30, 41, 59, 0.85);
  
  --border-color: rgba(255, 255, 255, 0.10);
  --border-active: rgba(20, 184, 166, 0.5);

  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(20, 184, 166, 0.25);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, .brand-font {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* Smartphone Layout Frame */
.phone-viewport {
  max-width: 440px;
  height: 100vh;
  margin: 0 auto;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Header */
.phone-header {
  padding: 14px 18px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 500;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

.badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Botón Navegación Inicio */
.btn-nav-home {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #e2e8f0;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-nav-home:hover {
  background: rgba(20, 184, 166, 0.2);
  border-color: var(--accent-action);
  color: #fff;
}

/* Map Canvas Container */
.map-canvas {
  flex: 1;
  width: 100%;
  position: relative;
  z-index: 10;
}

/* Bottom Sheet Clean Floating */
.bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 16px 20px 24px;
  z-index: 100;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
  max-height: 82%;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Buttons */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-action) 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

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

.btn-action-large {
  background: #14b8a6;
  color: #0f172a;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 18px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
  transition: transform 0.15s ease;
}

.btn-action-large:active {
  transform: scale(0.98);
}

.btn-reject-large {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 100%;
}

/* Glass inputs */
.glass-input-group {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 8px;
}

.glass-input-group label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  display: block;
}

.glass-select {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.glass-select option {
  background: #1e293b;
  color: #ffffff;
}

/* Dual Pricing Box (PDF Style) */
.dual-pricing-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

.price-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.price-card.active-rec {
  border-color: #14b8a6;
  background: rgba(20, 184, 166, 0.15);
  box-shadow: 0 0 14px rgba(20, 184, 166, 0.2);
}

.price-card.active-eco {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}

/* Modo Tabs */
.mode-selector {
  display: flex;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 12px;
  gap: 4px;
}

.mode-tab {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-tab.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* Driver card item in bids/candidates */
.driver-card-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.score-badge {
  background: rgba(20, 184, 166, 0.2);
  color: #5eead4;
  border: 1px solid var(--accent-action);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
}

.pill-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn.active {
  background: var(--primary);
  border-color: var(--accent-action);
}

.pill-btn.active-yape {
  background: var(--yape-purple);
  border-color: #d8b4fe;
  color: #fff;
}

/* ==============================================================================
   GLOBAL RESPONSIVE SYSTEM (MOBILE FIRST / ALL SCREENS)
   ============================================================================== */
.audit-docs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .table-responsive-cards thead {
    display: none !important;
  }
  .table-responsive-cards, 
  .table-responsive-cards tbody, 
  .table-responsive-cards tr, 
  .table-responsive-cards td {
    display: block !important;
    width: 100% !important;
  }
  .table-responsive-cards tr {
    background: #1e293b !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    margin-bottom: 14px !important;
    padding: 14px 16px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
  }
  .table-responsive-cards td {
    padding: 6px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  }
  .table-responsive-cards td:last-child {
    border-bottom: none !important;
    padding-top: 10px !important;
  }
  
  .form-row-2 {
    grid-template-columns: 1fr !important;
  }
  
  .audit-docs-grid {
    grid-template-columns: 1fr !important;
  }
  
  .modal-card {
    width: 96% !important;
    max-width: 96% !important;
    padding: 16px 14px !important;
    margin: 8px !important;
  }
}
