/* /assets/css/core/02_layout_fixo.css */

body {
    background-color: var(--bg-outer);
    padding: 18px;
    display: flex;
    justify-content: center;
    align-items: stretch;
    min-height: 100vh;
}

.app-window {
    width: 100%;
    max-width: 1480px;
    min-height: calc(100vh - 36px);
    background-color: var(--bg-shell);
    border: 1px solid var(--border-white);
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
    display: flex;
    overflow: hidden;
}

/* 4.1. Barra Lateral (sidebar_nav.php) */
.sidebar {
    width: 256px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-white);
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 4px 6px 4px;
}

.sidebar-brand-title {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    color: var(--text-dark);
}

.sidebar-brand-badge {
    background-color: var(--bg-charcoal);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 6px;
}

.sidebar-search {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-search svg {
    position: absolute;
    left: 12px;
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    pointer-events: none;
}

.sidebar-search input {
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-white);
    border-radius: 12px;
    padding: 9px 12px 9px 34px;
    font-family: var(--font-main);
    font-size: 0.78rem;
    color: var(--text-dark);
    outline: none;
}

/* Grade 2x3 (.nav-tiles) */
.nav-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.nav-tile {
    height: 82px;
    border-radius: 18px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.76rem;
    transition: all 0.2s ease;
}

.nav-tile svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
}

.nav-tile:hover {
    transform: translateY(-2px);
    background-color: #ffffff;
}

.nav-tile.active {
    background-color: var(--bg-charcoal);
    color: #ffffff;
    border-color: var(--bg-charcoal);
    box-shadow: 0 8px 18px rgba(44, 44, 46, 0.22);
}

/* Lista de Ações Rápidas (.quick-actions) */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    border-radius: 12px;
    padding: 6px 4px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.quick-action-btn:hover {
    opacity: 0.75;
}

.q-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    flex-shrink: 0;
}

.q-icon svg {
    width: 15px;
    height: 15px;
}

/* Rodapé de Status (.pro-banner) */
.pro-banner {
    margin-top: auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-white);
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pro-banner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.78rem;
}

.pro-badge-ok {
    background-color: var(--bg-charcoal);
    color: #fff;
    font-size: 0.62rem;
    padding: 2px 6px;
    border-radius: 5px;
    font-weight: 700;
}

/* 4.2. Área Principal e Barra Superior (header_topo.php) */
.main-area {
    flex: 1;
    padding: 22px 30px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-x: hidden;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-greeting {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.header-datetime {
    font-size: 0.76rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-circle-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    text-decoration: none;
}

.icon-circle-btn svg {
    width: 17px;
    height: 17px;
}

.badge-dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--red-trend);
}

.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--bg-charcoal);
    color: #ffffff;
    border: 2px solid #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
}

/* 4.3. Palco Superior em Leque (.fan-stage) + Faixa de 4 KPIs (.metrics-strip) */
.stage-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4px;
}

.fan-stage {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    padding: 0 20px;
    margin-bottom: -14px; /* Encaixa suavemente atrás da metrics-strip */
    z-index: 1;
}

.metrics-strip {
    position: relative;
    z-index: 2;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background-color: rgba(245, 245, 242, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-white);
    border-radius: 20px;
    padding: 16px 22px;
    gap: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
}

.metric-col {
    border-right: 1px solid var(--border-subtle);
    padding-right: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-col:last-child {
    border-right: none;
    padding-right: 0;
}

.metric-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-row-val {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.metric-value {
    font-size: 1.45rem;
    font-family: var(--font-num);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.spark-svg {
    width: 58px;
    height: 22px;
    overflow: visible;
}