:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background: #101e19;
  color: #edf6e6;
  --muted: #afc5b5;
  --muted-strong: #cadacb;
  --line: #a7c29a35;
  --mint: #89e0b6;
  --lime: #d9e982;
  --gold: #eed89b;
  --danger: #ffc0a8;
  --focus: #e9f5aa;
  --panel: #182d24;
  --active: linear-gradient(108deg, #73d9b1, #b9e17e 68%, #dce77e);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: radial-gradient(ellipse at 8% 4%, #28725d39, transparent 48%),
    radial-gradient(ellipse at 95% 17%, #7b75212c, transparent 38%),
    linear-gradient(143deg, #101f1b, #111d17 60%, #1c2418);
}
a { color: var(--mint); text-underline-offset: .15em; }
button, input, select { font: inherit; }
button, select, summary, input[type=checkbox] { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.topbar {
  background: radial-gradient(ellipse at 13% 0, #22b5ad43, transparent 50%),
    linear-gradient(110deg, #173f35, #294b3b 68%, #555133);
  border-bottom: 1px solid #bdd49755;
  box-shadow: 0 5px 28px #25b7a01c, inset 0 -1px 0 #d5d27b30;
  border-radius: 0 0 15px 15px;
}
.topbar-inner {
  width: min(100% - 3rem, 1690px);
  margin-inline: auto;
  min-height: 63px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 1rem; }
.wordmark {
  color: #f2fae7;
  font-size: 1.72rem;
  font-weight: 850;
  letter-spacing: -.065em;
  text-decoration: none;
  text-shadow: 0 0 15px #def18a53;
}
.wordmark span { color: #9be3ac; }
.brand-office { border-left: 1px solid #cfe3b04f; padding-left: 1rem; color: #edf3df; font-size: .87rem; font-weight: 600; }
.quiet, .primary { min-height: 2.45rem; border-radius: 9px; padding: .46rem .9rem; font-weight: 650; color: inherit; }
.quiet { border: 1px solid #c3dca648; background: #ddf5be0d; }
.quiet:hover { background: #ddf5be1c; }
.primary { border: 1px solid #d1ec9b; background: var(--active); color: #183521; }
.primary:hover { filter: brightness(1.09); }
.workspace { width: min(100% - 3rem, 1690px); margin: 2.45rem auto 3rem; }
.workspace-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.55rem; }
.eyebrow {
  margin: 0 0 .4rem;
  color: var(--mint);
  font-size: .76rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .13em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1.08; letter-spacing: -.048em; margin: 0; }
.report-date { margin: 0 0 .15rem; color: var(--muted); font-size: .88rem; text-align: right; line-height: 1.4; }
.report-date strong { color: #e5efdb; font-weight: 640; }
.report-date span { color: var(--muted-strong); white-space: nowrap; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.3rem; }
.metric {
  --accent: var(--mint);
  padding: .85rem 1.1rem .8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .25rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(120deg, #294b3bc4, #293825c5);
  box-shadow: inset 0 1px 0 #dbeeb210;
}
.metric-priority { --accent: var(--lime); }
.metric-deadline { --accent: var(--gold); }
.metric-done { --accent: #a8debf; }
.metric span { color: var(--muted-strong); font-size: .88rem; font-weight: 600; line-height: 1.22; }
.metric strong { color: var(--accent); font-size: 2rem; font-weight: 720; line-height: 1.14; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.panel {
  border: 1px solid #a7c29a4d;
  border-radius: 16px;
  background: #192c24;
  box-shadow: 0 16px 36px #060f0b55;
}
.panel-head {
  padding: .76rem .84rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(104deg, #254739, #35432d);
  border-bottom: 1px solid var(--line);
}
.tabs { display: inline-flex; padding: .22rem; gap: .24rem; border-radius: 11px; background: #132d24; border: 1px solid #c0d8a934; }
.tabs button {
  display: inline-flex;
  align-items: center;
  gap: .46rem;
  font-size: .9rem;
  font-weight: 720;
  padding: .43rem .67rem;
  min-height: 2.18rem;
  color: #d4e4d7;
  border: 0;
  border-radius: 8px;
  background: transparent;
  white-space: nowrap;
}
.tabs button:hover { background: #89ddb326; }
.tabs button[aria-selected=true] { color: #183521; background: var(--active); box-shadow: 0 0 18px #8bdd812b; }
.tabs button span { background: #0b1a1240; border-radius: 6px; padding: .1rem .3rem; font-weight: 760; font-variant-numeric: tabular-nums; font-size: .76rem; }
.tabs button[aria-selected=true] span { background: #12341b25; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.search { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: .83rem; width: .71rem; height: .71rem; border: 1.5px solid #c5ddc6; border-radius: 50%; pointer-events: none; }
.search-icon::after { content: ""; width: .31rem; height: .1rem; border-radius: 1px; position: absolute; bottom: -.13rem; right: -.23rem; background: #c5ddc6; transform: rotate(47deg); }
.search input, .court-filter select, .login-form input { color: #edf6e6; background-color: #10281fd9; border: 1px solid #83b69b73; border-radius: 9px; min-height: 2.55rem; }
.search input { width: 19rem; max-width: 100%; padding: .45rem .62rem .45rem 2.15rem; font-size: .89rem; }
.search input::placeholder { color: #bacdc0; opacity: 1; }
.court-filter { position: relative; }
.court-filter::after { content: ""; position: absolute; top: .96rem; right: .87rem; width: .42rem; height: .42rem; border-right: 1.5px solid var(--muted-strong); border-bottom: 1.5px solid var(--muted-strong); transform: rotate(45deg); pointer-events: none; }
.court-filter select { font-size: .87rem; appearance: none; padding: .45rem 2rem .45rem .7rem; }
.table-wrap { overflow: auto; max-height: max(55vh, 25rem); border-radius: 0 0 15px 15px; scrollbar-color: #729b76 #193027; }
table { width: 100%; min-width: 1120px; table-layout: fixed; border-spacing: 0; font-size: .875rem; line-height: 1.45; }
.col-check { width: 5%; } .col-process { width: 17.5%; } .col-duty { width: 14%; } .col-date { width: 14%; }
.col-action { width: 21%; } .col-contact { width: 15%; } .col-status { width: 8%; } .col-sources { width: 5.5%; }
thead th { position: sticky; top: 0; z-index: 2; padding: .68rem .68rem; text-align: left; color: #d5e5d1; background: #1c392d; border-bottom: 1px solid #a7c29a58; font-weight: 690; font-size: .79rem; }
thead th:first-child { text-align: center; }
.group-heading th { --tone: #cbe1ba; padding: .47rem .74rem; color: var(--tone); background: #233b2d; text-align: left; font-weight: 730; border-bottom: 1px solid #cad9a329; }
.group-heading[data-tone=imediatas] th { --tone: #e6efa5; background: linear-gradient(100deg, #3a4e2a, #293e2a 49%, #21392b); }
.group-heading[data-tone=vencidos] th { --tone: #ffd1ba; background: #473b2b; }
.group-heading[data-tone=hoje] th { --tone: #f8e4aa; background: #3e4127; }
.group-heading[data-tone=tratados] th { --tone: #9ee6b8; }
.group-heading[data-tone=historico] th { --tone: #c6d8c5; }
.group-count { margin-left: .55rem; border-radius: 6px; padding: .07rem .34rem; background: #152812a8; color: var(--tone); font-size: .75rem; }
.obligation td { position: relative; padding: .82rem .68rem; vertical-align: top; border-bottom: 1px solid #acc8a529; overflow-wrap: anywhere; }
.obligation:nth-child(odd) { background: #c0d9a706; }
.obligation:hover { background: #75d1a210; }
.check-cell { text-align: center; }
.item-check { appearance: none; width: 1.26rem; height: 1.26rem; border-radius: 5px; background: #152a20; border: 1.6px solid #90bd9d; margin: .16rem 0 0; display: inline-grid; place-content: center; }
.item-check:hover { border-color: var(--lime); box-shadow: 0 0 11px #8be3ac68; }
.item-check:checked { border-color: #bce589; background: var(--active); }
.item-check:checked::after { content: ""; width: .57rem; height: .31rem; border: solid #19422d; border-width: 0 0 2px 2px; transform: translateY(-.08rem) rotate(-45deg); }
.item-check:disabled { cursor: progress; opacity: .6; }
.historical-marker { color: var(--muted); }
.person, .process-number { display: block; }
.person { font-weight: 720; color: #f4f9ec; margin-bottom: .19rem; }
.process-number { color: #abc8b6; font-size: .75rem; font-variant-numeric: tabular-nums; }
.court { color: #a7dfb4; background: #69ce9a14; padding: .11rem .32rem; border-radius: 5px; display: inline-block; margin-top: .34rem; font-weight: 720; font-size: .69rem; letter-spacing: .02em; }
.duty { font-weight: 650; color: #e9f0df; }
.dates { font-variant-numeric: tabular-nums; color: #e0eccf; }
.dates > span { display: block; }
.dates > span + span { margin-top: .47rem; }
.dates small { display: block; color: #afc8ad; font-weight: 660; margin-bottom: .09rem; font-size: .73rem; }
.prose { color: #d6e5d9; white-space: pre-line; }
.muted { color: var(--muted); }
.status-chip { display: inline-block; color: #e3ecd4; padding: .22rem .39rem; border: 1px solid #b9d09b41; border-radius: 7px; font-size: .75rem; font-weight: 700; line-height: 1.26; background: #a6c77b19; }
.status-chip.done { color: #c0f1cc; border-color: #71c39378; background: #3a815a29; }
.mark-time { display: block; margin-top: .24rem; color: var(--muted); font-size: .71rem; }
.sources { position: relative; }
.sources summary { color: #adecbd; font-weight: 660; font-size: .79rem; list-style: none; text-decoration: underline; text-underline-offset: .15em; }
.sources summary::-webkit-details-marker { display: none; }
.sources summary:hover { color: #e6f4af; }
.source-popover { width: clamp(245px, 24vw, 360px); position: absolute; right: 0; z-index: 1; padding: .76rem .9rem; background: #244136; border: 1px solid #a1c29a82; border-radius: 10px; box-shadow: 0 14px 25px #0a1511ab; font-size: .83rem; color: #d7e8d5; }
.source-popover p { margin: 0; }
.source-popover p + p { margin-top: .48rem; border-top: 1px solid var(--line); padding-top: .48rem; }
.source-ids { color: var(--lime); font-size: .75rem; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: .7rem; background: #28513e; color: #e6f7e6; border-bottom: 1px solid #78b0945f; padding: .45rem .9rem; font-size: .88rem; }
.notice-error, .form-error { color: #ffcab8; background: #763b302e; }
.notice .quiet { min-height: 1.85rem; padding: .22rem .55rem; }
.empty { margin: 0; padding: 1.25rem .9rem; color: var(--muted-strong); }
.login-wrapper { min-height: min(680px, calc(100vh - 63px)); display: grid; place-items: center; padding: 2rem 1rem; }
.login-card { width: min(100%, 440px); border: 1px solid #b0cc9c69; padding: 2rem; border-radius: 16px; background: linear-gradient(130deg, #254d40, #313d28); box-shadow: 0 24px 64px #091b1255; }
.login-card h1 { font-size: 2.35rem; }
.login-card > p.muted { margin: .7rem 0 1.45rem; }
.login-form { display: flex; flex-direction: column; gap: .45rem; }
.login-form label { font-size: .88rem; color: #e1efdc; font-weight: 680; }
.login-form input { padding: .55rem .65rem; margin-bottom: .55rem; }
.login-form .primary { margin-top: .3rem; }
.form-error { padding: .55rem .7rem; border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 800px) {
  .topbar-inner, .workspace { width: calc(100% - 1.8rem); }
  .workspace { margin-top: 1.65rem; }
  .workspace-heading { align-items: flex-start; flex-direction: column; gap: .64rem; }
  .report-date { text-align: left; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .metric { padding: .72rem .8rem; }
  .filters { width: 100%; }
  .search { flex: 1 1 12rem; min-width: 9rem; }
  .search input { width: 100%; }
  .obligation td:first-child, thead th:first-child { position: sticky; left: 0; background: #1d3a2d; z-index: 1; }
  thead th:first-child { z-index: 3; }
}
@media (max-width: 420px) {
  .brand, .topbar-inner { gap: .55rem; }
  .brand-office { padding-left: .55rem; font-size: .77rem; }
  .metric span { font-size: .81rem; }
  .login-card { padding: 1.4rem; }
}
