/*
 * Pixel Jury — o painel do escritório e a tela de entrada.
 *
 * Na família do Pixel Food, do Pixel Barber e do Tribus: cartão branco sobre o
 * fundo do escritório, trilha funda de ícones, item ativo na cor de ação da
 * casa com letra branca. A tela que abre de manhã é a caixa de intimações
 * (escolha 1 A, do Kayo, em 20/10/2026) e a ficha do processo é a linha do
 * tempo (escolha 2 A) — as duas desenhadas na proposta.
 *
 * A marca do Pixel Jury (o laranja da Pixel Tech) aparece só na entrada, onde
 * ainda não se sabe de que escritório é a pessoa. Os tons --pj-* são os mesmos
 * do public/brand/theme.json, e o teste do tema confere (tests/theme.test.ts).
 *
 * Vermelho, verde e âmbar são estado: vence hoje, deu certo, esperando. Cheios,
 * com letra branca; nunca viram cor de escritório. Nada tem cara de navegador:
 * confirmação, lista, calendário, sugestões, área de soltar o arquivo e olho
 * da senha são do produto (panel.js).
 */

@font-face { font-family: "Manrope"; src: url("fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  /* A marca do Pixel Jury (theme.json): o laranja da Pixel Tech. */
  --pj-orange: #fc7a00;
  /* Letra branca no laranja, sempre (pedido do Kayo, 19/10/2026). */
  --pj-on-orange: #ffffff;
  --pj-ink: #1b2230;
  --pj-soft: #5d6676;
  --pj-subtle: #f2f3f5;
  --pj-card: #ffffff;

  /* Estado. */
  --ok: #2b8a3e;
  --bad: #e03131;
  --bad-deep: #c92a2a;
  --bill: #b86400;

  /* Neutros do painel. */
  --ink: #1d2739;
  --soft: #6d7789;
  --line: #e9edf2;
  --sunken: #f4f6f9;
  --side: #f6f7f8;
  --card: #ffffff;

  /* Sem escritório (entrada), a paleta Bordô. */
  --t-primary: #6e2638; --t-deep: #2b1a21; --t-action: #8f2f46; --t-hi: #d8b26a; --t-hi-ink: #2b1d00;
  --t-bg: #ffffff; --t-sand: #f6f1ef; --t-ink: #1d1a1c; --t-soft: #6b5f63; --t-line: #ece3e3; --t-panel: #e7e3e1;
  --t-tint: #f8eef0; --t-logo-bg: #d8b26a; --t-logo-fg: #2b1a21;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: "Manrope", "Segoe UI", system-ui, sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--t-action); outline-offset: 2px; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tnum { font-variant-numeric: tabular-nums; }

/* Aviso cheio, letra branca. */
.notice { border-radius: 12px; padding: 11px 14px; font-size: 13.5px; font-weight: 700; color: #fff; }
.notice-ok { background: var(--ok); }
.notice-error { background: var(--bad); }

/* ------------------------------------------------------------ entrada */

.e-page { min-height: 100vh; background: #e8eaed; display: grid; place-items: center; padding: 24px 16px; }
/* O fundo branco é do lado do formulário, e não da moldura, para não vazar no
   canto da arte escura. */
.e-frame { width: min(980px, 100%); min-height: 600px; background: transparent; border-radius: 30px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; box-shadow: 0 1px 2px rgb(22 32 50 / 5%), 0 18px 50px rgb(22 32 50 / 12%); }
.e-side { padding: 44px 48px; display: flex; flex-direction: column; gap: 16px; background: var(--pj-card); }
.e-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: var(--pj-ink); }
.e-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--pj-orange); display: grid; place-items: center; }
.e-mark svg { width: 24px; height: 24px; fill: #fff; }
.e-title { font-size: 30px; line-height: 1.12; font-weight: 500; color: var(--pj-ink); margin-top: 28px; text-wrap: balance; }
.e-title b { font-weight: 800; }
.e-lead { color: var(--pj-soft); font-size: 15px; line-height: 1.5; }
.e-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.e-button { display: block; width: 100%; text-align: center; text-decoration: none; border: 0; border-radius: 14px; padding: 14px 18px; font-weight: 800; font-size: 15px; background: var(--pj-orange); color: var(--pj-on-orange); margin-top: 4px; }
.e-button.e-flat { background: var(--pj-subtle); color: var(--pj-ink); }
.e-side form + form, .e-side a + form { margin-top: 0; }
.e-foot { margin-top: auto; padding-top: 24px; font-size: 12.5px; color: var(--pj-soft); line-height: 1.6; }
.e-foot b { color: var(--pj-ink); }
.e-art { position: relative; background: #1b1f24; overflow: hidden; }
.e-p { position: absolute; width: 520px; height: 470px; right: -120px; bottom: -80px; fill: var(--pj-orange); opacity: .95; }
.e-card { position: absolute; background: #fff; border-radius: 18px; padding: 14px 16px; width: 260px; box-shadow: 0 18px 40px rgb(0 0 0 / .3); display: flex; flex-direction: column; gap: 4px; }
.e-card small { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #c55a00; }
.e-card b { font-size: 14.5px; line-height: 1.35; color: var(--pj-ink); }
.e-card-1 { left: 36px; top: 54px; }
.e-card-2 { left: 70px; top: 170px; }
.e-card-3 { left: 30px; top: 286px; }
@media (max-width: 820px) {
  .e-frame { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .e-art { display: none; }
  .e-side { padding: 32px 24px; }
}

/* O rótulo mora dentro do campo e sobe quando se digita. */
.field-float { position: relative; }
.field-float input { width: 100%; height: 58px; border: 1.5px solid #dfe3e9; border-radius: 14px; padding: 22px 16px 6px; font-size: 15.5px; background: #fff; outline: 0; }
.field-float input:focus { border-color: var(--pj-orange); }
.field-float label { position: absolute; left: 17px; top: 19px; font-size: 15px; color: var(--pj-soft); pointer-events: none; transition: top .12s ease, font-size .12s ease; }
.field-float input:focus + label, .field-float input:not(:placeholder-shown) + label { top: 8px; font-size: 11.5px; font-weight: 700; }
.field-float .eye { position: absolute; right: 8px; top: 9px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--pj-soft); display: grid; place-items: center; }
.field-float input[type="password"]::-ms-reveal { display: none; }
.field-hint { font-size: 12.5px; color: var(--soft); }
.field-hint a { font-weight: 700; }
.field-error { font-size: 12.5px; color: var(--bad); font-weight: 700; }

/* ------------------------------------------------------------- painel */

.p-page { background: var(--t-panel); min-height: 100vh; }
.p { padding: 14px; height: 100vh; display: flex; }
/* O cartão não pinta fundo: cada parte pinta o seu. Branco atrás da trilha escura
   vazava no canto arredondado como um fio claro (visto no programa de mesa). */
.p-card { flex: 1; min-width: 0; background: transparent; border-radius: 26px; display: flex; overflow: hidden; position: relative; box-shadow: 0 1px 2px rgb(22 32 50 / 5%), 0 10px 30px rgb(22 32 50 / 7%); }
.p-rail { width: 92px; background: var(--t-deep); color: rgb(255 255 255 / .74); display: flex; flex-direction: column; align-items: center; padding: 16px 0; gap: 3px; flex: none; overflow-y: auto; scrollbar-width: none; }
.p-rail::-webkit-scrollbar { display: none; }
.logo { width: 48px; height: 48px; border-radius: 50%; background: var(--t-logo-bg); color: var(--t-logo-fg); display: grid; place-items: center; flex: none; overflow: hidden; }
.logo b { font: 900 15px/1 "Figtree", sans-serif; letter-spacing: .02em; }
.logo.has-img { background: #fff; }
.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-rail > .logo { margin-bottom: 12px; box-shadow: 0 0 0 3px rgb(255 255 255 / .14); }
.p-nav { border: 0; background: transparent; color: inherit; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 700 10.5px "Manrope", sans-serif; padding: 9px 2px; width: 76px; border-radius: 15px; position: relative; flex: none; text-align: center; }
.p-nav:hover { color: #fff; background: rgb(255 255 255 / .08); }
.p-nav.on { background: var(--t-action); color: #fff; }
/* No item selecionado o aviso inverte: bola branca, número na cor da casa. */
.p-nav.on .count { background: #fff; color: var(--t-action); }
.p-nav .count { position: absolute; top: 4px; right: 10px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--bad); color: #fff; font: 800 10.5px/18px "Manrope", sans-serif; padding: 0 5px; }
.p-rail .spacer { flex: 1; min-height: 8px; }
.p-out { margin: 0; }
.p-made { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 700 9px "Manrope", sans-serif; color: rgb(255 255 255 / .55); letter-spacing: .04em; margin-top: 6px; }
.p-made svg { width: 18px; height: 18px; fill: var(--pj-orange); }
.p-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--card); }
/* A aba no meio da borda da trilha, na cor do próprio menu (o jeito que o Kayo
   escolheu no Pixel Food): recolhe o menu para só os ícones e expande de volta.
   Com mouse, só aparece com ele em cima; em tela de toque fica sempre. */
.p-rail-toggle { position: absolute; top: 50%; left: 92px; z-index: 5; transform: translateY(-50%); width: 14px; height: 44px; padding: 0; border: 0; border-radius: 0 9px 9px 0; background: var(--t-deep); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: left .32s cubic-bezier(.4, 0, .2, 1), transform .2s ease, opacity .2s ease, background-color .15s; }
.p-rail-toggle:hover { background: var(--t-primary); }
.p-rail-toggle svg.i { width: 14px; height: 14px; stroke-width: 2.6; transform: rotate(-90deg); }
@media (hover: hover) {
  .p-rail-toggle { opacity: 0; transform: translate(-6px, -50%); }
  .p-rail:hover ~ .p-rail-toggle, .p-rail-toggle:hover, .p-rail-toggle:focus-visible { opacity: 1; transform: translateY(-50%); }
}
.p-rail, .p-nav, .p-rail > .logo, .p-rail-toggle svg.i, .p-nav .count { transition: width .32s cubic-bezier(.4, 0, .2, 1), height .32s cubic-bezier(.4, 0, .2, 1), gap .32s cubic-bezier(.4, 0, .2, 1), left .32s cubic-bezier(.4, 0, .2, 1), right .32s cubic-bezier(.4, 0, .2, 1), transform .32s cubic-bezier(.4, 0, .2, 1), background-color .15s; }
.p-nav .lbl, .p-made .lbl { display: block; max-width: 100%; max-height: 16px; overflow: hidden; white-space: nowrap; transition: opacity .2s ease .14s, max-height .32s cubic-bezier(.4, 0, .2, 1); }
@media (min-width: 861px) {
  .rail-closed .p-rail { width: 64px; }
  .rail-closed .p-nav { width: 48px; gap: 0; }
  .rail-closed .p-nav .lbl, .rail-closed .p-made .lbl { opacity: 0; max-height: 0; transition: opacity .12s ease, max-height .32s cubic-bezier(.4, 0, .2, 1); }
  .rail-closed .p-nav .count { right: 1px; top: 1px; }
  .rail-closed .p-rail > .logo { width: 40px; height: 40px; }
  .rail-closed .p-rail-toggle { left: 64px; }
  .rail-closed .p-rail-toggle svg.i { transform: rotate(90deg); }
}
.p-band { background: var(--bill); color: #fff; font-weight: 700; font-size: 13.5px; padding: 10px 22px; }
.p-band a { color: #fff; font-weight: 800; }
.p-head { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; flex: none; }
.p-head-title { min-width: 0; }
.p-head h1 { font-size: 20px; font-weight: 800; }
.p-head p { font-size: 12.5px; color: var(--soft); margin-top: 2px; }
.p-head form { margin: 0; }
.p-head .stats { display: flex; gap: 8px; margin-left: auto; }
.p-head .stats + form, .p-head .stats + .btn-act { margin-left: 0; }
.p-head .day-nav { margin-left: auto; }
.p-user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.p-head .stats ~ .p-user, .p-head .btn-act ~ .p-user, .p-head .p-btn ~ .p-user, .p-head form ~ .p-user { margin-left: 4px; }
.p-user small { display: block; font-weight: 500; color: var(--soft); font-size: 11.5px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--t-deep); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; flex: none; }
.p-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; position: relative; }
.p-body > .notice { margin: 14px 22px 0; }
.p-body.flush { display: flex; flex-direction: column; }
.p-body.flush > .p-region { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.p-body.flush > .notice { margin: 10px 22px; }
.p-pad { padding: 16px 22px 26px; display: flex; flex-direction: column; gap: 14px; }

.stats .st { background: var(--sunken); border-radius: 12px; padding: 5px 11px; }
.stats .st span { display: block; font-size: 10.5px; font-weight: 600; color: var(--soft); white-space: nowrap; }
.stats .st b { font-size: 14.5px; font-weight: 800; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; }
.stats .st b svg.i { width: 16px; height: 16px; }
.stats .st.red { background: var(--bad); color: #fff; }
.stats .st.red span { color: #fff; }

/* Botões */
.p-btn { border: 0; border-radius: 10px; padding: 8px 12px; font: 800 12.5px "Manrope", sans-serif; background: var(--t-primary); color: #fff; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.p-btn svg.i { width: 16px; height: 16px; }
.p-btn.ghost { background: var(--sunken); color: var(--ink); }
.p-btn.big { padding: 11px 16px; font-size: 13.5px; border-radius: 12px; }
.p-btn.danger { background: var(--bad); color: #fff; }
.p-btn.danger-text { color: var(--bad-deep); }
.p-btn.act, .btn-act { background: var(--t-action); color: #fff; }
.p-btn:disabled { opacity: .6; cursor: default; }
.btn-act { border: 0; border-radius: 11px; padding: 9px 13px; font: 800 12.5px "Manrope", sans-serif; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none; cursor: pointer; }
.btn-act svg.i { width: 16px; height: 16px; stroke-width: 2.4; }
.b-sm { border: 0; border-radius: 9px; padding: 6px 10px; font: 800 12px "Manrope", sans-serif; background: var(--sunken); color: var(--ink); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; cursor: pointer; }
.b-sm svg.i { width: 14px; height: 14px; }
.b-sm.go { background: var(--t-primary); color: #fff; }
.b-sm.act { background: var(--t-action); color: #fff; }
.b-sm:disabled { opacity: .6; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--sunken); color: var(--ink); display: inline-grid; place-items: center; text-decoration: none; flex: none; }
.icon-btn svg.i { width: 17px; height: 17px; }
.today-btn { padding: 0 12px; height: 34px; border-radius: 10px; background: var(--sunken); font: 800 12.5px "Manrope", sans-serif; display: flex; align-items: center; text-decoration: none; color: var(--ink); }

.p-title { font-size: 14px; font-weight: 800; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.p-title small { font-size: 11.5px; font-weight: 600; color: var(--soft); }
.p-title small a { font-weight: 800; color: var(--t-action); text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.p-title small a svg.i { width: 13px; height: 13px; }
.p-soft { color: var(--soft); font-size: 12.5px; }
.p-note { background: var(--sunken); border-radius: 14px; padding: 11px 14px; font-size: 13px; line-height: 1.5; color: #3b4556; display: flex; gap: 8px; align-items: flex-start; }
.p-note svg.i { width: 17px; height: 17px; color: var(--bill); margin-top: 1px; }
.p-note a { font-weight: 800; }
.p-empty { background: #fff; border: 1px dashed #d8dee6; border-radius: 16px; padding: 16px; text-align: center; font-size: 13px; color: var(--soft); font-weight: 600; }
.p-empty a { font-weight: 800; color: var(--t-action); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; border-radius: 6px; padding: 2px 7px; background: var(--t-primary); color: #fff; vertical-align: 2px; margin-left: 4px; }
.pill.soft { background: var(--sunken); color: var(--soft); }
.pill.wait { background: var(--bill); color: #fff; }
.pill.done, .pill.ok { background: var(--ok); color: #fff; }
.pill.bad { background: var(--bad); color: #fff; }
.p-box { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.p-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.p-two.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.p-col-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.p-created { background: var(--ok); color: #fff; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.p-created code { background: #fff; color: var(--ink); border-radius: 8px; padding: 3px 8px; font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.p-created .p-btn { vertical-align: middle; }
.copy-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-line input { flex: 1 1 260px; width: auto; background: var(--sunken); border: 1.5px solid #dfe3e9; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; outline: 0; }
.p-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #ffd8d8; background: #fff8f8; border-radius: 16px; padding: 14px 16px; margin: 6px 0 0; }
.p-danger-zone.flat { margin: 0; }
.p-danger-zone b { display: block; font-size: 13.5px; }
.p-danger-zone span { font-size: 12.5px; color: var(--soft); }
.fd-h { font: 800 11.5px "Manrope", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.fd-h small { letter-spacing: 0; text-transform: none; font-weight: 700; font-size: 12px; background: var(--sunken); border-radius: 8px; padding: 1px 7px; }
.fd-h .chips { margin-left: auto; letter-spacing: 0; text-transform: none; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 600; color: var(--soft); text-decoration: none; }
.kv b { color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; display: inline-flex; align-items: center; gap: 4px; }
.kv b svg.i { width: 14px; height: 14px; color: var(--soft); }
.kv.link:hover b { color: var(--t-action); }
.bar { height: 8px; border-radius: 99px; background: #eef1f5; overflow: hidden; display: block; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--ok); }
.bar-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 12px; font-weight: 700; color: var(--soft); }
.bar-row > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row > span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.bar-row .bar i { background: var(--t-primary); }
.p-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.kpi span { display: block; font-size: 12px; font-weight: 600; color: var(--soft); }
.kpi b { display: block; font-size: 22px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 12px; color: var(--soft); font-weight: 600; }
.kpi.red { background: var(--bad); border-color: var(--bad); color: #fff; }
.kpi.red span, .kpi.red small { color: #fff; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; font: 700 12.5px "Manrope", sans-serif; text-decoration: none; color: var(--ink); background: #fff; }
.chip.plain { padding: 6px 13px; }
.chip.on { background: var(--t-primary); border-color: var(--t-primary); color: #fff; }
.mg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gs { display: grid; grid-template-columns: 40px minmax(0, 1.4fr) 90px 90px 90px; gap: 14px; align-items: center; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 4px; font-size: 13px; }
.gs.head { border: 0; padding-block: 0; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.gs b { font-size: 13.5px; }
.gs .avatar { width: 34px; height: 34px; background: var(--t-sand); color: var(--t-deep); font-size: 11.5px; }
.gs > span:not(.avatar) { font-variant-numeric: tabular-nums; font-weight: 700; }

/* Cadastros em linha */
.mi { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px 12px 8px 8px; }
.mi-ph { width: 48px; height: 48px; border-radius: 12px; background: var(--t-sand); display: grid; place-items: center; color: var(--t-primary); font: 800 14px "Manrope", sans-serif; }
.mi-text { min-width: 0; }
.mi-text b { font-size: 14px; display: block; }
.mi-text > span { font-size: 12px; color: var(--soft); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi.archived { background: var(--sunken); }
.mi-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.mi-actions form { margin: 0; }
.avatar-ph { border-radius: 50%; background: var(--t-sand); color: var(--t-deep); }
.out-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; font-size: 13px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.out-row:last-of-type { border-bottom: 0; }
.out-row form { margin: 0; }
.out-row small { display: block; color: var(--soft); font-size: 12px; font-weight: 600; margin-top: 1px; }
.out-row .money { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.out-row .money small { text-align: right; }
.out-row .money.late { color: var(--bad-deep); }
a.out-row:hover b { color: var(--t-action); }

/* Formulários */
.p-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field-label-static { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.field input, .field textarea, .field select, .p-inline input, .p-inline select, .p-search input, .notify textarea {
  width: 100%; border: 1.5px solid #dfe3e9; border-radius: 12px; padding: 10px 12px; font-size: 14px; background: #fff; outline: 0;
}
.field input:focus, .field textarea:focus, .p-inline input:focus, .p-search input:focus, .notify textarea:focus { border-color: var(--t-primary); }
.field textarea, .notify textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-actions form { margin: 0; }
.form-actions.sticky { position: sticky; bottom: 0; background: #fff; padding: 12px 0; border-top: 1px solid var(--line); }
.p-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--sunken); border-radius: 16px; padding: 10px; margin: 0; }
.p-inline input, .p-inline select { flex: 1 1 140px; width: auto; padding: 9px 12px; font-size: 13.5px; }
.p-inline .sel { flex: 0 1 190px; }
.p-search { margin: 0; flex: 1 1 320px; }
.p-search label { display: flex; align-items: center; gap: 8px; max-width: 440px; border: 1.5px solid #dfe3e9; border-radius: 12px; padding: 0 12px; background: #fff; color: var(--soft); }
.p-search input { border: 0; padding: 10px 0; }
.p-search input::-webkit-search-cancel-button { display: none; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; }
.check-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; position: relative; font-size: 12.5px; color: var(--soft); cursor: pointer; }
.check-row b { display: block; color: var(--ink); font-size: 13px; }
.check-row input { position: absolute; left: 0; top: 0; width: 22px; height: 22px; opacity: 0; margin: 0; cursor: pointer; }
.check-row i { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #d5dbe4; display: grid; place-items: center; color: #fff; }
.check-row i svg { width: 14px; height: 14px; stroke-width: 3; opacity: 0; }
.check-row input:checked + i { background: var(--t-primary); border-color: var(--t-primary); }
.check-row input:checked + i svg { opacity: 1; }
.check-row input:focus-visible + i { outline: 3px solid var(--t-action); outline-offset: 2px; }
.check-row.slim { align-items: center; margin-top: 4px; }

/* Área de soltar o arquivo: o campo de arquivo de verdade fica por cima,
   transparente, e é ele que o formulário envia. */
.drop { position: relative; display: flex; align-items: center; gap: 14px; border: 2px dashed #d5dbe4; border-radius: 16px; padding: 14px; background: #fafbfc; cursor: pointer; min-height: 72px; }
.drop.over { border-color: var(--t-primary); background: #f3f6f9; }
.drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop-current { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.drop-current.round { border-radius: 50%; }
.drop-text { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--soft); }
.drop-text b { color: var(--ink); font-size: 14px; }
.drop-text svg.i { color: var(--t-primary); }
.drop .logo { width: 56px; height: 56px; }

/* Escolher a cara do escritório */
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick-card { display: flex; flex-direction: column; gap: 8px; border: 2px solid var(--line); border-radius: 16px; padding: 12px; height: 100%; background: #fff; }
.pick input:checked + .pick-card { border-color: var(--t-action); box-shadow: 0 0 0 2px var(--t-action) inset; }
.pick input:focus-visible + .pick-card { outline: 3px solid var(--t-action); outline-offset: 2px; }
.pick-card b { font-size: 13px; }
.swatches { display: flex; gap: 4px; }
.swatches i { width: 24px; height: 24px; border-radius: 8px; display: block; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06); }
.pick-button { color: #fff; font-weight: 800; font-size: 12px; border-radius: 9px; padding: 7px 10px; text-align: center; }

/* Lista que substitui a do <select> (panel.js). */
.sel { position: relative; }
.sel-button { width: 100%; text-align: left; border: 1.5px solid #dfe3e9; border-radius: 12px; padding: 10px 36px 10px 12px; font-size: 14px; background: #fff; position: relative; min-height: 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-inline .sel-button { padding: 9px 34px 9px 12px; font-size: 13.5px; min-height: 0; }
.sel-button::after { content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--soft); border-bottom: 2px solid var(--soft); transform: rotate(45deg); }
/* As caixas que abrem por cima (lista, sugestões, calendário) ficam em 200: acima
   da caixa de confirmação (100), abaixo da dica (300). */
.sel-list, .sug-list { position: fixed; z-index: 200; background: #fff; border: 1px solid #dfe3e9; border-radius: 12px; box-shadow: 0 14px 34px rgb(20 26 36 / .18); padding: 5px; max-height: 280px; overflow-y: auto; }
.sel-list button, .sug-list button { display: block; width: 100%; text-align: left; border: 0; background: none; border-radius: 8px; padding: 9px 11px; font-size: 14px; }
.sel-list button:hover, .sug-list button:hover { background: var(--sunken); }
.sel-list button[aria-selected="true"] { font-weight: 800; color: var(--t-primary); }

/* Confirmação do produto (nunca o confirm do navegador). */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgb(20 26 36 / .45); display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 20px; padding: 22px; max-width: 420px; width: 100%; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 50px rgb(0 0 0 / .25); }
.modal p { font-size: 15px; line-height: 1.5; font-weight: 600; }
.modal div { display: flex; gap: 10px; justify-content: flex-end; }

/* O calendário do produto, no lugar do do navegador (panel.js). */
.date-wrap { position: relative; }
.date-wrap input { padding-right: 42px; }
.date-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--soft); display: grid; place-items: center; }
.date-btn svg.i { width: 18px; height: 18px; }
.cal-pop { position: fixed; z-index: 200; width: 292px; background: #fff; border: 1px solid #dfe3e9; border-radius: 16px; box-shadow: 0 14px 34px rgb(20 26 36 / .18); padding: 10px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 8px; }
.cal-head b { font-size: 14px; font-weight: 800; }
.cal-head button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: var(--sunken); display: grid; place-items: center; }
.cal-head svg.i { width: 16px; height: 16px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-grid span { font-size: 10.5px; font-weight: 800; color: var(--soft); text-align: center; padding: 4px 0; }
.cal-grid button { height: 36px; border: 0; border-radius: 9px; background: none; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-grid button:hover { background: var(--sunken); }
.cal-grid button[data-other] { color: #b4bcc8; }
.cal-grid button[data-today] { box-shadow: inset 0 0 0 1.5px var(--t-action); }
.cal-grid button[aria-pressed="true"] { background: var(--t-primary); color: #fff; }
.cal-quick { display: flex; gap: 6px; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--line); }
.cal-quick button { flex: 1; border: 0; border-radius: 9px; background: var(--sunken); padding: 7px 4px; font-size: 12px; font-weight: 800; }

/* O dia da agenda: as setas em volta do dia escrito (o jeito do Pixel Barber). */
.day-nav { display: flex; align-items: center; height: 34px; border-radius: 10px; background: var(--sunken); box-shadow: inset 0 0 0 1.5px var(--t-primary); }
.dn-step { width: 32px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink); text-decoration: none; flex: none; }
.dn-step svg.i { width: 16px; height: 16px; }
.day-pick { margin: 0; position: relative; display: flex; align-items: center; min-width: 0; }
.day-pick::before, .day-pick::after { content: ""; width: 1px; height: 20px; background: var(--t-line); flex: none; }
.day-label { border: 0; background: none; height: 34px; padding: 0 9px; display: flex; align-items: center; gap: 7px; font: 800 12.5px "Manrope", sans-serif; color: var(--ink); white-space: nowrap; cursor: pointer; min-width: 0; }
.day-label svg.i { width: 16px; height: 16px; flex: none; }
.day-label .lg { overflow: hidden; text-overflow: ellipsis; }
.day-label .sm { display: none; }
html:not(.js) .day-label { display: none; }

/* Os sinais: ícone pequeno no lugar do selo colorido, com a dica do painel. */
.mk { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; vertical-align: -2px; color: var(--soft); position: relative; z-index: 1; }
.mk svg.i { width: 15px; height: 15px; stroke-width: 2; }
.mk.wait { color: var(--bill); }
.mk.ok { color: var(--ok); }
i.mk-in, svg.mk-in { width: 15px; height: 15px; color: var(--soft); margin-right: 6px; vertical-align: -2px; }
svg.mk-lock { width: 14px; height: 14px; color: var(--soft); margin-left: 6px; vertical-align: -1px; }

/* A dica: a do painel, e não o balão do navegador. */
.p-tip { position: fixed; z-index: 300; padding: 6px 10px; border-radius: 8px; background: var(--t-deep); color: #fff; font: 700 12px "Manrope", sans-serif; white-space: nowrap; pointer-events: none; box-shadow: 0 8px 22px rgb(20 26 36 / .22); opacity: 0; transform: translateY(3px); transition: opacity .11s ease, transform .11s ease; }
.p-tip[data-open] { opacity: 1; transform: none; }
.p-tip[hidden] { display: none; }

/* Os círculos da equipe. */
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font: 800 11.5px "Manrope", sans-serif; flex: none; background: var(--t-primary); }
.av.sm { width: 26px; height: 26px; font-size: 10px; }
.av.xs { width: 22px; height: 22px; font-size: 9.5px; }
.ps { display: flex; align-items: center; gap: 7px; font: 700 12.5px "Manrope", sans-serif; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-wrap: wrap; }
.ps small { width: 100%; color: var(--soft); font-weight: 600; font-size: 11px; }
.ps .muted, .ps.muted { color: var(--soft); font-weight: 600; }

/* As linhas das listas. Colunas de largura fixa: com "auto" cada linha andava
   conforme os botões dela (pedido do Kayo no Pixel Barber). */
.rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.rows > .p-empty { border: 0; border-radius: 0; }
.r { display: grid; grid-template-columns: 72px minmax(0, 1fr) 170px 210px; gap: 12px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 54px; position: relative; }
.r:first-child { border-top: 0; }
.r .tm { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
.r .tm small { font-size: 10.5px; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: .04em; }
.r .cl { min-width: 0; text-decoration: none; color: inherit; }
.r .cl b { font-size: 13.5px; font-weight: 800; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.r .cl b i { font-style: normal; color: var(--soft); font-weight: 600; }
.r .cl small { font-size: 12px; font-weight: 600; color: var(--soft); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r .num, .r .nx-due, .r .money { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; min-width: 0; }
.r .num small, .r .nx-due small, .r .money small { font-size: 11px; font-weight: 600; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r .ra { display: flex; gap: 6px; justify-content: flex-end; align-items: center; position: relative; z-index: 1; }
.r .ra form { margin: 0; }
/* Passar o mouse acende a linha inteira, e o clique em qualquer lugar dela
   abre (o jeito que o Kayo escolheu no Pixel Barber): o link se estica por cima
   da linha, e os botões ficam acima dele. */
.r > a.cl::after { content: ""; position: absolute; inset: 0; }
.r > a.cl:focus-visible { outline: none; }
.r:has(> a.cl):hover, .r:has(> a.cl:focus-visible), a.r:hover, a.r:focus-visible { background: var(--sunken); outline: none; }
.r.late .tm, .r.late .money { color: var(--bad-deep); }
/* "due-today", e nao "today": .today e a coluna do dia na Agenda, e o nome
   repetido punha a linha da tarefa de hoje dentro daquela caixa. */
.r.due-today .tm { color: var(--bad-deep); }
.r.case { grid-template-columns: minmax(0, 1.6fr) 200px 150px 120px; }
.r.client { grid-template-columns: minmax(0, 1fr) 90px 120px; }
.r.work { grid-template-columns: 82px minmax(0, 1fr) 170px 230px; }
.r.money-row { grid-template-columns: 72px minmax(0, 1fr) 120px 190px; }
.r.money-row .money { text-align: right; align-items: flex-end; }
.r.compact { grid-template-columns: 72px minmax(0, 1fr) 90px 110px; }

/* ------------------------------------------- a caixa de intimações (1 A) */

.inbox { flex: 1; min-height: 0; display: grid; grid-template-columns: 380px minmax(0, 1fr); }
.ilist { border-right: 1px solid var(--line); background: var(--side); display: flex; flex-direction: column; min-height: 0; }
.ilist-items { flex: 1; overflow-y: auto; scrollbar-width: thin; }
.ilist-items > .p-empty { margin: 14px; }
.ifilter { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex: none; flex-wrap: wrap; }
.ifilter.flat { padding: 0 0 6px; border: 0; }
.ifilter .pill { margin: 0; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 11px; font: 800 11.5px "Manrope", sans-serif; background: #fff; color: var(--ink); text-decoration: none; vertical-align: 0; }
.ifilter .pill.on { background: var(--t-primary); border-color: var(--t-primary); color: #fff; }
.ifilter .pill b { font-variant-numeric: tabular-nums; margin-left: 2px; opacity: .75; }
.ii { padding: 9px 14px 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; background: #fff; text-decoration: none; color: var(--ink); }
.ii:hover { background: var(--sunken); }
.ii.sel { background: var(--t-tint); }
.ii.done { opacity: .78; }
.ii-top { display: flex; align-items: center; gap: 7px; font: 700 11px "Manrope", sans-serif; color: var(--soft); min-width: 0; }
.ii-top .due { margin-left: auto; }
.court { display: inline-block; border: 1.5px solid #d5dbe3; border-radius: 6px; padding: 0 5px; font: 800 9.5px/15px "Manrope", sans-serif; letter-spacing: .05em; color: var(--ink); background: #fff; white-space: nowrap; }
.newdot { width: 7px; height: 7px; border-radius: 50%; background: var(--t-action); display: block; flex: none; }
.due { display: inline-flex; align-items: center; gap: 4px; font: 800 11px "Manrope", sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.due svg.i { width: 13px; height: 13px; stroke-width: 2.2; color: var(--soft); }
.due.red, .due.red svg.i { color: var(--bad); }
.due.soft { color: var(--soft); }
.ii b { font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; }
.ii .what { font-size: 11.5px; font-weight: 600; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.idet { padding: 14px 22px 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; overflow-y: auto; scrollbar-width: thin; }
.idet.empty { justify-content: center; }
.idet-h { display: flex; align-items: flex-start; gap: 12px; }
.idet-h h2 { font-size: 20px; font-weight: 800; }
.idet-h p { font-size: 12px; font-weight: 600; color: var(--soft); margin-top: 2px; }
.idet-h .ext { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font: 800 12px "Manrope", sans-serif; color: var(--t-action); white-space: nowrap; text-decoration: none; }
.idet-h .ext svg.i { width: 14px; height: 14px; stroke-width: 2.2; }
.proc-line { display: flex; align-items: center; gap: 14px; background: var(--sunken); border-radius: 12px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; color: var(--soft); text-decoration: none; flex-wrap: wrap; }
.proc-line b { color: var(--ink); font-weight: 800; }
.proc-line .num { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 700; }
.proc-line .who { margin-left: auto; white-space: nowrap; font-weight: 700; color: var(--ink); }
.proc-line.warn { background: #fff7ec; color: var(--ink); }
.proc-line.warn svg.i { width: 17px; height: 17px; color: var(--bill); }
.proc-line.warn .p-btn { margin-left: auto; }
a.proc-line:hover { box-shadow: inset 0 0 0 1.5px var(--t-primary); }
.pub { border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; background: #fff; }
.pub .cap { font: 800 10px "Manrope", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); display: block; margin-bottom: 4px; }
.pub-text { font-size: 13px; line-height: 1.6; color: #2d3646; white-space: pre-line; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
.pub mark { background: #f4e3a6; color: inherit; border-radius: 3px; padding: 0 2px; font-weight: 800; }

.sug { border: 2px solid var(--t-primary); border-radius: 16px; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.sug.soft { border-color: var(--line); }
.sug-h { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.sug-h > div { flex: 1; min-width: 0; }
.sug-h small { font: 800 10px "Manrope", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--t-primary); display: block; }
.sug.soft .sug-h small { color: var(--soft); }
.sug-h b { font-size: 15.5px; font-weight: 800; }
.sug-law { font: 700 11.5px "Manrope", sans-serif; color: var(--soft); white-space: nowrap; }
.ai-badge { display: inline-flex; align-items: center; gap: 4px; font: 800 11px "Manrope", sans-serif; color: var(--t-primary); background: var(--t-tint); border-radius: 8px; padding: 3px 8px; white-space: nowrap; }
.ai-badge svg.i { width: 14px; height: 14px; }
.ai-badge.wait { color: var(--bill); background: #fff4e6; }
.sug-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sug-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ck { background: var(--sunken); border-radius: 12px; padding: 7px 10px 8px; min-width: 0; }
.ck span { display: block; font-size: 10.5px; font-weight: 700; color: var(--soft); }
.ck b { display: block; font-size: 14.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ck small { display: block; font-size: 10.5px; font-weight: 600; color: var(--soft); }
.ck.main { background: var(--t-primary); color: #fff; }
.ck.main span, .ck.main small { color: rgb(255 255 255 / .82); }
.why { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; font-weight: 600; color: var(--soft); line-height: 1.45; }
.why svg.i { width: 15px; height: 15px; color: var(--ok); stroke-width: 2.4; margin-top: 1px; }
.ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctl form { margin: 0; }
.ctl .grow { flex: 1; }
.sug-form { display: flex; flex-direction: column; gap: 10px; }
.selbox { display: flex; align-items: center; gap: 8px; }
.selbox label { font: 700 11px "Manrope", sans-serif; color: var(--soft); white-space: nowrap; }
.selbox .sel { min-width: 170px; }
.selbox .sel-button { padding: 7px 32px 7px 10px; min-height: 0; font-size: 13px; }
.notify { display: flex; flex-direction: column; gap: 8px; background: var(--sunken); border-radius: 12px; padding: 10px 12px; }
.recount > summary { list-style: none; display: inline-flex; cursor: pointer; }
.recount > summary::-webkit-details-marker { display: none; }
.recount[open] > summary { margin-bottom: 10px; }

/* ------------------------------------------------------------- a agenda */

.ag { flex: 1; min-height: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr); }
.today { background: var(--side); border-right: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; overflow-y: auto; }
.today h3 { font-size: 14px; font-weight: 800; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.today h3 small { font-size: 11.5px; font-weight: 600; color: var(--soft); }
.ev { background: #fff; border-radius: 12px; padding: 8px 11px 9px; display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 1px 10px; box-shadow: 0 1px 2px rgb(22 32 50 / 6%); text-decoration: none; color: var(--ink); }
.ev:hover { box-shadow: 0 0 0 1.5px var(--t-primary); }
.ev .t { grid-row: span 3; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; padding-top: 1px; }
.ev .t small { display: block; font-size: 9px; font-weight: 800; color: var(--soft); letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }
.ev .k { display: flex; align-items: center; gap: 5px; font: 800 10px "Manrope", sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.ev .k svg.i { width: 13px; height: 13px; stroke-width: 2.2; }
.ev b { font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ev .s { font-size: 11px; font-weight: 600; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ev.fatal .t, .ev.fatal .k { color: var(--bad); }
.ev.done { opacity: .55; }
.ev.done b { text-decoration: line-through; }
.add-ev { margin-top: 4px; }
.add-ev > summary { list-style: none; display: inline-flex; cursor: pointer; }
.add-ev > summary::-webkit-details-marker { display: none; }
.add-ev[open] > summary { margin-bottom: 10px; }
.add-ev .p-form { background: #fff; border-radius: 14px; padding: 12px; }
.week-wrap { min-width: 0; display: flex; flex-direction: column; overflow-y: auto; }
.week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); flex: 1; }
.day { border-right: 1px solid var(--line); padding: 10px 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.day:last-child { border-right: 0; }
.day-h { display: flex; justify-content: space-between; align-items: baseline; padding: 0 3px 4px; font: 800 10.5px "Manrope", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); text-decoration: none; }
.day-h b { font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.day.now { background: var(--t-tint); }
.day.now .day-h b { color: var(--t-action); }
.day.chosen .day-h { box-shadow: inset 0 -2px 0 var(--t-primary); }
.day-empty { font-size: 11.5px; color: #b0b8c4; font-weight: 700; padding: 0 3px; }
.ce { border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px 7px; background: #fff; display: flex; flex-direction: column; gap: 1px; min-width: 0; text-decoration: none; color: var(--ink); }
.ce:hover { border-color: var(--t-primary); }
.ce .k { display: flex; align-items: center; gap: 4px; font: 800 9.5px "Manrope", sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }
.ce .k svg.i { width: 12px; height: 12px; stroke-width: 2.2; }
.ce b { font-size: 11.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce small { font-size: 10.5px; font-weight: 600; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce.fatal .k { color: var(--bad); }
.ce.done { opacity: .55; }
.ce.done b { text-decoration: line-through; }
.week-note { padding: 8px 14px; }

/* ---------------------------------------- a ficha do processo (2 A) */

.parties { display: flex; align-items: center; gap: 16px; padding: 10px 22px; border-bottom: 1px solid var(--line); flex: none; flex-wrap: wrap; }
.party { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.party small { font: 800 9.5px "Manrope", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.party b { font-size: 14px; font-weight: 800; }
.party b em { font-style: normal; font: 800 9.5px/1 "Manrope", sans-serif; letter-spacing: .05em; text-transform: uppercase; background: var(--t-primary); color: #fff; border-radius: 5px; padding: 3px 5px 2px; margin-left: 6px; vertical-align: 2px; }
.vs { font-size: 13px; font-weight: 800; color: var(--soft); }
.pfacts { margin-left: auto; }
.stats .st.lock { background: var(--t-deep); color: #fff; }
.stats .st.lock span { color: rgb(255 255 255 / .8); }
.proc { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.proc-main { padding: 12px 22px 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; overflow-y: auto; scrollbar-width: thin; }
.tl-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.tl-tools form { margin: 0; }
details.tool { position: relative; }
details.tool > summary { list-style: none; cursor: pointer; }
details.tool > summary::-webkit-details-marker { display: none; }
details.tool[open] > summary { background: var(--t-primary); color: #fff; }
details.tool > .p-form { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(440px, 80vw); background: #fff; border: 1px solid #dfe3e9; border-radius: 16px; padding: 14px; box-shadow: 0 14px 34px rgb(20 26 36 / .18); }
.mi-actions details.tool > .p-form, .mg-head details.tool > .p-form { left: auto; right: 0; }
.tl { display: flex; flex-direction: column; }
.tl-i { display: grid; grid-template-columns: 50px 28px minmax(0, 1fr); gap: 10px; position: relative; padding-bottom: 10px; }
.tl-i::before { content: ""; position: absolute; left: 73px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.tl-i:last-child::before { display: none; }
.tl-d { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; padding-top: 6px; text-align: right; }
.tl-d small { display: block; font-size: 10px; font-weight: 600; color: var(--soft); }
.tl-o { width: 28px; height: 28px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; color: var(--soft); position: relative; z-index: 1; }
.tl-o svg.i { width: 15px; height: 15px; }
/* "djen", e nao "pub": .pub e a caixa do texto da intimacao, e o nome
   repetido punha borda e recheio dentro da bolinha. */
.tl-o.djen { background: var(--t-primary); color: #fff; }
.tl-c { min-width: 0; padding-top: 2px; }
.tl-c .src { font: 800 9.5px "Manrope", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.tl-c p { font-size: 12.5px; line-height: 1.45; color: var(--ink); font-weight: 600; white-space: pre-line; }
.tl-c p b { font-weight: 800; }
.born { margin-top: 4px; display: inline-flex; align-items: center; gap: 6px; background: var(--t-tint); border-radius: 9px; padding: 4px 9px; font-size: 11.5px; font-weight: 700; text-decoration: none; color: var(--ink); }
.born svg.i { width: 13px; height: 13px; color: var(--t-action); stroke-width: 2.4; }
.born.grey { background: var(--sunken); }
.born.grey svg.i { color: var(--soft); }
.born.warn { background: #fff4e6; }
.born.warn svg.i { color: var(--bill); }
.proc-side { background: var(--side); border-left: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.box { background: #fff; border-radius: 14px; padding: 11px 12px; box-shadow: 0 1px 2px rgb(22 32 50 / 6%); display: flex; flex-direction: column; gap: 7px; }
.box h6 { margin: 0; font: 800 10.5px "Manrope", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); display: flex; justify-content: space-between; gap: 6px; }
.box h6 span { letter-spacing: 0; text-transform: none; }
.box .b-sm { align-self: flex-start; }
.nx { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 8px; align-items: start; text-decoration: none; color: var(--ink); }
.nx .d { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.nx .d small { display: block; font-size: 9.5px; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: .04em; }
.nx b { display: block; font-size: 12px; font-weight: 800; }
.nx .s { display: block; font-size: 11px; font-weight: 600; color: var(--soft); }
.nx.fatal .d { color: var(--bad); }
a.nx:hover b { color: var(--t-action); }
.team { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.team .n { font-size: 11.5px; font-weight: 600; color: var(--soft); margin-left: 4px; }
.docs .file { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; font-size: 12.5px; font-weight: 700; padding: 6px 0; border-bottom: 1px solid var(--line); }
.docs .file:last-of-type { border-bottom: 0; }
.docs .file svg.i { width: 17px; height: 17px; color: var(--soft); }
.docs .file > a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.docs .file > a:hover { color: var(--t-action); }
.docs .file small { font-size: 11px; font-weight: 600; color: var(--soft); white-space: nowrap; }
.docs .file form { margin: 0; }
.import-list { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; padding-right: 4px; }

/* WhatsApp e pagamento em Ajustes */
.wa-card { border-radius: 16px; padding: 13px 15px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.wa-card b { font-size: 14.5px; }
.wa-card form { margin: 4px 0 0; }
.wa-card.ok { background: var(--ok); color: #fff; }
.wa-card.ok .p-btn.ghost { background: #fff; color: var(--ok); }
.wa-card.bad { background: var(--bad); color: #fff; }
.wa-card.wait { background: var(--sunken); }
.wa-card.off { background: var(--sunken); color: var(--soft); }
.wa-card.off b { color: var(--ink); }
.qr-box { width: 240px; height: 240px; border-radius: 16px; background: #fff; display: grid; place-items: center; margin-top: 6px; }
.qr-box img { width: 220px; height: 220px; image-rendering: pixelated; }
.finish-due { background: var(--sunken); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.finish-due span { font-size: 12.5px; font-weight: 700; color: var(--soft); }
.finish-due b { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.finish-due small { font-size: 12px; color: var(--soft); font-weight: 600; }
.msgs { display: flex; flex-direction: column; gap: 2px; }
details.msg-row { display: block; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
details.msg-row summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
details.msg-row summary::-webkit-details-marker { display: none; }
details.msg-row summary small { color: var(--soft); width: 100%; }
details.msg-row .pill { margin: 0; }
details.msg-row pre { white-space: pre-wrap; font: 500 13px/1.5 "Manrope", sans-serif; background: var(--sunken); border-radius: 12px; padding: 10px 12px; margin: 8px 0 2px; }

/* Painel estreito: o celular do advogado no fórum. */
@media (max-width: 1100px) {
  .inbox { grid-template-columns: 320px minmax(0, 1fr); }
  .proc { grid-template-columns: minmax(0, 1fr) 260px; }
  .sug-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .p { padding: 0; height: 100dvh; }
  .p-card { border-radius: 0; flex-direction: column; }
  .p-rail { width: 100%; flex-direction: row; padding: 8px 10px; gap: 4px; overflow-x: auto; overflow-y: hidden; }
  .p-rail > .logo { width: 38px; height: 38px; margin: 0 6px 0 0; }
  .p-rail .spacer, .p-made { display: none; }
  .p-rail-toggle { display: none; }
  .p-nav { width: auto; padding: 8px 11px; }
  .p-head { padding: 12px 16px; gap: 10px; }
  .p-head .stats { order: 3; width: 100%; margin-left: 0; }
  .p-user { display: none; }
  .p-pad { padding: 14px 14px 20px; }
  .p-body.flush { overflow-y: auto; }
  .p-body.flush > .p-region { display: block; }
  .inbox, .ag, .proc { display: flex; flex-direction: column; }
  .ilist { border-right: 0; max-height: 46vh; }
  .today, .proc-side { border: 0; border-top: 1px solid var(--line); }
  .week { grid-template-columns: minmax(0, 1fr); }
  .day { border-right: 0; border-top: 1px solid var(--line); }
  .p-two, .p-two.wide-left, .field-row, .field-row.three { grid-template-columns: minmax(0, 1fr); }
  .r, .r.case, .r.work, .r.money-row, .r.client, .r.compact { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .r > :nth-child(3):not(.ra) { display: none; }
  .r.case { grid-template-columns: minmax(0, 1fr) auto; }
  .r.case > :nth-child(3), .r.case > :nth-child(4) { display: none; }
  .r .ra { flex-wrap: wrap; }
  .mi { grid-template-columns: 48px minmax(0, 1fr); }
  .mi-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 520px) {
  .day-label .lg { display: none; }
  .day-label .sm { display: inline; }
  .sug-grid, .sug-grid.three, .p-kpis { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .field-float label, .p-rail, .p-nav, .p-nav .lbl, .p-made .lbl, .p-rail > .logo, .p-rail-toggle, .p-rail-toggle svg.i, .p-nav .count { transition: none !important; } }
