:root {
    --cor-marinho: #0B2447;
    --cor-marinho-escuro: #071A34;
    --cor-marinho-claro: #123A6B;
    --cor-turquesa: #14B8A6;
    --cor-turquesa-escuro: #0D9488;
    --cor-turquesa-claro: #CCFBF1;
    --cor-laranja: #F5A623;

    --cor-primaria: var(--cor-turquesa);
    --cor-primaria-hover: var(--cor-turquesa-escuro);
    --cor-fundo: #F3F6F8;
    --cor-texto: #0F2138;
    --cor-texto-suave: #64748B;
    --cor-borda: #E2E8F0;
    --cor-card: #FFFFFF;
    --sombra: 0 1px 3px rgba(11,36,71,0.08), 0 1px 2px rgba(11,36,71,0.05);
    --raio: 12px;
}

* { box-sizing: border-box; }

body {
    background: var(--cor-fundo);
    color: var(--cor-texto);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14.5px;
}

a { text-decoration: none; }

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

.sidebar {
    width: 240px;
    background: linear-gradient(180deg, var(--cor-marinho-escuro) 0%, var(--cor-marinho) 100%);
    color: #CBD5E1;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
}

.sidebar .logo {
    margin-bottom: 22px;
    padding: 10px 6px;
    display: flex;
    align-items: center;
}

.sidebar .logo .logo-img {
    width: 100%;
    height: auto;
    max-height: 92px;
    object-fit: contain;
    border-radius: 6px;
}

.sidebar nav { flex: 1; overflow-y: auto; }

.sidebar nav .nav-secao {
    text-transform: uppercase;
    font-size: 10.5px;
    letter-spacing: .06em;
    font-weight: 700;
    color: #5C7A9E;
    padding: 14px 12px 6px;
}
.sidebar nav .nav-secao:first-child { padding-top: 4px; }

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #B9C7DA;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 3px;
    font-weight: 500;
    font-size: 13.5px;
    transition: background .15s, color .15s;
}

.sidebar nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar nav a.active { background: var(--cor-turquesa); color: #05261F; font-weight: 700; }
.sidebar nav a.active i { color: #05261F; }
.sidebar nav a i { width: 18px; text-align: center; color: #7FA0C4; }
.sidebar nav a:hover i { color: #fff; }

.sidebar .rodape-usuario {
    margin-top: auto;
    padding: 14px 10px 4px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 12.5px;
    color: #8DA3BE;
}

.main-content { flex: 1; min-width: 0; }

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--cor-borda);
    border-top: 3px solid var(--cor-turquesa);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar h1 { font-size: 20px; font-weight: 700; margin: 0; color: var(--cor-marinho); }
.topbar p { margin: 0; color: var(--cor-texto-suave); font-size: 13px; }

.content { padding: 26px 28px 60px; }

/* ---------- CARDS ---------- */
.card-app {
    background: var(--cor-card);
    border: 1px solid var(--cor-borda);
    border-radius: var(--raio);
    box-shadow: var(--sombra);
}

.stat-card {
    background: var(--cor-card);
    border: 1px solid var(--cor-borda);
    border-radius: var(--raio);
    padding: 18px 20px;
    box-shadow: var(--sombra);
}
.stat-card .valor { font-size: 26px; font-weight: 700; }
.stat-card .rotulo { color: var(--cor-texto-suave); font-size: 13px; }
.stat-card .icone {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff;
}

/* ---------- BOTÕES ---------- */
.btn-primary-app {
    background: var(--cor-primaria);
    border: none;
    color: #fff;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13.5px;
}
.btn-primary-app:hover { background: var(--cor-primaria-hover); color: #fff; }

/* ---------- TABELAS ---------- */
.table-app { background: #fff; border-radius: var(--raio); overflow: hidden; border: 1px solid var(--cor-borda); }
.table-app thead th {
    background: #FAFAFB;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--cor-texto-suave);
    border-bottom: 1px solid var(--cor-borda);
    padding: 12px 16px;
}
.table-app tbody td { padding: 12px 16px; vertical-align: middle; border-bottom: 1px solid #F1F1F3; }
.table-app tbody tr:last-child td { border-bottom: none; }

/* ---------- BADGES ---------- */
.badge { padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.badge-aberto { background: #E0E7FF; color: #4338CA; }
.badge-ganho { background: #DCFCE7; color: #15803D; }
.badge-perdido { background: #FEE2E2; color: #B91C1C; }
.badge-pendente { background: #FEF3C7; color: #92400E; }
.badge-confirmado { background: #DBEAFE; color: #1D4ED8; }

/* ---------- KANBAN (PIPELINE) ---------- */
.kanban-board {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 14px;
}

.kanban-coluna {
    background: #EFF0F5;
    border-radius: var(--raio);
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 210px);
}

.kanban-coluna-header {
    padding: 14px 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 13.5px;
}

.kanban-coluna-header .cor-dot {
    width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 8px;
}

.kanban-coluna-header .contagem {
    background: #fff;
    border-radius: 999px;
    padding: 1px 9px;
    font-size: 12px;
    color: var(--cor-texto-suave);
}

.kanban-cards {
    padding: 0 10px 10px;
    overflow-y: auto;
    flex: 1;
    min-height: 60px;
}

.kanban-card {
    background: #fff;
    border-radius: 10px;
    padding: 12px 13px;
    margin-bottom: 10px;
    box-shadow: var(--sombra);
    cursor: grab;
    border: 1px solid transparent;
    transition: box-shadow .15s, transform .1s;
}
.kanban-card:hover { box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.kanban-card.arrastando { opacity: .4; }
.kanban-coluna.drag-over { background: #E4E7F5; }

.kanban-card .titulo { font-weight: 600; font-size: 13.5px; margin-bottom: 2px; }
.kanban-card .subtitulo { font-size: 12px; color: var(--cor-texto-suave); margin-bottom: 8px; }
.kanban-card .valor { font-weight: 700; color: var(--cor-primaria); font-size: 13px; }
.kanban-card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 11.5px; color: var(--cor-texto-suave); }

.kanban-add-btn {
    width: 100%;
    background: transparent;
    border: 1.5px dashed #C7C9D9;
    border-radius: 8px;
    padding: 8px;
    font-size: 12.5px;
    color: var(--cor-texto-suave);
    margin: 4px 10px 12px;
    width: calc(100% - 20px);
}
.kanban-add-btn:hover { border-color: var(--cor-primaria); color: var(--cor-primaria); }

/* ---------- MODAL / FORM ---------- */
.form-label { font-weight: 600; font-size: 13px; }

/* ---------- LOGIN ---------- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 25% 15%, var(--cor-marinho-claro) 0%, var(--cor-marinho-escuro) 55%, #030A15 100%);
}
.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    width: 440px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.login-logo-img {
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 340px;
    height: auto;
    background: #000;
    border-radius: 10px;
    padding: 14px 16px;
}

/* ---------- MENU MOBILE (hambúrguer / drawer) ---------- */
.botao-menu-mobile {
    display: none;
    background: transparent;
    border: none;
    font-size: 22px;
    color: var(--cor-marinho);
    padding: 4px 6px;
    line-height: 1;
}

.sidebar-fechar-mobile {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 16px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(3,10,21,0.55);
    z-index: 1040;
}

@media (max-width: 900px) {
    .botao-menu-mobile { display: inline-flex; align-items: center; justify-content: center; }
    .sidebar-fechar-mobile { display: flex; align-items: center; justify-content: center; }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 8px 0 24px rgba(0,0,0,0.25);
    }

    .sidebar.aberta { transform: translateX(0); }

    .sidebar-overlay.ativo { display: block; }

    .content { padding: 18px 16px 50px; }
    .topbar { padding: 14px 16px; }
    .kanban-coluna { width: 250px; }
}
