/* ===================================================================
   Gerenciador de Tarefas — Design System (v2, profissional)
   CSS puro, sem build. Tema claro com sidebar escura, gradientes e profundidade.
=================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --indigo: #4f46e5;
    --indigo-2: #6366f1;
    --roxo: #7c3aed;
    --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --grad-suave: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

    --verde: #16a34a;
    --vermelho: #ef4444;
    --amarelo: #f59e0b;

    --texto: #0f172a;
    --texto-suave: #64748b;
    --borda: #e8ebf1;
    --fundo: #f6f7fb;
    --branco: #ffffff;

    /* Sidebar escura */
    --side-bg: #0f172a;
    --side-bg2: #1e293b;
    --side-txt: #94a3b8;
    --side-txt-ativo: #ffffff;

    --sombra-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --sombra: 0 2px 8px rgba(15, 23, 42, .07);
    --sombra-md: 0 8px 24px rgba(15, 23, 42, .1);
    --sombra-lg: 0 20px 50px rgba(15, 23, 42, .2);
    --glow: 0 6px 18px rgba(79, 70, 229, .35);

    --raio: 14px;
    --raio-sm: 9px;
    --topbar-h: 62px;
    --sidebar-w: 248px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--fundo);
    color: var(--texto);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: none; }

/* ---------- Topbar ---------- */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
    background: rgba(255, 255, 255, .85); backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--borda);
    display: flex; align-items: center; gap: 14px; padding: 0 20px; z-index: 50;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: var(--texto); letter-spacing: -.3px; }
.topbar-brand .logo {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; background: var(--grad);
    display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 17px;
    box-shadow: var(--glow);
}
.topbar-brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.empresa-chip {
    display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13px;
    padding: 7px 14px; border-radius: 99px; background: var(--fundo); border: 1px solid var(--borda);
}
.empresa-chip .dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.empresa-chip a { font-size: 12px; color: var(--indigo); font-weight: 600; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.user-box { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; box-shadow: var(--glow);
}
.user-box .nome { font-weight: 700; font-size: 13px; line-height: 1.15; }
.user-box .papel { font-size: 11px; color: var(--texto-suave); }

.menu-toggle { display: block; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--texto-suave); padding: 6px 9px; border-radius: 8px; }
.menu-toggle:hover { background: var(--fundo); color: var(--texto); }

/* ---------- Sidebar (escura) ---------- */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg2) 100%);
    padding: 14px 14px 20px; overflow-y: auto; z-index: 60; transition: transform .25s ease;
    display: flex; flex-direction: column;
}
.sidebar-logo {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px 16px; color: #fff; font-weight: 800; font-size: 16px; letter-spacing: -.3px;
    border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 10px;
}
.sidebar-logo .logo { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 17px; box-shadow: var(--glow); }
.sidebar-sec { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #475569; padding: 16px 12px 7px; }
.sidebar a {
    display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 10px;
    color: var(--side-txt); font-weight: 600; margin-bottom: 3px; transition: all .15s; position: relative;
}
.sidebar a:hover { background: rgba(255, 255, 255, .06); color: #e2e8f0; }
.sidebar a.ativo { background: var(--grad); color: var(--side-txt-ativo); box-shadow: var(--glow); }
.sidebar a .ic { width: 20px; text-align: center; font-size: 15px; opacity: .95; }
.side-badge { margin-left: auto; background: var(--vermelho); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; box-shadow: 0 2px 6px rgba(239,68,68,.4); }

/* ---------- Conteúdo ---------- */
.conteudo {
    margin-top: var(--topbar-h); margin-left: var(--sidebar-w);
    padding: 30px 34px; min-height: calc(100vh - var(--topbar-h)); transition: margin-left .25s ease;
}
.topbar { left: var(--sidebar-w); transition: left .25s ease; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 25px; font-weight: 800; letter-spacing: -.5px; }
.page-head p { color: var(--texto-suave); margin-top: 3px; }

/* ---------- Botões ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 7px; justify-content: center;
    padding: 10px 18px; border-radius: var(--raio-sm); border: 1px solid transparent;
    font-weight: 600; font-size: 13.5px; cursor: pointer; transition: all .15s; white-space: nowrap;
    font-family: inherit;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-light { background: var(--branco); color: var(--texto); border-color: var(--borda); box-shadow: var(--sombra-sm); }
.btn-light:hover { background: #fafbff; border-color: #d9deea; }
.btn-danger { background: var(--vermelho); color: #fff; box-shadow: 0 6px 16px rgba(239,68,68,.3); }
.btn-danger:hover { filter: brightness(.95); }
.btn-ghost { background: transparent; color: var(--texto-suave); }
.btn-ghost:hover { background: var(--fundo); color: var(--texto); }
.btn-sm { padding: 7px 13px; font-size: 12.5px; }
.btn-block { width: 100%; }

/* ---------- Cards / painéis ---------- */
.card { background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); }
.card-pad { padding: 22px; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* Estatísticas */
.stat {
    position: relative; background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio);
    padding: 22px; box-shadow: var(--sombra); overflow: hidden;
}
.stat::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--grad); opacity: .9; }
.stat .num { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.stat .lbl { color: var(--texto-suave); font-size: 13px; margin-top: 7px; font-weight: 500; }
.stat .ic { float: right; width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; }

/* Card de quadro */
.board-card {
    display: block; border-radius: var(--raio); overflow: hidden; border: 1px solid var(--borda);
    background: var(--branco); box-shadow: var(--sombra); transition: transform .16s, box-shadow .16s; color: var(--texto);
}
.board-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-md); }
.board-card .faixa { height: 56px; position: relative; }
.board-card .faixa::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(0,0,0,.12)); }
.board-card .corpo { padding: 18px 20px; }
.board-card h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -.2px; }
.board-card .desc { color: var(--texto-suave); font-size: 13px; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.board-card .meta { margin-top: 14px; color: var(--texto-suave); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; background: var(--fundo); padding: 4px 10px; border-radius: 99px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 99px; font-size: 11.5px; font-weight: 700; }
.badge-azul { background: #eef2ff; color: #4338ca; }
.badge-verde { background: #dcfce7; color: #15803d; }
.badge-cinza { background: #f1f5f9; color: #475569; }
.badge-vermelho { background: #fee2e2; color: #b91c1c; }

/* ---------- Tabelas ---------- */
.tabela-wrap { overflow-x: auto; background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); }
table.tabela { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tabela th { text-align: left; padding: 14px 18px; background: #fafbfe; color: var(--texto-suave); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; border-bottom: 1px solid var(--borda); }
table.tabela td { padding: 14px 18px; border-top: 1px solid var(--borda); vertical-align: middle; }
table.tabela tr:hover td { background: #fafbff; }

/* ---------- Formulários ---------- */
.campo { margin-bottom: 16px; }
.campo label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 7px; color: #334155; }
.campo input, .campo select, .campo textarea {
    width: 100%; padding: 11px 13px; border: 1px solid var(--borda); border-radius: var(--raio-sm);
    font-size: 14px; font-family: inherit; background: var(--branco); color: var(--texto); transition: border .15s, box-shadow .15s;
}
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3.5px rgba(79, 70, 229, .14); }
.campo textarea { resize: vertical; min-height: 84px; }
.campo .erro { color: var(--vermelho); font-size: 12.5px; margin-top: 5px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .campo { flex: 1; min-width: 140px; }

/* ---------- Flash ---------- */
.flash { padding: 13px 16px; border-radius: var(--raio-sm); margin-bottom: 20px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.flash-ok { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.flash-erro { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

/* ---------- Caixa de ajuda ---------- */
.ajuda { background: linear-gradient(135deg, #eef2ff, #f5f3ff); border: 1px solid #e0e7ff; border-radius: var(--raio); padding: 15px 18px; color: #4338ca; font-size: 13px; display: flex; gap: 11px; margin-bottom: 22px; }
.ajuda .ic { font-size: 18px; flex-shrink: 0; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 44px 16px; overflow-y: auto; }
.modal-bg.aberto { display: flex; }
.modal { background: var(--branco); border-radius: var(--raio); width: 100%; max-width: 490px; box-shadow: var(--sombra-lg); animation: subir .2s ease; }
@keyframes subir { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-head { padding: 20px 22px; border-bottom: 1px solid var(--borda); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 17px; font-weight: 800; letter-spacing: -.2px; }
.modal-head .x { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--texto-suave); line-height: 1; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--borda); display: flex; justify-content: flex-end; gap: 10px; }

/* ===================================================================
   KANBAN
=================================================================== */
.board-topo { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.board-topo .voltar { color: var(--texto-suave); font-size: 22px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--branco); border: 1px solid var(--borda); }
.board-topo .voltar:hover { background: var(--fundo); }
.board-switch { padding: 10px 14px; border: 1px solid var(--borda); border-radius: var(--raio-sm); font-size: 16px; font-weight: 800; font-family: inherit; background: var(--branco); color: var(--texto); cursor: pointer; max-width: 280px; letter-spacing: -.3px; box-shadow: var(--sombra-sm); }
.board-switch:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3.5px rgba(79,70,229,.14); }

.kanban { display: flex; gap: 18px; align-items: flex-start; overflow-x: auto; padding-bottom: 18px; }
.coluna { background: #eef1f6; border: 1px solid #e4e8f0; border-radius: var(--raio); width: 300px; min-width: 300px; flex-shrink: 0; display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.coluna-head { padding: 14px 15px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.coluna-head .t { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 9px; letter-spacing: -.2px; }
.coluna-head .cont { background: rgba(15,23,42,.08); color: var(--texto-suave); font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
.coluna-head .acoes { display: flex; gap: 2px; }
.coluna-head .acoes button { background: none; border: none; cursor: pointer; color: var(--texto-suave); font-size: 15px; padding: 4px 6px; border-radius: 6px; }
.coluna-head .acoes button:hover { background: rgba(15,23,42,.08); color: var(--texto); }

.cards { padding: 4px 11px 11px; overflow-y: auto; flex: 1; min-height: 26px; }
.kcard { background: var(--branco); border-radius: 11px; padding: 13px 14px; margin-bottom: 10px; box-shadow: var(--sombra-sm); border: 1px solid var(--borda); cursor: grab; transition: box-shadow .15s, transform .1s; }
.kcard:hover { box-shadow: var(--sombra-md); transform: translateY(-1px); }
.kcard.arrastando { opacity: .5; }
.kcard .etiqueta { height: 7px; width: 46px; border-radius: 99px; margin-bottom: 9px; }
.kcard .titulo { font-weight: 600; font-size: 13.5px; line-height: 1.4; }
.kcard .rodape { display: flex; align-items: center; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.kcard .mini-badge { font-size: 11px; color: var(--texto-suave); display: inline-flex; align-items: center; gap: 4px; background: var(--fundo); padding: 3px 8px; border-radius: 99px; font-weight: 600; }
.kcard .mini-badge.prazo-vencido { background: #fee2e2; color: #b91c1c; }
.kcard .resp { width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; margin-left: auto; box-shadow: var(--glow); }

.add-card { padding: 8px 11px 13px; }
.add-card button { width: 100%; background: transparent; border: none; text-align: left; color: var(--texto-suave); padding: 9px 9px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; }
.add-card button:hover { background: rgba(79,70,229,.08); color: var(--indigo); }

.add-coluna { width: 300px; min-width: 300px; flex-shrink: 0; }
.add-coluna button { width: 100%; background: rgba(255,255,255,.65); border: 2px dashed #c7cedd; padding: 14px; border-radius: var(--raio); cursor: pointer; color: var(--texto-suave); font-weight: 600; }
.add-coluna button:hover { background: var(--branco); border-color: var(--indigo); color: var(--indigo); }

/* ===================================================================
   LOGIN (tela dividida)
=================================================================== */
.login-wrap { min-height: 100vh; display: flex; }
.login-side {
    flex: 1; background: var(--grad); color: #fff; padding: 56px 54px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.login-side::before { content: ''; position: absolute; width: 480px; height: 480px; border-radius: 50%; background: rgba(255,255,255,.08); top: -160px; right: -120px; }
.login-side::after { content: ''; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.07); bottom: -120px; left: -80px; }
.login-side .ls-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 19px; }
.login-side .ls-top .logo { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 21px; }
.login-side .ls-mid { position: relative; z-index: 1; }
.login-side .ls-mid h2 { font-size: 34px; font-weight: 800; line-height: 1.2; letter-spacing: -1px; }
.login-side .ls-mid p { font-size: 15px; opacity: .9; margin-top: 14px; max-width: 420px; line-height: 1.6; }
.login-side .ls-feat { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; }
.login-side .ls-feat div { display: flex; align-items: center; gap: 11px; font-size: 14px; opacity: .95; }
.login-side .ls-feat .ck { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 13px; }

.login-main { width: 480px; max-width: 100%; display: flex; align-items: center; justify-content: center; padding: 30px; background: var(--branco); }
.login-box { width: 100%; max-width: 360px; }
.login-box .marca { margin-bottom: 26px; }
.login-box .marca .logo { width: 54px; height: 54px; border-radius: 14px; background: var(--grad); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 25px; font-weight: 800; box-shadow: var(--glow); margin-bottom: 18px; }
.login-box h1 { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.login-box .sub { color: var(--texto-suave); font-size: 14px; margin: 5px 0 26px; }
.login-link { text-align: right; margin: -6px 0 18px; }
.login-link a { font-size: 13px; color: var(--indigo); font-weight: 600; }

/* ---------- Seletor de empresa ---------- */
.sel-wrap { min-height: 100vh; background: var(--fundo); padding: 56px 20px; }
.sel-inner { max-width: 820px; margin: 0 auto; }
.sel-inner .topo { text-align: center; margin-bottom: 34px; }
.sel-inner .topo h1 { font-size: 27px; font-weight: 800; letter-spacing: -.6px; }
.sel-inner .topo p { color: var(--texto-suave); margin-top: 8px; }
.empresa-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.empresa-opt { background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio); padding: 26px; text-align: center; box-shadow: var(--sombra); transition: transform .16s, box-shadow .16s; }
.empresa-opt:hover { transform: translateY(-4px); box-shadow: var(--sombra-md); }
.empresa-opt .ini { width: 58px; height: 58px; border-radius: 16px; margin: 0 auto 14px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; box-shadow: var(--sombra-md); }
.empresa-opt h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 16px; }

.vazio { text-align: center; padding: 56px 20px; color: var(--texto-suave); }
.vazio .ic { font-size: 46px; margin-bottom: 14px; opacity: .4; }

.muted { color: var(--texto-suave); }
.mt { margin-top: 16px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ===================================================================
   QUADRO ESTILO TRELLO (fundo colorido, colunas e cartões escuros)
=================================================================== */
.board-page {
    margin: -30px -34px; padding: 22px 30px 30px;
    min-height: calc(100vh - var(--topbar-h));
    background:
        linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.34) 100%),
        var(--board-cor, #1d4ed8);
    background-attachment: fixed;
}
.board-page .board-topo { margin-bottom: 16px; }
.board-page .board-topo .voltar,
.board-page .board-switch,
.board-page .btn-light {
    background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.22); box-shadow: none;
}
.board-page .board-topo .voltar:hover,
.board-page .btn-light:hover { background: rgba(255,255,255,.26); }
.board-page .board-switch { backdrop-filter: blur(4px); }
.board-page .board-switch option { color: #1e293b; }
.board-page > p.muted { color: rgba(255,255,255,.85); }
.board-page .ajuda {
    background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(4px);
}

.board-page .coluna { background: rgba(16, 20, 26, .72); border-color: rgba(255,255,255,.07); backdrop-filter: blur(6px); }
.board-page .coluna-head .t { color: #e8edf4; }
.board-page .coluna-head .cont { background: rgba(255,255,255,.14); color: #cbd5e1; }
.board-page .coluna-head .acoes button { color: rgba(255,255,255,.6); }
.board-page .coluna-head .acoes button:hover { background: rgba(255,255,255,.12); color: #fff; }

.board-page .kcard { background: #262c33; border-color: rgba(255,255,255,.06); color: #dfe6ef; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.board-page .kcard:hover { background: #2c333b; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.board-page .kcard .titulo { color: #e8edf4; }
.board-page .kcard .mini-badge { background: rgba(255,255,255,.1); color: #cbd5e1; }
.board-page .add-card button { color: rgba(255,255,255,.7); }
.board-page .add-card button:hover { background: rgba(255,255,255,.1); color: #fff; }
.board-page .add-coluna button { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; }
.board-page .add-coluna button:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.4); }

/* Cartão: topo com bolinha de concluir + título */
.kcard-top { display: flex; align-items: flex-start; gap: 9px; }
.card-check {
    width: 20px; height: 20px; border-radius: 50%; border: 2px solid #7a8699; background: transparent;
    cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: #fff; margin-top: 1px; transition: all .15s; line-height: 1;
}
.card-check:hover { border-color: #22c55e; }
.card-check.ok { background: #22c55e; border-color: #22c55e; }
.kcard .titulo.feito { text-decoration: line-through; opacity: .55; }

/* ---------- Onboarding (estado vazio) ---------- */
.onboarding { max-width: 820px; margin: 10px auto; }
.ob-hero { text-align: center; padding: 20px 20px 28px; }
.ob-emoji { font-size: 54px; margin-bottom: 8px; }
.ob-hero h2 { font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.ob-hero p { color: var(--texto-suave); max-width: 520px; margin: 10px auto 20px; font-size: 14.5px; }
.ob-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 26px; }
.ob-modelo { background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio); padding: 20px 16px; text-align: center; cursor: pointer; transition: all .15s; display: flex; flex-direction: column; gap: 5px; align-items: center; font-family: inherit; box-shadow: var(--sombra-sm); }
.ob-modelo:hover { transform: translateY(-3px); box-shadow: var(--sombra-md); border-color: var(--indigo); }
.ob-modelo .emo { font-size: 30px; }
.ob-modelo strong { font-size: 14.5px; }
.ob-modelo .muted { font-size: 12px; }
.ob-passos { background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio); padding: 22px 24px; box-shadow: var(--sombra-sm); }
.ob-passos h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.ob-passo { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 14px; }
.ob-passo:last-child { margin-bottom: 0; }
.ob-passo .n { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; box-shadow: var(--glow); }

.dica-item { display: flex; align-items: flex-start; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--borda); }
.dica-item:last-child { border-bottom: none; }
.dica-item .emo { font-size: 22px; flex-shrink: 0; }

/* ---------- Seletor de tema ---------- */
.tema-select { padding: 8px 10px; border: 1px solid var(--borda); border-radius: var(--raio-sm); font-size: 13px; font-weight: 600; font-family: inherit; background: var(--branco); color: var(--texto); cursor: pointer; }
.tema-select:focus { outline: none; border-color: var(--indigo); }

/* ===================================================================
   TEMA ESCURO
=================================================================== */
html[data-tema="escuro"] {
    --fundo: #0b1120;
    --branco: #151c2c;
    --texto: #e5e9f0;
    --texto-suave: #93a1b5;
    --borda: #263349;
}
html[data-tema="escuro"] body { background: var(--fundo); }
html[data-tema="escuro"] .topbar { background: rgba(21,28,44,.88); border-bottom-color: #263349; }
html[data-tema="escuro"] .btn-light { background: #1b2436; color: #e5e9f0; border-color: #2d3a52; }
html[data-tema="escuro"] .btn-light:hover { background: #222c42; }
html[data-tema="escuro"] .empresa-chip { background: #1b2436; border-color: #2d3a52; }
html[data-tema="escuro"] .tema-select { background: #1b2436; color: #e5e9f0; border-color: #2d3a52; }
html[data-tema="escuro"] table.tabela th { background: #1b2436; color: #93a1b5; border-bottom-color: #263349; }
html[data-tema="escuro"] table.tabela tr:hover td { background: #1b2436; }
html[data-tema="escuro"] .badge-cinza { background: #263349; color: #cbd5e1; }
html[data-tema="escuro"] .board-card .meta { background: #263349; color: #cbd5e1; }
html[data-tema="escuro"] .modal-head, html[data-tema="escuro"] .modal-foot { border-color: #263349; }
html[data-tema="escuro"] .campo input, html[data-tema="escuro"] .campo select, html[data-tema="escuro"] .campo textarea { background: #1b2436; color: #e5e9f0; border-color: #2d3a52; }
html[data-tema="escuro"] .campo label { color: #cbd5e1; }
html[data-tema="escuro"] .ajuda { background: rgba(99,102,241,.12); border-color: rgba(99,102,241,.3); color: #c7d2fe; }
html[data-tema="escuro"] .ob-modelo:hover, html[data-tema="escuro"] .board-card:hover { border-color: var(--indigo-2); }

/* ===================================================================
   TEMA OCEANO (acento turquesa)
=================================================================== */
html[data-tema="oceano"] {
    --indigo: #0891b2;
    --indigo-2: #06b6d4;
    --roxo: #0e7490;
    --grad: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    --grad-suave: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --glow: 0 6px 18px rgba(8,145,178,.35);
    --side-bg: #0c2b33;
    --side-bg2: #0e3a44;
}

/* ---------- Responsivo ---------- */
.sidebar-bg { display: none; }
@media (max-width: 860px) {
    .board-page { margin: -20px -16px; padding: 18px 16px; }
    .tema-select { display: none; }
}
@media (min-width: 861px) {
    body.sidebar-recolhida .sidebar { transform: translateX(-100%); }
    body.sidebar-recolhida .conteudo { margin-left: 0; }
    body.sidebar-recolhida .topbar { left: 0; }
}
@media (max-width: 860px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--sombra-lg); z-index: 70; }
    .sidebar.aberta { transform: translateX(0); }
    .sidebar-bg.ativo { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 65; }
    .conteudo { margin-left: 0; padding: 20px 16px; }
    .topbar { left: 0; }
    .user-box .nome, .user-box .papel { display: none; }
    .empresa-chip .nome-emp { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .login-side { display: none; }
    .login-main { width: 100%; }
}
