/* ===== RESPONSIVE DESIGN - Media Queries ===== */
/* 
  Breakpoints:
  - Mobile: até 480px
  - Tablet: 481px até 768px
  - Desktop: 769px até 1024px
  - Large Desktop: 1025px+
  
  ⚠️ IMPORTANTE: Todos os elementos usam box-sizing: border-box
*/

/* ===== HIDE/SHOW CLASSES ===== */
.d-none-mobile {
    display: none !important;
}

.d-none-tablet {
    display: block !important;
}

.d-none-desktop {
    display: block !important;
}

/* ===== MOBILE ONLY - até 480px ===== */
@media (max-width: 480px) {
    /* Main padding - Gerenciado no footer-fix.css */
    /* Não adicione padding-bottom aqui - use apenas footer-fix.css */
    
    /* General */
    html {
        font-size: 14px;
    }
    
    body {
        font-size: var(--font-size-base);
    }
    
    /* Typography */
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1rem;
    }
    
    h4, h5, h6 {
        font-size: var(--font-size-base);
    }
    
    /* Display classes */
    .d-none-mobile {
        display: none !important;
    }
    
    .d-block-mobile {
        display: block !important;
    }
    
    /* Spacing */
    .container-fluid,
    .container-public,
    .section-public {
        padding-top: var(--spacing-md) !important;
        padding-bottom: var(--spacing-md) !important;
        padding-left: var(--safe-margin-lr) !important;
        padding-right: var(--safe-margin-lr) !important;
        box-sizing: border-box !important;
    }
    
    /* Container - Margens laterais de segurança para tablet e mobile */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: var(--safe-margin-lr) !important;
        padding-right: var(--safe-margin-lr) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Tables */
    .table-container {
        border-radius: 0;
        margin-bottom: 1rem;
    }
    
    /* Buttons */
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    /* Cards */
    .card-public,
    .card {
        margin-bottom: 0px;
    }
    
    /* Notification panel */
    .notification-panel {
        max-height: 80vh !important;
    }
}

/* ===== TABLET - 481px até 768px ===== */
@media (min-width: 481px) and (max-width: 768px) {
    /* Main padding - Gerenciado no footer-fix.css */
    /* Não adicione padding-bottom aqui - use apenas footer-fix.css */
    
    /* Display classes */
    .d-none-tablet {
        display: none !important;
    }
    
    .d-block-tablet {
        display: block !important;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Spacing */
    .container-fluid,
    .container-public,
    .section-public {
        padding-top: var(--spacing-lg);
        padding-bottom: var(--spacing-lg);
        padding-left: var(--safe-margin-lr);
        padding-right: var(--safe-margin-lr);
        box-sizing: border-box;
    }
    
    /* Container - Margens laterais de segurança para tablet e mobile */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: var(--safe-margin-lr) !important;
        padding-right: var(--safe-margin-lr) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }
    
    /* Melhorar cards em tablet */
    .card {
        margin-bottom: 0px;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    /* Grids em tablet */
    .row {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
    
    .col-md-6,
    .col-lg-3,
    .col-lg-4 {
        flex: 0 0 auto;
    }
    
    /* Melhorar componentes de patrimônio */
    .patrimonio-item {
        padding: 1rem !important;
        min-height: 150px;
    }
    
    .icon-patrimonio {
        font-size: 2rem !important;
    }
    
    /* Melhorar KPI cards */
    .kpi-card {
        min-height: 110px;
    }
    
    .kpi-icon {
        width: 50px;
        height: 50px;
    }
    
    /* Botões em tablet */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
    
    /* Melhorar tabelas */
    .table {
        font-size: 0.9rem;
    }
    
    .table thead th {
        padding: 0.75rem 0.5rem;
    }
    
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }
}

/* ===== DESKTOP - 769px até 1024px ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Main padding - Gerenciado no footer-fix.css */
    /* Não adicione padding-bottom aqui - use apenas footer-fix.css */
    
    /* Display classes */
    .d-none-desktop {
        display: none !important;
    }
    
    .d-block-desktop {
        display: block !important;
    }
    
    /* Container - Margens laterais de segurança para desktop pequeno */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: var(--safe-margin-lr) !important;
        padding-right: var(--safe-margin-lr) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }
}

/* ===== LARGE DESKTOP - 1025px+ ===== */
@media (min-width: 1025px) {
    /* Main padding - Gerenciado no footer-fix.css */
    /* Não adicione padding-bottom aqui - use apenas footer-fix.css */
    
    #main-content {
        margin-left: 260px;
        width: calc(100% - 260px);
    }
    
    body.sidebar-collapsed #main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
    }
    
    .sidebar-toggle-floating {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .topbar-toggle-mobile {
        display: none !important;
    }
    
    .container-fluid {
        padding: var(--spacing-xl);
    }
    
    .row.g-3 {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 1.5rem;
    }
    
    .kpi-card {
        min-height: 120px;
    }
    
    .patrimonio-item {
        min-height: 180px;
    }
    
    /* Display classes */
    .d-none-lg {
        display: none !important;
    }
    
    .d-block-lg {
        display: block !important;
    }
    
    /* Maximum width containers */
    .container-max {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* ===== LANDSCAPE MODE ===== */
@media (orientation: landscape) and (max-height: 500px) {
    body {
        padding-top: 60px;
    }
    
    .sidebar {
        height: 100vh;
    }
    
    #main-content {
        margin-left: 260px;
        width: calc(100% - 260px);
    }
    
    main {
        margin-top: 60px;
    }
}

/* ===== HIGH DPI SCREENS ===== */
@media (min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    /* Adjust font rendering for high dpi */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Slightly thinner borders on high dpi */
    .border,
    .table tbody tr {
        border-width: 0.5px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    /* Hide navigation */
    .navbar-custom,
    .navbar-public,
    .sidebar,
    .topbar {
        display: none !important;
    }
    
    /* Adjust body */
    body {
        padding-top: 0;
    }
    
    main {
        margin-left: 0;
        margin-top: 0;
    }
    
    /* Avoid page breaks in cards */
    .card,
    .table-container {
        page-break-inside: avoid;
    }
    
    /* Remove shadows */
    .card,
    .shadow-sm,
    .shadow-md,
    .shadow-lg {
        box-shadow: none !important;
    }
    
    /* Adjust colors for print */
    body {
        background-color: white;
        color: black;
    }
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== DARK MODE PREFERENCE ===== */
@media (prefers-color-scheme: dark) {
    /* Already using dark theme by default */
    /* Add any additional dark mode tweaks here */
}

@media (prefers-color-scheme: light) {
    /* Light mode preferences */
    body.public-theme {
        color-scheme: light;
    }
}

/* ===== TOUCH DEVICE ENHANCEMENTS ===== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn,
    .btn-icon {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-check-input {
        width: 20px;
        height: 20px;
    }
    
    .pagination-item {
        width: 40px;
        height: 40px;
    }
    
    /* Remove hover effects that don't work on touch */
    .btn:hover {
        transform: none;
    }
    
    .card-public:hover {
        transform: none;
    }
}

/* ===== DASHBOARD RESPONSIVIDADE ===== */

/* Desktop Large (1025px+) */
@media (min-width: 1025px) {
    .container-fluid {
        padding: var(--spacing-xl);
    }
    
    .row.g-3 {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 1.5rem;
    }
    
    .kpi-card {
        min-height: 120px;
    }
    
    .patrimonio-item {
        min-height: 180px;
    }
}

/* Desktop (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container-fluid {
        padding: 1rem;
    }
    
    .row.g-3 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem !important;
    }
    
    .kpi-card .card-body {
        padding: 1rem !important;
    }
}

/* Tablet (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    /* ===== LAYOUT TABLET ===== */
    body.admin-layout {
        flex-direction: row;
    }
    
    /* Sidebar SEMPRE colapsado em tablet - posicionamento FIXO */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 70px !important;
        height: 100vh !important;
        z-index: var(--z-index-sidebar) !important;
        padding-top: var(--spacing-md) !important;
    }
    
    /* Sidebar expandido em tablet (overlay na lateral) */
    body.sidebar-expanded .sidebar {
        width: 260px !important;
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Sidebar header */
    .sidebar-header .logo span {
        display: none !important;
    }
    
    .sidebar-header .logo {
        width: 60px !important;
        height: 60px !important;
        padding: 0 !important;
        margin: 0 !important;
        justify-content: center !important;
    }

    .sidebar-header {
        padding: 0 var(--spacing-md) var(--spacing-sm) var(--spacing-md) !important;
        margin: 0 !important;
        margin-top: -12px !important;
        margin-bottom: 10px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    /* Menu items */
    /* ADMIN sidebar menu items ONLY */
    .sidebar .sidebar-menu li a span {
        display: none !important;
    }
    
    .sidebar .sidebar-menu li a {
        padding: 12px !important;
        justify-content: center !important;
    }
    
    body.sidebar-expanded .sidebar .sidebar-menu li a span {
        display: inline !important;
    }
    
    body.sidebar-expanded .sidebar .sidebar-menu li a {
        padding: 12px 16px !important;
        justify-content: flex-start !important;
    }
    
    /* Tooltip no hover quando colapsado - APENAS para ADMIN sidebar */
    .sidebar .sidebar-menu li a:hover::after,
    .admin-layout .sidebar-menu li a:hover::after {
        display: block !important;
        position: absolute !important;
        left: 70px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        background-color: rgba(158, 13, 187, 0.2) !important;
        color: var(--color-accent-primary) !important;
        padding: 0.5rem 1rem !important;
        border-radius: 0.5rem !important;
        white-space: nowrap !important;
        z-index: var(--z-index-tooltip) !important;
        content: attr(data-tooltip) !important;
    }
    
    /* PUBLIC sidebar - remover tooltip */
    .sidebar-menu-link:hover::after,
    .sidebar-menu-link:focus::after {
        display: none !important;
    }
    
    body.sidebar-expanded .sidebar .sidebar-menu li a:hover::after,
    body.sidebar-expanded .admin-layout .sidebar-menu li a:hover::after {
        display: none !important;
    }
    
    /* Sidebar footer tablet */
    .sidebar-footer {
        margin-top: auto !important;
        padding-top: var(--spacing-md) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        width: 100% !important;
        padding: var(--spacing-md) 0 !important;
    }
    
    .sidebar-logout {
        padding: 12px !important;
        justify-content: center !important;
    }
    
    .sidebar-logout span {
        display: none !important;
    }
    
    body.sidebar-expanded .sidebar-footer {
        padding: var(--spacing-md) !important;
    }
    
    body.sidebar-expanded .sidebar-logout {
        padding: 12px 16px !important;
        justify-content: flex-start !important;
    }
    
    body.sidebar-expanded .sidebar-logout span {
        display: inline !important;
    }
    
    /* ===== TOPBAR TABLET ===== */
    .topbar {
        position: fixed !important;
        top: 0 !important;
        left: 70px !important;
        right: 0 !important;
        height: 70px !important;
        width: calc(100% - 70px) !important;
        padding: var(--spacing-md) var(--spacing-lg) !important;
        z-index: var(--z-index-fixed) !important;
        transition: left 0.3s ease !important;
    }
    
    body.sidebar-expanded .topbar {
        left: 260px !important;
        width: calc(100% - 260px) !important;
    }
    
    .topbar-toggle-mobile {
        display: none !important;
    }
    
    .sidebar-toggle-floating {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* ===== TOPBAR USER TABLET ===== */
    .topbar-email-text {
        display: none !important;
    }
    
    .topbar-user-item {
        margin: 0 0.25rem !important;
    }
    
    .topbar-user-item .nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 1.2rem !important;
    }
    
    /* Reduzir espa\u00e7o entre \u00edcones tablet */
    .topbar-nav {
        gap: 5px !important;
    }
    
    /* ===== MAIN CONTENT TABLET ===== */
    #main-content {
        margin-left: 70px !important;
        margin-top: 0 !important;
        width: calc(100% - 70px) !important;
        transition: all 0.3s ease !important;
    }
    
    body.sidebar-expanded #main-content {
        margin-left: 260px !important;
        width: calc(100% - 260px) !important;
    }
    
    main {
        margin-left: 0 !important;
        /*margin-top: 70px !important;*/
        padding-bottom: var(--spacing-xl) !important;
    }
    
    /* ===== OVERLAY TABLET ===== */
    .sidebar-overlay {
        display: none !important;
    }
    
    body.sidebar-expanded .sidebar-overlay {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background-color: rgba(0, 0, 0, 0.5) !important;
        z-index: var(--z-index-dropdown) !important;
    }
    
    /* ===== CONTAINERS TABLET ===== */
    .container-fluid {
        padding: 1rem !important;
        box-sizing: border-box !important;
    }
    
    .row.g-3 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* ===== CARDS TABLET ===== */
    .card {
        margin-bottom: 1rem;
        border-radius: 0.75rem;
        box-sizing: border-box;
        overflow: visible;
    }
    
    .card-header {
        padding: 0.75rem 1rem !important;
        background-color: rgba(158, 13, 187, 0.05);
        box-sizing: border-box;
    }
    
    .card-body {
        padding: 0.75rem !important;
        box-sizing: border-box;
    }
    
    /* ===== KPI CARDS TABLET ===== */
    .kpi-card {
        margin-bottom: 0.75rem;
        min-height: 110px;
        transition: all 0.3s ease;
    }
    
    .kpi-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(158, 13, 187, 0.15);
    }
    
    .kpi-card .card-body {
        padding: 0.75rem !important;
        gap: 0.75rem;
    }
    
    .kpi-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
        flex-shrink: 0;
    }
    
    .kpi-card h3 {
        font-size: 1.1rem;
        margin: 0;
    }
    
    .kpi-card .text-muted {
        font-size: 0.8rem;
    }
    
    /* ===== PATRIMÔNIO ITEMS TABLET ===== */
    .patrimonio-item {
        padding: 1rem !important;
        min-height: 140px;
        transition: all 0.3s ease;
        border-radius: 0.75rem;
    }
    
    .patrimonio-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .icon-patrimonio {
        font-size: 2rem !important;
    }
    
    /* ===== TABLES TABLET ===== */
    .table {
        font-size: 0.85rem;
        margin-bottom: 0;
    }
    
    .table thead th {
        padding: 0.5rem !important;
        background-color: rgba(158, 13, 187, 0.05);
        font-weight: 600;
    }
    
    .table tbody td {
        padding: 0.5rem !important;
        vertical-align: middle;
    }
    
    /* ===== GRID LAYOUT TABLET ===== */
    .col-md-6,
    .col-lg-3,
    .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    @media (min-width: 600px) and (max-width: 768px) {
        .col-md-6,
        .col-lg-4 {
            flex: 0 0 50%;
            max-width: 50%;
        }
    }
    
    /* ===== BUTTONS TABLET ===== */
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* ===== FORMS TABLET ===== */
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .form-control,
    .form-select {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }
    
    /* ===== PAGINATION TABLET ===== */
    .breadcrumb {
        font-size: 0.85rem;
        padding: 0.5rem 0;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* Mobile (até 480px) */
@media (max-width: 480px) {
    /* ===== BODY LAYOUT MOBILE ===== */
    body.admin-layout {
        flex-direction: column;
    }
    
    /* ===== SIDEBAR MOBILE ===== */
    /* Sidebar oculto por padrão - slide da esquerda */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 260px !important;
        height: 100vh !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        z-index: var(--z-index-sidebar) !important;
        overflow-y: auto !important;
    }
    
    /* Sidebar visível quando aberto */
    body.sidebar-expanded .sidebar {
        transform: translateX(0) !important;
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Sidebar header mobile */
    .sidebar-header {
        padding: 0 var(--spacing-md) var(--spacing-sm) var(--spacing-md) !important;
        margin: 0 !important;
        margin-top: -12px !important;
        margin-bottom: 10px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .sidebar-header .logo {
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
        gap: var(--spacing-md) !important;
    }
    
    .sidebar-header .logo span {
        display: inline !important;
        font-size: var(--font-size-lg) !important;
    }
    
    /* Menu items mobile - ADMIN sidebar ONLY */
    .sidebar .sidebar-menu li a span {
        display: inline !important;
    }
    
    .sidebar .sidebar-menu li a {
        padding: 12px 16px !important;
        justify-content: flex-start !important;
    }
    
    /* ADMIN sidebar mobile - sem tooltip */
    .sidebar .sidebar-menu li a:hover::after,
    .admin-layout .sidebar-menu li a:hover::after {
        display: none !important;
    }
    
    /* PUBLIC sidebar mobile - sem tooltip */
    .sidebar-menu-link:hover::after,
    .sidebar-menu-link:focus::after {
        display: none !important;
    }
    
    /* Sidebar footer mobile */
    .sidebar-footer {
        margin-top: auto !important;
        padding-top: var(--spacing-md) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        width: 100% !important;
    }
    
    .sidebar-logout {
        width: 100% !important;
        justify-content: flex-start !important;
    }
    
    .sidebar-logout span {
        display: inline !important;
    }
    
    /* ===== TOPBAR MOBILE ===== */
    .topbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 60px !important;
        padding: 0.5rem 0.25rem !important;
        z-index: var(--z-index-fixed) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0 !important;
        flex-wrap: wrap !important;
    }
    
    /* Topbar toggle button (hamburger) */
    .topbar-toggle-mobile {
        display: inline-flex !important;
        position: relative !important;
        order: -1 !important;
        margin: 0 0.5rem 0 -0.5rem !important;
        padding: 0.5rem !important;
        font-size: 1.3rem !important;
        background: none !important;
        border: none !important;
        color: #ffffff !important;
        cursor: pointer !important;
    }
    
    .topbar-toggle-mobile:hover {
        color: var(--color-accent-primary) !important;
    }
    
    /* Email oculto em mobile */
    .topbar-email-text {
        display: none !important;
    }
    
    /* User item mobile - apenas ícone */
    .topbar-user-item {
        margin: 0 0.25rem !important;
    }
    
    .topbar-user-item .nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 1.2rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Reduzir espa\u00e7o entre \u00edcones */
    .topbar-nav {
        gap: 0.25rem !important;
    }
    
    /* Topbar nav mobile */
    .topbar-nav {
        display: flex !important;
        align-items: center !important;
        margin-left: auto !important;
        gap: 5px !important;
        order: 1 !important;
    }
    
    /* User item mobile */
    .topbar-user-item {
        display: flex !important;
        align-items: center !important;
        padding: 0 !important;
        margin: 0 0.25rem !important;
    }
    
    .topbar-user-item .nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 1.2rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #ffffff !important;
    }
    
    /* Notification items mobile */
    .topbar-nav .nav-item {
        display: flex !important;
        align-items: center !important;
        margin: 0 0.25rem !important;
    }
    
    .topbar-nav .nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 1.1rem !important;
        color: #ffffff !important;
    }
    
    /* ===== OVERLAY MOBILE ===== */
    .sidebar-overlay {
        display: none !important;
    }
    
    body.sidebar-expanded .sidebar-overlay {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background-color: rgba(0, 0, 0, 0.5) !important;
        z-index: var(--z-index-sidebar) !important;
        animation: fadeIn 0.3s ease !important;
    }
    
    /* ===== MAIN CONTENT MOBILE ===== */
    #main-content {
        margin-left: 0 !important;
        width: 100% !important;
        margin-top: 0 !important;
    }
    
    main {
        margin-left: 0 !important;
        margin-top: 0;
        padding-bottom: var(--spacing-xl) !important;
    }
    
    /* ===== FLOATING TOGGLE MOBILE ===== */
    .sidebar-toggle-floating {
        display: none !important;
    }
    
    /* ===== CONTAINERS MOBILE ===== */
    .container-fluid {
        padding: 0.75rem !important;
    }
    
    .row.g-3 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
    
    /* ===== CARDS MOBILE ===== */
    .card {
        margin-bottom: 0.75rem;
        border-radius: 0.5rem !important;
    }
    
    .card-header {
        padding: 0.75rem !important;
    }
    
    .card-body {
        padding: 0.75rem !important;
    }
    
    /* ===== KPI CARDS MOBILE ===== */
    .kpi-card {
        margin-bottom: 0.5rem;
        min-height: 100px;
    }
    
    .kpi-card .card-body {
        gap: 0.75rem !important;
        padding: 0.75rem !important;
    }
    
    .kpi-icon {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    
    .kpi-card .text-muted {
        font-size: 0.75rem !important;
    }
    
    .kpi-card h3 {
        font-size: 1.25rem !important;
    }
    
    /* ===== PATRIMÔNIO ITEMS MOBILE ===== */
    .patrimonio-item {
        padding: 0.75rem !important;
        border-radius: 0.5rem !important;
        min-height: 130px;
    }
    
    .icon-patrimonio {
        font-size: 1.8rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .patrimonio-item h6 {
        font-size: 0.875rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .patrimonio-item h4 {
        font-size: 1.1rem !important;
        margin: 0.25rem 0 !important;
    }
    
    .patrimonio-item small {
        font-size: 0.75rem !important;
    }
    
    /* ===== GRID LAYOUT MOBILE ===== */
    .col-lg-3,
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }
    
    .d-flex {
        /*flex-direction: column !important;*/
        gap: 0.5rem !important;
        /*align-items: flex-start !important;*/
    }
    
    /* ===== LIST GROUP MOBILE ===== */
    .list-group-item {
        padding: 1rem !important;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .list-group-item-action {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .list-group-item h6,
    .list-group-item h6.text-truncate {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        word-wrap: break-word;
        width: 100%;
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }
    
    .list-group-item .badge {
        align-self: flex-start;
        margin-top: 0.25rem !important;
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
    
    .list-group-item small {
        display: block;
        width: 100%;
        font-size: 0.85rem;
    }
    
    /* ===== MODULE CARDS MOBILE ===== */
    .module-card {
        padding: var(--spacing-md) !important;
        min-height: 120px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .module-icon {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem;
    }
    
    .module-card p {
        font-size: 0.85rem !important;
        margin-top: 0.25rem !important;
        margin-bottom: 0.25rem !important;
        word-wrap: break-word;
    }
    
    .module-card small {
        font-size: 0.75rem !important;
    }
    
    /* ===== TYPOGRAPHY MOBILE ===== */
    h1 {
        font-size: 1.25rem !important;
    }
    
    h3 {
        font-size: 1.3rem !important;
    }
    
    small {
        font-size: 0.75rem !important;
    }
    
    /* ===== BUTTONS MOBILE ===== */
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* ===== FORMS MOBILE ===== */
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .form-control,
    .form-select {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }
}



