﻿/* ============================================
   ESTILOS GENERALES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: linear-gradient(135deg, #1a237e, #0d47a1);
    color: white;
    padding: 25px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

    .header h1 {
        font-size: 28px;
        font-weight: 700;
    }

    .header p {
        font-size: 14px;
        opacity: 0.8;
        margin-top: 5px;
    }

.status {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
}

    .status .dot {
        display: inline-block;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #4caf50;
        margin-right: 8px;
        animation: pulse 1.5s infinite;
    }

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   OCULTAR TABS ORIGINALES
   ============================================ */
.tabs {
    display: none !important;
}

/* ============================================
   BOTONES DE NAVEGACIÓN SUPERIOR - MEJORADO
   ============================================ */
.botones-navegacion {
    background: linear-gradient(135deg, #1a237e, #0d47a1);
    padding: 16px 24px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 6px 25px rgba(26, 35, 126, 0.35);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    border: none;
    position: relative;
    overflow: hidden;
}

    .botones-navegacion::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #ff6f00, #ffab00, #ff6f00);
        background-size: 200% 100%;
        animation: brillo 3s ease-in-out infinite;
    }

@keyframes brillo {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.botones-navegacion button {
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    backdrop-filter: blur(4px);
    position: relative;
    letter-spacing: 0.3px;
}

    .botones-navegacion button .icono {
        margin-right: 8px;
        font-size: 16px;
    }

    .botones-navegacion button:hover {
        background: rgba(255, 255, 255, 0.20);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    }

    .botones-navegacion button.active {
        background: white;
        color: #1a237e;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
        transform: translateY(-2px);
    }

        .botones-navegacion button.active::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 50%;
            transform: translateX(-50%);
            width: 30px;
            height: 3px;
            background: #ffab00;
            border-radius: 4px;
        }

/* ============================================
   TAB CONTENT
   ============================================ */
.tab-content {
    display: none;
}

    .tab-content.active {
        display: block;
    }

.panel {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

    .panel h2 {
        color: #1a237e;
        margin-bottom: 20px;
        font-size: 22px;
    }

/* ============================================
   FORM CARDS
   ============================================ */
.form-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

    .form-card h3 {
        color: #333;
        margin-bottom: 15px;
        font-size: 17px;
    }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

    .form-group label {
        font-size: 13px;
        font-weight: 600;
        color: #555;
        margin-bottom: 5px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        border: 1px solid #dde1e6;
        border-radius: 6px;
        font-size: 14px;
        transition: border-color 0.3s;
    }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #1a237e;
            box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
        }

    .form-group textarea {
        resize: vertical;
        min-height: 60px;
    }

    .form-group small {
        color: #999;
        font-size: 12px;
        margin-top: 4px;
    }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    background: #1a237e;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

    .btn-primary:hover {
        background: #0d47a1;
    }

.btn-success {
    background: #2e7d32;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

    .btn-success:hover {
        background: #1b5e20;
    }

.btn-danger {
    background: #c62828;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

    .btn-danger:hover {
        background: #b71c1c;
    }

/* ============================================
   LIST CARDS
   ============================================ */
.list-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

    .list-card h3 {
        color: #333;
        margin-bottom: 15px;
        font-size: 17px;
    }

    .list-card .loading,
    .empty {
        color: #999;
        text-align: center;
        padding: 30px;
    }

/* ============================================
   TABLA DE DATOS
   ============================================ */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

    table thead {
        background: #1a237e;
        color: white;
    }

    table th {
        padding: 12px 15px;
        text-align: left;
        font-weight: 600;
    }

    table td {
        padding: 10px 15px;
        border-bottom: 1px solid #e9ecef;
    }

    table tbody tr:hover {
        background: #f8f9fa;
    }

/* ============================================
   RESULT CARD
   ============================================ */
.result-card {
    background: #e8f5e9;
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #2e7d32;
    margin-top: 20px;
}

    .result-card h3 {
        color: #1a237e;
        margin-bottom: 15px;
    }

    .result-card pre {
        background: #f5f5f5;
        padding: 15px;
        border-radius: 8px;
        font-family: monospace;
        font-size: 12px;
        white-space: pre-wrap;
        max-height: 300px;
        overflow-y: auto;
        border: 1px solid #ddd;
    }

/* ============================================
   TOAST
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

.toast-success {
    background: #2e7d32;
}

.toast-error {
    background: #c62828;
}

.toast-info {
    background: #0d47a1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

        .header h1 {
            font-size: 22px;
        }

    .status {
        margin-top: 10px;
    }

    .botones-navegacion {
        padding: 12px 16px;
        border-radius: 12px;
        gap: 5px;
    }

        .botones-navegacion button {
            padding: 8px 14px;
            font-size: 12px;
            border-radius: 8px;
        }

            .botones-navegacion button .icono {
                font-size: 14px;
                margin-right: 5px;
            }

    .form-row {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 15px;
    }

    table {
        font-size: 12px;
    }

        table th,
        table td {
            padding: 8px 10px;
        }

    .toast {
        min-width: 200px;
        font-size: 13px;
        padding: 12px 18px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 18px;
    }

    .botones-navegacion {
        padding: 10px 10px;
        gap: 4px;
        border-radius: 10px;
    }

        .botones-navegacion button {
            padding: 6px 10px;
            font-size: 10px;
            border-radius: 6px;
        }

            .botones-navegacion button .icono {
                font-size: 12px;
                margin-right: 3px;
            }
}
/* ============================================
   ESTILOS PARA REPORTE DE BUSES
   ============================================ */
#resultadoReporteBuses {
    margin-top: 15px;
}

    #resultadoReporteBuses .reporte-header {
        background: linear-gradient(135deg, #e3f2fd, #bbdefb);
        padding: 20px;
        border-radius: 12px;
        margin-bottom: 20px;
    }

        #resultadoReporteBuses .reporte-header h3 {
            color: #1a237e;
            margin-bottom: 15px;
        }

    #resultadoReporteBuses .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

        #resultadoReporteBuses .stats-grid .stat-card {
            background: white;
            padding: 15px;
            border-radius: 8px;
            text-align: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

            #resultadoReporteBuses .stats-grid .stat-card .number {
                font-size: 28px;
                font-weight: 700;
            }

            #resultadoReporteBuses .stats-grid .stat-card .label {
                font-size: 13px;
                color: #666;
            }

    #resultadoReporteBuses .stat-blue .number {
        color: #1a237e;
    }

    #resultadoReporteBuses .stat-green .number {
        color: #2e7d32;
    }

    #resultadoReporteBuses .stat-orange .number {
        color: #e65100;
    }
/* Forzar visibilidad del formulario de pago de bus */
#formularioPagoBus {
    display: none;
}

    #formularioPagoBus.visible {
        display: block !important;
    }