/* ============================================================
   BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/* ============================================================
   LOGIN — body e componentes (intocados)
   ============================================================ */
html,
body {
    width: 100%;
    height: 100%;
}

body {
    background: url('/assets/img/background.png') center center no-repeat;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    overflow: hidden;
}

.login-box {
    width: min(420px, 100%);
    padding: 45px;
    border-radius: 22px;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(212,175,55,.22);
    box-shadow: 0 0 45px rgba(212,175,55,.12);
}

.logo {
    width: 180px;
    display: block;
    margin: 0 auto 20px auto;
}

.login-box h1 {
    color: #FFD700;
    text-align: center;
    font-size: 34px;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.login-box p {
    color: #d6d6d6;
    text-align: center;
    font-size: 16px;
    line-height: 26px;
    margin-bottom: 18px;
}

.login-box hr {
    border: none;
    height: 1px;
    background: rgba(212,175,55,.25);
    margin: 28px 0;
}

.login-box h3 {
    color: #ffffff;
    text-align: center;
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 12px;
}

.login-box input {
    width: 100%;
    padding: 16px;
    margin-top: 18px;
    border: none;
    border-radius: 10px;
    background: #111;
    color: #fff;
    font-size: 15px;
    outline: none;
}

.login-box button {
    width: 100%;
    margin-top: 25px;
    padding: 16px;
    border: none;
    border-radius: 10px;
    background: #d4af37;
    color: #000;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: .30s;
}

.login-box button:hover {
    background: #FFD700;
}

.login-box p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   DASHBOARD — body override + layout
   ============================================================ */
body.dashboard-body {
    background: radial-gradient(circle at top right, rgba(212,175,55,0.16), transparent 35%), #050505;
    background-color: #050505;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    color: #f4f4f4;
}

/* ---- Banner topo ---- */
.page-banner {
    flex-shrink: 0;
    width: 100%;
    line-height: 0;
}

.page-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---- Linha sidebar + conteúdo ---- */
.page-layout {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ---- Sidebar ---- */
.sidebar {
    width: 220px;
    min-width: 220px;
    height: 100%;
    overflow-y: auto;
    padding: 20px 16px;
    background: rgba(8,8,8,0.97);
    border-right: 1px solid rgba(212,175,55,0.2);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.sidebar-logo {
    width: 52px;
    max-width: 60px;
    display: block;
    margin-bottom: 14px;
}

.sidebar-title {
    color: #ffd700;
    font-size: 16px;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.sidebar-subtitle {
    color: #c9b36a;
    font-size: 12px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    text-decoration: none;
    color: #d3d3d3;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    background: rgba(255,255,255,0.02);
    transition: 0.2s ease;
    white-space: nowrap;
}

.menu-item:hover,
.menu-item.active {
    color: #111;
    background: linear-gradient(90deg, #d4af37, #ffd700);
    border-color: rgba(255,215,0,0.35);
}

/* ---- Main area ---- */
.dashboard-main {
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ---- Header ---- */
.dashboard-header {
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 14px;
    background: rgba(11,11,11,0.92);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-shrink: 0;
}

.dashboard-header h1 {
    color: #ffd700;
    font-size: 24px;
    margin-bottom: 4px;
}

.dashboard-header p {
    color: #bdbdbd;
    font-size: 13px;
}

.badge-premium {
    background: linear-gradient(90deg, #d4af37, #ffd700);
    color: #111;
    font-weight: bold;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 12px;
    letter-spacing: 0.4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ---- Metric cards (linha 1) ---- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    flex-shrink: 0;
}

.metric-card,
.panel-card {
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(20,20,20,0.96), rgba(7,7,7,0.96));
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}

.metric-card {
    padding: 18px 16px;
}

.metric-label {
    color: #c8c8c8;
    font-size: 12px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    color: #ffd700;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 6px;
}

.metric-note {
    color: #a7a7a7;
    font-size: 11px;
}

/* ---- Panel cards (linhas 2 e 3) ---- */
.cards-grid {
    display: grid;
    gap: 14px;
    flex-shrink: 0;
}

.cards-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-card {
    padding: 20px;
}

.panel-card h3 {
    color: #ffd700;
    font-size: 18px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212,175,55,0.15);
}

.panel-card p {
    color: #d4d4d4;
    font-size: 14px;
    margin-bottom: 8px;
}

.panel-card p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    body.dashboard-body {
        height: auto;
        overflow: auto;
    }

    .page-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 0;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(212,175,55,0.2);
    }

    .dashboard-main {
        height: auto;
    }
}

@media (max-width: 680px) {
    .metrics-grid,
    .cards-grid-two {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   MÓDULO INDICADOR MACRO
   ============================================================ */

/* ---- Score bar ---- */
.macro-score-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    margin: 10px 0 8px;
    overflow: hidden;
}

.macro-score-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* ---- Tabelas de dados ---- */
.macro-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 4px;
}

.macro-table thead tr {
    border-bottom: 1px solid rgba(212,175,55,0.2);
}

.macro-table th {
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.4px;
    padding: 6px 8px;
    text-align: left;
}

.macro-table td {
    padding: 9px 8px;
    color: #d4d4d4;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.macro-table tbody tr:last-child td {
    border-bottom: none;
}

.macro-table tbody tr:hover td {
    background: rgba(212,175,55,0.05);
}

/* ---- Sinais de variação ---- */
.sinal-positivo { color: #00e676; font-weight: 600; }
.sinal-negativo { color: #ef5350; font-weight: 600; }
.sinal-neutro   { color: #bdbdbd; }

.macro-region {
    color: #888;
    font-size: 12px;
}

.macro-date {
    color: #888;
    font-size: 12px;
    white-space: nowrap;
}

/* ---- Checklist ---- */
.macro-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    font-size: 13px;
}

.checklist-status {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.status-ok      { background: rgba(0,230,118,0.15); color: #00e676; border: 1px solid rgba(0,230,118,0.3); }
.status-pendente{ background: rgba(255,255,255,0.05); color: #888; border: 1px solid rgba(255,255,255,0.1); }
.status-alerta  { background: rgba(255,160,0,0.15); color: #ffa000; border: 1px solid rgba(255,160,0,0.3); }

.checklist-text {
    flex: 1;
    color: #d4d4d4;
}

.checklist-categoria {
    flex-shrink: 0;
    font-size: 10px;
    color: #666;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.12);
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
}