/* ===================================================
   BELLALINK ERP v2.0 - PINK CORPORATE THEME
   =================================================== */

:root {
    /* Identidade Visual BellaLink */
    --bs-primary: #C2185B; /* Rosa Corporativo (Forte) */
    --bs-primary-light: #FF4081; /* Rosa Vibrante (Gradiente) */
    --bs-primary-dark: #8E1241; /* Rosa Escuro (Hover/Active) */
    /* Cores de Sistema (Neutras e Funcionais) */
    --bs-body-bg: #f4f6f9; /* Fundo da área de trabalho */
    --bs-surface: #ffffff; /* Fundo de cartões */
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    /* Tipografia Limpa */
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html, body {
    font-family: var(--font-main);
    background-color: var(--bs-body-bg);
    font-size: 0.85rem; /* Escala ERP (Alta densidade) */
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

/* --- ESTRUTURA DO LAYOUT --- */
.app-container {
    display: grid;
    grid-template-columns: 250px 1fr; /* Sidebar | Conteúdo */
    grid-template-rows: 60px 1fr; /* Header | Corpo */
    height: 100vh;
    width: 100vw;
}

/* --- SIDEBAR (IDENTIDADE DA MARCA) --- */
.app-sidebar {
    grid-row: 1 / -1;
    grid-column: 1;
    /* O Gradiente Rosa da sua marca */
    background: linear-gradient(180deg, var(--bs-primary-light) 0%, var(--bs-primary) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 12px rgba(194, 24, 91, 0.2); /* Sombra suave rosa */
    z-index: 100;
}

.sidebar-header {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.brand-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Menu de Navegação */
.nav-scroll {
    flex: 1;
    overflow-y: auto;
    padding-top: 1.5rem;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    padding: 0.7rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border-radius: 0 25px 25px 0; /* Borda arredondada só na direita */
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
}

    .nav-link:hover {
        background-color: rgba(255,255,255,0.15);
        color: white !important;
        padding-left: 1.8rem; /* Efeito visual de movimento */
    }

    .nav-link.active {
        background-color: white !important;
        color: var(--bs-primary) !important; /* Texto rosa no fundo branco */
        font-weight: 700;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .nav-link .bi {
        font-size: 1.1rem;
        margin-right: 10px;
        width: 24px;
        text-align: center;
    }

/* --- HEADER SUPERIOR (Neutro) --- */
.app-header {
    grid-row: 1;
    grid-column: 2;
    background-color: var(--bs-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

/* --- ÁREA DE CONTEÚDO --- */
.app-main {
    grid-row: 2;
    grid-column: 2;
    padding: 1.5rem 2rem;
    overflow-y: auto;
    background-color: var(--bs-body-bg);
}

/* --- COMPONENTES VISUAIS --- */

/* Cards Limpos */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    background-color: var(--bs-surface);
}

/* Botões da Marca */
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

    .btn-primary:hover, .btn-primary:active, .btn-primary:focus {
        background-color: var(--bs-primary-dark) !important;
        border-color: var(--bs-primary-dark) !important;
    }

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}

    .btn-outline-primary:hover {
        background-color: var(--bs-primary);
        color: white;
    }

/* Scrollbar Personalizada (Rosa Discreto) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #dcbacf;
    border-radius: 3px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--bs-primary);
    }

/* =========================================
   TEMA DA ÁRVORE DE CATEGORIAS 
   ========================================= */
.tree-container {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #fce4ec;
    box-shadow: 0 4px 15px rgba(194, 24, 91, 0.05);
}

.tree-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    background-color: #fffbfc;
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
}

    .tree-row:hover {
        background-color: #ffffff;
        border-color: #f8bbd0;
        box-shadow: 0 4px 12px rgba(194, 24, 91, 0.1);
        transform: translateY(-1px);
    }

.tree-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #4a148c;
    font-size: 1.3rem;
}

.tree-toggle {
    cursor: pointer;
    color: #f06292;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: color 0.2s, transform 0.2s;
    width: 32px;
}

    .tree-toggle:hover {
        color: #d81b60;
        transform: scale(1.1);
    }

/* =========================================
   BOTÕES DE AÇÃO (DELICADOS E REDONDOS)
   ========================================= */
.btn-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    margin-left: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    outline: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

    .btn-circle i {
        font-size: 1rem;
    }

    .btn-circle:hover {
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        transform: translateY(-2px);
    }

.btn-add-sub {
    background-color: #fce4ec;
    color: #d81b60;
}

    .btn-add-sub:hover {
        background-color: #f8bbd0;
        color: #c2185b;
    }

.btn-edit {
    background-color: #f3e5f5;
    color: #8e24aa;
}

    .btn-edit:hover {
        background-color: #e1bee7;
        color: #7b1fa2;
    }

.btn-delete {
    background-color: #ffebee;
    color: #d32f2f;
}

    .btn-delete:hover {
        background-color: #ffcdd2;
        color: #c62828;
    }

/* Botão Principal do Sistema */
.btn-pink-theme {
    background-color: var(--bs-primary) !important;
    color: #ffffff !important;
    border: none;
}

    .btn-pink-theme:hover {
        background-color: var(--bs-primary-dark) !important;
        box-shadow: 0 4px 10px rgba(194, 24, 91, 0.3);
    }
