:root {
    --ht-blue: #6B7C93;
    --ht-green: #4CAF50;
    --ht-bg: #F5F7FA;
    --ht-text: #1F2937;
    --ht-muted: #6B7280;
    --ht-success: #10B981;
    --ht-warning: #F59E0B;
    --ht-danger: #EF4444;
}

html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 16px; } }

body {
    background-color: var(--ht-bg);
    color: var(--ht-text);
    font-family: 'Inter', 'Roboto', 'Open Sans', sans-serif;
    margin-bottom: 60px;
}

/* Navbar */
.navbar-herontech {
    background: #fff;
    border-bottom: 2px solid var(--ht-green);
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

.navbar-brand-logo {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ht-blue) !important;
}

/* Cards dashboard */
.card-stat {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    transition: transform .15s;
}
.card-stat:hover { transform: translateY(-2px); }

/* Botões min 44px para toque mobile */
.btn { min-height: 44px; border-radius: 8px; font-weight: 500; }
.btn-sm { min-height: 36px; }

.btn-ht-primary { background-color: var(--ht-blue); border-color: var(--ht-blue); color: #fff; }
.btn-ht-primary:hover { background-color: #58697c; color: #fff; }
.btn-ht-success { background-color: var(--ht-green); border-color: var(--ht-green); color: #fff; }
.btn-ht-success:hover { background-color: #43a047; color: #fff; }

/* Item card (mobile) */
.item-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,.07);
    border-left: 4px solid var(--ht-green);
}

/* Cards de menu (home) */
.card-menu {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,.09);
    transition: transform .15s, box-shadow .15s;
    background: #fff;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.card-menu:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0,0,0,.14);
}
.card-menu-icon { font-size: 2.8rem; }

/* Avatar de iniciais na navbar */
.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--ht-blue);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

/* KPI cards */
.kpi-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    color: var(--ht-text);
}

/* Ícone dos módulos */
.mod-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mod-title { font-size: .85rem; }
.mod-desc  { font-size: .75rem; }

.card-menu-sm {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
    transition: transform .15s, box-shadow .15s;
    background: #fff;
}
.card-menu-sm:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

/* Resumo financeiro sticky */
.resumo-financeiro {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

@media (min-width: 992px) {
    .resumo-financeiro { position: sticky; top: 70px; }
}

label { font-weight: 500; font-size: .88rem; color: var(--ht-muted); margin-bottom: 3px; }

/* Itens: card no mobile, tabela no desktop */
.itens-mobile { display: none; }
.itens-desktop { display: table; }

@media (max-width: 767px) {
    .itens-mobile { display: block; }
    .itens-desktop { display: none !important; }
}

.input-num { text-align: right; }
.linha-total { font-size: 1.1rem; font-weight: 700; }

footer { background: #fff; border-top: 1px solid #e5e7eb; margin-top: 2rem; }

/* Submenu aninhado no dropdown do Admin */
.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-menu {
    top: 0; left: 100%; margin-top: -6px; margin-left: 1px;
    display: none; border-radius: 8px; min-width: 220px;
}
.dropdown-submenu:hover > .dropdown-menu { display: block; }
.dropdown-submenu > .dropdown-item.has-submenu::after {
    content: "›"; float: right; font-size: 1.1rem; line-height: 1.2; margin-left: 8px;
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #4CAF50;
}
