:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --ink: #172339; --muted: #637289; --soft: #8793a5; --line: #e5eaf0;
  --paper: #fff; --fog: #f6f8fb; --accent: #ed6a38; --accent-dark: #b6401a;
  --accent-light: #fff1e9; --blue: #365fc8; --green: #128268; --radius: 12px;
  font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fog); color: var(--ink); line-height: 1.55; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .48; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; letter-spacing: -.035em; line-height: 1.25; }
h2 { font-size: 17px; letter-spacing: -.015em; }
h3 { font-size: 14px; }
small { font-size: 12px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #f3a281; outline-offset: 3px; }
.icon { width: 18px; height: 18px; display: inline-block; flex-shrink: 0; vertical-align: middle; opacity: .68; }
.icon.small { width: 15px; height: 15px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 37px; padding: 7px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-weight: 600; white-space: nowrap; }
.button:hover, .icon-btn:hover { background: #f3f6fa; }
.button.primary { color: white; border-color: #d75125; background: #d75125; box-shadow: 0 2px 3px #b1441a21; }
.button.primary:hover { background: #c44921; }
.button.primary .icon { filter: invert(1); opacity: 1; }
.button.soft { color: var(--accent-dark); background: #fff6ef; border-color: #ffe0cf; }
.button.danger { color: #ad302d; }
.icon-btn { display: inline-grid; place-items: center; background: transparent; border: 0; border-radius: 8px; width: 36px; height: 36px; flex: 0 0 auto; }
.icon-btn[aria-pressed=true] { background: #fff1d6; }
.link-button { border: 0; background: transparent; color: #3558a3; padding: 0; text-align: left; }
.muted { color: var(--muted); }
.subtle { color: var(--soft); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.stack { display: grid; gap: 12px; }
.inline { display: flex; align-items: center; gap: 9px; }
.split { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.wrap { flex-wrap: wrap; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.hide-desktop { display: none; }
.loader { display: grid; min-height: 55vh; place-items: center; color: var(--muted); }

.shell { display: grid; grid-template: 62px minmax(0, 1fr) / 218px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { grid-row: 1 / 3; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 100dvh; position: sticky; top: 0; align-self: start; }
.brand { display: flex; align-items: center; gap: 10px; height: 62px; padding: 0 19px; border-bottom: 1px solid #f0f2f6; }
.mark { background: #ee713d; color: #fff; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; box-shadow: 0 3px 6px #dc673337; flex: 0 0 auto; }
.mark .icon { filter: invert(1); opacity: 1; width: 21px; height: 21px; }
.brand strong { font-size: 19px; letter-spacing: -.04em; }
.brand small { color: var(--soft); font-size: 10px; letter-spacing: .13em; margin-left: 1px; font-weight: 700; }
.sidebar nav { padding: 20px 12px 12px; display: grid; gap: 4px; }
.nav-label { padding: 8px 10px 5px; color: var(--soft); font-size: 11px; letter-spacing: .10em; font-weight: 700; }
.nav-label:not(:first-child) { margin-top: 17px; }
.nav-link { border-radius: 8px; padding: 9px 10px; display: flex; align-items: center; gap: 10px; color: #43536b; white-space: nowrap; }
.nav-link:hover { background: #f4f6f9; }
.nav-link[aria-current=page] { background: var(--accent-light); color: var(--accent-dark); font-weight: 700; }
.nav-link[aria-current=page] .icon { filter: invert(32%) sepia(70%) saturate(2082%) hue-rotate(347deg) brightness(90%); opacity: 1; }
.sidebar-footer { margin: auto 12px 15px; padding: 12px; border-radius: 9px; background: #f5f7fa; color: var(--muted); }
.sidebar-footer strong { display: block; color: var(--ink); font-size: 12px; }
.topbar { grid-column: 2; display: flex; align-items: center; gap: 18px; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); padding: 0 24px; min-width: 0; }
.crumb { color: var(--muted); white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.workspace-main { grid-column: 2; min-width: 0; }
.avatar { width: 36px; height: 36px; font-weight: 750; flex: 0 0 auto; border-radius: 9px; background: #e8eefc; color: #3456a4; display: grid; place-items: center; line-height: 1; }
.avatar.t1 { background: #e5f2ec; color: #167355; }
.avatar.t2 { background: #fff0e1; color: #9d4e18; }
.avatar.t3 { background: #f0e9fb; color: #7352a5; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 5px; padding: 2px 7px; background: #edf1f7; color: #4d6079; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pill.demo { color: #944d23; background: #fff0e4; }
.pill.whatsapp, .pill.won, .pill.connected { color: #117254; background: #e3f6ee; }
.pill.telegram, .pill.qualified, .pill.unread { color: #2654a6; background: #e8f0ff; }
.pill.email, .pill.quoted { color: #63419d; background: #f1e9ff; }
.pill.pending, .pill.negotiating { color: #955014; background: #fff0d8; }
.pill.inactive, .pill.archived { color: #53657d; background: #edf1f6; }
.pill.failed, .pill.overdue { color: #ab292b; background: #fce8e6; }
.page { max-width: 1530px; margin: auto; padding: 26px 28px 32px; }
.page-heading { margin-bottom: 22px; align-items: end; }
.page-heading p { margin-top: 7px; color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-dark); font-weight: 750; letter-spacing: .11em; font-size: 10px; text-transform: uppercase; margin-bottom: 6px; }
.accent-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 16px; }
.card-heading { min-height: 60px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.metric { padding: 17px; position: relative; }
.metric strong { display: block; line-height: 1.1; font-size: 28px; letter-spacing: -.06em; margin: 8px 0 4px; }
.metric .avatar { position: absolute; right: 15px; top: 15px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; }
.list-row { display: flex; align-items: center; gap: 11px; padding: 11px 15px; border-bottom: 1px solid #f0f2f6; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: #fbfcfd; }
.empty { padding: 38px 16px; text-align: center; color: var(--muted); }
.empty .avatar { margin: 0 auto 10px; }
.empty strong { color: var(--ink); display: block; margin-bottom: 4px; }

.toolbar { padding: 10px 13px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.tabs { display: flex; gap: 14px; align-items: center; overflow-x: auto; border-bottom: 1px solid var(--line); padding: 0 14px; white-space: nowrap; }
.tab { position: relative; border: 0; background: none; display: inline-flex; gap: 5px; align-items: center; padding: 11px 3px 10px; color: var(--muted); }
.tab.selected { color: var(--accent-dark); font-weight: 700; }
.tab.selected::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 0; height: 2px; background: var(--accent); border-radius: 3px 3px 0 0; }
input, select, textarea { min-width: 0; width: 100%; border: 1px solid #dce3eb; border-radius: 7px; padding: 8px 10px; color: var(--ink); background: #fff; }
input::placeholder, textarea::placeholder { color: #7a889e; }
input[type=radio], input[type=checkbox] { width: auto; }
textarea { min-height: 95px; resize: vertical; }
.search { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 9px; min-width: 130px; max-width: 320px; }
.search input { border: 0; padding: 8px 1px; outline: 0; }
.search:focus-within { border-color: #ed8c67; }
.compact-select { width: auto; max-width: 100%; padding: 7px 10px; }
.table-wrap { overflow-x: auto; }
.dashboard-intake { margin-top: 14px; }
.dashboard-follow-up-reminders { margin-bottom: 14px; }
.dashboard-work-hours { margin-bottom: 14px; }
.work-days { margin: 0; padding: 8px 12px 10px; border: 1px solid var(--line); border-radius: 7px; }
.work-days legend { padding: 0 4px; }
.task-local-time { display: block; margin-top: 3px; }
.task-calendar { min-width: 730px; table-layout: fixed; }
.task-calendar td { height: 104px; vertical-align: top; white-space: normal; border-right: 1px solid var(--line); }
.task-calendar td:last-child { border-right: 0; }
.task-calendar .task-calendar-empty { background: #f8fafc; }
.task-calendar .task-calendar-today { background: #eff6ff; }
.task-calendar-day { display: flex; align-items: center; justify-content: space-between; min-height: 24px; font-weight: 600; }
.task-calendar-event { display: flex; align-items: center; gap: 5px; padding: 4px; margin: 2px 0; border-radius: 4px; background: #f1f5f9; }
.task-calendar-event.task-calendar-overdue { background: #fef2f2; }
table { width: 100%; text-align: left; border-collapse: collapse; white-space: nowrap; }
th { color: #64738b; font-size: 12px; background: #f8fafd; font-weight: 650; }
th, td { padding: 11px 14px; border-bottom: 1px solid #edf0f5; }
td:first-child, th:first-child { padding-left: 16px; }
.customer-select { width: 1%; }
td strong { font-weight: 700; }
tr[data-open] { cursor: pointer; }
tbody tr:hover { background: #fafbfd; }
.table-footer { padding: 10px 13px; color: var(--muted); }
.back { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); margin-bottom: 13px; }
.profile-heading { padding: 16px; margin-bottom: 13px; }
.profile-heading .avatar { width: 49px; height: 49px; font-size: 18px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin: 0; }
.facts dt { color: var(--muted); font-size: 11px; margin-bottom: 2px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.profile-list { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 14px; }
.contact { margin-top: 9px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-wrap: anywhere; }
.profile-timeline { padding: 0; margin: 0; list-style: none; }
.profile-timeline li { padding: 11px 15px; border-bottom: 1px solid var(--line); }
.profile-timeline li:last-child { border-bottom: 0; }
.profile-timeline p { white-space: pre-wrap; overflow-wrap: anywhere; }
.stage-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stage-card { display: grid; gap: 4px; text-align: left; padding: 12px 14px; }
.stage-card span { color: var(--muted); }
.stage-card strong { font-size: 22px; line-height: 1.2; }
.stage-card[aria-pressed=true] { border-color: var(--accent); background: var(--accent-light); }
.commerce-facts dd { overflow-wrap: anywhere; }
.quote-line { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(68px, .6fr) minmax(100px, .9fr) auto; gap: 8px; align-items: end; }
.order-sync-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quote-summary { display: grid; width: min(100%, 360px); padding: 16px; margin-left: auto; gap: 7px; }
.quote-summary > :last-child { border-top: 1px solid var(--line); padding-top: 7px; color: var(--accent-dark); }

.inbox-page { max-width: none; }
.inbox { display: grid; grid-template-columns: minmax(228px, .96fr) minmax(330px, 2.1fr) minmax(205px, .8fr); min-height: max(550px, calc(100dvh - 177px)); overflow: hidden; }
.inbox-column { min-width: 0; }
.inbox-rail, .conversation { border-right: 1px solid var(--line); }
#inbox-search { flex-basis: 100%; }
.inbox-rail .toolbar .search { flex: 1; max-width: none; }
.inbox-rail .tab { padding-top: 8px; }
.inbox-rail .tabs { gap: 9px; padding-inline: 10px; }
.inbox-rail .tabs .tab { font-size: 12px; }
.thread-item { width: 100%; padding: 11px; display: flex; align-items: start; gap: 8px; background: #fff; border: 0; border-bottom: 1px solid #ebeff4; text-align: left; }
.thread-item:hover { background: #f7f9fc; }
.thread-item[aria-current=true] { background: #fff5ed; box-shadow: inset 3px 0 #e97645; }
.thread-item .split { gap: 4px; }
.thread-item .unread-dot { background: var(--accent); width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.thread-item h3 { font-size: 13px; }
.thread-item p { font-size: 12px; margin: 3px 0; }
.conversation { display: flex; flex-direction: column; }
.conversation .card-heading { padding: 11px 13px; }
.conversation .card-heading p { max-width: 420px; }
.conversation .card-heading .icon-btn { width: 31px; }
.thread-note { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; }
.thread-note-body { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.thread-note details { margin-top: 6px; font-size: 12px; }
.thread-note summary { cursor: pointer; color: var(--muted); }
.thread-note details button { margin-top: 4px; }
.reply-snippet { gap: 7px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; }
.reply-snippet p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reply-snippet details { color: var(--muted); }
.reply-snippet details summary { cursor: pointer; }
.messages { padding: 14px; flex: 1; max-height: max(310px, calc(100dvh - 410px)); min-height: 220px; overflow: auto; background: #fafbfd; }
.message { max-width: min(94%, 630px); margin-bottom: 13px; }
.message.out { margin-left: auto; }
.message-body { padding: 11px 13px; border: 1px solid #e6eaf0; border-radius: 11px; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.out .message-body { background: #fff3e8; border-color: #ffe1cf; }
.message .meta { color: var(--muted); font-size: 11px; margin: 4px 1px; }
.mail-attachments { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 6px 0; }
.mail-attachments .button { min-height: 28px; max-width: 100%; padding: 3px 7px; font-size: 12px; overflow-wrap: anywhere; white-space: normal; text-align: left; }
.attachment-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border: 1px solid var(--line); border-radius: 6px; padding-left: 6px; font-size: 12px; }
.attachment-chip .icon-btn { width: 24px; height: 26px; flex-shrink: 0; }
.translation { border-left: 3px solid #dc854d; padding: 8px 10px; background: #fff6eb; font-size: 12px; white-space: pre-wrap; }
.ai-progress { display: block; margin-top: 6px; }
.ai-draft-result { margin-top: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fffaf4; }
.ai-draft-result .prewrap { max-height: 190px; overflow: auto; }
.ai-settings-form { max-width: 740px; }
.composer { border-top: 1px solid var(--line); padding: 11px; }
.composer textarea { min-height: 104px; }
.composer-top { margin-bottom: 7px; flex-wrap: wrap; }
.composer-top .button { min-height: 30px; font-size: 12px; padding: 4px 7px; }
.composer-bottom { margin-top: 7px; align-items: center; }
.context { padding: 13px; background: #fcfdfe; }
.context-shard { border: 1px solid var(--line); border-radius: 9px; padding: 10px; margin-top: 10px; background: #fff; overflow-wrap: anywhere; }
.context-shard p { margin-top: 5px; }
.context-shard .button { margin-top: 8px; max-width: 100%; min-height: 30px; padding: 4px 8px; }
.context-shard select { margin-top: 7px; }
.intake-review { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); }

.account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.account-card { padding: 15px; min-height: 175px; }
.account-card .button { margin-top: 10px; }
.account-record { padding: 9px 0; border-bottom: 1px solid var(--line); }
.account-record .button { min-height: 28px; padding: 4px 7px; font-size: 11px; margin: 0; }
.account-notice { padding: 14px; margin-bottom: 15px; }
dialog { width: min(580px, calc(100vw - 26px)); padding: 0; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); box-shadow: 0 12px 50px #18263840; }
dialog::backdrop { background: #1c29485a; }
.modal-header { padding: 14px 17px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 15px 17px; max-height: min(72dvh, 680px); overflow: auto; }
.modal-footer { padding: 11px 17px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.customer-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(840px, 100vw); max-width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
.customer-drawer > form { display: grid; height: 100%; grid-template-rows: 54px minmax(0, 1fr) auto; }
.customer-drawer .modal-body { max-height: none; padding: 18px 24px; align-content: start; }
.customer-drawer .modal-footer { align-items: center; padding: 12px 23px; }
.customer-drawer .button.primary, .customer-profile .button.primary { background: #0876f9; border-color: #0876f9; }
.customer-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.customer-form-contacts { min-width: 0; }
.customer-contact { background: #edf7fe; border: 1px solid #e7eff7; border-radius: 8px; padding: 13px 14px; margin-bottom: 10px; }
.customer-contact .button { min-height: 30px; padding: 3px 7px; }
.customer-drawer .field { font-weight: 500; }
.customer-drawer input:not([type=checkbox],[type=radio]), .customer-drawer select { min-height: 34px; }
.customer-tags, .optional-fields { min-width: 0; }
.customer-tags > summary { cursor: pointer; min-height: 35px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.customer-tag-options { background: #fff; border: 1px solid var(--line); padding: 6px 10px; max-height: 180px; overflow: auto; }
.customer-tag-options label { min-height: 28px; }
.optional-fields > summary { cursor: pointer; padding: 5px 0; color: var(--blue); }
.customer-profile-grid { display: grid; grid-template-columns: minmax(245px, .65fr) minmax(0, 1.35fr); align-items: start; gap: 14px; }
.customer-detail-tabs { overflow: auto; white-space: nowrap; }
.customer-detail-tabs .selected { color: #0876f9; }
.customer-detail-tabs .selected::after { background: #0876f9; }
.customer-information + .customer-information, .customer-ai-link { border-top: 1px solid var(--line); padding-top: 12px; }
.customer-information .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-profile .facts dd { overflow-wrap: anywhere; }
.customer-detail-inner { padding: 12px; }
.customer-contact-facts { margin: 6px 0 0; }
.customer-contact-facts div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 7px; }
.customer-contact-facts dt { color: var(--muted); }
.customer-contact-facts dd { margin: 0; overflow-wrap: anywhere; }
.contact-repeat-list { gap: 6px; }
.contact-repeat-row { display: grid; grid-template-columns: minmax(66px, 30%) minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.contact-repeat-row input, .contact-repeat-row select { min-width: 0; }
.contact-repeat-add { justify-self: start; color: #1469cc; }
.customer-image-list { display: flex; flex-wrap: wrap; gap: 8px; }
.customer-image-list:empty { display: none; }
.customer-image-file { display: grid; justify-items: center; min-width: 64px; max-width: 120px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.customer-image-file span { max-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-image-file .link-button { min-height: 24px; padding: 0 4px; font-size: 12px; }
.customer-image { width: 64px; height: 56px; display: block; object-fit: cover; border-radius: 4px; background: #f6f8fb; }
.customer-drop { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; padding: 6px 8px; border: 1px dashed #a9becf; border-radius: 6px; background: #fff; color: #245780; cursor: pointer; }
.customer-drop:hover, .customer-drop:focus-within { border-color: #0876f9; background: #f4f9ff; }
.customer-drop input, #customer-doc-upload { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.customer-file-error { color: #a22428; }
.customer-file-error:empty { display: none; }
.customer-doc-table { overflow: auto; }
.customer-doc-table table { width: 100%; border-collapse: collapse; }
.customer-doc-table th, .customer-doc-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.customer-doc-table thead th { min-width: 75px; background: #f5f7fb; color: var(--muted); font-size: 12px; }
.customer-doc-table tbody th { font-weight: 500; }
.customer-doc-table td:first-child { min-width: 160px; word-break: break-word; }
.customer-doc-table td a { color: #1469cc; }
#customer-doc-search { width: min(100%, 260px); }
.doc-record-table thead th { min-width: 0; white-space: nowrap; }
.doc-record-table td:first-child { min-width: 128px; }
.doc-record-table td:nth-child(2) { overflow-wrap: anywhere; }
.doc-record-table td:last-child .inline { gap: 4px; }
.doc-record-table td:last-child .icon-btn { width: 30px; height: 30px; }
.doc-path { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.doc-path a { color: #1469cc; }
.company-match-results, .research-source { padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #f6f9fe; }
.company-match-results a, .research-source a { color: #1469cc; overflow-wrap: anywhere; }
.company-match-results > div + div { border-top: 1px solid var(--line); padding-top: 8px; }
.research-source .button { justify-self: start; }
.insight-panel { border: 1px solid var(--line); border-radius: 7px; }
.insight-panel > summary { padding: 12px 14px; cursor: pointer; font-weight: 600; background: #f7f9fd; }
.insight-panel > div { padding: 12px 14px; }
.insight-totals { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.insight-totals > div { padding: 10px 14px; background: #f5f8fe; border-radius: 6px; }
.insight-totals dt { color: var(--muted); }
.insight-totals dd { margin: 6px 0 0; font-size: 19px; font-weight: 600; }
.insight-bar { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.insight-bar meter { width: min(14vw, 100px); }
.insight-filter { justify-content: flex-start; align-items: end; }
.follow-up-context { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 8px 0; }
.follow-up-context p { flex-basis: 100%; overflow-wrap: anywhere; white-space: pre-wrap; }
.follow-up-doc-list { padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; }
.follow-up-doc-list > summary { cursor: pointer; }
.follow-up-doc-list > div { margin-top: 10px; }
.customer-setting-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.customer-setting-row > input { flex: 1; min-width: 140px; }
.customer-field-config { padding: 7px 0; border-bottom: 1px solid var(--line); }
.customer-settings-page details > summary { cursor: pointer; padding-bottom: 8px; }
.field { display: grid; gap: 3px; font-weight: 650; color: #41536c; min-width: 0; }
.field input, .field select, .field textarea { font-weight: 400; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.field-grid .wide { grid-column: 1 / -1; }
.notice { color: #895426; background: #fff4e5; border: 1px solid #ffdfbb; border-radius: 8px; padding: 9px 11px; font-size: 12px; }
.form-error { color: #a82620; font-size: 13px; }
.toast { position: fixed; z-index: 10; bottom: 22px; right: 22px; background: #25374f; color: white; border-radius: 9px; padding: 10px 15px; box-shadow: 0 6px 20px #0002; max-width: min(450px, calc(100% - 30px)); }
.toast.error { background: #9c2e2c; }
.login-page { display: grid; min-height: 100dvh; place-items: center; padding: 20px; background: radial-gradient(ellipse at 14% 20%, #fff1e7 0, transparent 37%), var(--fog); }
.login-card { width: min(100%, 418px); padding: 28px; box-shadow: 0 12px 48px #1f345111; }
.login-card .brand { padding: 0; border: 0; height: auto; margin-bottom: 20px; }
.login-card h1 { font-size: 25px; }
.login-card form { margin: 16px 0 9px; }
.login-card form .button { width: 100%; }
.login-card .demo-actions { margin-top: 11px; }

@media (max-width: 1180px) {
  .shell { grid-template-columns: 183px minmax(0, 1fr); }
  .page { padding: 21px 19px; }
  .inbox { grid-template-columns: minmax(210px, .9fr) minmax(285px, 1.8fr); }
  .context { grid-column: 2; border-top: 1px solid var(--line); }
  .conversation { border-right: 0; }
}
@media (max-width: 800px) {
  .customer-profile-grid { grid-template-columns: 1fr; }
  .stage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shell { grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: 54px auto; }
  .sidebar .brand { padding: 0 11px; height: 54px; }
  .sidebar .brand strong, .sidebar .brand small, .sidebar-footer, .nav-label, .nav-link span { display: none; }
  .sidebar nav { padding: 12px 5px; }
  .nav-link { padding: 11px; justify-content: center; }
  .topbar { padding: 0 10px; }
  .top-actions .hide-mobile, .hide-mobile { display: none; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col, .profile-list, .account-grid { grid-template-columns: 1fr; }
  .profile-heading > .split { align-items: flex-start; flex-wrap: wrap; }
}
@media (max-width: 615px) {
  .customer-form-grid { grid-template-columns: 1fr; }
  .customer-drawer .modal-footer { flex-wrap: wrap; }
  .order-sync-grid { grid-template-columns: 1fr; }
  .commerce-heading { align-items: flex-start; flex-wrap: wrap; }
  .quote-line { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
  .page { padding: 14px 9px; }
  .page-heading { align-items: flex-start; gap: 6px; }
  .inbox-page .page-heading { flex-wrap: wrap; }
  h1 { font-size: 23px; }
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox.has-thread .inbox-rail { display: none; }
  .context { grid-column: 1; }
  .inbox:not(.has-thread) .conversation, .inbox:not(.has-thread) .context { display: none; }
  .hide-desktop { display: inline-flex; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list-row { padding-inline: 9px; }
}
