/* Reset y estilos generales */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    flex: 1;
}

/* Header y navegación */
header {
    margin-bottom: 30px;
}

h1 {
    color: #b72d74;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    color: #74214c;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 20px;
}

.nav-menu li {
    flex: 1;
}

.nav-menu a {
    display: block;
    color: #74214c;
    text-decoration: none;
    padding: 12px 15px;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.nav-menu a:hover {
    background-color: #f5f5f5;
    color: #b72d74;
}

.nav-menu a.active {
    background-color: #b72d74;
    color: white;
    border-bottom: 3px solid #74214c;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #b72d74;
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus {
    border-color: #b72d74;
    outline: none;
    box-shadow: 0 0 0 2px #74214c;
}

input[type="file"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px dashed #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}

button,
.btn {
    background-color: #b72d74;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

button:hover,
.btn:hover {
    background-color: #b72d74;
}

.btn-primary {
    background-color: #b71274;
}

.btn-secondary {
    background-color: #721c24;
}

.btn-success {
    background-color: #b71274;
}

.btn-danger {
    background-color: #dc3545;
}

/* Alertas */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 5px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Autenticación */
.auth-form {
    background-color: white;
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #b72d74;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.auth-links a {
    color: #b71274;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Listas y tablas */
.maps-list,
.routes-list {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #721c24;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f8f9fa;
}

/* Creación de ruta */
.create-route {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.create-route h2 {
    margin-bottom: 25px;
    color: #4a90e2;
}

small {
    display: block;
    color: #721c24;
    margin-top: 5px;
    font-size: 0.85rem;
}

/* Loader para procesamiento */
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin-bottom: 20px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #b72d74;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Vista de mapa */
.map-view-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.map-info {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #495057;
    text-align: center;
}

.map-container {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.map-container iframe {
    border: none;
}

.btn-navigate {
    background-color: #28a745;
    color: white;
}

.btn-navigate:hover {
    background-color: #218838;
}

/* Mensajes de no contenido */
.no-maps,
.no-routes {
    text-align: center;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    color: #6c757d;
}

.no-maps a,
.no-routes a {
    color: #b71274;
    text-decoration: none;
}

.no-maps a:hover,
.no-routes a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    margin-top: 40px;
    text-align: center;
    color: #b71274;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
    }

    .nav-menu li {
        flex: none;
    }

    .nav-menu a {
        border-bottom: 1px solid #eee;
    }

    .nav-menu a.active {
        border-bottom: 1px solid #eee;
        border-left: 5px solid #b71274;
    }

    th,
    td {
        padding: 8px 10px;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid #eee;
        margin-bottom: 10px;
    }

    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

    td:before {
        position: absolute;
        top: 12px;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        content: attr(data-label);
        text-align: left;
    }
}

/* Agregar estos estilos al archivo styles.css */

/* Estilos para gestión de vehículos */
.admin-panel {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.admin-panel h2 {
    color: #4a90e2;
    margin-bottom: 20px;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 15px;
}

.vehicles-list {
    margin-top: 20px;
}

.no-items {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-style: italic;
}

.form-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

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

.btn-edit,
.btn-delete {
    padding: 5px 10px;
    font-size: 14px;
}

.btn-edit {
    background-color: #ffc107;
    color: #212529;
}

.btn-edit:hover {
    background-color: #e0a800;
}

.btn-delete {
    background-color: #dc3545;
}

.btn-delete:hover {
    background-color: #c82333;
}

.admin-note {
    color: #6c757d;
    margin-bottom: 20px;
    text-align: center;
    font-style: italic;
}

/* Mejorar diseño responsivo para tablas */
@media (max-width: 768px) {
    .vehicles-list td:before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.85em;
    }

    .vehicles-list table,
    .vehicles-list thead,
    .vehicles-list tbody,
    .vehicles-list th,
    .vehicles-list td,
    .vehicles-list tr {
        display: block;
    }

    .vehicles-list thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .vehicles-list tr {
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 5px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .vehicles-list td {
        position: relative;
        padding-left: 50%;
        text-align: right;
        min-height: 35px;
        border-bottom: 1px solid #eee;
    }

    .vehicles-list td:last-child {
        border-bottom: none;
    }

    .vehicle-actions {
        justify-content: flex-end;
    }
}

/* Añadir al archivo styles.css */

/* Estilos para gestión de usuarios */
.users-list table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-admin {
    background-color: #b71274;
    color: white;
}

.badge-driver {
    background-color: #28a745;
    color: white;
}

.map-details {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.actions {
    display: flex;
    gap: 5px;
}

.delete-form {
    display: inline-block;
}

.btn-add {
    margin-bottom: 20px;
}

/* Mejoras para la visualización en móviles */
@media (max-width: 576px) {
    .actions {
        flex-direction: column;
        gap: 5px;
    }

    .actions .btn {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Estilos para confirmación de eliminación */
.warning-panel h3 {
    color: #856404;
    margin-top: 0;
    margin-bottom: 10px;
}

/* Mejoras para formularios */
small {
    color: #6c757d;
    font-size: 0.8rem;
    display: block;
    margin-top: 5px;
}

/* Mejoras para la página de usuarios */
.admin-panel {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.admin-panel h2 {
    color: #4a90e2;
    margin-bottom: 20px;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 15px;
}

/* Agregar estos estilos al archivo styles.css */

.admin-quick-links {
    margin-bottom: 30px;
}

.admin-quick-links h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.quick-link-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.card-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #4a90e2;
    font-size: 1.1rem;
}

.card-desc {
    color: #6c757d;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .quick-links-grid {
        grid-template-columns: 1fr;
    }
}