/* ============================================
   ESTILOS MODERNOS PARA ADWCHECKING
   ============================================ */

/* Reset y configuración base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #4F46E5;
    --primary-dark: #4338CA;
    --secondary-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    --dark-bg: #1F2937;
    --light-bg: #F9FAFB;
    --white: #FFFFFF;
    --text-dark: #111827;
    --text-gray: #6B7280;
    --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);
}

body {
    font-family: 'Nunito Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 15px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.login-container {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    max-width: 420px;
    width: 100%;
    padding: 30px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo {
    max-width: 120px;
    width: 100%;
    height: auto;
    margin-bottom: 10px;
    animation: fadeIn 0.8s ease;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-header h2 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-weight: 700;
}

.login-subtitle {
    color: var(--text-gray);
    font-size: 15px;
}

.login-form .form-group {
    margin-bottom: 25px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
}

.login-form label i {
    margin-right: 6px;
    color: var(--primary-color);
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
}

.btn-login i {
    margin-right: 8px;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.alert-error i {
    font-size: 18px;
}

/* Alerts generales */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    animation: fadeInUp 0.4s ease;
}

.alert i {
    font-size: 20px;
}

.alert-success {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #065F46;
    border-left: 4px solid var(--secondary-color);
}

.alert-info {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    color: #1E40AF;
    border-left: 4px solid var(--info-color);
}

.alert-warning {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #92400E;
    border-left: 4px solid var(--warning-color);
}

.alert-danger {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: #991B1B;
    border-left: 4px solid var(--danger-color);
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-gray);
    font-size: 13px;
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 0.5s ease;
}

.dashboard-header {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

.dashboard-logo {
    max-width: 120px;
    width: 100%;
    height: auto;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.dashboard-header h1 {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-weight: 700;
}

.dashboard-header h1 i {
    color: var(--primary-color);
    margin-right: 12px;
}

.dashboard-header p {
    color: var(--text-gray);
    font-size: 13px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.dashboard-card {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.dashboard-card:hover::before {
    transform: scaleX(1);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 24px;
}

.card-blue .card-icon {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.card-green .card-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
}

.card-red .card-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.card-purple .card-icon {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.card-orange .card-icon {
    background: rgba(251, 146, 60, 0.1);
    color: #FB923C;
}

.dashboard-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 700;
}

.dashboard-card p {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 15px;
}

.card-arrow {
    display: flex;
    justify-content: flex-end;
    color: var(--primary-color);
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-card:hover .card-arrow {
    opacity: 1;
}

.dashboard-footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: var(--white);
}

.dashboard-footer i {
    margin-right: 8px;
}

/* ============================================
   PAGE LAYOUT
   ============================================ */

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeInUp 0.5s ease;
}

.page-header {
    background: var(--white);
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-button {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateX(-3px);
}

.page-header h1 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-weight: 700;
}

.page-header h1 i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 28px;
    vertical-align: middle;
}

.page-subtitle {
    color: var(--text-gray);
    font-size: 14px;
}

.logout-btn {
    padding: 12px 24px;
    background: var(--danger-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover {
    background: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ============================================
   FORMS
   ============================================ */

.form-card {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow-md);
}

.form-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.form-card-header i {
    font-size: 24px;
    color: var(--primary-color);
}

.form-card-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.modern-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.modern-form .form-group {
    margin-bottom: 0;
}

.modern-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
}

.modern-form label i {
    margin-right: 6px;
    color: var(--primary-color);
}

.modern-form input,
.modern-form select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.modern-form input:focus,
.modern-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: var(--light-bg);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: fadeIn 0.5s ease;
}

.alert-success i {
    font-size: 18px;
}

/* ============================================
   FILTERS
   ============================================ */

.filter-card {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow-md);
}

.filter-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.filter-header i {
    font-size: 20px;
    color: var(--primary-color);
}

.filter-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.filter-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
}

.filter-group label i {
    margin-right: 6px;
    color: var(--primary-color);
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    margin-top: 10px;
}

.btn-filter,
.btn-pdf {
    padding: 11px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border: none;
}

.btn-filter {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-filter:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.btn-pdf {
    background: var(--danger-color);
    color: var(--white);
}

.btn-pdf:hover {
    background: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

/* ============================================
   TABLES
   ============================================ */

.table-card {
    background: var(--white);
    border-radius: 16px;
    padding: 0;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.table-header {
    padding: 20px 25px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-header h3 i {
    color: var(--primary-color);
}

.record-count {
    background: var(--light-bg);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 16px 16px;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--text-gray);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--text-dark);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead {
    background: var(--light-bg);
}

.modern-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-table th i {
    margin-right: 6px;
}

.modern-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-dark);
}

.modern-table tbody tr {
    transition: background 0.2s ease;
}

.modern-table tbody tr:hover {
    background: var(--light-bg);
}

.td-employee {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.td-employee i {
    color: var(--primary-color);
    font-size: 18px;
}

.td-time {
    display: flex;
    align-items: center;
    gap: 8px;
}

.td-time i {
    color: var(--secondary-color);
}

.td-location {
    text-align: center;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.map-link:hover {
    background: var(--info-color);
    color: var(--white);
    transform: translateY(-2px);
}

.no-coords {
    color: var(--text-gray);
    font-size: 13px;
    font-style: italic;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: var(--text-gray);
    opacity: 0.5;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-gray);
    font-size: 14px;
}

/* ============================================
   RESPONSIVE DESIGN - Adaptado a móvil y tablet
   ============================================ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
    body {
        padding: 0;
    }
    
    .dashboard-container {
        padding: 40px 30px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .dashboard-header {
        padding: 35px 30px;
        margin-bottom: 40px;
    }
    
    .dashboard-logo {
        max-width: 150px;
    }
    
    .dashboard-header h1 {
        font-size: 36px;
    }
    
    .dashboard-header p {
        font-size: 18px;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .dashboard-card {
        padding: 45px 35px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 240px;
        justify-content: center;
    }
    
    .card-icon {
        width: 70px;
        height: 70px;
        font-size: 36px;
        margin: 0 auto 20px;
    }
    
    .dashboard-card h3 {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .dashboard-card p {
        font-size: 17px;
        line-height: 1.6;
    }
    
    .content-wrapper {
        padding: 30px;
        margin: 25px;
    }
    
    .page-header h1 {
        font-size: 30px;
    }
    
    .page-header h1 i {
        font-size: 34px;
    }
    
    .page-header p {
        font-size: 17px;
    }
    
    .filter-card,
    .modern-form,
    .form-card {
        padding: 30px 25px;
    }
    
    .filter-card h3,
    .modern-form h2,
    .form-card-header h2 {
        font-size: 26px;
        margin-bottom: 22px;
    }
    
    .form-card-header {
        gap: 15px;
        margin-bottom: 28px;
        padding-bottom: 18px;
    }
    
    .form-card-header i {
        font-size: 28px;
    }
    
    .filter-form-grid,
    .modern-form .form-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .form-group label {
        font-size: 16px;
    }
    
    .form-control,
    .form-select {
        padding: 15px;
        font-size: 17px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 16px 24px;
        font-size: 17px;
    }
}

/* Mobile y Tablet Portrait (menos de 768px) */
@media (max-width: 767px) {
    body {
        padding: 10px;
    }
    
    .dashboard-container {
        padding: 20px 15px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        width: 100%;
    }
    
    .dashboard-header {
        padding: 20px 15px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .dashboard-logo {
        max-width: 80px;
        margin-bottom: 10px;
    }
    
    .dashboard-header h1 {
        font-size: 20px;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .dashboard-header p {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .dashboard-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px;
        width: 100%;
    }
    
    .dashboard-card {
        padding: 25px 20px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 140px;
        justify-content: center;
        width: 100% !important;
        box-sizing: border-box;
        margin: 0;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin: 0 auto 12px;
    }
    
    .dashboard-card h3 {
        font-size: 17px;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .dashboard-card p {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .dashboard-card:active {
        transform: scale(0.98);
    }
    
    /* Páginas internas */
    .content-wrapper {
        padding: 25px;
        margin: 18px;
    }
    
    .page-header {
        flex-direction: column;
        text-align: center;
        gap: 18px;
        align-items: center;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .header-logo {
        max-width: 110px;
    }
    
    .page-header h1 {
        font-size: 26px;
    }
    
    .page-header h1 i {
        font-size: 30px;
    }
    
    .page-header p {
        font-size: 15px;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .header-actions .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 14px;
        font-size: 16px;
    }
    
    .filter-card,
    .modern-form,
    .form-card {
        padding: 25px 20px;
        margin: 0;
        border-radius: 18px;
    }
    
    .filter-card h3,
    .modern-form h2,
    .form-card-header h2 {
        font-size: 22px;
        margin-bottom: 18px;
    }
    
    .form-card-header {
        gap: 12px;
        margin-bottom: 22px;
        padding-bottom: 15px;
    }
    
    .form-card-header i {
        font-size: 26px;
    }
    
    .filter-form-grid,
    .modern-form .form-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .form-group {
        margin-bottom: 0;
    }
    
    .form-group label {
        font-size: 15px;
        margin-bottom: 8px;
        display: block;
    }
    
    .form-control,
    .form-select {
        padding: 14px;
        font-size: 16px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 14px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 15px;
        font-size: 16px;
    }
    
    .alert-success {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .alert-success i {
        font-size: 20px;
    }
    
    /* Tablas con scroll horizontal */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -25px;
        padding: 0 25px;
    }
    
    .modern-table {
        min-width: 700px;
        font-size: 14px;
    }
    
    .modern-table th,
    .modern-table td {
        padding: 14px 12px;
    }
    
    .map-link {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .login-container {
        max-width: 90%;
        padding: 25px 20px;
        margin: 20px auto;
    }
    
    .login-logo {
        max-width: 100px;
        margin-bottom: 15px;
    }
    
    .login-header h2 {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .login-subtitle {
        font-size: 14px;
    }
    
    .login-form label {
        font-size: 14px;
    }
    
    .login-form input {
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .btn-login {
        padding: 13px;
        font-size: 15px;
    }
}

/* Mobile pequeño (menos de 480px) */
@media (max-width: 480px) {
    .dashboard-container {
        padding: 15px 10px;
    }
    
    .dashboard-header {
        padding: 15px 10px;
    }
    
    .dashboard-logo {
        max-width: 70px;
    }
    
    .dashboard-header h1 {
        font-size: 18px;
        line-height: 1.2;
    }
    
    .dashboard-header p {
        font-size: 12px;
    }
    
    .dashboard-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px;
    }
    
    .dashboard-card {
        padding: 20px 15px;
        min-height: 130px;
        width: 100% !important;
    }
    
    .card-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    
    .dashboard-card h3 {
        font-size: 16px;
        line-height: 1.2;
    }
    
    .dashboard-card p {
        font-size: 12px;
    }
    
    .content-wrapper {
        padding: 22px;
        margin: 15px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .page-header p {
        font-size: 14px;
    }
    
    .filter-card,
    .modern-form {
        padding: 22px 18px;
    }
    
    .filter-card h3,
    .modern-form h2 {
        font-size: 20px;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    .form-control,
    .form-select {
        padding: 13px;
        font-size: 15px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 14px;
        font-size: 15px;
    }
    
    .modern-table {
        min-width: 650px;
        font-size: 13px;
    }
    
    .modern-table th,
    .modern-table td {
        padding: 12px 10px;
    }
    
    .map-link {
        font-size: 12px;
        padding: 7px 10px;
    }
}

/* Mejoras táctiles para móviles */
@media (hover: none) and (pointer: coarse) {
    .dashboard-card:active,
    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
    }
}

/* Landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    .dashboard-container {
        padding: 15px;
        min-height: auto;
    }
    
    .dashboard-header {
        margin-bottom: 15px;
        padding: 15px;
    }
    
    .dashboard-logo {
        max-width: 80px;
        margin-bottom: 8px;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .dashboard-card {
        padding: 20px;
        min-height: auto;
    }
}

/* Print */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .dashboard-card,
    .btn-primary,
    .btn-secondary,
    .header-actions,
    .filter-card {
        display: none;
    }
    
    .content-wrapper {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .modern-table {
        font-size: 9pt;
    }
}
