/* Lexjus — gestão jurídica: menu lateral azul-marinho (cor configurável em Aparência), detalhes em dourado */
:root {
  --nav: #0f2a4a; --nav-ink: #fff; --nav-hover: rgba(255,255,255,.10); --nav-line: rgba(255,255,255,.14);
  --brand: #0f2a4a;
  --gold: #d4af6a;
  --side-w: 264px;
  --brand-ink: #ffffff;
  --brand-soft: color-mix(in srgb, var(--brand) 10%, #fff);
  --brand-line: color-mix(in srgb, var(--brand) 30%, #fff);
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --line: #e6e8ee;
  --line-2: #d6d9e1;
  --ink: #1d1e2c;
  --ink-2: #4b5063;
  --ink-3: #7c8194;
  --pos: #059669;
  --neg: #e11d48;
  --radius: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 24, 40, .04), 0 2px 10px rgba(20, 24, 40, .04);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1117; --surface: #171a23; --surface-2: #1d212c; --line: #262b38; --line-2: #333949;
  --ink: #eceef4; --ink-2: #b4b9c8; --ink-3: #8a90a3;
  --brand-soft: color-mix(in srgb, var(--brand) 18%, #171a23); --brand-line: color-mix(in srgb, var(--brand) 45%, #171a23);
  --shadow: 0 1px 2px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.015em; }
button { font-family: inherit; }
.ic { flex: none; display: block; }
.muted { color: var(--ink-3); }
.neg { color: var(--neg); font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); font-variant-numeric: tabular-nums; }
.link { color: var(--brand); display: inline-flex; gap: 4px; align-items: center; font-weight: 600; font-size: 14px; }
.link:hover { text-decoration: underline; }
.grow { flex: 1; }
.inline { display: inline; margin: 0; }
.only-m { display: none !important; }


/* ---------------------------------------------------------------- estrutura: menu lateral + barra superior */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .2s ease; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; color: var(--nav-ink); z-index: 60;
  background: linear-gradient(180deg, color-mix(in srgb, var(--nav) 92%, #fff) 0%, var(--nav) 38%, color-mix(in srgb, var(--nav) 82%, #000) 100%); }
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 20px; color: var(--nav-ink); border-bottom: 1px solid var(--nav-line); }
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-txt strong { font: 700 25.3px/1.1 var(--serif); /* 22px + 15% */ letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-txt small { font-size: 12px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; background: #fff; border-radius: 11px; padding: 3px; flex: none; }
.brand-mark { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent); }
.menu { flex: 1; overflow-y: auto; padding: 8px 12px 16px; scrollbar-width: thin; scrollbar-color: var(--nav-line) transparent; }
.menu-sec { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .55; padding: 18px 12px 6px; white-space: nowrap; }
.menu-link { position: relative; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 10px; color: var(--nav-ink); font-weight: 500; font-size: 14.5px; opacity: .86; white-space: nowrap; }
.menu-link:hover { background: var(--nav-hover); opacity: 1; }
.menu-link.active { background: color-mix(in srgb, #fff 14%, transparent); opacity: 1; font-weight: 600; }
.menu-link.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold); }
.menu-link.active .ic { color: var(--gold); }
.side-foot { padding: 14px 20px; font-size: 11.5px; opacity: .5; border-top: 1px solid var(--nav-line); white-space: nowrap; }
.side-foot span { font-family: var(--serif); font-weight: 700; }
/* menu recolhido (computador): só ícones */
@media (min-width: 1151px) {
:root.side-mini { --side-w: 76px; }
.side-mini .brand { justify-content: center; padding-left: 0; padding-right: 0; }
.side-mini .brand-txt, .side-mini .menu-link span, .side-mini .side-foot { display: none; }
.side-mini .menu-sec { font-size: 0; padding: 10px 0 4px; border-top: 1px solid var(--nav-line); margin: 8px 10px 0; }
.side-mini .menu-link { justify-content: center; padding: 0; }
}
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; height: 64px; display: flex; align-items: center; gap: 10px; padding: 0 24px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.gsearch { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; width: min(440px, 100%); border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3); }
.gsearch:focus-within { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px var(--brand-soft); }
.gsearch input { border: 0 !important; box-shadow: none !important; background: transparent !important; height: 100% !important; padding: 0 !important; font-size: 14px !important; min-width: 0; }
.today { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-2); padding: 0 8px; white-space: nowrap; }
.today .ic { color: var(--ink-3); }
.nav-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; flex: none; }
.nav-btn:hover { background: var(--surface-2); color: var(--ink); }
.dd { position: relative; }
.dd-panel { position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: 0 12px 40px rgba(20,24,40,.16); padding: 8px; z-index: 60; animation: ddin .14s ease-out; }
.dd-panel.right { left: auto; right: 0; }
@keyframes ddin { from { opacity: 0; transform: translateY(-4px); } }
.dd-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); border: 0; background: none; cursor: pointer; text-align: left; }
.dd-item:hover { background: var(--surface-2); color: var(--ink); }
.dd-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.dd-item.danger { color: var(--neg); }
.dd-item .ic { color: var(--ink-3); }
.dd-hdr { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 700; padding: 12px 12px 4px; border-top: 1px solid var(--line); margin-top: 6px; }
.dd-user { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; }
.dd-user small { color: var(--ink-3); }
.user-dd { flex: none; }
.user-pill { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 10px 0 4px; border-radius: 999px; cursor: pointer; list-style: none; color: var(--ink-2); }
.user-pill::-webkit-details-marker { display: none; }
.user-pill:hover, .user-dd[open] .user-pill { background: var(--surface-2); }
.user-name { display: flex; flex-direction: column; line-height: 1.15; }
.user-name b { color: var(--ink); font-size: 14px; }
.user-name small { font-size: 12px; color: var(--ink-3); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; flex: none; font-size: 15px; }
.avatar.xl { width: 76px; height: 76px; font-size: 30px; }
.scrim { display: none; }
.only-m { display: none !important; }

/* ---------------------------------------------------------------- página */
.content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 28px 28px 56px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-title { min-width: 0; }
.page-head h1 { font-size: 27px; font-weight: 700; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--ink-3); margin-bottom: 4px; }
.crumbs a:hover { color: var(--brand); }

/* ---------------------------------------------------------------- botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font: 600 14.5px var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, filter .15s; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.outline { background: var(--surface); border-color: var(--brand); color: var(--brand); }
.btn.outline:hover { background: var(--brand-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { color: var(--neg); }
.btn.danger:hover { background: color-mix(in srgb, var(--neg) 8%, transparent); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn.lg { height: 50px; font-size: 16px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--brand-line); font-size: 13px; font-weight: 600; color: var(--brand); background: var(--brand-soft); white-space: nowrap; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.count-badge { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--neg); color: #fff; font-size: 12.5px; font-weight: 700; }

/* ---------------------------------------------------------------- cartões */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 22px; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.card-h h2, .card-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card-h h2 .ic, .card-title .ic { color: var(--brand); }
.card-title { margin-bottom: 18px; }
.card-sub { color: var(--ink-3); font-size: 14px; margin: -12px 0 16px; }
.pill-info { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12.5px; font-weight: 600; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.cols-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }
.cols-2 > .card, .cols-3 > .card, .cols-3 > .kpi { margin-bottom: 0; }
.stack { margin-bottom: 22px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 700; margin: 6px 0 14px; }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.b-green { background: #dcfce7; color: #047857; }
.b-red { background: #ffe4e9; color: #be123c; }
.b-amber { background: #fef3c7; color: #b45309; }
.b-blue { background: #dbeafe; color: #1d4ed8; }
.b-violet { background: #ede9fe; color: #6d28d9; }
.b-gray { background: #eef0f4; color: #4b5063; }
.b-dark { background: #1f2937; color: #fff; }
:root[data-theme="dark"] .b-green { background: #0d3324; color: #6ee7b7; }
:root[data-theme="dark"] .b-red { background: #3d1220; color: #fda4af; }
:root[data-theme="dark"] .b-amber { background: #3a2a0c; color: #fcd34d; }
:root[data-theme="dark"] .b-blue { background: #132a4d; color: #93c5fd; }
:root[data-theme="dark"] .b-gray { background: #262b38; color: #b4b9c8; }
:root[data-theme="dark"] .b-dark { background: #eceef4; color: #0f1117; }

/* ---------------------------------------------------------------- barra de filtros */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); min-width: 300px; color: var(--ink-3); box-shadow: var(--shadow); }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.search input { border: 0; outline: 0; box-shadow: none !important; padding: 0; background: transparent; flex: 1; height: 100%; font: inherit; color: var(--ink); min-width: 0; }
.toolbar select, .toolbar input[type=month], .toolbar input[type=date] { width: auto; max-width: 100%; height: 44px; }
.period { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.period input[type=month], .period input[type=date] { width: 175px; }

/* ---------------------------------------------------------------- tabela */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; padding: 13px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th a { display: inline-flex; align-items: center; gap: 4px; }
.tbl th a:hover { color: var(--brand); }
.tbl td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr[data-href] { cursor: pointer; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.late td.primary { box-shadow: inset 3px 0 0 var(--neg); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td.primary { font-weight: 600; }
.tbl .row-link:hover { color: var(--brand); }
.tbl .act { width: 1%; white-space: nowrap; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.row-actions .btn span { display: none; }
.tbl tfoot td { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 0; }
div.tot { display: flex; flex-wrap: wrap; gap: 26px; justify-content: flex-end; font-size: 14px; color: var(--ink-2); }
div.tot b { margin-left: 6px; font-size: 16px; }
.thumb { width: 38px; height: 38px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; margin: 0; font-size: 13.5px; border-top: 1px solid var(--line); }
.pager > div { display: flex; align-items: center; gap: 6px; }
.pg { color: var(--ink-2); font-weight: 600; }

/* ---------------------------------------------------------------- formulários */
.form .grid, .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 18px; }
.sec { font-size: 18px; font-weight: 700; color: var(--ink); margin: 26px -24px 18px; padding: 22px 24px 0; border-top: 1px solid var(--line); }
.sec:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.fld { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.c1 { grid-column: span 1; } .c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; }
.c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c9 { grid-column: span 9; } .c10 { grid-column: span 10; } .c11 { grid-column: span 11; } .c12 { grid-column: span 12; }
.fld > label { font-size: 14px; font-weight: 600; color: var(--ink); }
.req { color: var(--neg); font-style: normal; }
input:where(:not([type=checkbox]):not([type=file]):not([type=radio]):not([type=color])), select, textarea {
  width: 100%; height: 44px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; outline: 0; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 12px 14px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
input[readonly], select:disabled { background: var(--surface-2); color: var(--ink-2); }
input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; }
.has-err input, .has-err select, .has-err textarea { border-color: var(--neg); }
small.err { color: var(--neg); font-size: 13px; }
small.help { color: var(--ink-3); font-size: 13px; }
.static { min-height: 44px; display: flex; align-items: center; padding: 0 14px; border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.sel-row { display: flex; gap: 6px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin: 24px -24px -24px; padding: 18px 24px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.danger-zone { display: flex; justify-content: flex-end; }
/* segmentado Não/Sim */
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--surface-2); border: 1.5px solid var(--line); width: max-content; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 7px 18px; border-radius: 9px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg input:checked + label { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(20,24,40,.12); }
.seg input:focus-visible + label { outline: 2px solid var(--brand); }
/* upload */
.upl { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.upl input[type=file] { font: inherit; font-size: 14px; color: var(--ink-3); max-width: 100%; }
.upl input[type=file]::file-selector-button { font: 600 14px var(--font); height: 40px; padding: 0 16px; margin-right: 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--brand); background: var(--surface); color: var(--brand); cursor: pointer; }
.upl input[type=file]::file-selector-button:hover { background: var(--brand-soft); }
.upl-side { display: flex; flex-direction: column; gap: 8px; }
.preview { width: 92px; height: 92px; object-fit: contain; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); padding: 4px; }
.chk { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 999px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::before { transform: translateX(20px); }
.pw { position: relative; display: block; }
.pw input { width: 100%; padding-right: 48px; }
.pw .icon-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; box-shadow: none; color: var(--ink-3); }
.pw .icon-btn:hover { color: var(--brand); background: var(--surface-2); }
/* paleta de cores */
.palette { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.swatch-big { width: 52px; height: 52px; border-radius: 12px; border: 1.5px solid var(--line); box-shadow: inset 0 0 0 4px var(--surface); }
.hex { font: 600 13px ui-monospace, Consolas, monospace; padding: 4px 10px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); }
.sw { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.1); cursor: pointer; padding: 0; }
.sw.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.sw-custom { width: 32px; height: 32px; border-radius: 50%; border: 1.5px dashed var(--line-2); display: grid; place-items: center; cursor: pointer; position: relative; color: var(--ink-3); background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #3b82f6, #a855f7, #ef4444); }
.sw-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* ---------------------------------------------------------------- alertas, toasts, modal */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-md); margin-bottom: 18px; font-size: 14.5px; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert.err { background: #fff1f3; color: #be123c; border: 1px solid #fecdd6; }
.alert.info { background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line); }
:root[data-theme="dark"] .alert.err { background: #3d1220; border-color: #5c1a2e; color: #fda4af; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 100; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-radius: 14px; background: #1d1e2c; color: #fff; box-shadow: 0 10px 34px rgba(0,0,0,.2); font-size: 14.5px; animation: tin .25s ease-out; }
.toast.t-ok .ic { color: #34d399; }
.toast.t-err { background: #be123c; }
.toast.t-warn .ic { color: #fbbf24; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .3s; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.modal { position: fixed; inset: 0; z-index: 200; background: rgba(20, 22, 35, .45); display: grid; place-items: center; padding: 20px; animation: fin .15s; }
.modal[hidden] { display: none; }
.modal-box { background: var(--surface); border-radius: 22px; padding: 28px 24px 24px; width: min(440px, 100%); text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: pop .18s ease-out; }
.modal-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--brand-soft); color: var(--brand); }
.modal-box h3 { font-size: 19px; margin-bottom: 6px; }
.modal-box p { color: var(--ink-3); margin: 0 0 22px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@keyframes fin { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.empty { text-align: center; padding: 52px 20px; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .ic { color: var(--brand-line); }
.empty.sm { padding: 30px 16px; }
.empty h2 { color: var(--ink); }
.empty p { margin: 0; }

/* ---------------------------------------------------------------- dashboard */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; color: var(--ink); font-size: 15px; font-weight: 600; }
.kpi-top .ic { color: var(--c, var(--brand)); }
.kpi-val { font-size: 34px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--c, var(--brand)); line-height: 1.25; margin-top: 8px; }
.kpi-val.sm { font-size: 26px; }
.kpi-sub { font-size: 13.5px; color: var(--ink-3); }
.prog { height: 12px; border-radius: 99px; background: color-mix(in srgb, var(--c, var(--brand)) 14%, var(--surface)); overflow: hidden; margin: 16px 0 10px; }
.prog > i { display: block; height: 100%; border-radius: 99px; background-color: var(--c, var(--brand)); background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.28) 0 6px, transparent 6px 12px); }
.kpi-links { display: flex; flex-direction: column; margin-top: 4px; }
.kpi-links a { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; color: var(--ink-2); }
.kpi-links a .ic:first-child { color: var(--ink-3); }
.kpi-links a .ic:last-child { margin-left: auto; color: var(--ink-3); }
.kpi-links a:hover { color: var(--brand); }
.c-blue { --c: #2563eb; } .c-green { --c: #059669; } .c-amber { --c: #d97706; } .c-red { --c: #e11d48; } .c-violet { --c: #7c3aed; } .c-sky { --c: #0284c7; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart .grid-l { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .bar-r { fill: var(--brand); }
.chart .bar-d { fill: #f59e0b; }
.chart .bar:hover { opacity: .8; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.mini-list { list-style: none; margin: 0; padding: 8px; }
.mini-list li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; }
.mini-list li:hover { background: var(--surface-2); }
.mini-list .grow { min-width: 0; }
.mini-list .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.mini-list .s { font-size: 13px; color: var(--ink-3); }
.date-pill { flex: none; width: 50px; text-align: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand); padding: 5px 0; line-height: 1.1; }
.date-pill b { display: block; font-size: 18px; }
.date-pill small { font-size: 10.5px; text-transform: uppercase; font-weight: 700; }
.bar-h { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-h > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.task { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius-md); background: var(--surface-2); margin-bottom: 10px; }
.task:last-child { margin-bottom: 0; }
.task-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--brand); flex: none; box-shadow: var(--shadow); }
.task-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none; }
.task h4 { margin: 0; font-size: 15.5px; }
.task p { margin: 2px 0 0; font-size: 14px; color: var(--ink-3); }
.task .grow { min-width: 0; }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 18px 24px 24px; }
.quick a { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; }
.quick a .ic { color: var(--brand); }
.quick a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* ---------------------------------------------------------------- perfil / afiliado */
.profile { display: flex; gap: 18px; align-items: center; }
.profile h2 { font-size: 22px; }
.profile p { margin: 2px 0; }
.hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.hero-photo { width: 108px; height: 108px; border-radius: 20px; object-fit: cover; background: var(--brand-soft); display: grid; place-items: center; color: var(--brand); font-size: 42px; font-weight: 700; flex: none; }
.hero h2 { font-size: 26px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; color: var(--ink-2); font-size: 14px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.tabs { display: flex; gap: 6px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; width: max-content; max-width: 100%; }
.tabs button { border: 0; background: transparent; padding: 9px 16px; font: 600 14.5px var(--font); color: var(--ink-2); cursor: pointer; border-radius: 10px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tabs button:hover { background: var(--surface-2); }
.tabs button.on { background: var(--brand); color: var(--brand-ink); }
.tabs .count { background: rgba(127,127,127,.18); border-radius: 99px; padding: 0 8px; font-size: 12px; }
.tab-panel[hidden] { display: none; }
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px 26px; margin: 0; }
.dl dt { font-size: 12.5px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.dl dd { margin: 3px 0 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- calendário */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-h { padding: 10px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; text-align: center; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal-d { min-height: 116px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-d:nth-child(7n) { border-right: 0; }
.cal-d.out { background: var(--surface-2); color: var(--ink-3); }
.cal-d.today .cal-n { background: var(--brand); color: var(--brand-ink); }
.cal-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13.5px; font-weight: 700; }
.ev { display: block; font-size: 12.5px; font-weight: 600; padding: 3px 8px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev:hover { background: var(--brand); color: var(--brand-ink); }

/* ---------------------------------------------------------------- login */
.bare { min-height: 100vh; }
.login { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.login-art { background: radial-gradient(900px 500px at 0% 100%, rgba(255,255,255,.18), transparent 60%), radial-gradient(700px 400px at 100% 0%, rgba(255,255,255,.12), transparent 55%), var(--nav); color: var(--nav-ink); display: flex; align-items: flex-end; padding: 56px; }
.login-art-inner { max-width: 460px; }
.login-art .brand-mark.lg { width: 60px; height: 60px; border-radius: 16px; }
.login-art h2 { font-size: 36px; margin: 22px 0 10px; }
.login-art p { opacity: .85; font-size: 17px; margin: 0; }
.login-box { display: grid; place-items: center; padding: 32px 20px; }
.login-form { width: 100%; max-width: 400px; display: grid; gap: 16px; background: var(--surface); padding: 32px; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-form h1 { font-size: 26px; }
.login-form .muted { margin: -10px 0 4px; }
.login-logo { max-height: 64px; max-width: 200px; object-fit: contain; }

/* ---------------------------------------------------------------- responsivo */
@media (max-width: 1150px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 { grid-template-columns: 1fr; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); z-index: 70; }
  body.side-open .side { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15,20,35,.5); z-index: 65; }
  .only-m { display: inline-grid !important; }
  .only-d { display: none !important; }
  .topbar { padding: 0 14px; }
}
@media (max-width: 900px) {
  .content { padding: 20px 16px 48px; }
  .page-head h1 { font-size: 23px; }
  .cols-2 { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .form .grid, .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .c1, .c2 { grid-column: span 2; } .c3, .c4, .c5 { grid-column: span 3; } .c6, .c7, .c8, .c9, .c10, .c11, .c12 { grid-column: span 6; }
  .page-actions .btn span { display: none; }
  .page-actions .btn { padding: 0 13px; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 18px; border-radius: 16px; }
  .sec { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
  .form-actions { margin: 20px -18px -18px; padding: 14px 18px; }
  .search { min-width: 0; flex: 1 1 100%; }
  .toolbar select { flex: 1 1 140px; }
  .c3, .c4, .c5 { grid-column: span 6; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 14px 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
  .tbl td { border: 0; padding: 0; font-size: 14px; }
  .tbl td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
  .tbl td.primary { grid-column: 1 / -1; font-size: 16px; }
  .tbl td.primary::before { display: none; }
  .tbl td.num { text-align: left; }
  .tbl td.act { grid-column: 1 / -1; width: auto; }
  .tbl td.act::before { display: none; }
  .row-actions { justify-content: flex-start; margin-top: 4px; }
  .tbl tfoot tr { display: block; }
  div.tot { justify-content: flex-start; gap: 12px; }
  .cal-d { min-height: 64px; padding: 3px; }
  .ev { font-size: 0; height: 6px; padding: 0; background: var(--brand); }
  .cal-h { font-size: 10px; padding: 6px 2px; }
  .hero-photo { width: 78px; height: 78px; font-size: 30px; }
  .quick { grid-template-columns: 1fr; }
  .tabs { width: 100%; }
  .user-pill { padding: 0; }
}

/* ---------------------------------------------------------------- impressão */
@media print {
  .side, .topbar, .toolbar, .row-actions, .form-actions, .toasts, .no-print, .page-actions { display: none !important; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; }
  body { background: #fff; }
}

summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }
.page-actions .dd-panel { top: calc(100% + 6px); }

/* referência de variáveis dos modelos de documento */

/* ---------------------------------------------------------------- acréscimos do gestor imobiliário */
.affix { display: flex; align-items: stretch; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.affix:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.affix > span { display: grid; place-items: center; padding: 0 12px; background: var(--surface-2); color: var(--ink-3); font-size: 14px; font-weight: 600; }
.affix input { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; text-align: right; font-variant-numeric: tabular-nums; }
.has-err .affix { border-color: var(--neg); }
.preview.ph { display: grid; place-items: center; color: var(--ink-3); }
.tbl tr.dim td { opacity: .55; }
.row-actions .btn.strong { color: var(--brand); background: var(--brand-soft); }
.row-actions .btn.strong span { display: inline; }
.dl .wide { grid-column: 1 / -1; }
.card > .sec.first { border-top: 0; padding-top: 0; margin-top: 0; }
.card > .sec { margin-left: -24px; margin-right: -24px; }
.sel-row select { flex: 1; min-width: 0; }
/* lista pesquisável (substitui o select nativo nas listas longas) */
.cbx { position: relative; flex: 1; min-width: 0; }
.cbx-native { position: absolute !important; opacity: 0; pointer-events: none; height: 1px !important; width: 1px !important; bottom: 0; left: 12px; }
.cbx-btn { width: 100%; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 14px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cbx-btn > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbx-btn > span.ph { color: var(--ink-3); }
.cbx-btn .ic { color: var(--ink-3); transition: transform .15s; }
.cbx-btn:focus-visible, .cbx.open .cbx-btn { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.cbx.open .cbx-btn .ic { transform: rotate(180deg); }
.cbx-btn:disabled { background: var(--surface-2); color: var(--ink-2); cursor: default; }
.has-err .cbx-btn { border-color: var(--neg); }
.cbx-panel { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: 0 12px 40px rgba(20,24,40,.16); padding: 6px; animation: ddin .14s ease-out; }
.cbx-search { display: flex; align-items: center; gap: 8px; padding: 0 10px; margin-bottom: 6px; border-radius: 10px; background: var(--surface-2); color: var(--ink-3); }
.cbx-search input { border: 0 !important; box-shadow: none !important; background: transparent !important; height: 38px; padding: 0; font-size: 14.5px; }
.cbx-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.cbx-list li { padding: 8px 10px; border-radius: 8px; font-size: 14.5px; cursor: pointer; color: var(--ink-2); }
.cbx-list li.act { background: var(--surface-2); color: var(--ink); }
.cbx-list li.sel { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.cbx-list li.none { color: var(--ink-3); cursor: default; text-align: center; }

/* editor de documentos */

/* cartões de situação (painel) */
.status-card { padding: 22px 24px 24px; }
.status-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.status-head h2 { font-size: 20px; font-weight: 700; }
.kpi .tip { color: var(--brand); display: inline-grid; cursor: help; }
.kpi .kpi-top > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.off .kpi-links a { color: var(--ink-3); opacity: .7; }
.kpi .prog.zero > i { opacity: .45; }
.period-dd summary { list-style: none; }
.period-dd summary::-webkit-details-marker { display: none; }
.period-dd .dd-panel { min-width: 270px; }
.period-dd .dd-item { white-space: nowrap; gap: 16px; }
.period-dd .dd-item small { flex: none; }
.c-sky { --c: #0284c7; } .c-teal { --c: #0d9488; }

/* ficha do contrato */
.hero-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; }
.hero-card .who { display: grid; gap: 14px; }
.who-row { display: flex; gap: 14px; align-items: flex-start; }
.who-row .task-ic { width: 42px; height: 42px; }
.who-row small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; }
.who-row b { font-size: 16px; }
.who-row a.t:hover { color: var(--brand); }
.who-row .s { font-size: 13.5px; color: var(--ink-3); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fact { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.fact small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.fact b { font-size: 18px; font-variant-numeric: tabular-nums; }
.mini-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--ink-2); }
.mini-stats b { color: var(--ink); }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form .fld { min-width: 150px; }
.actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.action-box { border: 1.5px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.action-box h4 { margin: 0; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.action-box h4 .ic { color: var(--brand); }
.action-box p { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.action-box .btn { align-self: flex-start; }

/* receber */
.calc { display: grid; gap: 2px; font-size: 15px; }
.calc div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.calc div:last-child { border-bottom: 0; font-size: 20px; font-weight: 700; padding-top: 12px; }
.calc .neg, .calc .pos { font-weight: 600; }

/* repasses */
.grp-h { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.grp-h h3 { font-size: 16px; display: flex; gap: 10px; align-items: center; }
.grp-h .muted { font-size: 13px; }
.sticky-bar { position: sticky; bottom: 12px; z-index: 20; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(20,24,40,.14); }
.tbl td.chk-cell, .tbl th.chk-cell { width: 1%; }

@media (max-width: 900px) {
  .hero-card { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .user-pill { padding: 0 4px; }
  .gsearch { width: auto; flex: 1; }
  .sticky-bar > div { width: 100%; }
  .sticky-bar input[type=date] { width: auto !important; flex: 1; min-width: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .card > .sec { margin-left: -18px; margin-right: -18px; }
  .tbl td.chk-cell { grid-column: 1 / -1; }
}

/* ===== Eclesiastick: rádio segmentado colorido (Receita/Despesa) e múltipla escolha ===== */
.seg input:checked + label.seg-green { background: #dcfce7; color: #047857; }
.seg input:checked + label.seg-red { background: #ffe4e6; color: #be123c; }
.seg input:checked + label.seg-blue { background: #dbeafe; color: #1d4ed8; }
.seg input:checked + label.seg-amber { background: #fef3c7; color: #b45309; }
.seg input:checked + label.seg-violet { background: #ede9fe; color: #6d28d9; }
.seg.lg label { padding: 10px 26px; font-size: 15.5px; }
:root[data-theme="dark"] .seg input:checked + label.seg-green { background: #0d3324; color: #6ee7b7; }
:root[data-theme="dark"] .seg input:checked + label.seg-red { background: #3f0d1a; color: #fda4af; }
.pos { color: #047857; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .pos { color: #6ee7b7; }
.val-tipo { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
div.tot .t-rec b { color: #047857; } div.tot .t-desp b { color: #be123c; }
.member-photo { width: 96px; height: 128px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.doc-tile { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.doc-tile:hover { border-color: var(--brand); }
.doc-tile .ic-wrap { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); flex: none; }
.doc-tile strong { display: block; font-size: 14.5px; }
.doc-tile small { color: var(--ink-2); font-size: 12.5px; }
.rep-table td.num, .rep-table th.num { text-align: right; }
.rep-table tr.tot td { font-weight: 700; background: var(--surface-2); }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { flex: 1; min-width: 0; }

.cell-media { display: inline-flex; align-items: center; gap: 10px; }
.cell-media small { display: block; font-size: 12px; font-weight: 500; }
.thumb.round { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.avatar.sm { width: 36px; height: 36px; font-size: 14px; flex: none; }
tr.row-late td { background: color-mix(in srgb, #e11d48 6%, transparent); }
.dd-sep { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.cell-media .avatar { background: var(--brand-soft); color: var(--brand); }
.cols-eq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.cols-eq > .card { margin-bottom: 0; }
@media (max-width: 1100px) { .cols-eq { grid-template-columns: 1fr; } }
.chart-wrap { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 40px; gap: 10px; align-items: center; padding: 7px 0; color: inherit; text-decoration: none; }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }
.bar-track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.tabs a { padding: 9px 16px; font: 600 14.5px var(--font); color: var(--ink-2); border-radius: 10px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; text-decoration: none; }
.tabs a:hover { background: var(--surface-2); }
.tabs a.on { background: var(--brand-soft); color: var(--brand); }
.tabs { flex-wrap: wrap; width: auto; }
.bar-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 40px; }
.bar-row > span:first-child { overflow-wrap: anywhere; }
/* grade de cartões (Cadastros auxiliares) */
.aux-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 800px) { .aux-grid { grid-template-columns: 1fr; } }
.aux-form { margin: 0; display: contents; }
.aux-item { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 16px; background: var(--surface-2); border: 1.5px solid transparent; color: var(--ink); text-decoration: none; font: inherit; text-align: left; width: 100%; cursor: pointer; transition: border-color .15s, background .15s; }
.aux-item:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); }
.aux-item:disabled { cursor: default; color: var(--ink); }
.aux-item.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.aux-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; color: var(--brand); flex: none; box-shadow: 0 1px 2px rgba(20,24,40,.06); }
.aux-item.on .aux-ic { background: var(--brand); color: #fff; }
.aux-txt { flex: 1; min-width: 0; display: grid; gap: 3px; }
.aux-txt b { font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.aux-txt small { color: var(--ink-3); font-size: 13px; }
.aux-chev { color: var(--ink-3); flex: none; }
.aux-go { color: var(--brand); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 2px; flex: none; }
/* relatórios financeiros na tela: grade 10% mais compacta (fonte e espaçamentos) */
.tbl.rep-table { font-size: 12.2px; }
.tbl.rep-table th { font-size: 10.6px; padding: 11px 15.2px; }
.tbl.rep-table td { padding: 11px 15.2px; }
/* Configurações gerais (esquerda) + aparência (direita) */
.cfg-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.cfg-cols > form > .card:last-child, .cfg-cols > .card { margin-bottom: 0; }
@media (max-width: 1100px) { .cfg-cols { grid-template-columns: 1fr; } }
.tbl.rep-table td.primary { white-space: normal; min-width: 150px; max-width: 230px; }
.tbl.rep-table td.num, .tbl.rep-table th.num { padding-left: 9px; padding-right: 9px; white-space: nowrap; }
/* lista relacionada fechada na ficha (ex.: dízimos do membro) */
.blk-dd > summary { list-style: none; cursor: pointer; user-select: none; }
.blk-dd > summary::-webkit-details-marker { display: none; }
.blk-dd > summary h2 { display: flex; align-items: center; gap: 10px; }
.blk-dd:not([open]) > summary { border-bottom: 0; }
.blk-dd > summary:hover { background: var(--surface-2); }
.blk-sum { margin-left: auto; font-size: 14px; color: var(--ink-2); }
.blk-sum b { color: #047857; margin-left: 4px; }
.blk-tg { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; margin-left: 14px; color: var(--brand); }
.blk-tg::before { content: '+'; font-size: 20px; font-weight: 600; line-height: 1; }
.blk-dd[open] .blk-tg::before { content: '−'; }
/* listas com linhas 15% mais baixas (Cadastros auxiliares) — opção 'list_class' => 'rows-compact' do módulo */
.rows-compact .tbl td { padding-top: 8.5px; padding-bottom: 8.5px; }

/* cadastro rápido em janela */
.qa-box { background: var(--surface); border-radius: 22px; width: min(640px, 100%); box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: pop .18s ease-out; overflow: hidden; display: flex; flex-direction: column; }
.qa-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 4px 24px; }
.qa-head h3 { font-size: 19px; margin: 0; }
.qa-box iframe { border: 0; width: 100%; height: 260px; display: block; background: var(--surface); }
.popup-main { padding: 4px 24px 20px; background: var(--surface); }
.popup-main .card.form { box-shadow: none; border: 0; padding: 0; margin: 0; background: transparent; }
.popup-main .form-actions { margin-bottom: 0; }
html:has(.popup-main), body:has(.popup-main) { background: var(--surface); }

/* foto do usuário no topo e no perfil */
.avatar-img { object-fit: cover; padding: 0; background: #fff; }

/* registros por página */
.pp-sel { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; }
.pp-sel select { width: auto; min-height: 0; height: 32px; padding: 0 28px 0 10px; font-size: 13px; }
.pager > .muted, .pager > div { flex: 1; }
.pager > div { justify-content: flex-end; }
@media (max-width: 640px) { .pp-sel > span { display: none; } }

/* coluna de ações sempre visível: fica fixa à direita quando a tabela precisa rolar na horizontal */
@media (min-width: 641px) {
  .tbl th.act, .tbl td.act { position: sticky; right: 0; z-index: 1; }
  .tbl th.act { background: var(--surface-2); }
  .tbl td.act { background: var(--surface); box-shadow: -10px 0 10px -10px rgba(20, 22, 35, .18); }
  .tbl tbody tr:hover td.act { background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
}
/* ===== Clínica: agenda ===== */
.ag-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(150px, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 900px) { .ag-grid { grid-template-columns: 1fr; } }
.ag-day { margin-bottom: 0; padding-bottom: 8px; }
.ag-today { border-color: var(--brand); }
.ag-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ag-h > a:first-child { color: var(--ink); text-decoration: none; flex: 1; }
.ag-today .ag-h > a:first-child { color: var(--brand); }
.ag-empty { padding: 10px 12px; margin: 0; font-size: 13px; }
.ag-item { --c: #9ca3af; display: block; margin: 8px 8px 0; padding: 8px 10px; border-radius: 10px; border-left: 4px solid var(--c); background: var(--surface-2); color: var(--ink); text-decoration: none; }
.ag-item:hover { background: var(--brand-soft); }
.ag-item.c-blue { --c: #2563eb; } .ag-item.c-green { --c: #059669; } .ag-item.c-red { --c: #e11d48; } .ag-item.c-amber { --c: #d97706; } .ag-item.c-violet { --c: #7c3aed; } .ag-item.c-dark { --c: #1f2937; }
.ag-hora { font-weight: 700; font-variant-numeric: tabular-nums; }
.ag-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; align-items: flex-start; }
.ag-txt b { overflow-wrap: anywhere; }
.ag-txt small { color: var(--ink-3); font-size: 12px; }
.anam input[type="text"], .anam input:not([type]) { width: 100%; }
/* ficha compacta (módulo com 'view_compact'): menos altura, mais colunas */
.dl-compact > .sec { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin-top: 12px; margin-bottom: 8px; padding-top: 10px; }
.dl-compact > .sec.first { margin-top: 0; padding-top: 0; }
.dl-compact .dl { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px 22px; }
.dl-compact .dl dt { font-size: 11px; }
.dl-compact .dl dd { margin-top: 1px; font-size: 14px; }
/* análise financeira: linhas com barra proporcional (categorias, formas) */
.fin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 7px 0; }
.fin-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-row .bar-h { grid-column: 1 / -1; }
.ag-link { display: flex; gap: 10px; color: inherit; text-decoration: none; }
.ag-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ag-acts .btn { padding: 4px 8px; font-size: 12px; }
.ag-semana .ag-acts .btn span { display: none; } /* semana: colunas estreitas, só ícone (nome no title/aria-label) */
.card-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; } /* botões com texto no cabeçalho de um cartão */
.alert.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
:root[data-theme="dark"] .alert.warn { background: #2e2208; color: #fcd34d; border-color: #5b4210; }
.login-alt { text-align: center; margin: 16px 0 0; font-size: 14.5px; }
.login-alt .link { display: inline-flex; align-items: center; gap: 6px; }
.modal-ic.ok-ic { background: #dcfce7; color: #047857; }
.login-sup { color: #128c7e; font-weight: 600; } .login-sup .ic { color: #25d366; } /* suporte pelo WhatsApp na tela de entrada */
/* cartão de dados com coluna de botões à direita (módulo com 'view_side', ex.: PDFs da ficha do paciente) */
.view-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 34%); column-gap: 24px; }
.view-split > :not(.view-side) { grid-column: 1; }
.view-split > .sec { margin-right: 0; }
.view-side { grid-column: 2; grid-row: 1 / span 30; display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 8px; padding-left: 24px; border-left: 1px solid var(--line); }
.view-side .btn { justify-content: flex-start; width: 100%; min-width: 0; padding: 8px 10px; font-size: 13px; }
.view-side .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-side-t { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin-bottom: 2px; }
@media (max-width: 900px) {
  .view-split { display: block; }
  .view-side { padding: 14px 0 0; margin-top: 14px; border-left: 0; border-top: 1px solid var(--line); }
}

/* ================================================================ Lexjus */
/* listas compactas (padrão dos sistemas _novo) */
.tbl-1l th, .tbl-1l td { padding: 5px 14px; white-space: nowrap; }
.tbl-1l th { padding-top: 10px; padding-bottom: 10px; }
.tbl-1l .row-actions .btn.sm { height: 28px; padding: 0 9px; }
.tbl-1l td .badge { vertical-align: middle; }
.tbl-1l .row-actions { margin-top: 0; }
.tbl:not(.tbl-1l) td { padding-top: 9px; padding-bottom: 9px; }
.tbl tr.row-now td { background: var(--brand-soft); }
.two-l { display: flex; flex-direction: column; line-height: 1.3; padding: 4px 0; white-space: normal; }
.two-l small { color: var(--ink-3); font-weight: 400; font-size: 12.5px; }
.count-badge.nav-count { background: var(--brand-soft); color: var(--brand); }

/* indicadores */
.kpis { margin-bottom: 22px; }
.kpi { color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; box-shadow: var(--shadow); }
a.kpi:hover { border-color: color-mix(in srgb, var(--c, var(--brand)) 45%, var(--line)); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(20,24,40,.07); }
.kpi.kpi-ic { flex-direction: row; align-items: center; gap: 16px; padding: 18px 20px; }
.kpi-badge { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c, var(--brand)) 12%, var(--surface)); color: var(--c, var(--brand)); }
.kpi.kpi-ic .kpi-val { margin-top: 0; color: var(--ink); font-size: 26px; }
.kpi-lbl { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.kpi.kpi-ic .kpi-sub { font-size: 12.5px; margin-top: 2px; }
.c-gray { --c: #64748b; } .c-navy { --c: var(--brand); }
.money-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 22px; }
.money { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 3px; padding: 18px 22px; border-radius: var(--radius); color: #fff;
  background: linear-gradient(135deg, var(--c) 0%, color-mix(in srgb, var(--c) 72%, #000) 100%); box-shadow: 0 8px 24px color-mix(in srgb, var(--c) 25%, transparent); }
.money::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.08); }
.money small { font-size: 13px; opacity: .85; font-weight: 500; }
.money b { font-size: 28px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.money b.neg { color: #fecdd3; }
.money span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; opacity: .85; }
a.money:hover { filter: brightness(1.06); }
.money.c-green { --c: #0f766e; } .money.c-red { --c: #be123c; } .money.c-navy { --c: var(--brand); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 14px; }
.card-head h2 { font-size: 17px; font-weight: 700; }
.card-head .muted { margin-left: auto; font-size: 13px; }
.cols-3 > div > .card:last-child { margin-bottom: 0; }
.cols-3, .cols-2, .cols-eq { margin-bottom: 22px; }
.cols-3 > .card, .cols-2 > .card, .cols-eq > .card { margin-bottom: 0; }
.date-pill { --c: var(--brand); background: color-mix(in srgb, var(--c) 11%, var(--surface)); color: var(--c); }
.date-pill.c-blue { --c: #2563eb; } .date-pill.c-green { --c: #059669; } .date-pill.c-amber { --c: #b45309; } .date-pill.c-violet { --c: #7c3aed; }
.mini-list li { gap: 12px; padding: 10px 12px; }
.mini-list .t:hover { color: var(--brand); }
.mini-list .s { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.mini-list .s .badge { height: 20px; font-size: 11.5px; padding: 0 8px; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut { width: 150px; flex: none; }
.donut-t { font-size: 9px; fill: var(--ink-3); font-family: var(--font); }
.donut-v { font-size: 15px; font-weight: 700; fill: var(--ink); font-family: var(--font); }
.donut-leg { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 190px; display: grid; gap: 7px; }
.donut-leg li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 36px; gap: 8px; align-items: center; font-size: 13px; }
.donut-leg i { width: 10px; height: 10px; border-radius: 3px; }
.donut-leg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.donut-leg b { font-variant-numeric: tabular-nums; }
.donut-leg small { color: var(--ink-3); text-align: right; }
.prog-in { display: inline-flex; align-items: center; gap: 8px; }
.prog-in .bar-h { width: 70px; height: 8px; }
.bar-h > i { background: var(--pos); }

/* agenda */
.cal-top { display: flex; align-items: center; gap: 4px; min-height: 28px; }
.cal-fer { flex: 1; min-width: 0; font-size: 10.5px; font-weight: 600; color: var(--neg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-add { margin-left: auto; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--brand); opacity: 0; transition: opacity .12s; }
.cal-d:hover .cal-add, .cal-add:focus-visible { opacity: 1; background: var(--brand-soft); }
.cal-d.off { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.cal-d.out > * { opacity: .5; }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--brand); }
.ev { --ec: var(--brand); display: flex; align-items: center; gap: 2px; padding: 2px 2px 2px 7px; border-radius: 7px; border-left: 3px solid var(--ec); background: color-mix(in srgb, var(--ec) 11%, var(--surface)); color: color-mix(in srgb, var(--ec) 78%, var(--ink)); }
.ev:hover { background: color-mix(in srgb, var(--ec) 18%, var(--surface)); color: color-mix(in srgb, var(--ec) 78%, var(--ink)); }
.ev a { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; font-weight: 600; line-height: 20px; }
.ev-blue { --ec: #2563eb; } .ev-green { --ec: #059669; } .ev-amber { --ec: #d97706; } .ev-violet { --ec: #7c3aed; } .ev-red { --ec: #e11d48; }
.ev.done a { text-decoration: line-through; opacity: .6; }
.ev-ok { margin: 0; flex: none; }
.ev-ok button { border: 0; background: transparent; width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; cursor: pointer; color: inherit; opacity: .4; padding: 0; }
.ev-ok button:hover { opacity: 1; background: var(--surface); }
.ev.done .ev-ok button { opacity: 1; color: var(--pos); }
.cal-leg { flex-wrap: wrap; }
.cal-leg i { width: 12px; height: 12px; border-radius: 3px; }
.lg-blue { background: #2563eb; } .lg-green { background: #059669; } .lg-amber { background: #d97706; } .lg-violet { background: #7c3aed; } .lg-done { background: var(--line-2); }
.chips-mes { display: flex; flex-wrap: wrap; gap: 6px; }
.alert.info:has(.chips-mes) > .ic { display: none; }

/* calculadora de prazos */
.prazo-res .muted { margin: 0; }
.prazo-data { font: 700 46px/1.1 var(--serif); color: var(--brand); margin: 6px 0 6px; letter-spacing: -.01em; }
.prazo-res .btn.block { margin-top: 18px; }
.prazo-res .sec { margin: 20px -24px 10px; font-size: 14px; }
.pulos { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.pulos li { display: flex; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.pulos b { width: 46px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* relatórios e ajuda */
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.rel-card { --c: var(--brand); display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 14px; align-content: start; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: var(--radius-md); box-shadow: var(--shadow); color: var(--ink); transition: transform .15s, box-shadow .15s; }
a.rel-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(20,24,40,.09); }
.rel-ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--c); }
.rel-txt b { display: block; font-size: 16.5px; margin-top: 2px; }
.rel-txt small { display: block; color: var(--ink-3); font-size: 13.5px; margin-top: 3px; line-height: 1.45; }
.rel-go { grid-column: 1 / -1; display: flex; align-items: center; gap: 4px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--c); font-weight: 600; font-size: 14px; }
.rel-card.c-blue { --c: #1d4ed8; } .rel-card.c-red { --c: #be123c; } .rel-card.c-violet { --c: #7c3aed; } .rel-card.c-amber { --c: #b45309; } .rel-card.c-green { --c: #047857; }
.static-card .rel-txt small { font-size: 14px; color: var(--ink-2); }

/* entrada */
.login-art { background: radial-gradient(700px 420px at 100% 0%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 60%), radial-gradient(900px 500px at 0% 100%, rgba(255,255,255,.10), transparent 60%), linear-gradient(160deg, color-mix(in srgb, var(--nav) 88%, #fff), var(--nav) 45%, color-mix(in srgb, var(--nav) 75%, #000)); }
.login-art .brand-mark.lg { width: 66px; height: 66px; border-radius: 18px; }
.login-art h2 { font: 700 48px/1.05 var(--serif); margin: 26px 0 6px; letter-spacing: -.01em; }
.login-art p.login-tag { font: 600 21px var(--serif); color: var(--gold); opacity: 1; }
.login-feats { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; font-size: 15.5px; }
.login-feats li { display: flex; gap: 12px; align-items: center; opacity: .9; }
.login-feats .ic { color: var(--gold); }
.login-form { border-radius: 20px; }
.login-form h1 { font-family: var(--serif); font-size: 28px; }

@media (max-width: 1100px) { .cols-eq { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .ev { padding: 0; height: 6px; border: 0; background: var(--ec); }
  .ev a, .ev-ok, .cal-fer { display: none; }
  .money b { font-size: 24px; }
  .prazo-data { font-size: 38px; }
}
.btn.edit:hover { background: color-mix(in srgb, #2563eb 10%, transparent); color: #2563eb; }
.cols-3 { align-items: start; }
.card-h .link { white-space: nowrap; }
.tbl td.num .two-l { align-items: flex-end; gap: 2px; }
.tbl td.num .two-l .badge { height: 20px; font-size: 11px; padding: 0 7px; }
.tbl-1l td.primary .two-l b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.tbl td.num .two-l b { white-space: nowrap; }
.cal-d.off:not(.out) { background: color-mix(in srgb, var(--brand) 3%, var(--surface-2)); }
.tbl-1l td:not(.act):not(.num):not(.primary) { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.blk-sum { display: inline-flex; flex-wrap: wrap; gap: 4px 18px; justify-content: flex-end; }
.blk-sum .t-ok b, div.tot .t-ok b { color: #047857; }
.blk-sum .t-open b, div.tot .t-open b { color: #be123c; }
.aud td { vertical-align: top; }
.aud-ip { display: block; font-size: 11.5px; font-weight: 400; }
.aud-det { font-size: 13px; min-width: 320px; white-space: normal; }
.aud-det > div, .aud-det details > div { padding: 1px 0; overflow-wrap: anywhere; }
.aud-old { color: var(--ink-3); text-decoration: line-through; }
.aud-det summary { cursor: pointer; font-size: 12.5px; margin-top: 2px; }
.resc { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.resc .grid > .sec { grid-column: 1 / -1; margin: 10px -24px 0; padding: 16px 24px 0; font-size: 15px; }
.resc-res .sec { margin: 18px -24px 8px; font-size: 14px; }
.resc-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.resc-l li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.resc-l li:last-child { border-bottom: 0; }
.resc-l small { display: block; color: var(--ink-3); font-size: 12px; }
.resc-l b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pos-l b { color: #047857; } .neg-l b { color: #be123c; }
@media (max-width: 1150px) { .resc { grid-template-columns: 1fr; } }

/* ================================================================ Lexjus v2: etiquetas, Kanban, publicações, aprovações */
.etqs { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.etqs .badge { height: 19px; font-size: 11px; padding: 0 7px; }
.etq-top { margin: -8px 0 16px; }
.etq-top .badge { height: 26px; font-size: 13px; }

.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.kb-col { background: color-mix(in srgb, var(--surface-2) 70%, var(--bg)); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 240px; transition: border-color .15s, background .15s; }
.kb-col.over { border-color: var(--brand); background: var(--brand-soft); }
.kb-h { display: flex; align-items: center; gap: 8px; padding: 4px 4px 12px; }
.kb-h b { font-size: 15px; }
.kb-h .icon-btn { margin-left: auto; }
.kb-A .kb-h b::before, .kb-E .kb-h b::before, .kb-C .kb-h b::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: #94a3b8; }
.kb-E .kb-h b::before { background: #2563eb; } .kb-C .kb-h b::before { background: #059669; }
.kb-list { display: grid; gap: 10px; min-height: 60px; }
.kb-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid #94a3b8; border-radius: 12px; padding: 12px 12px 10px; box-shadow: var(--shadow); display: grid; gap: 6px; }
.kb-card[draggable="true"] { cursor: grab; }
.kb-card.dragging { opacity: .45; outline: 2px dashed var(--brand); }
.kb-card.pr-A { border-left-color: #e11d48; } .kb-card.pr-M { border-left-color: #d97706; }
.kb-t { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.kb-t:hover { color: var(--brand); }
.kb-C .kb-t { text-decoration: line-through; color: var(--ink-3); }
.kb-s { color: var(--ink-3); font-size: 12.5px; }
.kb-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kb-meta .badge { height: 21px; font-size: 11.5px; padding: 0 8px; }
.kb-meta .avatar.sm { width: 26px; height: 26px; font-size: 12px; }
.kb-mv { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; margin: 0; opacity: 0; transition: opacity .12s; }
.kb-card:hover .kb-mv, .kb-mv:focus-within { opacity: 1; }
.kb-mv button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.kb-mv button:hover { border-color: var(--brand); color: var(--brand); }
.kb-empty { text-align: center; font-size: 13px; padding: 18px 0; margin: 0; }
@media (max-width: 900px) { .kanban { grid-template-columns: 1fr; } .kb-mv { opacity: 1; } }

.menu-link .menu-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--gold); color: #1f2937; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }

.pub-card { padding: 0; overflow: hidden; }
.pub-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.pub-h b { font-size: 15px; }
.pub-h .muted { font-size: 13px; }
.pub-body { padding: 16px 20px; font-size: 14px; line-height: 1.55; max-height: 220px; overflow: auto; }
.pub-body.full { max-height: none; }
.pub-body table { border-collapse: collapse; }
.pub-body td { padding: 0 6px 0 0; vertical-align: top; }
.pub-acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); align-items: center; }
.pub-acts form { margin: 0; display: inline-flex; gap: 6px; align-items: center; }
.pub-acts input[type=text] { height: 34px; width: 260px; font-size: 13.5px; }
.apr-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.apr-item:last-child { border-bottom: 0; }
.apr-item .grow { min-width: 220px; }
.apr-item form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.apr-item input[type=text] { height: 34px; width: 220px; font-size: 13.5px; }
.tbl-1l td:not(.primary) .two-l { min-width: 170px; }
.tbl-1l td .two-l small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.toast.fixo { background: #fffbeb; color: #78350f; border: 1px solid #f59e0b; box-shadow: 0 12px 34px rgba(0,0,0,.18); align-items: flex-start; }
.toast.fixo .ic { color: #d97706; }
.toast-x { margin-left: 6px; flex: none; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.toast-x:hover { background: rgba(0,0,0,.08); }
.pub-busca-t { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.pub-busca-t .ic { color: var(--brand); }
a.rel-card .rel-txt small { color: var(--ink-2); font-size: 14px; }
.demo-box { width: min(500px, 100%); }
.demo-box p { margin-bottom: 12px; line-height: 1.55; color: var(--ink-2); }
.demo-box .demo-obs { font-size: 13px; background: var(--brand-soft); border-radius: 12px; padding: 10px 12px; margin-bottom: 20px; }
.modal-actions.one { grid-template-columns: 1fr; }
.lic-suporte { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; } /* contato do suporte na tela de Licença */
.lic-suporte h3 { margin: 0; font-size: 14px; color: var(--ink-2); }
.lic-suporte a { display: inline-flex; align-items: center; gap: 8px; width: fit-content; font-weight: 600; text-decoration: none; }
.lic-suporte a:hover span { text-decoration: underline; }
/* situação da licença: verde licenciado, azul no teste de 30 dias (amarelo = .alert.warn) */
.alert.ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert.azul { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; --lic-cor: #1d4ed8; }
.alert.warn { --lic-cor: #92400e; }
.lic-aviso { width: 33.333%; margin-left: auto; margin-top: -18px; padding: 7.5px 14px; align-items: center; } /* aviso do topo: um terço da tela, à direita, 25% mais baixo, a 10px da barra do topo */
@media (max-width: 1100px) { .lic-aviso { width: 100%; } }
.lic-ativar { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 2px 8px; margin-left: 2px; border-radius: 7px; white-space: nowrap; transition: background .15s, color .15s; }
.lic-ativar:hover, .lic-ativar:focus-visible { background: var(--lic-cor, currentColor); color: #fff; text-decoration: none; }
/* cadastro de escritório (cadastro.php) */
.end-acesso { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.end-acesso:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.end-prefixo { display: flex; align-items: center; padding: 0 4px 0 12px; background: var(--surface-2); color: var(--ink-3); font-size: 13px; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; direction: rtl; }
.end-acesso input { border: 0 !important; box-shadow: none !important; min-width: 0; flex: 1; }
.help.cod-ok { color: var(--pos); font-weight: 600; } .help.cod-erro { color: var(--neg); }
.end-escritorio { font-weight: 700; word-break: break-all; background: var(--brand-soft); padding: 12px 14px; border-radius: 12px; margin: 0; }
.codigo-6 { font: 700 26px/1 ui-monospace, Consolas, monospace; letter-spacing: 10px; text-align: center; }
.cad-reenviar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.hp { position: absolute; left: -9999px; }
