:root {
    --primary: #0F172A;       
    --secondary: #2563EB;     
    --success: #059669;       
    --warning: #D97706;       
    --danger: #DC2626;        
    --dark: #1E293B;          
    --bg-color: #F8FAFC;
    --border-color: #E2E8F0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }

body { background: var(--bg-color); color: var(--dark); min-height: 100vh; overflow-x: hidden; }

.corporate-panel { background: #FFFFFF; border: 1px solid var(--border-color); border-radius: 6px; box-shadow: var(--card-shadow); }

.mobile-nav-item { display: none !important; }

#login-view { 
    position: fixed !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important;
    width: 90%; max-width: 400px; padding: 35px; text-align: center; animation: fadeIn 0.4s ease-out; z-index: 1000;
}
.login-header h2 { font-size: 1.6rem; color: var(--primary); font-weight: 700; letter-spacing: -0.5px; }
.login-header p { color: #475569; font-size: 0.95rem; margin-bottom: 25px; }

.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: #475569; margin-bottom: 6px; text-transform: uppercase; }
.input-wrapper { position: relative; }
.input-wrapper i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94A3B8; }

input, select, textarea {
    width: 100%; padding: 10px 12px 10px 40px; border-radius: 4px; border: 1px solid #CBD5E1;
    background: #FFFFFF; font-size: 0.95rem; color: var(--dark); outline: none; transition: all 0.2s ease;
}
select { padding-left: 12px; cursor: pointer; } 
.input-wrapper select { padding-left: 40px; }
textarea { padding-left: 12px; width: 100% !important; box-sizing: border-box !important; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }

.btn-action {
    width: 100%; padding: 12px; border-radius: 4px; border: none; background: var(--primary);
    color: white; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-action:hover { background: #1E293B; }
.btn-action:disabled { background: #94A3B8; cursor: not-allowed; }

.btn-upload-pill {
    border-radius: 50px;
    padding: 12px 20px;
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: opacity 0.2s, transform 0.1s;
    border: none;
    color: white;
    width: 100%;
}
.btn-upload-pill:hover { opacity: 0.9; }
.btn-upload-pill:active { transform: scale(0.98); }
.btn-upload-pill i { font-size: 1.1rem; }
.blue-pill { background-color: #3B82F6; }
.green-pill { background-color: #10B981; }

.btn-action-dark {
    background-color: #0F172A;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 35px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.btn-action-dark:hover { background-color: #1E293B; transform: translateY(-1px); }
.btn-conforme { color: #10B981; }
.btn-devolver { color: #EF4444; }

.custom-textarea {
    width: 100%;
    padding: 12px 15px !important;
    border-radius: 6px !important;
    border: 1px solid #3B82F6 !important;
    font-size: 0.95rem !important;
    color: var(--primary) !important;
    resize: vertical;
    min-height: 50px;
    outline: none;
}
.custom-textarea::placeholder { color: var(--primary); font-weight: 500; }
.custom-textarea:focus { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important; }


.denuncia-card button, .card-footer button, #historico-content button {
    background: #F1F5F9; color: #334155; border: 1px solid #CBD5E1; padding: 8px 14px;
    border-radius: 4px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; width: 100%;
    margin-top: 10px; font-size: 0.85rem;
}
.denuncia-card button:hover, .card-footer button:hover, #historico-content button:hover { background: #E2E8F0; }
.denuncia-card .btn-sm-primary, .card-footer .btn-sm-primary { background: var(--secondary); color: white; border: none; }
.denuncia-card .btn-sm-primary:hover, .card-footer .btn-sm-primary:hover { background: #1D4ED8; }
.denuncia-card .btn-sm-success { background: var(--success); color: white; border: none; }
.denuncia-card .btn-sm-success:hover { background: #047857; }

#btn-import-excel {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 6px 10px !important;
    font-size: 0.72rem !important;
    border-radius: 999px !important;
    line-height: 1 !important;
    gap: 4px !important;
    min-height: 28px !important;
}

#app-view { width: 100vw; height: 100vh; max-width: 100%; overflow: hidden; display: none; }
#app-view.show-app { display: grid; grid-template-columns: 260px 1fr; }

.sidebar { background: #FFFFFF; padding: 25px 20px; display: flex; flex-direction: column; border-right: 1px solid var(--border-color); height: 100%; overflow-y: auto;}
.brand { display: flex; align-items: center; justify-content: center; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid #F1F5F9; margin-bottom: 20px; }

.user-profile-card { background: #F8FAFC; padding: 15px; border-radius: 6px; margin-bottom: 25px; border: 1px solid #E2E8F0; }
.user-profile-card h4 { font-size: 0.9rem; color: var(--dark); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-profile-card p { font-size: 0.8rem; color: #64748B; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-profile-card .tag-role { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; background: var(--secondary); color: white; margin-top: 8px; text-transform: uppercase; }

.menu-items { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.menu-link { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 4px; color: #475569; font-weight: 600; text-decoration: none; transition: all 0.2s ease; cursor: pointer; font-size: 0.9rem;}
.menu-link:hover, .menu-link.active { background: #F1F5F9; color: var(--secondary); }
.logout-link { color: var(--danger); border-top: 1px solid #F1F5F9; padding-top: 15px; margin-top: 15px;}

.main-content { padding: 30px; overflow-y: auto; height: 100vh; display: flex; flex-direction: column; gap: 20px; }
.top-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px;}
.top-bar h1 { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.top-bar .date-pill { padding: 6px 14px; border-radius: 4px; background: #FFFFFF; font-size: 0.85rem; font-weight: 600; color: #475569; border: 1px solid var(--border-color); }

.filter-container { display: none; align-items: center; gap: 10px; background: #FFFFFF; padding: 12px 15px; border-radius: 6px; border: 1px solid var(--border-color); margin-bottom: 10px;}
.filter-container label { font-weight: 700; color: #475569; font-size: 0.85rem; margin: 0; }
.filter-container select { padding: 6px 10px; width: auto; border-radius: 4px; font-weight: 600; border: 1px solid #CBD5E1; }
.search-container { display: flex; align-items: center; justify-content: flex-start; gap: 10px; background: #FFFFFF; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border-color); margin-bottom: 10px; width: auto; max-width: 560px; }
.search-container label { flex: 0 0 auto; font-weight: 700; color: var(--primary); font-size: .78rem; text-align: left; }
.search-container input { width: 290px; max-width: 100%; min-width: 200px; padding: 7px 10px; font-size: 0.82rem; height: 34px; }

.history-search-wrap { display: flex; align-items: center; gap: 8px; margin-left: 0; }
.history-search-wrap label { font-size: 0.78rem; font-weight: 700; color: var(--primary); margin: 0; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.history-search-wrap input { width: 220px; max-width: 100%; min-width: 180px; padding: 7px 10px; font-size: 0.82rem; height: 34px; border-radius: 6px; border: 1px solid #CBD5E1; background: #fff; }
.history-search-wrap input:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }

.support-toolbar, .support-panel { padding: 18px; }
.history-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 18px; }
.history-toolbar h3 { color: var(--primary); font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.history-toolbar p { color: var(--muted); font-size: .85rem; margin-top: 5px; }
.history-refresh { width: auto; padding: 10px 14px; }
.history-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(148, 163, 184, 0.08);
}
.history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 560px;
    text-align: left;
    table-layout: fixed;
}
.history-table th, .history-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #EAF0F4;
    font-size: .69rem;
    vertical-align: middle;
}
.history-table th {
    background: linear-gradient(180deg, #F8FAFC 0%, #EEF4FF 100%);
    color: var(--primary);
    font-size: .54rem;
    letter-spacing: .10em;
    text-transform: uppercase;
    font-weight: 700;
    padding-top: 10px;
    padding-bottom: 10px;
}
.history-table td {
    color: var(--dark);
    background: #fff;
}
.history-table tbody tr:hover td {
    background: #F8FBFF;
}
.history-table tbody tr:last-child td {
    border-bottom: 0;
}
.history-empty { text-align: center !important; color: var(--muted) !important; padding: 28px !important; }
.history-search-wrap input {
    border: 1px solid #D6E0ED;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}
.history-search-wrap input:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09);
    border-color: rgba(37, 99, 235, 0.55);
}
.history-error { color: var(--danger) !important; }
.workspace-view { max-width: 100%; min-width: 0; overflow-x: hidden; }
.satisfaction-heading { margin-bottom: 16px; }
.satisfaction-heading h3, .satisfaction-companies-title { color: var(--primary); font-size: 1.1rem; }
.satisfaction-heading p { color: var(--muted); font-size: .85rem; margin-top: 5px; }
.satisfaction-heading + .stats-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 6px; }
.satisfaction-heading + .stats-grid .stat-card { min-height: 58px; padding: 7px 8px; }
.satisfaction-heading + .stats-grid .stat-card h5 { font-size: .6rem; line-height: 1.2; }
.satisfaction-heading + .stats-grid .stat-card p { font-size: 1.05rem; }
.satisfaction-heading + .stats-grid .stat-card small { font-size: .65rem; }
.satisfaction-companies-title { margin: 28px 0 15px; }
.satisfaction-company-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); grid-auto-rows: 1fr; align-items: stretch; gap: 15px; }
.satisfaction-company-card { display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 205px; min-width: 0; padding: 18px; }
.satisfaction-company-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.satisfaction-company-header h4 { min-width: 0; color: var(--primary); font-size: .95rem; overflow-wrap: anywhere; }
.satisfaction-company-header strong { color: var(--secondary); font-size: 1rem; white-space: nowrap; }
.satisfaction-response-count { color: var(--muted); font-size: .78rem; margin: 10px 0; }
.satisfaction-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; font-size: .72rem; }
.satisfaction-levels div { display: flex; justify-content: space-between; gap: 5px; padding: 5px 6px; background: #F5F8FA; border-radius: 4px; color: var(--dark); }
.satisfaction-levels strong { color: var(--primary); }
.satisfaction-empty { color: var(--muted); font-size: .85rem; padding: 20px 0; }
.satisfaction-stat-5 { border-left-color: #1B806A; }
.satisfaction-stat-4 { border-left-color: #0B7285; }
.satisfaction-stat-3 { border-left-color: #B7791F; }
.satisfaction-stat-2 { border-left-color: #D97706; }
.satisfaction-stat-1 { border-left-color: #B4473C; }
.satisfaction-average { border-left-color: #7C3AED; }
.satisfaction-total { border-left-color: var(--primary); }
.support-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.support-toolbar h3, .support-panel h4 { color: var(--primary); }
.support-toolbar p, .support-hint, .support-empty { color: #64748B; font-size: 0.85rem; margin-top: 5px; }
.support-layout { display: grid; grid-template-columns: minmax(230px, 0.75fr) minmax(300px, 1.25fr); gap: 15px; }
.role-checklist { display: flex; flex-direction: column; gap: 8px; margin-top: 15px; }
.role-check { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border-color); border-radius: 4px; cursor: pointer; font-size: 0.85rem; }
.role-check:has(input:checked) { border-color: var(--secondary); background: #EFF6FF; color: var(--secondary); font-weight: 700; }
.role-check input { width: auto; padding: 0; accent-color: var(--secondary); }
.support-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.support-users { margin-top: 15px; display: flex; flex-direction: column; gap: 8px; }
.support-user { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid #F1F5F9; font-size: 0.84rem; }
.support-user-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #DBEAFE; color: var(--secondary); }
.support-user small { display: block; color: #64748B; margin-top: 2px; }
.support-online { color: var(--success); font-size: 0.75rem; font-weight: 700; }
.support-offline { color: #94A3B8; font-size: 0.75rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; }
.stat-card { padding: 15px; display: flex; align-items: center; gap: 15px; background: #FFFFFF; border: 1px solid var(--border-color); border-radius: 6px; box-shadow: var(--card-shadow); border-left: 4px solid var(--secondary); }
.stat-card h5 { font-size: 0.75rem; color: #64748B; text-transform: uppercase; margin-bottom: 4px;}
.stat-card p { font-size: 1.4rem; font-weight: 700; color: var(--primary); }

.workspace-view { display: none; }
.workspace-view.active { display: block; animation: fadeInUp 0.3s ease-out; }

.denuncias-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 15px; padding-bottom: 20px; width: 100%; }
.denuncia-card { background: #FFFFFF; border: 1px solid var(--border-color); border-radius: 6px; padding: 18px; box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: 10px; transition: transform 0.2s ease; cursor: pointer; }
.denuncia-card:hover { transform: translateY(-2px); border-color: #94A3B8; }
.card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #F1F5F9; padding-bottom: 10px; }
.card-body { font-size: 0.85rem; color: #475569; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body strong { color: var(--primary); font-weight: 600; }
.card-footer { padding-top: 12px; border-top: 1px solid #F1F5F9; display: flex; justify-content: flex-end; }

.badge { padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.status-nuevo { background: #E0E7FF; color: #3730A3; }
.status-envcomp { background: #FEF3C7; color: #92400E; }
.status-atcomp { background: #DCFCE7; color: #166534; }
.status-devuelto { background: #FEE2E2; color: #991B1B; }
.status-cerradofisc { background: #DBEAFE; color: #1E40AF; }
.status-final { background: #F1F5F9; color: #334155; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.7); z-index: 9999 !important; align-items: center; justify-content: center; padding: 15px;}
#custom-alert, #global-loader { z-index: 10500 !important; }
.modal-content { width: 100%; max-width: 750px; padding: 25px; animation: zoomIn 0.2s ease-out; max-height: 90vh; overflow-y: auto; background: #FFFFFF; border-radius: 6px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid #E2E8F0; padding-bottom: 10px; }
.modal-header h3 { color: var(--primary); font-size: 1.1rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.close-modal { font-size: 1.2rem; color: #94A3B8; cursor: pointer; transition: color 0.2s ease; }
.close-modal:hover { color: var(--danger); }

.info-card-section { background: #F8FAFC; border: 1px solid #E2E8F0; padding: 15px; border-radius: 4px; margin-bottom: 15px; }
.info-card-section h4 { margin-bottom: 12px; color: var(--primary); display: flex; align-items: center; gap: 6px; font-size: 0.95rem; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.detail-grid .full-width { grid-column: 1 / -1; }
.detail-grid div { font-size: 0.85rem; color: #475569; }
.detail-grid strong { color: var(--primary); font-weight: 700; display: block; margin-bottom: 2px; font-size: 0.75rem; text-transform: uppercase; }

#historico-content { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
#historico-content > * { background: #FFFFFF; border: 1px solid #E2E8F0; padding: 12px; border-radius: 4px; font-size: 0.85rem; color: #475569; border-left: 4px solid var(--secondary); display: block; width: 100%; }
#historico-content hr { display: none !important; }
#historico-content strong { color: var(--primary); display: block; margin-bottom: 4px; font-size: 0.85rem; }

.action-zone { margin-top: 20px; padding-top: 15px; border-top: 1px solid #E2E8F0; }
.verification-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.verification-summary-grid div { padding: 12px; background: #fff; border: 1px solid var(--border-color); border-left: 4px solid var(--secondary); border-radius: 5px; font-size: .84rem; color: var(--dark); }
.verification-summary-grid strong { display: block; color: var(--primary); font-size: .72rem; text-transform: uppercase; margin-bottom: 6px; }
.verification-summary-grid span { font-weight: 800; color: var(--secondary); }
.fiscal-upload-button { width: 280px !important; max-width: calc(100% - 24px); align-self: center; position: relative; justify-content: center; }
.fiscal-upload-button i { position: absolute; right: 14px; }
.verification-panel, .verification-editor { margin: 0 auto 20px; padding: 14px; border: 1px solid var(--border-color); border-left: 4px solid var(--secondary); border-radius: 6px; background: #F8FAFC; max-width: 560px; text-align: left; }
.verification-editor { margin-top: 18px; margin-bottom: 0; border-left-color: var(--warning); }
.verification-panel .verification-field, .verification-editor .verification-field { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; color: var(--primary); font-size: .82rem; font-weight: 700; }
.verification-field:last-of-type { margin-bottom: 0; }
.verification-field select { width: 150px; padding: 8px 10px; flex: 0 0 auto; }
.verification-editor h4 { color: var(--primary); margin-bottom: 12px; font-size: .95rem; }
.verification-editor .btn-action-dark { margin-top: 8px; width: 100%; }

@media (max-width: 768px) {
    #app-view.show-app { display: flex; flex-direction: column; height: auto; min-height: 100vh; }
    .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border-color); padding: 15px; }
    .desktop-nav-item { display: none !important; }
    .mobile-nav-item { display: flex !important; }

    .user-profile-card { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; text-align: center !important; width: 100%; }
    .user-profile-card h4, .user-profile-card p { text-align: center !important; width: 100%; display: block; }
    
    .menu-items { position: fixed; bottom: 15px; left: 5%; width: 90%; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 8px; display: flex; flex-direction: row; justify-content: space-around; padding: 8px; z-index: 1000; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
    .menu-link { position: relative !important; flex-direction: column; font-size: 0.65rem; gap: 4px; padding: 6px; margin: 0; color: #64748B; background: transparent; flex: 1; align-items: center; justify-content: center; }
    .menu-link #badge-notificaciones, .menu-link .badge { position: absolute !important; top: -2px !important; right: 25% !important; background: var(--danger) !important; color: white !important; border-radius: 50px !important; padding: 2px 4px !important; font-size: 0.6rem !important; font-weight: bold; display: flex !important; align-items: center; justify-content: center; z-index: 10; min-width: 16px; height: 16px; line-height: 1; border: 1.5px solid white; }
    .menu-link i { font-size: 1.1rem; margin-bottom: 2px; }
    .menu-link.active { background: #F1F5F9; color: var(--secondary); border-radius: 6px; }
    .logout-link { color: var(--danger); border: none; padding-top: 6px;}
    
    .main-content { padding: 15px 15px 100px 15px !important; height: auto; overflow: visible; }
    .denuncias-grid { grid-template-columns: 1fr; }
    .support-layout { grid-template-columns: 1fr; }
    .support-toolbar { align-items: flex-start; flex-direction: column; }
    .history-toolbar { align-items: flex-start; flex-direction: column; }
    .history-refresh { width: 100%; }
    #view-historico .history-table { min-width: 0; table-layout: fixed; }
    #view-historico .history-table th, #view-historico .history-table td { padding: 10px 7px; font-size: .7rem; overflow-wrap: anywhere; }
    #view-historico .history-table th { font-size: .62rem; }
    .verification-panel .verification-field, .verification-editor .verification-field { align-items: flex-start; flex-direction: column; gap: 5px; }
    .verification-field select { width: 100%; }
    .verification-summary-grid { grid-template-columns: 1fr; }
    #alerts-dropdown { position: fixed !important; top: auto !important; bottom: 85px !important; left: 50% !important; transform: translateX(-50%) !important; width: 90vw !important; right: auto !important; }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }
body.no-scroll { overflow: hidden !important; }

.install-prompt-content { max-width: 400px; text-align: center; }
.install-prompt-icon { color: var(--secondary); font-size: 2.5rem; margin-bottom: 12px; }
.install-prompt-content h3 { color: var(--primary); margin-bottom: 10px; }
.install-prompt-content p { color: #475569; line-height: 1.5; margin-bottom: 20px; }
.install-prompt-actions { display: flex; gap: 10px; }
.install-prompt-actions button { flex: 1; }
.btn-install-later { border: 1px solid var(--border-color); border-radius: 4px; background: #fff; color: var(--dark); cursor: pointer; font-weight: 600; }

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Source+Serif+4:wght@600;700&display=swap');

:root {
    --primary: #102A43;
    --primary-deep: #071C2C;
    --secondary: #0B7285;
    --secondary-dark: #075A68;
    --success: #1B806A;
    --warning: #B7791F;
    --danger: #B4473C;
    --dark: #243B53;
    --muted: #627D98;
    --bg-color: #F4F7F9;
    --border-color: #D9E2EC;
    --card-shadow: 0 10px 28px rgba(16, 42, 67, 0.07);
}

* { font-family: 'Manrope', 'Segoe UI', sans-serif; }
body {
    background-color: var(--bg-color);
    background-image: linear-gradient(rgba(217,226,236,.27) 1px, transparent 1px), linear-gradient(90deg, rgba(217,226,236,.27) 1px, transparent 1px);
    background-size: 34px 34px;
    color: var(--dark);
}

.corporate-panel { background: rgba(255,255,255,.96); border: 1px solid var(--border-color); border-radius: 10px; box-shadow: var(--card-shadow); }
#login-view {
    max-width: 430px; padding: 42px 40px; border-radius: 14px; border-top: 5px solid var(--secondary);
    box-shadow: 0 24px 60px rgba(7, 28, 44, .16);
}
#login-view::before { content: 'PORTAL INSTITUCIONAL'; display: block; color: var(--secondary); font-size: .68rem; font-weight: 800; letter-spacing: .16em; margin-bottom: 18px; }
.login-header h2 { font-family: 'Source Serif 4', Georgia, serif; color: var(--primary); font-size: 1.85rem; letter-spacing: 0; }
.login-header p { color: var(--muted); margin-bottom: 30px; }
.form-group label { color: var(--primary); letter-spacing: .08em; font-size: .7rem; }
input, select, textarea { border-color: var(--border-color); border-radius: 7px; color: var(--dark); background: #FBFCFD; }
input:focus, select:focus, textarea:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(11,114,133,.12); background: #fff; }
.btn-action { background: var(--primary); border-radius: 7px; padding: 13px; letter-spacing: .01em; }
.btn-action:hover { background: var(--primary-deep); }

#app-view.show-app { grid-template-columns: 286px 1fr; }
.sidebar {
    background: var(--primary-deep); border-right: 0; padding: 28px 18px 22px; position: relative;
    box-shadow: 12px 0 30px rgba(7,28,44,.08);
}
.brand { border-bottom-color: rgba(255,255,255,.13); padding-bottom: 24px; margin-bottom: 22px; }
.brand img { filter: brightness(0) invert(1); opacity: .95; }
.user-profile-card { background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.14); border-radius: 9px; padding: 17px; }
.user-profile-card h4 { color: #fff; }
.user-profile-card p { color: #B8C7D6; }
.user-profile-card .tag-role { background: var(--secondary); border-radius: 4px; letter-spacing: .05em; }
.menu-items { gap: 7px; }
.menu-link { color: #B8C7D6; border-radius: 7px; padding: 12px 14px; }
.menu-link:hover, .menu-link.active { background: rgba(255,255,255,.1); color: #fff; }
.menu-link.active { box-shadow: inset 3px 0 var(--secondary); }
.logout-link { border-top-color: rgba(255,255,255,.13); color: #F1A7A0; }

.main-content { padding: 34px 40px; gap: 22px; }
.top-bar { padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.top-bar h1 { font-family: 'Source Serif 4', Georgia, serif; color: var(--primary); font-size: 1.75rem; letter-spacing: 0; }
.top-bar .date-pill { background: #fff; border-color: var(--border-color); color: var(--muted); border-radius: 6px; }
.filter-container { background: #fff; border-radius: 9px; border-left: 4px solid var(--secondary); padding: 15px 18px; box-shadow: 0 5px 18px rgba(16,42,67,.04); }
.filter-container label { color: var(--primary); }
.filter-container select { border-radius: 6px; }
.denuncias-grid { gap: 18px; }
.denuncia-card { border-radius: 10px; border-color: var(--border-color); padding: 20px; box-shadow: var(--card-shadow); }
.denuncia-card:hover { transform: translateY(-3px); border-color: #9FB3C8; box-shadow: 0 14px 30px rgba(16,42,67,.11); }
.card-header { border-bottom-color: #EAF0F4; }
.card-body { color: var(--muted); line-height: 1.55; }
.card-body strong { color: var(--primary); }
.card-footer { border-top-color: #EAF0F4; }
.denuncia-card button, .card-footer button, #historico-content button { border-radius: 6px; border-color: var(--border-color); background: #F5F8FA; color: var(--primary); }
.denuncia-card .btn-sm-primary, .card-footer .btn-sm-primary { background: var(--secondary); }
.denuncia-card .btn-sm-primary:hover, .card-footer .btn-sm-primary:hover { background: var(--secondary-dark); }
.badge { border-radius: 4px; letter-spacing: .04em; }
.status-nuevo { background: #E7F0F5; color: #285E75; }
.status-envcomp { background: #FFF4D6; color: #8B5E16; }
.status-atcomp { background: #DFF3EC; color: #17644F; }
.status-devuelto { background: #FBE5E1; color: #963C34; }
.status-cerradofisc { background: #E1ECF7; color: #22527A; }
.status-final { background: #E9EEF2; color: #52606D; }

.stats-grid { gap: 18px; }
.stat-card { border-radius: 9px; border-left-width: 4px; box-shadow: var(--card-shadow); padding: 19px; }
.stat-card h5 { color: var(--muted); letter-spacing: .08em; }
.stat-card p { color: var(--primary); }
.support-toolbar, .support-panel { border-radius: 10px; padding: 21px; }
.support-toolbar h3, .support-panel h4 { color: var(--primary); }
.role-check { border-color: var(--border-color); border-radius: 7px; transition: background .2s, border-color .2s; }
.role-check:has(input:checked) { border-color: var(--secondary); background: #EAF6F7; color: var(--secondary-dark); }
.support-user { border-top-color: #EAF0F4; }
.support-user-icon { background: #E5F2F4; color: var(--secondary); }

.modal { background: rgba(7,28,44,.78); backdrop-filter: blur(4px); }
.modal-content { border-radius: 12px; padding: 29px; box-shadow: 0 25px 70px rgba(7,28,44,.25); }
.modal-header { border-bottom-color: var(--border-color); }
.modal-header h3, .info-card-section h4 { color: var(--primary); }
.info-card-section { background: #F6F9FB; border-color: var(--border-color); border-radius: 8px; }
#historico-content > * { border-color: var(--border-color); border-left-color: var(--secondary); border-radius: 7px; }
.action-zone { border-top-color: var(--border-color); }
.btn-action-dark { background: var(--primary); border-radius: 7px; box-shadow: 0 6px 14px rgba(16,42,67,.16); }
.btn-action-dark:hover { background: var(--primary-deep); }
.blue-pill { background: var(--secondary); border-radius: 7px; }
.green-pill { background: var(--success); border-radius: 7px; }
.support-status-editor { max-width: 520px; margin: 0 auto; text-align: center; }
.support-status-editor h4 { color: var(--primary); margin-bottom: 6px; }
.support-status-editor p { color: var(--muted); font-size: .84rem; margin-bottom: 16px; }
.support-status-editor select { width: 100%; margin-bottom: 14px; padding: 13px; }
.support-status-editor .btn-action-dark { width: 100%; }

@media (max-width: 768px) {
    .sidebar { background: var(--primary-deep); }
    .main-content { padding: 20px 16px 105px !important; }
    .top-bar h1 { font-size: 1.45rem; }
    .menu-items { background: var(--primary); border-color: rgba(255,255,255,.18); box-shadow: 0 12px 28px rgba(7,28,44,.28); }
    .menu-link { color: #B8C7D6; }
    .menu-link.active { background: rgba(255,255,255,.1); color: #fff; box-shadow: none; }
    .support-toolbar, .support-panel { padding: 17px; }
}

:root {
    --primary: #12355B;
    --primary-deep: #0D2947;
    --secondary: #165DCC;
    --secondary-dark: #10479D;
    --success: #18794E;
    --warning: #D99A16;
    --danger: #C73535;
    --dark: #24415F;
    --muted: #667B91;
    --bg-color: #F8F9FA;
    --border-color: #E3E8EE;
    --card-shadow: 0 8px 24px rgba(18, 53, 91, 0.07);
}

* { font-family: 'Segoe UI', Inter, Roboto, Arial, sans-serif; }
body {
    background: #F8F9FA;
    background-image: none;
    color: var(--dark);
}
.corporate-panel { background: #FFFFFF; border: 1px solid var(--border-color); border-radius: 10px; box-shadow: var(--card-shadow); }

#login-view { background: #FFFFFF; border-top: 4px solid var(--secondary); border-radius: 10px; padding: 42px; }
#login-view::before { display: none; }
.login-header h2, .top-bar h1 { font-family: 'Segoe UI', Inter, Roboto, Arial, sans-serif; color: var(--primary); }
.login-header p, .support-toolbar p, .support-hint, .support-empty { color: var(--muted); }
.input-wrapper i { color: var(--secondary); }
input, select, textarea { background: #FFFFFF; color: var(--dark); border-color: #D3DCE6; }
input:focus, select:focus, textarea:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(22, 93, 204, 0.12); }
.btn-action { background: var(--secondary); border-radius: 7px; }
.btn-action:hover { background: var(--secondary-dark); }

#app-view.show-app { grid-template-columns: 270px 1fr; }
.sidebar { background: #FFFFFF; border-right: 1px solid var(--border-color); box-shadow: 5px 0 20px rgba(18, 53, 91, 0.04); }
.brand { border-bottom-color: #EDF1F5; }
.brand img { filter: none; }
.user-profile-card { background: #F8F9FA; border-color: var(--border-color); }
.user-profile-card h4 { color: var(--primary); }
.user-profile-card p { color: var(--muted); }
.user-profile-card .tag-role { background: var(--secondary); }
.menu-link { color: #526B84; }
.menu-link:hover, .menu-link.active { background: #EFF4FB; color: var(--secondary); }
.menu-link.active { box-shadow: inset 3px 0 var(--secondary); }
.logout-link { color: var(--danger); border-top-color: #EDF1F5; }

.main-content { background: #F8F9FA; }
.top-bar { border-bottom-color: var(--border-color); }
.top-bar h1 { font-size: 1.6rem; }
.top-bar .date-pill { background: #FFFFFF; color: var(--muted); border-color: var(--border-color); }
.filter-container { background: #FFFFFF; border-left-color: var(--secondary); border-color: var(--border-color); }
.filter-container label { color: var(--primary); }
.denuncia-card { background: #FFFFFF; border-color: var(--border-color); box-shadow: var(--card-shadow); }
.denuncia-card:hover { border-color: #AFC1D3; box-shadow: 0 12px 28px rgba(18, 53, 91, 0.11); }
.card-header, .card-footer { border-color: #EDF1F5; }
.card-body { color: var(--muted); }
.card-body strong { color: var(--primary); }
.denuncia-card button, .card-footer button, #historico-content button { background: #F5F7F9; color: var(--primary); border-color: #D3DCE6; }
.denuncia-card .btn-sm-primary, .card-footer .btn-sm-primary { background: var(--secondary); color: #FFFFFF; }
.denuncia-card .btn-sm-success { background: var(--success); color: #FFFFFF; }
.status-nuevo { background: #E8F0FC; color: #1C55A2; }
.status-envcomp { background: #FFF4D4; color: #966C09; }
.status-atcomp { background: #E2F4EA; color: #176341; }
.status-devuelto { background: #FBE8E8; color: #A52F2F; }
.status-cerradofisc { background: #E5EEF9; color: #24588F; }
.status-final { background: #EEF1F4; color: #53687D; }

.stat-card, .support-toolbar, .support-panel { background: #FFFFFF; border-color: var(--border-color); box-shadow: var(--card-shadow); }
.stat-card h5 { color: var(--muted); }
.stat-card p, .support-toolbar h3, .support-panel h4 { color: var(--primary); }
.role-check { background: #FFFFFF; border-color: var(--border-color); }
.role-check:has(input:checked) { background: #EEF4FD; border-color: var(--secondary); color: var(--secondary-dark); }
.support-users { margin-top: 15px; display: flex; flex-direction: column; gap: 8px; }
.support-user { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid #F1F5F9; font-size: 0.82rem; width: 100%; min-width: 0; flex-wrap: wrap; }
.support-user-main { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; min-width: 0; }
.support-user-meta { min-width: 0; flex: 1; }
.support-user-meta strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.support-user small { display: block; color: #64748B; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.support-user-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 1 auto; flex-wrap: wrap; min-width: 0; }
.support-user-actions .btn-action { flex-shrink: 0; }
.support-user-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #E9F0FA; color: var(--secondary); flex-shrink: 0; }
.support-online { color: var(--success); font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.support-offline { color: #94A3B8; font-size: 0.75rem; white-space: nowrap; }
.support-user { border-top-color: #EDF1F5; }

.modal { background: rgba(18, 53, 91, 0.48); }
.modal-content { background: #FFFFFF; border-radius: 10px; }
.modal-header, .action-zone { border-color: var(--border-color); }
.modal-header h3, .info-card-section h4, .detail-grid strong { color: var(--primary); }
.info-card-section { background: #F8F9FA; border-color: var(--border-color); }
#historico-content > * { background: #FFFFFF; border-color: var(--border-color); border-left-color: var(--secondary); }
.btn-action-dark { background: var(--secondary); border-radius: 7px; }
.btn-action-dark:hover { background: var(--secondary-dark); }
.blue-pill { background: var(--secondary); border-radius: 7px; }
.green-pill { background: var(--success); border-radius: 7px; }

.sidebar { padding: clamp(16px, 3vh, 24px) 16px 20px; background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(239,246,253,.76)); }
.brand { flex-direction: column; gap: 9px; padding: 2px 0 22px; margin-bottom: 20px; }
.brand img { width: 104px !important; }
.brand-caption { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.user-profile-card { padding: 15px; margin-bottom: 24px; border-radius: 12px; background: rgba(255,255,255,.58); border-color: rgba(255,255,255,.9); box-shadow: 0 10px 26px rgba(18, 53, 91, .08), inset 0 1px 0 rgba(255,255,255,.8); backdrop-filter: blur(12px); }
.profile-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.profile-avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: #E8F0FC; color: var(--secondary); font-size: .9rem; }
.profile-avatar img { width: 25px; height: 25px; object-fit: contain; }
.profile-status { color: var(--success); font-size: .63rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.profile-status i { font-size: .45rem; vertical-align: 1px; margin-right: 3px; }
.profile-details { min-width: 0; }
.profile-details .tag-role { margin-top: 9px; }
.menu-items { gap: 5px; }
.menu-section-label { color: #91A4B8; font-size: .63rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; padding: 5px 14px 7px; }
.menu-section-account { margin-top: auto; padding-top: 22px; }
.menu-link { min-height: 44px; gap: 13px; padding: 11px 14px; border: 1px solid transparent; font-size: .88rem; }
.menu-link i { width: 18px; text-align: center; font-size: .95rem; transition: transform .2s ease; }
.menu-link:hover { background: #F7FAFD; border-color: #E7EDF4; transform: translateX(2px); }
.menu-link:hover i, .menu-link.active i { transform: scale(1.08); }
.menu-link.active { background: linear-gradient(100deg, rgba(230,240,253,.96), rgba(247,251,255,.72)); border-color: rgba(165,195,235,.7); box-shadow: inset 3px 0 var(--secondary), 0 6px 14px rgba(22, 93, 204, .1); font-weight: 800; }
.logout-link { margin-top: 0; padding-top: 11px; border-top: 0; }
.logout-link:hover { background: #FFF3F3; border-color: #F5DCDC; }
.top-bar-actions { display: flex; align-items: center; gap: 16px; }
.top-bar-logo { width: 68px; height: auto; object-fit: contain; }
.chat-sidebar-link { position: relative; }

@media (max-width: 768px) {
    #app-view.show-app { overflow: visible; }
    .sidebar { background: linear-gradient(160deg, rgba(255,255,255,.96), rgba(239,246,253,.88)); padding-top: 0; backdrop-filter: none; }
    .sidebar .brand { display: none; }
    .brand { gap: 5px; padding-bottom: 12px; margin-bottom: 12px; }
    .brand img { width: 88px !important; }
    .brand-caption { font-size: .58rem; }
    .user-profile-card { padding: 10px 12px; margin-bottom: 8px; }
    .profile-heading { margin-bottom: 7px; }
    .profile-avatar { width: 30px; height: 30px; font-size: .78rem; }
    .profile-details .tag-role { margin-top: 6px; }
    .menu-items { position: fixed !important; top: auto !important; left: 50% !important; right: auto !important; bottom: calc(12px + env(safe-area-inset-bottom)) !important; transform: translateX(-50%); align-self: auto; width: min(92%, 420px); flex: none; gap: 4px; margin-top: 0; padding: 7px; background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.92); border-radius: 18px; box-shadow: 0 14px 34px rgba(18, 53, 91, .18), 0 2px 6px rgba(18, 53, 91, .08); backdrop-filter: blur(18px) saturate(1.35); z-index: 1100; }
    .menu-section-label { display: none; }
    .menu-link { min-height: 58px; color: #526B84; border-radius: 12px; padding: 7px 4px; font-size: .68rem; font-weight: 700; }
    .menu-link i { width: auto; font-size: 1.05rem; margin-bottom: 2px; }
    .menu-link.active { background: rgba(224,237,253,.92); color: var(--secondary); border-color: rgba(184,210,242,.9); box-shadow: 0 4px 10px rgba(22, 93, 204, .1); }
    .logout-link { color: var(--danger); }
    .menu-link:hover { transform: none; }
    .profile-heading { width: 100%; }
    .top-bar-actions { gap: 10px; }
    .top-bar-logo { display: none; }
}

.top-bar { min-height: 48px; padding: 0 0 9px; gap: 10px; }
.top-bar h1 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.top-bar-actions { margin-left: auto; gap: 12px; }
.top-bar-logo { width: 58px; }
.main-content { padding-top: 18px; gap: 14px; }

@media (max-width: 768px) {
    .main-content { padding-top: 12px !important; gap: 12px; }
    .top-bar { min-height: 38px; padding-bottom: 7px; }
    .top-bar-actions { width: 100%; justify-content: flex-end; }
    .top-bar .date-pill { padding: 5px 10px; font-size: .75rem; }
}

.profile-status i { color: var(--success) !important; }
.top-bar { width: 100%; min-width: 0; }
.top-bar { border-bottom: none !important; }
.top-bar-actions { min-width: 0; max-width: 100%; margin-left: auto; justify-content: flex-end; }
.top-bar .date-pill { max-width: min(42vw, 260px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-bar-logo { flex: 0 0 auto; width: clamp(48px, 5vw, 62px); padding: 5px; border-radius: 50%; background: rgba(255,255,255,.72); }

@media (min-width: 769px) {
    .top-bar { margin-top: -8px; align-items: center; }
    .top-bar-actions { position: static; margin-left: auto; justify-content: flex-end; transform: none; }
}

@media (max-width: 768px) {
    .top-bar-actions { justify-content: flex-start; }
    .top-bar .date-pill { max-width: none; width: auto; font-size: .72rem; padding-left: 9px; padding-right: 9px; }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .denuncias-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
    .denuncias-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 769px) {
    #app-view.show-app { grid-template-columns: clamp(238px, 20vw, 286px) minmax(0, 1fr); }
    .sidebar { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
    .sidebar .brand { display: none; }
    .menu-items { min-height: 0; overflow-y: auto; scrollbar-width: none; }
    .menu-items::-webkit-scrollbar { display: none; }
}

@media (min-width: 769px) {
    .sidebar {
        background: linear-gradient(155deg, #0D2947 0%, #12355B 52%, #165DCC 100%);
        border-right: 1px solid rgba(255,255,255,.18);
        box-shadow: 12px 0 34px rgba(18, 53, 91, .18);
        isolation: isolate;
    }
    .sidebar::before {
        content: '';
        position: absolute;
        inset: 12px 10px;
        border: 1px solid rgba(255,255,255,.16);
        border-radius: 18px;
        pointer-events: none;
        z-index: -1;
    }
    .user-profile-card {
        background: rgba(255,255,255,.1);
        border-color: rgba(255,255,255,.22);
        box-shadow: 0 12px 28px rgba(7, 28, 44, .14), inset 0 1px 0 rgba(255,255,255,.2);
        backdrop-filter: blur(14px) saturate(1.2);
    }
    .user-profile-card h4, .user-profile-card p, .profile-status { color: #fff; }
    .profile-avatar { background: rgba(255,255,255,.86); color: var(--secondary); }
    .user-profile-card .tag-role { background: rgba(7, 28, 44, .48); color: #fff; }
    .brand-caption, .menu-section-label { color: rgba(255,255,255,.68); }
    .menu-link { color: rgba(255,255,255,.82); }
    .menu-link:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.16); }
    .menu-link.active { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); color: #fff; box-shadow: inset 3px 0 #8ED8F0, 0 8px 16px rgba(7, 28, 44, .14); }
    .logout-link, .logout-link:hover { color: #C4ECF7; }
}

@media (max-width: 768px) {
    .menu-items {
        background: rgba(239, 247, 255, .78) !important;
        border: 1px solid rgba(255,255,255,.92) !important;
        border-radius: 23px;
        box-shadow: 0 16px 34px rgba(18, 53, 91, .2), inset 0 1px 0 rgba(255,255,255,.95);
        backdrop-filter: blur(20px) saturate(1.2);
        -webkit-backdrop-filter: blur(20px) saturate(1.2);
        padding: 5px;
    }
    .menu-link, .menu-link.active, .logout-link { color: #61738B; background: transparent; border-color: transparent; box-shadow: none; border-radius: 15px; min-height: 52px; padding: 6px 2px 5px; gap: 3px; font-size: .52rem; font-weight: 700; line-height: 1.1; }
    .menu-link i { color: #65788F; font-size: 1.1rem; margin-bottom: 2px; }
    .menu-link.active { color: #fff; font-weight: 800; background: linear-gradient(145deg, #3C72D4, #1854B7); border-color: rgba(255,255,255,.35); box-shadow: 0 8px 14px rgba(22, 93, 204, .25), inset 0 1px 0 rgba(255,255,255,.24); }
    .menu-link.active i { color: #fff; }
    .menu-link:hover { background: rgba(255,255,255,.42); border-color: transparent; }
    .logout-link, .logout-link i { color: #D04444; }
}

@media (max-width: 768px) {
    .filter-container { padding: 10px 12px; }
    .search-container { align-items: stretch; flex-direction: column; padding: 10px 12px; gap: 5px; }
    .search-container input { max-width: none; width: 100%; }
    .filter-container > div { flex-wrap: nowrap !important; gap: 8px !important; }
    .filter-container > div > div { flex: 1 1 0; min-width: 0; }
    .filter-container label { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .68rem; margin-bottom: 3px; }
    .filter-container select { width: 100%; min-width: 0; padding: 7px 8px; font-size: .78rem; }
}

.menu-link.active, .menu-link.active i { color: #fff !important; }

@media (max-width: 768px) {
    .menu-link.active {
        background: linear-gradient(145deg, #3C72D4, #1854B7) !important;
        color: #fff !important;
        border-color: rgba(255,255,255,.35) !important;
        box-shadow: 0 8px 14px rgba(22, 93, 204, .25), inset 0 1px 0 rgba(255,255,255,.24) !important;
    }
    .menu-link.active i { color: #fff !important; }
}
