/* =====================================================================
   Growth Lab - base, tokens e layout
   ===================================================================== */

:root {
    --blue-900: #0E2A47;
    --blue-700: #1E446B;
    --blue-100: #E4EBF3;
    --gold-500: #C89B3C;
    --gold-200: #E7D3A2;
    --gold-050: #FBF5E8;
    --green-500: #5E7F4E;
    --green-050: #EEF3EB;
    --red-500: #B3453C;
    --red-050: #FBEDEC;

    --bg: #F7F8FA;
    --surface: #FFFFFF;
    --border: #E4E7EC;
    --border-strong: #D0D5DD;
    --text: #182230;
    --text-muted: #667085;
    --text-faint: #98A2B3;

    --radius: 10px;
    --radius-sm: 7px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04);
    --sidebar-w: 220px;

    /* Espacamentos: painel de trabalho, nao pagina de marketing.
       Tudo compacto para caber o maximo de informacao sem rolar. */
    --gap: 10px;
    --card-pad: 14px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--blue-900); margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 20px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }

a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }

p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    background: var(--blue-900); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- layout */

.layout { display: flex; min-height: 100vh; }

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
    padding: 14px 16px 24px;
    max-width: 1800px;
    width: 100%;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 16px;
    color: var(--text-faint);
    font-size: 11.5px;
    border-top: 1px solid var(--border);
}

/* --------------------------------------------------------------- sidebar */

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--blue-900);
    color: #C9D6E5;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand__mark {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 9px;
    background: var(--gold-500);
    color: var(--blue-900);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .02em;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__text strong { color: #fff; font-size: 14px; font-weight: 600; }
.brand__text small { color: #8FA6C0; font-size: 11px; }

.sidebar__nav { flex: 1; padding: 12px 10px; overflow-y: auto; }

.nav__item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: #C9D6E5;
    font-size: 13.5px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background .12s, color .12s;
}
.nav__item:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav__item svg { width: 18px; height: 18px; fill: currentColor; opacity: .85; flex-shrink: 0; }
.nav__item.is-active {
    background: rgba(255, 255, 255, .09);
    color: #fff;
    border-left-color: var(--gold-500);
}
.nav__item.is-active svg { opacity: 1; color: var(--gold-200); }

.sidebar__foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }

.userbox { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.userbox__info { display: flex; flex-direction: column; min-width: 0; }
.userbox__info strong { color: #fff; font-size: 13px; font-weight: 500; }
.userbox__info small { color: #8FA6C0; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar {
    width: 32px; height: 32px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--blue-700);
    color: var(--gold-200);
    font-size: 11.5px; font-weight: 600;
}

.nav__logout {
    display: block; text-align: center;
    padding: 8px; border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .07);
    color: #C9D6E5; font-size: 12.5px; font-weight: 500;
}
.nav__logout:hover { background: rgba(255, 255, 255, .13); color: #fff; text-decoration: none; }

.sidebar__overlay {
    position: fixed; inset: 0; z-index: 40;
    background: rgba(14, 42, 71, .45);
}

/* ---------------------------------------------------------------- topbar */

.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 14px;
    padding: 9px 16px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
}

.topbar__title { flex: 1; min-width: 0; }
.topbar h1 { font-size: 17px; }
.topbar__meta { margin: 1px 0 0; color: var(--text-muted); font-size: 12px; }
.topbar__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.topbar__burger {
    display: none;
    flex-direction: column; justify-content: center; gap: 4px;
    width: 38px; height: 38px; padding: 0 9px;
    background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
    cursor: pointer;
}
.topbar__burger span { display: block; height: 2px; background: var(--blue-900); border-radius: 2px; }

/* ------------------------------------------------------ modo apresentacao */

.present-mode .sidebar,
.present-mode .topbar__actions .js-hide-present,
.present-mode .no-present { display: none !important; }

.present-mode .content { padding: 28px 40px 48px; }
.present-mode .kpi__value { font-size: 34px; }
.present-mode .hero__value { font-size: 68px; }
.present-mode .topbar { position: static; background: transparent; border-bottom: none; }
