/* Accord 1.1 — semantic tokens, base, layout, components, responsive. */
@font-face { font-family: Manrope; src: url('../fonts/manrope-variable.ttf') format('truetype'); font-weight: 200 800; font-style: normal; font-display: swap; }
:root {
  --bg: #fcfcfa; --surface: #fff; --sidebar: #f5f5f0; --text: #252621; --muted: #6b6d63;
  --line: #e5e6de; --soft: #f0f1eb; --accent: #bb432b; --accent-hover: #a23721; --accent-soft: #f9e9e2;
  --green: #40634e; --green-soft: #e9f0e7; --amber: #82601f; --amber-soft: #faf1db;
  --radius: 14px; --radius-sm: 8px; --sidebar-width: 240px; --font: Manrope, Arial, sans-serif;
  --shadow: 0 18px 60px #25262115; --focus: #a84126;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a, select, summary, input[type='checkbox'], input[type='radio'] { -webkit-tap-highlight-color: transparent; }
button, summary, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { color: inherit; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 2px; }
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
img { display: block; }
svg.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(27px, 2.4vw, 36px); line-height: 1.25; letter-spacing: -1.3px; font-weight: 650; margin-bottom: 10px; }
h2 { font-size: 18px; letter-spacing: -.4px; font-weight: 700; margin-bottom: 0; }
h3 { font-size: 15px; letter-spacing: -.25px; line-height: 1.5; margin-bottom: 4px; }
p { margin-bottom: 16px; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.eyebrow { text-transform: uppercase; font-size: 10px; font-weight: 800; letter-spacing: 1.7px; color: var(--muted); }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 100; padding: 12px; background: var(--text); color: var(--on-strong); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-sidebar { position: fixed; width: var(--sidebar-width); inset: 0 auto 0 0; background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 31px 20px 18px; z-index: 30; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 28px; letter-spacing: -1.5px; line-height: 1; }
.brand img { width: 31px; height: 33px; }
.brand:hover { color: var(--text); }
.brand-caption { color: var(--muted); margin: 12px 0 29px 41px; font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; }
.workspace-pill { display: flex; align-items: center; gap: 10px; padding: 12px 10px; border: 1px solid var(--line); background: var(--surface-glass); border-radius: 9px; margin-bottom: 27px; }
.workspace-mark { width: 31px; height: 31px; border-radius: 7px; background: var(--text); color: var(--on-strong); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex-shrink: 0; }
.workspace-pill strong { font-size: 12px; display: block; }
.workspace-pill small { font-size: 10px; display: block; color: var(--muted); }
.nav-caption { font-size: 9px; letter-spacing: 1.6px; font-weight: 800; color: var(--muted); padding-left: 13px; margin-bottom: 10px; }
.main-nav { display: grid; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 13px; color: var(--nav-text); border-radius: 7px; font-size: 12px; font-weight: 650; min-height: 44px; }
.nav-link svg.icon { width: 18px; height: 18px; }
.nav-link:hover { background: var(--surface-hover); color: var(--text); }
.nav-link[aria-current='page'] { background: var(--surface); color: var(--accent); box-shadow: 0 2px 5px #25262104; }
.nav-count { margin-left: auto; background: var(--accent-soft); color: var(--accent); font-size: 10px; min-width: 20px; text-align: center; border-radius: 4px; padding: 0 4px; }
.sidebar-bottom { margin-top: auto; padding-top: 25px; }
.help-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px 13px; background: var(--surface-soft); margin-bottom: 20px; }
.help-card .icon { width: 19px; margin-bottom: 8px; }
.help-card strong { display: block; font-size: 11px; }
.help-card p { color: var(--muted); font-size: 10px; line-height: 1.7; margin: 6px 0 11px; }
.help-card a { font-size: 11px; font-weight: 750; display: inline-flex; align-items: center; gap: 5px; }
.help-card a .icon { width: 13px; margin: 0; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 15px 3px 0; border-top: 1px solid var(--line); }
.user-card strong { font-size: 11px; display: block; }
.user-card small { font-size: 10px; color: var(--muted); }
.user-card > .icon { width: 16px; margin-left: auto; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--avatar-bg); color: var(--avatar-fg); font-size: 10px; font-weight: 800; flex-shrink: 0; }
.avatar.client { background: var(--client-avatar-bg); color: var(--client-avatar-fg); }
.app-frame { margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 85px; padding: 0 38px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 19px; background: var(--bg); }
.crumb { font-size: 11px; color: var(--muted); display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.crumb strong { color: var(--text); font-weight: 650; }
.top-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.search-trigger { display: flex; gap: 10px; align-items: center; background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 7px; font-size: 11px; padding: 9px 10px; min-height: 36px; }
.search-trigger .icon { width: 15px; height: 15px; }
kbd { font: inherit; border: 1px solid var(--line); border-radius: 4px; font-size: 10px; padding: 0 5px; }
.view-control { max-width: 172px; border: 0; background: transparent; color: var(--muted); font-size: 11px; padding: 10px 0; min-height: 44px; }
.icon-btn { width: 40px; height: 40px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; display: inline-grid; place-items: center; flex-shrink: 0; }
.icon-btn:hover { background: var(--soft); }
.notification-button { position: relative; }
.notification-button.has-new::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); position: absolute; right: 9px; top: 8px; border: 1px solid #fff; }
.mobile-menu { display: none; }
.workspace-main { width: 100%; max-width: 1600px; padding: 37px 38px 28px; margin: 0 auto; flex: 1; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.page-heading .eyebrow { margin-bottom: 9px; }
.page-heading p { color: var(--muted); font-size: 12px; margin-bottom: 0; }
.button-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.btn { min-height: 40px; padding: 10px 15px; border-radius: 7px; font-size: 11px; font-weight: 750; border: 1px solid var(--line); background: var(--surface); display: inline-flex; gap: 8px; align-items: center; justify-content: center; line-height: 1.5; transition: background .18s, border-color .18s, color .18s; }
.btn .icon { width: 16px; height: 16px; }
.btn:hover { background: var(--soft); color: var(--text); border-color: var(--control-hover); }
.btn-primary { color: #fff; background: var(--accent-solid); border-color: var(--accent-solid); }
.btn-primary:hover { color: #fff; background: var(--accent-solid-hover); border-color: var(--accent-solid-hover); }
.btn-dark { background: var(--text); color: var(--on-strong); border-color: var(--text); }
.btn-dark:hover { background: var(--strong-hover); color: var(--on-strong); }
.btn-soft { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.btn-sm { min-height: 34px; padding: 7px 11px; font-size: 10px; }
.text-link { color: var(--text); font-size: 11px; font-weight: 750; display: inline-flex; align-items: center; gap: 7px; }
.text-link .icon { width: 15px; height: 15px; }
.text-link:hover { color: var(--accent); }
.text-button { border: 0; background: transparent; color: var(--accent); font-size: 11px; font-weight: 750; padding: 8px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 29px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.stat-top .icon { width: 17px; height: 17px; color: var(--muted-icon); }
.stat-value { font-size: 29px; font-weight: 650; letter-spacing: -1.1px; line-height: 1.4; margin: 9px 0 5px; display: block; }
.stat-foot { font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); display: inline-block; flex-shrink: 0; }
.status-dot.orange { background: var(--accent); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.section-heading h2 { font-size: 16px; }
.section-heading p { font-size: 11px; margin-bottom: 0; color: var(--muted); }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.project-grid.overview-projects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.project-card { border: 1px solid var(--line); background: var(--surface); border-radius: 11px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.project-card:hover { box-shadow: 0 7px 18px #25262109; transform: translateY(-2px); }
.project-art { height: 158px; width: 100%; object-fit: cover; border-bottom: 1px solid var(--line); }
.project-card-content { padding: 17px; }
.client-line { display: flex; gap: 7px; align-items: center; margin-bottom: 11px; font-size: 10px; color: var(--muted); }
.mini-mark { width: 20px; height: 20px; border-radius: 5px; display: inline-grid; place-items: center; font-size: 8px; font-weight: 800; }
.peach { background: var(--peach-bg); color: var(--peach-fg); }
.sage { background: var(--sage-bg); color: var(--sage-fg); }
.lilac { background: var(--lilac-bg); color: var(--lilac-fg); }
.sand { background: var(--sand-bg); color: var(--sand-fg); }
.project-title { font-size: 13px; font-weight: 750; letter-spacing: -.15px; display: block; line-height: 1.55; margin-bottom: 5px; }
.project-card p { font-size: 10px; color: var(--muted); margin-bottom: 17px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); margin-bottom: 6px; }
.progress { height: 4px; border-radius: 4px; background: var(--progress-track); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--progress-fill); border-radius: inherit; }
.project-card-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding: 11px 17px; font-size: 9px; color: var(--muted); gap: 5px; }
.project-card-footer .icon { width: 13px; height: 13px; }
.inline { display: inline-flex; align-items: center; gap: 5px; }
.stack { display: grid; gap: 15px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.panel-pad { padding: 22px; }
.attention { background: var(--attention-bg); border: 1px solid var(--attention-border); border-radius: 11px; padding: 20px; }
.attention h2 { font-size: 14px; margin-bottom: 5px; }
.attention > p { font-size: 10px; color: var(--muted); margin-bottom: 17px; }
.attention-item { background: var(--surface); padding: 13px; border: 1px solid var(--attention-border); border-radius: 7px; display: flex; align-items: start; gap: 9px; margin-bottom: 8px; }
.attention-item:last-child { margin-bottom: 0; }
.attention-item .icon { width: 15px; height: 15px; color: var(--accent); margin-top: 2px; }
.attention-item strong { font-size: 10px; display: block; }
.attention-item small { color: var(--muted); font-size: 9px; display: block; margin-top: 3px; }
.attention-item > .icon:last-child { margin-left: auto; color: var(--muted); width: 12px; }
.welcome-note { background: var(--welcome-bg); padding: 21px; border-radius: 10px; position: relative; overflow: hidden; }
.welcome-note .eyebrow { color: var(--welcome-fg); font-size: 8px; }
.welcome-note h3 { font-size: 18px; line-height: 1.4; letter-spacing: -.6px; margin-top: 13px; font-weight: 600; max-width: 190px; }
.welcome-note p { font-size: 10px; color: var(--welcome-text); margin: 12px 0 18px; }
.welcome-note .sun-mark { position: absolute; width: 65px; height: 65px; right: -20px; top: -19px; border: 1px solid #9da991; border-radius: 50%; outline: 12px solid #a4af9a30; }
.activity-panel { margin-top: 24px; }
.activity-row { display: flex; align-items: start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-symbol { background: var(--soft); width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.activity-symbol .icon { width: 14px; height: 14px; }
.activity-row strong { font-size: 11px; font-weight: 600; }
.activity-row p { color: var(--muted); font-size: 10px; margin: 2px 0 0; }
.activity-row time { margin-left: auto; color: var(--muted); font-size: 9px; white-space: nowrap; }
.app-footer { padding: 19px 38px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); font-size: 9px; color: var(--muted); }
.app-footer a { text-decoration: underline; text-underline-offset: 3px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 5px; white-space: nowrap; font-size: 9px; font-weight: 700; background: var(--soft); color: var(--badge-fg); }
.badge::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.badge.pending, .badge.sent { color: var(--amber); background: var(--amber-soft); }
.badge.revision, .badge.overdue { color: var(--danger-text); background: var(--accent-soft); }
.badge.approved, .badge.paid, .badge.completed { color: var(--green); background: var(--green-soft); }
.toolbar { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: none; border-bottom: 2px solid transparent; color: var(--muted); font-size: 11px; padding: 11px 14px; min-height: 42px; font-weight: 650; }
.tab[aria-pressed='true'] { color: var(--accent); border-bottom-color: var(--accent); }
.tab:hover { background: var(--soft); }
.filter-input, .filter-select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--text); font-size: 11px; min-height: 39px; }
.filter-input { width: 210px; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.results-note { font-size: 10px; color: var(--muted); margin-top: 17px; }
.empty-state { border: 1px dashed var(--control-border); background: var(--surface-alt); border-radius: 10px; padding: 45px 22px; text-align: center; color: var(--muted); grid-column: 1 / -1; }
.empty-state h2 { font-size: 17px; color: var(--text); margin: 12px 0 7px; }
.empty-state p { font-size: 12px; margin-bottom: 17px; }
.empty-state > .icon { width: 28px; height: 28px; }
.project-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 23px; }
.detail-cover { width: 100%; height: 235px; object-fit: cover; border-radius: 11px; margin-bottom: 23px; }
.project-description { color: var(--muted); font-size: 12px; max-width: 650px; }
.details-list { margin: 0; display: grid; gap: 18px; }
.details-list div { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }
.details-list dt { color: var(--muted); }
.details-list dd { margin: 0; text-align: right; font-weight: 650; }
.milestone { display: flex; align-items: center; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.milestone:last-child { border-bottom: 0; }
.milestone input { accent-color: var(--green); width: 17px; height: 17px; }
.milestone .milestone-number { width: 23px; height: 23px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: 9px; }
.milestone.done .milestone-number { color: var(--green); border-color: #c8d7c5; background: var(--green-soft); }
.milestone .badge { margin-left: auto; }
.deliverable-row { display: flex; gap: 13px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.deliverable-row:last-child { border-bottom: 0; }
.deliverable-row img { width: 66px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.deliverable-row strong { font-size: 12px; }
.deliverable-row p { font-size: 10px; color: var(--muted); margin: 2px 0 0; }
.deliverable-row > .badge { margin-left: auto; }
.deliverable-row > .icon { width: 15px; color: var(--muted); }
.review-card { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; overflow: hidden; }
.review-card img { width: 100%; height: 200px; object-fit: cover; }
.review-card .review-card-body { padding: 18px; }
.review-card h2 { font-size: 15px; margin: 10px 0 4px; }
.review-card p { font-size: 11px; color: var(--muted); }
.review-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; }
.review-heading { margin-bottom: 21px; }
.review-heading h1 { font-size: 28px; }
.back-link { font-size: 10px; color: var(--muted); display: inline-flex; gap: 7px; align-items: center; margin-bottom: 16px; }
.back-link .icon { width: 13px; height: 13px; }
.review-canvas { background: var(--canvas-bg); border: 1px solid var(--canvas-border); border-radius: 10px; padding: 24px; min-height: 400px; }
.review-canvas > img { width: 100%; max-height: 650px; object-fit: contain; box-shadow: 0 6px 18px #25262112; }
.canvas-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 9px; margin-bottom: 16px; }
.canvas-label { color: var(--muted); font-size: 10px; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.compare-grid figure { margin: 0; }
.compare-grid figcaption { font-size: 10px; font-weight: 650; margin-bottom: 9px; }
.compare-grid img { width: 100%; box-shadow: 0 4px 14px #25262110; }
.decision-card { padding: 21px; }
.decision-card h2 { font-size: 16px; margin-bottom: 9px; }
.decision-card p { font-size: 11px; color: var(--muted); }
.decision-card .btn { width: 100%; margin-top: 9px; }
.decision-note { font-size: 11px; color: var(--muted); padding: 14px; background: var(--soft); border-radius: 7px; margin-top: 15px; overflow-wrap: anywhere; }
.version-history { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 19px; }
.version-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; margin-top: 12px; }
.feedback-panel { margin-top: 22px; }
.comment { display: flex; align-items: start; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment .avatar { width: 28px; height: 28px; font-size: 8px; }
.comment strong { font-size: 10px; }
.comment time { color: var(--muted); font-size: 9px; margin-left: 8px; }
.comment p { font-size: 11px; margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form { display: grid; gap: 11px; margin-top: 17px; }
.comment-form .btn { justify-self: end; }
.field { display: grid; gap: 7px; margin-bottom: 19px; }
.field > label, .field-label { font-size: 11px; font-weight: 750; }
.field input:not([type='checkbox']):not([type='radio']), .field select, .field textarea, textarea.form-control { width: 100%; background: var(--surface); border: 1px solid var(--control-border); border-radius: 7px; padding: 11px 12px; color: var(--text); min-height: 43px; }
textarea { resize: vertical; }
.field small { color: var(--muted); font-size: 10px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-error { color: var(--danger-text); font-size: 11px; padding: 10px 12px; background: var(--danger-soft); border-radius: 6px; margin-bottom: 14px; }
.check-label { font-size: 11px; display: flex; align-items: center; gap: 10px; }
.check-label input { accent-color: var(--accent); width: 17px; height: 17px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
th { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .6px; background: var(--surface-header); padding: 14px 19px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 17px 19px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-alt); }
td .icon-btn { width: 32px; height: 32px; }
.file-name { display: flex; align-items: center; gap: 11px; font-weight: 650; }
.file-icon { width: 33px; height: 39px; display: inline-grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--file-border); border-radius: 6px; color: var(--accent); font-size: 8px; font-weight: 800; }
.file-name small { display: block; color: var(--muted); font-size: 9px; font-weight: 400; }
.messages-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 610px; }
.thread-list { border-right: 1px solid var(--line); padding: 12px; background: var(--surface-alt); }
.thread-button { display: flex; align-items: start; gap: 10px; width: 100%; text-align: left; padding: 15px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; margin-bottom: 6px; }
.thread-button[aria-pressed='true'] { border-color: var(--line); background: var(--surface); }
.thread-button strong { display: block; font-size: 11px; }
.thread-button small { font-size: 9px; color: var(--muted); display: block; line-height: 1.6; margin-top: 4px; }
.conversation { padding: 24px; display: flex; flex-direction: column; min-width: 0; }
.conversation-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.conversation-header h2 { font-size: 14px; }
.conversation-header p { color: var(--muted); font-size: 10px; margin: 3px 0 0; }
.message-list { flex: 1; padding: 22px 0; max-height: 470px; overflow-y: auto; }
.message-item { display: flex; gap: 10px; margin: 0 0 22px; max-width: 90%; }
.message-item.own { margin-left: auto; flex-direction: row-reverse; }
.message-item .avatar { width: 28px; height: 28px; font-size: 8px; }
.message-item strong { font-size: 9px; }
.message-item time { font-size: 8px; color: var(--muted); margin-left: 8px; }
.message-bubble { background: var(--soft); padding: 11px 13px; border-radius: 0 9px 9px 9px; margin-top: 6px; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.own .message-bubble { background: var(--accent-soft); border-radius: 9px 0 9px 9px; }
.message-form { padding-top: 15px; border-top: 1px solid var(--line); }
.message-form textarea { width: 100%; border: 0; background: transparent; min-height: 65px; padding: 5px; font-size: 12px; }
.message-form .button-row { justify-content: space-between; }
.message-form small { color: var(--muted); font-size: 9px; }
.invoice-paper { padding: 47px; max-width: 900px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.invoice-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 45px; }
.invoice-header h2 { font-size: 29px; letter-spacing: -1px; }
.invoice-header p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.invoice-addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 35px; font-size: 12px; }
.invoice-addresses .eyebrow { font-size: 9px; margin-bottom: 9px; }
.invoice-addresses strong { display: block; margin-bottom: 5px; }
.invoice-addresses p { font-size: 11px; color: var(--muted); }
.invoice-totals { margin: 25px 0 35px auto; width: min(100%, 300px); }
.invoice-totals div { display: flex; justify-content: space-between; padding: 9px 0; font-size: 12px; }
.invoice-totals .grand { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 17px; font-size: 18px; font-weight: 750; }
.invoice-note { font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 20px; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 23px; align-items: start; }
.settings-section { padding: 25px; border-bottom: 1px solid var(--line); }
.settings-section:last-child { border-bottom: 0; }
.settings-section h2 { font-size: 15px; margin-bottom: 6px; }
.settings-section > p { color: var(--muted); font-size: 11px; margin-bottom: 23px; }
.settings-actions { display: flex; justify-content: end; padding: 20px 25px; background: var(--surface-alt); gap: 10px; }
.hint-card { background: var(--soft); border-radius: 10px; padding: 22px; }
.hint-card h2 { font-size: 15px; margin-bottom: 9px; }
.hint-card p, .hint-card li { font-size: 11px; color: var(--muted); }
.hint-card ul { padding-left: 18px; }
.help-hero { background: var(--help-bg); padding: 36px; border-radius: 12px; margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.help-hero h2 { font-size: 27px; line-height: 1.3; margin: 12px 0; letter-spacing: -.9px; max-width: 400px; }
.help-hero p { color: var(--muted); font-size: 12px; max-width: 450px; margin-bottom: 0; }
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin-bottom: 30px; }
.help-grid .panel { padding: 23px; }
.help-grid h3 { margin-top: 20px; }
.help-grid p { color: var(--muted); font-size: 11px; margin: 12px 0 19px; }
details { border-bottom: 1px solid var(--line); padding: 17px 0; }
summary { font-size: 12px; font-weight: 650; }
details p { color: var(--muted); font-size: 12px; margin: 13px 0 0; max-width: 800px; }
.storage-warning { margin-bottom: 20px; padding: 11px 14px; border: 1px solid var(--warning-border); background: var(--warning-bg); color: var(--warning-text); font-size: 11px; border-radius: 7px; }
dialog { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 0; width: min(92vw, 490px); max-height: 90vh; color: var(--text); background: var(--surface); }
dialog::backdrop { background: #25262160; backdrop-filter: blur(3px); }
.dialog-header { padding: 23px 25px 17px; display: flex; justify-content: space-between; align-items: start; gap: 15px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 19px; margin-top: 6px; }
.dialog-header .icon-btn { border: 0; background: var(--soft); width: 31px; height: 31px; }
.dialog-body { padding: 23px 25px; }
.dialog-body > p { font-size: 12px; color: var(--muted); }
.dialog-actions { display: flex; justify-content: end; gap: 9px; padding-top: 7px; }
.search-dialog { width: min(92vw, 600px); }
.search-results { display: grid; gap: 4px; max-height: 55vh; overflow: auto; }
.search-result { display: flex; gap: 12px; align-items: center; padding: 12px 7px; border-radius: 7px; font-size: 12px; }
.search-result:hover { background: var(--soft); }
.search-result small { font-size: 9px; color: var(--muted); display: block; }
.toast { position: fixed; bottom: 24px; left: calc(50% + 100px); transform: translateX(-50%); border-radius: 9px; color: #fff; background: #30372d; padding: 13px 19px; box-shadow: var(--shadow); z-index: 80; max-width: 90vw; font-size: 12px; }
.toast.error { background: #8f3324; }
.sidebar-scrim { display: none; }
.login-page { background: var(--bg); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-story { padding: 50px 60px; background: var(--story-bg); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-story h1 { font-size: clamp(38px, 4.7vw, 68px); line-height: 1.13; max-width: 540px; margin: 80px 0 25px; font-weight: 550; letter-spacing: -3px; }
.login-story p { max-width: 400px; color: var(--story-text); font-size: 14px; }
.login-art { width: 100%; max-width: 470px; align-self: center; margin: 35px 0; transform: rotate(-5deg); box-shadow: 0 15px 40px #30372d15; border-radius: 10px; }
.login-story > small { margin-top: auto; color: var(--story-text); font-size: 10px; }
.login-form-area { display: grid; place-items: center; background: var(--bg); padding: 45px; }
.login-form-box { width: min(100%, 380px); }
.login-form-box h2 { font-size: 30px; letter-spacing: -1px; margin: 15px 0 8px; }
.login-form-box > p { color: var(--muted); font-size: 12px; margin-bottom: 30px; }
.role-options { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 12px 0 23px; }
.role-option { border: 1px solid var(--line); padding: 15px; border-radius: 9px; cursor: pointer; background: var(--surface); }
.role-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.role-option input { accent-color: var(--accent); }
.role-option strong { display: block; font-size: 12px; margin: 7px 0 3px; }
.role-option small { display: block; color: var(--muted); font-size: 10px; }
.login-form-box .btn-primary { width: 100%; }
.login-scope { font-size: 10px; color: var(--muted); background: var(--soft); padding: 14px; border-radius: 8px; margin-top: 23px; }
.login-credit { font-size: 10px; text-align: center; color: var(--muted); margin-top: 35px; }
@media (min-width: 1500px) { .project-art { height: 185px; } }
@media (max-width: 1250px) {
  :root { --sidebar-width: 215px; }
  .topbar { padding: 0 25px; }
  .workspace-main { padding: 30px 25px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 265px; gap: 18px; }
  .stat { padding: 16px; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .search-trigger { border: 0; background: none; padding: 10px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-grid { grid-template-columns: minmax(0, 1fr) 270px; gap: 17px; }
  .project-detail-grid { grid-template-columns: minmax(0, 1fr) 250px; }
  .messages-layout { grid-template-columns: 210px minmax(0, 1fr); }
}
@media (max-width: 1050px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-aside { display: grid; grid-template-columns: 1fr 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .review-sidebar { display: grid; grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .help-grid { grid-template-columns: 1fr; }
  .help-grid .panel { display: block; }
  .stats-grid { gap: 9px; }
  .stat { padding: 14px 12px; }
  .stat-top { font-size: 10px; }
  .stat-foot { font-size: 9px; }
}
@media (max-width: 850px) {
  :root { --sidebar-width: 240px; }
  .app-sidebar { transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .app-sidebar { transform: translateX(0); }
  body.nav-open .sidebar-scrim { display: block; position: fixed; inset: 0; background: #25262165; border: 0; z-index: 25; }
  .app-frame { margin-left: 0; }
  .mobile-menu { display: grid; width: 35px; height: 35px; }
  .topbar { height: 72px; gap: 12px; padding: 0 23px; }
  .top-actions { gap: 6px; }
  .view-control { max-width: 150px; }
  .top-avatar { display: none; }
  .workspace-main { padding: 28px 23px; }
  .icon-btn, .mobile-menu, .notification-button, td .icon-btn { min-width: 44px; min-height: 44px; }
  .btn, .btn-sm, .tab { min-height: 44px; }
  .toast { left: 50%; }
  .login-shell { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-form-area { min-height: 100vh; }
}
@media (max-width: 620px) {
  .topbar { padding: 0 17px; gap: 8px; }
  .crumb { font-size: 10px; gap: 6px; max-width: 60px; }
  .crumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .crumb > span:first-child, .crumb > span:nth-child(2) { display: none; }
  .search-trigger { display: flex; padding: 0; min-width: 44px; min-height: 44px; justify-content: center; }
  .view-control { font-size: 10px; max-width: 114px; }
  .notification-button { width: 34px; height: 34px; }
  .workspace-main { padding: 25px 17px; }
  h1 { font-size: 27px; letter-spacing: -.9px; }
  .page-heading { align-items: start; flex-direction: column; gap: 17px; margin-bottom: 23px; }
  .page-heading p { font-size: 11px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 25px; }
  .stat { padding: 15px; }
  .stat-value { font-size: 27px; }
  .project-grid, .project-grid.overview-projects { grid-template-columns: 1fr; }
  .project-art { height: 190px; }
  .project-card-content { padding: 19px; }
  .project-title { font-size: 14px; }
  .project-card p, .project-card-footer { font-size: 11px; }
  .progress-meta { font-size: 10px; }
  .dashboard-aside { grid-template-columns: 1fr; }
  .attention h2 { font-size: 15px; }
  .attention-item strong { font-size: 11px; }
  .attention-item small { font-size: 10px; }
  .project-detail-grid { grid-template-columns: 1fr; }
  .filter-input { width: 100%; }
  .filters { width: 100%; }
  .filter-select { flex: 1; }
  .tabs { width: 100%; }
  .tab { padding: 11px; font-size: 10px; }
  .app-footer { padding: 18px 17px; flex-wrap: wrap; font-size: 9px; }
  .review-canvas { padding: 12px; min-height: 220px; }
  .canvas-toolbar { flex-wrap: wrap; }
  .review-heading h1 { font-size: 27px; }
  .deliverable-row { padding: 13px; gap: 9px; flex-wrap: wrap; }
  .deliverable-row img { width: 50px; height: 41px; }
  .deliverable-row strong { font-size: 11px; }
  .deliverable-row .badge { margin-left: 0; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .messages-layout { grid-template-columns: 1fr; }
  .thread-list { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .thread-button { min-width: 160px; margin-bottom: 0; padding: 10px; }
  .thread-button small { display: none; }
  .conversation { padding: 17px; }
  .message-item { max-width: 100%; }
  .message-form .button-row small { max-width: 170px; }
  .invoice-paper { padding: 24px 18px; }
  .invoice-header { margin-bottom: 30px; }
  .invoice-header .brand { font-size: 22px; }
  .invoice-header h2 { font-size: 23px; }
  .invoice-addresses { gap: 16px; }
  .invoice-paper th, .invoice-paper td { padding: 12px 8px; }
  .invoice-paper td:first-child { white-space: normal; min-width: 110px; }
  .settings-section { padding: 21px 18px; }
  .help-hero { padding: 25px; flex-direction: column; align-items: start; }
  .help-hero h2 { font-size: 25px; }
  .dialog-header { padding: 20px; }
  .dialog-body { padding: 20px; }
  .login-form-area { padding: 30px 23px; }
  .compare-grid { gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  @page { size: A4; margin: 16mm; }
  body { background: var(--surface); font-size: 11px; }
  .app-sidebar, .topbar, .app-footer, .page-heading, .no-print, .toast, dialog, .storage-warning, .sidebar-scrim { display: none !important; }
  .app-frame { margin: 0; }
  .workspace-main { padding: 0; max-width: none; }
  .invoice-paper { border: 0; padding: 0; max-width: none; border-radius: 0; }
  .table-wrap { overflow: visible; }
  .invoice-paper table { table-layout: fixed; }
  .invoice-paper th, .invoice-paper td { white-space: normal; overflow-wrap: anywhere; }
  .invoice-paper tr, .invoice-totals, .invoice-header { break-inside: avoid; }
  a { color: inherit !important; }
}
