/**
 * Estilos Globales
 * Sistema de Control Vehicular - Ayuntamiento de Atlixco
 */

/* ===== VARIABLES CSS ===== */
:root {
    /* Colores del Ayuntamiento de Atlixco */
    --ayuntamiento-primary: #C2BA98;
    --ayuntamiento-primary-dark: #A89968;
    --ayuntamiento-primary-darker: #8F7E50;
    
    /* Colores del sistema */
    --primary: #2c3e50;
    --primary-dark: #1a252f;
    --secondary: #34495e;
    --success: #27ae60;
    --success-dark: #229954;
    --danger: #e74c3c;
    --danger-dark: #c0392b;
    --warning: #f39c12;
    --warning-dark: #e67e22;
    --info: #3498db;
    --info-dark: #2980b9;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --white: #ffffff;
    
    /* Escala de grises */
    --gray-50: #f9fafb;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* Tipografía */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-base: 14px;
    --font-size-sm: 12px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 24px;
    --font-size-3xl: 30px;
    
    /* Espaciado */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Bordes y sombras */
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --box-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    
    /* Transiciones */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
    
    /* Breakpoints (para uso en JavaScript) */
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    
    /* Z-index layers */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== CONTENEDORES ===== */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* ===== CARDS ===== */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 20px;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-300);
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

.card-footer {
    padding: 15px 20px;
    background: var(--gray-100);
    border-top: 1px solid var(--gray-300);
}

/* ===== BOTONES ===== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    line-height: 1.5;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--ayuntamiento-primary) 0%, var(--ayuntamiento-primary-dark) 100%);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--ayuntamiento-primary-dark) 0%, var(--ayuntamiento-primary-darker) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(194, 186, 152, 0.4);
}

.btn-secondary {
    background: var(--gray-600);
    color: var(--white);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-700);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover:not(:disabled) {
    background: #229954;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-warning:hover:not(:disabled) {
    background: #e67e22;
}

.btn-info {
    background: var(--info);
    color: var(--white);
}

.btn-info:hover:not(:disabled) {
    background: #2980b9;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--gray-300);
    border-radius: 5px;
    font-size: 14px;
    transition: var(--transition);
    font-family: var(--font-family);
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control:disabled {
    background: var(--gray-200);
    cursor: not-allowed;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.required {
    color: var(--danger);
}

/* ===== TABLAS ===== */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.table thead {
    background: var(--gray-100);
}

.table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-300);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background: var(--gray-100);
}

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

.table .actions {
    white-space: nowrap;
}

.table .actions .btn {
    margin-right: 5px;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: #3498db;
    color: var(--white);
}

.badge-success {
    background: var(--success);
    color: var(--white);
}

.badge-danger {
    background: var(--danger);
    color: var(--white);
}

.badge-warning {
    background: var(--warning);
    color: var(--white);
}

.badge-info {
    background: var(--info);
    color: var(--white);
}

.badge-secondary {
    background: var(--gray-600);
    color: var(--white);
}

/* Badges de estatus de tickets */
.badge-abierto {
    background: #f39c12;
    color: var(--white);
}

.badge-asignado {
    background: #3498db;
    color: var(--white);
}

.badge-en_proceso {
    background: #f39c12;
    color: var(--white);
}

.badge-finalizado {
    background: var(--success);
    color: var(--white);
}

.badge-cancelado {
    background: var(--gray-600);
    color: var(--white);
}

/* Badges de prioridad */
.badge-baja {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge-media {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.badge-alta {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.badge-urgente {
    background: var(--danger);
    color: var(--white);
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ===== ALERTAS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: var(--success);
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border-color: var(--danger);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: var(--warning);
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-color: var(--info);
    color: #0c5460;
}

/* ===== MODALES ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--gray-300);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--gray-800);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--gray-300);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-600);
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--gray-900);
}

/* ===== NAVBAR ===== */
.navbar {
    background: linear-gradient(135deg, var(--ayuntamiento-primary) 0%, var(--ayuntamiento-primary-dark) 100%);
    color: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.navbar-brand {
    font-size: 18px;
    font-weight: 600;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.navbar-nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.navbar-nav a:hover {
    opacity: 0.8;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    margin: 0;
    color: var(--gray-800);
    font-size: 28px;
}

/* ===== UTILIDADES ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.loading {
    text-align: center;
    padding: 20px;
    color: var(--gray-600);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-responsive {
        font-size: 13px;
    }

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

    .modal-content {
        margin: 0 10px;
    }

    .container {
        padding: 0 15px;
    }
}

/* ========================================
   ESTILOS RESPONSIVE MEJORADOS
   ======================================== */

/* Tablas Responsive */
@media (max-width: 768px) {
    /* Ocultar tabla y mostrar cards en mobile */
    .table-responsive-mobile {
        display: none;
    }

    .table-responsive-mobile + .mobile-cards {
        display: block !important;
    }

    /* Cards para móvil */
    .mobile-card {
        background: white;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #e9ecef;
    }

    .mobile-card-title {
        font-weight: 600;
        color: #2c3e50;
        font-size: 16px;
    }

    .mobile-card-body {
        display: grid;
        gap: 8px;
    }

    .mobile-card-row {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
    }

    .mobile-card-label {
        font-size: 13px;
        color: #7f8c8d;
        font-weight: 500;
    }

    .mobile-card-value {
        font-size: 14px;
        color: #2c3e50;
        font-weight: 500;
        text-align: right;
    }

    /* Scroll horizontal para tablas grandes */
    .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-scroll table {
        min-width: 600px;
    }
}

@media (min-width: 769px) {
    .mobile-cards {
        display: none !important;
    }

    .table-responsive-mobile {
        display: table;
    }
}

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

    .form-group {
        width: 100% !important;
    }

    .btn-group {
        flex-direction: column;
        gap: 10px;
    }

    .btn-group .btn {
        width: 100%;
    }
}

/* Grid Responsive */
@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
    }

    .info-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Navbar Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start !important;
        padding: 15px;
    }

    .navbar-brand {
        margin-bottom: 10px;
    }

    .navbar-menu {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .navbar-menu .btn {
        width: 100%;
        text-align: left;
    }
}

/* Cards Responsive */
@media (max-width: 768px) {
    .card {
        padding: 15px !important;
    }

    .card h2 {
        font-size: 18px !important;
    }

    .stats-card {
        min-width: auto !important;
    }
}

/* Modales Responsive */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .modal-header h3 {
        font-size: 18px;
    }
}

/* Badges y Botones Responsive */
@media (max-width: 768px) {
    .badge {
        font-size: 11px;
        padding: 4px 8px;
    }

    .btn {
        padding: 10px 15px;
        font-size: 14px;
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Tablas con scroll horizontal mejorado */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #C2BA98;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #A89968;
}

/* Ocultar elementos en mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }

    .show-desktop {
        display: block !important;
    }
}

/* Utilidades de texto responsive */
@media (max-width: 768px) {
    .text-mobile-center {
        text-align: center !important;
    }

    .text-mobile-left {
        text-align: left !important;
    }

    .text-mobile-right {
        text-align: right !important;
    }
}

/* Márgenes y padding responsive */
@media (max-width: 768px) {
    .mt-mobile-0 { margin-top: 0 !important; }
    .mb-mobile-0 { margin-bottom: 0 !important; }
    .p-mobile-10 { padding: 10px !important; }
    .px-mobile-10 { padding-left: 10px !important; padding-right: 10px !important; }
}

/* ===== BREADCRUMBS ===== */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 12px 0;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 8px;
    color: var(--gray-500);
}

.breadcrumb-item a {
    color: var(--info);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--gray-600);
}

/* ===== PAGINACIÓN ===== */
.pagination {
    display: flex;
    list-style: none;
    gap: 5px;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination span {
    display: block;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--gray-100);
    border-color: var(--ayuntamiento-primary);
}

.pagination .active span {
    background: var(--ayuntamiento-primary);
    color: var(--white);
    border-color: var(--ayuntamiento-primary);
}

.pagination .disabled span {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== GRID SYSTEM ===== */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ===== LOADING SPINNER ===== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(194, 186, 152, 0.3);
    border-radius: 50%;
    border-top-color: var(--ayuntamiento-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* ===== DROPDOWN MENU ===== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--white);
    min-width: 200px;
    box-shadow: var(--box-shadow-lg);
    border-radius: var(--border-radius);
    padding: 8px 0;
    margin-top: 5px;
    z-index: var(--z-dropdown);
    list-style: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    color: var(--gray-800);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 14px;
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.dropdown-divider {
    height: 1px;
    margin: 8px 0;
    background: var(--gray-300);
}

/* ===== ACCESIBILIDAD ===== */
/* Focus visible para navegación por teclado */
*:focus-visible {
    outline: 2px solid var(--ayuntamiento-primary);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--ayuntamiento-primary);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    z-index: var(--z-tooltip);
}

.skip-link:focus {
    top: 0;
}

/* Mejorar contraste para accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== MEJORAS DE ACCESIBILIDAD ===== */
/* Asegurar contraste mínimo WCAG AA */
.text-muted {
    color: var(--gray-600) !important;
}

/* Indicadores de estado para screen readers */
[aria-hidden="true"] {
    display: none;
}

/* Mejorar visibilidad de elementos interactivos */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--ayuntamiento-primary);
    outline-offset: 2px;
}

/* Responsive para dropdown */
@media (max-width: 768px) {
    .dropdown-menu {
        position: fixed;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: calc(100% - 20px);
    }
}

/* ===== MEJORAS DE ACCESIBILIDAD ADICIONALES ===== */

/* Mejorar contraste de texto */
.text-muted {
    color: var(--gray-600) !important;
}

/* Asegurar contraste mínimo WCAG AA (4.5:1) */
a {
    color: var(--info);
}

a:hover {
    color: var(--info-dark);
}

/* Mejorar visibilidad de elementos interactivos */
button:not(:disabled),
a[href],
input:not(:disabled),
select:not(:disabled),
textarea:not(:disabled),
[tabindex]:not([tabindex="-1"]) {
    cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Mejorar tamaño de área de click en mobile */
@media (max-width: 768px) {
    button,
    .btn,
    a.btn {
        min-height: 44px; /* Tamaño mínimo recomendado para touch */
        min-width: 44px;
    }
}

/* Indicadores de estado para screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Mejorar legibilidad */
p, li {
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 600;
    color: var(--gray-800);
}

/* Mejorar contraste en badges */
.badge {
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Mejorar formularios para accesibilidad */
label {
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

/* Mejorar tablas para screen readers */
.table th {
    font-weight: 600;
}

.table th[scope="col"] {
    text-align: left;
}

.table th[scope="row"] {
    font-weight: 600;
}

/* Mejorar modales para accesibilidad */
.modal[aria-hidden="false"] {
    display: flex;
}

.modal[aria-hidden="true"] {
    display: none;
}

/* Mejorar navegación por teclado */
.navbar-nav a:focus,
.dropdown-toggle:focus {
    outline: 2px solid var(--white);
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.2);
}

/* Mejorar responsive para mejor UX */
@media (max-width: 768px) {
    /* Aumentar tamaño de fuente en mobile para mejor legibilidad */
    body {
        font-size: 16px; /* Evita zoom automático en iOS */
    }
    
    /* Mejorar espaciado en mobile */
    .container {
        padding: 0 15px;
    }
    
    /* Mejorar cards en mobile */
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* Mejorar botones en mobile */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* Mejorar formularios en mobile */
    .form-control {
        font-size: 16px; /* Evita zoom en iOS */
    }
}

/* Mejorar impresión */
@media print {
    .navbar,
    .main-footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
