:root {
    --bg: #eef3f8;
    --card: #ffffff;
    --text: #172033;
    --muted: #667085;
    --muted-2: #98a2b3;
    --line: #dfe7f0;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eaf1ff;
    --nav: #0c1424;
    --nav-2: #142139;
    --danger: #c93434;
    --danger-soft: #fff0f0;
    --success: #168454;
    --success-soft: #e9f8f0;
    --warning: #d97706;
    --warning-soft: #fff6e8;
    --violet: #7c3aed;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow: 0 18px 44px rgba(15, 23, 42, .08);
    --shadow-soft: 0 8px 24px rgba(15, 23, 42, .06);
    --sidebar: 276px;
    --sidebar-collapsed: 82px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

/* Login */
.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 12% 12%, rgba(37, 99, 235, .22), transparent 30%),
        radial-gradient(circle at 88% 82%, rgba(22, 132, 84, .12), transparent 24%),
        linear-gradient(135deg, #e8f0ff, #f8fafc 58%, #eef8f3);
}
.login-shell {
    width: min(1050px, 100%);
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 32px;
    background: rgba(255,255,255,.8);
    box-shadow: 0 28px 80px rgba(15,23,42,.18);
}
.login-apresentacao {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px;
    color: #fff;
    background:
        radial-gradient(circle at 90% 0%, rgba(67, 128, 255, .42), transparent 30%),
        linear-gradient(145deg, #0b1323, #15366f);
}
.login-apresentacao::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    right: -120px;
    bottom: -120px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
}
.login-apresentacao > * { position: relative; z-index: 1; }
.login-logo, .marca-icone {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 17px;
    color: #fff;
    font-weight: 900;
    letter-spacing: .04em;
    background: linear-gradient(135deg, #2f72ff, #7aa8ff);
    box-shadow: 0 12px 28px rgba(37,99,235,.35);
}
.eyebrow {
    display: inline-block;
    margin: 25px 0 10px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #c7d8ff;
}
.login-apresentacao h1 { margin: 0; font-size: clamp(38px, 5vw, 58px); line-height: .98; letter-spacing: -.045em; }
.login-apresentacao p { max-width: 540px; margin: 22px 0 0; color: #dbe7fb; font-size: 17px; line-height: 1.65; }
.login-pontos { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 32px; }
.login-pontos span { padding: 9px 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(255,255,255,.08); font-size: 13px; font-weight: 800; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: 48px; background: rgba(255,255,255,.96); }
.login-card h2 { margin: 0 0 7px; font-size: 30px; letter-spacing: -.03em; }
.login-card-topo p, .login-ajuda { color: var(--muted); }
.login-ajuda { margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #f7f9fc; line-height: 1.55; font-size: 14px; }

/* Estrutura */
.layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    transition: grid-template-columns .24s ease;
}
.layout.sidebar-recolhida { grid-template-columns: var(--sidebar-collapsed) minmax(0, 1fr); }
.sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px;
    color: #fff;
    background:
        radial-gradient(circle at 100% 0%, rgba(37,99,235,.30), transparent 27%),
        linear-gradient(180deg, var(--nav), var(--nav-2));
    border-right: 1px solid rgba(255,255,255,.08);
    transition: width .24s ease, transform .24s ease;
    overflow: hidden;
}
.sidebar-topo { display: flex; align-items: center; gap: 8px; min-width: 0; padding-bottom: 17px; border-bottom: 1px solid rgba(255,255,255,.1); }
.marca { min-width: 0; flex: 1; display: flex; align-items: center; gap: 12px; }
.marca-icone { width: 46px; height: 46px; border-radius: 14px; }
.marca-texto { min-width: 0; white-space: nowrap; transition: opacity .16s ease, width .2s ease; }
.marca strong { display: block; font-size: 18px; letter-spacing: -.02em; }
.marca span { display: block; margin-top: 2px; color: #aab6c8; font-size: 12px; }
.sidebar-recolher {
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 10px;
    color: #d9e5f4;
    background: rgba(255,255,255,.07);
    transition: .2s ease;
}
.sidebar-recolher:hover { background: rgba(255,255,255,.14); }
.sidebar-recolher span { font-size: 24px; line-height: 1; transition: transform .24s ease; }
.layout.sidebar-recolhida .sidebar-recolher span { transform: rotate(180deg); }
.menu { display: grid; gap: 6px; }
.menu a {
    position: relative;
    min-height: 45px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 13px;
    color: #d8e1ee;
    font-weight: 780;
    white-space: nowrap;
    transition: .18s ease;
}
.menu a:hover, .menu a.ativo { color: #fff; background: rgba(255,255,255,.11); }
.menu a.ativo::before { content: ""; position: absolute; left: -18px; width: 4px; height: 25px; border-radius: 0 4px 4px 0; background: #6ea0ff; }
.menu-icone { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; font-size: 20px; font-weight: 900; }
.menu-texto { transition: opacity .14s ease; }
.usuario-box {
    margin-top: auto;
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    background: rgba(255,255,255,.07);
}
.avatar-mini { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(135deg,#2b6ef3,#7c9fff); font-weight: 900; }
.usuario-box-info { min-width: 0; white-space: nowrap; overflow: hidden; }
.usuario-box-info strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.usuario-box-info span { display: block; margin-top: 2px; color: #aab6c8; font-size: 12px; }
.usuario-sair { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #cdd8e7; font-size: 19px; }
.usuario-sair:hover { background: rgba(255,255,255,.1); color: #fff; }
.layout.sidebar-recolhida .marca-texto,
.layout.sidebar-recolhida .menu-texto,
.layout.sidebar-recolhida .usuario-box-info { width: 0; opacity: 0; pointer-events: none; }
.layout.sidebar-recolhida .sidebar { padding-left: 13px; padding-right: 13px; }
.layout.sidebar-recolhida .sidebar-topo { justify-content: center; }
.layout.sidebar-recolhida .marca { flex: 0 0 auto; }
.layout.sidebar-recolhida .sidebar-recolher { position: absolute; left: 65px; top: 25px; width: 24px; height: 28px; background: #182744; }
.layout.sidebar-recolhida .menu a { justify-content: center; padding-left: 10px; padding-right: 10px; }
.layout.sidebar-recolhida .menu a.ativo::before { left: -13px; }
.layout.sidebar-recolhida .usuario-box { grid-template-columns: 42px; justify-content: center; padding: 9px; }
.layout.sidebar-recolhida .usuario-sair { position: absolute; bottom: 8px; right: 2px; width: 23px; height: 23px; background: #1b2a47; font-size: 14px; }
.sidebar-overlay { display: none; }
.conteudo { min-width: 0; min-height: 100vh; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px clamp(20px, 3vw, 42px);
    border-bottom: 1px solid rgba(216,225,235,.9);
    background: rgba(248,250,252,.88);
    backdrop-filter: blur(14px);
}
.menu-mobile { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: #fff; font-size: 20px; }
.topbar-titulo { min-width: 0; flex: 1; }
.topbar h1 { margin: 0; font-size: clamp(23px, 2.2vw, 31px); letter-spacing: -.035em; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.topbar-info { flex: 0 0 auto; min-width: 145px; display: grid; justify-items: end; gap: 3px; }
.topbar-info span { color: var(--muted); font-size: 12px; }
.topbar-info strong { font-size: 14px; }
.pagina-conteudo { width: min(1520px, 100%); margin: 0 auto; padding: 26px clamp(18px, 3vw, 42px) 90px; }

/* Base visual */
.bloco {
    margin-bottom: 22px;
    padding: 22px;
    border: 1px solid rgba(216,225,235,.95);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow-soft);
}
.bloco-form { max-width: 1100px; }
.bloco-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.bloco-topo h2, .bloco h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.bloco-topo p, .bloco > p { margin: 5px 0 0; color: var(--muted); line-height: 1.5; }
.acoes-pagina, .botoes-linha, .acoes-form, .acoes-card, .acoes-tabela { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.btn {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-weight: 800;
    font-size: 13px;
    line-height: 1;
    transition: .17s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-primario { color: #fff; background: var(--primary); box-shadow: 0 8px 20px rgba(37,99,235,.18); }
.btn-primario:hover { background: var(--primary-dark); }
.btn-secundario { color: #25456f; border-color: #cbd9eb; background: #f7faff; }
.btn-secundario:hover { background: #eef4fc; }
.btn-claro { color: #475467; border-color: var(--line); background: #fff; }
.btn-claro:hover { background: #f6f8fb; }
.btn-perigo { color: var(--danger); border-color: #efcaca; background: var(--danger-soft); }
.btn-perigo:hover { background: #ffe3e3; }
.btn-cheio { width: 100%; }
.form-inline { display: inline-flex; margin: 0; }
.alerta { margin-bottom: 16px; padding: 13px 15px; border-radius: 12px; font-weight: 750; transition: .28s ease; }
.alerta-sucesso { color: #11633e; border: 1px solid #bfe8d1; background: var(--success-soft); }
.alerta-erro { color: #9d2626; border: 1px solid #f0c2c2; background: var(--danger-soft); }
.alerta-aviso { color: #8a4d05; border: 1px solid #f1d5ad; background: var(--warning-soft); }
.alerta-saindo { opacity: 0; transform: translateY(-6px); }
.vazio { padding: 30px; text-align: center; border: 1px dashed #cdd8e5; border-radius: 15px; color: var(--muted); background: #f9fbfd; }
.vazio.pequeno { padding: 18px; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.status-pendente { color: #865006; background: #fff0cb; }
.status-andamento { color: #1854a6; background: #e6f0ff; }
.status-aguardando { color: #6e3aad; background: #f0e8ff; }
.status-concluida { color: #12653f; background: #e3f7ec; }
.prioridade-baixa { color: #3d5e7e; background: #edf2f7; }
.prioridade-media { color: #875805; background: #fff2cc; }
.prioridade-alta { color: #b14616; background: #ffeadf; }
.prioridade-urgente { color: #a82626; background: #ffe2e2; }

/* Formulários */
.formulario { display: grid; gap: 16px; }
.grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.campo-full { grid-column: 1 / -1; }
.formulario label, .mini-form label { display: block; margin-bottom: 7px; color: #344054; font-size: 13px; font-weight: 850; }
input, select, textarea {
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;
    border: 1px solid #ccd7e4;
    border-radius: 11px;
    outline: none;
    color: var(--text);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: #7aa6ff; box-shadow: 0 0 0 3px rgba(37,99,235,.11); }
.campo-ajuda { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.select-com-acao { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.campo-arquivos {
    padding: 16px;
    border: 1px dashed #b9c8da;
    border-radius: 14px;
    background: #f8fbff;
}
.campo-arquivos input { padding: 8px; background: #fff; }
.arquivo-resumo { margin-top: 8px; color: var(--muted); font-size: 12px; }
.dialogo {
    width: min(450px, calc(100% - 28px));
    padding: 0;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 26px 80px rgba(15,23,42,.26);
}
.dialogo::backdrop { background: rgba(12,20,36,.58); backdrop-filter: blur(3px); }
.dialogo-conteudo { padding: 22px; }
.dialogo-topo { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.dialogo-topo h2 { margin: 0; font-size: 20px; }
.dialogo-fechar { width: 34px; height: 34px; border: 0; border-radius: 10px; color: var(--muted); background: #f1f4f8; font-size: 22px; }
.erro-inline { min-height: 20px; margin: 8px 0 0; color: var(--danger); font-size: 13px; }

/* Painel focado nas tarefas */
.painel-acoes { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.painel-acoes-texto strong { display: block; font-size: 17px; }
.painel-acoes-texto span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.cards-resumo { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-bottom: 20px; }
.card-resumo { position: relative; overflow: hidden; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-soft); }
.card-resumo::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #aab7c7; }
.card-resumo.card-total::before { background: var(--primary); }
.card-resumo.destaque::before { background: var(--danger); }
.card-resumo.sucesso::before { background: var(--success); }
.card-resumo span { color: var(--muted); font-size: 12px; font-weight: 800; }
.card-resumo strong { display: block; margin: 5px 0 2px; font-size: 31px; letter-spacing: -.04em; }
.card-resumo small { color: var(--muted-2); }
.kanban-wrap { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.72); box-shadow: var(--shadow-soft); }
.kanban-topo { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.kanban-topo h2 { margin: 0; font-size: 20px; }
.kanban-topo p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.kanban-board { display: grid; grid-template-columns: repeat(3, minmax(270px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 4px; }
.kanban-coluna { min-width: 0; padding: 12px; border: 1px solid #dde5ee; border-radius: 16px; background: #f4f7fa; }
.kanban-coluna-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 2px 11px; }
.kanban-coluna-topo strong { font-size: 14px; }
.kanban-contador { min-width: 26px; height: 26px; display: grid; place-items: center; padding: 0 8px; border-radius: 999px; color: #46566b; background: #e3e9f0; font-size: 12px; font-weight: 900; }
.kanban-lista { display: grid; gap: 10px; }
.kanban-card { display: block; padding: 14px; border: 1px solid #dde5ee; border-radius: 14px; background: #fff; box-shadow: 0 5px 14px rgba(15,23,42,.045); transition: .17s ease; }
.kanban-card:hover { border-color: #a9c2f4; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(15,23,42,.08); }
.kanban-card-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.kanban-card h3 { margin: 0; font-size: 14px; line-height: 1.35; }
.kanban-card p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.kanban-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #eef2f6; color: #738096; font-size: 11px; }
.kanban-vazio { padding: 20px 10px; text-align: center; color: var(--muted-2); font-size: 12px; }

/* Demandas */
.segmentos { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #f3f6fa; }
.segmentos a { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 9px; color: #536176; font-size: 13px; font-weight: 850; }
.segmentos a.ativo { color: #174aa4; background: #fff; box-shadow: 0 4px 12px rgba(15,23,42,.07); }
.segmentos .numero { min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px; border-radius: 999px; background: #e8edf4; font-size: 10px; }
.segmentos a.ativo .numero { color: #fff; background: var(--primary); }
.filtros { display: grid; grid-template-columns: minmax(210px,1.6fr) repeat(5,minmax(135px,1fr)) auto auto; gap: 9px; margin: 18px 0; }
.filtros input, .filtros select { min-height: 40px; font-size: 12px; }
.filtros .btn { min-height: 40px; }
.tabela-responsiva { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 12px; text-align: left; border-bottom: 1px solid #dfe6ee; color: #677386; background: #f8fafc; font-size: 11px; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid #edf1f5; vertical-align: middle; font-size: 13px; }
tbody tr:hover { background: #fbfcfe; }
td small { color: var(--muted); }
.acoes-tabela { justify-content: flex-end; min-width: 150px; }
.linha-arquivada { opacity: .82; }

/* Detalhes */
.detalhes-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(320px,.75fr); gap: 20px; align-items: start; }
.info-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.info-grid > div { min-height: 78px; padding: 13px; border: 1px solid #e4eaf1; border-radius: 13px; background: #f9fbfd; }
.info-grid span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.info-grid strong { font-size: 13px; }
.descricao-box { padding: 17px; border-radius: 14px; background: #f5f8fb; }
.descricao-box h3 { margin: 0 0 9px; font-size: 15px; }
.descricao-box p { margin: 0; line-height: 1.65; }
.comentario-form { display: grid; gap: 9px; margin: 14px 0 18px; }
.timeline { display: grid; gap: 11px; }
.timeline-duas-colunas { grid-template-columns: repeat(2,minmax(0,1fr)); }
.timeline-item { padding: 13px; border: 1px solid #e3e9f0; border-radius: 13px; background: #fbfcfe; }
.timeline-item > strong { display: block; font-size: 13px; }
.timeline-item > span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.timeline-item p { margin: 8px 0 0; color: #445064; line-height: 1.5; font-size: 13px; }
.comentario-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.comentario-topo strong { display: block; font-size: 13px; }
.comentario-topo span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.anexos-grade { display: grid; grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 11px; margin-top: 14px; }
.anexo-card { position: relative; overflow: hidden; border: 1px solid #dfe6ee; border-radius: 13px; background: #fff; }
.anexo-preview { height: 120px; display: grid; place-items: center; background: #edf3f8; }
.anexo-preview img { width: 100%; height: 100%; object-fit: cover; }
.anexo-icone { font-size: 38px; opacity: .65; }
.anexo-info { padding: 11px; }
.anexo-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.anexo-info span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.anexo-acoes { display: flex; gap: 6px; margin-top: 9px; }
.anexo-acoes .btn { min-height: 31px; padding: 7px 9px; font-size: 11px; }

/* Cadastros */
.cadastros-resumo { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.cadastro-resumo-card { display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.cadastro-resumo-icone { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: #1e55b5; background: var(--primary-soft); font-size: 20px; }
.cadastro-resumo-card strong { display: block; font-size: 19px; }
.cadastro-resumo-card span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.cadastro-layout { display: grid; grid-template-columns: minmax(280px,.72fr) minmax(0,1.55fr); gap: 18px; align-items: start; }
.cadastro-form-card { position: sticky; top: 105px; }
.mini-form { display: grid; gap: 13px; }
.lista-cadastros { display: grid; gap: 8px; }
.item-cadastro { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid #e1e8f0; border-radius: 13px; background: #fff; }
.item-cadastro strong { display: block; font-size: 13px; }
.item-cadastro span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.item-cadastro-acoes { display: flex; gap: 6px; }
.item-cadastro-acoes .btn { min-height: 32px; padding: 7px 9px; font-size: 11px; }

/* Chat */
.chat-pagina { display: grid; grid-template-columns: 230px minmax(0,1fr); min-height: calc(100vh - 160px); padding: 0; overflow: hidden; }
.chat-lateral { padding: 20px; border-right: 1px solid var(--line); background: #f7f9fc; }
.chat-lateral h2 { margin: 0; font-size: 17px; }
.chat-lateral p { margin: 5px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.chat-participantes { display: grid; gap: 9px; }
.chat-participante { display: flex; align-items: center; gap: 9px; padding: 9px; border-radius: 12px; background: #fff; border: 1px solid #e3e9f0; }
.chat-participante .avatar-mini { width: 34px; height: 34px; border-radius: 10px; }
.chat-participante strong { font-size: 12px; }
.chat-participante span { display: block; color: var(--success); font-size: 10px; }
.chat-area { min-width: 0; display: grid; grid-template-rows: minmax(300px,1fr) auto; background: #fff; }
.chat-mensagens { min-height: 0; overflow-y: auto; padding: 20px; background: linear-gradient(180deg,#f8fbff,#fff); }
.chat-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 82%; margin: 0 0 12px; }
.chat-msg.minha { margin-left: auto; flex-direction: row-reverse; }
.chat-avatar { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: #7084a0; font-size: 11px; font-weight: 900; }
.chat-msg.minha .chat-avatar { background: var(--primary); }
.chat-balao { min-width: 0; padding: 10px 12px; border: 1px solid #dfe7ef; border-radius: 14px 14px 14px 4px; background: #fff; box-shadow: 0 4px 12px rgba(15,23,42,.04); }
.chat-msg.minha .chat-balao { color: #fff; border-color: var(--primary); border-radius: 14px 14px 4px 14px; background: var(--primary); }
.chat-msg-topo { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.chat-msg-topo strong { font-size: 11px; }
.chat-msg-topo span { color: var(--muted-2); font-size: 9px; }
.chat-msg.minha .chat-msg-topo span { color: #d9e5ff; }
.chat-balao p { margin: 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.btn-apagar-msg { width: 22px; height: 22px; margin-left: auto; display: grid; place-items: center; border: 0; border-radius: 7px; color: #8b96a6; background: transparent; font-size: 16px; }
.chat-msg.minha .btn-apagar-msg { color: #dbe6ff; }
.btn-apagar-msg:hover { background: rgba(0,0,0,.08); }
.chat-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; padding: 14px; border-top: 1px solid var(--line); background: #fff; }
.chat-form textarea { min-height: 48px; max-height: 140px; resize: none; }
.chat-form .btn { align-self: stretch; }
.chat-vazio { height: 100%; min-height: 250px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.chat-vazio span { font-size: 36px; }
.chat-vazio strong { margin-top: 8px; color: var(--text); }
.chat-vazio p { margin: 4px 0 0; font-size: 12px; }

/* Chat flutuante */
.chat-flutuante { position: fixed; right: 22px; bottom: 22px; z-index: 80; }
.chat-flutuante-botao { position: relative; width: 58px; height: 58px; display: grid; place-items: center; border: 0; border-radius: 18px; color: #fff; background: linear-gradient(135deg,#2563eb,#4d86f7); box-shadow: 0 16px 34px rgba(37,99,235,.32); font-size: 23px; transition: .18s ease; }
.chat-flutuante-botao:hover { transform: translateY(-2px) scale(1.02); }
.chat-notificacao { position: absolute; top: 6px; right: 6px; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; background: #ef4444; }
.chat-flutuante-painel { position: absolute; right: 0; bottom: 70px; width: 400px; height: 560px; display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; border: 1px solid #d8e1eb; border-radius: 20px; background: #fff; box-shadow: 0 24px 70px rgba(15,23,42,.24); opacity: 0; visibility: hidden; transform: translateY(14px) scale(.97); transform-origin: right bottom; transition: .2s ease; }
.chat-flutuante.aberto .chat-flutuante-painel { opacity: 1; visibility: visible; transform: none; }
.chat-flutuante.aberto .chat-flutuante-botao { opacity: 0; visibility: hidden; transform: scale(.8); }
.chat-flutuante.chat-compacto .chat-flutuante-painel { width: 330px; height: 430px; }
.chat-flutuante.chat-medio .chat-flutuante-painel { width: 400px; height: 560px; }
.chat-flutuante.chat-grande .chat-flutuante-painel { width: min(540px,calc(100vw - 35px)); height: min(720px,calc(100vh - 45px)); }
.chat-flutuante-topo { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 13px 14px; color: #fff; background: linear-gradient(135deg,#13233f,#235bb9); }
.chat-flutuante-topo strong { display: block; font-size: 14px; }
.chat-flutuante-topo span { display: block; margin-top: 2px; color: #cddcff; font-size: 10px; }
.chat-tamanho { display: flex; gap: 3px; }
.chat-tamanho button, .chat-fechar { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; color: #eaf1ff; background: rgba(255,255,255,.08); font-size: 10px; font-weight: 900; }
.chat-tamanho button.ativo, .chat-tamanho button:hover, .chat-fechar:hover { background: rgba(255,255,255,.20); }
.chat-fechar { font-size: 19px; }
.chat-mensagens-flutuante { padding: 14px; }
.chat-mensagens-flutuante .chat-msg { max-width: 92%; }
.chat-form-flutuante { padding: 10px; }
.chat-form-flutuante .btn { padding-left: 12px; padding-right: 12px; }

/* Compatibilidade com páginas antigas */
.lista-demandas { display: grid; gap: 12px; }
.demanda-card { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.demanda-card-topo { display: flex; justify-content: space-between; gap: 15px; }
.demanda-card h3 { margin: 0; }
.demanda-card p { color: var(--muted); }
.demanda-meta, .badges-linha { display: flex; flex-wrap: wrap; gap: 8px; }
.demanda-meta { color: var(--muted); font-size: 12px; }

/* Responsividade */
@media (max-width: 1280px) {
    .filtros { grid-template-columns: repeat(4,minmax(140px,1fr)); }
    .filtros input { grid-column: span 2; }
    .cards-resumo { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1000px) {
    .detalhes-grid { grid-template-columns: 1fr; }
    .cadastro-layout { grid-template-columns: 1fr; }
    .cadastro-form-card { position: static; }
    .chat-pagina { grid-template-columns: 190px minmax(0,1fr); }
}
@media (max-width: 900px) {
    .layout, .layout.sidebar-recolhida { display: block; }
    .sidebar { position: fixed; left: 0; top: 0; width: min(286px,86vw); transform: translateX(-105%); box-shadow: 18px 0 50px rgba(0,0,0,.25); }
    .layout.menu-aberto .sidebar { transform: translateX(0); }
    .layout.sidebar-recolhida .sidebar { padding: 18px; }
    .layout.sidebar-recolhida .marca-texto, .layout.sidebar-recolhida .menu-texto, .layout.sidebar-recolhida .usuario-box-info { width: auto; opacity: 1; pointer-events: auto; }
    .layout.sidebar-recolhida .sidebar-topo { justify-content: initial; }
    .layout.sidebar-recolhida .marca { flex: 1; }
    .layout.sidebar-recolhida .sidebar-recolher { position: static; width: 31px; height: 31px; }
    .layout.sidebar-recolhida .sidebar-recolher span { transform: none; }
    .layout.sidebar-recolhida .menu a { justify-content: flex-start; padding: 10px 12px; }
    .layout.sidebar-recolhida .usuario-box { grid-template-columns: 42px minmax(0,1fr) 30px; justify-content: initial; padding: 12px; }
    .layout.sidebar-recolhida .usuario-sair { position: static; width: 30px; height: 30px; background: transparent; font-size: 19px; }
    .sidebar-overlay { position: fixed; inset: 0; z-index: 35; border: 0; background: rgba(7,13,24,.52); backdrop-filter: blur(2px); }
    .layout.menu-aberto .sidebar-overlay { display: block; }
    .menu-mobile { display: grid; place-items: center; }
    .topbar { min-height: 74px; }
    .topbar-info { display: none; }
    .pagina-conteudo { padding-top: 20px; }
}
@media (max-width: 720px) {
    .login-body { padding: 14px; }
    .login-shell { grid-template-columns: 1fr; min-height: 0; }
    .login-apresentacao { display: none; }
    .login-card { padding: 30px 22px; }
    .grid-form { grid-template-columns: 1fr; }
    .campo-full { grid-column: auto; }
    .painel-acoes { align-items: flex-start; flex-direction: column; }
    .cards-resumo { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .kanban-wrap { padding: 13px; }
    .kanban-board { grid-template-columns: repeat(3, 285px); }
    .filtros { grid-template-columns: 1fr 1fr; }
    .filtros input { grid-column: 1 / -1; }
    .info-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .timeline-duas-colunas { grid-template-columns: 1fr; }
    .cadastros-resumo { grid-template-columns: 1fr; }
    .chat-pagina { display: block; min-height: 620px; }
    .chat-lateral { display: none; }
    .chat-area { height: 620px; }
    .chat-flutuante { right: 13px; bottom: 13px; }
    .chat-flutuante-painel,
    .chat-flutuante.chat-compacto .chat-flutuante-painel,
    .chat-flutuante.chat-medio .chat-flutuante-painel,
    .chat-flutuante.chat-grande .chat-flutuante-painel { position: fixed; inset: 12px; width: auto; height: auto; }
    .chat-tamanho { display: none; }
    .bloco { padding: 17px; }
    .bloco-topo { flex-direction: column; }
    .segmentos { width: 100%; }
    .segmentos a { flex: 1; justify-content: center; }
}
@media (max-width: 480px) {
    .topbar { padding-left: 14px; padding-right: 14px; }
    .topbar p { display: none; }
    .pagina-conteudo { padding-left: 12px; padding-right: 12px; }
    .cards-resumo { grid-template-columns: 1fr 1fr; gap: 9px; }
    .card-resumo { padding: 13px; }
    .card-resumo strong { font-size: 25px; }
    .filtros { grid-template-columns: 1fr; }
    .filtros input { grid-column: auto; }
    .info-grid { grid-template-columns: 1fr; }
    .chat-form { grid-template-columns: 1fr; }
    .select-com-acao { grid-template-columns: 1fr; }
}

.status-padrao { color: #596579; background: #edf1f5; }

.acoes-form input[type="text"] { flex: 1 1 220px; width: auto; }
.cadastro-form-card { padding: 17px; border: 1px solid #e1e8f0; border-radius: 15px; background: #f9fbfd; }
.cadastro-form-card > h2 { margin: 0; font-size: 18px; }
.cadastro-form-card > p { margin: 5px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* ===============================
   Versão final v7 - tema SME
   =============================== */
:root {
    --bg: #f3f7f2;
    --card: #ffffff;
    --text: #163122;
    --muted: #5d7466;
    --muted-2: #88a092;
    --line: #d9e5dc;
    --primary: #2d6b47;
    --primary-dark: #24563a;
    --primary-soft: #ebf6ef;
    --nav: #133222;
    --nav-2: #1d4a32;
    --danger: #c53a3a;
    --danger-soft: #fff0f0;
    --success: #1d7a4e;
    --success-soft: #edf8f1;
    --warning: #b87b17;
    --warning-soft: #fff6e6;
    --shadow: 0 24px 60px rgba(21, 53, 37, .10);
    --shadow-soft: 0 10px 28px rgba(19, 50, 34, .08);
}

body {
    background:
        radial-gradient(circle at top left, rgba(116, 175, 104, .10), transparent 26%),
        linear-gradient(180deg, #f5faf6 0%, #f2f6f2 55%, #edf4ee 100%);
}

.icon-wrap,
.menu-icone svg,
.sidebar-recolher svg,
.menu-mobile svg,
.chat-flutuante-botao svg {
    display: block;
    width: 18px;
    height: 18px;
}

/* Login */
.login-body {
    background:
        radial-gradient(circle at 10% 10%, rgba(141, 198, 87, .16), transparent 28%),
        radial-gradient(circle at 90% 85%, rgba(255, 189, 46, .10), transparent 22%),
        linear-gradient(135deg, #edf5ef, #f9fcf9 58%, #edf4ef);
}
.login-shell-profissional {
    min-height: 680px;
    border: 1px solid rgba(255,255,255,.92);
    background: rgba(255,255,255,.86);
    box-shadow: 0 30px 80px rgba(25, 55, 40, .16);
}
.login-apresentacao {
    background:
        radial-gradient(circle at 88% 12%, rgba(173, 217, 116, .22), transparent 22%),
        linear-gradient(145deg, #214c33, #143321 60%, #0f291b);
}
.login-sme-logo {
    width: min(320px, 100%);
    margin: 16px 0 18px;
    padding: 18px;
    border-radius: 28px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 18px 40px rgba(0,0,0,.14);
}
.login-apresentacao h1 { font-size: clamp(40px, 5vw, 64px); }
.login-apresentacao p { max-width: 470px; color: rgba(235,245,237,.92); }
.login-card {
    padding: 54px;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,252,250,.97));
}
.login-card-topo { margin-bottom: 24px; }
.login-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid #d7e8dd;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    margin-bottom: 16px;
}
.login-chip::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}
.formulario-login { gap: 18px; }
.formulario-login input {
    min-height: 50px;
    border-radius: 14px;
    background: #fcfdfc;
}
.formulario-login .btn { min-height: 48px; border-radius: 14px; font-size: 14px; }

/* Sidebar */
.sidebar {
    background:
        radial-gradient(circle at 100% 0%, rgba(170, 215, 114, .18), transparent 28%),
        linear-gradient(180deg, var(--nav), var(--nav-2));
}
.marca-logo {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 14px;
    padding: 4px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 10px 22px rgba(0,0,0,.16);
}
.marca strong { font-size: 17px; }
.marca span { color: #c7dbcd; }
.sidebar-topo { padding-bottom: 18px; }
.sidebar-recolher {
    width: 34px;
    height: 34px;
    border-radius: 12px;
}
.sidebar-recolher .icon-wrap { width: 16px; height: 16px; }
.layout.sidebar-recolhida .sidebar-recolher {
    position: absolute;
    left: 59px;
    top: 20px;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #244834;
}
.layout.sidebar-recolhida .sidebar-recolher .icon-wrap { transform: rotate(180deg); }
.menu { gap: 8px; }
.menu a {
    min-height: 48px;
    border: 1px solid transparent;
}
.menu a:hover,
.menu a.ativo {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.08);
}
.menu-icone {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    color: #fff;
    background: rgba(255,255,255,.08);
}
.menu a.ativo .menu-icone {
    background: rgba(255,255,255,.18);
}
.menu-texto { font-size: 14px; }
.usuario-box-wrap {
    margin-top: auto;
    display: grid;
    gap: 10px;
}
.usuario-box {
    margin-top: 0;
    grid-template-columns: 44px minmax(0,1fr);
    background: rgba(255,255,255,.08);
}
.usuario-sair {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 14px;
    color: #e4f0e7;
    background: rgba(255,255,255,.06);
    font-weight: 800;
}
.usuario-sair:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}
.usuario-sair .menu-icone {
    width: 28px;
    height: 28px;
    background: transparent;
}
.layout.sidebar-recolhida .usuario-box-wrap { gap: 8px; }
.layout.sidebar-recolhida .usuario-sair {
    justify-content: center;
    padding: 9px;
}
.layout.sidebar-recolhida .usuario-sair .menu-texto { display: none; }
.layout.sidebar-recolhida .usuario-sair .menu-icone { width: 18px; height: 18px; }

/* Topbar */
.topbar-destaque {
    position: sticky;
    top: 0;
    gap: 18px;
    justify-content: space-between;
    min-height: 98px;
    padding-top: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dce8df;
    background:
        linear-gradient(180deg, rgba(255,255,255,.95), rgba(247,251,247,.92)),
        linear-gradient(90deg, rgba(173,217,116,.18), rgba(255,255,255,0));
    backdrop-filter: blur(18px);
}
.topbar-destaque::after {
    content: "";
    position: absolute;
    left: clamp(18px, 3vw, 42px);
    right: clamp(18px, 3vw, 42px);
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(45,107,71,.2), rgba(45,107,71,0));
}
.topbar-principal {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}
.topbar-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.topbar h1 { color: #143322; }
.topbar p { max-width: 720px; font-size: 14px; }
.topbar-info {
    min-width: 240px;
    gap: 10px;
}
.topbar-chip {
    display: inline-flex;
    align-items: center;
    align-self: end;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid #dceadd;
    border-radius: 999px;
    color: var(--primary);
    background: #fff;
    font-size: 12px;
    font-weight: 800;
}
.topbar-chip::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #84c63f, #2d6b47);
}
.topbar-data {
    display: grid;
    justify-items: end;
    gap: 4px;
}
.topbar-data span { color: var(--muted); font-size: 12px; }
.topbar-data strong { font-size: 14px; color: #234230; }
.menu-mobile {
    width: 44px;
    height: 44px;
    border-radius: 14px;
}

/* Cartões e páginas */
.bloco,
.kanban-wrap,
.card-resumo,
.cadastro-form-card,
.item-cadastro,
.chat-pagina {
    border-color: #dde8df;
    box-shadow: var(--shadow-soft);
}
.bloco {
    border-radius: 22px;
    background: rgba(255,255,255,.96);
}
.bloco-topo h2, .bloco h2 { color: #173423; }
.btn-primario { box-shadow: 0 10px 24px rgba(45,107,71,.18); }
.btn-secundario {
    color: var(--primary);
    border-color: #cfe0d4;
    background: #f6fbf7;
}
.btn-secundario:hover { background: #eef7f0; }
.btn-claro:hover { background: #f7faf7; }
.campo-arquivos {
    border-color: #bfd4c5;
    background: #f8fcf8;
}
input:focus, select:focus, textarea:focus {
    border-color: #74a37e;
    box-shadow: 0 0 0 4px rgba(45,107,71,.12);
}
.card-resumo::before { background: #8fb29a; }
.card-resumo.card-total::before,
.segmentos a.ativo .numero { background: var(--primary); }
.card-resumo.destaque::before { background: #e18a2c; }
.kanban-coluna {
    background: linear-gradient(180deg, #f8fbf8, #f3f7f4);
    border-color: #dbe6dd;
}
.kanban-contador {
    color: var(--primary);
    background: #e3efe6;
}
.kanban-card:hover {
    border-color: #8cb197;
    box-shadow: 0 12px 24px rgba(26, 61, 39, .10);
}
.segmentos a.ativo {
    color: var(--primary);
}
th { background: #f6faf7; color: #5d6f62; }
tbody tr:hover { background: #fbfdfb; }
.info-grid > div,
.timeline-item,
.descricao-box,
.chat-participante { border-color: #e0e9e2; }
.descricao-box,
.info-grid > div { background: #f8fbf8; }

/* Chat */
.chat-pagina {
    overflow: hidden;
    border-radius: 22px;
}
.chat-lateral {
    background: linear-gradient(180deg, #f4faf5, #edf5ef);
    border-right: 1px solid #dfe9e2;
}
.chat-mensagens {
    background: linear-gradient(180deg, #f8fcf8, #ffffff);
}
.chat-msg.minha .chat-balao,
.chat-flutuante-botao {
    background: linear-gradient(135deg, var(--primary), #3f8b61);
}
.chat-flutuante-botao {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    box-shadow: 0 18px 38px rgba(45,107,71,.30);
}
.chat-flutuante-botao .icon-wrap { width: 22px; height: 22px; }
.chat-flutuante-painel { border-color: #dce8df; }
.chat-flutuante-topo {
    background: linear-gradient(135deg, #163724, #2e6f4a);
}

/* Responsivo refinado */
@media (max-width: 900px) {
    .topbar-destaque { min-height: 82px; }
    .topbar-kicker { margin-bottom: 4px; }
}
@media (max-width: 720px) {
    .login-card { padding: 34px 24px; }
    .topbar-chip { display: none; }
}

/* =====================================
   AJUSTE FINAL - ALINHAMENTO E PADRÃO
   ===================================== */

/* Identidade visual e caixa da logo no login */
.login-apresentacao {
    align-items: flex-start;
}

.login-sme-logo {
    display: block;
    width: auto;
    height: min(310px, 40vh);
    max-width: 100%;
    margin: 18px 0 22px;
    padding: 14px;
    object-fit: contain;
    object-position: center;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .15);
}

/* Barra lateral: todos os elementos seguem a mesma grade */
.sidebar {
    padding: 18px 14px;
}

.sidebar-topo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: center;
    gap: 10px;
}

.marca {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.marca-logo {
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 4px;
    object-fit: contain;
    object-position: center;
}

.menu {
    display: grid;
    gap: 8px;
}

.menu a {
    width: 100%;
    min-height: 50px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
}

.menu-icone {
    width: 38px;
    height: 38px;
    margin: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
}

.menu-icone svg {
    width: 19px;
    height: 19px;
}

.menu a.ativo::before {
    left: -14px;
    width: 4px;
    height: 28px;
    background: #9bcf72;
}

.usuario-box-wrap {
    width: 100%;
}

.usuario-box {
    width: 100%;
    min-height: 66px;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 12px;
}

.avatar-mini {
    width: 44px;
    height: 44px;
    margin: 0;
}

.usuario-sair {
    width: 100%;
    min-height: 46px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 4px 10px;
}

.usuario-sair .menu-icone {
    width: 38px;
    height: 38px;
}

/* Menu recolhido sem elementos cortados ou deslocados */
:root {
    --sidebar-collapsed: 96px;
}

.layout.sidebar-recolhida .sidebar {
    padding-left: 14px;
    padding-right: 14px;
}

.layout.sidebar-recolhida .sidebar-topo {
    grid-template-columns: 42px 28px;
    justify-content: center;
    gap: 8px;
}

.layout.sidebar-recolhida .marca {
    grid-template-columns: 42px;
    justify-content: center;
}

.layout.sidebar-recolhida .marca-logo {
    width: 42px;
    height: 42px;
}

.layout.sidebar-recolhida .sidebar-recolher {
    position: static;
    width: 28px;
    height: 28px;
    margin: 0;
}

.layout.sidebar-recolhida .sidebar-recolher .icon-wrap {
    transform: rotate(180deg);
}

.layout.sidebar-recolhida .menu a {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 52px;
    padding: 7px;
}

.layout.sidebar-recolhida .menu-icone {
    width: 40px;
    height: 40px;
}

.layout.sidebar-recolhida .menu a.ativo::before {
    left: -14px;
}

.layout.sidebar-recolhida .usuario-box {
    min-height: 62px;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 9px;
}

.layout.sidebar-recolhida .avatar-mini {
    width: 42px;
    height: 42px;
}

.layout.sidebar-recolhida .usuario-sair {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 48px;
    padding: 5px;
}

.layout.sidebar-recolhida .usuario-sair .menu-icone {
    width: 38px;
    height: 38px;
}

/* Textos principais em caixa alta */
.topbar h1,
.login-apresentacao h1,
.login-card h2,
.bloco h2,
.bloco h3,
.bloco-topo h2,
.kanban-topo h2,
.kanban-card h3,
.kanban-coluna-topo strong,
.painel-acoes-texto strong,
.marca strong,
.menu-texto,
.btn,
button,
th,
.segmentos a,
.card-resumo span,
.chat-flutuante-topo strong,
.chat-lateral h2,
.login-chip,
.topbar-chip {
    text-transform: uppercase;
    letter-spacing: .035em;
}

.btn,
button,
.menu-texto,
th,
.segmentos a {
    font-weight: 850;
}

/* Mantém dados pessoais e conteúdo operacional sem transformação */
.usuario-box-info strong,
.usuario-box-info span,
.topbar-data strong,
.topbar-data span,
.chat-msg strong,
.chat-msg p,
input,
select,
textarea,
td {
    text-transform: none;
    letter-spacing: normal;
}

@media (max-width: 900px) {
    :root {
        --sidebar-collapsed: 96px;
    }

    .layout.sidebar-recolhida .sidebar-topo {
        grid-template-columns: minmax(0, 1fr) 34px;
        justify-content: initial;
    }

    .layout.sidebar-recolhida .marca {
        grid-template-columns: 48px minmax(0, 1fr);
        justify-content: initial;
    }

    .layout.sidebar-recolhida .marca-logo {
        width: 48px;
        height: 48px;
    }

    .layout.sidebar-recolhida .menu a {
        grid-template-columns: 38px minmax(0, 1fr);
        justify-items: initial;
        min-height: 50px;
        padding: 6px 10px;
    }

    .layout.sidebar-recolhida .usuario-box {
        grid-template-columns: 44px minmax(0, 1fr);
        justify-items: initial;
        min-height: 66px;
        padding: 10px 12px;
    }

    .layout.sidebar-recolhida .usuario-sair {
        grid-template-columns: 38px minmax(0, 1fr);
        justify-items: initial;
        min-height: 46px;
        padding: 4px 10px;
    }
}

@media (max-width: 720px) {
    .login-sme-logo {
        height: 270px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Ajuste final: bloco do usuário no menu recolhido */
.layout.sidebar-recolhida .usuario-box-wrap {
    width: 100%;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.layout.sidebar-recolhida .usuario-box {
    width: 54px;
    min-height: 54px;
    padding: 5px;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    border-radius: 16px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
}

.layout.sidebar-recolhida .avatar-mini {
    width: 42px;
    height: 42px;
    border-radius: 13px;
}

.layout.sidebar-recolhida .usuario-sair {
    position: static;
    width: 54px;
    min-height: 44px;
    height: 44px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    border-radius: 14px;
    color: #e9f4ec;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.10);
}

.layout.sidebar-recolhida .usuario-sair:hover {
    background: rgba(255,255,255,.14);
}

.layout.sidebar-recolhida .usuario-sair .menu-icone {
    width: 24px;
    height: 24px;
    background: transparent;
}

.layout.sidebar-recolhida .usuario-sair .menu-icone svg {
    width: 20px;
    height: 20px;
}

.layout.sidebar-recolhida .usuario-sair .menu-texto,
.layout.sidebar-recolhida .usuario-box-info {
    display: none;
}

/* Etapa 1 - acesso das escolas */
.prioridade-definir {
    color: #6a4b0d;
    background: #fff1c7;
    border: 1px solid #f0d58c;
}

.campo-somente-leitura {
    min-height: 43px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #d5e2d8;
    border-radius: 11px;
    color: #254333;
    background: #f4f9f5;
    font-weight: 800;
}

.campo-status-inicial {
    min-height: 74px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 13px 15px;
    border: 1px solid #d7e5da;
    border-radius: 13px;
    background: linear-gradient(135deg, #f7fbf8, #eef7f0);
}

.campo-status-inicial span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.campo-status-inicial strong {
    color: var(--primary);
    font-size: 14px;
}

[data-school-field][hidden] {
    display: none !important;
}

.filtros-tecnico {
    grid-template-columns: minmax(240px, 1.7fr) repeat(4, minmax(145px, 1fr)) auto auto;
}

@media (max-width: 1280px) {
    .filtros-tecnico {
        grid-template-columns: repeat(4, minmax(140px, 1fr));
    }

    .filtros-tecnico input {
        grid-column: span 2;
    }
}

@media (max-width: 720px) {
    .filtros-tecnico {
        grid-template-columns: 1fr 1fr;
    }

    .filtros-tecnico input {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .filtros-tecnico {
        grid-template-columns: 1fr;
    }

    .filtros-tecnico input {
        grid-column: auto;
    }
}

.topbar-chip {
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Fluxo de chamados v2 */
.status-aguardando-aceite {
    color: #7a5207;
    background: #fff1c7;
    border: 1px solid #ebd48f;
}

.status-arquivamento-solicitado {
    color: #8d4d13;
    background: #fff0df;
    border: 1px solid #efc997;
}

.painel-acoes-destaque {
    padding: 18px 20px;
    border: 1px solid #dce8df;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(240,248,242,.96));
    box-shadow: var(--shadow-soft);
}

.decisoes-pendentes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.decisao-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 14px;
    min-height: 112px;
    padding: 18px;
    border: 1px solid #dbe7de;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: .18s ease;
}

.decisao-card:hover {
    transform: translateY(-2px);
    border-color: #9dbca5;
    box-shadow: 0 14px 30px rgba(30, 74, 48, .12);
}

.decisao-icone {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-size: 21px;
    font-weight: 900;
}

.decisao-aceite .decisao-icone { background: linear-gradient(135deg, #2d6b47, #59a478); }
.decisao-arquivamento .decisao-icone { background: linear-gradient(135deg, #b66b20, #e09c54); }
.decisao-card small { display: block; color: var(--muted); font-weight: 900; letter-spacing: .08em; }
.decisao-card strong { display: block; margin-top: 5px; color: #183825; font-size: 15px; }
.decisao-card p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.decisao-seta { color: #789283; font-size: 28px; }

.cards-fluxo .card-aceite::before { background: #d5a73c; }
.cards-fluxo .destaque-retorno::before { background: #8d6bc4; }
.kanban-quatro-colunas { grid-template-columns: repeat(4, minmax(260px, 1fr)); }

.segmentos-fluxo { width: 100%; }
.segmentos-fluxo a { flex: 1 1 155px; justify-content: center; text-align: center; }
.bloco-topo-lista { align-items: center; }
.filtros-fluxo { margin-top: 20px; }

.fluxo-chamado {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px 22px;
    border: 1px solid #d9e7dd;
    border-left: 6px solid var(--primary);
    border-radius: 20px;
    background: linear-gradient(135deg, #fff, #f4faf6);
    box-shadow: var(--shadow-soft);
}

.fluxo-chamado.status-aguardando-aceite { border-left-color: #c9941b; }
.fluxo-chamado.status-arquivamento-solicitado { border-left-color: #d17b24; }
.fluxo-chamado.status-concluida { border-left-color: #237b4f; }
.fluxo-chamado-info span { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .1em; }
.fluxo-chamado-info strong { display: block; margin: 6px 0; color: #173624; font-size: 22px; text-transform: uppercase; }
.fluxo-chamado-info p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.fluxo-chamado-acoes { display: grid; justify-items: stretch; }
.fluxo-chamado-acoes .btn { width: 100%; }

.form-solicitar-arquivamento {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid #e3ddd0;
    border-radius: 15px;
    background: #fffaf3;
}
.form-solicitar-arquivamento label { color: #76501f; font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.form-solicitar-arquivamento textarea { min-height: 70px; background: #fff; }

.analise-arquivamento {
    border-left: 6px solid #d17b24;
    background: linear-gradient(135deg, #fff, #fff8ef);
}
.solicitacao-motivo {
    margin-bottom: 16px;
    padding: 15px;
    border: 1px solid #ead9c4;
    border-radius: 14px;
    color: #593a18;
    background: #fffaf4;
    line-height: 1.6;
}
.formulario-analise { grid-template-columns: minmax(0, 1fr); }
.formulario-analise .acoes-form { justify-content: flex-end; }

@media (max-width: 1100px) {
    .decisoes-pendentes { grid-template-columns: 1fr; }
    .kanban-quatro-colunas { grid-template-columns: repeat(4, 280px); }
    .fluxo-chamado { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .decisao-card { grid-template-columns: 42px minmax(0,1fr) 20px; padding: 15px; }
    .segmentos-fluxo a { flex: 1 1 100%; }
    .fluxo-chamado { padding: 17px; }
    .fluxo-chamado-info strong { font-size: 18px; }
    .formulario-analise .acoes-form { align-items: stretch; flex-direction: column; }
    .formulario-analise .btn { width: 100%; }
}
