:root {
    --azul-oscuro: #0A2A5E;       /* Azul noche */
    --azul-medio: #1A3F7A;        /* Azul rey (perfecto para botones) */
    --azul-claro: #2C5BA8;        /* Azul claro para encabezados */
    --blanco: #FFFFFF;
    --gris-fondo: #F4F6F9;
    --texto: #333333;
    --gris-claro: #E9ECEF;
    --gris-medio: #CED4DA;
    --rojo: #DC3545;
    --verde: #28A745;
    --amarillo: #FFC107;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset y cuerpo */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--gris-fondo);
    color: var(--texto);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

/* Navbar - Encabezado */
.navbar {
    background-color: var(--azul-oscuro) !important;
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
    color: var(--blanco) !important;
}

.navbar-text {
    color: var(--blanco) !important;
    font-size: 0.9rem;
}

/* Botones */
.btn {
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    padding: 8px 16px;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--azul-medio) !important;
    color: var(--blanco) !important;
    border: none;
}

.btn-primary:hover {
    background-color: #153366 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(26, 63, 122, 0.2);
}

.btn-secondary {
    background-color: var(--gris-medio) !important;
    color: #000 !important;
}

.btn-secondary:hover {
    background-color: #bbb !important;
}

.btn-success {
    background-color: var(--verde) !important;
    color: var(--blanco) !important;
}

.btn-success:hover {
    background-color: #218838 !important;
}

.btn-warning {
    background-color: var(--amarillo) !important;
    color: #000 !important;
}

.btn-warning:hover {
    background-color: #e0a800 !important;
}

.btn-danger {
    background-color: var(--rojo) !important;
    color: var(--blanco) !important;
}

.btn-danger:hover {
    background-color: #c82333 !important;
}

/* Tarjetas */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--azul-medio);
    color: white;
    font-weight: bold;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0 !important;
    font-size: 1.1rem;
}

.card-body {
    padding: 20px;
}

/* Tablas */
.table {
    background-color: var(--blanco);
    border-collapse: collapse;
    width: 100%;
    margin: 0;
    font-size: 0.95rem;
}

.table th, .table td {
    padding: 14px 12px;
    vertical-align: middle;
}

.table th {
    background-color: var(--azul-claro);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--gris-claro);
}

.table-hover tbody tr:hover {
    background-color: rgba(26, 63, 122, 0.05);
    cursor: pointer;
}

/* Formularios */
.form-control {
    border: 1px solid var(--gris-medio);
    border-radius: 6px;
    padding: 10px;
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.form-control:focus {
    border-color: var(--azul-medio);
    box-shadow: 0 0 0 3px rgba(26, 63, 122, 0.2);
    outline: none;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--texto);
    display: block;
}

/* Alertas */
.alert {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
footer {
    text-align: center;
    padding: 25px 20px;
    background-color: var(--azul-oscuro);
    color: var(--blanco);
    font-size: 0.9rem;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Títulos */
h2, h3, h4 {
    color: var(--azul-oscuro);
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
}

/* Badges */
.badge {
    border-radius: 50px;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge.bg-primary {
    background-color: var(--azul-medio) !important;
}

.badge.bg-success {
    background-color: var(--verde) !important;
}

.badge.bg-warning {
    background-color: var(--amarillo) !important;
    color: #000 !important;
}

.badge.bg-danger {
    background-color: var(--rojo) !important;
}

.badge.bg-info {
    background-color: var(--azul-claro) !important;
}

/* Links */
a {
    text-decoration: none;
    color: var(--azul-medio);
    transition: var(--transition);
}

a:hover {
    color: #0A2A5E;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Responsive ajustes */
@media (max-width: 768px) {
    .card-body, .table th, .table td {
        padding: 10px 8px;
    }

    .btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}