/* Attorney side of the client portal. Uses the workspace palette from attorney.css. */
.tiles:has(> :nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .tiles:has(> :nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .tiles:has(> :nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile-alert { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tile-alert .tile-s { color: var(--accent); font-weight: 600; }
.side-badge { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.74rem; text-align: center; }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-citrus { background: var(--accent-soft); color: var(--accent); }
.card-portal { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

.portal-peek { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 280px); gap: 8px 24px; align-items: center; margin-bottom: 16px; background: var(--surface-2); }
@media (max-width: 800px) { .portal-peek { grid-template-columns: 1fr; } }
.peek-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin: 2px 0; }
.peek-text { margin: 0; color: var(--muted); }
#access { margin-bottom: 16px; }
.invite-box { display: grid; gap: 10px; justify-items: start; margin-bottom: 12px; }
.copy-row { display: flex; gap: 8px; width: 100%; }
.copy-row .input { flex: 1; min-width: 0; }
.invite-form { margin-top: 12px; }
@media (max-width: 600px) { .invite-form .inline-form, .copy-row { flex-wrap: wrap; } }

.thread { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; max-height: 460px; overflow-y: auto; }
.bubble { max-width: 88%; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.bubble.from-firm { justify-self: end; background: var(--accent-soft); border-color: transparent; }
.bubble-who { margin: 0 0 2px; font-size: 0.76rem; color: var(--muted); font-weight: 600; }
.bubble-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.todo-row.status-submitted { background: var(--accent-soft); margin: 0 -18px; padding: 10px 18px; }
.file-line a { font-weight: 600; }
.todo-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 8px; }
.send-back { margin-top: 0; }
.send-back[open] { flex-basis: 100%; }
.share-form { margin-left: 6px; }
.share-toggle { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 1px 9px; font-size: 0.74rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.share-toggle:hover { border-color: var(--accent); color: var(--accent); }
.share-toggle.is-on { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
