:root {
  color-scheme: light;
  --canvas: #f4f7fb;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --ink: #10233d;
  --muted: #66758a;
  --faint: #8b98a9;
  --line: #dce5ef;
  --primary: #003366;
  --primary-deep: #001e40;
  --primary-soft: #e9f2ff;
  --cyan: #0fa5e9;
  --green: #187a57;
  --amber: #aa701f;
  --red: #b3261e;
  --shadow: 0 18px 40px rgba(16, 35, 61, 0.07);
  --glass: blur(20px);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: linear-gradient(120deg, #eaf0f7 0%, var(--canvas) 30%, #fafcff 100%); }
button, input, select { font: inherit; }
button { border: 0; }

.app-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }
.global-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; border-right: 1px solid rgba(190, 204, 219, .7); background: rgba(250, 252, 255, .72); backdrop-filter: var(--glass); }
.firm-brand { display: flex; gap: 12px; align-items: center; min-height: 112px; padding: 28px 30px; }
.firm-mark { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 12px; background: var(--primary); color: #fff; box-shadow: 0 12px 22px rgba(0, 51, 102, .2); font-size: 20px; font-weight: 800; }
.firm-brand div { display: grid; gap: 3px; }
.firm-brand strong { color: var(--primary-deep); font-size: 20px; }
.firm-brand small { color: var(--muted); font-size: 12px; }
.sidebar-toggle { position:absolute; top:30px; right:-14px; z-index:3; display:grid; width:28px; height:28px; place-items:center; border:1px solid #cad7e4; border-radius:50%; background:#fff; color:var(--primary); box-shadow:0 4px 10px rgba(16,35,61,.1); cursor:pointer; font-size:23px; line-height:1; transition:transform .18s ease, background .18s ease; }.sidebar-toggle:hover { background:#eaf3ff; transform:scale(1.06); }.sidebar-collapsed { grid-template-columns:86px minmax(0,1fr); }.sidebar-collapsed .firm-brand { justify-content:center; padding:28px 14px; }.sidebar-collapsed .firm-brand div, .sidebar-collapsed .new-case-button { display:none; }.sidebar-collapsed .side-nav { margin-top:42px; }.sidebar-collapsed .nav-item { justify-content:center; padding:0; font-size:0; }.sidebar-collapsed .nav-item i { font-size:22px; }.sidebar-collapsed .profile-chip { justify-content:center; margin:0 16px; padding:8px; }.sidebar-collapsed .profile-chip span { display:none; }.sidebar-collapsed .sidebar-toggle { right:-14px; }
.new-case-button { display: flex; align-items: center; justify-content: center; gap: 12px; height: 54px; margin: 12px 20px 24px; border-radius: 8px; background: var(--primary-deep); color: #fff; box-shadow: 0 10px 20px rgba(0, 30, 64, .16); cursor: pointer; font-size: 16px; font-weight: 700; transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.new-case-button:hover { background: var(--primary); box-shadow: 0 14px 28px rgba(0, 30, 64, .2); transform: translateY(-1px); }
.new-case-button span { font-size: 28px; font-weight: 300; line-height: 1; }
.side-nav { display: grid; gap: 4px; }
.nav-item { display: flex; gap: 14px; align-items: center; min-height: 54px; padding: 0 28px; color: #50647e; font-size: 15px; font-weight: 600; }
.nav-item i { display: grid; width: 20px; place-items: center; color: inherit; font-size: 21px; font-style: normal; }
.nav-item.active { position: relative; background: #eaf2ff; color: #154779; }
.nav-item.active::before { position: absolute; left: 0; width: 3px; height: 32px; border-radius: 0 2px 2px 0; background: var(--primary); content: ""; }
.sidebar-footer { display: grid; gap: 8px; margin-top: auto; padding: 18px 0 24px; border-top: 1px solid var(--line); }
.profile-chip { display: flex; gap: 10px; align-items: center; margin: 6px 22px 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.66); }
.profile-chip b { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #d5e3ff; color: var(--primary); font-size: 13px; }
.profile-chip span { display: grid; color: var(--ink); font-size: 13px; font-weight: 700; }.profile-chip small { color: var(--muted); font-size: 11px; font-weight: 400; }

.app-main { min-width: 0; padding-bottom: 40px; }
.topbar { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 20px; padding: 16px clamp(22px, 3vw, 48px); border-bottom: 1px solid rgba(220, 229, 239, .76); background: rgba(255,255,255,.58); backdrop-filter: var(--glass); }
.topbar p, .topbar h1, .panel-heading h2, .panel-heading p, .case-panel-head h2, .case-panel-head p, .preview-head h2, .mini-card h2 { margin: 0; }
.topbar p, .eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.topbar h1 { margin-top: 3px; color: var(--primary-deep); font-size: 23px; letter-spacing: 0; }
.topbar-tools { display: flex; align-items: center; gap: 16px; }.autosave { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 13px; }.autosave i { width: 7px; height: 7px; border-radius: 50%; background: #39a475; box-shadow: 0 0 0 4px rgba(57,164,117,.12); }
.icon-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.72); color: var(--primary); cursor: pointer; font-size: 21px; transition: background 180ms ease, transform 180ms ease; }.icon-button:hover { background: var(--primary-soft); transform: rotate(-18deg); }

.flow-card, .import-panel, .case-panel, .preview-panel { border: 1px solid rgba(220,229,239,.92); background: var(--surface); box-shadow: var(--shadow); backdrop-filter: var(--glass); }
.flow-card { margin: 28px clamp(22px, 3vw, 48px) 22px; border-radius: 14px; padding: 22px 28px; animation: slide-in .45s ease-out both; }
.workflow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }.workflow li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; color: var(--faint); }.workflow li:not(:last-child)::after { position: absolute; top: 20px; left: 52px; right: -12px; height: 1px; background: var(--line); content: ""; }.workflow li > span { z-index: 1; display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: #e4e9ef; color: #536477; font-weight: 800; }.workflow li div { z-index: 1; background: var(--surface-solid); }.workflow li strong, .workflow li small { display: block; }.workflow li strong { color: inherit; font-size: 15px; }.workflow li small { margin-top: 3px; color: var(--muted); font-size: 12px; }.workflow li.current { color: var(--primary); }.workflow li.current > span { background: var(--primary); color: #fff; box-shadow: 0 8px 16px rgba(0,51,102,.19); }.workflow li.done { color: var(--primary); }.workflow li.done > span { background: #d9e8f7; color: var(--primary); font-size: 0; }.workflow li.done > span::after { content: "✓"; font-size: 17px; }.workflow li.done::after { background: #b6d0ea; }

.intake-layout { display: grid; grid-template-columns: minmax(260px, .76fr) minmax(460px, 1.45fr) minmax(330px, .94fr); gap: 20px; align-items: start; padding: 0 clamp(22px, 3vw, 48px); }
.import-panel, .preview-panel { position: sticky; top: 20px; }.import-panel { display: grid; gap: 16px; padding: 20px; border-radius: 12px; animation: slide-in .48s .04s ease-out both; }.panel-heading { display: grid; gap: 8px; }.panel-heading h2, .case-panel-head h2, .preview-head h2 { color: var(--primary-deep); font-size: 20px; line-height: 1.25; }.panel-heading p, .case-panel-head p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.dropzone { position: relative; display: grid; gap: 10px; justify-items: center; padding: 28px 16px 20px; border: 2px dashed #c8d4e1; border-radius: 10px; background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(242,247,253,.8)); text-align: center; cursor: pointer; transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease; }.dropzone[hidden] { display: none; }.dropzone:hover, .dropzone.dragging { border-color: #5b8dc2; box-shadow: 0 12px 26px rgba(0,51,102,.08); transform: translateY(-2px); }.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }.upload-icon { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 50%; background: #dce9ff; color: var(--primary); font-size: 31px; font-weight: 300; }.dropzone strong { color: var(--primary-deep); font-size: 15px; }.dropzone small { color: var(--muted); font-size: 12px; line-height: 1.55; }.upload-cta { display: inline-grid; height: 36px; place-items: center; padding: 0 17px; border-radius: 7px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 700; }
.status-card, .mini-card { border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.58); padding: 14px; }.status-line, .ai-control, .cost-total, .mini-card-title, .preview-head, .case-panel-head, .form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.status-line span, .ai-control span, .mini-card-title span, .cost-total span, .muted-line { color: var(--muted); font-size: 12px; }.status-line strong { color: var(--primary); font-size: 13px; }.meter { height: 6px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: #e4ebf3; }.meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--cyan)); transition: width .5s ease; }.status-card p { color: var(--muted); font-size: 12px; line-height: 1.6; }.ai-control { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }.ai-control select { width: 104px; height: 32px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--primary-deep); }.mini-card-title h2 { color: var(--primary-deep); font-size: 14px; }.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }.chip { padding: 5px 8px; border: 1px solid #efd99e; border-radius: 99px; background: #fff8e7; color: #82560d; font-size: 12px; }.chip.muted { border-color: var(--line); background: #f7f9fb; color: var(--muted); }.chip-button { cursor: pointer; transition: transform 160ms ease, background 160ms ease; }.chip-button:hover { background: #ffefc9; transform: translateY(-1px); }.cost-total { margin-top: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }.cost-total strong { color: var(--green); font-size: 23px; font-variant-numeric: tabular-nums; }.cost-details { display: grid; gap: 8px; padding-top: 10px; }.cost-row { display: grid; gap: 3px; }.cost-row strong { color: var(--primary); font-size: 12px; }.cost-row span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.loading-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 10px; align-items: center; margin-top: 13px; padding: 10px; border: 1px solid #cbddec; border-radius: 8px; background: #f5f9ff; }.loading-card[hidden] { display: none; }.scan-visual { position: relative; width: 42px; height: 50px; overflow: hidden; border: 1px solid #c7d8e9; border-radius: 6px; background: linear-gradient(#d5e4f5 0 0) 8px 12px/25px 2px no-repeat, linear-gradient(#d5e4f5 0 0) 8px 21px/21px 2px no-repeat, linear-gradient(#d5e4f5 0 0) 8px 30px/27px 2px no-repeat, #fff; }.scan-visual span { position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(15,165,233,.45), transparent); animation: scan 1.7s ease-in-out infinite; }.scan-visual i { position: absolute; right: 6px; bottom: 6px; left: 6px; height: 3px; overflow: hidden; background: #dfe7f1; }.scan-visual i::after { display: block; width: 48%; height: 100%; background: var(--primary); content: ""; animation: pulse 1.2s ease-in-out infinite; }.loading-copy { display: grid; gap: 3px; }.loading-copy strong { color: var(--primary); font-size: 12px; }.loading-copy span, .elapsed-time { color: var(--muted); font-size: 11px; line-height: 1.45; }.elapsed-time { align-self: start; padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }

.case-panel { border-radius: 12px; padding: 24px; animation: slide-in .48s .1s ease-out both; }.case-panel-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }.review-badge, #sourceTag { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #bfd2e9; border-radius: 99px; background: #eef6ff; color: #286092; font-size: 11px; font-weight: 700; }.case-form { display: grid; gap: 18px; margin-top: 20px; }fieldset { margin: 0; padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.72); transition: border-color .18s ease, box-shadow .18s ease; }fieldset:focus-within { border-color: #9abce0; box-shadow: 0 8px 20px rgba(0,51,102,.06); }legend { padding: 0 5px; color: var(--primary); font-size: 14px; font-weight: 800; }.grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }label { display: grid; gap: 6px; }label.wide { grid-column: 1/-1; }label > span { color: var(--muted); font-size: 12px; font-weight: 600; }.field-control { position: relative; display: block; }.field-control input, .field-control select { padding-right: 48px; }input, select { width: 100%; height: 40px; border: 0; border-bottom: 1px solid #cad4e0; border-radius: 4px 4px 0 0; outline: none; background: rgba(246,249,252,.85); color: var(--ink); padding: 0 9px; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }input:focus, select:focus { border-bottom: 2px solid var(--primary); background: #fff; box-shadow: 0 4px 8px rgba(0,51,102,.05); }input.autofilled, select.autofilled { background: #eff8f4; border-bottom-color: #72b696; }input.just-filled, select.just-filled { animation: fill .46s ease var(--fill-delay,0ms) both; }input.field-target, select.field-target { border-bottom-color: var(--amber); background: #fffaf0; }.source-button { position: absolute; top: 50%; right: 5px; height: 22px; padding: 0 6px; transform: translateY(-50%); border: 1px solid #c7d8e8; border-radius: 5px; background: #fff; color: #3d6990; cursor: pointer; font-size: 10px; font-weight: 700; transition: background .15s ease, transform .15s ease; }.source-button[hidden] { display: none; }.source-button:hover, .source-button.active { background: #dbeafe; transform: translateY(-50%) scale(1.03); }.form-actions { padding: 16px 18px; border: 1px solid #c8d8ea; border-radius: 9px; background: linear-gradient(120deg, #eef6ff, #fff); }.form-actions div { display: grid; gap: 3px; }.form-actions strong { color: var(--primary); font-size: 14px; }.form-actions span { color: var(--muted); font-size: 12px; }.form-actions button { min-height: 40px; padding: 0 16px; border-radius: 7px; background: var(--primary); color: #fff; cursor: pointer; font-size: 13px; font-weight: 700; transition: transform .17s ease, background .17s ease, box-shadow .17s ease; }.form-actions button:hover:not(:disabled) { background: var(--primary-deep); box-shadow: 0 9px 16px rgba(0,51,102,.17); transform: translateY(-1px); }.form-actions button:disabled { background: #cdd6e0; color: #718094; cursor: not-allowed; }

.preview-panel { min-width: 0; border-radius: 12px; padding: 20px; animation: slide-in .48s .16s ease-out both; }.preview-head { padding-bottom: 14px; border-bottom: 1px solid var(--line); }.preview-head h2 { max-width: 215px; margin-top: 5px; overflow-wrap: anywhere; font-size: 17px; }.source-preview { margin-top: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #f9fbfd; }.source-preview[hidden] { display: none; }.source-preview-head { display: flex; justify-content: space-between; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); }.source-preview-head strong { color: var(--primary); font-size: 12px; }.source-preview-head span { color: var(--muted); font-size: 11px; text-align: right; }.source-preview-body { display: flex; height: calc(100vh - 250px); min-height: 420px; max-height: 780px; justify-content: center; align-items: flex-start; overflow: auto; background: linear-gradient(135deg,#edf2f7,#f8fafc); }.source-preview-body iframe { width: 100%; height: 100%; border: 0; }.source-preview-body img { display: block; max-width: 100%; height: auto; }.source-image-wrap { position: relative; display: inline-block; max-width: 100%; }.source-word-wrap { width: 100%; min-width: 0; }.source-word-wrap .docx-wrapper { width: 100%; padding: 16px; background: transparent; overflow: visible; }.source-word-wrap .docx-wrapper > section.docx { margin-bottom: 16px; transform-origin: top center; box-shadow: 0 9px 20px rgba(0,30,64,.14); }.source-word-wrap .word-highlight { outline: 2px solid #d49c18; outline-offset: 2px; background: rgba(255,215,78,.42) !important; animation: source-pulse .72s ease-out; }.source-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }.source-overlay svg { display: block; width: 100%; height: 100%; }.ocr-highlight { fill: rgba(255,214,79,.25); stroke: #d39a12; stroke-width: 2; animation: source-pulse .72s ease-out; }.ocr-highlight.active { fill: rgba(255,165,0,.45); stroke: #b87500; stroke-width: 3; }.preview-empty { display: grid; min-height: 260px; place-content: center; gap: 8px; border: 1px dashed #cfdae5; border-radius: 9px; margin-top: 14px; color: var(--faint); text-align: center; }.preview-empty span { color: #9ab6d3; font-size: 32px; }.preview-empty p { margin: 0; font-size: 12px; }.source-preview:not([hidden]) + .preview-empty { display: none; }.recognized-text { margin-top: 12px; border-top: 1px solid var(--line); }.recognized-text summary { padding-top: 12px; color: var(--muted); cursor: pointer; font-size: 12px; }.recognized-text pre { max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-word; color: #2e3e50; font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }.source-highlight { outline: 2px solid rgba(176,120,36,.22); background: #fff0a8; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 10; padding: 12px 15px; border: 1px solid #bfd8cb; border-radius: 8px; background: rgba(245,255,250,.94); color: #176947; box-shadow: var(--shadow); font-size: 13px; }.toast[hidden] { display: none; }.toast.show { animation: toast .25s ease-out; }
.nav-item { width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left; transition: background .16s ease, color .16s ease; }.nav-item:hover { background: rgba(222,232,244,.55); color: var(--primary); }.app-view.is-hidden { display: none; }.view-host[hidden] { display: none; }
.icon-button[hidden] { display: none; }
.intake-manual .import-panel, .intake-manual .preview-panel { display: none; }.intake-manual .intake-layout { grid-template-columns: minmax(0, 840px); justify-content: center; }.intake-manual .case-panel { min-height: 720px; }.intake-manual .flow-card { max-width: 840px; margin-right: auto; margin-left: auto; }
.mode-view { max-width: 1060px; margin: 0 auto; padding-top: 82px; text-align: center; }.mode-heading { margin:0 0 30px; }.mode-heading h2 { margin: 6px 0; color:var(--primary-deep); font-size:31px; }.mode-heading p { margin:0; color:var(--muted); font-size:13px; }.mode-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; max-width:920px; margin:0 auto; text-align:left; }.mode-card { position:relative; display:grid; gap:16px; min-height:330px; padding:32px; border:1px solid #dce4ed; border-radius:14px; overflow:hidden; background:rgba(255,255,255,.76); color:var(--ink); cursor:pointer; isolation:isolate; text-align:left; box-shadow:0 15px 32px rgba(16,35,61,.04); transition:transform .35s cubic-bezier(.22,1,.36,1), border-color .25s ease, box-shadow .35s ease, background .25s ease; }.mode-card::before { position:absolute; z-index:-1; inset:0; background:linear-gradient(118deg,transparent 20%,rgba(255,255,255,.8) 48%,transparent 72%); content:""; opacity:0; transform:translateX(-120%); transition:opacity .2s ease, transform .7s cubic-bezier(.22,1,.36,1); }.mode-card::after { position:absolute; z-index:-1; top:-80px; right:-70px; width:220px; height:220px; border-radius:50%; background:rgba(221,231,242,.52); content:""; transition:transform .5s cubic-bezier(.22,1,.36,1), background .25s ease; }.mode-card:hover { border-color:#7ca8d3; background:rgba(255,255,255,.94); box-shadow:0 26px 50px rgba(0,51,102,.15); transform:translateY(-8px); }.mode-card:hover::before { opacity:1; transform:translateX(120%); }.mode-card:hover::after { background:rgba(205,224,245,.7); transform:scale(1.22) translate(-12px,12px); }.mode-card:focus-visible { outline:3px solid rgba(15,165,233,.35); outline-offset:3px; }.mode-icon { z-index:1; display:grid; width:74px; height:74px; place-items:center; border-radius:14px; background:#fff; color:var(--primary-deep); box-shadow:0 9px 20px rgba(16,35,61,.1); font-size:35px; transition:transform .35s cubic-bezier(.22,1,.36,1), background .25s ease, color .25s ease, box-shadow .35s ease; }.mode-card:hover .mode-icon { background:var(--primary); color:#fff; box-shadow:0 14px 24px rgba(0,51,102,.2); transform:translateY(-4px) rotate(-4deg) scale(1.06); }.mode-card h3 { z-index:1; margin:3px 0 -5px; color:var(--primary-deep); font-size:27px; transition:transform .3s ease; }.mode-card:hover h3, .mode-card:hover p { transform:translateX(4px); }.mode-card p { z-index:1; max-width:370px; margin:0; color:var(--muted); font-size:14px; line-height:1.8; transition:transform .3s ease; }.mode-card strong { z-index:1; align-self:end; color:var(--primary); font-size:17px; transition:letter-spacing .25s ease, transform .25s ease; }.mode-card:hover strong { letter-spacing:.02em; transform:translateX(4px); }.mode-card strong i { display:inline-block; margin-left:8px; font-size:22px; font-style:normal; transition:transform .25s ease; }.mode-card:hover strong i { transform:translateX(6px); }.ai-label { position:absolute; z-index:2; top:148px; left:185px; padding:5px 9px; border-radius:99px; background:var(--primary); color:#fff; font-size:10px; font-weight:800; transition:transform .3s ease, box-shadow .3s ease; }.mode-card:hover .ai-label { box-shadow:0 7px 14px rgba(0,51,102,.2); transform:translateX(6px); }.cancel-mode { margin:30px 0 10px; padding:8px 16px; border:0; background:transparent; color:var(--muted); cursor:pointer; font-size:13px; font-weight:700; }.cancel-mode:hover { color:var(--primary); }
.library-tools { display:flex; gap:10px; align-items:center; }.library-tools .secondary-action { margin:0; }.file-library-layout { display:grid; grid-template-columns:280px minmax(0,1fr); gap:22px; align-items:start; }.folder-tree { min-height:590px; padding:14px 0; overflow:hidden; }.folder-tree h3 { padding:0 18px 14px; border-bottom:1px solid var(--line); }.folder-tree h3 span { margin-right:7px; color:var(--primary); }.tree-node { display:flex; width:100%; height:44px; gap:9px; align-items:center; padding:0 17px; border:0; background:transparent; color:#435b73; cursor:pointer; text-align:left; font-size:13px; font-weight:700; }.tree-node:hover { background:#f2f6fa; }.tree-node i { width:11px; color:#798ba0; font-style:normal; }.tree-node b { color:#52718e; font-size:20px; font-weight:400; }.tree-node small { margin-left:auto; color:#8a98a8; font-size:10px; }.tree-children { margin-left:48px; border-left:1px solid #e3e9f0; }.tree-children .tree-node { padding-left:13px; }.tree-node.selected { border-left:3px solid var(--primary); background:#fff; color:var(--primary-deep); box-shadow:0 6px 16px rgba(16,35,61,.06); }.tree-node.selected b { color:var(--primary); }.folder-content { min-width:0; }.folder-upload { display:grid; width:100%; min-height:215px; place-content:center; gap:9px; border:2px dashed #d5dee8; border-radius:12px; background:rgba(255,255,255,.6); color:var(--primary-deep); cursor:pointer; text-align:center; transition:border-color .18s ease, background .18s ease; }.folder-upload:hover { border-color:#8eb2d6; background:#f7fbff; }.folder-upload > span { display:grid; width:56px; height:56px; margin:0 auto 5px; place-items:center; border-radius:50%; background:#e5f0ff; color:var(--primary); font-size:30px; }.folder-upload strong { font-size:19px; }.folder-upload small { color:var(--muted); font-size:13px; }.folder-upload u { color:var(--primary); font-weight:700; }.folder-file-list { margin-top:18px; overflow:hidden; }.folder-list-head { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 18px; border-bottom:1px solid var(--line); }.folder-list-head > div:first-child { display:flex; gap:10px; align-items:center; }.folder-list-head h3 { font-size:16px; }.folder-list-head span { color:var(--muted); font-size:11px; }.folder-file-head, .folder-file-row { display:grid; grid-template-columns:minmax(260px,2.1fr) .85fr .55fr .75fr 28px; gap:14px; align-items:center; }.folder-file-head { padding:11px 18px; background:#f8fafc; color:var(--muted); font-size:11px; font-weight:800; }.folder-file-row { min-height:72px; padding:12px 18px; border-bottom:1px solid #edf1f5; color:#536477; font-size:12px; }.folder-file-row .doc-icon { grid-column:1; grid-row:1; }.folder-file-row .doc-icon.pdf { border-color:#ffd3d1; background:#fff0ef; color:#d84943; }.folder-file-row .file-name { display:grid; grid-column:1; grid-row:1; gap:3px; margin-left:43px; }.folder-file-row .file-name strong { overflow:hidden; color:var(--primary-deep); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }.folder-file-row .file-name small { overflow:hidden; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.module-view { padding: 0 clamp(22px, 3vw, 48px); animation: slide-in .32s ease-out; }.view-hero { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 28px 0 20px; }.view-hero h2 { margin: 5px 0 5px; color: var(--primary-deep); font-size: 28px; line-height: 1.2; }.view-hero p { margin: 0; color: var(--muted); font-size: 13px; }.primary-action, .secondary-action { min-height: 40px; padding: 0 15px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 700; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }.primary-action { background: var(--primary); color: white; box-shadow: 0 9px 16px rgba(0,51,102,.14); }.primary-action:hover { background: var(--primary-deep); box-shadow: 0 12px 22px rgba(0,51,102,.2); transform: translateY(-1px); }.secondary-action { margin-left: 10px; border: 1px solid #c7d6e5; background: #fff; color: var(--primary); }.secondary-action:hover { background: var(--primary-soft); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }.stat-grid article { display: grid; gap: 4px; min-height: 118px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.74); box-shadow: 0 8px 22px rgba(16,35,61,.035); }.stat-grid span, .stat-grid small { color: var(--muted); font-size: 12px; }.stat-grid strong { color: var(--primary-deep); font-size: 30px; line-height: 1.1; }.stat-grid small { color: var(--green); }
.data-card { border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.76); box-shadow: 0 10px 24px rgba(16,35,61,.04); }.data-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }.filter-tabs { display: flex; flex-wrap: wrap; gap: 4px; }.filter-tabs button { min-height: 30px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; }.filter-tabs button:hover, .filter-tabs button.selected { background: #e7f0fa; color: var(--primary); }.filter-tabs b { font-size: 10px; }.search-control { display: flex; width: min(280px, 42vw); height: 34px; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); }.search-control input { height: 30px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: 12px; }.search-control input:focus { border: 0; box-shadow: none; }
.case-table-head, .case-row { display: grid; grid-template-columns: minmax(220px,2.1fr) .6fr .9fr .85fr .85fr .75fr .72fr; gap: 12px; align-items: center; }.case-table-head { padding: 11px 16px; border-bottom: 1px solid var(--line); background: #f7f9fc; color: var(--muted); font-size: 11px; font-weight: 800; }.case-row { width: 100%; padding: 13px 16px; border: 0; border-bottom: 1px solid #edf1f5; background: transparent; color: #4c5d70; cursor: pointer; text-align: left; font-size: 12px; transition: background .15s ease; }.case-row:hover { background: #f2f7fc; }.case-title { display: grid; gap: 3px; min-width: 0; }.case-title b { overflow: hidden; color: var(--primary-deep); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.case-title small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.status-pill { display: inline-flex; width: max-content; align-items: center; justify-content: center; min-height: 23px; padding: 0 7px; border-radius: 99px; font-size: 10px; font-weight: 800; }.status-pill.blue { background: #e7f0fc; color: #286096; }.status-pill.green { background: #e5f5ec; color: #227352; }.status-pill.amber { background: #fff3d9; color: #96631a; }.status-pill.slate { background: #edf1f5; color: #617185; }
.back-link { margin-top: 22px; padding: 0; border: 0; background: transparent; color: var(--primary); cursor: pointer; font-size: 13px; font-weight: 700; }.detail-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 14px 0 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }.detail-heading h2 { margin: 5px 0; color: var(--primary-deep); font-size: 26px; }.detail-heading p { margin: 0; color: var(--muted); font-size: 13px; }.detail-grid { display: grid; grid-template-columns: .92fr 1.28fr; gap: 16px; align-items: start; }.detail-card { grid-row: span 2; padding: 18px; }.data-card h3 { margin: 0; color: var(--primary-deep); font-size: 15px; }.detail-card h3 + dl { margin-top: 14px; }.detail-card h3:not(:first-child) { margin-top: 24px; }.detail-card dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 0; }.detail-card dl div { display: grid; gap: 4px; }.detail-card dt { color: var(--muted); font-size: 11px; }.detail-card dd { margin: 0; color: var(--ink); font-size: 13px; font-weight: 700; }.people-list { display: grid; gap: 11px; margin-top: 14px; }.people-list > span { display: flex; gap: 9px; align-items: center; }.people-list b, .avatar { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: #dceaff; color: var(--primary); font-size: 12px; }.people-list i { display: grid; font-style: normal; }.people-list strong { font-size: 12px; }.people-list small { color: var(--muted); font-size: 10px; }.activity-card, .file-summary { padding: 18px; }.section-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.section-line button { padding: 0; border: 0; background: transparent; color: var(--primary); cursor: pointer; font-size: 11px; font-weight: 700; }.compact-event { position: relative; display: grid; grid-template-columns: 12px minmax(0,1fr); gap: 9px; padding: 14px 0 0; }.compact-event + .compact-event { padding-top: 13px; }.event-dot { width: 8px; height: 8px; margin-top: 4px; border: 2px solid #fff; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 2px #cde6f7; }.compact-event strong { color: var(--ink); font-size: 12px; }.compact-event p { margin: 4px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }.compact-event small { color: var(--faint); font-size: 10px; }.file-line { display: flex; align-items: center; gap: 10px; padding: 12px 0 0; }.file-mark, .doc-icon { display: grid; width: 33px; height: 34px; place-items: center; border: 1px solid #d3ddea; border-radius: 5px; background: #f5f8fc; color: #456a8e; font-size: 9px; font-weight: 800; }.file-line div { display: grid; min-width: 0; gap: 2px; }.file-line strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.file-line small { color: var(--muted); font-size: 10px; }.file-line .status-pill { margin-left: auto; }
.file-table-head, .file-row { display: grid; grid-template-columns: minmax(250px,2.2fr) .75fr .52fr .7fr .72fr .56fr 26px; gap: 12px; align-items: center; }.file-table-head { padding: 11px 16px; border-bottom: 1px solid var(--line); background: #f7f9fc; color: var(--muted); font-size: 11px; font-weight: 800; }.file-row { padding: 12px 16px; border-bottom: 1px solid #edf1f5; color: #526376; font-size: 12px; }.file-name { display: grid; grid-column: 1; grid-row: 1; gap: 2px; margin-left: 44px; }.file-name strong { overflow: hidden; color: var(--primary-deep); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.file-name small { color: var(--muted); font-size: 10px; }.file-row .doc-icon { grid-column: 1; grid-row: 1; }.row-menu { width: 26px; height: 26px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-size: 17px; }.row-menu:hover { background: #edf3f8; }
.timeline-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(260px,.65fr); gap: 16px; align-items: start; }.timeline-card { padding: 18px; }.timeline-filter { display: flex; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }.timeline-filter button { padding: 6px 9px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; }.timeline-filter .selected { background: #e7f0fa; color: var(--primary); }.timeline-list { padding: 8px 0 0 5px; }.timeline-event { position: relative; display: grid; grid-template-columns: 82px 20px minmax(0,1fr); gap: 10px; min-height: 127px; padding-top: 14px; }.timeline-event:not(:last-child)::before { position: absolute; top: 35px; bottom: -6px; left: 91px; width: 1px; background: #d6e0eb; content: ""; }.timeline-event time { color: var(--muted); font-size: 12px; font-weight: 700; }.timeline-pin { z-index: 1; width: 13px; height: 13px; margin-top: 2px; border: 3px solid #d9e9fb; border-radius: 50%; background: var(--primary); }.event-kind { color: var(--primary); font-size: 10px; font-weight: 800; }.timeline-event h3 { margin: 4px 0; color: var(--ink); font-size: 14px; }.timeline-event p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }.timeline-event small { display: block; margin-top: 7px; color: var(--faint); font-size: 10px; }.deadline-card { padding: 18px; }.deadline-card article { display: flex; gap: 10px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }.deadline-card time { color: var(--primary); font-size: 16px; font-weight: 800; }.deadline-card article div { display: grid; gap: 2px; }.deadline-card strong { font-size: 12px; }.deadline-card small, .deadline-card p { color: var(--muted); font-size: 10px; }.deadline-card h3:last-of-type { margin-top: 22px; }.progress-track { height: 7px; margin: 14px 0 0; overflow: hidden; border-radius: 99px; background: #e5ebf2; }.progress-track span { display: block; width: 65%; height: 100%; border-radius: inherit; background: var(--primary); }
.contact-table-head, .contact-row { display: grid; grid-template-columns: minmax(235px,1.55fr) .85fr minmax(170px,1.2fr) .45fr 26px; gap: 12px; align-items: center; }.contact-table-head { padding: 11px 16px; border-bottom: 1px solid var(--line); background: #f7f9fc; color: var(--muted); font-size: 11px; font-weight: 800; }.contact-row { padding: 12px 16px; border-bottom: 1px solid #edf1f5; color: #536477; font-size: 12px; }.contact-row .avatar { grid-column: 1; grid-row: 1; }.contact-row > div { display: grid; grid-column: 1; grid-row: 1; gap: 2px; margin-left: 41px; }.contact-row strong { color: var(--primary-deep); font-size: 12px; }.contact-row small { color: var(--muted); font-size: 10px; }.contact-tag { width: max-content; padding: 4px 7px; border-radius: 99px; background: #edf3f8; color: #526e87; font-size: 10px; font-weight: 700; }
.settings-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 16px; align-items: start; }.settings-menu { display: grid; gap: 3px; padding: 9px; }.settings-menu button { height: 38px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; font-size: 13px; font-weight: 700; }.settings-menu button.selected, .settings-menu button:hover { background: #e9f2fc; color: var(--primary); }.settings-content { padding: 22px; }.settings-content > p { margin: 5px 0 18px; color: var(--muted); font-size: 13px; }.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-top: 1px solid var(--line); }.setting-row div { display: grid; gap: 4px; }.setting-row strong { color: var(--ink); font-size: 13px; }.setting-row small { color: var(--muted); font-size: 11px; }.toggle { position: relative; width: 40px; height: 22px; flex: 0 0 auto; border: 0; border-radius: 99px; background: #c8d2dd; cursor: pointer; transition: background .16s ease; }.toggle i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.16); transition: transform .16s ease; }.toggle.on { background: var(--primary); }.toggle.on i { transform: translateX(18px); }.settings-content h3:not(:first-child) { margin-top: 26px; }.setting-select { display: grid; grid-template-columns: 150px minmax(0,1fr); align-items: center; gap: 14px; margin-top: 12px; }.setting-select span { color: var(--muted); font-size: 12px; }.setting-select select { height: 38px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.tiny-folder, .folder-symbol { position:relative; display:inline-block; flex:0 0 auto; width:22px; height:15px; border:2px solid #5a7b9d; border-radius:3px; background:#dceafb; }.tiny-folder::before, .folder-symbol::before { position:absolute; top:-6px; left:1px; width:10px; height:5px; border:2px solid #5a7b9d; border-bottom:0; border-radius:3px 3px 0 0; background:#dceafb; content:""; }.tree-node.selected .tiny-folder { border-color:var(--primary); background:#cce3fc; }.tree-node.selected .tiny-folder::before { border-color:var(--primary); background:#cce3fc; }.case-folder-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }.all-folders-panel { min-height:550px; padding:20px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.72); }.folder-panel-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-bottom:18px; border-bottom:1px solid var(--line); }.folder-panel-head h3 { margin:0 0 4px; color:var(--primary-deep); font-size:17px; }.folder-panel-head span { color:var(--muted); font-size:12px; }.case-folder-card { display:grid; grid-template-columns:58px minmax(0,1fr) 22px; gap:12px; align-items:center; min-height:104px; padding:17px; border:1px solid #dce5ed; border-radius:9px; background:#fff; color:var(--ink); cursor:pointer; text-align:left; transition:transform .2s ease, border-color .2s ease, box-shadow .2s ease; }.case-folder-card:hover { border-color:#94b6d8; box-shadow:0 12px 24px rgba(0,51,102,.09); transform:translateY(-2px); }.folder-symbol { width:48px; height:32px; border-color:#4d7195; border-radius:5px; background:#dceafb; box-shadow:inset 0 -8px 0 rgba(255,255,255,.3); }.folder-symbol::before { top:-8px; left:2px; width:19px; height:7px; border-color:#4d7195; border-radius:5px 5px 0 0; background:#dceafb; }.folder-symbol i { position:absolute; right:4px; bottom:4px; width:10px; height:2px; border-radius:2px; background:#7da4ca; }.case-folder-card div { display:grid; gap:5px; min-width:0; }.case-folder-card strong { overflow:hidden; color:var(--primary-deep); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }.case-folder-card small { color:var(--muted); font-size:11px; }.folder-arrow { color:#7190af; font-size:19px; transition:transform .2s ease; }.case-folder-card:hover .folder-arrow { transform:translateX(3px); }.folder-empty { padding:30px 18px; color:var(--muted); font-size:13px; text-align:center; }
@keyframes slide-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }@keyframes scan { 0% { transform: translateY(-100%); } 65%,100% { transform: translateY(100%); } }@keyframes pulse { 0%,100% { transform: translateX(-30%); }50% { transform:translateX(140%); } }@keyframes fill { 0% { background:#fff; } 55% { background:#dbeafe; } 100% { background:#eff8f4; } }@keyframes source-pulse { 0% { opacity:.4; } 100% { opacity:1; } }@keyframes toast { from { opacity:0; transform:translateY(7px); } to { opacity:1; transform:translateY(0); } }
@media (max-width: 1530px) { .intake-layout { grid-template-columns: minmax(270px,.72fr) minmax(0,1.28fr); gap: 16px; padding: 0 24px; }.preview-panel { grid-column: 1 / -1; position: static; }.source-preview-body { height: 540px; max-height: none; min-height:360px; }.flow-card { margin-right:24px; margin-left:24px; }.firm-brand { padding-right:20px; padding-left:20px; } }
@media (max-width: 1180px) { .app-shell { grid-template-columns: 86px minmax(0,1fr); }.firm-brand { justify-content:center; min-height:88px; padding:18px; }.firm-brand div, .new-case-button { display:none; }.global-sidebar { width:86px; }.side-nav { margin-top:22px; }.nav-item { justify-content:center; padding:0; font-size:0; }.nav-item i { font-size:22px; }.sidebar-footer { padding-bottom:12px; }.profile-chip { justify-content:center; margin:0 16px; padding:8px; }.profile-chip span { display:none; }.intake-layout { grid-template-columns: minmax(280px,.72fr) minmax(0,1.28fr); }.preview-panel { grid-column:1/-1; position:static; }.source-preview-body { height:540px; max-height:none; }.preview-empty { display:none; }.source-preview[hidden] { display:block; }.source-preview[hidden] .source-preview-head, .source-preview[hidden] .source-preview-body { display:none; } }
@media (max-width: 800px) { .app-shell { display:block; }.global-sidebar { position:static; display:block; width:auto; height:auto; border-right:0; }.firm-brand { justify-content:flex-start; min-height:72px; padding:13px 20px; }.firm-brand div { display:grid; }.side-nav, .sidebar-footer { display:none; }.new-case-button { display:none; }.topbar { padding:14px 20px; }.flow-card { margin:18px 16px; padding:16px; }.workflow { gap:8px; }.workflow li { grid-template-columns:30px minmax(0,1fr); gap:7px; }.workflow li > span { width:30px; height:30px; font-size:12px; }.workflow li:not(:last-child)::after { top:15px; left:37px; right:-4px; }.workflow li strong { font-size:12px; }.workflow li small { display:none; }.intake-layout { display:grid; grid-template-columns:1fr; gap:16px; padding:0 16px; }.import-panel, .preview-panel { position:static; }.case-panel { padding:18px; }.grid { grid-template-columns:1fr; }.form-actions { align-items:stretch; flex-direction:column; }.form-actions button { width:100%; }.source-preview-body { height:500px; min-height:300px; }.module-view { padding: 0 16px; }.view-hero { align-items:flex-start; flex-direction:column; margin:20px 0 16px; }.view-hero h2 { font-size:23px; }.primary-action { width:100%; }.stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }.stat-grid article { min-height:94px; padding:13px; }.stat-grid strong { font-size:24px; }.data-card { overflow-x:auto; }.data-toolbar { align-items:stretch; flex-direction:column; }.search-control { width:100%; }.case-table-head, .case-row { min-width:860px; }.file-table-head, .file-row { min-width:760px; }.contact-table-head, .contact-row { min-width:650px; }.detail-heading { align-items:flex-start; flex-direction:column; }.detail-grid, .timeline-layout, .settings-layout, .file-library-layout { grid-template-columns:1fr; }.detail-card { grid-row:auto; }.timeline-event { grid-template-columns:68px 18px minmax(200px,1fr); }.timeline-event:not(:last-child)::before { left:77px; }.settings-menu { grid-template-columns:repeat(2,minmax(0,1fr)); }.setting-select { grid-template-columns:1fr; gap:6px; }.file-tabs { flex-wrap:nowrap; overflow:auto; }.file-tabs button { white-space:nowrap; }.mode-view { padding-top:20px; }.mode-progress { grid-template-columns:26px 1fr 26px 1fr 26px 1fr 26px; }.mode-progress > span { width:26px; height:26px; font-size:10px; }.mode-progress > div { top:34px; font-size:9px; }.mode-heading { margin:64px 0 20px; }.mode-heading h2 { font-size:24px; }.mode-cards { grid-template-columns:1fr; gap:14px; }.mode-card { min-height:260px; padding:23px; }.mode-card h3 { font-size:23px; }.mode-icon { width:58px; height:58px; font-size:27px; }.ai-label { top:120px; left:158px; }.file-library-layout { gap:14px; }.folder-tree { min-height:0; }.folder-content { min-width:0; }.folder-file-head, .folder-file-row { min-width:650px; }.folder-list-head { align-items:flex-start; flex-direction:column; }.library-tools { width:100%; }.library-tools .search-control { flex:1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; transition-duration:.01ms !important; } }
@media (max-width: 800px) { .sidebar-toggle { display:none; }.case-folder-grid { grid-template-columns:1fr; }.all-folders-panel { min-height:0; padding:14px; }.folder-panel-head { align-items:flex-start; flex-direction:column; }.folder-panel-head .primary-action { width:100%; }.intake-manual .intake-layout { padding:0 16px; }.mode-view { padding-top:42px; } }
