:root {
  --ink: #16221e;
  --muted: #6f7b76;
  --faint: #9ba7a3;
  --line: #e5e9e6;
  --paper: #ffffff;
  --canvas: #f5f7f4;
  --sidebar: #172d29;
  --sidebar-soft: #25413c;
  --green: #29665b;
  --green-soft: #eaf4f0;
  --red: #bd5048;
  --red-soft: #fbebea;
  --amber: #b4771d;
  --amber-soft: #fff4df;
  --blue: #416d9b;
  --blue-soft: #edf3f8;
  --shadow: 0 10px 32px rgba(34, 55, 48, 0.07);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--ink); background: var(--canvas); font-family: "Segoe UI", Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px 1fr; }
.sidebar { min-height: 100vh; color: #e8f1ee; background: var(--sidebar); display: flex; flex-direction: column; padding: 22px 14px 15px; }
.brand { display: flex; gap: 11px; align-items: center; margin: 0 8px 29px; }
.brand-mark { width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; color: #17302b; background: #d2e7de; font-family: "Segoe UI", Arial, sans-serif; font-weight: 800; }
.brand strong, .brand span { display: block; }
.brand strong { font: 800 17px/1.1 "Segoe UI", Arial, sans-serif; letter-spacing: .04em; }
.brand span { margin-top: 3px; color: #9bb4ae; font-size: 11px; }
.nav { display: grid; gap: 4px; }
.nav-btn { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 10px; border: 0; border-radius: 9px; color: #a8bdb8; background: transparent; text-align: left; transition: .16s; }
.nav-btn:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-btn.active { color: #fff; background: var(--sidebar-soft); }
.nav-icon { width: 18px; font-size: 16px; text-align: center; }
.nav-label { flex: 1; font-size: 13px; font-weight: 600; }
.nav-badge { min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; color: #fff; background: #aa554d; border-radius: 10px; font-size: 10px; font-weight: 700; }
.mini-calendar { margin: 17px 4px 14px; padding: 10px; border: 1px solid rgba(211,232,225,.13); border-radius: 10px; background: rgba(255,255,255,.04); }
.mini-calendar-head { width: 100%; display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 0 0 8px; color: #e5f0ec; border: 0; border-bottom: 1px solid rgba(255,255,255,.08); background: transparent; text-align: left; }
.mini-calendar-head span { color: #9db5af; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.mini-calendar-head strong { color: #e5f0ec; font-size: 11px; text-transform: capitalize; }
.mini-weekdays, .mini-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mini-weekdays { margin: 9px 0 5px; color: #86a39c; font-size: 9px; text-align: center; }
.mini-day { position: relative; height: 25px; padding: 0; color: #d7e7e2; border: 0; border-radius: 6px; background: transparent; font-size: 10px; }
.mini-day.outside { color: #617970; }
.mini-day.today { outline: 1px solid #8db8ad; }
.mini-day.has-events { color: #18342e; background: #d2e7de; font-weight: 800; }
.mini-day i { position: absolute; right: 2px; bottom: 2px; min-width: 11px; height: 11px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: var(--red); font-style: normal; font-size: 7px; }
.mini-open { width: 100%; margin-top: 8px; padding: 7px; color: #dcebe7; border: 1px solid rgba(211,232,225,.13); border-radius: 7px; background: rgba(255,255,255,.035); font-size: 10px; font-weight: 700; }
.sidebar-bottom { margin-top: auto; }
.security-note { display: flex; gap: 9px; margin: 0 4px 14px; padding: 10px; border: 1px solid rgba(211,232,225,.12); border-radius: 9px; color: #b9d0ca; background: rgba(255,255,255,.035); }
.security-note strong, .security-note small { display: block; }
.security-note strong { margin-bottom: 3px; font-size: 11px; }
.security-note small { color: #8ea8a1; font-size: 9px; line-height: 1.4; }
.security-icon { color: #84b4a9; font-size: 11px; }
.profile { width: 100%; display: flex; align-items: center; gap: 9px; padding: 10px 8px; color: #e1eeea; background: transparent; border: 0; border-top: 1px solid rgba(255,255,255,.09); text-align: left; }
.profile strong, .profile small { display: block; font-size: 11px; }
.profile small { margin-top: 3px; color: #92a9a3; font-size: 10px; }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #2d5b52; background: #d5e8e1; font-size: 10px; font-weight: 700; }
.main { min-width: 0; }
.topbar { height: 74px; display: flex; justify-content: space-between; align-items: center; gap: 22px; padding: 0 35px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.82); }
.global-search { width: min(610px, 60vw); display: flex; align-items: center; gap: 10px; }
.global-search span { color: var(--green); font-size: 26px; line-height: 1; transform: rotate(-18deg); }
.global-search input { flex: 1; padding: 9px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
kbd { padding: 3px 6px; color: #8c9893; border: 1px solid #e1e5e2; border-bottom-width: 2px; border-radius: 4px; background: #fafbfa; font-size: 9px; }
.top-actions { display: flex; gap: 12px; align-items: center; }
.top-status { display: none; max-width: 260px; padding: 8px 10px; color: var(--green); border: 1px solid #cfe0da; border-radius: 8px; background: #f4fbf8; font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-status.visible { display: block; }
.icon-btn { position: relative; width: 36px; height: 36px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.icon-btn b { position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; border: 1px solid white; border-radius: 50%; background: var(--red); }
.primary-btn, .secondary-btn, .ghost-btn, .danger-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 13px; border-radius: 8px; font-size: 12px; font-weight: 700; transition: .15s; }
.primary-btn { color: white; border: 1px solid var(--green); background: var(--green); }
.primary-btn:hover { background: #22574e; }
.secondary-btn { color: var(--green); border: 1px solid #b9d3cc; background: #fff; }
.ghost-btn { color: var(--muted); border: 1px solid var(--line); background: #fff; }
.danger-btn { color: var(--red); border: 1px solid #eec2bf; background: #fff; }
.global-progress { display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 80; padding: 9px 35px 10px; border-bottom: 1px solid #cfe0da; background: #f4fbf8; box-shadow: 0 8px 24px rgba(12,29,24,.2); }
.global-progress.visible { display: grid; gap: 7px; }
.global-progress-text { display: flex; justify-content: space-between; gap: 14px; align-items: center; color: var(--ink); font-size: 12px; }
.global-progress-text span { color: var(--muted); text-align: right; }
.global-progress-close { padding: 4px 8px; color: var(--muted); border: 1px solid #cfe0da; border-radius: 7px; background: #fff; font-size: 11px; font-weight: 700; }
.global-progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #dce9e4; }
.global-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #29665b, #7bbca4); transition: width .2s ease; }
.global-progress.indeterminate .global-progress-track i { width: 45%; animation: progress-slide 1.15s ease-in-out infinite; }
@keyframes progress-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(230%); } }
.view { padding: 31px 35px 48px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.eyebrow { margin-bottom: 5px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: "Segoe UI", Arial, sans-serif; }
h1 { font-size: 27px; letter-spacing: -.04em; }
h2 { font-size: 17px; letter-spacing: -.025em; }
h3 { font-size: 14px; }
.subtitle { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.date-label { color: var(--muted); font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 27px; }
.stat-card { min-height: 135px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); box-shadow: var(--shadow); }
.stat-top { display: flex; justify-content: space-between; gap: 10px; }
.stat-card strong { display: block; margin: 8px 0 4px; font: 800 28px "Segoe UI", Arial, sans-serif; letter-spacing: -.06em; }
.stat-card small { color: var(--muted); font-size: 11px; }
.stat-title { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.stat-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; font-size: 15px; }
.stat-card.red .stat-icon { color: var(--red); background: var(--red-soft); }
.stat-card.amber .stat-icon { color: var(--amber); background: var(--amber-soft); }
.stat-card.green .stat-icon { color: var(--green); background: var(--green-soft); }
.stat-card.blue .stat-icon { color: var(--blue); background: var(--blue-soft); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .74fr); gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: 11px; background: var(--paper); box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 18px 13px; }
.text-btn { padding: 4px; color: var(--green); border: 0; background: none; font-size: 11px; font-weight: 700; }
.alert-list { padding: 0 10px 10px; }
.alert-card { display: grid; grid-template-columns: 37px 1fr auto; gap: 11px; align-items: center; padding: 12px 8px; border-top: 1px solid #edf0ee; }
.alert-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; font-size: 14px; font-weight: 700; }
.alert-card.red .alert-mark { color: var(--red); background: var(--red-soft); }
.alert-card.amber .alert-mark { color: var(--amber); background: var(--amber-soft); }
.alert-card strong, .alert-card small { display: block; }
.alert-card strong { font-size: 12px; }
.alert-card small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.pill { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 20px; white-space: nowrap; font-size: 10px; font-weight: 700; }
.pill.red { color: var(--red); background: var(--red-soft); }
.pill.amber { color: var(--amber); background: var(--amber-soft); }
.pill.green { color: var(--green); background: var(--green-soft); }
.pill.blue { color: var(--blue); background: var(--blue-soft); }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 12px; }
.filter-pill { padding: 7px 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 11px; font-weight: 800; }
.filter-pill.active.red { color: var(--red); border-color: #eec2bf; background: var(--red-soft); }
.filter-pill.active.green { color: var(--green); border-color: #b9d3cc; background: var(--green-soft); }
.filter-pill.active.amber { color: var(--amber); border-color: #efd29d; background: var(--amber-soft); }
.filter-pill.active.blue { color: var(--blue); border-color: #c4d7e8; background: var(--blue-soft); }
.panel-hint { margin: -3px 18px 14px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.quick-actions { padding: 0 12px 13px; }
.quick-btn { width: 100%; display: flex; gap: 10px; align-items: center; padding: 12px 7px; color: var(--ink); border: 0; border-top: 1px solid #edf0ee; background: #fff; text-align: left; font-size: 12px; font-weight: 600; }
.quick-btn span { width: 28px; height: 28px; display: grid; place-items: center; color: var(--green); border-radius: 8px; background: var(--green-soft); }
.quick-note { margin: 8px 18px 17px; padding: 12px; color: #5c6e68; border-radius: 8px; background: #f4f8f6; font-size: 11px; line-height: 1.5; }
.section { margin-top: 20px; }
.table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 15px; color: var(--faint); border-bottom: 1px solid var(--line); background: #fbfcfb; text-align: left; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
td { padding: 14px 15px; color: #44524e; border-bottom: 1px solid #edf0ee; font-size: 12px; }
tr:last-child td { border-bottom: 0; }
.link-btn { padding: 0; color: var(--ink); border: 0; background: none; text-align: left; font-weight: 700; }
.doc-title-btn { color: var(--green); text-decoration: underline; text-decoration-color: rgba(41,102,91,.28); text-underline-offset: 3px; }
.doc-title-btn:hover { color: #1f5149; text-decoration-color: currentColor; }
.muted { color: var(--muted); }
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.case-card { min-height: 205px; padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: var(--shadow); transition: .15s; }
.case-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(34,55,48,.1); }
.case-card-head { display: flex; justify-content: space-between; gap: 9px; margin-bottom: 19px; }
.case-cat { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.case-card h3 { min-height: 43px; line-height: 1.45; }
.case-card p { margin: 8px 0 17px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.person-card-meta { min-height: 34px; }
.person-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.person-data-card { margin-bottom: 14px; }
.person-data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding-top: 4px; }
.card-footer { display: flex; justify-content: space-between; gap: 8px; padding-top: 11px; border-top: 1px solid #edf0ee; color: var(--muted); font-size: 10px; }
.inbox-layout { display: grid; grid-template-columns: minmax(0, 1fr) 264px; gap: 18px; }
.inbox-list { display: grid; gap: 11px; }
.inbox-card { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.inbox-preview { width: 72px; overflow: hidden; border: 1px solid #edf0ee; border-radius: 8px; background: #f7faf8; }
.inbox-preview .doc-thumb-image, .inbox-preview .doc-thumb-placeholder { border-bottom: 0; }
.file-icon { width: 46px; height: 52px; display: grid; place-items: center; color: var(--green); border-radius: 8px; background: var(--green-soft); font: 800 11px "Segoe UI", Arial, sans-serif; }
.inbox-card h3 { margin-bottom: 6px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 10px; }
.inbox-actions { display: grid; gap: 7px; }
.empty { padding: 44px 20px; color: var(--muted); text-align: center; border: 1px dashed #cad6d2; border-radius: 10px; background: rgba(255,255,255,.65); font-size: 12px; }
.upload-side { padding: 16px; }
.upload-side p { color: var(--muted); font-size: 11px; line-height: 1.55; }
.upload-side .primary-btn { width: 100%; margin-top: 7px; }
.upload-side hr { height: 1px; margin: 17px 0; border: 0; background: var(--line); }
.scanner-open { width: 100%; margin-top: 7px; }
.scanner-folder-form { display: grid; gap: 8px; margin: 10px 0 8px; }
.scanner-folder-form .secondary-btn { width: 100%; }
.scanner-local-picker { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.scanner-local-picker input { display: none; }
.folder-path { display: block; padding: 8px; overflow-wrap: anywhere; color: #4e635d; border-radius: 6px; background: #f1f5f3; font-size: 10px; line-height: 1.45; user-select: all; }
.upload-side .capability-note { color: #688078; font-size: 10px; }
.case-detail-head { padding: 19px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) 295px; gap: 18px; }
.case-doc-links { display: grid; gap: 9px; padding: 0 14px 14px; }
.case-doc-link { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 12px; border: 1px solid #edf0ee; border-radius: 9px; background: #fff; }
.case-doc-link small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.doc-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 12px; padding: 0 14px 14px; }
.doc-tile { min-width: 0; overflow: hidden; border: 1px solid #edf0ee; border-radius: 8px; background: #fff; }
.doc-thumb-image, .doc-thumb-placeholder { width: 100%; aspect-ratio: 4 / 5; display: grid; place-items: center; padding: 0; border: 0; border-bottom: 1px solid #edf0ee; background: #f7faf8; cursor: pointer; }
.doc-thumb-image img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.doc-thumb-placeholder span { max-width: 92%; color: #50655f; font-size: 12px; font-weight: 800; line-height: 1.25; text-align: center; }
.archive-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.archive-toolbar span { color: var(--green); font-weight: 800; font-size: 12px; }
.archive-toolbar strong { margin-left: auto; color: var(--muted); font-size: 11px; }
.doc-preview-cell { width: 78px; }
.doc-preview-cell .doc-thumb-image, .doc-preview-cell .doc-thumb-placeholder { width: 58px; border: 1px solid #edf0ee; border-radius: 7px; overflow: hidden; }
.doc-preview-cell .doc-thumb-placeholder span { font-size: 9px; }
.doc-tile-body { min-height: 72px; padding: 9px 10px 6px; }
.doc-tile-body .link-btn { max-width: 100%; text-align: left; line-height: 1.25; }
.doc-tile-body small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.doc-tile-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 10px 10px; }
.case-doc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.calendar-controls { display: flex; align-items: center; gap: 10px; }
.calendar-controls strong { min-width: 160px; text-align: center; text-transform: capitalize; }
.calendar-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -8px 0 18px; padding: 12px 14px; border: 1px solid #eec2bf; border-radius: 10px; background: var(--red-soft); }
.calendar-summary strong { color: var(--red); font-size: 13px; }
.calendar-summary span { flex: 1; color: #8a4a45; font-size: 12px; line-height: 1.4; }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 335px; gap: 18px; }
.month-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); box-shadow: var(--shadow); }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays span { padding: 12px; color: var(--faint); border-bottom: 1px solid var(--line); background: #fbfcfb; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.calendar-day { min-height: 122px; padding: 10px; color: var(--ink); border: 0; border-right: 1px solid #edf0ee; border-bottom: 1px solid #edf0ee; background: #fff; text-align: left; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside { color: #b0bab6; background: #f8faf9; }
.calendar-day.today strong { display: inline-grid; width: 24px; height: 24px; place-items: center; color: #fff; border-radius: 50%; background: var(--green); }
.calendar-day.selected { box-shadow: inset 0 0 0 2px #8db8ad; }
.calendar-day-items { display: grid; gap: 5px; margin-top: 8px; }
.calendar-day-items span { display: block; overflow: hidden; padding: 5px 6px; border-radius: 6px; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; font-weight: 700; }
.calendar-day-items .hearing { color: var(--green); background: var(--green-soft); }
.calendar-day-items .deadline { color: var(--red); background: var(--red-soft); }
.calendar-day-items em { color: var(--muted); font-size: 10px; font-style: normal; }
.day-panel { align-self: start; }
.calendar-overdue { margin: 0 14px 14px; padding: 12px; border: 1px solid #eec2bf; border-radius: 10px; background: var(--red-soft); }
.calendar-overdue h3 { margin-bottom: 9px; color: var(--red); }
.overdue-line { width: 100%; display: block; padding: 9px 0; color: #5d2925; border: 0; border-top: 1px solid rgba(189,80,72,.16); background: transparent; text-align: left; }
.overdue-line:first-of-type { border-top: 0; }
.overdue-line strong, .overdue-line small { display: block; }
.overdue-line strong { font-size: 12px; line-height: 1.35; }
.overdue-line small { margin-top: 3px; color: #8a4a45; font-size: 10px; line-height: 1.35; }
.overdue-more { margin: 8px 0 0; font-size: 11px; }
.day-card { margin: 0 14px 14px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.day-card h3 { margin: 5px 0 9px; line-height: 1.4; }
.day-card p { margin: 8px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.day-time { color: var(--green); font-size: 11px; font-weight: 800; }
.deadline-card .day-time { color: var(--red); }
.checklist { display: grid; gap: 7px; margin: 12px 0; padding: 11px; border-radius: 8px; background: #f7faf9; }
.checklist label { display: flex; gap: 8px; align-items: flex-start; color: #44524e; font-size: 11px; line-height: 1.35; }
.day-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.mail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr); gap: 18px; }
.mail-list { display: grid; gap: 10px; padding: 0 14px 14px; }
.mail-card { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mail-card.compact { display: block; }
.mail-card-foot { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 10px; }
.actionable-card .link-btn { font-size: 13px; line-height: 1.35; }
.mail-card h3 { margin-bottom: 5px; }
.mail-card p { margin: 0 0 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.mail-card small { color: var(--faint); font-size: 10px; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.mail-note { margin-top: 18px; }
.arbitr-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 18px; }
.arbitr-accounts-panel { margin-bottom: 16px; }
.arbitr-account-list { display: grid; gap: 10px; padding: 0 14px 14px; }
.arbitr-account-card { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.arbitr-account-card strong, .arbitr-account-card small { display: block; }
.arbitr-account-card small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.arbitr-list { display: grid; gap: 10px; padding: 0 14px 14px; }
.arbitr-card, .arbitr-change { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.arbitr-change.new { border-color: #efd29d; background: #fffdf7; }
.arbitr-card h3, .arbitr-change h3 { margin: 8px 0; line-height: 1.4; }
.arbitr-card p, .arbitr-change p { margin: 7px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.arbitr-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 32px; color: var(--muted); font-size: 12px; font-weight: 700; }
.checkbox-row input { width: auto; }
.checkbox-row.compact { margin-top: 8px; align-items: flex-start; font-size: 11px; }
.pack-modal { width: min(760px, 96vw); }
.wide-modal { width: min(980px, 96vw); }
.communication-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.comm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.comm-box { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; }
.comm-box h3 { margin-bottom: 10px; }
.comm-box p { margin: 7px 0; color: #44524e; font-size: 12px; line-height: 1.45; }
.comm-box ul { margin: 10px 0 0; padding-left: 18px; }
.comm-box li { margin: 8px 0; color: #44524e; font-size: 12px; line-height: 1.45; }
.suggestion-label { display: inline-block; max-width: 220px; color: #24332f; font-weight: 700; line-height: 1.3; }
.party-box { background: #f4faf6; border-color: #d8eadf; }
.attach-case-box { margin-top: 14px; }
.attach-case-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.document-text-box { margin-top: 14px; }
.document-text-box pre { max-height: 360px; overflow: auto; white-space: pre-wrap; margin: 10px 0 0; padding: 12px; color: #33413d; border-radius: 8px; background: #fff; font: 12px/1.5 "Segoe UI", Arial, sans-serif; }
.file-preview-box { margin-top: 14px; padding: 10px; }
.file-preview-modal { width: min(1120px, 98vw); }
.file-preview-body { padding: 12px; }
.file-preview { width: 100%; height: min(68vh, 720px); border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.original-mini { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfb; }
.original-icon { width: 54px; height: 54px; display: grid; place-items: center; color: var(--green); border: 1px solid #c8ddd6; border-radius: 8px; background: #eef7f3; font-size: 12px; font-weight: 800; }
.original-mini small { display: block; margin-top: 3px; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; line-height: 1.35; }
.original-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.pack-print h1 { margin: 0 0 12px; font-size: 22px; }
.pack-print h3 { margin: 18px 0 8px; }
.pack-print p, .pack-print li { color: #33413d; font-size: 13px; line-height: 1.55; }
.pack-print ul { padding-left: 21px; }
.timeline { padding: 2px 18px 15px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 93px 17px 1fr; gap: 10px; min-height: 70px; }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 100px; top: 18px; bottom: -2px; width: 1px; background: #dce4e0; }
.timeline-date { color: var(--muted); font-size: 10px; }
.timeline-dot { position: relative; z-index: 1; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px #b8d1ca; }
.timeline-dot.overdue, .timeline-dot.late { background: var(--red); box-shadow: 0 0 0 1px #e5aba6; }
.timeline-content strong { display: block; font-size: 12px; }
.timeline-content small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.info-panel { padding: 16px; }
.info-line { padding: 11px 0; border-bottom: 1px solid #edf0ee; }
.info-line:last-child { border-bottom: 0; }
.info-line small, .info-line strong { display: block; }
.info-line small { margin-bottom: 5px; color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.info-line strong { font-size: 12px; line-height: 1.45; }
.draft-card { padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.draft-card h3 { margin: 10px 0 8px; }
.draft-card p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.draft-actions { display: flex; gap: 7px; margin-top: 13px; }
.search-summary { margin-bottom: 16px; color: var(--muted); font-size: 12px; }
.admin-keygen { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 260px) auto; gap: 14px; align-items: end; margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; box-shadow: var(--shadow); }
.admin-keygen h2 { margin: 4px 0 5px; font-size: 18px; }
.admin-keygen p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.admin-keygen .form-label { margin-top: 0; }
.compact-btn { padding: 7px 9px; font-size: 11px; white-space: nowrap; }
.help-btn { padding-inline: 11px; }
.help-body h3 { margin: 16px 0 6px; font-size: 14px; }
.help-body h3:first-child { margin-top: 0; }
.help-body p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.feedback-list { display: grid; gap: 10px; }
.feedback-card { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.feedback-card.answered { background: #fbfcfb; }
.feedback-card h3 { margin: 5px 0 6px; }
.feedback-card p { margin: 0 0 7px; color: var(--ink); font-size: 12px; line-height: 1.45; }
.feedback-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.feedback-meta { display: flex; flex-wrap: wrap; gap: 7px; color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.muted-row { opacity: .62; }
.scanner-inline-status { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(20,35,31,.48); backdrop-filter: blur(3px); }
.modal { width: min(620px, 96vw); max-height: 90vh; overflow: auto; border-radius: 13px; background: #fff; box-shadow: 0 25px 80px rgba(12,29,24,.24); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px 21px; }
.close-btn { width: 30px; height: 30px; color: var(--muted); border: 0; border-radius: 8px; background: #f4f6f5; }
.import-mode { display: grid; gap: 8px; margin-bottom: 14px; }
.import-mode label { display: flex; gap: 10px; align-items: flex-start; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfb; }
.import-mode input { width: auto; margin-top: 2px; }
.import-mode strong, .import-mode small { display: block; }
.import-mode strong { font-size: 12px; }
.import-mode small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.upload-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dropzone { display: grid; place-items: center; min-height: 182px; padding: 20px; border: 1.5px dashed #b6cbc5; border-radius: 10px; background: #f7faf9; text-align: center; }
.dropzone-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 11px; color: var(--green); border-radius: 50%; background: var(--green-soft); font-size: 22px; }
.dropzone h3 { margin-bottom: 6px; }
.dropzone p { margin: 0 0 12px; color: var(--muted); font-size: 11px; }
.dropzone input { display: none; }
.selected-files { display: grid; gap: 7px; margin-top: 12px; }
.selected-file { display: flex; justify-content: space-between; padding: 9px 10px; border-radius: 7px; color: #53615d; background: #f5f7f6; font-size: 11px; }
.selected-file small { display: block; margin-top: 3px; color: var(--faint); font-size: 9px; }
.form-label { display: block; margin: 15px 0 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
select, textarea, .modal input { width: 100%; padding: 10px; color: var(--ink); border: 1px solid var(--line); border-radius: 7px; outline-color: #8db8ad; background: #fff; font-size: 12px; }
textarea { min-height: 330px; resize: vertical; line-height: 1.6; }
textarea.small-textarea { min-height: 110px; }
.review-modal { width: min(760px, 96vw); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.file-link { display: inline-block; margin-top: 7px; color: var(--green); font-size: 11px; font-weight: 700; text-decoration: none; }
.file-link:hover { text-decoration: underline; }
.field-note { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.group-edit-box { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfb; }
.group-edit-box strong { display: block; margin-bottom: 6px; font-size: 12px; }
.group-edit-box p { margin: 0 0 8px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.scanner-progress { display: grid; gap: 7px; margin: 12px 0; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfb; }
.scanner-progress.active { border-color: #9fcbbf; background: #f3faf7; }
.scanner-progress-head { display: flex; justify-content: space-between; gap: 10px; color: var(--ink); font-size: 12px; }
.scanner-progress p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.scanner-progress small { color: var(--faint); font-size: 10px; line-height: 1.45; }
.progress-bar { height: 7px; overflow: hidden; border-radius: 999px; background: #e8eeeb; }
.progress-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4f8f7e, #74b79f); transition: width .25s ease; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 21px; border-top: 1px solid var(--line); background: #fbfcfb; }
.toast { position: fixed; right: 24px; bottom: 22px; z-index: 20; padding: 12px 14px; color: #fff; border-radius: 8px; background: #254d45; box-shadow: var(--shadow); font-size: 12px; animation: toast .2s ease-out; }
@keyframes toast { from { transform: translateY(7px); opacity: 0; } }

.login-mode .sidebar { opacity: .25; pointer-events: none; }
.login-mode .topbar { display: none; }
.login-panel { max-width: 430px; margin: 8vh auto; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 18px 60px rgba(20,35,31,.13); }
.login-brand { margin: 0 0 24px; padding: 0; color: var(--ink); }
.login-panel h1 { margin-bottom: 8px; font-size: 28px; }
.login-panel p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.login-panel form { margin-top: 18px; }
.login-panel .primary-btn { width: 100%; margin-top: 16px; justify-content: center; }
.login-panel .secondary-btn { width: 100%; justify-content: center; }
.login-error { margin-top: 14px; padding: 10px 12px; color: var(--red); border: 1px solid #eec2bf; border-radius: 8px; background: var(--red-soft); font-size: 12px; }
.trial-login-form { padding-top: 4px; }
.trial-divider { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; color: var(--muted); font-size: 12px; }
.trial-divider::before, .trial-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 76px 1fr; }
  .brand div:last-child, .nav-label, .nav-badge, .security-note, .profile span:last-child, .mini-calendar { display: none; }
  .sidebar { padding-inline: 11px; }
  .brand { margin-inline: 7px; }
  .nav-btn { justify-content: center; }
  .profile { justify-content: center; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .app-shell { display: block; }
  .global-progress { padding-inline: 18px; }
  .sidebar { position: sticky; top: 0; z-index: 5; min-height: 0; padding: 10px 10px 8px; }
  .brand { margin: 0 4px 8px; }
  .brand div:last-child { display: block; }
  .nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  .nav-btn { flex: 0 0 52px; height: 44px; justify-content: center; padding: 8px; }
  .nav-label, .nav-badge, .mini-calendar, .security-note, .profile { display: none; }
  .topbar { padding-inline: 18px; }
  .topbar { height: auto; min-height: 62px; align-items: stretch; flex-direction: column; gap: 8px; padding-block: 10px; }
  .view { padding: 23px 18px 40px; }
  .global-search { width: 100%; }
  .global-search input { width: 100%; min-width: 0; }
  .top-actions { justify-content: space-between; }
  .top-status.visible { width: 100%; max-width: none; order: -1; }
  .top-actions .primary-btn { width: auto; flex: 1; overflow: visible; white-space: normal; font-size: 12px; }
  .top-actions .primary-btn span { font-size: 14px; }
  kbd { display: none; }
  .dashboard-grid, .inbox-layout, .detail-grid, .calendar-layout, .mail-layout, .arbitr-layout { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .form-grid, .upload-choices { grid-template-columns: 1fr; }
  .page-head { display: block; }
  .page-head > div:last-child, .page-head > button { margin-top: 12px; }
  .stats { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
  .admin-keygen { grid-template-columns: 1fr; align-items: stretch; }
  .original-mini { grid-template-columns: 46px 1fr; }
  .original-icon { width: 46px; height: 46px; }
  .original-actions { grid-column: 1 / -1; justify-content: stretch; }
  .original-actions .secondary-btn, .original-actions .file-link { flex: 1; }
  .modal-backdrop { padding: 10px; align-items: end; }
  .modal { width: 100%; max-height: 94vh; border-radius: 13px 13px 0 0; }
}

@media print {
  body { background: #fff; }
  .app-shell, .no-print, #toast-root { display: none !important; }
  .modal-backdrop { position: static; display: block; padding: 0; background: #fff; backdrop-filter: none; }
  .modal { width: auto; max-height: none; overflow: visible; box-shadow: none; border-radius: 0; }
  .modal-head { border-bottom: 1px solid #ddd; }
}
