/* =============================================
   Governanca TI CFO — Tema Vinho
   Cores: #6A1B3D, #8B2E5A, #D4A03C
   ============================================= */

:root {
    --wine-dark: #6A1B3D;
    --wine: #8B2E5A;
    --wine-light: #A94068;
    --gold: #D4A03C;
    --gold-light: #E8C266;

    --bg: #f5f5f5;
    --bg-card: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --border: #e0e0e0;
    --border-light: #f0f0f0;

    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;

    --sidebar-link: hsla(0,0%,100%,0.5);
    --sidebar-link-active: #ffffff;

    --sidebar-width: 64px;
    --topbar-height: 60px;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);

    /* ═══ Topbar institucional CFO — tokens (default = light/cream) ═══ */
    --burgundy-600: #7A1E26;
    --burgundy-700: #5C1519;
    --burgundy-800: #3D0E10;
    --brand-red:    #C8393F;
    --gold-400:     #D4A574;
    --gold-500:     #B88A56;
    --cream-50:     #FBF8F4;
    --cream-100:    #F5EDE0;
    --ink-900:      #0A0506;
    --ink-800:      #140A0C;
    --ink-700:      #1E1214;

    --bg-base:        #FBF8F4;
    --text-primary:   #0A0506;
    --text-secondary: rgba(20, 10, 12, 0.75);
    --brand:          #7A1E26;
    --brand-deep:     #3D0E10;
    --accent:         #7A1E26;

    --topbar-bar:         #8B1D23;
    --topbar-bar-text:    rgba(255,255,255,.95);
    --topbar-menu-bg:     #FBF8F4;
    --topbar-menu-border: transparent;
    --inst-topbar-h:      128px;

    --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ═══ Overrides por tema pro topbar institucional ═══ */
body.cfo-connect-theme,
body.theme-midnight {
    --bg-base:        #0A0506;
    --text-primary:   #FBF8F4;
    --text-secondary: rgba(245, 237, 224, 0.72);
    --brand:          #C8393F;
    --brand-deep:     #7A1E26;
    --accent:         #D4A574;

    --topbar-bar:         #3D0E10;
    --topbar-bar-text:    rgba(245,237,224,.88);
    --topbar-menu-bg:     rgba(20,10,12,.82);
    --topbar-menu-border: rgba(212,165,116,.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

a { color: var(--wine); text-decoration: none; }
a:hover { color: var(--wine-light); }

/* ============ LOGIN ============ */
.login-body {
    background: linear-gradient(135deg, var(--wine-dark) 0%, var(--wine) 50%, #4a1229 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container { width: 100%; max-width: 420px; padding: 20px; }

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.login-header { text-align: center; margin-bottom: 30px; }
.login-header h1 { color: var(--wine-dark); font-size: 24px; margin-top: 16px; }
.login-header p { color: var(--text-light); font-size: 14px; margin-top: 4px; }
.login-logo { display: flex; justify-content: center; }
.login-logo .logo-cfo { max-width: 180px; height: auto; }

.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--text); }
.login-form input {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 14px; transition: border-color 0.2s;
}
.login-form input:focus {
    outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(106,27,61,0.1);
}

/* ============ LAYOUT ============ */
.app-layout { display: flex; min-height: 100vh; }

/* ═══════════ ClickUp-style Icon Sidebar ═══════════ */
.sidebar-icon {
    width: var(--sidebar-width);
    background: var(--wine-dark, hsl(220, 15%, 10%));
    color: #fff;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
    border-right: 1px solid hsla(0,0%,100%,0.06);
}

/* Logo */
.si-logo {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin: 12px 0 8px;
    border-radius: 12px; flex-shrink: 0;
    background: hsla(0,0%,100%,0.08);
    transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}
.si-logo:hover { background: hsla(0,0%,100%,0.14); transform: scale(1.08); }
.si-logo img {
    width: 24px; height: 24px; object-fit: contain;
    filter: brightness(0) invert(1); opacity: 0.9;
}

/* Nav — scrollable but doesn't clip flyouts */
.si-nav {
    display: flex; flex-direction: column; align-items: center;
    gap: 2px; padding: 4px 0; flex: 1; width: 100%;
    overflow-y: auto; overflow-x: visible;
    scrollbar-width: none;
}
.si-nav::-webkit-scrollbar { display: none; }

/* Each nav item (icon + label) */
.si-item {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center;
    width: 56px; min-height: 48px;
    padding: 6px 0 4px;
    border-radius: 10px;
    color: var(--sidebar-link, hsla(0,0%,100%,0.5));
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
    position: relative;
    gap: 2px;
    flex-shrink: 0;
}
a.si-item, a.si-item:visited, a.si-item:link {
    color: inherit;
}
.si-item > .material-icons-outlined {
    font-size: 22px;
    transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
}
.si-label {
    font-size: 9px; font-weight: 500;
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.1;
    max-width: 54px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.si-item:hover {
    background: hsla(0,0%,100%,0.08);
    color: var(--sidebar-link-active, hsla(0,0%,100%,0.95));
}
.si-item:hover > .material-icons-outlined {
    transform: scale(1.1);
}
.si-item:hover .si-label { opacity: 1; }
.si-item.active {
    background: hsla(0,0%,100%,0.12);
    color: var(--sidebar-link-active, #fff);
}
.si-item.active > .material-icons-outlined { color: var(--gold, #D4A03C); }
.si-item.active::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    border-radius: 0 3px 3px 0;
    background: var(--gold, #D4A03C);
}

/* ═══════════ Flyout submenu — positioned via JS ═══════════ */
.si-flyout {
    position: fixed;
    min-width: 220px;
    background: #FFFFFF;
    border: 1px solid rgba(122, 30, 38, 0.12);
    border-radius: 12px;
    padding: 6px;
    box-shadow:
        0 12px 32px rgba(122, 30, 38, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.06);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.18s cubic-bezier(0.16,1,0.3,1), transform 0.18s cubic-bezier(0.16,1,0.3,1);
}
.si-flyout.visible {
    pointer-events: auto;
    opacity: 1;
    transform: translateX(0);
}

.si-flyout-title {
    padding: 6px 10px 8px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(122, 30, 38, 0.55);
    border-bottom: 1px solid rgba(122, 30, 38, 0.08);
    margin-bottom: 4px;
    font-family: var(--font-display, 'Instrument Serif', Georgia, serif);
}

.si-fly-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px; font-weight: 500;
    color: rgba(20, 10, 12, 0.72);
    text-decoration: none;
    transition: all 0.15s cubic-bezier(0.16,1,0.3,1);
    white-space: nowrap;
}
.si-fly-item .material-icons-outlined {
    font-size: 18px;
    color: var(--burgundy-700, #5C1519);
    opacity: 0.7;
    transition: all 0.15s;
}
.si-fly-item:hover {
    background: rgba(122, 30, 38, 0.08);
    color: var(--burgundy-800, #3D0E10);
    transform: translateX(2px);
}
.si-fly-item:hover .material-icons-outlined { opacity: 1; }
.si-fly-item.active {
    background: rgba(122, 30, 38, 0.12);
    color: var(--burgundy-800, #3D0E10);
}
.si-fly-item.active .material-icons-outlined { opacity: 1; color: var(--burgundy-600, #7A1E26); }

/* ── Tema escuro: flyout escuro ── */
body.cfo-connect-theme .si-flyout,
body.theme-midnight .si-flyout {
    background: hsl(220, 15%, 11%);
    border-color: hsla(0,0%,100%,0.1);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
body.cfo-connect-theme .si-flyout-title,
body.theme-midnight .si-flyout-title {
    color: hsla(0,0%,100%,0.4);
    border-bottom-color: hsla(0,0%,100%,0.08);
}
body.cfo-connect-theme .si-fly-item,
body.theme-midnight .si-fly-item {
    color: hsla(0,0%,100%,0.72);
}
body.cfo-connect-theme .si-fly-item .material-icons-outlined,
body.theme-midnight .si-fly-item .material-icons-outlined {
    color: hsla(0,0%,100%,0.5);
}
body.cfo-connect-theme .si-fly-item:hover,
body.theme-midnight .si-fly-item:hover {
    background: hsla(0,0%,100%,0.08);
    color: #fff;
}
body.cfo-connect-theme .si-fly-item.active,
body.theme-midnight .si-fly-item.active {
    background: hsla(345, 70%, 35%, 0.22);
    color: #fff;
}

/* ── Legacy sidebar compat (hide old classes) ── */
.sidebar { display: none !important; }
.sidebar-overlay { display: none !important; }

/* ── Main content adjust ── */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
/* sidebar-icon is always visible, no toggle needed */

/* ============ TOPBAR ============ */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.sidebar-toggle {
    background: none; border: none; cursor: pointer;
    color: var(--text-light);
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px; transition: all 0.15s;
    flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--border-light); color: var(--wine); }
.sidebar-toggle .material-icons-outlined { font-size: 22px; }

/* NOTA: topbar legada substituída pela topbar institucional CFO (.inst-topbar).
   Veja o bloco "INSTITUTIONAL TOPBAR" no final deste arquivo. */

.page-title { font-size: 16px; font-weight: 600; color: var(--text); flex: 1; }

.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topbar-icon {
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s;
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 6px;
}
.topbar-icon:hover { color: var(--wine); background: var(--border-light); }
.topbar-icon .material-icons-outlined { font-size: 20px; }

.user-menu { display: flex; align-items: center; gap: 8px; }
.user-name { font-weight: 500; color: var(--text); font-size: 13px; }

/* ============ CONTENT ============ */
.content-area { padding: 24px; flex: 1; }

/* ============ CARDS & WIDGETS ============ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}
.card-header h3 { font-size: 16px; font-weight: 600; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.kpi-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}
.kpi-icon.wine { background: var(--wine); }
.kpi-icon.gold { background: var(--gold); }
.kpi-icon.success { background: var(--success); }
.kpi-icon.danger { background: var(--danger); }
.kpi-icon.info { background: var(--info); }
.kpi-icon.warning { background: var(--warning); }

.kpi-content h4 { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }
.kpi-content p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn .material-icons-outlined { font-size: 18px; }
.btn-primary { background: var(--wine); color: #fff; }
.btn-primary:hover { background: var(--wine-dark); color: #fff; }
.btn-secondary { background: var(--gold); color: #fff; }
.btn-secondary:hover { background: #c49535; color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c82333; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; padding: 12px; }

/* ============ FORMS ============ */
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--wine);
    box-shadow: 0 0 0 3px rgba(106,27,61,0.1);
}
select.form-control { height: 38px; }
textarea.form-control { resize: vertical; }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text);
}
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.form-check label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* ============ TABLE ============ */
.table-responsive { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table th {
    background: var(--bg);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    border-bottom: 2px solid var(--border);
}
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
.data-table tbody tr:hover { background: rgba(106,27,61,0.02); }
.col-actions { width: 100px; text-align: center; }
.empty-state { text-align: center; padding: 40px !important; color: var(--text-muted); }

.inline { display: inline; }

.actions-inline {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

/* ============ BADGES ============ */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.badge-admin { background: var(--wine); color: #fff; }
.badge-chefe_area { background: var(--gold); color: #fff; }
.badge-colaborador { background: var(--info); color: #fff; }
.badge-leitor { background: var(--border); color: var(--text); }

.badge-ativo, .badge-producao, .badge-sucesso { background: #d4edda; color: #155724; }
.badge-inativo, .badge-desativado, .badge-cancelado { background: #f8d7da; color: #721c24; }
.badge-manutencao, .badge-em_renovacao, .badge-aguardando { background: #fff3cd; color: #856404; }
.badge-a_vencer, .badge-erro { background: #f8d7da; color: #721c24; }
.badge-aberto, .badge-solicitado, .badge-pendente { background: #d1ecf1; color: #0c5460; }
.badge-em_andamento, .badge-em_execucao { background: #cce5ff; color: #004085; }
.badge-resolvido, .badge-executado, .badge-concluido { background: #d4edda; color: #155724; }
.badge-fechado, .badge-encerrado { background: var(--border); color: var(--text-light); }

.badge-P1 { background: #dc3545; color: #fff; }
.badge-P2 { background: #fd7e14; color: #fff; }
.badge-P3 { background: #ffc107; color: #333; }
.badge-P4 { background: #6c757d; color: #fff; }

.badge-alta { background: #f8d7da; color: #721c24; }
.badge-media { background: #fff3cd; color: #856404; }
.badge-baixa { background: #d4edda; color: #155724; }

/* ============ ALERTS ============ */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.alert-close {
    background: none; border: none; font-size: 20px;
    cursor: pointer; color: inherit; opacity: 0.5;
}
.alert-close:hover { opacity: 1; }

/* ============ PAGINATION ============ */
.pagination {
    display: flex;
    gap: 4px;
    margin-top: 20px;
    justify-content: center;
}
.pagination-link {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s;
}
.pagination-link:hover { background: var(--bg); color: var(--wine); }
.pagination-link.active {
    background: var(--wine);
    color: #fff;
    border-color: var(--wine);
}
.pagination-ellipsis { padding: 6px 8px; color: var(--text-muted); }

/* ============ PAGE HEADER ============ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.page-header h2 { font-size: 22px; font-weight: 700; }

/* ============ DETAIL PAGE ============ */
.detail-section { margin-bottom: 24px; }
.detail-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--wine-dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
}
.detail-item label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.detail-item p { font-size: 14px; color: var(--text); }

/* ============ TIMELINE ============ */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 8px; top: 0; bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline-item {
    position: relative;
    padding: 12px 0;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px; top: 18px;
    width: 10px; height: 10px;
    background: var(--wine);
    border-radius: 50%;
}
.timeline-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.timeline-content { font-size: 14px; }

/* ============ MODAL ============ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-close {
    background: none; border: none; font-size: 24px;
    cursor: pointer; color: var(--text-muted);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .main-content { margin-left: var(--sidebar-width) !important; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .cfo-topbar { flex-direction: column; gap: 8px; text-align: center; padding: 10px; }
    .cfo-header { flex-direction: column; align-items: flex-start; }
    .cfo-header-nav { width: 100%; }
    .topbar-brand { display: flex; }
}

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ============ HEADER ESTILO CFO ============ */
.cfo-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--wine-dark);
    color: #fff;
    padding: 8px 24px;
    font-size: 13px;
}
.cfo-topbar .material-icons-outlined { font-size: 16px; vertical-align: middle; margin-right: 4px; }
.cfo-topbar-left {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.cfo-topbar-left span { display: inline-flex; align-items: center; }
.cfo-topbar-right {
    display: flex;
    gap: 12px;
}
.cfo-topbar-right a {
    color: #fff;
    opacity: 0.9;
}
.cfo-topbar-right a:hover { opacity: 1; }
.cfo-topbar-right .material-icons-outlined { font-size: 18px; margin-right: 4px; vertical-align: middle; }
.cfo-topbar-link {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
}
.cfo-topbar-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
}
.cfo-topbar-btn:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

/* Header compacto (max 60px) */
.cfo-header-compact {
    display: flex;
    align-items: center;
    background: #f8f7f6;
    padding: 12px 24px;
    max-height: 60px;
    border-bottom: 1px solid var(--border-light);
}
.cfo-header-compact-left {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text);
}
.cfo-header-compact-left:hover { color: var(--wine); }
.cfo-header-logo { height: 36px; width: auto; object-fit: contain; }
.cfo-header-compact span { font-size: 15px; font-weight: 600; color: var(--wine-dark); }

/* Login dropdown na home */
.gov-login-dropdown { position: relative; }
.gov-login-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--wine);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.gov-login-trigger:hover { background: var(--wine-light); }
.gov-login-form-wrap {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    z-index: 50;
}
.gov-login-form-wrap.open { display: block; }
.gov-login-form input {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}
.gov-login-form input:last-of-type { margin-bottom: 16px; }

/* Equipe: titulo + link em uma linha */
.gov-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.gov-map-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--wine);
}

/* Floormap em linha (scroll horizontal se necessario) */
.floormap-one-row { overflow-x: auto; }

.cfo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f7f6;
    padding: 16px 24px;
    margin: 0 -24px 24px -24px;
    border-bottom: 1px solid var(--border);
}
.cfo-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}
.cfo-logo-link { display: flex; }
.cfo-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}
.cfo-org {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cfo-org-name {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text);
}
.cfo-portal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--wine-dark);
}
.cfo-header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cfo-header-nav a {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text);
}
.cfo-header-nav a:hover {
    color: var(--wine);
}
.cfo-nav-highlight {
    background: var(--gold) !important;
    color: #fff !important;
    border-radius: 4px;
}
.cfo-nav-highlight:hover { color: #fff !important; background: #c49535 !important; }
.cfo-nav-btn {
    background: var(--wine) !important;
    color: #fff !important;
    border-radius: 4px;
}
.cfo-nav-btn:hover { color: #fff !important; background: var(--wine-dark) !important; }

/* ========== NAV PORTAL (secundária) ========== */
.portal-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.portal-nav a {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    background: var(--bg);
}
.portal-nav a:hover {
    background: #eee;
    color: var(--wine);
}
.portal-nav a.active {
    background: var(--wine);
    color: #fff;
}
.portal-nav a.active:hover { color: #fff; }

.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--wine); }
.breadcrumb span { margin: 0 6px; }

.gov-section { margin-bottom: 32px; }

/* Hero condensado — imagem GovTI + intro + governança */
.gov-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    min-height: 220px;
    margin: -24px -24px 36px -24px;
    padding: 24px;
}
.gov-hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('/static/img/govti.png');
    background-size: 45% auto;
    background-position: 100% 100%;
    background-repeat: no-repeat;
    opacity: 0.35;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.gov-hero:hover .gov-hero-bg { opacity: 0.45; }
.gov-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(245,245,245,0.95) 0%,
        rgba(248,247,246,0.7) 45%,
        rgba(252,251,250,0.25) 85%,
        transparent 100%
    );
    pointer-events: none;
}
.gov-hero .gov-intro {
    position: relative;
    z-index: 1;
    padding: 28px 40px 32px;
    min-height: 160px;
}
.gov-intro-hero .gov-intro-text { max-width: 580px; }
.gov-hero-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--wine-dark);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.gov-hero-org {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 500;
}
.gov-hero-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.65;
    margin: 0;
}
.gov-hero-desc-secondary {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 12px;
    max-width: 580px;
}
.gov-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--wine);
}
.gov-hero-link:hover { color: var(--wine-light); }
.gov-hero-link .material-icons-outlined { font-size: 18px; }
.gov-intro-block {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 32px 32px;
    margin-bottom: 32px;
}
.gov-intro-block .gov-intro { padding: 0; min-height: 0; }
@media (max-width: 768px) {
    .gov-intro-block { padding: 20px 20px 24px; }
    .gov-hero { margin: -24px -24px 32px -24px; padding: 16px; min-height: 280px; }
    .gov-hero-bg { opacity: 0.3; background-size: 55% auto; background-position: 100% 100%; }
    .gov-hero-gradient { background: linear-gradient(180deg, rgba(245,245,245,0.92) 0%, rgba(248,247,246,0.4) 100%); }
    .gov-hero .gov-intro { padding: 20px 16px; min-height: auto; }
}

.gov-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--wine-dark);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold);
}
.gov-section-title .material-icons-outlined { font-size: 20px; color: var(--wine); }

.gov-intro {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 24px 0;
}
.gov-intro-text { flex: 1; }
.gov-intro-succinct .gov-desc { max-width: 540px; }
.gov-title { font-size: 22px; font-weight: 700; color: var(--wine-dark); margin-bottom: 4px; }
.gov-org { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.gov-desc { font-size: 13px; color: var(--text-light); line-height: 1.6; max-width: 520px; }
.gov-desc-secondary { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

.gov-pillars { display: flex; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.pillar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f8f5f6;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}
.pillar .material-icons-outlined { font-size: 18px; color: var(--wine); }

.gov-login {
    flex-shrink: 0;
    width: 280px;
    padding: 20px;
    background: #faf9fa;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}
.gov-login h3 { font-size: 14px; color: var(--wine-dark); margin-bottom: 4px; }
.gov-login p { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; }
.gov-login-form { display: flex; flex-direction: column; gap: 8px; }
.gov-login-form input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
}
.gov-login-form input:focus {
    outline: none;
    border-color: var(--wine);
}

.gov-content-block {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.gov-content-block h3 {
    font-size: 16px;
    color: var(--wine-dark);
    margin-bottom: 12px;
}
.gov-content-block p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 12px;
}
.gov-content-block ul {
    margin: 12px 0;
    padding-left: 20px;
}
.gov-content-block li { margin-bottom: 6px; }

.catalog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.catalog-table th {
    text-align: left;
    padding: 12px;
    background: var(--bg);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-light);
}
.catalog-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
}
.catalog-table tbody tr:hover { background: rgba(106,27,61,0.03); }
.catalog-table .cat-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: #e8e4e6;
    color: var(--text);
}
.catalog-table .pub-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    background: var(--wine);
    color: #fff;
    margin: 2px;
}

/* Barra de criticidade / importância */
.criticity-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 130px;
}
.criticity-bar-track {
    flex: 1;
    max-width: 80px;
    height: 8px;
    border-radius: 4px;
    background: #e8e8e8;
    overflow: hidden;
}
.criticity-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}
.criticity-bar-fill.criticity-bar-alta {
    background: linear-gradient(90deg, #c62828, #e53935);
    box-shadow: 0 0 8px rgba(198,40,40,0.4);
}
.criticity-bar-fill.criticity-bar-media {
    background: linear-gradient(90deg, #f57c00, #ff9800);
}
.criticity-bar-fill.criticity-bar-baixa {
    background: linear-gradient(90deg, #2e7d32, #43a047);
}
.criticity-bar-fill.criticity-bar-nao-utilizado {
    background: linear-gradient(90deg, #9e9e9e, #bdbdbd);
}
.catalog-row-nao-utilizado .criticity-label {
    color: var(--text-muted);
}
.criticity-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    min-width: 36px;
}
.catalog-row-critical {
    border-left: 3px solid #c62828;
    background: linear-gradient(90deg, rgba(198,40,40,0.04), transparent);
}
.catalog-row-critical:hover {
    background: linear-gradient(90deg, rgba(198,40,40,0.08), rgba(106,27,61,0.03));
}
.catalog-badge-critical {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    background: #c62828;
    color: #fff;
}

/* Catalogo — Agrupado por uso */
.catalog-legend {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
}
.catalog-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Icones de uso — cores */
.catalog-uso-icon { font-size: 18px; }
.catalog-uso-constante { color: #2e7d32; }
.catalog-uso-moderado { color: #f57c00; }
.catalog-uso-raro { color: #c62828; }
.catalog-uso-none { color: #9e9e9e; }
.catalog-uso-afazer { color: #1565c0; }

.catalog-group {
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}
.catalog-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
}
.catalog-group-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.catalog-group-constante .catalog-group-count { background: #2e7d32; }
.catalog-group-moderado .catalog-group-count { background: #f57c00; }
.catalog-group-raro .catalog-group-count { background: #c62828; }
.catalog-group-none .catalog-group-count { background: #9e9e9e; }
.catalog-group-afazer .catalog-group-count { background: #1565c0; }

.catalog-group-constante .catalog-group-header { border-left: 4px solid #2e7d32; }
.catalog-group-moderado .catalog-group-header { border-left: 4px solid #f57c00; }
.catalog-group-raro .catalog-group-header { border-left: 4px solid #c62828; }
.catalog-group-none .catalog-group-header { border-left: 4px solid #9e9e9e; }
.catalog-group-afazer .catalog-group-header { border-left: 4px solid #1565c0; }

.catalog-group .catalog-table { margin: 0; }
.catalog-group .catalog-table th { font-size: 11px; padding: 8px 12px; }
.catalog-group .catalog-table td { padding: 8px 12px; font-size: 13px; }

.catalog-pos {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
}

/* Badge de classificacao por uso */
.catalog-uso-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.catalog-uso-badge .material-icons-outlined { font-size: 14px; }
.catalog-uso-badge-constante { background: rgba(46,125,50,0.1); color: #2e7d32; }
.catalog-uso-badge-moderado { background: rgba(245,124,0,0.1); color: #e65100; }
.catalog-uso-badge-raro { background: rgba(198,40,40,0.08); color: #c62828; }
.catalog-uso-badge-none { background: rgba(158,158,158,0.1); color: #757575; }
.catalog-uso-badge-afazer { background: rgba(21,101,192,0.1); color: #1565c0; }

.catalog-row-constante { border-left: 3px solid rgba(46,125,50,0.3); }
.catalog-row-moderado { border-left: 3px solid rgba(245,124,0,0.3); }
.catalog-row-raro { border-left: 3px solid rgba(198,40,40,0.2); opacity: 0.75; }
.catalog-row-none { border-left: 3px solid rgba(158,158,158,0.2); opacity: 0.65; }
.catalog-row-afazer { border-left: 3px solid rgba(21,101,192,0.3); background: rgba(21,101,192,0.02); }

@media (max-width: 700px) {
    .catalog-legend { gap: 10px; }
    .catalog-uso-badge span:not(.material-icons-outlined) { display: none; }
}

.gov-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.gov-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text);
    transition: all 0.2s;
    border: 1px solid transparent;
}
.gov-area:hover { background: #f8f5f6; box-shadow: var(--shadow-lg); color: var(--text); }
.gov-area .material-icons-outlined { font-size: 24px; color: var(--wine); }

.gov-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 32px;
    background: var(--bg-card);
}
.gov-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.gov-footer-logo {
    height: 36px;
    width: auto;
}
.gov-footer-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.gov-footer-contact span {
    display: inline-flex;
    align-items: center;
}
.gov-footer-contact .material-icons-outlined {
    font-size: 16px;
    margin-right: 4px;
}
.gov-footer-contact a {
    color: var(--wine);
    text-decoration: none;
}
.gov-footer-contact a:hover {
    text-decoration: underline;
}
@media (max-width: 768px) {
    .gov-footer { flex-direction: column; text-align: center; }
}

/* ============ TEAM LAYOUT (Equipe condensada) ============ */
.team-layout { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.team-dept {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.team-dept-header {
    padding: 12px 16px;
    background: #f8f5f6;
    border-bottom: 2px solid var(--gold);
}
.team-dept-name { font-size: 14px; font-weight: 700; color: var(--wine-dark); }
.team-dept-desc { font-size: 11px; color: var(--text-muted); display: block; margin-top: 2px; }
.team-members { padding: 8px; }
.team-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.team-member:hover { background: #f8f5f6; }
.team-member.active { background: #f0e8eb; }
.team-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--wine);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.team-info { flex: 1; min-width: 0; }
.team-name { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.team-role { display: block; font-size: 11px; color: var(--text-muted); }
.team-badge {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============ PERSON DETAIL PANEL ============ */
.person-detail {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    margin-top: 16px;
    border-left: 4px solid var(--wine);
    display: none;
}
.person-detail.visible { display: block; }
.person-detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.person-detail-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--wine);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}
.person-detail-name { font-size: 16px; font-weight: 700; color: var(--text); }
.person-detail-role { font-size: 12px; color: var(--text-light); }
.person-detail-dept { font-size: 11px; color: var(--text-muted); }
.person-detail-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}
.person-detail-close:hover { color: var(--text); }
.person-detail-body { }
.person-detail-info {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-light);
}
.person-detail-systems { display: flex; flex-wrap: wrap; gap: 6px; }
.sys-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 14px;
    background: #f0e8eb;
    font-size: 12px;
    color: var(--wine-dark);
    font-weight: 500;
}
.sys-tag:hover { background: #e8dfe3; color: var(--wine-dark); }
.sys-role { font-size: 10px; color: var(--text-muted); font-weight: 400; }

/* ============ INDICATORS ============ */
.indicators { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    color: var(--text);
    transition: all 0.2s;
}
.indicator:hover { box-shadow: var(--shadow-lg); color: var(--text); }
.indicator-value { font-size: 28px; font-weight: 800; color: var(--wine-dark); }
.indicator-label { font-size: 12px; font-weight: 600; color: var(--text-light); margin-top: 2px; }
.indicator-sub { font-size: 11px; color: var(--text-muted); }
.indicator-alert { font-size: 11px; color: var(--danger); font-weight: 600; }
.indicator-warn { color: var(--warning); }
.indicator-danger { color: var(--danger); }

/* ============ QUICK ACTIONS (Dashboard) ============ */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    transition: all 0.15s;
    border: 1px solid transparent;
}
.quick-action:hover {
    border-color: var(--wine);
    background: #f8f5f6;
    color: var(--wine);
}
.quick-action .material-icons-outlined { font-size: 28px; color: var(--wine); }

/* ============ MANAGE GRID (Dashboard) ============ */
.manage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.manage-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text);
    transition: all 0.15s;
}
.manage-item:hover { box-shadow: var(--shadow-lg); color: var(--text); }
.manage-item .material-icons-outlined { font-size: 24px; color: var(--wine); flex-shrink: 0; }
.manage-item div { flex: 1; min-width: 0; }
.manage-item strong { display: block; font-size: 14px; }
.manage-item small { font-size: 12px; color: var(--text-muted); }
.manage-arrow { font-size: 18px !important; color: var(--text-muted) !important; }

/* ============ KPI CARDS (Dashboard) ============ */
.kpi-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.kpi-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.kpi-icon .material-icons-outlined { font-size: 22px; }
.kpi-icon.wine { background: #f0e8eb; color: var(--wine); }
.kpi-icon.gold { background: #fdf3dc; color: var(--gold); }
.kpi-icon.success { background: #d4edda; color: var(--success); }
.kpi-icon.danger { background: #f8d7da; color: var(--danger); }
.kpi-icon.warning { background: #fff3cd; color: #856404; }
.kpi-icon.info { background: #d1ecf1; color: var(--info); }
.kpi-content h4 { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1; }
.kpi-content p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ============ SYSTEMS GRID (Home) ============ */
.systems-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.system-card {
    position: relative;
    display: block;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text);
    transition: all 0.15s;
    border-left: 3px solid var(--wine);
    overflow: hidden;
}
.system-card:hover { box-shadow: var(--shadow-lg); color: var(--text); }
.system-card-criticity-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #c62828, #e53935);
    transition: width 0.3s ease;
}
.system-card-critical {
    border-left-color: #c62828;
    box-shadow: 0 2px 8px rgba(198,40,40,0.15);
}
.system-card-critical:hover {
    box-shadow: 0 4px 16px rgba(198,40,40,0.2);
}
.system-card-critical .system-card-criticity-bar {
    height: 4px;
    background: linear-gradient(90deg, #c62828, #e53935);
    box-shadow: 0 0 10px rgba(198,40,40,0.5);
}
.system-card-media .system-card-criticity-bar {
    background: linear-gradient(90deg, #f57c00, #ff9800);
}
.system-card-baixa .system-card-criticity-bar {
    background: linear-gradient(90deg, #2e7d32, #43a047);
}
.system-card-badge-critical {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    background: #c62828;
    color: #fff;
}
.system-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.system-card-name { font-weight: 600; font-size: 14px; }
.system-card-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.system-card-meta { display: flex; gap: 8px; align-items: center; }
.system-card-tech { font-size: 11px; color: var(--text-muted); }

/* ============ FLOOR MAP (Planta Baixa SVG) ============ */
.floormap-container {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    overflow-x: auto;
}
.floormap-svg {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}
.floormap-svg .room {
    fill: none;
    stroke: #444;
    stroke-width: 3;
}
.floormap-svg .wall {
    stroke: #444;
    stroke-width: 3;
    fill: none;
}
.floormap-svg .door {
    stroke: #888;
    stroke-width: 2;
    fill: #f5f5f5;
}
.floormap-svg .desk {
    stroke: #999;
    stroke-width: 1.5;
    fill: #f0f0f0;
    rx: 3;
}
.floormap-svg .chair {
    fill: #ccc;
    stroke: #999;
    stroke-width: 1;
}
.floormap-svg .monitor {
    fill: #555;
    stroke: #333;
    stroke-width: 1;
    rx: 1;
}
.floormap-svg .seat-area {
    fill: transparent;
    stroke: none;
    cursor: pointer;
    transition: fill 0.15s;
}
.floormap-svg .seat-area:hover {
    fill: rgba(139,46,90,0.08);
}
.floormap-svg .seat-area.active {
    fill: rgba(139,46,90,0.15);
}
.floormap-svg .seat-area.vacant {
    cursor: default;
}
.floormap-svg .seat-area.vacant:hover {
    fill: transparent;
}
.floormap-svg .person-label {
    font-size: 8px;
    font-weight: 600;
    fill: var(--wine-dark);
    pointer-events: none;
}
.floormap-svg .room-label {
    font-size: 14px;
    font-weight: 800;
    fill: #333;
    letter-spacing: 1px;
}
.floormap-svg .room-bg-infra { fill: rgba(219,234,254,0.3); }
.floormap-svg .room-bg-gerencia { fill: rgba(253,230,138,0.3); }
.floormap-svg .room-bg-dev { fill: rgba(220,252,231,0.3); }
.floormap-svg .room-bg-ops { fill: rgba(224,231,255,0.3); }
.floormap-svg .furniture { fill: #e8e4e6; stroke: #bbb; stroke-width: 1; }

.floormap-tooltip {
    position: fixed;
    background: rgba(17,17,17,0.92);
    color: white;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    pointer-events: none;
    display: none;
    z-index: 100;
    white-space: nowrap;
}

/* Floor map detail panel */
.floormap-detail {
    position: fixed;
    right: -400px;
    top: 0;
    width: 360px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    z-index: 150;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 0;
}
.floormap-detail.visible { right: 0; }
.floormap-detail-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-light);
}
.floormap-detail-body { padding: 20px; }
.floormap-detail-section {
    margin-bottom: 16px;
}
.floormap-detail-section h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 8px;
}
.floormap-detail-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 140;
    display: none;
}
.floormap-detail-overlay.visible { display: block; }

/* Cargo tooltip trigger */
.cargo-tooltip-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.cargo-tooltip-trigger:hover::after {
    content: attr(title);
    position: absolute;
    left: 24px;
    top: 0;
    width: 300px;
    max-height: 250px;
    overflow-y: auto;
    background: rgba(17,17,17,0.96);
    color: #fff;
    padding: 10px 14px;
    font-size: 11px;
    line-height: 1.5;
    border-radius: 8px;
    z-index: 200;
    white-space: pre-line;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    pointer-events: none;
}

/* Cargo badge in people list */
.cargo-badge-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    color: var(--gold);
    margin-left: 4px;
}
.cargo-badge-info .cargo-popup {
    display: none;
    position: absolute;
    left: 24px;
    top: -10px;
    width: 340px;
    max-height: 280px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 14px;
    font-size: 12px;
    line-height: 1.6;
    border-radius: 8px;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    color: var(--text);
}
.cargo-badge-info:hover .cargo-popup {
    display: block;
}

@media (max-width: 768px) {
    .team-layout { grid-template-columns: 1fr; }
    .indicators { grid-template-columns: repeat(2, 1fr); }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
    .manage-grid { grid-template-columns: 1fr; }
    .gov-intro { flex-direction: column; }
    .gov-login { width: 100%; }
    .floormap-detail { width: 100%; right: -100%; }
}

/* ============ Página Governança e Gestão ============ */
.gov-content-page {
    max-width: 800px;
}
.gov-content-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}
.gov-content-section:last-of-type { border-bottom: none; }
.gov-content-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--wine-dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold);
}
.gov-content-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.gov-content-section p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 12px;
}
.gov-content-section ul, .gov-content-section ol {
    margin: 12px 0;
    padding-left: 24px;
}
.gov-content-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}
.gov-highlight-box {
    background: #f8f5f6;
    padding: 20px 24px !important;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}
.gov-benefit-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.gov-benefit-card h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}
.gov-benefit-card .material-icons-outlined {
    font-size: 20px;
    color: var(--wine);
}
.gov-pillars-list { display: flex; flex-direction: column; gap: 12px; }
.gov-pillar-item {
    background: #f8f5f6;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid var(--wine);
    font-size: 14px;
    line-height: 1.6;
}
.gov-practices-list { padding-left: 24px !important; }
.gov-practices-list li { margin-bottom: 12px; }
.gov-content-footer {
    background: #f8f5f6;
    padding: 20px 24px !important;
    border-radius: var(--radius);
    margin-top: 24px;
}

/* ── Notification Bell ──────────────────────────────────── */
.notif-bell { display: inline-flex; align-items: center; }
.notif-badge {
    position: absolute; top: 0; right: -2px;
    background: var(--danger, #e74c3c); color: #fff;
    font-size: 10px; font-weight: 700;
    min-width: 16px; height: 16px;
    border-radius: 8px; padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
.notif-panel {
    position: absolute; top: 100%; right: 0;
    width: 340px; max-height: 420px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #ddd);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow: hidden;
}
.notif-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid var(--border-light, #eee);
    font-size: 13px;
}
.notif-panel-list {
    max-height: 360px; overflow-y: auto;
}
.notif-item {
    display: flex; gap: 10px; padding: 10px 14px;
    border-bottom: 1px solid var(--border-light, #f0f0f0);
    cursor: pointer; transition: background 0.15s;
    text-decoration: none; color: inherit;
}
.notif-item:hover { background: hsla(0,0%,0%,0.03); }
.notif-item.unread { background: hsla(var(--wine-h, 340), 50%, 50%, 0.05); }
.notif-item .notif-icon {
    flex-shrink: 0; width: 32px; height: 32px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.notif-icon.info { background: hsla(210,80%,50%,0.12); color: var(--info, #3498db); }
.notif-icon.alerta { background: hsla(40,90%,50%,0.12); color: var(--warning, #f39c12); }
.notif-icon.urgente { background: hsla(0,70%,50%,0.12); color: var(--danger, #e74c3c); }
.notif-icon.contrato_vencer { background: hsla(40,90%,50%,0.12); color: var(--warning, #f39c12); }
.notif-icon.incidente { background: hsla(0,70%,50%,0.12); color: var(--danger, #e74c3c); }
.notif-icon.sistema { background: hsla(210,80%,50%,0.12); color: var(--info, #3498db); }
.notif-icon.permissao { background: hsla(280,60%,50%,0.12); color: #9b59b6; }
.notif-item-content { flex: 1; min-width: 0; }
.notif-item-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.notif-item-msg { font-size: 12px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.notif-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }


/* =============================================================
   CFO INTEGRATED LAYOUT — Sidebar + Topbar Institucional
   Baseado no mockup do padrão CFO: sidebar bordô-escuro icon-only
   com cartão duplo no topo que se conecta visualmente à topbar.
   ============================================================= */

:root {
    --sidebar-w:     64px;
    --sidebar-w-exp: 240px;
    --topbar-bar-h:  44px;
    --brand-soft:    rgba(122, 30, 38, 0.06);
    --burgundy-500:  #9A2832;
    --burgundy-900:  #2A0B0D;
}

/* ── Sidebar fixa (creme degradê, integra com topbar) ── */
.sidebar-icon {
    width: var(--sidebar-w) !important;
    background: linear-gradient(180deg, #EBE0CE 0%, #F5EDE0 55%, #FBF8F4 100%) !important;
    border-right: 1px solid rgba(122, 30, 38, 0.12) !important;
    box-shadow:
        2px 0 12px rgba(122, 30, 38, 0.06),
        4px 0 24px rgba(122, 30, 38, 0.04) !important;
    top: 0 !important;
}

/* ── Cartão duplo no topo da sidebar (integra visualmente com topbar) ── */
.sidebar-brand-card {
    flex-shrink: 0;
    padding: 2px;
    gap: 2px;
    display: flex;
    flex-direction: column;
    background: transparent;
    width: 100%;
    height: var(--inst-topbar-h);
    box-sizing: border-box;
}
.sidebar-brand-top {
    height: calc(var(--topbar-bar-h) - 4px);
    background: var(--cfo-bar);
    border-radius: 0;
    flex-shrink: 0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}
.sidebar-brand-bottom {
    flex: 1;
    background: linear-gradient(180deg, var(--topbar-menu-bg) 0%, var(--cream-100) 100%);
    border-radius: 0;
    padding: 0 12px;
    display: flex;
    align-items: center;
    box-shadow:
        inset 0 1px 0 rgba(122, 30, 38, 0.05),
        inset -1px 0 0 rgba(122, 30, 38, 0.08);
}
.sidebar-brand-mark {
    display: none !important;
}
.sidebar-brand-mark {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--burgundy-600);
    color: var(--cream-50);
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 16px;
    font-style: italic;
    display: grid; place-items: center;
    flex-shrink: 0;
    box-shadow: 0 3px 8px -2px rgba(122,30,38,0.35);
    line-height: 1;
}
.sidebar-brand-text {
    opacity: 0;
    transition: opacity 200ms cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    line-height: 1.1;
}
.sidebar-icon:hover .sidebar-brand-text { opacity: 1; }
.sidebar-brand-text h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 15px;
    color: var(--burgundy-600);
    font-weight: 400;
    letter-spacing: -0.01em;
    font-style: italic;
    margin: 0;
}
.sidebar-brand-text p {
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 2px 0 0;
}

/* ── Topbar institucional: 2 faixas integradas ─────────────── */
.inst-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    font-family: 'Geist', 'Inter', system-ui, -apple-system, sans-serif;
}
.inst-bar {
    background: var(--topbar-bar);
    color: var(--topbar-bar-text);
    font-size: 12.5px;
    height: var(--topbar-bar-h);
    display: flex;
    align-items: center;
    transition: background 400ms var(--ease-in-out);
}
.inst-bar-inner {
    padding: 0 24px 0 calc(var(--sidebar-w) + 24px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    width: 100%;
}
.inst-bar-left {
    display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
    justify-self: start;
}
.inst-bar-center {
    justify-self: center;
}

/* Theme swatches na faixa vermelha */
.theme-swatch-group {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 100px;
    backdrop-filter: blur(8px);
}
.theme-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.45);
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
    position: relative;
}
.theme-swatch:hover {
    transform: scale(1.18);
}
.theme-swatch.active {
    border-color: #FFFFFF;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.35),
        inset 0 0 0 1px rgba(0, 0, 0, 0.12);
    transform: scale(1.08);
}
.theme-swatch-cream    { background: linear-gradient(135deg, #F5EDE0 0%, #EBE0CE 100%); }
.theme-swatch-light    { background: linear-gradient(135deg, #FFFFFF 0%, #E8E8E8 100%); }
.theme-swatch-dark     { background: linear-gradient(135deg, #5C1519 0%, #2A0B0D 100%); }
.theme-swatch-midnight { background: linear-gradient(135deg, #1B2540 0%, #0A0F1F 100%); }
.inst-bar-item {
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--topbar-bar-text);
    text-decoration: none;
    transition: opacity 180ms;
    white-space: nowrap;
}
.inst-bar-item:hover { opacity: 0.78; color: var(--topbar-bar-text); }
.inst-bar-item svg { width: 13px; height: 13px; flex-shrink: 0; }
.inst-bar-right { display: flex; align-items: center; gap: 12px; }

.inst-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 10px 4px 4px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 100px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--topbar-bar-text);
    text-decoration: none;
    backdrop-filter: blur(8px);
    transition: background 180ms, transform 180ms;
}
.inst-chip:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
    color: var(--topbar-bar-text);
}
.inst-chip-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px;
    background: var(--cream-50);
    border-radius: 50%;
    color: var(--burgundy-700);
    flex-shrink: 0;
}
.inst-chip-badge svg { width: 12px; height: 12px; }
.inst-chip-badge-lai,
.inst-chip.yellow .inst-chip-badge {
    background: var(--amber, #F7C437);
    color: var(--burgundy-800);
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 14px;
    font-style: italic;
    font-weight: 600;
    line-height: 22px;
}

/* Faixa 2: logo + tagline + actions */
.inst-menu {
    background: var(--topbar-menu-bg);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--border-subtle, rgba(122,30,38,0.10));
    transition: background 400ms var(--ease-in-out);
    height: calc(var(--inst-topbar-h) - var(--topbar-bar-h));
}
.inst-menu-inner {
    height: 100%;
    position: relative;
    padding: 0 24px 0 calc(var(--sidebar-w) + 24px);
    display: flex;
    align-items: center;
    gap: 24px;
}
.inst-menu-inner > .inst-logos {
    position: absolute;
    left: calc(50% + var(--sidebar-w) / 2);
    top: 50%;
    transform: translate(-50%, -50%);
}
.inst-menu-inner > .inst-actions {
    margin-left: auto;
}
.inst-logos { display: flex; align-items: center; gap: 14px; }
.inst-combined {
    height: 52px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    transition: transform 220ms var(--ease-out);
}
.inst-combined-link { display: inline-flex; }
.inst-combined-link:hover .inst-combined { transform: scale(1.03); }
.inst-titles {
    padding-left: 14px;
    border-left: 1px solid var(--border-subtle, rgba(122,30,38,0.10));
}
.inst-titles h1 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 18px;
    color: var(--burgundy-600);
    letter-spacing: -0.01em;
    font-style: italic;
    margin: 0;
    font-weight: 400;
}
.inst-titles p {
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 2px 0 0;
}

/* Actions no topbar */
.inst-actions {
    display: flex; align-items: center; gap: 8px;
}
.inst-action {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: grid; place-items: center;
    color: var(--text-secondary);
    transition: all 180ms;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.inst-action:hover {
    background: var(--brand-soft);
    color: var(--brand);
}
.inst-action .material-icons-outlined { font-size: 18px; }
.inst-action svg { width: 16px; height: 16px; }
.inst-action-dot {
    position: absolute;
    top: 8px; right: 8px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--brand, var(--burgundy-600));
    border: 2px solid var(--bg-elevated, #FFFFFF);
}
.inst-user {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 4px 12px 4px 4px;
    background: var(--brand-soft);
    border: 1px solid var(--border-subtle, rgba(122,30,38,0.10));
    border-radius: 100px;
    margin-left: 4px;
    cursor: pointer;
    transition: all 180ms;
    text-decoration: none;
    color: inherit;
}
.inst-user:hover {
    background: rgba(122, 30, 38, 0.1);
    border-color: rgba(122, 30, 38, 0.18);
}
.inst-user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--burgundy-600);
    color: var(--cream-50);
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 14px;
    font-style: italic;
    display: grid; place-items: center;
    flex-shrink: 0;
    line-height: 1;
}
.inst-user-text {
    font-size: 12.5px;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.1;
    white-space: nowrap;
}
.inst-user-text span {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 1px;
}

/* ── Background shapes globais (sutis atrás do conteúdo) ── */
.bg-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.bg-shape {
    position: absolute;
    opacity: 0.5;
}
.bg-shape-1 {
    top: -100px; right: -80px;
    width: 360px; height: 360px;
}
.bg-shape-2 {
    bottom: -120px; left: 200px;
    width: 280px; height: 280px;
    opacity: 0.35;
}
.bg-shape-3 {
    top: 40%; right: 8%;
    width: 180px; height: 180px;
    opacity: 0.25;
}

/* Content: dá zIndex acima das shapes */
.app-layout { position: relative; z-index: 1; }
.main-content { position: relative; z-index: 1; }

/* ── Mobile menu btn + overlay ── */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 10px; left: 10px;
    z-index: 30;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--cream-50);
    color: var(--burgundy-600);
    border: 1px solid rgba(122, 30, 38, 0.18);
    box-shadow: 0 4px 14px rgba(122,30,38,0.18);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.mobile-menu-btn .material-icons-outlined { font-size: 22px; }
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 5, 6, 0.5);
    backdrop-filter: blur(3px);
    z-index: 18;
    opacity: 0;
    transition: opacity 240ms;
}
.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ── Responsivo ── */
@media (max-width: 1060px) {
    .inst-user-text { display: none; }
    .inst-user { padding: 4px; }
}
@media (max-width: 900px) {
    .inst-titles p { display: none; }
    .inst-titles h1 { font-size: 15px; }
    .inst-bar-left .inst-bar-item:nth-child(2) { display: none; }
    .inst-chip { display: none; }
}
@media (max-width: 720px) {
    .mobile-menu-btn { display: flex; }
    .sidebar-icon {
        transform: translateX(-100%);
        transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
        width: 260px !important;
    }
    .sidebar-icon.open { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
    .inst-bar-inner { padding: 0 16px 0 60px; font-size: 11.5px; justify-content: center; }
    .inst-menu-inner { padding: 10px 16px 10px 60px; gap: 12px; flex-wrap: nowrap; }
    .inst-combined { height: 42px; }
    .inst-titles { display: none; }
    .inst-actions { gap: 4px; }
    .inst-action { width: 32px; height: 32px; }
    .inst-user { display: none; }
    .bg-shape-1 { width: 260px; height: 260px; }
    .bg-shape-3 { display: none; }
}

/* Remover logo antigo redundante (brand-card já tem o logo) */
.sidebar-icon .si-logo { display: none !important; }

/* Ajustar nav pra começar após o cartão */
.sidebar-icon .si-nav {
    flex: 1;
    padding-top: 8px;
}

/* Sidebar mantém largura fixa — não expande no hover */
