/* ===== ESTILOS BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* ===== ESTILOS ORIGINALES (Mantener estos) ===== */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #1a237e;
    outline: none;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.btn-submit {
    background: #1a237e;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #283593;
}

.success-message {
    background: #4CAF50;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message a {
    color: white;
    text-decoration: underline;
    font-weight: bold;
    margin: 0 10px;
}

/* Estilos para la tarjeta de licencia */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.license-card {
    width: 350px;
    height: 220px;
    background: linear-gradient(135deg, #ffffff, #f5f5f5);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 20px;
    display: flex;
    position: relative;
    overflow: hidden;
}

.license-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.license-right {
    width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 2px dashed #e0e0e0;
    padding-left: 15px;
}

.license-photo {
    width: 100px;
    height: 120px;
    background-color: #e0e0e0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
}

.license-number {
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
    color: #333;
}

.license-name {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #1a237e;
}

.license-details {
    margin-top: 10px;
}

.license-detail {
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: #555;
}

.license-detail strong {
    color: #333;
}

.license-type {
    background-color: #1a237e;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
    margin-top: 5px;
}

.license-flag {
    position: absolute;
    top: 20px;
    right: -30px;
    background-color: #1a237e;
    color: white;
    padding: 5px 35px;
    transform: rotate(45deg);
    font-size: 0.7rem;
    font-weight: bold;
}

.license-logo {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 0.7rem;
    color: #777;
}

.qr-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.qr-image {
    max-width: 200px;
    height: auto;
    border: 1px solid #ddd;
    padding: 10px;
    background: white;
}

.verification-info {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
}

.verification-info h3 {
    margin-bottom: 15px;
    color: #1a237e;
}

.verification-info p {
    margin-bottom: 10px;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

button, .btn-close {
    padding: 12px 24px;
    background-color: #1a237e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 16px;
}

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

@media (max-width: 768px) {
    .license-card {
        width: 100%;
        max-width: 350px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

@media print {
    body {
        background: white !important;
    }
    
    .header {
        color: black !important;
        text-shadow: none !important;
    }
    
    .controls {
        display: none;
    }
    
    .license-card {
        box-shadow: none;
        border: 2px solid #333;
    }
}

/* ===== ESTILOS PROFESIONALES MEJORADOS ===== */

/* Header Profesional */
.header-profesional {
    background: linear-gradient(135deg, #1a237e, #283593);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section i {
    font-size: 2.5rem;
    color: #ffd54f;
}

.title-group h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.title-group p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.header-actions .btn-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s;
    border: 1px solid rgba(255,255,255,0.2);
}

.header-actions .btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

/* Estadísticas */
.stats-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1a237e, #283593);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1a237e;
}

/* Layout Principal */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 30px;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
}

.content {
    flex: 1;
}

/* Navegación Lateral */
.sidebar-nav {
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    text-decoration: none;
    color: #555;
    border-radius: 8px;
    transition: all 0.3s;
    margin-bottom: 5px;
}

.nav-item:hover {
    background: #f8f9fa;
    color: #1a237e;
}

.nav-item.active {
    background: #1a237e;
    color: white;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

/* Tarjeta de Formulario */
.form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, #f5f7fa, #e4e8f0);
    padding: 25px 30px;
    border-bottom: 1px solid #e1e5eb;
}

.form-header h2 {
    margin: 0;
    color: #1a237e;
    font-size: 1.5rem;
}

.form-header p {
    margin: 5px 0 0 0;
    color: #666;
}

/* Formulario Profesional */
.professional-form {
    padding: 30px;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e1e5eb;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.section-header i {
    color: #1a237e;
    font-size: 1.2rem;
}

.section-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

/* Mejoras en grupos de formulario */
.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-group label i {
    color: #1a237e;
    width: 16px;
}

.form-help {
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

/* Botones Mejorados */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5eb;
}

.btn-submit-profesional {
    background: linear-gradient(135deg, #1a237e, #283593);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-submit-profesional:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

.btn-reset {
    background: #6c757d;
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

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

/* Alertas Mejoradas */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert i {
    font-size: 1.2rem;
    margin-top: 2px;
}

.alert-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-alert {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.alert-success .btn-alert {
    background: #155724;
    color: white;
}

.alert-success .btn-alert.btn-outline {
    background: transparent;
    border: 1px solid #155724;
    color: #155724;
}

/* ===== ESTILOS PARA LICENCIAS REGISTRADAS ===== */

.filters-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filters-header {
    margin-bottom: 15px;
}

.filters-header h3 {
    margin: 0;
    color: #333;
}

.filters-content {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.btn-export {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Grid de Licencias */
.licencias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.licencia-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.licencia-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.licencia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.licencia-type-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.licencia-type-badge.tipo-a { background: #dc3545; }
.licencia-type-badge.tipo-b { background: #007bff; }
.licencia-type-badge.tipo-c { background: #28a745; }
.licencia-type-badge.tipo-d { background: #ffc107; color: #212529; }
.licencia-type-badge.tipo-e { background: #6f42c1; }

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

.btn-action {
    background: none;
    border: none;
    color: #666;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-action:hover {
    background: #e9ecef;
    color: #1a237e;
}

.licencia-body {
    padding: 20px;
}

.licencia-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.licencia-number {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.licencia-details {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.9rem;
}

.licencia-restrictions {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.licencia-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
}

.qr-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #28a745;
}

/* Estado vacío */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    margin-bottom: 20px;
    color: #dee2e6;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.empty-state p {
    margin: 0 0 25px 0;
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.page-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn:not(:disabled):hover {
    background: #e9ecef;
}

.page-info {
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .licencias-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-content {
        flex-direction: column;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    /* ===== ESTILOS PARA SUBIDA DE FOTOS ===== */
.file-upload-container {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    background: #fafafa;
}

.file-upload-container.dragover {
    border-color: #1a237e;
    background: #f0f4ff;
}

.file-input {
    display: none;
}

.file-upload-area {
    cursor: pointer;
    color: #666;
}

.file-upload-area i {
    font-size: 2rem;
    color: #1a237e;
    margin-bottom: 10px;
}

.file-upload-area p {
    margin: 10px 0 5px 0;
    font-weight: 600;
}

.file-upload-area span {
    font-size: 0.85rem;
    color: #999;
}

.image-preview {
    position: relative;
    margin-top: 15px;
    display: inline-block;
}

#previewImg {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.btn-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-preview-small {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ddd;

}