/* ===================================
   ESTILOS MODERNOS PARA LICENCIAS
   =================================== */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-bg: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f9f9fa 0%, #e6a7e6 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===================================
   CARD PRINCIPAL DE LICENCIA
   =================================== */

.card-licencia {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 30px;
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   HEADERS
   =================================== */

.card-header-licencia {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px 25px;
    border: none;
}

.licencia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.licencia-header span:first-child {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contador-licencia {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* ===================================
   BODY DEL CARD
   =================================== */

.card-body-licencia {
    padding: 25px;
}

/* ===================================
   FILAS DE INFORMACIÓN
   =================================== */

.info-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row:hover {
    background-color: var(--light-bg);
    padding-left: 10px;
    margin-left: -10px;
    margin-right: -10px;
    padding-right: 10px;
    border-radius: 8px;
}

.info-label {
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.info-value {
    color: var(--dark-color);
    font-size: 15px;
    font-weight: 500;
    word-break: break-word;
}

/* ===================================
   SECCIÓN TÍTULO
   =================================== */

.seccion-titulo {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark-color);
    margin: 25px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.seccion-titulo::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* ===================================
   BADGES DE ESTADO
   =================================== */

.badge-estado {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-sm);
}

.badge-estado::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.estado-vigente {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.estado-vigente::before {
    background: white;
}

.estado-proceso {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.estado-proceso::before {
    background: white;
}

.estado-cancelado {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.estado-cancelado::before {
    background: white;
}

.estado-anulado {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.estado-anulado::before {
    background: white;
}

/* ===================================
   SEPARADOR
   =================================== */

.separador {
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--border-color) 20%, 
        var(--border-color) 80%, 
        transparent 100%);
    margin: 30px 0;
}

/* ===================================
   ALERTAS PERSONALIZADAS
   =================================== */

.alert {
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.alert-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* ===================================
   SPINNER DE CARGA
   =================================== */

.spinner-border {
    border-width: 3px;
}

/* ===================================
   RESPONSIVE - MÓVILES
   =================================== */

@media (max-width: 768px) {
    .card-licencia {
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    .card-header-licencia {
        padding: 16px 20px;
    }
    
    .licencia-header span:first-child {
        font-size: 16px;
    }
    
    .contador-licencia {
        font-size: 13px;
        padding: 5px 12px;
    }
    
    .card-body-licencia {
        padding: 20px 16px;
    }
    
    .info-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 0;
    }
    
    .info-label {
        font-size: 13px;
        color: #9ca3af;
    }
    
    .info-value {
        font-size: 14px;
        padding-left: 0;
    }
    
    .seccion-titulo {
        font-size: 15px;
        margin: 20px 0 12px 0;
    }
    
    .badge-estado {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .separador {
        margin: 20px 0;
    }
}

@media (max-width: 480px) {
    .card-header-licencia {
        padding: 14px 16px;
    }
    
    .licencia-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contador-licencia {
        align-self: flex-end;
    }
    
    .card-body-licencia {
        padding: 16px 12px;
    }
    
    .info-row:hover {
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* ===================================
   BOTONES MEJORADOS
   =================================== */

.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-secondary {
    border: 2px solid #e5e7eb;
    background: white;
    color: #6b7280;
}

.btn-outline-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #4b5563;
}

/* ===================================
   INPUT MEJORADO
   =================================== */

.form-control {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===================================
   CARD PRINCIPAL DE CONSULTA
   =================================== */

.card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    padding: 20px 25px;
}

.card-body {
    padding: 30px;
}

@media (max-width: 768px) {
    .card-body {
        padding: 20px 16px;
    }
}

/* Agregar al archivo estilos_licencias.css DESPUÉS de los badges existentes */

/* ===================================
   ESTADOS ESPECÍFICOS CON COLORES
   =================================== */

.estado-vigente {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.estado-por-vencer {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
    color: white;
}

.estado-vencida {
    background: linear-gradient(135deg, #e67e22 0%, #ca6f1e 100%);
    color: white;
}

.estado-cesada {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.estado-anulada,
.estado-revocada,
.estado-rechazada {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    color: white;
}

.estado-transferida {
    background: linear-gradient(135deg, #3498db 0%, #2e86c1 100%);
    color: white;
}

.estado-proceso {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
}

/* Mensaje de estado en el card */
.mensaje-estado {
    background: rgba(0, 0, 0, 0.05);
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 600;
}

/* Alerta de anulación */
.alerta-anulacion {
    background: #fee;
    border-left: 4px solid #c00;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.alerta-anulacion .info-label,
.alerta-anulacion .info-value {
    color: #c00 !important;
}