/* ============================================
   CSS RESPONSIVE GLOBAL - TAXI 428000
   Adaptado para móviles y notebooks
   ============================================ */

/* Variables CSS para breakpoints */
:root {
    --breakpoint-xs: 0;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-xxl: 1400px;
}

/* ============================================
   UTILIDADES RESPONSIVE GENERALES
   ============================================ */

/* Contenedores principales */
.container,
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Padding y márgenes responsive */
@media (max-width: 767.98px) {
    .container,
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    main {
        padding: 1rem !important;
    }
    
    .main-content {
        padding-top: 1rem !important;
    }
}

/* ============================================
   NAVEGACIÓN RESPONSIVE
   ============================================ */

/* Navbar responsive */
.navbar {
    padding: 0.5rem 1rem;
}

@media (max-width: 991.98px) {
    .navbar-brand {
        font-size: 1rem !important;
    }
    
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Ajustar badges en navbar */
    .admin-badge,
    .driver-badge,
    .passenger-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Navbar toggler mejorado */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* ============================================
   CARDS Y TARJETAS RESPONSIVE
   ============================================ */

.card,
.dashboard-card,
.status-card,
.trip-card {
    margin-bottom: 1rem;
}

@media (max-width: 767.98px) {
    .card,
    .dashboard-card,
    .status-card,
    .trip-card {
        margin-bottom: 0.75rem;
        border-radius: 8px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
}

/* Grid de cards responsive */
@media (max-width: 575.98px) {
    .row > [class*="col-"] {
        margin-bottom: 1rem;
    }
    
    /* Cards de estadísticas en móvil */
    .col-md-3,
    .col-md-4,
    .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* ============================================
   TABLAS RESPONSIVE
   ============================================ */

.table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

@media (max-width: 767.98px) {
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }
    
    /* Ocultar columnas menos importantes en móvil */
    .table .d-none-mobile {
        display: none !important;
    }
    
    /* Hacer tablas más compactas */
    .table-sm th,
    .table-sm td {
        padding: 0.375rem 0.25rem;
    }
}

/* Tablas con scroll horizontal en móvil */
@media (max-width: 575.98px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================
   FORMULARIOS RESPONSIVE
   ============================================ */

.form-control,
.form-select {
    font-size: 1rem;
}

@media (max-width: 767.98px) {
    .form-control,
    .form-select {
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .input-group {
        flex-wrap: wrap;
    }
    
    .input-group-text {
        font-size: 0.875rem;
    }
}

/* Botones responsive */
.btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Botones en grupos */
    .btn-group-vertical .btn {
        width: 100%;
    }
    
    .d-grid .btn {
        width: 100%;
    }
}

/* ============================================
   MAPAS RESPONSIVE
   ============================================ */

#map,
#realMap,
.map-container,
.map-placeholder {
    width: 100%;
    border-radius: 8px;
}

@media (max-width: 767.98px) {
    #map,
    #realMap {
        height: 300px !important;
        min-height: 300px;
    }
    
    .map-container {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .map-placeholder {
        height: 300px;
    }
}

@media (max-width: 575.98px) {
    #map,
    #realMap {
        height: 250px !important;
        min-height: 250px;
    }
}

/* Controles de mapa responsive */
.leaflet-control {
    font-size: 0.875rem;
}

@media (max-width: 767.98px) {
    .leaflet-control {
        font-size: 0.75rem;
    }
    
    .leaflet-control-zoom {
        margin: 10px !important;
    }
    
    .leaflet-control-zoom a {
        width: 30px;
        height: 30px;
        line-height: 30px;
    }
}

/* ============================================
   DASHBOARDS RESPONSIVE
   ============================================ */

/* Estadísticas y métricas */
.stats-value {
    font-size: 2rem;
}

.stats-label {
    font-size: 0.9rem;
}

@media (max-width: 767.98px) {
    .stats-value {
        font-size: 1.5rem;
    }
    
    .stats-label {
        font-size: 0.8rem;
    }
    
    .card-icon {
        font-size: 2rem !important;
    }
}

@media (max-width: 575.98px) {
    .stats-value {
        font-size: 1.25rem;
    }
    
    .stats-label {
        font-size: 0.75rem;
    }
    
    .card-icon {
        font-size: 1.75rem !important;
    }
}

/* ============================================
   HEADERS Y TÍTULOS RESPONSIVE
   ============================================ */

h1.display-5 {
    font-size: 2.5rem;
}

h1.display-4 {
    font-size: 3rem;
}

@media (max-width: 767.98px) {
    h1.display-5 {
        font-size: 1.75rem;
    }
    
    h1.display-4 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    h1.display-5 {
        font-size: 1.5rem;
    }
    
    h1.display-4 {
        font-size: 1.75rem;
    }
}

/* ============================================
   MODALES RESPONSIVE
   ============================================ */

.modal-dialog {
    margin: 1rem;
}

@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 8px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* ============================================
   NOTIFICACIONES RESPONSIVE
   ============================================ */

.notification-container {
    max-width: 350px;
}

@media (max-width: 767.98px) {
    .notification-container {
        left: 10px;
        right: 10px;
        max-width: none;
        top: 10px;
    }
    
    .notification-item {
        padding: 12px;
        font-size: 0.875rem;
    }
    
    .notification-popup {
        left: 10px;
        right: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* ============================================
   FOOTER RESPONSIVE
   ============================================ */

footer,
.modern-footer {
    padding: 1rem;
    font-size: 0.875rem;
}

@media (max-width: 767.98px) {
    footer,
    .modern-footer {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    footer .row > div {
        text-align: center !important;
        margin-bottom: 0.5rem;
    }
}

/* ============================================
   ESPECÍFICO: DASHBOARD CONDUCTOR
   ============================================ */

@media (max-width: 767.98px) {
    .main-container {
        margin: 10px !important;
        border-radius: 10px;
    }
    
    .header {
        padding: 1rem !important;
    }
    
    .status-selector {
        padding: 1rem !important;
    }
    
    .status-option {
        min-height: 45px;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .main-action-btn {
        padding: 0.875rem 1rem !important;
        min-height: 55px;
        font-size: 0.9rem;
    }
    
    .trip-notification {
        padding: 1.5rem !important;
    }
}

/* ============================================
   ESPECÍFICO: DASHBOARD PASAJERO
   ============================================ */

@media (max-width: 767.98px) {
    .trip-request-form {
        padding: 1.5rem !important;
    }
    
    .location-input input {
        padding: 0.875rem 0.875rem 0.875rem 2.5rem;
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .eta-display {
        padding: 0.875rem;
    }
    
    .eta-time {
        font-size: 1.5rem;
    }
    
    .driver-info {
        padding: 0.875rem;
    }
    
    .driver-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* ============================================
   ESPECÍFICO: BOTÓN DE NAVEGACIÓN INFERIOR (DRIVER)
   ============================================ */

.driver-bottom-nav {
    padding: 8px 0;
}

@media (max-width: 767.98px) {
    .driver-bottom-nav {
        padding: 10px 0;
    }
    
    .driver-bottom-nav .nav-item {
        font-size: 0.75rem;
    }
    
    .driver-bottom-nav .nav-item i {
        font-size: 1.1rem;
    }
}

/* ============================================
   UTILIDADES ADICIONALES
   ============================================ */

/* Ocultar elementos en móvil */
@media (max-width: 767.98px) {
    .d-none-mobile {
        display: none !important;
    }
}

/* Mostrar solo en móvil */
@media (min-width: 768px) {
    .d-mobile-only {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .d-mobile-only {
        display: block !important;
    }
}

/* Texto truncado en móvil */
@media (max-width: 767.98px) {
    .text-truncate-mobile {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
}

/* Imágenes responsive */
img {
    max-width: 100%;
    height: auto;
}

.vehicle-img,
.card-img-top {
    width: 100%;
    height: auto;
    object-fit: cover;
}

@media (max-width: 767.98px) {
    .vehicle-img {
        max-height: 200px;
    }
}

/* Badges responsive */
.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

@media (max-width: 575.98px) {
    .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Alerts responsive */
.alert {
    padding: 0.75rem 1rem;
}

@media (max-width: 767.98px) {
    .alert {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   MEJORAS DE ACCESIBILIDAD Y UX
   ============================================ */

/* Áreas táctiles mínimas */
@media (max-width: 767.98px) {
    a,
    button,
    .btn,
    .nav-link {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Scroll suave */
@media (max-width: 767.98px) {
    html {
        -webkit-overflow-scrolling: touch;
    }
    
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Prevenir zoom en inputs en iOS */
@media (max-width: 767.98px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* ============================================
   ESPECÍFICO: TABLAS DE GESTIÓN
   ============================================ */

@media (max-width: 767.98px) {
    /* Tablas de vehículos */
    .vehicle-card {
        margin-bottom: 1rem;
    }
    
    /* Tablas de viajes */
    .trip-card {
        margin-bottom: 1rem;
    }
    
    .trip-route {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .route-arrow {
        transform: rotate(90deg);
    }
    
    /* Filtros */
    .filter-section {
        padding: 1rem !important;
    }
    
    .filter-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* ============================================
   ESPECÍFICO: FORMULARIOS DE BÚSQUEDA
   ============================================ */

@media (max-width: 767.98px) {
    .input-group {
        flex-direction: column;
    }
    
    .input-group > .form-control,
    .input-group > .form-select,
    .input-group > .btn {
        width: 100%;
        border-radius: 0.375rem;
        margin-bottom: 0.5rem;
    }
    
    .input-group > .form-control:first-child,
    .input-group > .form-select:first-child {
        border-top-right-radius: 0.375rem;
        border-bottom-right-radius: 0.375rem;
    }
}

/* ============================================
   ESPECÍFICO: PANEL DE ADMINISTRACIÓN
   ============================================ */

@media (max-width: 991.98px) {
    /* Grid de estadísticas en tablet */
    .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 575.98px) {
    /* Grid de estadísticas en móvil */
    .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ============================================
   ESPECÍFICO: CONEXIÓN WEBSOCKET STATUS
   ============================================ */

.connection-status {
    font-size: 0.75rem;
    padding: 6px 10px;
}

@media (max-width: 767.98px) {
    .connection-status {
        bottom: 10px;
        right: 10px;
        font-size: 0.7rem;
        padding: 5px 8px;
    }
}

/* ============================================
   ESPECÍFICO: SIDEBARS (OWNER, BASE)
   ============================================ */

.sidebar {
    transition: left 0.3s ease;
}

@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100vh;
        z-index: 1000;
        overflow-y: auto;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 1rem !important;
    }
    
    .sidebar-header {
        padding: 1rem !important;
    }
    
    .sidebar-header h4 {
        font-size: 1.1rem;
    }
    
    .user-info {
        padding: 0.75rem !important;
        margin: 0.75rem !important;
    }
    
    .sidebar .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0.75rem !important;
        font-size: 0.9rem;
    }
    
    .logout-btn {
        margin: 0.75rem !important;
    }
}

@media (max-width: 575.98px) {
    .sidebar {
        width: 220px;
    }
    
    .sidebar-header h4 {
        font-size: 1rem;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Botón de menú móvil */
.d-md-none .btn {
    min-height: 44px;
    padding: 0.5rem 1rem;
}

/* ============================================
   ESPECÍFICO: NAVBAR OPERADOR
   ============================================ */

@media (max-width: 991.98px) {
    .operator-subtext {
        display: none;
    }
    
    .navbar-brand {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 767.98px) {
    header {
        padding: 0.75rem !important;
    }
    
    .operator-quick-nav {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .operator-quick-nav .nav-link {
        width: 100%;
        text-align: left;
    }
}

/* ============================================
   ESPECÍFICO: EMERGENCIAS
   ============================================ */

@media (max-width: 767.98px) {
    .emergency-notification {
        margin-bottom: 0.75rem;
    }
    
    .emergency-notification .alert-heading {
        font-size: 0.9rem;
    }
}

/* ============================================
   MEJORAS ADICIONALES PARA RESPONSIVE COMPLETO
   ============================================ */

/* Top bar responsive */
@media (max-width: 767.98px) {
    .d-flex.justify-content-between.flex-wrap {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-toolbar {
        width: 100%;
        justify-content: flex-start;
    }
    
    .btn-group {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .btn-group .btn {
        flex: 1 1 auto;
        min-width: 0;
    }
    
    h1.h2, h2 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem;
    }
}

/* Cards de estadísticas responsive */
@media (max-width: 991.98px) {
    .row .col-md-3,
    .row .col-md-4 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 575.98px) {
    .card.stats-card,
    .card.bg-info,
    .card.bg-success,
    .card.bg-warning,
    .card.bg-danger {
        margin-bottom: 0.75rem;
    }
    
    .card-body.py-2 {
        padding: 1rem !important;
    }
    
    .card-body h4 {
        font-size: 1.5rem;
    }
    
    .card-body small {
        font-size: 0.75rem;
    }
}

/* Filtros y búsqueda responsive */
@media (max-width: 767.98px) {
    .filter-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-buttons .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group > * {
        width: 100% !important;
        border-radius: 0.375rem !important;
        margin-bottom: 0.5rem;
    }
    
    .input-group > :first-child {
        border-top-right-radius: 0.375rem !important;
        border-bottom-right-radius: 0.375rem !important;
    }
}

/* Tablas mejoradas para móvil - Solo para tablas con data-label */
@media (max-width: 767.98px) {
    .table-responsive {
        border: none;
    }
    
    /* Tablas con clase table-mobile-cards se convierten en cards */
    .table-mobile-cards thead {
        display: none;
    }
    
    .table-mobile-cards tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 0.75rem;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .table-mobile-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .table-mobile-cards tbody td:last-child {
        border-bottom: none;
    }
    
    .table-mobile-cards tbody td[data-label]::before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 1rem;
        color: #6c757d;
        flex-shrink: 0;
    }
    
    /* Si no tiene data-label, usar el texto del th correspondiente (requiere JS) */
    .table-mobile-cards tbody td:not([data-label])::before {
        content: attr(data-th);
        font-weight: bold;
        margin-right: 1rem;
        color: #6c757d;
        flex-shrink: 0;
    }
}

/* Mejorar visualización de tablas en móvil con cards */
@media (max-width: 767.98px) {
    .table-card-view {
        display: block;
    }
    
    .table-card-view thead {
        display: none;
    }
    
    .table-card-view tbody tr {
        display: block;
        margin-bottom: 1rem;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        padding: 1rem;
    }
    
    .table-card-view tbody td {
        display: block;
        padding: 0.5rem 0;
        border: none;
        text-align: left;
    }
    
    .table-card-view tbody td::before {
        content: attr(data-label) ": ";
        font-weight: bold;
        color: #6c757d;
    }
}

/* Formularios complejos responsive */
@media (max-width: 767.98px) {
    .row.g-2,
    .row.g-3 {
        margin: 0;
    }
    
    .row.g-2 > [class*="col-"],
    .row.g-3 > [class*="col-"] {
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row > [class*="col-"] {
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* Modales mejorados para móvil */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.25rem;
    }
    
    .modal-content {
        border-radius: 0;
        min-height: calc(100vh - 0.5rem);
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    
    .modal-title {
        font-size: 1.1rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }
}

/* Mejoras para dispatch y mapas */
@media (max-width: 767.98px) {
    .dispatch-container {
        height: auto !important;
        min-height: auto !important;
    }
    
    .dispatch-sidebar {
        height: auto !important;
        max-height: 400px;
        margin-bottom: 1rem;
    }
    
    .dispatch-map {
        height: 300px !important;
        min-height: 300px !important;
    }
    
    #dispatch-map {
        height: 300px !important;
        min-height: 300px !important;
    }
    
    /* Panel flotante de conductores en móvil */
    .position-absolute[style*="top: 10px"] {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        width: 100% !important;
        max-height: none !important;
        margin-bottom: 1rem;
    }
}

/* Mejoras para trips management */
@media (max-width: 767.98px) {
    .trips-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Hacer cards de viajes más compactas */
    .trip-request-card,
    .trip-card {
        margin-bottom: 0.75rem;
        padding: 0.75rem;
    }
    
    .trip-request-card .card-body {
        padding: 0.75rem !important;
    }
    
    /* Botones de acción en móvil */
    .trip-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .trip-actions .btn {
        width: 100%;
    }
}

/* Mejoras para páginas de gestión (vehículos, conductores, etc.) */
@media (max-width: 767.98px) {
    /* Cards de vehículos/conductores */
    .vehicle-card,
    .driver-card {
        margin-bottom: 1rem;
    }
    
    .vehicle-card .card-body,
    .driver-card .card-body {
        padding: 1rem;
    }
    
    /* Información en dos columnas -> una columna */
    .vehicle-info,
    .driver-info {
        flex-direction: column;
    }
    
    .vehicle-info > div,
    .driver-info > div {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Botones de acción */
    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

/* Mejoras para dashboard de pasajero */
@media (max-width: 767.98px) {
    .trip-request-form {
        padding: 1rem !important;
    }
    
    .location-input {
        margin-bottom: 1rem;
    }
    
    .location-input input {
        font-size: 16px; /* Evita zoom en iOS */
        padding: 0.875rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .action-buttons .btn {
        width: 100%;
        padding: 0.875rem;
        font-size: 1rem;
    }
}

/* Mejoras para dashboard de conductor */
@media (max-width: 767.98px) {
    .status-selector {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .status-option {
        width: 100%;
        padding: 1rem;
    }
    
    .main-action-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .trip-notification {
        padding: 1rem;
        margin: 1rem 0;
    }
}

/* Mejoras para reportes y gráficos */
@media (max-width: 767.98px) {
    .chart-container {
        height: 250px !important;
    }
    
    .report-filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .report-filters > * {
        width: 100%;
    }
}

/* Utilidades adicionales */
@media (max-width: 767.98px) {
    /* Espaciado reducido */
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .mt-4 {
        margin-top: 1.5rem !important;
    }
    
    .mt-3 {
        margin-top: 1rem !important;
    }
    
    /* Padding reducido */
    .p-4 {
        padding: 1rem !important;
    }
    
    .p-3 {
        padding: 0.75rem !important;
    }
    
    /* Texto más pequeño pero legible */
    .small {
        font-size: 0.8rem;
    }
    
    /* Breadcrumbs más compactos */
    .breadcrumb {
        font-size: 0.875rem;
        padding: 0.5rem 0;
    }
}

/* Mejoras de accesibilidad táctil */
@media (max-width: 767.98px) {
    /* Asegurar que todos los elementos interactivos sean fáciles de tocar */
    a, button, .btn, input[type="button"], input[type="submit"], 
    .nav-link, .card-link, .dropdown-item {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Inputs más grandes en móvil */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    textarea,
    select {
        min-height: 44px;
        padding: 0.75rem;
    }
}

/* ============================================
   PRINT STYLES (OPCIONAL)
   ============================================ */

@media print {
    .navbar,
    footer,
    .btn,
    .driver-bottom-nav,
    .sidebar,
    .sidebar-overlay {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
}

