/* ROOT & BASICS */
:root {
    --primary-blue: #1d4ed8;
    --primary-hover: #1e40af;
    --bg-gray: #f8fafc;
    --sidebar-bg: #1e293b;
    --text-main: #0f172a;
    --text-secondary: #64748b;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --input-bg: #f8fafc;
    --input-focus-bg: #eff6ff;
    --sidebar-muted: rgba(203, 213, 225, 0.5);
}

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

body {
    background-color: var(--bg-gray);
    color: var(--text-main);
    min-height: 100vh;
}

/* LOGIN PAGE */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    min-height: 100vh;
    padding: 40px 20px;
}

.container { 
    width: 100%;
    max-width: 350px;
    max-height: 100%;
    text-align: center;
}

.header-brand .logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-brand .logo-icon.login-logo {
    width: 180px;
    height: auto;
    margin: 0 auto 20px auto;
}

.header-brand .logo-icon img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.header-brand .logo-icon i {
    background-color: #1d4ed8;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 4px 10px rgba(29, 78, 216, 0.3);
}

.header-brand .brand-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
}

.header-brand .subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin-top: 4px;
    text-align: center;
}

.card {
    background: #ffffff;
    padding: 60px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

input {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    font-size: 1rem;
}

.input-password-active {
    background-color: #eff6ff !important;
    border-color: #dbeafe !important;
}

.btn-primary {
    background-color: #1d4ed8;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 10px;
    width: 100%;
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

.card-footer-info {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
}

.temp-password {
    color: #94a3b8;
    margin-top: 8px;
}

/* SIDEBAR NAV */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    border-right: 1px solid #334155;
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.sidebar-logo {
    max-width: 110px;
    height: auto;
    transition: all 0.3s ease;
}

.sidebar .collapsed-logo {
    display: none;
}

.sidebar .expanded-logo {
    max-width: 130px;
}

.sidebar-user-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-section {
    padding: 12px 0;
}

.nav-title {
    display: flex;
    height: 32px;
    align-items: center;
    padding: 0 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sidebar-muted);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    margin: 2px 12px;
    border-radius: 8px;
}

.nav-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 1rem;
    text-align: center;
    color: #94a3b8;
}

.nav-item:hover {
    background-color: #334155;
    color: var(--white);
}

.nav-item.active {
    background-color: var(--primary-blue);
    color: var(--white);
}

.nav-item.active i {
    color: var(--white);
}

.sidebar-footer {
    padding: 20px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: auto;
    text-align: center;
    line-height: 1.5;
}

.sidebar.collapsed .sidebar-footer {
    display: none;
}

/* DASHBOARD MAIN */
.main-content {
    flex: 1;
    margin-left: 260px;
    background-color: var(--bg-gray);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.top-bar {
    height: 64px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

/* SIDEBAR COLLAPSED STATES */
.sidebar.collapsed {
    width: 70px;
}
.sidebar.collapsed .sidebar-user-container > div:not(.logo-icon),
.sidebar.collapsed .brand-name,
.sidebar.collapsed .subtitle,
.sidebar.collapsed .nav-title,
.sidebar.collapsed .nav-item span {
    display: none;
}
.sidebar.collapsed .sidebar-logo {
    max-width: 40px;
    margin-bottom: 10px;
}

.sidebar.collapsed .expanded-logo {
    display: none;
}

.sidebar.collapsed .collapsed-logo {
    display: block;
}
.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 10px;
}
.sidebar.collapsed .nav-item i {
    margin-right: 0;
}
.sidebar.collapsed .sidebar-header {
    justify-content: center;
    align-items: center;
    padding: 24px 0;
}
.sidebar.collapsed .sidebar-user-container {
    justify-content: center;
    width: 100%;
}
.main-content.expanded {
    margin-left: 70px;
}

/* TOGGLE BUTTON */
.sidebar-toggle-btn {
    width: 36px;
    height: 36px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 12px;
}
.sidebar-toggle-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.top-bar-user-info {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-main);
}

.top-bar-user-info strong {
    font-weight: 600;
    color: var(--text-main);
}

.top-bar-divider {
    margin: 0 12px;
    color: var(--border-color);
}

.top-bar-logout {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.top-bar-logout:hover {
    color: var(--primary-hover);
}

.page-container {
    padding: 32px;
}

/* STATS & CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    display: block;
    margin-top: 4px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.card {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* TABLES */
.table-responsive-container {
    max-height: 500px;
    overflow-y: auto;
    border-radius: 8px;
    position: relative;
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    position: sticky;
    top: 0;
    background-color: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
    box-shadow: inset 0 -1px 0 var(--border-color);
}

.data-table td {
    padding: 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

/* TABLE SORTING ICONS */
.sort-icon {
    transition: color 0.2s, transform 0.2s;
}

.sort-icon.muted {
    color: #cbd5e1;
    opacity: 0.5;
}

.sort-icon.active {
    color: var(--primary-blue);
    opacity: 1;
}

th:hover .sort-icon.muted {
    color: var(--text-secondary);
    opacity: 0.8;
}

/* TABLE SORTING CONTEXT MENU */
.sort-context-menu {
    position: absolute;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 180px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    animation: menuFadeIn 0.2s ease;
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.sort-context-menu button {
    background: none;
    border: none;
    padding: 10px 12px;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-main);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.sort-context-menu button:hover {
    background: #f1f5f9;
    color: var(--primary-blue);
}

.sort-context-menu button i {
    width: 16px;
    color: var(--text-secondary);
}

.sort-context-menu button:hover i {
    color: var(--primary-blue);
}

/* TEAM PERFORMANCE & FILTERS */
.filters-container {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.filters-container .search-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 14px;
    flex: 1;
    position: relative;
}

.filters-container .search-input-wrapper input {
    border: none;
    background: transparent;
    padding: 10px 8px;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}

.filters-container .search-input-wrapper i {
    position: static;
    transform: none;
    color: var(--text-secondary);
}

/* Estilo antigo para outras páginas caso necessário */
.search-input-wrapper:not(.filters-container *) {
    flex: 1;
    position: relative;
}

.search-input-wrapper:not(.filters-container *) i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-input-wrapper:not(.filters-container *) input {
    padding-left: 40px;
}

.select-filter {
    width: 220px;
}

.performance-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.performance-card {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar-circle {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* AJUSTES PARA BARRA DE PROGRESSO LARGA */
.performance-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.tech-name { font-weight: 700; font-size: 1rem; display: block; }
.tech-location { font-size: 0.8rem; color: var(--text-secondary); }
.percentage-value { font-weight: 700; color: var(--primary-blue); text-align: right; }
.task-count { display: block; font-size: 0.7rem; color: var(--text-secondary); }

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-blue);
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
}

/* FORMS & UI */
.form-group {
    text-align: left;
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
}

input, select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    outline: none;
    transition: border 0.2s;
}

input:focus {
    border-color: var(--primary-blue);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.badge-critical {
    background: #fee2e2;
    color: #ef4444;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
}

.card-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CONTROLE DE PRESENÇAS */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-blue);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Cores dos Ícones de Status */
.status-icon-present {
    color: #10b981;
}

.status-icon-absent {
    color: #ef4444;
}

/* KANBAN */
.kanban-board-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .kanban-board-container {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 16px;
        -webkit-overflow-scrolling: touch;
    }
    .kanban-board-container .kanban-col {
        min-width: 85vw;
        scroll-snap-align: center;
        flex-shrink: 0;
    }
}

.kanban-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.kanban-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 0.875rem;
}

.kanban-count {
    background: rgba(0,0,0,0.08);
    border-radius: 99px;
    padding: 2px 8px;
    font-size: 0.75rem;
}

.kanban-drop-zone {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s;
}

.kanban-drop-zone.drag-over {
    background: #e0f2fe;
    outline: 2px dashed #38bdf8;
}

.kanban-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    cursor: grab;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.15s, opacity 0.2s;
    user-select: none;
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.kanban-card.dragging {
    opacity: 0.4;
    cursor: grabbing;
}

.kanban-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.kanban-card-header h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}

.kanban-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.kanban-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
}

.kanban-badge-medium {
    background: #fef3c7;
    color: #d97706;
    padding: 3px 8px;
    border-radius: 99px;
    font-size: 0.6rem;
    font-weight: 700;
    white-space: nowrap;
}

#col-done .kanban-card {
    opacity: 0.7;
}

#col-done .kanban-card h4 {
    text-decoration: line-through;
    color: var(--text-secondary);
}

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

/* Modal — inventário / formulários compactos */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.modal-overlay[hidden] {
    display: none !important;
}

.modal-dialog {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow: auto;
}

.modal-dialog-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-dialog-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.modal-dialog-body {
    padding: 20px;
}

.modal-dialog-body .form-row {
    margin-bottom: 14px;
}

.modal-dialog-body .form-row:last-of-type {
    margin-bottom: 0;
}

.modal-dialog-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-secondary {
    background: var(--white);
    color: var(--text-main);
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-gray);
    border-color: #cbd5e1;
}

.modal-close {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    line-height: 1;
    border-radius: 6px;
}

.modal-close:hover {
    color: var(--text-main);
    background: var(--bg-gray);
}

.modal-dialog-body input:disabled,
.modal-dialog-body select:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 1;
}

.btn-primary.is-loading {
    opacity: 0.85;
    cursor: wait;
}

.inventario-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.inventario-toolbar-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.inventario-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.inventario-toolbar-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.inventario-toolbar-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* CONSERTO VISUAL DA BUSCA */
.filters-container .search-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 14px;
}

.filters-container .search-input-wrapper i {
    position: static;
    transform: none;
    margin-right: 8px;
}

.filters-container .search-input-wrapper input {
    border: none;
    padding: 12px 0;
    flex: 1;
}

/* CVES INTEGRATION STYLES */
.badge-count {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: help;
    display: inline-block;
}

td strong + br + small {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
}

/* ADVANCED TABLE FILTERS */
.table-filter-wrapper {
    position: relative;
    display: inline-block;
    height: 100%;
}

.table-filter-wrapper .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    margin: 0;
}

.filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100;
    padding: 12px;
}

.filter-dropdown h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 700;
}

.filter-column-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: background 0.15s;
}

.filter-column-btn:hover {
    background: #f1f5f9;
}

.filter-value-btn {
    display: flex;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-main);
    transition: background 0.15s;
}

.filter-value-btn:hover {
    background: #eff6ff;
    color: var(--primary-blue);
}

.active-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    background-color: #03487c; /* Cor do exemplo do usuário */
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
}

.filter-pill .remove-filter {
    background: none;
    border: none;
    color: #ffffff;
    margin-right: 6px;
    padding: 0 6px 0 0;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    border-right: 1px solid rgba(255,255,255,0.3);
}

.filter-pill .remove-filter:hover {
    color: #cbd5e1;
}

/* --- RESPONSIVIDADE (MOBILE-FIRST ADAPTATIONS) --- */

@media (max-width: 1024px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 260px !important;
        transform: translateX(-100%) !important;
        z-index: 2000 !important;
        display: flex !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        visibility: visible !important;
    }

    .sidebar.mobile-open {
        transform: translateX(0) !important;
        box-shadow: 10px 0 50px rgba(0,0,0,0.3) !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .top-bar {
        padding: 0 16px;
    }

    .page-container {
        padding: 16px;
    }

    .stat-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

    .top-bar-user-info strong {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .modal-dialog {
        max-width: 95% !important;
        margin: 10px;
    }
    
    body.mobile-menu-active {
        overflow: hidden !important;
    }
    
    .sidebar-overlay {
        position: fixed !important;
        inset: 0 !important;
        background: rgba(15, 23, 42, 0.6) !important;
        z-index: 1900 !important;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }

    .sidebar-toggle-btn {
        position: relative;
        z-index: 1001 !important;
    }
}

@media (max-width: 480px) {
    .top-bar-user-info strong {
        display: none;
    }
    
    .top-bar-title {
        font-size: 0.95rem;
    }

    .header-action-btn span {
        display: none;
    }

    .filters-container {
        flex-direction: column;
    }

    .select-filter {
        width: 100%;
    }
}