@font-face { font-family: Montserrat; src: url('../api/brand-fonts/Montserrat-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Montserrat; src: url('../api/brand-fonts/Montserrat-SemiBold.ttf') format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: Montserrat; src: url('../api/brand-fonts/Montserrat-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: Montserrat; src: url('../api/brand-fonts/Montserrat-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }
:root {
  --navy: #26489E;
  --navy-hover: #1C3678;
  --navy-2: #0F144E;
  --teal: #26489E;
  --bg: #F5F7FB;
  --panel: #FFFFFF;
  --surface: #F6F7F9;
  --active: #EBF1FA;
  --text: #323232;
  --muted: #787878;
  --line: #DEE8F4;
  --soft: #EBF1FA;
  --amber: #9A6512;
  --amber-bg: #FFF5DF;
  --amber-line: #F5DEAE;
  --green: #277052;
  --green-bg: #E9F5EE;
  --green-line: #C6E6D4;
  --red: #A44343;
  --red-bg: #FDEEEE;
  --red-line: #F6CDCD;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; font-family: Montserrat, Arial, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); font-size: 13px; line-height: 18px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--navy-2); color: #fff; padding: 0 12px; display: flex; flex-direction: column; justify-content: space-between; z-index: 30; }
.brand { height: 70px; display: flex; gap: 11px; align-items: center; padding: 0 8px; border-bottom: 1px solid rgba(255,255,255,.1); font-weight: 600; font-size: 15px; line-height: 20px; }
.brand small { display: block; font-weight: 400; color: #BDC8D3; margin-top: 1px; font-size: 10px; line-height: 14px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: #fff; border-radius: 6px; flex: 0 0 auto; overflow: hidden; }
.brand-mark img { width: 32px; height: 30px; object-fit: contain; }
.nav-caption { color: #7F88B4; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 22px 10px 8px; }
nav { display: grid; gap: 4px; }
.nav-item { border: 0; color: #BDC8D3; background: transparent; text-align: left; padding: 10px 11px; border-radius: 6px; display: flex; align-items: center; gap: 10px; min-height: 40px; transition: background .15s, color .15s; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: var(--navy); font-weight: 600; }
.nav-tag { margin-left: auto; font-size: 8px; color: #BDC8D3; border: 1px solid rgba(255,255,255,.14); padding: 1px 4px; border-radius: 3px; text-transform: uppercase; }
.sidebar-foot { color: #BDC8D3; font-size: 10px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-status { display: flex; align-items: center; gap: 6px; padding: 0 7px 10px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #55B98A; flex: 0 0 auto; }
.dev-badge { margin-left: auto; padding: 1px 5px; border-radius: 3px; background: rgba(255,255,255,.1); color: #D8DEF4; }
.logout-button { width: 100%; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 70px; background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 18px; padding: 10px 24px; }
.global-search { position: relative; flex: 1; max-width: 600px; }
.global-search .icon { position: absolute; left: 11px; top: 10px; color: var(--muted); pointer-events: none; }
.global-search input { width: 100%; height: 38px; border: 1px solid var(--line); background: var(--surface); padding: 0 12px 0 37px; border-radius: 6px; outline: none; }
.global-search input:focus { border-color: var(--navy); background: #fff; box-shadow: 0 0 0 2px var(--active); }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.user-chip { display: flex; align-items: center; gap: 8px; padding-left: 14px; margin-left: 6px; border-left: 1px solid var(--line); }
.user-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; background: var(--active); color: var(--navy); font-size: 11px; font-weight: 700; }
.user-meta { display: flex; flex-direction: column; line-height: 14px; white-space: nowrap; }
.user-meta strong { font-size: 11px; font-weight: 600; }
.user-meta small { color: var(--muted); font-size: 10px; }
.content { padding: 24px 28px 40px; max-width: 1600px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
h1 { font-size: 26px; line-height: 32px; font-weight: 600; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 18px; line-height: 24px; font-weight: 600; margin: 0 0 14px; }
h3 { font-size: 15px; line-height: 20px; font-weight: 600; margin: 0 0 10px; }
.subtitle { color: var(--muted); line-height: 1.5; }
.button { min-height: 36px; border: 1px solid var(--navy); background: var(--navy); color: #fff; padding: 8px 15px; border-radius: 6px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 500; transition: background .15s, border-color .15s; }
.button:hover { background: var(--navy-hover); border-color: var(--navy-hover); }
.button.secondary { color: var(--text); background: #fff; border-color: var(--line); }
.button.secondary:hover { color: var(--navy); background: var(--surface); border-color: var(--navy); }
.button.small { min-height: 30px; padding: 5px 10px; font-size: 11px; }
.button.danger { background: #fff; color: var(--red); border-color: var(--red-line); }
.button.danger:hover { background: var(--red-bg); border-color: var(--red); }
.stats { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 9px; margin-bottom: 18px; }
.stat { min-width: 0; min-height: 104px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; transition: border-color .15s, background .15s; }
.stat:hover { border-color: var(--navy); background: var(--active); }
.stat-top { color: var(--muted); font-size: 9px; line-height: 13px; text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 28px; line-height: 34px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; margin: 2px 0; }
.stat-label { color: var(--muted); font-size: 10px; line-height: 14px; margin-top: auto; }
.stat[data-tone="focus"] { border-color: var(--navy); }
.stat[data-tone="focus"] .stat-value, .stat[data-tone="focus"] .stat-top { color: var(--navy); }
.stat[data-tone="mine"] { background: #FFFDF7; border-color: var(--amber-line); }
.stat[data-tone="mine"] .stat-value, .stat[data-tone="mine"] .stat-top { color: var(--amber); }
.stat[data-tone="overdue"] { background: var(--red-bg); border-color: var(--red-line); }
.stat[data-tone="overdue"] .stat-value, .stat[data-tone="overdue"] .stat-top, .stat[data-tone="overdue"] .stat-label { color: var(--red); }
.system-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.system-grid .panel { margin: 0; padding: 13px; }
.system-grid .panel-head { border: 0; padding: 0; margin-bottom: 7px; align-items: flex-start; }
.system-grid h2 { font-size: 12px; line-height: 17px; margin: 0; }
.system-grid .subtitle { font-size: 10px; line-height: 14px; }
.system-grid .button { margin-top: 5px; }
.grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; min-width: 0; margin-bottom: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 15px; line-height: 20px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.search-input { min-width: 260px; flex: 1; }
select, input, textarea { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: #fff; color: var(--text); min-height: 36px; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 2px var(--active); outline: none; }
textarea { width: 100%; resize: vertical; min-height: 96px; line-height: 1.5; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; color: var(--muted); background: var(--surface); font-size: 10px; line-height: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.45; background: #fff; }
tr:last-child td { border-bottom: 0; }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--surface); }
.code { color: var(--navy); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 11px; line-height: 15px; }
.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border: 1px solid #CBD5E1; border-radius: 4px; background: #EDF2F7; color: #475569; font-size: 10px; line-height: 14px; font-weight: 600; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
td .badge { max-width: 240px; }
td, .list-item, .field-value { overflow-wrap: anywhere; }
.badge.mine, .badge.needs_response { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.badge.done, .badge.no_reply, .badge.sent { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.badge.needs_user, .badge.send_failed { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.badge.needs_data { background: var(--active); color: var(--navy); border-color: var(--line); }
.list { display: grid; }
.list-item { padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-item:last-child { border: 0; }
.list-item:hover .link { color: var(--navy); }
.link { color: var(--navy); font-weight: 600; cursor: pointer; }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }
.loading { padding: 60px; text-align: center; color: var(--muted); }
.detail-title { margin-bottom: 8px; }
.detail-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
.field-label { color: var(--muted); font-size: 10px; line-height: 14px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .03em; }
.field-value { line-height: 1.5; white-space: pre-wrap; }
.full { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-field { display: grid; gap: 5px; min-width: 0; }
.form-field input, .form-field select, .form-field textarea { width: 100%; max-width: 100%; min-width: 0; }
.form-field label { color: var(--muted); font-size: 11px; font-weight: 500; }
.form-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.note-form { display: grid; gap: 10px; }
.email-body { white-space: pre-wrap; line-height: 1.6; max-height: 55vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); padding: 16px; border-radius: 6px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,20,78,.48); z-index: 50; display: grid; place-items: center; padding: 24px; }
.modal { background: #fff; width: min(900px, 100%); max-height: 90vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 24px; position: relative; box-shadow: 0 4px 12px rgba(15,20,78,.08); }
.modal-close { position: absolute; top: 14px; right: 14px; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
.hidden { display: none !important; }
.toast { position: fixed; right: 24px; bottom: 24px; background: var(--navy-2); color: #fff; border: 1px solid rgba(255,255,255,.15); border-radius: 6px; padding: 12px 16px; z-index: 70; box-shadow: 0 4px 12px rgba(15,20,78,.14); }
.menu-button { display: none; }
.chat-panel { padding: 0; overflow: hidden; }
.chat-messages { height: min(62vh, 700px); min-height: 300px; overflow-y: auto; padding: 18px; background: var(--surface); }
.chat-message { max-width: 78%; margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.chat-message.own { margin-left: auto; background: var(--active); }
.chat-author { font-size: 10px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.chat-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.chat-id { color: var(--muted); font-size: 10px; margin-top: 5px; text-align: right; }
.work-form { padding: 16px; border-top: 1px solid var(--line); background: #fff; }
.work-form textarea { min-height: 110px; }
.counterparty-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.counterparty-card { min-height: 142px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); text-align: left; display: flex; flex-direction: column; justify-content: space-between; }
.counterparty-card:hover { border-color: var(--navy); background: var(--active); }
.counterparty-card h2 { font-size: 15px; line-height: 21px; }
.counterparty-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.filter-panel { display: flex; align-items: center; gap: 12px; }
.sync-warning { border-color: var(--amber-line); background: #FFFDF7; }
.conflict-row { display: grid; gap: 7px; padding: 13px 0; border-bottom: 1px solid var(--amber-line); overflow-wrap: anywhere; }
.conflict-row:last-child { border-bottom: 0; }
.waiting-tooltip { position: fixed; z-index: 60; width: min(370px, calc(100vw - 24px)); max-height: 320px; overflow: hidden; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; box-shadow: 0 4px 12px rgba(15,20,78,.12); font-size: 11px; line-height: 1.5; }
.tooltip-label { color: var(--muted); font-size: 10px; margin-top: 10px; text-transform: uppercase; }
.tooltip-alert { color: var(--red); font-weight: 600; margin-top: 10px; }
.original-thread { margin-top: 16px; }
.draft-command { margin-top: 16px; background: var(--surface); }
.draft-command h3 { margin-bottom: 5px; }
.draft-command .form-field { margin-top: 10px; }
.original-thread summary { cursor: pointer; color: var(--navy); font-weight: 600; margin-bottom: 10px; }
.diff-view { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 14px; max-height: 300px; overflow: auto; font-size: 11px; }
.mobile-nav { display: none; }
.mobile-only { display: none; }
.layout-switch { display: flex; gap: 3px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 3px; }
.layout-switch .button { border: 0; }
.layout-switch .active { background: #fff; color: var(--navy); border-color: transparent; }
.project-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; background: #fff; border: 1px solid var(--line); padding: 4px; border-radius: 8px; }
.project-tab { border: 0; border-radius: 5px; background: transparent; color: var(--muted); padding: 8px 14px; font-size: 12px; font-weight: 500; }
.project-tab:hover { color: var(--navy); background: var(--surface); }
.project-tab.active { color: #fff; background: var(--navy); }
.projects-panel { background: transparent; border: 0; padding: 0; }
.projects-panel > .toolbar { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.customer-group { margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.customer-group:last-child { margin-bottom: 0; }
.customer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 0; border-radius: 6px; padding: 9px 11px; margin-bottom: 12px; }
.customer-head h2 { margin: 0; font-size: 15px; line-height: 20px; }
.project-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.project-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #fff; transition: border-color .15s, background .15s; }
.project-card:hover { border-color: var(--navy); background: #FDFEFF; }
.project-card .panel-head { border: 0; padding: 0; margin-bottom: 9px; align-items: flex-start; }
.project-card .code { background: var(--active); padding: 2px 6px; border-radius: 4px; font-size: 10px; }
.project-card .badge { max-width: 180px; min-width: 0; }
.project-card h3 { font-size: 13px; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card-status { line-height: 1.4; overflow: hidden; text-overflow: ellipsis; background: var(--surface); border-radius: 5px; padding: 7px 8px; white-space: nowrap; }
.project-card-next { margin: 8px 0; line-height: 1.45; color: var(--text); font-size: 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.waiting-days { font-size: 10px; color: var(--muted); margin: 0 0 8px; }
.waiting-days.overdue { color: var(--red); font-weight: 700; }
.panel-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; border-top: 1px solid var(--line); padding-top: 9px; font-size: 11px; }
.prospective-group { margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.prospective-group:last-child { margin-bottom: 0; }
.prospective-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.prospective-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; cursor: pointer; min-width: 0; background: #fff; }
.prospective-card:hover { border-color: var(--navy); background: var(--active); }
.prospective-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.prospective-card-top .muted { text-align: right; overflow-wrap: anywhere; }
.prospective-card h3 { margin: 8px 0 10px; line-height: 1.4; }
.prospective-meta { display: grid; gap: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.touch-due, .touch-due strong { color: var(--red); }
.my-day-list { display: grid; gap: 12px; }
.my-day-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; cursor: pointer; }
.my-day-card:hover { border-color: var(--navy); }
.my-day-card.overdue { border-color: var(--red-line); }
.my-day-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.my-day-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.my-day-amount { text-align: right; white-space: nowrap; }
.my-day-next { margin-top: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.my-day-next .field-label { color: var(--navy); font-weight: 600; }
.my-day-card.overdue .my-day-next { background: var(--red-bg); border-color: var(--red-line); }
.my-day-card.overdue .my-day-next .field-label { color: var(--red); }
.login-body { background: var(--bg); }
.login-shell { min-height: calc(100vh - 40px); margin: 20px; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.login-hero { background: var(--navy-2); color: #fff; padding: 42px; display: flex; flex-direction: column; justify-content: space-between; }
.login-hero-brand { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; }
.login-hero-brand .brand-mark { width: 42px; height: 42px; }
.login-hero h2 { color: #fff; font-size: 28px; line-height: 38px; max-width: 520px; }
.login-hero p { color: #BDC8D3; max-width: 520px; line-height: 1.7; }
.login-hero-footer { color: #BDC8D3; font-size: 11px; }
.login-form-side { display: grid; place-items: center; padding: 36px; }
.login { width: min(420px, 100%); }
.login .brand { height: auto; padding: 0 0 22px; color: var(--navy); border: 0; }
.login form { display: grid; gap: 14px; margin-top: 22px; }
.login input { width: 100%; min-height: 42px; }
.login .button { width: 100%; min-height: 42px; }
.login-error { color: var(--red); min-height: 20px; font-size: 11px; }
@media (min-width: 1700px) { .project-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1350px) {
  .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .user-meta { display: none; }
}
@media (max-width: 1100px) {
  .topbar { gap: 10px; padding: 10px 16px; }
  .topbar-actions .button span { display: none; }
  .user-chip { padding-left: 10px; }
  .project-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prospective-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .counterparty-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  body { font-size: 13px; }
  .shell { display: block; }
  .sidebar { display: none; }
  .menu-button { display: none; }
  .mobile-nav { position: fixed; display: grid; grid-template-columns: repeat(5, 1fr); left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mobile-nav button { border: 0; background: transparent; color: var(--muted); font-size: 9px; padding: 5px 1px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
  .mobile-nav button.active { color: var(--navy); font-weight: 700; }
  .mobile-nav .icon { width: 20px; height: 20px; }
  .topbar { position: sticky; padding: 10px 12px; min-height: 64px; flex-wrap: wrap; gap: 8px; }
  .global-search { order: 2; flex-basis: 100%; max-width: none; }
  .topbar-actions { margin-left: 0; width: 100%; justify-content: flex-end; order: 1; }
  .topbar-actions .button span { display: inline; }
  .topbar-actions .button { min-height: 34px; padding: 7px 10px; }
  .user-chip { margin-right: auto; margin-left: 0; padding: 0; border: 0; }
  .content { padding: 16px 12px 100px; }
  .grid { grid-template-columns: 1fr; }
  .detail-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { min-height: 96px; }
  .system-grid { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; padding-bottom: 14px; }
  h1 { font-size: 22px; line-height: 28px; }
  h2 { font-size: 17px; }
  .panel-head { flex-wrap: wrap; }
  .panel { padding: 14px; }
  .modal-backdrop { padding: 8px; }
  .modal { padding: 20px 14px; max-height: 94vh; }
  .search-input { min-width: 100%; }
  .project-cards, .prospective-cards { grid-template-columns: minmax(0, 1fr); }
  .project-card .badge { max-width: 180px; }
  .customer-group, .prospective-group { padding: 10px; }
  .customer-head { align-items: flex-start; flex-wrap: wrap; }
  .prospective-card-top { flex-direction: column; gap: 4px; }
  .prospective-card-top .muted { text-align: left; }
  .counterparty-grid { grid-template-columns: 1fr; }
  .my-day-top { flex-direction: column; gap: 8px; }
  .my-day-amount { text-align: left; }
  .toast { left: 12px; right: 12px; bottom: 86px; }
  .login-shell { margin: 0; min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .login-hero { padding: 26px 22px; min-height: 220px; }
  .login-hero h2 { font-size: 22px; line-height: 30px; margin: 24px 0 8px; }
  .login-hero-footer { display: none; }
  .login-form-side { padding: 26px 20px; }
}
