:root {
    /* --- PALETA CLARA & MODERNA --- */
    --bg-body: #f0f2f5;       /* Fundo geral (cinza gelo) */
    --bg-sidebar: #ffffff;    /* Container Geral */
    --bg-surface: #ffffff;    /* Cards brancos */
    --bg-input: #f8fafc;      /* Inputs bem clarinhos */

    /* Cores de Marca */
    --primary: #6366f1;       /* Índigo moderno */
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff; /* Para fundos de botões ativos */

    --accent: #10b981;        /* Verde Esmeralda */
    --danger: #ef4444;        /* Vermelho vibrante */
    --warning: #f59e0b;       /* Laranja */

    /* Tipografia */
    --text-main: #1f2937;     /* Cinza quase preto */
    --text-secondary: #4b5563;/* Cinza médio */
    --text-muted: #9ca3af;    /* Cinza claro */

    /* Estrutura */
    --border: #e5e7eb;        /* Bordas sutis */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;           /* Bordas mais arredondadas */
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    /* font-family: ...  <-- REMOVA ESTA LINHA DAQUI */
    -webkit-tap-highlight-color: transparent; 
    outline: none; 
}

body, button, input, select, textarea {
    font-family: 'Poppins', sans-serif;
}

.brand-text h1, 
.brand-text span {
    font-family: 'Poppins', sans-serif; /* Garante Poppins no título */
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    height: 100vh;
    height: 100dvh;
    overflow: hidden; /* Scroll acontece dentro do main */
}

.hidden { display: none !important; }

/* --- LOGIN --- */
.login-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff 0%, #f0f2f5 100%);
    padding: 20px;
}
.login-card {
    background: var(--bg-surface);
    padding: 3rem;
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    border: 1px solid white;
}
/* --- ATUALIZAÇÃO DA MARCA (LOGIN E HEADER) --- */

/* Ajuste do container da marca no Login */
.brand-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px; /* gap-3 do tailwind */
    margin-bottom: 2rem;
    text-align: left; /* Garante que o texto alinhe a esquerda da logo */
}

/* Ajuste do container da marca no Header */
.brand {
    display: flex;
    align-items: center;
    gap: 12px; /* gap-3 */
    text-decoration: none;
}

/* Tamanho da Logo (h-10 w-auto object-contain) */
.brand-login img,
.brand img {
    height: 40px; /* h-10 */
    width: auto;
    object-fit: contain;
    margin-right: 0 !important; /* Remove margens antigas se houver */
}

/* Container do texto (Título + Subtítulo) */
/* Container do texto (Título + Subtítulo lado a lado) */
.brand-text {
    display: flex;
    flex-direction: row;  /* MUDOU AQUI: deixa na horizontal */
    align-items: baseline; /* MUDOU AQUI: alinha pela base do texto (fica mais bonito) */
    gap: 10px; /* Espaçamento entre o título e o subtítulo */
    line-height: 1;
}

/* Opcional: No mobile, esconder o subtítulo para não quebrar a tela? 
   Se quiser manter visível, pode ignorar este bloco abaixo. */
@media (max-width: 480px) {
    .brand-text span {
        display: none; /* Esconde o subtítulo em telas muito pequenas */
    }
}

/* Título (GestFique) - text-xl font-bold text-gray-800 */
.brand-text h1 {
    font-family: 'Inter', sans-serif; /* Mudado de JetBrains para Inter (mais limpo) */
    font-size: 1.25rem; /* text-xl */
    font-weight: 700; /* font-bold */
    color: #1f2937; /* text-gray-800 */
    margin: 0;
    letter-spacing: -0.025em; /* tracking-tight */
}

/* Subtítulo - text-gray-400 font-normal text-sm */
.brand-text span {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem; /* text-sm */
    font-weight: 400; /* font-normal */
    color: #9ca3af; /* text-gray-400 */
}
.input-group { margin-bottom: 1.2rem; }
.input-group input {
    width: 100%;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.2s ease;
}
.input-group input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-light);
}
.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    margin-top: 1rem;
    transition: 0.2s;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}
.btn-login:hover { background: var(--primary-hover); transform: translateY(-2px); }

/* --- LAYOUT APP UNIFICADO --- */
.app-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 70px;
    z-index: 10;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.brand {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary);
    display:flex; gap:10px; align-items:center;
}
.role-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.header-controls { display: flex; align-items: center; }
.btn-icon {
    background: none; border: none; color: var(--text-secondary); font-size: 1.2rem; cursor: pointer; margin-left: 15px; padding: 8px; border-radius: 50%; transition: 0.2s;
}
.btn-icon:hover { background: #fee2e2; color: var(--danger); }

/* --- MAIN CONTAINER --- */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-body);
}

.sidebar {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
}

/* --- TABS (Desktop Default) --- */
.nav-tabs {
    display: flex;
    justify-content: center;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    gap: 20px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.btn-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 18px 5px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-tab i { margin-right: 8px; }

.btn-tab:hover { color: var(--primary); }
.btn-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* --- ÁREA DE CONTEÚDO --- */
.tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 100px;
}

/* --- COMPONENTES --- */

/* Listas (Pedidos, Histórico) */
.section-title h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    font-weight: 700;
}
.order-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.shopping-item {
    background: var(--bg-surface);
    padding: 16px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid var(--accent);
    box-shadow: var(--shadow-sm);
    transition: 0.2s;
    border: 1px solid var(--border);
    border-left-width: 5px;
}
.shopping-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.shopping-item.urgente {
    border-left-color: var(--danger);
    background: #fef2f2;
}
.shopping-item.em_estoque {
    border-left-color: #3b82f6;
    background: #eff6ff;
}
.shopping-item.em_estoque .info strong { color: #1e40af; }

.shopping-item .info strong { display: block; font-size: 1rem; margin-bottom: 4px; color: var(--text-main); }
.shopping-item .info span { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.action-btn { color: var(--text-muted); cursor: pointer; font-size: 1.2rem; padding: 8px; border-radius: 8px; transition: 0.2s; }
.action-btn:hover { background: #f3f4f6; color: var(--text-main); }

/* --- CONTROLES DE TOPO (Busca e Filtros) --- */
.search-container {
    background: var(--bg-surface);
    border-radius: 50px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: 0.2s;
    max-width: 100%;
}
.search-container:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.search-container i { color: var(--text-muted); margin-right: 12px; }
.search-container input {
    background: transparent; border: none; color: var(--text-main); width: 100%; padding: 14px 0; font-size: 1rem;
}

.category-pills-scroll {
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin;
}
.cat-pill {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}
.cat-pill:hover { transform: translateY(-1px); border-color: var(--primary); color: var(--primary); }
.cat-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.4);
}

/* --- GRID DE PRODUTOS --- */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; margin-top: 1rem; }
.section-header h2 { font-size: 1.5rem; color: var(--text-main); font-weight: 700; letter-spacing: -0.5px; }
.counter { background: var(--text-main); color: white; padding: 4px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: 700; }

.products-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.2rem; padding-bottom: 20px;
}
.product-card {
    background: var(--bg-surface);
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 140px;
    box-shadow: var(--shadow-sm);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.product-card h4 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text-main); font-weight: 600; line-height: 1.3; }
.product-card .cat-label {
    font-size: 0.7rem;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    font-weight: 700;
    align-self: center;
}

/* --- ADMIN & FORMULÁRIOS --- */
.admin-card {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.admin-card h3 { color: var(--text-main); margin-bottom: 0.5rem; font-size: 1.2rem; }
.hint-text { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; display: block; }

.modern-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 1rem;
    transition: 0.2s;
}
.modern-input:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px var(--primary-light); }
.row-input { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-primary.full { width: 100%; }

.tags-container-admin { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-tag {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex; align-items: center; gap: 10px; font-weight: 500;
}
.admin-tag i { color: var(--text-muted); cursor: pointer; }
.admin-tag i:hover { color: var(--danger); }

/* Ações nos cards (Edit/Delete) */
.admin-actions { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.btn-action-sm {
    font-size: 0.85rem; padding: 6px 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; transition: 0.2s;
}
.btn-edit { color: var(--primary); background: var(--primary-light); }
.btn-delete { color: var(--danger); background: #fef2f2; }

/* --- ESTOQUE --- */
.stock-list { display: flex; flex-direction: column; gap: 10px; }
.stock-item {
    background: var(--bg-surface);
    padding: 14px;
    border-radius: 10px;
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.stock-item strong { font-size: 1rem; color: var(--text-main); }
.stock-item span { color: var(--primary); font-size: 0.9rem; font-weight: 700; background: var(--primary-light); padding: 4px 8px; border-radius: 6px; margin-left: 8px; }
.stock-controls { display: flex; align-items: center; gap: 8px; }
.btn-mini {
    background: white; border: 1px solid var(--border); color: var(--text-secondary); width: 38px; height: 38px; border-radius: 8px; cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.btn-mini:hover { border-color: var(--primary); color: var(--primary); }
.btn-mini.del:hover { border-color: var(--danger); color: var(--danger); background: #fef2f2; }
.btn-mini.transfer:hover { border-color: #3b82f6; color: #3b82f6; background: #eff6ff; }

/* --- MODAIS --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(31, 41, 55, 0.4);
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(8px); z-index: 999; padding: 20px;
}
.modal-card {
    background: white; padding: 2.5rem; border-radius: 24px; width: 100%; max-width: 400px;
    text-align: center; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-card h3 { font-size: 1.5rem; color: var(--text-main); margin-bottom: 0.5rem; }
.modal-card p { color: var(--text-secondary); margin-bottom: 1.5rem; }
.modal-actions { display: flex; gap: 12px; margin-top: 2rem; flex-direction: column; }
@media (min-width: 480px) { .modal-actions { flex-direction: row; } }
.btn-modal { padding: 16px; border: none; border-radius: 12px; font-weight: 700; cursor: pointer; font-size: 1rem; flex: 1; transition: 0.2s; }
.btn-modal.normal { background: var(--bg-input); color: var(--text-main); border: 1px solid var(--border); }
.btn-modal.urgent { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.btn-text { background: none; border: none; color: var(--text-muted); margin-top: 15px; cursor: pointer; font-weight: 600; padding: 10px; }

/* --- TOAST --- */
.toast-container { position: fixed; top: 20px; right: 20px; left: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; align-items: flex-end; }
@media (max-width: 768px) { .toast-container { align-items: center; top: 10px; } }
.toast {
    background: white; color: var(--text-main); padding: 16px 20px; border-radius: 12px; border-left: 5px solid var(--primary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex; align-items: center; gap: 12px; min-width: 300px; max-width: 100%; pointer-events: auto; font-size: 0.95rem; font-weight: 500;
}

.link-reset { text-decoration: none; color: inherit; cursor: pointer; transition: opacity 0.2s; }
.link-reset:hover { opacity: 0.7; }
.date-badge { color: var(--text-secondary); font-size: 0.75rem; background: var(--border); padding: 4px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.date-badge.done { color: var(--accent); background: #ecfdf5; border: 1px solid #d1fae5; }

/* --- BOTÃO FLUTUANTE (TICKET) - UNIFICADO --- */
/* Botão Flutuante - Estilo Anel Duplo */
.fab-ticket {
    position: fixed;
    bottom: 30px;
    right: 30px;
    
    /* Tamanho */
    width: 65px;
    height: 65px;
    
    /* Cores e Fundo */
    background: #f43f5e;  /* O Rosa avermelhado do centro */
    color: white;         /* Cor do ícone */
    
    /* --- O TRUQUE DO ANEL (Borda Branca + Sombra Rosa) --- */
    border: 4px solid #ffffff;      /* Cria o espaço branco grosso */
    box-shadow: 0 0 0 4px #fecdd3;  /* Cria o anel externo rosa claro */
    
    /* Forma e Alinhamento */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 9999;
    
    /* Animação suave */
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Efeito ao passar o mouse */
.fab-ticket:hover {
    background: #e11d48;            /* Escurece levemente o centro */
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 0 0 6px #fda4af;  /* O anel externo fica mais grosso */
}

/* Ajuste Mobile (Mantendo o estilo, mas reposicionando) */
@media (max-width: 768px) {
    .fab-ticket {
        bottom: 90px !important; /* Mantém longe do menu inferior */
        right: 20px;
        width: 55px;   /* Um pouco menor no celular */
        height: 55px;
        font-size: 1.2rem;
        border-width: 3px; /* Borda branca mais fina */
        box-shadow: 0 0 0 3px #fecdd3; /* Anel rosa mais fino */
    }
}

/* Animações Gerais */
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeOutToast { to { transform: translateY(-20px); opacity: 0; } }

/* --- MOBILE SPECIFIC (APP MODE) --- */
@media (max-width: 768px) {
    
    /* 1. Header Compacto */
    header {
        padding: 0 1rem;
        height: 60px;
    }
    .brand { font-size: 1rem; }
    .role-badge { padding: 4px 8px; font-size: 0.65rem; }
    .btn-icon { margin-left: 8px; font-size: 1rem; }

    /* 2. Conteúdo Principal */
    main {
        padding-bottom: 80px; /* Garante scroll livre do menu */
    }
    
    .tab-content {
        padding: 1rem;
        padding-bottom: 100px;
    }

    /* 3. Transformação: Menu Inferior Fixo (Bottom Nav) */
    .nav-tabs {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: white;
        z-index: 900;
        justify-content: space-around;
        border-top: 1px solid var(--border);
        border-bottom: none;
        padding: 8px 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
        gap: 0;
        padding-bottom: env(safe-area-inset-bottom, 10px);
        height: auto;
    }

    .btn-tab {
        padding: 8px 0;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 0.7rem;
        border-bottom: none;
        border-top: 3px solid transparent;
        color: var(--text-muted);
        gap: 4px;
        border-radius: 0;
    }
    
    .btn-tab i {
        font-size: 1.2rem;
        margin-right: 0;
        margin-bottom: 2px;
    }

    .btn-tab.active {
        color: var(--primary);
        border-top-color: var(--primary);
        background: transparent;
    }

    /* 4. Grid de Produtos Otimizado */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-card {
        min-height: 110px;
        padding: 1rem 0.5rem;
    }
    
    .product-card h4 {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }
    
    .product-card .cat-label {
        font-size: 0.6rem;
        padding: 2px 6px;
    }

    /* 5. Ajustes de Listas */
    .shopping-item {
        padding: 12px;
        flex-direction: row;
    }
    .shopping-item .info strong { font-size: 0.9rem; }
    .shopping-item .info span { font-size: 0.75rem; }

    /* 6. Filtros e Buscas */
    .search-container { padding: 0 15px; }
    .search-container input { font-size: 0.95rem; padding: 12px 0; }
    .cat-pill { padding: 6px 16px; font-size: 0.8rem; }

    /* 7. Quick Add (Admin) Mobile */
    #form-quick-add {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }
    #form-quick-add > div { width: 100%; margin-bottom: 10px; }
    #form-quick-add button { width: 100% !important; margin: 0; }

    /* 8. Botão Flutuante (Mobile Override) */
    .fab-ticket {
        bottom: 90px !important; /* Sobe para fugir do menu */
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    /* 9. Modais Estilo Gaveta */
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    
    .modal-card {
        max-width: 100%;
        width: 100%;
        border-radius: 24px 24px 0 0;
        margin: 0;
        padding: 2rem 1.5rem;
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
        animation: slideUpMobile 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        border-bottom: none;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-modal { padding: 14px; font-size: 1rem; }
}

@keyframes slideUpMobile { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ... código do loading anterior ... */

/* Estilo do Botão Voltar */
/* Botão Voltar ao Painel - Estilo Visual da Imagem */
/* Botão Voltar - Compacto & Responsivo */
.btn-voltar {
    /* Cores (Mantendo o azul da imagem) */
    background-color: #dbeafe; 
    color: #2563eb;
    border: none;

    /* Tipografia e Tamanho (Reduzidos) */
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.85rem; /* Fonte menor */
    padding: 8px 16px;  /* Botão mais magrinho */
    border-radius: 8px; /* Curva suave */

    /* Layout */
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap; /* Garante que o texto não quebre */
}

.btn-voltar:hover {
    background-color: #bfdbfe;
    transform: translateY(-1px);
}

.btn-voltar i {
    font-size: 0.9rem; /* Tamanho da seta proporcional */
}

/* RESPONSIVIDADE: Mobile (vira apenas ícone) */
@media (max-width: 768px) {
    .btn-voltar span {
        display: none; /* ESCONDE O TEXTO */
    }

    .btn-voltar {
        padding: 0;        /* Reseta o padding */
        width: 36px;       /* Largura fixa */
        height: 36px;      /* Altura fixa */
        border-radius: 8px; /* Quadrado arredondado */
        justify-content: center; /* Centraliza a seta */
        gap: 0;
    }

    .btn-voltar i {
        font-size: 1.1rem; /* Ícone um pouco maior para facilitar o toque */
        margin: 0;
    }
}

/* Estilos da Aba de Auditoria */
.audit-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 75vh;
    overflow-y: auto;
}

.audit-item {
    display: flex;
    flex-direction: column;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #fff;
    border-left: 4px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-size: 0.9rem;
}

/* Cores por tipo de ação para facilitar leitura visual */
.audit-item.danger { border-left-color: #f43f5e; } /* Exclusões */
.audit-item.success { border-left-color: #10b981; } /* Criações/Finalizações */
.audit-item.warning { border-left-color: #f59e0b; } /* Edições */
.audit-item.info { border-left-color: #3b82f6; }    /* Login/Movimentações */

.audit-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.75rem;
    color: #6b7280;
}

.audit-user {
    font-weight: 700;
    color: #374151;
}

.audit-action {
    font-weight: 600;
    color: #111;
    margin-bottom: 2px;
}

.audit-details {
    color: #4b5563;
    font-size: 0.85rem;
}