:root {
    --primary-orange: #e65c00;
    --primary-blue: #051c2c;
    --bg-light: #f5f7fa;
}

body {
    background-color: var(--bg-light);
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    color: var(--primary-blue);
    display: flex;
    min-height: 100vh;
}

.app-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    background: white;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    padding: 20px 0 10px;
    z-index: 10;
    transition: width 0.25s ease;
    overflow-x: hidden;
    overflow-y: visible;
    flex-shrink: 0;
}

.sidebar-logo {
    width: 140px;
    margin: 0 auto 24px auto;
    display: block;
}

.sidebar-user {
    text-align: center;
    font-size: 13px;
    color: #64748b;
    margin: -14px 0 18px;
    padding: 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    /* Hide scrollbar visually */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.nav-item {
    padding: 12px 30px;
    color: #64748b;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
    border-left: 4px solid transparent;
    font-size: 14px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
}

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

.nav-item:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
}

.nav-item.active {
    background: var(--bg-light);
    color: var(--primary-orange);
    border-left-color: var(--primary-orange);
}

/* ===== SIDEBAR COLLAPSE =====*/
/* Floating toggle handle — square, near top, half inside/half outside */
.sidebar-toggle-handle {
    position: fixed;
    top: 80px;
    left: 260px;
    transform: translateX(-50%);
    z-index: 100;
    width: 24px;
    height: 24px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.08);
    transition: left 0.25s ease, background 0.2s;
    color: #94a3b8;
    font-size: 10px;
}

.sidebar-toggle-handle:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
}

.sidebar-toggle-handle i {
    transition: transform 0.25s;
}

.sidebar.collapsed~.sidebar-toggle-handle,
body.sidebar-collapsed .sidebar-toggle-handle {
    left: 68px;
}

.sidebar.collapsed~.sidebar-toggle-handle i,
body.sidebar-collapsed .sidebar-toggle-handle i {
    transform: rotate(180deg);
}

.sidebar.collapsed {
    width: 68px;
}

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

.sidebar.collapsed .nav-label {
    display: none;
}

.sidebar.collapsed .nav-item {
    padding: 16px 0;
    justify-content: center;
    gap: 0;
    border-left-width: 3px;
}

.sidebar.collapsed .nav-item i {
    margin: 0;
    width: auto;
}

.sidebar.collapsed .sub-nav {
    display: none !important;
}

.sidebar.collapsed .nav-group-header {
    padding: 16px 0;
    justify-content: center;
    gap: 0;
}

.sidebar.collapsed .nav-group-header .nav-label,
.sidebar.collapsed .nav-group-header .nav-caret {
    display: none;
}

.sidebar.collapsed .sidebar-toggle-btn {
    justify-content: center;
    padding: 12px 0;
}

.sidebar.collapsed .sidebar-toggle-btn span {
    display: none;
}

.sidebar-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 18px 8px 22px;
    margin: 0 0 6px 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 100%;
    transition: color 0.2s;
    gap: 8px;
}

.sidebar-toggle-btn:hover {
    color: var(--primary-blue);
}

.sidebar-toggle-btn i {
    font-size: 14px;
    flex-shrink: 0;
    transition: transform 0.25s;
}

.sidebar.collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

/* ===== SUB-NAV ===== */
.nav-group {
    display: flex;
    flex-direction: column;
}

.nav-group-header {
    padding: 12px 30px;
    color: #64748b;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
    border-left: 4px solid transparent;
    font-size: 14px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    user-select: none;
}

.nav-group-header:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
}

/* Never orange on nav-group-header — sub items don't inherit active state */
.nav-group-header.active {
    background: var(--bg-light);
    color: var(--primary-blue);
    border-left-color: #cbd5e1;
}

.nav-group-header i:first-child {
    font-size: 17px;
    width: 20px;
    text-align: center;
}

.nav-group-header .nav-label {
    flex: 1;
}

.nav-caret {
    font-size: 11px;
    transition: transform 0.2s;
    margin-left: auto;
}

.nav-group-header.open .nav-caret {
    transform: rotate(180deg);
}

.sub-nav {
    display: none;
    flex-direction: column;
    border-left: 2px solid #e2e8f0;
    margin-left: 52px;
}

.sub-nav.open {
    display: flex;
}

/* ===== COLLAPSED SIDEBAR FLYOUT ===== */
#sidebar-flyout {
    position: fixed;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 4px 8px 20px rgba(0, 0, 0, 0.12);
    padding: 6px 0;
    min-width: 160px;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

#sidebar-flyout.visible {
    opacity: 1;
    pointer-events: all;
}

#sidebar-flyout button {
    display: block;
    width: 100%;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: #475569;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

#sidebar-flyout button:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
}

.sub-nav-item {
    padding: 9px 16px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    display: block;
    transition: color 0.15s;
    cursor: pointer;
    border: none;
    background: none;
    text-align: left;
    width: 100%;
}

.sub-nav-item:hover {
    color: var(--primary-blue);
}

.sub-nav-item.active {
    color: #64748b;
    font-weight: 600;
}

.main-content {
    flex: 1;
    padding: 40px 50px;
    overflow-y: auto;
    background: var(--bg-light);
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.menu-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    text-decoration: none;
    color: var(--primary-blue);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid #f1f5f9;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: #e2e8f0;
}

.icon-box {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 2px solid #f1f5f9;
    transition: border-color 0.3s;
}

.menu-card:hover .icon-box {
    border-color: #cbd5e1;
}

.icon-box i {
    font-size: 28px;
    color: var(--primary-orange);
}

.menu-card h3 {
    margin: 0 0 8px 0;
    font-weight: 800;
    font-size: 16px;
}

.menu-card p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.search-container {
    margin-bottom: 25px;
    position: relative;
    max-width: 600px;
}

.search-container i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
}

.search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 15px 14px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--primary-blue);
    transition: all 0.3s ease;
    background-color: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(230, 92, 0, 0.1);
}

/* TABLE STYLES */
.table-responsive {
    overflow: auto;
    max-height: calc(100vh - 250px);
    /* Garante que a barra de rolagem fique sempre visivel */
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
}

.data-table tbody tr:hover {
    background-color: #f1f5f9;
}

.btn-primary {
    background-color: var(--primary-orange);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #cc5200;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* MODAL STYLES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-blue);
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #64748b;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
}

.filter-input {
    width: 100%;
    padding: 5px 8px;
    font-size: 11px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-weight: normal;
    outline: none;
}

.filter-input:focus {
    border-color: var(--primary-orange);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.input-group input {
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary-orange);
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8fafc;
}

.btn-secondary {
    background: #e2e8f0;
    color: #475569;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-orange);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- MOBILE RESPONSIVE DASHBOARD --- */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: var(--primary-blue);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 8;
}

.sidebar-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 9;
        width: 260px;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        padding: 20px 15px;
        width: 100%;
        margin-top: 40px;
    }

    .app-layout {
        flex-direction: column;
    }

    .modal-box {
        width: 95%;
        padding: 25px;
        max-height: 90vh;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .table-responsive {
        border-radius: 8px;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }
}

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #10b981;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.error {
    background: #ef4444;
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 20px;
}

/* Estilos de Salas de Reunião migraram para css/features/salas.css (Camada 7, 4/13). */

/* A aba "Relatorio DF" foi removida na Fase 7 do plano dfs-v2, substituida por "Demonstracoes"
   (css/features/demonstracoes.css). O unico estilo dela que sobreviveu e o da drop-zone, usada por
   outras features, e que agora mora em css/shared/fileDropZone.css. */

/* Feature Onboarding removida em 2026-07-14 (decisão de produto — ver
   docs/refactoring/38-RESULTADO-REMOCAO-ONBOARDING.md). As classes .ob-* que viviam aqui desde
   antes desta refatoração (.ob-section, .ob-sec-header, .ob-grid, .ob-field, .ob-input etc.)
   foram removidas junto com o resto da feature. */
