 /* Oculta o botão hambúrguer em telas grandes (desktop) */
.btn-hamburger {
    display: none;
}
 :root {
        --p: #2563eb;
        --p-hover: #1d4ed8;
        --d: #0f172a;
        --bg: #f8fafc;
        --card: #ffffff;
        --text: #334155;
        --border: #e2e8f0;
    }

    * {
        box-sizing: border-box;
        -webkit-tap-highlight-color: transparent;
    }

    body {
        margin: 0;
        font-family: 'Inter', sans-serif;
        background: var(--bg);
        color: var(--text);
        line-height: 1.5;
    }

    .escondido {
        display: none !important;
    }

    /* ====================== LAYOUT PRINCIPAL ====================== */
    .container {
        display: flex;
        height: 100vh;
        overflow: hidden;
    }

    /* ====================== MENU LATERAL ====================== */
    .menu {
        width: 260px;
        min-width: 260px;
        background: var(--d);
        color: white;
        padding: 24px 20px;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        transition: transform 0.3s ease, left 0.3s ease;
        z-index: 1200;
    }

    .menu-header h2 {
        margin: 0 0 4px;
        font-size: 1.5rem;
        letter-spacing: -0.3px;
    }

    .menu-header p {
        margin: 0 0 24px;
        font-size: 0.8rem;
        color: #94a3b8;
        word-break: break-word;
    }

    .menu nav button {
        background: transparent;
        border: none;
        color: #cbd5e1;
        padding: 12px 16px;
        text-align: left;
        cursor: pointer;
        width: 100%;
        border-radius: 12px;
        margin: 4px 0;
        font-size: 0.9rem;
        font-weight: 500;
        transition: all 0.2s;
    }
    
    .menu nav button.ativo {
    background: rgba(37, 99, 235, 0.2);
    color: white;
    border-left: 3px solid var(--p);
    }

    .menu nav button:hover {
        background: rgba(255, 255, 255, 0.08);
        color: white;
        transform: translateX(4px);
    }

    .btn-sair {
        margin-top: auto;
        color: #f87171 !important;
    }

    .btn-sair:hover {
        background: rgba(248, 113, 113, 0.15) !important;
    }

    /* ====================== CONTEÚDO PRINCIPAL ====================== */
    .conteudo {
        flex: 1;
        padding: 28px 32px;
        overflow-y: auto;
        min-width: 0;
    }

    .tela {
        background: var(--card);
        padding: 28px;
        border-radius: 24px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
        transition: all 0.2s;
    }

    /* ====================== CARDS DASHBOARD ====================== */
    .cards {
        display: flex;
        gap: 20px;
        margin-bottom: 28px;
        flex-wrap: wrap;
    }

    .card {
        flex: 1;
        min-width: 150px;
        background: var(--card);
        border: 1px solid var(--border);
        padding: 24px 16px;
        border-radius: 20px;
        text-align: center;
        cursor: pointer;
        transition: all 0.25s;
    }

    .card span {
        font-size: 2.4rem;
        font-weight: 700;
        color: var(--p);
        display: block;
        line-height: 1.2;
    }

    .card p {
        margin: 8px 0 0;
        font-size: 0.9rem;
        color: #475569;
    }

    .card:hover {
        transform: translateY(-4px);
        border-color: var(--p);
        box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
    }

    .card.warning:hover {
        border-color: #f59e0b;
        box-shadow: 0 12px 24px rgba(245, 158, 11, 0.12);
    }

    /* ====================== ATIVIDADES ====================== */
    .atividades-log {
        background: #f1f5f9;
        padding: 16px;
        border-radius: 20px;
        max-height: 480px;
        overflow-y: auto;
    }

    .log-item {
        border-bottom: 1px solid var(--border);
        padding: 12px 0;
        font-size: 0.85rem;
    }

    .log-item small {
        color: #64748b;
        display: block;
        margin-bottom: 4px;
    }

    .log-item p {
        margin: 0;
    }

    /* ====================== FORMULÁRIOS ====================== */
    .formulario {
        display: flex;
        flex-direction: column;
        gap: 14px;
        max-width: 500px;
    }

    input, select, textarea {
        padding: 12px 14px;
        border: 1px solid var(--border);
        border-radius: 14px;
        font-family: 'Inter', sans-serif;
        font-size: 0.9rem;
        background: white;
        transition: all 0.2s;
        width: 100%;
    }

    input:focus, select:focus, textarea:focus {
        outline: none;
        border-color: var(--p);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

    label {
        font-weight: 500;
        font-size: 0.85rem;
        color: #1e2937;
        margin-bottom: 4px;
    }

    /* ====================== FILTROS INVENTÁRIO ====================== */
    .filtros-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }

    /* ====================== TABELAS ====================== */
    .table-container {
        overflow-x: auto;
        border-radius: 18px;
        border: 1px solid var(--border);
        background: white;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        min-width: 600px;
    }

    th {
        text-align: left;
        background: #f8fafc;
        padding: 14px 16px;
        font-size: 0.85rem;
        font-weight: 600;
        color: #1e2937;
        border-bottom: 1px solid var(--border);
    }

    td {
        padding: 14px 16px;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.9rem;
    }

    tr:last-child td {
        border-bottom: none;
    }

    .btn-ver-ficha {
        background: var(--p);
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 40px;
        font-size: 0.75rem;
        font-weight: 500;
        cursor: pointer;
        transition: 0.2s;
    }

    .btn-ver-ficha:hover {
        background: var(--p-hover);
        transform: scale(1.02);
    }

    /* ====================== MODAL ====================== */
    .modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2000;
        padding: 16px;
    }

    .modal-content {
        background: white;
        padding: 28px;
        border-radius: 28px;
        width: 100%;
        max-width: 500px;
        max-height: 90vh;
        overflow-y: auto;
        position: relative;
        box-shadow: 0 25px 40px rgba(0, 0, 0, 0.25);
    }

    .close {
        position: absolute;
        right: 20px;
        top: 16px;
        font-size: 28px;
        cursor: pointer;
        color: #94a3b8;
        transition: 0.2s;
    }

    .close:hover {
        color: #ef4444;
    }

    /* ====================== LOGIN ====================== */
    .login {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #0f172a 0%, #1e2937 100%);
        padding: 20px;
    }

    .login-box {
        background: white;
        padding: 40px 32px;
        border-radius: 32px;
        width: 100%;
        max-width: 400px;
        text-align: center;
        box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2);
    }

    .login-box h2 {
        font-size: 2rem;
        margin-bottom: 0;
        color: var(--d);
    }

    .login-box button {
        width: 100%;
        margin-top: 8px;
    }

    .link-cadastro {
        font-size: 0.85rem;
        margin-top: 16px;
    }

    .link-cadastro a {
        color: var(--p);
        text-decoration: none;
        font-weight: 500;
    }

    .btn-secundario {
        background: #64748b !important;
        margin-top: 12px;
    }

    /* ====================== CHAMADOS ====================== */
    .lista-cards-chamados {
        margin-top: 24px;
    }

    .card-chamado {
        background: white;
        border: 1px solid var(--border);
        border-radius: 24px;
        padding: 20px;
        margin-bottom: 20px;
        transition: all 0.2s;
    }

    .card-chamado:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
    }

    .badge {
        display: inline-block;
        padding: 6px 14px;
        border-radius: 40px;
        font-size: 0.7rem;
        font-weight: 600;
        color: white;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 12px;
    }

    .card-chamado h4 {
        margin: 8px 0 12px;
        font-size: 1.1rem;
        color: #0f172a;
    }

    .descricao {
        color: #475569;
        margin-bottom: 14px;
        font-size: 0.9rem;
    }

    .feedback {
        background: #f8fafc;
        padding: 12px;
        border-radius: 16px;
        margin: 12px 0;
        border-left: 4px solid #10b981;
        font-size: 0.85rem;
    }

    .foto-chamado {
        width: 100%;
        max-width: 200px;
        height: auto;
        object-fit: cover;
        border-radius: 16px;
        margin: 12px 0;
        cursor: pointer;
        border: 1px solid var(--border);
        transition: 0.2s;
    }

    .foto-chamado:hover {
        transform: scale(1.02);
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
    }

    .acoes-card {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        margin-top: 16px;
    }

    .acoes-card button {
        flex: 1;
        min-width: 110px;
        padding: 12px;
        font-weight: 600;
        border-radius: 40px;
        font-size: 0.8rem;
    }

    .btn-aceitar {
        background: var(--p) !important;
        color: white !important;
    }

    .btn-finalizar {
        background: #10b981 !important;
        color: white !important;
    }

    /* Filtros chamados */
    .abas-chamados {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin: 24px 0 20px;
    }

    .abas-chamados button {
        padding: 10px 18px;
        background: #f1f5f9;
        border: none;
        border-radius: 40px;
        font-size: 0.8rem;
        font-weight: 500;
        cursor: pointer;
        transition: 0.2s;
    }

    .abas-chamados button.ativo {
        background: var(--p);
        color: white;
    }

    /* ====================== RELATÓRIOS ====================== */
    .header-relatorio {
        margin-bottom: 8px;
    }

    .abas {
        display: flex;
        gap: 6px;
        border-bottom: 2px solid var(--border);
        margin-bottom: 24px;
        flex-wrap: wrap;
    }

    .aba-btn {
        background: none;
        border: none;
        padding: 10px 20px;
        font-size: 0.9rem;
        font-weight: 500;
        color: #64748b;
        cursor: pointer;
        border-bottom: 3px solid transparent;
        transition: 0.2s;
    }

    .aba-btn.ativa {
        color: var(--p);
        border-bottom-color: var(--p);
    }

    .filtros-container {
        display: flex;
        gap: 20px;
        flex-wrap: wrap;
        align-items: flex-end;
        margin-bottom: 24px;
        background: #f8fafc;
        padding: 20px;
        border-radius: 24px;
    }

    .campo-data {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .campo-data label {
        font-size: 0.75rem;
        font-weight: 500;
    }

    .preview-container {
        margin-top: 28px;
        overflow-x: auto;
        border-radius: 20px;
        border: 1px solid var(--border);
    }

    /* ====================== BOTÕES GERAIS ====================== */
    button {
        cursor: pointer;
        border: none;
        border-radius: 14px;
        font-weight: 600;
        font-family: 'Inter', sans-serif;
        transition: all 0.2s;
        padding: 12px 24px;
        font-size: 0.85rem;
    }

    button:active {
        transform: scale(0.97);
    }

    button[onclick*="cadastrarBem"],
    button[onclick*="salvarBem"],
    button[onclick*="salvarAlteracoes"] {
        background: var(--p);
        color: white;
    }

    button[onclick*="excluir"],
    .btn-sair {
        background: #ef4444 !important;
        color: white !important;
    }

    .btn-pdf {
        background: #7c3aed !important;
        color: white !important;
    }

    .btn-pdf:hover {
        background: #6d28d9 !important;
    }

    /* ====================== LOADING ====================== */
    .loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(6px);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 3000;
        flex-direction: column;
        color: white;
        gap: 20px;
    }

    .loading-spinner {
        width: 56px;
        height: 56px;
        border: 5px solid rgba(255, 255, 255, 0.2);
        border-top: 5px solid var(--p);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    /* ====================== TOAST ====================== */
    #toastContainer {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        gap: 12px;
        max-width: 340px;
    }

    .toast {
        background: #1e2937;
        color: white;
        padding: 14px 20px;
        border-radius: 60px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 0.85rem;
        opacity: 0;
        transform: translateX(100%);
        transition: all 0.25s ease;
    }

    .toast.show {
        opacity: 1;
        transform: translateX(0);
    }

    .toast.success { border-left: 4px solid #10b981; }
    .toast.error   { border-left: 4px solid #ef4444; }
    .toast.info    { border-left: 4px solid #3b82f6; }

    /* ====================== RESPONSIVIDADE AVANÇADA ====================== */

    /* Tablet e desktop pequeno */
    @media (max-width: 1024px) {
        .conteudo {
            padding: 24px 20px;
        }
        .tela {
            padding: 24px;
        }
    }

    /* Mobile largo e tablet */
    @media (max-width: 992px) {
        .container {
            position: relative;
        }

        .btn-hamburger {
            display: flex;
            align-items: center;
            justify-content: center;
            position: fixed;
            top: 16px;
            left: 16px;
            z-index: 1300;
            background: var(--d);
            color: white;
            width: 52px;
            height: 52px;
            font-size: 1.8rem;
            border-radius: 20px;
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
            border: none;
            transition: 0.2s;
        }

        .menu {
            position: fixed;
            left: -280px;
            top: 0;
            height: 100vh;
            width: 280px;
            z-index: 1400;
            transition: left 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
            box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
            padding-top: 80px;
        }

        .menu.open {
            left: 0;
        }

        .menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            z-index: 1350;
            display: none;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .menu-overlay.ativo {
            opacity: 1;
        }

        .conteudo {
            padding: 88px 16px 90px 16px;
        }

        .cards {
            gap: 14px;
        }

        .card {
            min-width: 130px;
            padding: 18px 12px;
        }

        .card span {
            font-size: 2rem;
        }

        /* Tabela em formato de cartão */
        .table-container tr {
            display: block;
            margin-bottom: 16px;
            border-radius: 20px;
            background: white;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }

        .table-container td {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            border-bottom: 1px solid #f1f5f9;
        }

        .table-container td:before {
            content: attr(data-label);
            font-weight: 600;
            color: #475569;
            width: 45%;
            font-size: 0.8rem;
        }

        .table-container td:last-child:before {
            align-self: flex-start;
        }

        .table-container thead {
            display: none;
        }

        /* Ajustes de formulário */
        .formulario {
            max-width: 100%;
        }

        /* Relatórios */
        .filtros-container {
            flex-direction: column;
            align-items: stretch;
        }

        .campo-data {
            flex-direction: row;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .campo-data input {
            flex: 1;
        }
    }

    /* Mobile pequeno (até 600px) */
    @media (max-width: 600px) {
        .cards {
            flex-direction: column;
        }

        .card {
            width: 100%;
        }

        .filtros-grid {
            grid-template-columns: 1fr;
            gap: 12px;
        }

        .acoes-card {
            flex-direction: column;
        }

        .acoes-card button {
            width: 100%;
        }

        .modal-content {
            padding: 24px 20px;
            width: 95%;
        }

        .login-box {
            padding: 32px 24px;
        }

        .abas-chamados button {
            padding: 8px 14px;
            font-size: 0.75rem;
        }

        .btn-hamburger {
            width: 48px;
            height: 48px;
            font-size: 1.6rem;
        }
    }

    /* Ajustes de toque para todos os botões em mobile */
    @media (max-width: 768px) {
        button, 
        .btn-ver-ficha,
        .card,
        .card-chamado,
        input, 
        select,
        .aba-btn,
        .abas-chamados button {
            cursor: pointer;
            touch-action: manipulation;
        }

        button:active,
        .card:active,
        .card-chamado:active {
            transform: scale(0.98);
        }
    }

 /* Animações suaves */
#sistema {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#sistema.show {
    opacity: 1;
    transform: translateY(0);
}

/* ====================== INVENTÁRIO: VERSÃO MAIS COMPACTA ====================== */

/* Desktop: tabela mais estreita (opcional) */
.table-container {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;
    min-width: 400px;
    table-layout: auto;
}

/* Mobile: cards mais compactos */
@media (max-width: 92px) {
    .table-container {
        overflow-x: visible;
    }
    
    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    thead {
        display: none;
    }
    
    tr {
        margin-bottom: 16px;
        border-radius: 16px;
        background: white;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
        border: 1px solid #e2e8f0;
        width: 100%;
        overflow: hidden;
    }
    
    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 12px;
        border-bottom: 1px solid #f1f5f9;
        width: 50%;
        box-sizing: border-box;
        font-size: 0.85rem;
    }
    
    td:before {
        content: attr(data-label);
        font-weight: 300;
        color: #475569;
        width: 38%;
        flex-shrink: 0;
        font-size: 0.75rem;
    }
    
    td:last-child {
        border-bottom: none;
    }
    
    td[data-label="Ações"] {
        flex-direction: column;
        gap: 6px;
    }
    
    td[data-label="Ações"] button {
        width: 50%;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.75rem;
    }
}

/* Telas muito pequenas (<=480px): ainda mais compacto */
@media (max-width: 240px) {
    td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    td:before {
        width: 40%;
        font-size: 0.7rem;
    }
    
    tr {
        margin-bottom: 12px;
    }
}

/* Logo na tela de login */
.logo-login {
    text-align: center;
    margin-bottom: 20px;
}
.logo-login img {
    max-width: 150px;
    height: auto;
    display: inline-block;
}

@media (max-width: 480px) {
    .logo-login img {
        max-width: 90px;
    }
}
