:root {
            --primary-color: #2563eb;
            --secondary-color: #64748b;
            --success-color: #059669;
            --warning-color: #d97706;
            --danger-color: #dc2626;
            --dark-color: #1e293b;
            --light-color: #f8fafc;
            --sidebar-width: 280px;
            --sidebar-collapsed-width: 70px;
            --header-height: 70px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f1f5f9;
    overflow-x: hidden;
}

.actions-cell {
    white-space: nowrap;
    min-width: 150px;
}

.actions-cell .btn {
    margin: 0 2px;
    font-size: 0.85em;
}

.liberacao-row.processada {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.status-badge.status-liberado {
    background-color: #28a745;
    color: white;
}

.status-badge.status-rejeitado {
    background-color: #dc3545;
    color: white;
}

.loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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


/* =========================
   NOVA TELA DE LOGIN
========================= */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #2563eb 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" style="stop-color:rgba(255,255,255,0.1)"/><stop offset="100%" style="stop-color:rgba(255,255,255,0)"/></radialGradient></defs><circle cx="200" cy="200" r="150" fill="url(%23a)" opacity="0.3"><animate attributeName="cx" values="200;800;200" dur="20s" repeatCount="indefinite"/></circle><circle cx="800" cy="800" r="200" fill="url(%23a)" opacity="0.2"><animate attributeName="cy" values="800;200;800" dur="15s" repeatCount="indefinite"/></circle></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    0%, 100% { transform: translateX(0px) translateY(0px) rotate(0deg); }
    33% { transform: translateX(30px) translateY(-30px) rotate(120deg); }
    66% { transform: translateX(-20px) translateY(20px) rotate(240deg); }
}

.login-wrapper {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    margin: 1rem;
    min-height: 500px;
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}

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

.login-brand {
    position: relative;
    z-index: 2;
    text-align: center;
}

.brand-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.brand-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.brand-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.login-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.login-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.login-features i {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.login-right {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-form-header h2 {
    color: var(--dark-color);
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.login-form-header p {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.form-input:focus + .form-icon {
    color: var(--primary-color);
}

.btn-login-new {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-login-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-login-new:hover::before {
    left: 100%;
}

.btn-login-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
}

.btn-login-new:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.login-footer small {
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(5, 150, 105, 0.1);
    color: var(--success-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Responsividade para login */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
        margin: 0.5rem;
        max-width: 400px;
    }
    
    .login-left {
        padding: 2rem;
        min-height: 200px;
    }
    
    .login-right {
        padding: 2rem;
    }
    
    .brand-title {
        font-size: 1.5rem;
    }
    
    .brand-subtitle {
        font-size: 0.95rem;
    }
    
    .login-features {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        margin: 0.25rem;
    }
    
    .login-left, .login-right {
        padding: 1.5rem;
    }
}

/* ===== LAYOUT PRINCIPAL DO SISTEMA ===== */
.main-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--dark-color) 0%, #0f172a 100%);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

/* SIDEBAR COLLAPSED - NOVA FUNCIONALIDADE */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* === SEÇÃO DE USUÁRIO NO SIDEBAR === */
.sidebar-user-section {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.sidebar-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user-details {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-user-name {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-dropdown-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.sidebar-user-dropdown-toggle:hover {
    color: white;
    transform: scale(1.1);
}

.sidebar-user-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0;
}

.sidebar-user-menu.open {
    max-height: 200px;
    margin-top: 0.75rem;
}

.sidebar-user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.sidebar-user-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.sidebar-user-menu-item i {
    width: 16px;
    text-align: center;
}

/* Quando sidebar está recolhida */
.sidebar.collapsed .sidebar-user-section {
    padding: 1rem 0.5rem;
}

.sidebar.collapsed .sidebar-user-avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    margin: 0 auto;
}

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

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

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    position: relative;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.version {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* BOTÃO DE RECOLHER - NOVA FUNCIONALIDADE */
.sidebar-collapse-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar.collapsed .sidebar-collapse-btn {
    right: 50%;
    transform: translateX(50%);
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-version,
.sidebar.collapsed .menu-item span,
.sidebar.collapsed .dropdown-arrow {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.sidebar-menu {
    padding: 1rem 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(5px);
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 0.75rem;
}

/* TOOLTIPS - NOVA FUNCIONALIDADE */

.badge-pendentes-menu:hover::after {
    content: 'Anotações pendentes';
    position: absolute;
    top: -30px;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.menu-tooltip {
    position: absolute;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    pointer-events: none;
}

.menu-tooltip::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: rgba(0, 0, 0, 0.9);
}

.sidebar.collapsed .menu-item:hover .menu-tooltip {
    opacity: 1;
    visibility: visible;
}

/* SUBMENUS - MELHORADOS */
.menu-item-dropdown {
    position: relative;
}

.menu-dropdown-toggle {
    justify-content: space-between;
}

.dropdown-arrow {
    width: auto !important;
    font-size: 0.8rem !important;
    transition: transform 0.3s ease;
}

.menu-dropdown-toggle.open .dropdown-arrow {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    margin-left: 0;
}

.submenu.open {
    max-height: 300px;
    padding: 0.5rem 0;
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.5rem 0.6rem 3rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.badge-pendentes-menu {
    background: #dc3545 !important;
    color: white !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 10px !important;
    font-size: 0.65rem !important;
    font-weight: bold !important;
    margin-left: auto !important;
    min-width: 18px !important;
    text-align: center !important;
    line-height: 1 !important;
    animation: pulse-badge 2s infinite;
}

@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.badge-pendente {
    background: #fef3c7 !important;
    color: #92400e !important;
    padding: 2px 6px !important;
    border-radius: 10px !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    margin-left: auto !important;
    min-width: 18px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
}

/* Animação para badge quando atualizado */
.badge-pendente.updated {
    animation: badgePulse 0.6s ease-in-out;
}

/* Animação sutil para chamar atenção */
@keyframes pulse-badge {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.8; 
    }
}


.submenu-item:hover,
.submenu-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(5px);
}

.submenu-item.active {
    background: rgba(37, 99, 235, 0.3);
    border-left: 3px solid var(--primary-color);
}

.submenu-item i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
}

/* Submenu item com badge */
.submenu-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.submenu-item .badge-pendente {
    margin-left: 0.5rem !important;
}

/* Hover effect para o item de anotações */
.submenu-item:hover .badge-pendente {
    background: #fcd34d !important;
    transform: scale(1.05);
}

/* Responsividade */
@media (max-width: 768px) {
    .badge-pendente {
        font-size: 0.6rem !important;
        padding: 1px 4px !important;
        min-width: 16px !important;
    }
}

.sidebar.collapsed .menu-dropdown-toggle {
    pointer-events: none;
}

.sidebar.collapsed .submenu {
    display: none;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.collapsed {
    margin-left: var(--sidebar-collapsed-width);
}

.header {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--dark-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
}

.sidebar-toggle:hover {
    background: #f1f5f9;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* === SELETOR DE EMPRESA NO HEADER === */
.company-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.company-selector-wrapper:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.company-selector-icon {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.company-selector {
    border: none;
    background: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
    cursor: pointer;
    outline: none;
    min-width: 200px;
    max-width: 350px;
}

.company-selector:focus {
    outline: none;
}

.company-selector option {
    padding: 0.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.btn-logout {
    background: linear-gradient(135deg, var(--danger-color), #b91c1c);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-logout:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-1px);
    color: white;
}

.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 2rem;
    text-align: center;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin: 0;
}

/* ===== ESTILOS ESPECÍFICOS DO DASHBOARD ===== */
.dashboard-container {
    padding: 0;
    margin: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-kpi-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.dashboard-kpi-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: dashboard-shimmer 3s infinite;
}

@keyframes dashboard-shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.dashboard-kpi-card.success { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.dashboard-kpi-card.warning { background: linear-gradient(135deg, #ff8a00 0%, #e52e71 100%); }
.dashboard-kpi-card.info { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.dashboard-kpi-card.danger { background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%); }

.dashboard-kpi-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.dashboard-kpi-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.dashboard-kpi-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.dashboard-chart-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    margin-bottom: 1.5rem;
}

.dashboard-chart-card:hover {
    transform: translateY(-2px);
}

.dashboard-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
}

.dashboard-chart-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
}

.dashboard-chart-subtitle {
    color: #64748b;
    font-size: 0.85rem;
}

.dashboard-bar-chart {
    display: flex;
    align-items: end;
    height: 160px;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.dashboard-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-bar {
    width: 100%;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dashboard-bar:hover {
    transform: scaleY(1.1);
    filter: brightness(1.1);
}

.dashboard-bar-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-bar:hover .dashboard-bar-value {
    opacity: 1;
}

.dashboard-bar-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
}

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

.dashboard-products-table th,
.dashboard-products-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-products-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-products-table tr:hover {
    background: #f8fafc;
}

.dashboard-product-name {
    font-weight: 600;
    color: #1e293b;
}

.dashboard-sales-count {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.dashboard-revenue-amount {
    font-weight: 700;
    color: #2563eb;
}

.dashboard-occupancy-meter {
    background: #e2e8f0;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin: 1rem 0;
}

.dashboard-occupancy-fill {
    height: 100%;
    background: linear-gradient(90deg, #059669 0%, #10b981 100%);
    border-radius: 10px;
    transition: width 1s ease;
    position: relative;
}

.dashboard-occupancy-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: dashboard-slide 2s infinite;
}

@keyframes dashboard-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.dashboard-occupancy-text {
    text-align: center;
    font-weight: 600;
    color: #1e293b;
    margin-top: 0.5rem;
}

/* ===== CORREÇÕES PARA MENU MOBILE ===== */

/* Responsividade aprimorada para mobile */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%) !important; /* SEMPRE COMEÇA FECHADO - IMPORTANTE! */
        z-index: 9999;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: fixed !important; /* Garantir que seja fixed */
        width: var(--sidebar-width);
        height: 100vh;
        left: 0;
        top: 0;
        overflow-y: auto;
        /* Remover qualquer classe collapsed em mobile */
        width: var(--sidebar-width) !important;
    }
    
    /* SÓ ABRE quando tem a classe 'show' */
    .sidebar.show {
        transform: translateX(0) !important;
        box-shadow: 0 0 30px rgba(0,0,0,0.6);
    }

        .badge-pendentes-menu {
        font-size: 0.6rem !important;
        padding: 0.15rem 0.3rem !important;
        min-width: 16px !important;
    }
    
    /* IMPORTANTE: Remover collapsed em mobile */
    .sidebar.collapsed {
        width: var(--sidebar-width) !important;
        transform: translateX(-100%) !important;
    }
    
    .sidebar.collapsed.show {
        transform: translateX(0) !important;
    }
    
    /* REMOVER BOTÃO X COMPLETAMENTE */
    .sidebar-close-btn {
        display: none !important;
    }
    
    /* Esconder botão collapse no mobile */
    .sidebar-collapse-btn {
        display: none !important;
    }
    
    /* Overlay escuro quando menu mobile está aberto */
    .sidebar.show::before {
        content: '';
        position: fixed;
        top: 0;
        left: var(--sidebar-width);
        width: calc(100vw - var(--sidebar-width));
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: -1;
        animation: fadeIn 0.3s ease;
    }
    
    /* Main content sempre sem margem no mobile */
    .main-content {
        margin-left: 0 !important; /* SEMPRE sem margem no mobile */
        width: 100% !important;
        position: relative;
        z-index: 1;
        transition: none; /* Remover transição em mobile */
    }
    
    .main-content.collapsed {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Header do mobile OTIMIZADO */
    .sidebar-toggle {
        display: flex !important;
        background: rgba(0,0,0,0.05);
        border-radius: 8px;
        padding: 0.75rem;
        transition: all 0.3s ease;
        touch-action: manipulation;
        align-items: center;
        justify-content: center;
        min-width: 44px; /* Tamanho mínimo para toque */
        min-height: 44px;
    }
    
    .sidebar-toggle:hover,
    .sidebar-toggle:active {
        background: rgba(0,0,0,0.1);
        transform: scale(1.02);
    }
    
    /* Header mobile otimizado */
    .header {
        padding: 0.75rem 1rem !important;
        min-height: 60px;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    
    .header-left {
        flex: 1;
        min-width: 0;
        gap: 0.5rem;
    }
    
    .header-title {
        font-size: 1.1rem !important;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
    
    .header-right {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        max-width: 40%;
    }
    
    /* Company selector em mobile */
    .company-selector-wrapper {
        padding: 0.4rem 0.75rem;
        max-width: 200px;
    }

    .company-selector {
        min-width: 150px;
        max-width: 200px;
        font-size: 0.85rem;
    }

    .company-selector-icon {
        font-size: 0.9rem;
    }

    /* Sidebar user section em mobile */
    .sidebar-user-section {
        padding: 0.75rem 1rem;
    }

    .sidebar-user-avatar {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .sidebar-user-name {
        font-size: 0.85rem;
    }

    /* User info horizontal em mobile */
    .user-info {
        flex-direction: row !important; /* MUDANÇA: era column */
        align-items: center;
        gap: 0.5rem;
        text-align: left !important; /* MUDANÇA: era center */
        min-width: 0;
    }

    .user-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem !important;
        flex-shrink: 0;
    }

    .user-info > div {
        display: none; /* Esconder nome/empresa em mobile */
    }
    
    /* Botão Sair otimizado */
    .btn-logout {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
        gap: 0.25rem;
        white-space: nowrap;
        min-width: auto;
        flex-shrink: 0;
    }
    
    .btn-logout .fas {
        font-size: 0.9rem;
    }
    
    .content {
        padding: 1rem !important;
    }
    
    /* CRÍTICO: Prevenir scroll quando menu estiver aberto */
    body.menu-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Melhorar toque nos itens do menu */
    .menu-item {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        min-height: 48px; /* Altura mínima para toque */
        display: flex;
        align-items: center;
    }
    
    /* Melhorar visibilidade do menu ativo */
    .menu-item.active {
        background: rgba(255,255,255,0.15) !important;
        border-left: 4px solid var(--primary-color);
    }
    
    /* Tooltips não aparecem em mobile */
    .menu-tooltip {
        display: none !important;
    }
    
    /* DASHBOARD RESPONSIVO */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-kpi-card {
        padding: 1.25rem;
    }
    
    .dashboard-kpi-value {
        font-size: 1.8rem;
    }
    
    .dashboard-chart-card {
        padding: 1.25rem;
    }
    
    .dashboard-bar-chart {
        height: 140px;
    }
}

/* Melhorias para telas muito pequenas */
@media (max-width: 576px) {
    .sidebar {
        width: 280px !important; /* Sidebar um pouco menor em telas pequenas */
    }
    
    .sidebar.show::before {
        left: 280px;
        width: calc(100vw - 280px);
    }
    
    .header-right {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .user-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
    }
    
    /* DASHBOARD EM TELAS PEQUENAS */
    .dashboard-kpi-card {
        padding: 1rem;
        text-align: center;
    }
    
    .dashboard-kpi-icon {
        font-size: 2rem;
    }
    
    .dashboard-kpi-value {
        font-size: 1.5rem;
    }
    
    .dashboard-chart-header {
        flex-direction: column;
        text-align: center;
    }
    
    .dashboard-products-table {
        font-size: 0.8rem;
    }
    
    .dashboard-products-table th,
    .dashboard-products-table td {
        padding: 0.5rem;
    }
}

/* Animação para o overlay */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Para desktop - comportamento normal */
@media (min-width: 769px) {
    .sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .main-content.collapsed {
        margin-left: var(--sidebar-collapsed-width);
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .sidebar-close-btn {
        display: none;
    }
}

/* ===== RESPONSIVO EXTRA PEQUENO ===== */
@media (max-width: 480px) {
    .header-title {
        font-size: 1rem !important;
        max-width: 120px;
    }
    
    .btn-logout {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
    
    .btn-logout span {
        display: none; /* Esconder texto "Sair" */
    }
    
    .header-right {
        max-width: 50%;
    }
}

/* ===== LANDSCAPE EM CELULARES ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 0.5rem 1rem !important;
        min-height: 50px;
    }
    
    .header-title {
        font-size: 1rem !important;
    }
    
    .user-avatar {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.75rem !important;
    }
    
    .btn-logout {
        padding: 0.375rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
}


/* ===== ESTILOS PARA LOGO E SUB-MENUS ===== */

/* Logo Container */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.sidebar-logo {
    max-width: 100%;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* Quando sidebar estiver recolhida, ajustar logo */
.sidebar.collapsed .sidebar-logo {
    max-height: 35px;
}

.sidebar.collapsed .logo-container {
    margin-bottom: 0.25rem;
}

/* Menu dropdown aprimorado */
.menu-item-dropdown {
    position: relative;
}

.menu-dropdown-toggle {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.menu-dropdown-toggle:hover {
    color: white;
    text-decoration: none;
}

.dropdown-arrow {
    width: auto !important;
    font-size: 0.8rem !important;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.menu-dropdown-toggle.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Sub-menu melhorado */
.submenu {
    max-height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin-left: 0;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.submenu.open {
    max-height: 300px;
    padding: 0.5rem 0;
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.5rem 0.6rem 3rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
}

.submenu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transform: translateX(5px);
}

.submenu-item.active {
    background: rgba(37, 99, 235, 0.3);
    color: white;
    border-left: 3px solid var(--primary-color);
}

.submenu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.submenu-item i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
}

/* Quando sidebar estiver recolhida */
.sidebar.collapsed .menu-dropdown-toggle {
    pointer-events: none;
}

.sidebar.collapsed .submenu {
    display: none;
}

.sidebar.collapsed .dropdown-arrow {
    display: none;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .sidebar-logo {
        max-height: 45px;
    }
    
    .submenu-item {
        padding: 0.7rem 1rem 0.7rem 2.5rem;
        min-height: 48px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .dropdown-arrow {
        font-size: 0.9rem !important;
    }
}

/* ===== ESTILOS DO DASHBOARD PRINCIPAL - VERSÃO OTIMIZADA ===== */

/* IMPORTANTE: Remover padding/margin do content principal quando dashboard estiver ativo */
.content:has(.dashboard-main-container) {
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
}

/* Container principal do dashboard ocupando toda a viewport */
.dashboard-main-container {
    margin-left: var(--sidebar-width);
    margin-top: 0 !important;
    height: 100vh !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    padding: 0;
    top: 0;
    z-index: 1;
}

/* Ajustar para mobile */
.main-content:has(.dashboard-main-container) {
    margin-left: 0 !important;
}

/* Sistema de partículas animadas - OTIMIZADO PARA PERFORMANCE */
.dashboard-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

/* Partículas menores e mais sutis */
.dashboard-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: dashboardParticleFloat 8s infinite linear;
    will-change: transform, opacity;
}

/* Variações mais sutis */
.dashboard-particle:nth-child(odd) {
    width: 1px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
    animation-duration: 10s;
}

.dashboard-particle:nth-child(3n) {
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    animation-duration: 6s;
}

/* Animação otimizada para performance */
@keyframes dashboardParticleFloat {
    0% {
        opacity: 0;
        transform: translate3d(0, 100vh, 0) rotate(0deg);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(20px, -50px, 0) rotate(360deg);
    }
}

/* Seção de boas-vindas SEM ESPAÇO SUPERIOR */
.dashboard-welcome-section {
    text-align: center;
    color: white;
    padding: calc(var(--header-height) + 1rem) 2rem 3rem;
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow-y: auto;
}

.dashboard-welcome-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: dashboardFadeInUp 1s ease-out;
}

.dashboard-welcome-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    animation: dashboardFadeInUp 1s ease-out 0.2s both;
}

@keyframes dashboardFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid de módulos */
.dashboard-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 10;
    padding: 0 2rem;
    animation: dashboardFadeInUp 1s ease-out 0.4s both;
}

/* Cards dos módulos */
.dashboard-module-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    color: white;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    will-change: transform;
}

/* Efeito de brilho nos cards */
.dashboard-module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.dashboard-module-card:hover::before {
    left: 100%;
}

/* Hover effects dos cards */
.dashboard-module-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.15);
}

.dashboard-module-card:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Ícones dos módulos */
.dashboard-module-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    transition: transform 0.3s ease;
}

.dashboard-module-card:hover .dashboard-module-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Títulos dos módulos */
.dashboard-module-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

/* Descrições dos módulos */
.dashboard-module-description {
    font-size: 0.875rem;
    opacity: 0.8;
    line-height: 1.4;
    transition: opacity 0.3s ease;
}

.dashboard-module-card:hover .dashboard-module-description {
    opacity: 1;
}

/* Responsividade mobile - ajustar para tela cheia */
@media (max-width: 768px) {
    .dashboard-main-container {
        margin-left: 0 !important;
        margin-top: 0 !important;
        height: 100vh !important;
    }

    .dashboard-welcome-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .dashboard-welcome-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .dashboard-welcome-section {
        padding: 1rem 0.75rem 1.5rem;
        justify-content: flex-start;
        padding-top: 1rem;
    }

    .dashboard-modules-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0 0.75rem;
        max-width: 100%;
    }

    .dashboard-module-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .dashboard-module-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .dashboard-module-title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .dashboard-module-description {
        font-size: 0.75rem;
        line-height: 1.3;
    }
}

/* Mobile pequeno - mantém 2 colunas */
@media (max-width: 480px) {
    .dashboard-welcome-title {
        font-size: 1.3rem;
    }

    .dashboard-welcome-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .dashboard-modules-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        padding: 0 0.6rem;
    }

    .dashboard-module-card {
        padding: 0.85rem;
    }

    .dashboard-module-icon {
        font-size: 1.8rem;
    }

    .dashboard-module-title {
        font-size: 0.9rem;
    }

    .dashboard-module-description {
        font-size: 0.7rem;
    }
}

/* ========================================
   OTIMIZAÇÃO GLOBAL DE ESPAÇAMENTOS
   Reduz padding/margin para melhor aproveitamento do espaço
======================================== */

/* Formulários mais compactos */
.form-group {
    margin-bottom: 1rem !important; /* Era 1.5rem */
    gap: 0.4rem !important;
}

.form-section {
    padding: 1rem 1.5rem !important; /* Era 2rem */
}

/* Headers de páginas mais compactos */
.page-header,
.parametros-header,
.vendas-header,
.anotacoes-header {
    padding: 1rem 1.5rem !important;
    margin-bottom: 1rem !important;
}

/* Cards e seções mais compactas */
.account-item,
.produto-item,
.pagamento-item,
.historico-item,
.liberacao-card,
.sessao-item {
    padding: 0.85rem 1rem !important; /* Era 1.5rem */
}

/* Grids com gaps menores */
.form-grid,
.filtros-form,
.products-grid,
.content-grid {
    gap: 1rem !important; /* Era 1.5rem ou 2rem */
}

/* Labels e inputs mais próximos */
.form-label {
    margin-bottom: 0.4rem !important; /* Era 0.5rem ou 0.75rem */
    font-size: 0.875rem !important;
}

.form-input,
.form-select,
.form-control {
    padding: 0.65rem 0.85rem !important; /* Era 0.75rem 1rem */
    font-size: 0.9rem !important;
}

/* Seções de cards mais compactas */
.overview-card,
.kpi-card,
.dashboard-kpi-card {
    padding: 1.2rem !important; /* Era 1.5rem ou 2rem */
}

/* Listas mais compactas */
.accounts-list,
.produtos-list,
.sessoes-list {
    max-height: 500px !important; /* Era 400px - aumenta visualização */
}

/* Títulos de seção menores */
.section-title {
    font-size: 1.1rem !important;
    margin-bottom: 0.75rem !important; /* Era 1rem ou 1.5rem */
}

/* Headers de tabelas mais compactos */
.table-header,
.section-header {
    padding: 1rem 1.5rem !important; /* Era 1.5rem ou 2rem */
}

/* Containers gerais */
.parametros-container,
.transferencia-container,
.vendas-container,
.anotacoes-container {
    padding: 0.75rem !important; /* Era 1rem ou 1.5rem */
}

/* Modais mais compactos */
.modal-content {
    padding: 1.25rem !important; /* Era 1.5rem ou 2rem */
}

/* Botões mais compactos */
.btn,
.btn-account,
.btn-filter,
.btn-massa {
    padding: 0.6rem 1rem !important; /* Era 0.75rem 1.5rem */
    font-size: 0.875rem !important;
}

/* Info boxes mais compactas */
.account-info h4,
.produto-nome,
.sessao-title {
    margin-bottom: 0.4rem !important; /* Era 0.5rem */
    font-size: 0.95rem !important;
}

.account-description,
.produto-detalhes,
.sessao-info {
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
}

/* Headers de detalhes mais compactos */
.account-header,
.sessao-header {
    margin-bottom: 0.6rem !important; /* Era 1rem */
}

/* Filtros compactos */
.filtros-compactos,
.filtros-section {
    padding: 1rem 1.5rem !important; /* Era 2rem */
    margin-bottom: 1rem !important;
}

.filtro-campo,
.form-group {
    gap: 0.3rem !important;
}

/* Abas mais compactas */
.tab-button {
    padding: 0.75rem 1rem !important; /* Era 1rem */
    font-size: 0.875rem !important;
}

.tab-content {
    padding: 1.25rem !important; /* Era 2rem */
}

/* Cards de overview mais compactos */
.overview-cards {
    gap: 1rem !important; /* Era 1.5rem */
}

/* Ajustes específicos para mobile */
@media (max-width: 768px) {
    .form-section,
    .page-header,
    .parametros-header,
    .vendas-header {
        padding: 0.75rem 1rem !important;
    }
    
    .account-item,
    .produto-item,
    .liberacao-card {
        padding: 0.75rem !important;
    }
    
    .form-grid,
    .filtros-form {
        gap: 0.75rem !important;
    }
    
    .overview-card,
    .kpi-card {
        padding: 1rem !important;
    }
    
    .container,
    .parametros-container,
    .vendas-container {
        padding: 0.5rem !important;
    }
    
    .modal-content {
        padding: 1rem !important;
    }
}

/* Para telas muito pequenas */
@media (max-width: 480px) {
    .form-section {
        padding: 0.6rem 0.8rem !important;
    }
    
    .account-item,
    .produto-item {
        padding: 0.6rem !important;
    }
    
    .form-input,
    .form-select {
        padding: 0.55rem 0.75rem !important;
    }
}


/* Melhorias de acessibilidade e performance */
@media (prefers-reduced-motion: reduce) {
    .dashboard-particle {
        animation: none;
    }
    
    .dashboard-module-card {
        transition: none;
    }
    
    .dashboard-module-card::before {
        display: none;
    }
    
    .dashboard-welcome-title,
    .dashboard-welcome-subtitle,
    .dashboard-modules-grid {
        animation: none;
    }
}

/* ================================================================
   SUBMENU NÍVEL 2 - Transportadoras e outros submenus aninhados
   ================================================================ */
.submenu-level-2 {
    display: none;
    background-color: rgba(0, 0, 0, 0.1);
    border-left: 3px solid #667eea;
    padding-left: 1rem;
    margin-top: 0.25rem;
}

.submenu-level-2.open {
    display: block;
}

.submenu-item-l2 {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
    border-radius: 6px;
    margin: 0.2rem 0;
}

.submenu-item-l2:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding-left: 1.2rem;
}

.submenu-item-l2.active {
    background-color: rgba(102, 126, 234, 0.3);
    color: #fff;
    font-weight: 600;
}

.submenu-item-l2 i {
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

.submenu-expandable {
    cursor: pointer;
    position: relative;
}

.dropdown-arrow-sub {
    margin-left: auto;
    transition: transform 0.3s;
    font-size: 0.75rem;
}

.submenu-expandable.open .dropdown-arrow-sub {
    transform: rotate(180deg);
}