/* ============================================================
   Sekce portálu (boční navigace, doklady, termíny, zprávy...)
   Doplňuje site.css; stejné barvy a písmo jako web solvio.cz.
   ============================================================ */
.page:has(.app-shell) { max-width: 1480px; }
.app-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.side-nav { position: sticky; top: calc(var(--header-h) + 1rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .6rem; }
.side-nav nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: .65rem; padding: .5rem .65rem; border-radius: 8px; color: var(--heading); font-weight: 500; font-size: .93rem; }
.side-nav a:hover { background: #f4f8f4; text-decoration: none; }
.side-nav a.active { background: var(--green-tint); color: var(--green-ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--green); }
.side-nav .ico { width: 22px; text-align: center; color: var(--green-dark); font-size: 1rem; flex: none; }
.side-nav .pill { margin-left: auto; min-width: 1.5em; padding: 0 .45em; border-radius: 999px; background: #d64545; color: #fff; font-size: .72rem; font-weight: 700; text-align: center; }
.side-nav .pill.muted-pill { background: var(--line); color: var(--heading); }
.side-sep { height: 1px; background: var(--line); margin: .4rem .3rem; }
.side-head { margin: .7rem .65rem .2rem; font: 600 .68rem/1 var(--font-head); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.app-main { min-width: 0; }
.header-role { margin-left: auto; color: var(--muted); font-size: .85rem; }

/* Přehled klienta */
.todo-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; margin-bottom: 1.25rem; }
.todo { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--text); border-top: 3px solid var(--line); transition: transform .15s; }
.todo:hover { transform: translateY(-2px); text-decoration: none; color: var(--text); }
.todo.attention { border-top-color: #e0a526; }
.todo.ok { border-top-color: var(--green); }
.todo-value { font: 700 1.8rem/1.1 var(--font-head); color: var(--heading); }
.todo-label { font-size: .88rem; }
.small-value { font-size: 1.25rem !important; }
.mini-deadlines li { padding: .3rem 0; }

/* Doklady */
.period-tabs { align-items: center; }
.inline-select { margin: 0 0 0 .4rem; }
.inline-select select { padding: .2rem .5rem; font-size: .86rem; margin: 0; }
.dropzone { position: relative; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; min-height: 120px; margin: 0 0 .9rem !important;
  border: 2px dashed var(--field-line); border-radius: 10px; background: var(--bg); text-align: center; padding: 1rem; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--green); background: var(--green-tint); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.dropzone-text { color: var(--heading); font-weight: 400; }
.checklist { list-style: none; padding: 0; margin: 0 0 .75rem; }
.checklist li { display: flex; align-items: center; gap: .65rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li > span:nth-child(2) { flex: 1; }
.check-ico { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.checklist .missing .check-ico { background: var(--bad-bg); color: var(--bad); }
.checklist .done .check-ico { background: var(--green-tint); color: var(--green-ink); }
.doc-status-form { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; align-items: center; }
.doc-status-form input[type=text] { margin: 0; flex: 1 1 180px; padding: 5px 8px; font-size: .85rem; }

/* Termíny */
.deadlines { list-style: none; padding: 0; margin: 0; }
.deadline { display: flex; align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.deadline:last-child { border-bottom: 0; }
.deadline-date { flex: none; width: 64px; text-align: center; border-radius: 8px; padding: .3rem 0; background: var(--bg); border: 1px solid var(--line); }
.deadline-date strong { display: block; font: 700 1.35rem/1.1 var(--font-head); color: var(--heading); }
.deadline-date span { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; }
.deadline-date.tone-bad { background: var(--bad-bg); border-color: transparent; }
.deadline-date.tone-warn { background: var(--warn-bg); border-color: transparent; }
.deadline-body { flex: 1; min-width: 0; }
.pay-line { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .2rem; color: var(--heading); }
.qr-pop { position: relative; }
.qr-pop summary { list-style: none; }
.qr-pop summary::-webkit-details-marker { display: none; }
.qr-pop-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 14px 40px rgba(30,45,35,.16); padding: .7rem; text-align: center; }
.qr-pop-body svg, .qr-box.inline svg { width: 180px; height: 180px; }
.qr-pop-body p { margin: .3rem 0 0; }
.qr-box.inline { display: inline-block; }
.row-actions { display: flex; gap: .4rem .8rem; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }
tr.done-row td { opacity: .6; }

/* Dokumenty */
.doc-list { display: grid; gap: .9rem; }
.doc-card { margin: 0; }
.doc-card.waiting { border-color: #e0a526; box-shadow: inset 4px 0 0 #e0a526, var(--shadow); }
.doc-head { display: flex; align-items: center; gap: .9rem; }
.doc-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--green-tint); color: var(--green-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; flex: none; }
.doc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.doc-title strong { color: var(--heading); }
.doc-note { margin-top: .6rem; font-size: .92rem; }
.approve-form { margin-top: .9rem; padding: .9rem 1rem; background: var(--warn-bg); border-radius: 8px; }
.approve-form p { margin: 0 0 .5rem; color: var(--heading); }
.file-list li { padding: .35rem 0; border-bottom: 1px solid var(--line); }

/* Zprávy */
.thread-list { list-style: none; padding: 0; margin: 0; }
.thread-list li { display: flex; align-items: center; gap: .8rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.thread-list li:last-child { border-bottom: 0; }
.thread-list a { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--heading); }
.thread-list a:hover { text-decoration: none; }
.thread-list a:hover .thread-subject { color: var(--green-dark); }
.thread-subject { font-weight: 500; display: flex; align-items: center; gap: .45rem; }
.thread-list li.unread .thread-subject { font-weight: 700; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.messages { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .8rem; }
.msg { max-width: 78%; padding: .7rem .95rem; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.msg.mine { align-self: flex-end; background: var(--green-tint); border-color: transparent; }
.msg-meta { margin-bottom: .25rem; color: var(--heading); font-size: .9rem; }
.msg-body p { margin: 0 0 .5rem; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-file { display: inline-block; margin-top: .4rem; font-size: .9rem; }

/* Přehledy */
.chart-wrap { overflow-x: auto; }
.bar-chart { width: 100%; max-height: 240px; min-width: 420px; }
.bar-chart rect.a { fill: var(--green); }
.bar-chart rect.b { fill: #c9d3cb; }
.bar-chart .axis { stroke: var(--line); }
.bar-chart text { font: 11px var(--font-body); fill: var(--text); }
.legend { display: flex; align-items: center; gap: .4rem; }
.legend .key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: .6rem; }
.legend .key.a { background: var(--green); }
.legend .key.b { background: #c9d3cb; }
td.neg { color: var(--bad); }

/* Firma, služby, nápověda, nastavení */
.quick-links { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.4rem 0 1.1rem; }
.quick-links a { padding: .25rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .86rem; color: var(--heading); }
.quick-links a:hover { border-color: var(--green); color: var(--green-dark); text-decoration: none; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.service { display: flex; flex-direction: column; margin: 0; }
.service details { margin-top: auto; }
.service summary { list-style: none; display: inline-block; }
.service summary::-webkit-details-marker { display: none; }
.order-form { margin-top: .75rem; }
.booking { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-left: 4px solid var(--green); }
.booking h2 { margin-bottom: .2rem; }
.booking p { margin: 0; }
.article p, .article li { line-height: 1.7; }
.article-list li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.article-list li.current a { font-weight: 700; }
.preview { padding: .8rem 1rem; background: var(--bg); border-radius: 8px; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .6rem 1.2rem; margin-bottom: 1rem; }
label.module { align-items: flex-start !important; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; margin: 0 !important; }
label.module > span { display: flex; flex-direction: column; }
label.module input { margin-top: .3rem; }
.narrow-input { max-width: 110px; }
.page.wide { max-width: 1600px; }
.service-edit { margin-bottom: .9rem; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; gap: 1rem; }
  .app-shell > * { min-width: 0; }
  .side-nav { position: static; padding: .4rem; min-width: 0; max-width: 100%; }
  .side-nav nav { flex-direction: row; overflow-x: auto; gap: .25rem; }
  .side-nav a { white-space: nowrap; }
  .side-sep, .side-head { display: none; }
  .msg { max-width: 92%; }
}

/* Drobnosti */
.tabs a.active .muted { color: rgba(255,255,255,.85); }
.is-staff .user { margin-left: 1.25rem; }

/* Bankovní výpisy */
.stmt-summary { display: flex; flex-direction: column; gap: 1rem; }
.stmt-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem 1.4rem; }
.stmt-facts > div { display: flex; flex-direction: column; gap: .1rem; }
.stmt-facts strong { color: var(--heading); font: 600 1.05rem/1.3 var(--font-head); }
.stmt-progress { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; font-size: .92rem; }
.stmt-progress progress { flex: 1 1 220px; height: 10px; appearance: none; border: 0; border-radius: 999px; background: var(--line); overflow: hidden; }
.stmt-progress progress::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
.stmt-progress progress::-webkit-progress-value { background: var(--green); border-radius: 999px; }
.stmt-progress progress::-moz-progress-bar { background: var(--green); border-radius: 999px; }
.stmt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem; margin: -.4rem 0 1.1rem; }
.stmt-actions form { margin: 0; }
.amount.in, .tx-amount.in { color: var(--green-ink); }
.amount.out, .tx-amount.out { color: var(--heading); }
.tx-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; margin-bottom: .9rem; }
.tx-toolbar .tabs { margin: 0; }
.tx-search { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin: 0; }
.tx-search select, .tx-search input { margin: 0; padding: .35rem .6rem; font-size: .88rem; width: auto; }
.tx-search input[type=search] { min-width: 240px; }
.tx-list { display: flex; flex-direction: column; gap: .45rem; }
.tx { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.tx.needs { box-shadow: inset 3px 0 0 #e0a526, var(--shadow); }
.tx[open] { border-color: var(--green); }
.tx-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto 150px; align-items: center; gap: .9rem; padding: .6rem .9rem; cursor: pointer; list-style: none; }
.tx-row::-webkit-details-marker { display: none; }
.tx-row:hover { background: #f7faf7; border-radius: 10px; }
.tx-date { display: flex; flex-direction: column; line-height: 1.15; }
.tx-date strong { color: var(--heading); }
.tx-main { display: flex; flex-direction: column; min-width: 0; }
.tx-main strong { color: var(--heading); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-tags, .tx-flags { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.tx-flags .flag { font-size: .85rem; color: var(--heading); white-space: nowrap; }
.tx-amount { text-align: right; font: 600 1rem/1.2 var(--font-head); white-space: nowrap; }
.chip { display: inline-block; padding: .05rem .55rem; border-radius: 999px; background: var(--green-tint); color: var(--green-ink); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.tx-body { padding: .2rem 1rem 1rem; border-top: 1px solid var(--line); }
.tx-facts { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin: .8rem 0; }
.tx-facts > div { display: flex; gap: .4rem; }
.tx-facts > div.wide { flex-basis: 100%; }
.tx-facts dt { color: var(--muted); font-size: .85rem; }
.tx-facts dd { margin: 0; color: var(--heading); font-size: .9rem; }
.tx-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.tx-cols h3 { margin: .4rem 0 .5rem; font-size: .95rem; }
.small-zone { min-height: 64px !important; margin-bottom: .5rem !important; }
.tx-attach, .tx-comment { margin: .4rem 0 0; }
.tx-comment textarea { margin-bottom: .4rem; }
.tx-nodoc { margin: .5rem 0 0; }
.tx-nodoc .link { font-size: .86rem; }
.compact-messages { gap: .5rem; margin-bottom: .6rem; }
.compact-messages .msg { max-width: 100%; padding: .5rem .75rem; }
.tx-tagform { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 1rem 0 0; padding-top: .8rem; border-top: 1px dashed var(--line); }
.chip-check { position: relative; display: inline-flex !important; margin: 0 !important; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { padding: .15rem .65rem; border-radius: 999px; border: 1px solid var(--line); font-size: .82rem; color: var(--heading); background: var(--surface); }
.chip-check input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.chip-check input:focus-visible + span { outline: 2px solid var(--green-dark); outline-offset: 1px; }
.tx-tagform .new-tag { width: 150px; margin: 0; padding: .25rem .55rem; font-size: .85rem; }
.help-list li { padding: .3rem 0; }
@media (max-width: 980px) {
  .tx-row { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .tx-tags, .tx-flags { grid-column: 2 / 4; justify-content: flex-start; }
  .tx-amount { grid-row: 1; grid-column: 3; }
  .tx-cols { grid-template-columns: 1fr; }
}
.tx-comment textarea { font: inherit; font-size: .92rem; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; margin-bottom: .9rem; }
.account-card { border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; display: flex; flex-direction: column; gap: .4rem; }
.account-card.selected { border-color: var(--green); box-shadow: inset 3px 0 0 var(--green); }
.account-card.hidden-account { opacity: .6; }
.account-link { display: flex; gap: .65rem; align-items: flex-start; color: var(--text); }
.account-link:hover { text-decoration: none; }
.account-link:hover strong { color: var(--green-dark); }
.account-text { display: flex; flex-direction: column; min-width: 0; }
.account-text strong { color: var(--heading); }
.account-stats { display: flex; flex-wrap: wrap; gap: .3rem .7rem; align-items: center; }
.account-edit summary { list-style: none; cursor: pointer; }
.account-edit summary::-webkit-details-marker { display: none; }
.account-edit form { margin-top: .5rem; }
.add-account > summary { list-style: none; display: inline-block; }
.add-account > summary::-webkit-details-marker { display: none; }
.add-account form { margin-top: .8rem; }
.row-form { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: flex-end; }
.row-form label { margin: 0; }
.bank-badge { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 28px; padding: 0 .35rem; border-radius: 6px;
  background: var(--green-tint); color: var(--green-ink); font: 700 .78rem/1 var(--font-head); letter-spacing: .02em; }
.account-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 1.1rem 0 .5rem; font-size: 1rem; font-weight: 500; }
.account-head:first-child { margin-top: 0; }
.account-missing { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.account-missing.ok-line { color: var(--green-ink); }
.missing-statements td .badge { margin: 0 .25rem .2rem 0; }

.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; }
@media (max-width: 980px) { .row3 { grid-template-columns: 1fr; } }
.cur { display: inline-block; padding: 0 .4rem; border-radius: 4px; background: #eef1ef; color: var(--heading); font: 600 .75rem/1.5 var(--font-head); letter-spacing: .03em; }
.currency-lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.currency-lines li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.currency-edit { border: 1px solid var(--line); border-radius: 8px; padding: .3rem .7rem .5rem; margin: 0 0 .6rem; }
.currency-edit legend { font: 600 .8rem var(--font-head); padding: 0 .3rem; }
.bank-logo { flex: none; width: 46px; height: 46px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); padding: 3px; }
.bank-logo.small, .bank-badge.small { width: 26px; height: 26px; min-width: 26px; border-radius: 5px; padding: 1px; font-size: .62rem; vertical-align: middle; }
.bank-logo.large, .bank-badge.large { width: 54px; height: 54px; min-width: 54px; }
.bank-badge { height: 46px; min-width: 46px; }
.account-head .bank-logo, .account-head .bank-badge { width: 32px; height: 32px; min-width: 32px; }
.stmt-bank { display: grid !important; grid-template-columns: auto 1fr; column-gap: .7rem; align-items: center; }
.stmt-bank > .bank-logo, .stmt-bank > .bank-badge { grid-row: 1 / span 3; }
.with-logo { white-space: nowrap; }
.reassign { margin: -.3rem 0 1rem; }
.reassign form { margin-top: .6rem; }

/* Logo firmy */
img.company-avatar.has-logo { object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 2px; }
.company-avatar.large { width: 56px; height: 56px; font-size: 1.15rem; border-radius: 12px; }
.company-title { display: flex; align-items: center; gap: .9rem; }
.company-title h1 { margin: 0; }
.logo-edit { display: flex; align-items: flex-start; gap: 1rem; }
.logo-edit form { flex: 1; margin: 0; }
.logo-admin { margin: -.4rem 0 1rem; }
.logo-admin form { margin-top: .6rem; }

/* Párování pohybů s doklady */
.tone-info { color: var(--done); background: var(--done-bg); }
.inline-form { display: inline-flex; gap: .4rem; align-items: center; margin-left: .4rem; }
.match-suggestions { margin: .6rem 0; padding: .6rem .8rem; background: var(--done-bg); border-radius: 8px; }
.match-suggestions p { margin: 0 0 .3rem; }
.match-suggestion { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; align-items: center; padding: .3rem 0; border-top: 1px solid rgba(36, 90, 140, .12); }
.match-suggestion:first-child { border-top: 0; }
.match-suggestion > span { display: flex; flex-direction: column; min-width: 0; }
.tx-pair { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 0; }
.tx-pair select { flex: 1 1 14rem; min-width: 0; }
.facts-line { display: flex; flex-wrap: wrap; gap: .2rem .8rem; font-size: .82rem; color: var(--muted); }
.inbox-box { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.inbox-box code { font-size: .95rem; padding: .2rem .5rem; background: var(--green-tint); color: var(--green-ink); border-radius: 6px; word-break: break-all; }
.tx-link { display: block; color: inherit; text-decoration: none; margin-bottom: .5rem; }
.tx-link:hover { border-color: var(--green); }
.msg.internal { background: #fff8e1; border: 1px dashed #e0b84c; }
.nowrap { white-space: nowrap; }
code.wrap { white-space: pre-wrap; word-break: break-all; font-size: .8rem; }

/* Client portal: categories in the header, their pages in the left menu */
.client-cats { gap: 22px; min-width: 0; }
.client-cats a { position: relative; display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.client-cats .pill { min-width: 1.5em; padding: 0 .45em; border-radius: 999px; background: #d64545; color: #fff; font-size: .68rem; font-weight: 700;
  letter-spacing: 0; text-align: center; line-height: 1.55; }
.side-nav .side-head:first-child { margin-top: .35rem; }
@media (max-width: 980px) {
  .client-cats { order: 3; flex-basis: 100%; overflow-x: auto; gap: 16px; padding-bottom: 4px; }
  .site-header .header-inner { flex-wrap: wrap; row-gap: .4rem; padding-top: .5rem; padding-bottom: .5rem; }
}

/* Employees: form sections */
fieldset.plain { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
fieldset.plain legend { font: 600 .95rem var(--font-head); padding: 0; margin-bottom: .4rem; }
.card.inset.muted { opacity: .75; }
td.bad, div.bad { color: var(--bad); font-weight: 600; }
/* Narrow screens: wide tables scroll inside their card instead of widening the page. */
.cols > * { min-width: 0; }
@media (max-width: 760px) { .card { overflow-x: auto; } }

/* Pracovní spis */
.case-tabs a { font-size: .8rem; padding: .15rem .6rem; }
.deficits { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.deficits li { border-radius: 999px; padding: .12rem .7rem; font-size: .84rem; }
.deficits li a { color: inherit; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; }
.section-head h2 { margin-bottom: .5rem; }
.inline-uploads { display: flex; flex-wrap: wrap; gap: .4rem; align-items: flex-start; }
.case-upload > summary { list-style: none; cursor: pointer; }
.case-upload > summary::-webkit-details-marker { display: none; }
.case-upload[open] { flex-basis: 100%; }
.case-docs { list-style: none; padding: 0; margin: 0; }
.case-doc { border-top: 1px solid var(--line); padding: .6rem 0; }
.case-doc:first-child { border-top: 0; }
.case-doc.voided { opacity: .65; }
.case-doc.voided .case-doc-name { text-decoration: line-through; }
.case-doc-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.case-doc-name { font-weight: 600; overflow-wrap: anywhere; }
.case-doc-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .6rem; }
.case-doc-forms h4, .checklist-phase { margin: 0 0 .4rem; font-size: .9rem; }
.case-notes { list-style: none; padding: 0; margin: 0; }
.case-notes li { border-top: 1px solid var(--line); padding: .55rem 0; }
.case-notes li:first-child { border-top: 0; }
.case-notes li p { margin: .25rem 0; }
.checklist { list-style: none; padding: 0; margin: 0 0 .8rem; }
.checklist li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; padding: .2rem 0; }
.checklist li .tick { width: 1.1em; text-align: center; color: var(--muted); }
.checklist li.done .tick { color: var(--ok); font-weight: 700; }
.checklist .inline-form { gap: .4rem; }
.facts dd p { margin: 0; }
.tone-info a, .badge.tone-info { color: var(--done); }
.case-card-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.1rem; align-items: start; }
.case-card-layout .facts { grid-template-columns: minmax(9rem, 14rem) 1fr; }
@media (max-width: 1100px) { .case-card-layout { grid-template-columns: minmax(0, 1fr); } }

/* Passkeys, calendar link, notices (2026-11-14) */
.or-line { display: flex; align-items: center; gap: .7rem; margin: 1.1rem 0 .8rem; color: var(--muted); font-size: .85rem; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.key-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.key-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.copy-field { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: .82rem; }
.passkey-add { margin-top: .4rem; }
.scan-box { margin: 0 0 1rem; padding: .8rem .9rem; border: 1px dashed var(--green); border-radius: 10px; background: var(--green-tint); }
.scan-take { cursor: pointer; margin-right: .6rem; }
.scan-pages { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; margin: .7rem 0 .3rem; }
.scan-pages li { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.scan-pages img { width: 88px; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
@media (min-width: 900px) { .scan-box .muted.small:first-of-type { display: inline; } }
.mine-toggle { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--text); white-space: nowrap; margin-right: auto; }
.mine-box { width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; background: #fff; }
.mine-toggle.on .mine-box { background: var(--green); border-color: var(--green); color: #fff; }
.pre-line { white-space: pre-line; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
