:root {
  --navy: #10263f;
  --navy-2: #173a5e;
  --blue: #1e6c9f;
  --blue-soft: #e9f3f9;
  --teal: #16847b;
  --gold: #d89a35;
  --red: #c94c4c;
  --ink: #1d2b3a;
  --muted: #667789;
  --line: #dce4eb;
  --surface: #ffffff;
  --background: #f4f7f9;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(16, 38, 63, .08);
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--background); }
body { margin: 0; min-height: 100vh; font-size: 14px; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }

.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--navy); color: white; display: flex; flex-direction: column; z-index: 20; }
.brand { height: 78px; padding: 18px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 10px; color: white; background: linear-gradient(145deg, #2b83b8, #14657e); font-size: 12px; font-weight: 800; letter-spacing: .08em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.brand strong { display: block; font-size: 18px; letter-spacing: .01em; }
.brand small { display: block; margin-top: 2px; color: #a9bfd3; font-size: 11px; }
.sidebar nav { padding: 18px 12px; overflow-y: auto; }
.sidebar nav a { color: #cfdeeb; display: flex; align-items: center; gap: 12px; padding: 11px 13px; margin: 3px 0; border-radius: 8px; font-weight: 550; }
.sidebar nav a span { width: 19px; text-align: center; opacity: .86; }
.sidebar nav a .nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; color: white; background: #d56a49; border-radius: 10px; font-size: 9px; }
.sidebar nav a:hover, .sidebar nav a.active { color: white; background: rgba(63, 151, 196, .2); }
.sidebar nav a.active { box-shadow: inset 3px 0 0 #4fb4d1; }
.nav-label { margin: 22px 13px 7px; color: #7895ad; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.sidebar-user { margin-top: auto; padding: 14px; border-top: 1px solid rgba(255,255,255,.1); display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 9px; min-width: 0; }
.sidebar-user .avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #2d6789; font-weight: 700; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: 12px; }
.sidebar-user small { color: #90a9bc; font-size: 10px; margin-top: 2px; }
.icon-button { border: 0; background: transparent; color: #a9bfd3; padding: 6px; font-size: 18px; }

.app-shell { margin-left: 248px; min-height: 100vh; }
.topbar { height: 64px; position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 30px; gap: 14px; }
.topbar-title { flex: 1; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.menu-button { display: none; border: 0; background: none; font-size: 22px; }
.main-content { max-width: 1500px; padding: 30px 34px 60px; margin: 0 auto; }
.page-heading { min-height: 72px; margin-bottom: 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.page-heading h1 { margin: 4px 0 0; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 29px; font-weight: 600; }
.page-description { margin: 7px 0 0; color: var(--muted); }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.eyebrow { color: var(--blue); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; font-weight: 800; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 15px; border-radius: 8px; border: 1px solid transparent; font-weight: 700; transition: .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--blue); border-color: var(--blue); }
.button-primary:hover { color: white; background: #185b86; }
.button-secondary { color: var(--navy); background: white; border-color: #becbd5; }
.button-secondary:hover { background: #f8fafb; color: var(--navy); }
.button-danger { color: #a83232; background: #fff4f3; border-color: #efc4c0; }
.button-small { min-height: 33px; padding: 6px 11px; font-size: 12px; }
.button-full { width: 100%; }
.text-button { padding: 0; border: 0; color: var(--blue); background: transparent; font-weight: 700; }

.flash-stack { display: grid; gap: 8px; margin-bottom: 18px; }
.flash { display: grid; grid-template-columns: 26px 1fr 24px; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 9px; border: 1px solid; }
.flash p { margin: 0; }
.flash button { border: 0; background: none; font-size: 19px; color: inherit; }
.flash-success { background: #edf9f4; border-color: #adddcc; color: #176b53; }
.flash-error { background: #fff2f1; border-color: #efc2bd; color: #9d3636; }

.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { position: relative; overflow: hidden; min-height: 128px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); box-shadow: 0 3px 12px rgba(16,38,63,.04); }
.metric-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--blue); }
.metric-card > span, .metric-card > small { display: block; color: var(--muted); }
.metric-card > span { font-size: 12px; font-weight: 700; }
.metric-card > strong { display: block; margin: 10px 0 4px; font-size: 29px; color: var(--navy); }
.metric-card > strong.money { font-size: 22px; }
.metric-card > small { font-size: 11px; }
.metric-card.tone-warning::before { background: var(--gold); }
.metric-card.tone-danger::before { background: var(--red); }
.metric-card.tone-info::before { background: #7b70b8; }
.metric-card.tone-success::before { background: var(--teal); }
.metric-card.tone-update::before { background: #d56a49; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.span-2 { grid-column: span 2; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 14px rgba(16,38,63,.04); overflow: hidden; }
.panel-header { min-height: 70px; padding: 17px 20px; border-bottom: 1px solid #e8edf1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-header h2 { margin: 0; color: var(--navy); font-size: 16px; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.panel-header > a { font-size: 12px; font-weight: 700; }
.panel-body { padding: 20px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 14px; color: #718090; background: #f8fafb; border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid #e9eef2; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
td a { font-weight: 650; }
.table-note { display: block; color: var(--muted); margin-top: 3px; font-size: 11px; }
.table-actions { display: flex; justify-content: flex-end; align-items: center; gap: 7px; }
.text-danger { color: var(--red) !important; }
.text-success { color: var(--teal) !important; }
.muted { color: var(--muted); }

.badge { display: inline-flex; align-items: center; max-width: 100%; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 750; background: #edf1f4; color: #516272; white-space: nowrap; }
.badge-neutral { background: #edf2f5; color: #506273; }
.badge-info { background: #e6f2fa; color: #21688f; }
.badge-success { background: #e5f5ef; color: #187059; }
.badge-warning { background: #fff3dd; color: #8b5b0f; }
.badge-danger { background: #fde9e7; color: #a23939; }
.badge-update { background: #ffebe5; color: #a6442b; }

.empty-state { padding: 42px 25px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--navy); font-size: 15px; }
.empty-state p { margin: 7px auto 15px; max-width: 430px; }
.empty-state.compact { padding: 28px 20px; }
.status-list { padding: 8px 18px 18px; }
.status-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 3px; border-bottom: 1px solid #edf1f4; }
.status-list span { color: var(--muted); }
.status-list strong { color: var(--navy); }
.record-list { display: grid; }
.record-row { padding: 13px 18px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto 15px; align-items: center; gap: 12px; color: var(--ink); border-bottom: 1px solid #edf1f4; }
.record-row:last-child { border-bottom: 0; }
.record-row:hover { background: #f8fbfd; }
.record-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #2b6e94; background: var(--blue-soft); border-radius: 8px; font-size: 10px; font-weight: 800; }
.record-main strong, .record-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-main small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.chevron { color: #91a0ad; font-size: 20px; }
.task-list { padding: 7px 17px 14px; }
.task-list a { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf1f4; color: var(--ink); }
.task-list a:last-child { border-bottom: 0; }
.task-list strong, .task-list small { display: block; }
.task-list small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.task-dot { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; }

.auth-page { background: radial-gradient(circle at 15% 15%, #244d70 0, #10263f 48%, #0b1d31 100%); display: grid; place-items: center; padding: 35px 16px; }
.auth-shell { width: min(100%, 620px); }
.auth-brand { color: white; margin: 0 auto 18px; display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 21px; }
.auth-card { width: min(100%, 450px); margin: auto; padding: 34px; background: white; border-radius: 16px; box-shadow: 0 25px 75px rgba(0,0,0,.28); }
.auth-card-wide { width: min(100%, 620px); }
.auth-card h1 { margin: 7px 0; font-family: Georgia, "Times New Roman", serif; color: var(--navy); font-size: 29px; font-weight: 600; }
.auth-card > p { margin: 0 0 24px; color: var(--muted); }
.auth-footnote { margin: 16px 0 0; text-align: center; color: #9eb4c6; font-size: 11px; }

.form-stack { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
label { display: grid; gap: 7px; color: #34495c; font-size: 12px; font-weight: 700; }
label small { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--ink); background: white; border: 1px solid #bcc9d4; border-radius: 7px; outline: none; }
textarea { min-height: 110px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,108,159,.12); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: auto; }
.help-text { margin: 4px 0 0; color: var(--muted); font-size: 11px; font-weight: 400; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 7px; }

.filter-bar { margin-bottom: 16px; padding: 15px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.filter-grid { display: grid; grid-template-columns: minmax(240px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) auto auto; gap: 11px; align-items: end; }
.check-label { min-height: 42px; display: flex; flex-direction: row; align-items: center; gap: 7px; white-space: nowrap; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 315px; gap: 18px; align-items: start; }
.form-main { display: grid; gap: 18px; }
.form-card { padding: 22px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 14px rgba(16,38,63,.04); }
.form-card h2 { margin: 0 0 17px; color: var(--navy); font-size: 16px; }
.form-card .form-grid.three-cols { grid-template-columns: repeat(3, 1fr); }
.sticky-card { position: sticky; top: 84px; display: grid; gap: 17px; }
.section-title { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid #e8edf1; }
.section-title > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 800; }
.section-title h2 { margin: 0; }
.section-title p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }

.case-hero { padding: 22px; margin-bottom: 16px; background: linear-gradient(135deg, #fff, #f5f9fb); border: 1px solid var(--line); border-radius: var(--radius); }
.case-hero > div:first-child { display: flex; flex-wrap: wrap; gap: 7px; }
.case-hero dl { margin: 19px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; }
.case-hero dt, .mini-dl dt { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.case-hero dd, .mini-dl dd { margin: 5px 0 0; color: var(--navy); font-weight: 750; }
.object-summary { padding-top: 17px; margin-top: 17px; border-top: 1px solid var(--line); }
.object-summary strong { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.object-summary p { margin: 7px 0 0; line-height: 1.55; white-space: pre-line; }
.anchor-nav { position: sticky; top: 64px; z-index: 8; margin-bottom: 16px; padding: 7px; display: flex; gap: 3px; overflow-x: auto; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 18px rgba(16,38,63,.06); }
.anchor-nav a { display: flex; align-items: center; gap: 6px; padding: 8px 10px; color: var(--muted); border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.anchor-nav a:hover { background: var(--blue-soft); color: var(--blue); }
.anchor-nav span { min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; background: #edf1f4; border-radius: 9px; font-size: 9px; }
.detail-section { scroll-margin-top: 125px; margin-bottom: 16px; background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.detail-heading { min-height: 68px; padding: 15px 19px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e8edf1; }
.detail-heading > div:first-child { display: flex; align-items: center; gap: 10px; }
.detail-heading h2 { margin: 0; color: var(--navy); font-size: 16px; }
.section-number { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #cbd9e2; border-radius: 7px; color: var(--blue); font-size: 9px; font-weight: 800; }
.button-row { display: flex; gap: 7px; }
.button-row form { margin: 0; }
.cards-grid { padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#processos .cards-grid { grid-template-columns: 1fr; }
.info-card { padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
.info-card-head { display: flex; justify-content: space-between; gap: 15px; }
.info-card h3 { margin: 8px 0 0; color: var(--navy); font-size: 15px; }
.mini-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 17px 0; }
.mini-dl dd { font-size: 12px; }
.secret { margin-top: 14px; padding: 10px; background: #f2f5f7; border-radius: 7px; font-size: 11px; }
.secret summary { cursor: pointer; font-weight: 700; }
.secret code { display: inline-block; margin: 9px 10px 0 0; padding: 6px; background: white; border-radius: 4px; user-select: all; }
.inline-create { margin: 0 16px 16px; border: 1px dashed #b9c8d4; border-radius: 9px; }
.inline-create > summary { padding: 12px 15px; cursor: pointer; color: var(--blue); font-weight: 700; }
.inline-create > form { padding: 5px 16px 17px; }
.process-participants { padding: 14px 0; margin: 14px 0; border-top: 1px solid #e4eaee; border-bottom: 1px solid #e4eaee; }
.subsection-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.subsection-heading strong { color: var(--navy); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.subsection-heading span { min-width: 21px; height: 21px; padding: 0 6px; display: grid; place-items: center; color: var(--muted); background: #e9eef2; border-radius: 11px; font-size: 9px; font-weight: 800; }
.participant-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.participant-list > div { min-width: 0; padding: 9px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; background: white; border: 1px solid #dce4ea; border-radius: 7px; }
.participant-list a, .participant-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.participant-list small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.participant-list form { grid-column: 2; grid-row: 1 / span 2; }
.participant-list button { font-size: 17px; }
.mini-create { margin-top: 10px; padding: 9px 11px; background: #f4f8fa; border-radius: 7px; }
.mini-create > summary { cursor: pointer; color: var(--blue); font-size: 11px; font-weight: 750; }
.mini-create > form { padding-top: 13px; }
.compact-copy { margin: 6px 0; font-size: 10px; }
.scope-notice { margin: 16px; }
.scope-notice > span { width: 36px; height: 36px; flex-basis: 36px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fff8f7; }
.danger-zone p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.claim-values-panel { margin-bottom: 16px; }
.split-content { padding: 17px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.subsection-title { margin: 0 0 11px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.compact-list { display: grid; }
.compact-list a { display: flex; align-items: center; gap: 11px; padding: 10px 0; color: var(--ink); border-bottom: 1px solid #edf1f4; }
.compact-list a:last-child { border-bottom: 0; }
.compact-list time { width: 74px; padding: 6px; text-align: center; color: #875d16; background: #fff3dd; border-radius: 6px; font-size: 10px; font-weight: 750; }
.compact-list time.done { color: #176b53; background: #e5f5ef; }
.compact-list strong, .compact-list small { display: block; }
.compact-list small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.check-marker { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid #b8c7d2; border-radius: 50%; color: transparent; }
.check-marker.done { color: white; border-color: var(--teal); background: var(--teal); }
.question-list { display: grid; }
.question-list > a { padding: 14px 18px; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 12px; color: var(--ink); border-bottom: 1px solid #edf1f4; }
.question-list > a:last-child { border-bottom: 0; }
.question-number { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 800; }
.question-list small, .question-list strong { display: block; }
.question-list small { color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.question-list p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.document-card { padding: 14px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 11px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
.document-card:hover { background: #f8fbfd; }
.document-card strong, .document-card small { display: block; }
.document-card small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.doc-icon { width: 38px; height: 43px; display: grid; place-items: center; color: #9c5f23; background: #fff0df; border-radius: 5px; font-size: 9px; font-weight: 800; }
.long-text { padding: 18px; white-space: pre-line; line-height: 1.6; }
.narrow-form { max-width: 900px; margin: 0 auto; }
.section-spaced { margin-top: 28px; }
.inline-search { display: flex; align-items: end; gap: 9px; }
.inline-search label { flex: 1; }
.segmented { width: fit-content; display: flex; gap: 3px; margin: 0 0 15px; padding: 4px; background: #e9eef2; border-radius: 8px; }
.segmented a { padding: 7px 12px; border-radius: 6px; color: var(--muted); font-size: 11px; font-weight: 750; }
.segmented a.active { color: var(--navy); background: white; box-shadow: 0 2px 7px rgba(16,38,63,.1); }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 13px; align-items: start; overflow-x: auto; padding-bottom: 12px; }
.kanban-column { min-height: 420px; background: #eaf0f4; border: 1px solid #dae3e9; border-radius: var(--radius); overflow: hidden; }
.kanban-head { padding: 14px; display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; border-bottom: 1px solid #d5dfe6; }
.kanban-head h2 { margin: 0; font-size: 12px; color: var(--navy); }
.kanban-head > span:last-child { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.7); color: var(--muted); font-size: 10px; font-weight: 700; }
.kanban-dot { width: 8px; height: 8px; border-radius: 50%; background: #7c8b98; }
.kanban-dot.tone-2 { background: var(--blue); }.kanban-dot.tone-3 { background: var(--gold); }.kanban-dot.tone-4 { background: var(--teal); }
.kanban-items { padding: 10px; display: grid; gap: 9px; }
.task-card { padding: 13px; background: white; border: 1px solid #d8e1e7; border-radius: 8px; box-shadow: 0 2px 7px rgba(16,38,63,.05); }
.task-card > a { display: block; color: var(--ink); }
.task-card strong { color: var(--navy); }
.task-card p { margin: 8px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.task-card small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }
.task-card form { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf1f4; }
.task-card select { min-height: 33px; padding: 5px 7px; font-size: 10px; }
.kanban-empty { padding: 25px 10px; text-align: center; color: #82919e; font-size: 11px; }
.metric-grid-four { grid-template-columns: repeat(4, 1fr); }
.integrity-notice { display: flex; align-items: center; gap: 14px; padding: 15px; margin-bottom: 22px; color: #175f58; background: #e8f7f3; border: 1px solid #b8ded6; border-radius: 9px; }
.integrity-notice > span { width: 55px; height: 55px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--teal); font-size: 9px; font-weight: 800; }
.integrity-notice strong { display: block; }
.integrity-notice p { margin: 5px 0 0; font-size: 11px; line-height: 1.45; }
.file-picker { padding: 16px; background: #f7fafb; border: 1px dashed #9cb0bf; border-radius: 8px; }
.evidence-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.integrity-result { padding: 16px; display: flex; align-items: center; gap: 13px; border-radius: 9px; }
.integrity-result > span { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 50%; color: white; font-size: 19px; font-weight: 800; }
.integrity-result small, .integrity-result strong { display: block; }
.integrity-result strong { margin: 3px 0; font-size: 19px; }
.integrity-result p { margin: 0; font-size: 10px; }
.integrity-ok { color: #176b53; background: #e5f5ef; }.integrity-ok > span { background: var(--teal); }
.integrity-fail { color: #993737; background: #fde9e7; }.integrity-fail > span { background: var(--red); }
.evidence-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; margin: 23px 0; }
.evidence-meta > div:first-child { grid-column: span 2; }
.evidence-meta dt { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.evidence-meta dd { margin: 5px 0 0; font-weight: 650; }
.evidence-meta code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; padding: 7px; margin-right: 8px; background: #f1f4f6; border-radius: 5px; font-size: 10px; user-select: all; }
.note-box, .warning-box { padding: 14px; margin: 0 0 18px; background: #f5f8fa; border-left: 3px solid var(--blue); border-radius: 5px; }
.note-box p, .warning-box p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; white-space: pre-line; }
.timeline { padding: 19px; }
.timeline article { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding-bottom: 22px; }
.timeline article:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 0; width: 1px; background: #cbd7df; }
.timeline article > span { width: 11px; height: 11px; margin-top: 3px; border: 3px solid #b9dbe9; border-radius: 50%; background: var(--blue); z-index: 1; }
.timeline strong { color: var(--navy); }.timeline time { float: right; color: var(--muted); font-size: 9px; }
.timeline p { margin: 6px 0; color: var(--muted); font-size: 10px; line-height: 1.4; }.timeline small { color: #8393a0; font-size: 9px; }
.template-picker { padding: 15px; margin-bottom: 16px; background: var(--blue-soft); border: 1px solid #c6dfed; border-radius: 9px; }
.document-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.document-layout:not(:has(.version-panel)) { grid-template-columns: minmax(0, 1fr); }
.document-textarea { min-height: 650px; font-family: Georgia, "Times New Roman", serif; font-size: 14px; line-height: 1.6; }
.version-panel { position: sticky; top: 84px; }
.version-list { padding: 8px 16px 17px; }
.version-list > div { display: grid; grid-template-columns: 32px 1fr; gap: 9px; padding: 11px 0; border-bottom: 1px solid #edf1f4; }
.version-list > div > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-size: 9px; font-weight: 800; }
.version-list p { margin: 0; }.version-list strong, .version-list small { display: block; }.version-list strong { font-size: 11px; }.version-list small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.backup-content { display: grid; gap: 18px; }
.backup-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.backup-stats > div { padding: 13px; text-align: center; background: #f4f7f9; border-radius: 8px; }
.backup-stats strong, .backup-stats span { display: block; }.backup-stats strong { color: var(--navy); font-size: 21px; }.backup-stats span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.warning-box { margin: 0; border-left-color: var(--gold); background: #fff8ea; }
.security-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 15px; }
.security-list li { display: grid; grid-template-columns: 29px 1fr; align-items: center; gap: 10px; }
.security-list li > span { width: 28px; height: 28px; display: grid; place-items: center; color: white; background: var(--teal); border-radius: 50%; font-size: 11px; }
.security-list strong, .security-list small { display: block; }.security-list small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; }.pagination > span { color: var(--muted); font-size: 11px; }
.process-panel { margin-bottom: 18px; }
.process-update-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.process-update-card { min-height: 110px; padding: 15px 18px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: start; gap: 11px; color: var(--ink); border-bottom: 1px solid #edf1f4; }
.process-update-card:nth-child(odd) { border-right: 1px solid #edf1f4; }
.process-update-card:hover { background: #f8fbfd; }
.process-update-card strong, .process-update-card small, .process-update-card time { display: block; }
.process-update-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.process-update-card p { margin: 9px 0 3px; color: #3d5264; font-size: 11px; line-height: 1.4; }
.process-update-card time { color: var(--muted); font-size: 9px; }
.process-update-card > b { padding: 4px 7px; color: #a6442b; background: #ffede7; border-radius: 999px; font-size: 9px; white-space: nowrap; }
.system-chip { display: inline-flex; align-items: center; padding: 5px 7px; color: #285f83; background: #e6f2fa; border: 1px solid #c8dfec; border-radius: 6px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.system-chip.large { padding: 7px 10px; font-size: 10px; }
.mini-dl.process-meta { grid-template-columns: 1fr 1fr; }
.latest-movement { padding: 12px; margin: 12px 0; background: #f3f6f8; border-left: 3px solid #9aabb7; border-radius: 6px; }
.latest-movement.has-update { background: #fff3ee; border-left-color: #d56a49; }
.latest-movement small, .latest-movement strong, .latest-movement time { display: block; }
.latest-movement small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.latest-movement strong { margin: 5px 0; color: var(--navy); font-size: 11px; line-height: 1.4; }
.latest-movement time { color: var(--muted); font-size: 9px; }
.case-action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 10px; font-weight: 700; }
.case-action-row form { margin: 0; }
.source-notice { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 16px; color: #24465f; background: #edf6fa; border: 1px solid #c9e0eb; border-radius: var(--radius); }
.source-notice > span { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; color: white; background: #245f81; border-radius: 50%; font-size: 10px; font-weight: 800; }
.source-notice strong { display: block; }
.source-notice p { margin: 4px 0 0; font-size: 11px; line-height: 1.5; }
.table-action-stack { display: flex; justify-content: flex-end; gap: 6px; }
.row-update { background: #fffaf7; }
.text-update { color: #b44e30; font-weight: 800; }
.sync-runs { margin-top: 18px; }
.process-hero { padding: 22px; margin-bottom: 18px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.process-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.process-hero-top > div { display: flex; flex-wrap: wrap; gap: 8px; }
.process-hero dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; padding: 20px 0; margin: 0; }
.process-hero dt { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.process-hero dd { margin: 5px 0 0; color: var(--navy); font-size: 12px; font-weight: 750; }
.process-subjects { padding: 13px; margin-bottom: 15px; background: #f5f8fa; border-radius: 7px; }
.process-subjects strong { font-size: 10px; text-transform: uppercase; color: var(--muted); }
.process-subjects p { margin: 5px 0 0; }
.source-footnote { margin: 16px 0 0; color: var(--muted); font-size: 10px; }
.movement-timeline { padding: 22px; }
.movement-timeline article { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 11px; padding-bottom: 24px; }
.movement-timeline article:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 13px; bottom: 0; width: 2px; background: #dbe4ea; }
.movement-marker { width: 14px; height: 14px; margin-top: 2px; border: 3px solid white; border-radius: 50%; background: #8799a7; box-shadow: 0 0 0 2px #cbd7df; z-index: 1; }
.movement-new .movement-marker { background: #d56a49; box-shadow: 0 0 0 2px #f3b8a6; }
.movement-title { display: flex; align-items: center; gap: 8px; }
.movement-title strong { color: var(--navy); }
.movement-timeline time, .movement-timeline small { display: block; color: var(--muted); font-size: 9px; }
.movement-timeline time { margin-top: 5px; }
.switch-label { padding: 12px; display: flex; flex-direction: row; align-items: center; gap: 9px; background: #f4f8fa; border-radius: 7px; }
.switch-label input { width: 18px; height: 18px; }
.integration-status { padding: 12px; display: grid; grid-template-columns: 12px 1fr; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 7px; }
.status-light { width: 10px; height: 10px; border-radius: 50%; background: #d59a35; }
.status-light.ok { background: var(--teal); }
.status-light.warn { background: var(--gold); }
.integration-status strong, .integration-status small { display: block; }
.integration-status small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.source-terms { padding: 13px; color: #4e5f6d; background: #fff8ea; border-left: 3px solid var(--gold); border-radius: 6px; }
.source-terms p { margin: 5px 0 0; font-size: 10px; line-height: 1.5; }
.error-card { max-width: 600px; margin: 30px auto; text-align: center; }
.error-card > strong { display: block; color: #c7d5df; font: 700 70px/1 Georgia, serif; }
.error-card > p { color: var(--muted); }

@media (max-width: 1000px) {
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: span 2; }
  .form-layout { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
  .case-hero dl { grid-template-columns: 1fr 1fr; }
  .process-hero dl { grid-template-columns: 1fr 1fr; }
  .metric-grid-four { grid-template-columns: 1fr 1fr; }
  .evidence-grid, .document-layout { grid-template-columns: 1fr; }
  .version-panel { position: static; }
}

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid .span-2 { grid-column: span 2; }
}
@media (max-width: 780px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar-open .sidebar { transform: translateX(0); box-shadow: 20px 0 45px rgba(0,0,0,.24); }
  .app-shell { margin-left: 0; }
  .menu-button { display: block; }
  .topbar { padding: 0 16px; }
  .main-content { padding: 22px 16px 48px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid .span-2 { grid-column: span 1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .form-card .form-grid.three-cols { grid-template-columns: 1fr; }
  .cards-grid, .split-content { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .process-update-grid { grid-template-columns: 1fr; }
  .process-update-card:nth-child(odd) { border-right: 0; }
  .participant-list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr; }
  .topbar-title { display: none; }
  .record-row { grid-template-columns: 38px minmax(0,1fr) 15px; }
  .record-row .badge { display: none; }
  .auth-card { padding: 27px 21px; }
  .filter-grid { grid-template-columns: 1fr; }
  .search-field { grid-column: span 1; }
  .case-hero dl { grid-template-columns: 1fr; }
  .process-hero dl { grid-template-columns: 1fr; }
  .table-action-stack { flex-direction: column; }
  .danger-zone { align-items: flex-start; flex-direction: column; }
  .detail-heading { align-items: flex-start; flex-direction: column; }
}
