/* Visual do novo design (2026-11-28, épico 412 / AB#424). A cor da marca vem de --accent (marca da empresa ou Branding:AccentColor).
   O modo escuro segue o sistema operacional (prefers-color-scheme). */
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url("../fonts/plus-jakarta-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-display: swap; src: url("../fonts/plus-jakarta-sans-500.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url("../fonts/plus-jakarta-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url("../fonts/plus-jakarta-sans-700.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-display: swap; src: url("../fonts/plus-jakarta-sans-800.woff2") format("woff2"); }

:root {
    --bg: #F7F6F2; --surface: #ffffff; --border: #E3E1DA; --text: #14201B; --muted: #56665E;
    --chip: #EFEDE6; --track: #EFEDE6; --head: #EFEDE6; --head-text: #14201B; --phase: #56665E;
    --overlay: rgba(20, 32, 27, .32); --focus: #1F4E8C;
    --ok: #0E5C40; --ok-s: #DDF3E8; --warn: #7A4F00; --warn-s: #FFF2CF;
    --late: #9C301C; --late-s: #FBE9E3; --info: #1F4E8C; --info-s: #E8F0FA;
    --toast-bg: #14201B; --toast-text: #E9EFEA;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0F1613; --surface: #16201B; --border: #2A3832; --text: #E9EFEA; --muted: #A3B2AA;
        --chip: #1F2C25; --track: #1F2C25; --head: #1F2C25; --head-text: #E9EFEA; --phase: #A3B2AA;
        --overlay: rgba(0, 0, 0, .55); --focus: #9BC0F2;
        --ok: #86E0B5; --ok-s: #173A2B; --warn: #F2C76B; --warn-s: #3A2F12;
        --late: #F29A85; --late-s: #3D1F18; --info: #9BC0F2; --info-s: #18263A;
        --toast-bg: #E9EFEA; --toast-text: #14201B;
        color-scheme: dark;
    }
}

html, body { margin: 0; }
body { background: var(--bg); }
*, *::before, *::after { box-sizing: border-box; }

.app {
    --accent: #14805A;
    --accent-soft: color-mix(in srgb, var(--accent) 15%, var(--surface));
    --accent-strong: color-mix(in srgb, var(--accent) 72%, var(--text));
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg); color: var(--text); min-height: 100vh; font-size: 15px; line-height: 1.5; position: relative;
}
.app a { color: inherit; }
.app h1, .app h2, .app h3 { letter-spacing: -.02em; line-height: 1.25; }

/* Marca */
.brand { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.logo { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 13px; background: var(--accent); overflow: hidden; flex: none; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo.lg { width: 44px; height: 44px; border-radius: 13px; font-size: 15px; }
.spacer { flex: 1; }
.user { color: var(--muted); }

/* Botões e campos */
.btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 11px; padding: 0 14px; min-height: 38px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--chip); }
.btn.primary { border-color: var(--accent); color: #fff; background: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.danger { color: var(--late); }
.btn.small { min-height: 31px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.app :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.search { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 8px 12px; width: 260px; max-width: 100%; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea { font: inherit; font-weight: 500; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 11px; padding: 8px 11px; min-height: 40px; }
.field textarea { min-height: 120px; resize: vertical; }
.row2 { display: flex; gap: 12px; }
.row2 .field { flex: 1; min-width: 0; }
.req { color: var(--late); }
.err { color: var(--late); font-size: 13px; }
.hint { font-size: 12.5px; color: var(--muted); }
.ph { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--chip); border-radius: 6px; padding: 1px 6px; margin-right: 4px; }
.linkbtn { border: 0; background: transparent; color: var(--accent-strong); font: inherit; font-weight: 700; padding: 0; cursor: pointer; text-align: left; }
.check { display: flex; gap: 10px; align-items: flex-start; background: var(--chip); border-radius: 12px; padding: 12px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }

/* Páginas */
.main { max-width: 1180px; margin: 0 auto; padding: 24px 28px 64px; }
.head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.app h1 { margin: 0 0 4px; font-size: 27px; font-weight: 800; }
.meta { color: var(--muted); margin: 0; max-width: 72ch; }
.crumb { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.crumb a { color: var(--accent-strong); }
.loading { color: var(--muted); padding: 24px 0; }
.alert { background: var(--late-s); color: var(--late); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.note { background: var(--info-s); color: var(--info); border-radius: 12px; padding: 11px 14px; font-size: 14px; }

/* Tabelas */
.tablebox { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.tablebox table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 14px; }
.tablebox th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.tablebox td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tablebox tr:last-child td { border-bottom: 0; }
.name { font-weight: 700; }
.sub, .muted { color: var(--muted); }
.sub { font-size: 13px; }
.empty { padding: 24px; color: var(--muted); text-align: center; }
.rowactions { display: flex; gap: 6px; justify-content: flex-end; }

/* Selos (pílulas de estado) */
.badge { display: inline-block; border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--chip); }
.b-late { background: var(--late-s); color: var(--late); }
.b-done, .b-ok { background: var(--ok-s); color: var(--ok); }
.b-prog, .b-info { background: var(--info-s); color: var(--info); }
.b-none { background: var(--warn-s); color: var(--warn); }

/* Painel e acompanhamento */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; }
.kpi .n { font-size: 30px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .n.late { color: var(--late); }
.kpi .l { color: var(--muted); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pill { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 0 14px; min-height: 34px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.pill.on { color: var(--bg); border-color: transparent; background: var(--text); }
.bar { height: 8px; border-radius: 9px; background: var(--track); width: 140px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 9px; background: var(--accent); transition: width .3s; }
.prog { display: flex; align-items: center; gap: 8px; }
.pct { font-variant-numeric: tabular-nums; }

/* Jornadas (lista) */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.jcard { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.jtitle { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; flex-wrap: wrap; }
.facts { color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.dots { display: flex; gap: 3px; align-items: flex-end; height: 28px; }
.dots span { width: 6px; border-radius: 3px; background: var(--chip); }
.dots span.on { background: color-mix(in srgb, var(--accent) 40%, var(--surface)); }
.dots span.day1 { background: var(--accent); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.jdesc { margin: 0; color: var(--muted); font-size: 14px; }
.field .label { font-weight: 700; font-size: 14px; }
.rolegroup { border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px 10px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rolegroup legend { font-size: 13px; font-weight: 800; color: var(--muted); padding: 0 4px; }
.rolecheck { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.rolecheck input { width: 18px; height: 18px; accent-color: var(--accent); }
.rolecheck.off { color: var(--muted); }
.preview { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.preview-subject { font-weight: 800; }
.preview-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.card .asub { font-size: 13px; overflow-wrap: anywhere; text-align: left; }
.muted { color: var(--muted); }
.cardactions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.section-title { font-size: 17px; font-weight: 800; margin: 18px 0 8px; }
.tabs { display: flex; gap: 4px; background: var(--chip); border-radius: 12px; padding: 4px; }
.tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; min-height: 32px; border-radius: 9px; cursor: pointer; }
.tabs button.on { background: var(--surface); color: var(--text); }
.suggest { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.suggest .srow { display: flex; gap: 10px; }
.suggest .d { color: var(--muted); width: 104px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.ai-note { font-size: 13px; background: var(--info-s); color: var(--info); border-radius: 10px; padding: 8px 10px; }

/* Quadro da jornada */
.pagehead { padding: 22px 28px 8px; display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.boardwrap { overflow-x: auto; padding: 8px 28px 32px; }
.board { display: flex; align-items: flex-start; min-width: max-content; }
.phase { display: flex; flex-direction: column; }
.phase-label { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: var(--phase); padding: 8px 0 10px; display: flex; align-items: center; gap: 12px; margin-right: 12px; }
.phase-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.phase-cols { display: flex; align-items: flex-start; }
.col { width: 248px; border-radius: 14px; padding: 4px; transition: background .15s; min-height: 120px; }
.col.drop { background: var(--chip); outline: 2px dashed var(--accent); }
.col-head { height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-weight: 800; margin-bottom: 8px; background: var(--head); color: var(--head-text); }
.col-head.day1 { background: var(--accent); color: #fff; }
.card { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin-bottom: 8px; font: inherit; color: var(--text); cursor: grab; box-shadow: 0 1px 2px rgba(20, 32, 27, .05); }
.card:hover { border-color: var(--accent); }
.card.dragging { opacity: .4; }
.card-top { display: flex; gap: 8px; align-items: flex-start; }
.card-title { font-weight: 700; line-height: 1.35; flex: 1; }
.to { color: var(--accent-strong); font-size: 13px; }
.time { display: inline-flex; align-self: flex-start; background: var(--chip); border-radius: 8px; padding: 2px 8px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.welcome { font-size: 12px; font-weight: 700; color: var(--ok); background: var(--ok-s); border-radius: 99px; padding: 2px 10px; align-self: flex-start; }
.card.waiting { opacity: .75; border-style: dashed; }
.wa-badge { font-size: 12px; font-weight: 700; color: var(--warn); background: var(--warn-s); border-radius: 99px; padding: 2px 10px; align-self: flex-start; }
.wa-badge.rejected { color: var(--late); background: var(--late-s); }
.add { width: 100%; min-height: 40px; border: 1px dashed var(--border); border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.add:hover { color: var(--text); border-color: var(--accent); }
.plus { width: 28px; height: 28px; margin: 8px 4px 0; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; flex-shrink: 0; }
.plus:disabled { opacity: .35; cursor: default; }

/* Painel lateral */
.overlay { position: fixed; inset: 0; background: var(--overlay); display: flex; justify-content: flex-end; z-index: 20; }
.panel { width: min(460px, 100%); background: var(--surface); border-left: 1px solid var(--border); padding: 24px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.panel h2 { margin: 0; font-size: 19px; font-weight: 800; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.tl { display: flex; flex-direction: column; gap: 8px; }
.tl-item { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }

/* Aviso */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--toast-bg); color: var(--toast-text); padding: 11px 16px; border-radius: 12px; z-index: 30; font-size: 14px; font-weight: 600; width: max-content; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }

/* Login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 30px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 10px 30px rgba(20, 32, 27, .06); }
.login-card h1 { font-size: 24px; }
.login-card .btn { min-height: 42px; }
.foot { font-size: 12.5px; color: var(--muted); text-align: center; }

/* Portal do colaborador */
.portal { max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; font-size: 15px; }
.portal .top { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.portal .logo { width: 36px; height: 36px; }
.portal .company { font-weight: 800; }
.icon-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 11px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.portal h1 { font-size: 28px; }
.portal .bar { width: 100%; height: 10px; border-radius: 9px; margin: 14px 0 6px; }
.portal .count { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.next { border-radius: 16px; padding: 16px 18px; color: #fff; margin-bottom: 8px; background: var(--accent); }
.next .k { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; opacity: .85; }
.next .t { font-size: 18px; font-weight: 800; margin: 4px 0; }
.portal h2 { font-size: 15px; font-weight: 800; margin: 22px 0 8px; }
.task { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 8px; }
.task .t { font-weight: 700; }
.task.done .t { text-decoration: line-through; color: var(--muted); }
.task .d { color: var(--muted); font-size: 14px; }
.task .trow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task .btn { min-height: 44px; padding: 0 18px; }
.task a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.task .rolegroup.review { border-color: var(--late); }
.task textarea { width: 100%; }
.help { font-size: 13px; color: var(--muted); margin-top: 24px; text-align: center; }

/* Carregamento e erro do Blazor */
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 16px; background: var(--late-s); color: var(--late); z-index: 40; font-family: system-ui, sans-serif; }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }
.loading-progress { display: block; width: 6rem; height: 6rem; margin: 20vh auto 1rem; }
.loading-progress circle { fill: none; stroke: var(--border); stroke-width: .6rem; transform-origin: 50% 50%; transform: rotate(-90deg); }
.loading-progress circle:last-child { stroke: #14805A; stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%; transition: stroke-dasharray .05s ease-in-out; }

/* AB#360: faixa do modo suporte (só leitura) */
.support-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-radius: 0; background: var(--warn-s); color: var(--warn); }
.metrics { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.metrics span { white-space: nowrap; }

@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
    .kpis, .grid { grid-template-columns: minmax(0, 1fr); }
    .main, .pagehead { padding: 16px; }
    .boardwrap { padding: 8px 16px 24px; }
    .col { width: 220px; }
    .row2 { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .bar span, .col { transition: none; } }

/* AB#427: estrutura com menu lateral */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 3px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 14px; }
.side-close { display: none; }
.side-who { display: flex; flex-direction: column; background: var(--chip); border-radius: 12px; padding: 10px 12px; margin: 0 2px 6px; font-size: 13.5px; }
.side-who .name { font-weight: 800; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side .grp { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 4px; }
.navitem { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 8px 10px; border-radius: 10px; font: inherit; font-weight: 600; font-size: 14px; border: 0; background: transparent; cursor: pointer; text-align: left; width: 100%; }
.app a.navitem { color: var(--text); }
.navitem .icon { color: var(--muted); flex: none; }
.navitem:hover { background: var(--chip); }
.app a.navitem.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; }
.navitem.active .icon { color: var(--accent-strong); }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.content { min-width: 0; }
.mobilebar { display: none; }
.scrim { display: none; }
.brandmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; line-height: 1.05; color: var(--text); }
.brandmark .mark { width: 36px; height: 36px; flex: none; }
.brandmark.compact .mark { width: 30px; height: 30px; }
.brandmark.compact { font-size: 13.5px; }
@media (max-width: 900px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .side { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); z-index: 25; transform: translateX(-105%); transition: transform .2s; box-shadow: 0 10px 40px rgba(0, 0, 0, .18); }
    .menu-open .side { transform: none; }
    .side-close { display: inline-flex; width: 38px; height: 38px; }
    .scrim { display: block; position: fixed; inset: 0; background: var(--overlay); z-index: 24; }
    .mobilebar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

/* AB#431: login dividido */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-hero { background: #14805A; color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.brandmark.on-dark { color: #fff; }
.auth-claim .big { font-size: clamp(34px, 4.4vw, 56px); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; margin: 0 0 10px; max-width: 12ch; }
.auth-claim p { margin: 0; font-size: 17px; opacity: .9; }
.auth-trail { width: 100%; max-width: 560px; height: auto; }
.auth-side { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; padding: 32px 24px; }
.login-card.soft { background: transparent; box-shadow: none; border-style: dashed; gap: 10px; }
.login-card h2 { margin: 0; font-size: 17px; font-weight: 800; }
.resend { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 900px) {
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth-hero { padding: 24px 20px; gap: 18px; }
    .auth-trail { display: none; }
}
.portal .alert { margin: 8px 0 14px; }

/* AB#435: marca da empresa */
.side-company { display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px; }
.side-company div { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; }
.side-company .name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.formcard { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; max-width: 560px; }
.brand-editor { display: flex; flex-direction: column; gap: 16px; }
.brand-preview { display: flex; align-items: center; gap: 14px; background: var(--chip); border-radius: 14px; padding: 14px; }
.brand-preview .name { font-weight: 800; margin-bottom: 6px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; }
.swatch.on { border-color: var(--text); box-shadow: inset 0 0 0 2px var(--surface); }
.swatches input[type="color"] { width: 44px; height: 36px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 2px; cursor: pointer; }

/* AB#439: tela Início */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 18px; }
.app a.stat { text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.app a.stat:hover { border-color: var(--accent); }
.stat-top { display: flex; justify-content: space-between; align-items: center; }
.tile { width: 36px; height: 36px; border-radius: 11px; background: var(--chip); display: grid; place-items: center; color: var(--text); }
.go { color: var(--accent-strong); font-weight: 800; font-size: 13px; }
.stat-t { font-weight: 800; }
.big { font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.small { font-size: 13px; }
.card-section { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 12px; }
.card-section h2 { margin: 0; font-size: 18px; font-weight: 800; }
.section-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.section-head .pills { margin: 0; }
.pill .count { font-variant-numeric: tabular-nums; margin-left: 4px; opacity: .8; }
.trails { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.trail-row { width: 100%; display: grid; grid-template-columns: 38px minmax(120px, 1.2fr) minmax(120px, 2fr) minmax(110px, .9fr); gap: 14px; align-items: center; padding: 10px 6px; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: 0; }
.trails li:first-child .trail-row { border-top: 0; }
.trail-row:hover { background: var(--chip); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--chip); color: var(--text); display: inline-grid; place-items: center; font-weight: 800; font-size: 12.5px; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.person { display: inline-flex; align-items: center; gap: 9px; }
.who, .state { display: flex; flex-direction: column; min-width: 0; }
.who .name { font-weight: 800; }
.state .pct { font-weight: 800; font-variant-numeric: tabular-nums; }
.late-text { color: var(--late); font-weight: 700; }
.trail { position: relative; height: 14px; background-image: radial-gradient(circle, var(--border) 2.2px, transparent 2.6px); background-size: 14px 14px; background-position: left center; background-repeat: repeat-x; }
.trail .fill { position: absolute; left: 0; top: 5px; height: 4px; border-radius: 4px; background: var(--accent); }
.trail .dot { position: absolute; top: 0; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.trail.late .fill { background: var(--late); }
.trail.late .dot { border-color: var(--late); }
.tablebox.flat { border: 0; border-radius: 0; }
.tablebox.flat table { min-width: 520px; }
@media (max-width: 720px) {
    .trail-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
    .trail-row .trail { grid-column: 1 / -1; order: 4; }
}
.head select { font: inherit; font-size: 14px; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 0 10px; min-height: 40px; }

/* Validação contra o protótipo (28/11): menu lateral, Início e login como no novo design */
.side { padding: 20px 14px; }
.side-top { padding: 0 6px 18px; }
.cobrand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.cobrand .sep { width: 1px; align-self: stretch; min-height: 28px; background: var(--border); flex: none; }
.cobrand .brandmark { gap: 7px; font-size: 14px; }
.cobrand .logo { width: 36px; height: 36px; border-radius: 28%; }
.cocard { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); background: var(--bg); border-radius: 16px; padding: 10px; margin-bottom: 4px; }
.cocard span, .userinfo { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cocard b, .userinfo b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cocard small, .userinfo small { font-size: 12px; color: var(--muted); }
.side .grp { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 700; padding: 16px 10px 5px; }
.navitem { border-radius: 12px; padding: 9px 11px; transition: background-color .15s, color .15s; }
.app a.navitem.active { background: var(--accent); color: #fff; font-weight: 800; }
.navitem.active .icon { color: #fff; }
.side-foot { border-top: 0; padding-top: 0; margin-top: auto; }
.userbox { display: flex; gap: 10px; align-items: center; margin-top: 18px; border-top: 1px solid var(--border); padding: 14px 4px 0; }
.app a.userinfo { flex: 1; color: var(--text); text-decoration: none; }
.out { border: 0; background: transparent; border-radius: 10px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.out:hover { background: var(--chip); color: var(--text); }
.avatar { background: var(--accent-soft); color: var(--accent-strong); }
.app a.stat { border-radius: 20px; padding: 18px; gap: 7px; transition: border-color .15s, box-shadow .15s; }
.app a.stat:hover { box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 16%, transparent); }
.tile { width: 40px; height: 40px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-strong); }
.stat .big { font-size: 36px; margin-right: 4px; }
.trail-row { grid-template-columns: 38px minmax(120px, 190px) minmax(120px, 1fr) 170px; border-radius: 12px; padding: 11px 6px; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 4px 0; width: 100%; }
.bylink { display: flex; flex-direction: column; gap: 8px; }
.bylink h2 { margin: 0; font-size: 15px; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .navitem, .app a.stat { transition: none; } }
.auth-hero .brandmark { font-size: 20px; }
.auth-hero .brandmark .mark { width: 46px; height: 46px; }
.auth-claim .big { max-width: 11.5ch; }
.btn.fit { align-self: flex-start; }
.portal .top { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* AB#443: ficha do cliente */
.cohead { display: flex; align-items: center; gap: 14px; }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tabbar button { border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--muted); padding: 10px 12px; border-bottom: 3px solid transparent; cursor: pointer; }
.tabbar button.on { color: var(--text); border-bottom-color: var(--accent); }
.facts-list { display: grid; grid-template-columns: minmax(160px, 260px) minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.facts-list dt { color: var(--muted); font-size: 14px; }
.facts-list dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.formgroup { margin: 6px 0 0; font-size: 14px; font-weight: 800; }
.app a.link { color: var(--text); text-decoration: none; display: block; }
.app a.link:hover { text-decoration: underline; }
@media (max-width: 640px) { .facts-list { grid-template-columns: minmax(0, 1fr); } .facts-list dd { margin-bottom: 6px; } }

/* AB#447: módulos */
.modcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.modcard { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.modcard h2 { margin: 0; font-size: 18px; font-weight: 800; }
.modtop { display: flex; justify-content: space-between; align-items: center; }
.modpills { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }

/* AB#455: ajuda e chamados */
.count-badge { margin-left: auto; background: var(--late-s); color: var(--late); border-radius: 99px; padding: 0 7px; font-size: 12px; font-weight: 800; }
.navitem.active .count-badge { background: #fff; color: var(--late); }
.faq details { border-top: 1px solid var(--border); padding: 10px 2px; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 6px 0 0; color: var(--muted); max-width: 75ch; }
.ticket { border-top: 1px solid var(--border); padding: 12px 2px; display: flex; flex-direction: column; gap: 4px; }
.ticket:first-child { border-top: 0; }
.ticket .answer { background: var(--chip); border-radius: 12px; padding: 10px 12px; margin-top: 4px; white-space: pre-line; }
.ticket .body { white-space: pre-line; color: var(--muted); }
.row-between { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 46ch; }
.body-text { white-space: pre-line; margin: 0; }

/* Validação F2 contra o protótipo: empresas em cartões, ficha em grade */
.cogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.cocard-lg { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cocard-lg p { margin: 0; }
.big-name { font-size: 17px; font-weight: 800; }
@media (min-width: 1000px) { .facts-list { grid-template-columns: minmax(120px, 200px) minmax(0, 1fr) minmax(120px, 200px) minmax(0, 1fr); } }

/* AB#475: ficha da pessoa */
.two-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.bar.wide { width: 100%; }
.item { border-top: 1px solid var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.facts-list.single { grid-template-columns: minmax(120px, 170px) minmax(0, 1fr); }
.history { margin: 0; padding: 6px 0; border-top: 1px solid var(--border); }
@media (max-width: 900px) { .two-cols { grid-template-columns: minmax(0, 1fr); } }
.app a.trail-row { text-decoration: none; color: var(--text); }

/* AB#479: importação */
.steps { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 0; margin: 0 0 16px; }
.steps li { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 700; color: var(--muted); }
.steps li.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps li.done { background: var(--accent-soft); color: var(--accent-strong); }
textarea.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

/* AB#535: portal repaginado */
.portal .oi { margin-bottom: 2px; }
.jmap { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.jmap-head { display: flex; justify-content: space-between; align-items: baseline; }
.jmap-head h2 { margin: 0; font-size: 16px; }
.jmap-head .pct { font-weight: 800; color: var(--accent-strong); }
.jmap-track { position: relative; width: 100%; aspect-ratio: 320 / 128; }
.jmap-track svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.jmap-track .road { fill: none; stroke: var(--chip); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 2 9; }
.jmap-track .road.done { stroke: var(--accent); stroke-dasharray: none; }
.jmap-track .stop { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 800; display: grid; place-items: center; cursor: pointer; padding: 0; }
.jmap-track .stop.done { background: var(--accent); border-color: var(--accent); color: #fff; }
.jmap-track .stop.late { border-color: var(--late); color: var(--late); }
.jmap-track .stop.next { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.jmap-track .stop.end { cursor: default; font-size: 16px; }
.nextup { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 0; border-radius: 12px; padding: 10px 12px; background: var(--chip); color: var(--text); font: inherit; cursor: pointer; }
.nextup small { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.nextup span { color: var(--accent-strong); font-weight: 700; font-size: 14px; }
.nextup.still { cursor: default; margin: 0; }
.steps-title { margin-top: 18px; }
.task.flash { outline: 3px solid var(--accent); outline-offset: 2px; }
fieldset.task { margin: 0 0 8px; min-width: 0; }
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
a.btn.off { pointer-events: none; opacity: .55; }
.privacy-item { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--border); padding-top: 8px; }
.phone-frame { max-width: 420px; margin: 16px auto; border: 1px solid var(--border); border-radius: 28px; padding: 8px; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { .task.flash { outline-offset: 0; } }

/* AB#551: itens da admissão no portal */
.adm-item { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid var(--border); }
.adm-item .trow { flex-wrap: wrap; }
.adm-item input[type=text] { flex: 1; min-width: 0; }
