/* Sprint BR — Global CSS */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --orange:   #F15A24;
    --orange-lt:#FFF3E0;
    --dark:     #1A1A2E;
    --text:     #1A1A1A;
    --muted:    #999;
    --border:   #EAEAEA;
    --bg:       #F7F8FA;
    --white:    #FFFFFF;
    --green:    #27AE60;
    --yellow:   #F5C518;
    --red:      #E74C3C;
    --blue:     #1A73E8;
    --sidebar-w: 220px;
}

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
       background: var(--bg); color: var(--text); font-size: 14px; }

a { color: inherit; text-decoration: none; }

/* ─── LAYOUT HUB (home) ──────────────────────────────────────────────── */
.hub-layout { display: flex; min-height: 100vh; }

.hub-sidebar {
    width: var(--sidebar-w); background: var(--white);
    border-right: 1px solid var(--border); padding: 24px 16px;
    display: flex; flex-direction: column; position: fixed;
    top: 0; left: 0; height: 100vh; z-index: 100;
}
.hub-sidebar .logo { margin-bottom: 24px; }
.hub-sidebar .logo img { width: 120px; }
.hub-sidebar hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.hub-sidebar .user-name { font-weight: 700; font-size: 13px; }
.hub-sidebar .user-badge {
    display: inline-block; font-size: 11px; font-weight: 700;
    border-radius: 20px; padding: 2px 10px; margin-top: 4px; color: white;
}
.hub-sidebar .btn-logout {
    margin-top: auto; display: block; text-align: center;
    padding: 8px; border-radius: 8px; font-size: 13px;
    color: var(--muted); border: 1px solid var(--border);
    transition: all .15s;
}
.hub-sidebar .btn-logout:hover { background: #fee; color: var(--red); border-color: var(--red); }

.hub-main { margin-left: var(--sidebar-w); padding: 40px 48px; flex: 1; }

/* ─── LAYOUT MÓDULO (sidebar escura) ────────────────────────────────── */
.mod-layout { display: flex; min-height: 100vh; }

.mod-sidebar {
    width: var(--sidebar-w); background: var(--dark);
    display: flex; flex-direction: column; position: fixed;
    top: 0; left: 0; height: 100vh; z-index: 100; overflow-y: auto;
}
.mod-sidebar .mod-brand {
    padding: 20px 16px 12px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.mod-sidebar .mod-brand .brand-name {
    font-size: 20px; font-weight: 900; color: var(--orange); letter-spacing: -.5px;
}
.mod-sidebar .mod-brand .brand-sub {
    font-size: 10px; color: #888; letter-spacing: .15em; text-transform: uppercase; margin-top: 2px;
}
.mod-sidebar nav { padding: 12px 8px; flex: 1; }
.mod-sidebar nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px; color: #ccc;
    font-size: 13px; transition: all .15s; margin-bottom: 2px;
}
.mod-sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.mod-sidebar nav a.active { background: rgba(241,90,36,.18); color: var(--orange); font-weight: 700; }
.mod-sidebar nav .nav-section {
    font-size: 10px; font-weight: 700; letter-spacing: .12em;
    color: #555; text-transform: uppercase; padding: 12px 12px 4px;
}
.mod-sidebar .mod-footer {
    padding: 12px 8px; border-top: 1px solid rgba(255,255,255,.08);
}
.mod-sidebar .mod-footer .user-info { padding: 8px 12px; }
.mod-sidebar .mod-footer .user-info .uname { color: #ddd; font-size: 13px; font-weight: 600; }
.mod-sidebar .mod-footer .user-info .ubadge { font-size: 11px; color: #777; margin-top: 2px; }
.mod-sidebar .mod-footer a {
    display: block; padding: 8px 12px; border-radius: 8px;
    color: #888; font-size: 12px; transition: all .15s;
}
.mod-sidebar .mod-footer a:hover { background: rgba(255,255,255,.06); color: #ccc; }

.mod-main { margin-left: var(--sidebar-w); padding: 36px 44px; flex: 1; min-width: 0; }
.mod-header { margin-bottom: 28px; }
.mod-header h1 { font-size: 22px; font-weight: 800; color: var(--text); }
.mod-header p  { color: var(--muted); margin-top: 4px; font-size: 13px; }
.mod-divider   { border: none; border-top: 1px solid var(--border); margin: 0 0 28px; }

/* ─── CARDS EXECUTIVOS ───────────────────────────────────────────────── */
.cards-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.exec-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 12px; padding: 20px 24px;
}
.exec-card .val { font-size: 30px; font-weight: 800; }
.exec-card .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ─── HUB CARDS ──────────────────────────────────────────────────────── */
.hub-category { font-size: 11px; font-weight: 700; letter-spacing: .09em;
                color: var(--muted); margin: 20px 0 10px; }
.hub-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hub-grid.single { grid-template-columns: 1fr 3fr; }

.hub-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 12px; padding: 16px; min-height: 115px;
    display: flex; flex-direction: column; gap: 5px;
    transition: box-shadow .15s, transform .15s; cursor: pointer;
    position: relative;
}
.hub-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.09); transform: translateY(-2px); }
.hub-card.locked { opacity: .4; cursor: default; pointer-events: none; }
.hub-card.destaque { border: 2px solid var(--orange);
    background: linear-gradient(135deg,#fffdf7,#fff3e0); }

.hub-card .card-badge {
    position: absolute; top: 12px; right: 12px;
    background: var(--orange); color: white;
    font-size: 9px; font-weight: 800; letter-spacing: .08em;
    border-radius: 4px; padding: 2px 7px;
}
.hub-card .card-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.hub-card .card-name { font-size: 13px; font-weight: 700; margin-top: 4px; }
.hub-card .card-sub  { font-size: 11px; color: var(--muted); }
.hub-card .card-link {
    margin-top: auto; font-size: 11px; font-weight: 600;
    color: var(--orange);
}
.hub-card.locked .card-link { color: var(--muted); font-weight: 400; }

/* ─── FORMS ──────────────────────────────────────────────────────────── */
.form-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 12px; padding: 28px 32px; margin-bottom: 20px;
}
.form-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 20px; color: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: #555; }
.field input, .field select, .field textarea {
    border: 1px solid var(--border); border-radius: 8px;
    padding: 9px 12px; font-size: 13px; color: var(--text);
    background: var(--white); transition: border-color .15s;
    font-family: inherit; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--orange);
}
.field textarea { resize: vertical; min-height: 80px; }

/* ─── BOTÕES ─────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border-radius: 8px; font-size: 13px;
    font-weight: 600; cursor: pointer; border: none; transition: all .15s;
    font-family: inherit;
}
.btn-primary   { background: var(--orange); color: white; }
.btn-primary:hover { background: #d94e1f; }
.btn-secondary { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: #ccc; background: #f5f5f5; }
.btn-danger    { background: #fee; color: var(--red); border: 1px solid #fcc; }
.btn-danger:hover { background: #fdd; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* ─── TABELAS ────────────────────────────────────────────────────────── */
.table-wrap { background: var(--white); border: 1px solid var(--border);
              border-radius: 12px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
table th {
    background: #f8f8f8; padding: 11px 16px; text-align: left;
    font-size: 11px; font-weight: 700; color: #555; letter-spacing: .06em;
    text-transform: uppercase; border-bottom: 2px solid var(--border);
}
table td { padding: 12px 16px; border-bottom: 1px solid #f3f3f3; font-size: 13px; }
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: #fafafa; }

/* ─── BADGES STATUS ──────────────────────────────────────────────────── */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700;
}
.badge-plan    { background: #e8f0fe; color: #1A73E8; }
.badge-do      { background: #fff3cd; color: #856404; }
.badge-check   { background: #d1ecf1; color: #0c5460; }
.badge-act     { background: #d4edda; color: #155724; }
.badge-alta    { background: #ffe0e0; color: var(--red); }
.badge-media   { background: #fff7e0; color: #856404; }
.badge-baixa   { background: #e0f7e9; color: #155724; }
.badge-ok      { background: #d4edda; color: #155724; }
.badge-atrasada{ background: #ffe0e0; color: var(--red); }
.badge-pendente{ background: #f5f5f5; color: #555; }

/* ─── ALERTS / FLASH ─────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid var(--green); }
.alert-error   { background: #f8d7da; color: #721c24; border-left: 4px solid var(--red); }
.alert-info    { background: #d1ecf1; color: #0c5460; border-left: 4px solid var(--blue); }
.alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid var(--yellow); }

/* ─── HEATMAP ────────────────────────────────────────────────────────── */
.heatmap-wrap { background: var(--white); border: 1px solid var(--border);
                border-radius: 12px; overflow-x: auto; padding: 20px; }
.heatmap-table { border-collapse: collapse; width: 100%; }
.heatmap-table th {
    padding: 10px 16px; text-align: center; font-size: 12px; font-weight: 700;
    color: #555; border-bottom: 2px solid var(--border); white-space: nowrap;
}
.heatmap-table th.col-pilar { text-align: left; min-width: 160px; }
.heatmap-table td { padding: 10px 16px; text-align: center; border-bottom: 1px solid #f3f3f3; }
.heatmap-table td.pilar-nome { text-align: left; font-weight: 600; color: #333; }
.heatmap-table tr:hover td { background: #fafafa; }
.heatmap-table tr.total-row td { background: #f6f6f6; font-weight: 700;
                                  border-top: 2px solid #ddd; }
.bolinha {
    width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: white;
    cursor: pointer; transition: transform .15s, box-shadow .15s;
    box-shadow: 0 2px 6px rgba(0,0,0,.15); border: none;
    text-decoration: none;
}
.bolinha:hover { transform: scale(1.2); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.bolinha.laranja { background: #FF8C00; }
.bolinha.amarelo { background: #F5C518; color: #333; }
.bolinha.verde   { background: #27AE60; }
.bolinha.azul    { background: #1A73E8; }
.bolinha.vazio   { background: #E0E0E0; color: #999; }

/* ─── DRAWER (painel lateral) ────────────────────────────────────────── */
.drawer-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.drawer-layout.no-drawer { grid-template-columns: 1fr; }
.drawer {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 12px; padding: 24px; position: sticky; top: 20px;
}
.drawer .drawer-title { font-size: 11px; color: var(--muted); text-transform: uppercase;
                         letter-spacing: .1em; margin-bottom: 8px; }
.drawer .drawer-nota  { font-size: 44px; font-weight: 900; line-height: 1; }
.drawer .drawer-max   { font-size: 16px; color: var(--muted); font-weight: 400; }
.drawer .drawer-section {
    font-size: 10px; font-weight: 700; letter-spacing: .1em;
    color: #bbb; text-transform: uppercase; margin: 16px 0 6px;
}
.drawer .drawer-item  { font-size: 13px; color: #444; margin: 4px 0; }
.drawer .drawer-empty { font-size: 12px; color: #ccc; font-style: italic; }

/* ─── LEGENDA HEATMAP ────────────────────────────────────────────────── */
.heatmap-legenda { display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
                   margin-bottom: 16px; }
.legenda-item    { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #555; }
.legenda-dot     { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }

/* ─── MISC ───────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

.section-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

.login-wrap {
    min-height: 100vh; display: flex; align-items: center;
    justify-content: center; background: var(--bg);
}
.login-card {
    background: var(--white); border-radius: 16px; padding: 40px 36px;
    width: 100%; max-width: 380px; box-shadow: 0 4px 24px rgba(0,0,0,.08);
}
.login-card .brand { text-align: center; margin-bottom: 28px; }
.login-card .brand .brand-name { font-size: 28px; font-weight: 900; color: var(--orange); }
.login-card .brand .brand-sub  { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Roadmap / Kanban */
.kanban-board { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.kanban-col   { background: #f4f5f7; border-radius: 10px; padding: 12px; min-height: 200px; }
.kanban-col h4 { font-size: 12px; font-weight: 700; letter-spacing: .06em;
                 text-transform: uppercase; margin-bottom: 10px; color: #555; }
.kanban-card  { background: white; border-radius: 8px; padding: 12px;
                margin-bottom: 8px; border: 1px solid var(--border); font-size: 13px; }
.kanban-card .kcard-title { font-weight: 600; margin-bottom: 4px; }
.kanban-card .kcard-meta  { font-size: 11px; color: var(--muted); }

@media (max-width: 900px) {
    .cards-row { grid-template-columns: repeat(2,1fr); }
    .hub-grid  { grid-template-columns: repeat(2,1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .drawer-layout { grid-template-columns: 1fr; }
}
