:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: #e5e5ea;
  --line-2: #d2d2d7;
  --accent: #e8571f;        /* Sunbright orange, from the logo */
  --accent-ink: #b3400f;
  --accent-soft: #fdeee7;
  --blue: #0071e3;
  --blue-soft: #e8f1fd;
  --green: #1f9d55;
  --green-soft: #e6f6ec;
  --red: #d93025;
  --red-soft: #fdecea;
  --purple: #8e44ad;
  --purple-soft: #f4ecf8;
  --teal: #0f8a8a;
  --teal-soft: #e3f4f4;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.14);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 19px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
.muted { color: var(--ink-2); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }

/* Layout */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: rgba(255,255,255,.72); backdrop-filter: saturate(180%) blur(20px); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #f58a4f, #e8571f); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(232,87,31,.35); }
.brand-name { font-weight: 700; font-size: 15px; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--ink-3); }
.nav-label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--ink); font-weight: 500; }
.nav a:hover { background: rgba(0,0,0,.04); }
.nav a.active { background: var(--accent-soft); color: var(--accent-ink); }
.nav a .count { margin-left: auto; font-size: 11px; color: var(--ink-3); background: rgba(0,0,0,.05); padding: 1px 7px; border-radius: 10px; }
.nav a.active .count { background: rgba(232,87,31,.15); color: var(--accent-ink); }
.nav svg { width: 18px; height: 18px; flex: none; }
.sidebar-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: rgba(245,245,247,.8); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; }
.search input { border: 0; outline: 0; flex: 1; font: inherit; background: transparent; }
.topbar .spacer { flex: 1; }
.content { padding: 28px; max-width: 1360px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); border-radius: 980px; padding: 7px 14px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s, transform .05s; }
.btn:hover { background: #f2f2f4; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn.primary:hover { background: #0062c4; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: #cf4a15; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.05); }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.icon { padding: 7px; border-radius: 50%; }
.btn svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.03); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.tile { padding: 18px 18px 16px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(0,0,0,.08); }
.tile .v { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 2px; }
.tile .l { font-weight: 600; }
.tile .s { font-size: 12px; color: var(--ink-2); }
.tile .s.warn { color: var(--accent-ink); }
.tile .s.bad { color: var(--red); }
.tile .s.good { color: var(--green); }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 980px; font-size: 11.5px; font-weight: 600; background: #f0f0f2; color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.plain::before { display: none; }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--accent-soft); color: var(--accent-ink); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.teal { background: var(--teal-soft); color: var(--teal); }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list li.click { cursor: pointer; }
.list li.click:hover { background: #fafafa; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 12px; color: #fff; background: #a1a1a6; flex: none; }
.ch { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 10px; flex: none; }
.ch.WA { background: #e7f8ee; color: #128c4a; }
.ch.EMAIL { background: var(--blue-soft); color: var(--blue); }
.ch.SMS { background: var(--purple-soft); color: var(--purple); }
.ch.CALL { background: var(--accent-soft); color: var(--accent-ink); }
.ch.SYS { background: #f0f0f2; color: var(--ink-2); }

/* Tabs / segmented */
.seg { display: inline-flex; background: rgba(0,0,0,.05); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 500; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--accent); }
.tabs button .badge { margin-left: 6px; font-size: 11px; background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 8px; }

/* Board (kanban) */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; }
.col { background: rgba(0,0,0,.035); border-radius: var(--radius); padding: 10px; min-height: 300px; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; }
.col-head .n { width: 22px; height: 22px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; margin-right: 8px; box-shadow: var(--shadow); }
.col-head h3 { font-size: 13px; display: flex; align-items: center; }
.col.drop { outline: 2px dashed var(--accent); outline-offset: -2px; }
.kcard { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); cursor: pointer; border: 1px solid rgba(0,0,0,.04); transition: transform .12s, box-shadow .12s; }
.kcard:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.kcard .top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.kcard .ref { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.kcard .nm { font-weight: 600; margin: 4px 0 2px; }
.kcard .meta { font-size: 12px; color: var(--ink-2); }
.kcard .foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.progress { height: 5px; background: #eee; border-radius: 4px; overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; background: var(--green); border-radius: 4px; }
.progress.amber > i { background: var(--accent); }

/* Stage tracker */
.tracker { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; }
.tracker .st { text-align: center; font-size: 11px; color: var(--ink-3); }
.tracker .bar { height: 6px; border-radius: 4px; background: #e8e8ed; margin-bottom: 6px; }
.tracker .st.done .bar { background: var(--green); }
.tracker .st.cur .bar { background: var(--accent); }
.tracker .st.cur { color: var(--ink); font-weight: 600; }
.tracker .st.done { color: var(--ink-2); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.field input, .field select, .field textarea { font: inherit; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; background: #fff; color: var(--ink); outline: none; transition: border .15s, box-shadow .15s; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,113,227,.15); }
.field textarea { min-height: 90px; resize: vertical; }
.field.filled input { background: #fbfbfd; }
.field .hint { font-size: 11px; color: var(--ink-3); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; margin: 22px 0 10px; }
.section-title:first-child { margin-top: 0; }

/* Checklist */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check input { display: none; }
.check .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); flex: none; display: grid; place-items: center; cursor: pointer; transition: all .15s; margin-top: 1px; }
.check.on .box { background: var(--green); border-color: var(--green); }
.check.on .box::after { content: ''; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check.on .t { color: var(--ink-3); text-decoration: line-through; }
.check .t { flex: 1; }
.check .tag { font-size: 11px; }

/* Timeline */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tl li:last-child { border-bottom: 0; }
.tl .body { flex: 1; min-width: 0; }
.tl .title { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.tl .title time { font-weight: 400; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.bubble { background: #f5f5f7; border-radius: 12px; padding: 10px 12px; margin-top: 6px; }

/* Drawer & modal */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 60; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); background: var(--bg); z-index: 61; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .22s cubic-bezier(.2,.8,.2,1); }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px 40px; }
.modal { position: fixed; z-index: 70; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: pop .18s cubic-bezier(.2,.8,.2,1); }
.modal.wide { width: min(980px, calc(100vw - 32px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: .4; } }
@keyframes pop { from { transform: translate(-50%, -48%) scale(.98); opacity: 0; } }

/* Toasts */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: rgba(29,29,31,.92); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 500; animation: pop2 .2s; max-width: 90vw; }
.toast small { display: block; opacity: .75; font-weight: 400; }
@keyframes pop2 { from { transform: translateY(8px); opacity: 0; } }

/* Document (A4) preview */
.paper-wrap { background: #e9e9ee; padding: 24px; border-radius: 12px; }
.paper { background: #fff; width: 100%; max-width: 794px; margin: 0 auto; padding: 48px 56px; box-shadow: 0 2px 12px rgba(0,0,0,.12); font-size: 13px; color: #222; font-family: var(--font); }
.paper .lh { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid var(--accent); padding-bottom: 14px; margin-bottom: 22px; }
.paper h1 { font-size: 22px; margin: 0 0 14px; }
.paper h2 { font-size: 15px; margin: 18px 0 8px; }
.paper table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; }
.paper td, .paper th { border: 1px solid #ddd; padding: 7px 9px; text-align: left; vertical-align: top; }
.paper th { background: #f7f7f9; width: 38%; font-weight: 600; }
.paper .fill { background: #fff6e0; border-radius: 3px; padding: 0 3px; }
.paper .empty { color: #c00; font-style: italic; }
.paper .foot { margin-top: 30px; border-top: 1px solid #ddd; padding-top: 10px; font-size: 10.5px; color: #777; }
.paper .sig { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 24px; color: #1a3d8f; }
.photo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.photo { width: 120px; height: 90px; border-radius: 8px; background: linear-gradient(135deg, #dfe7ef, #c7d3df); display: grid; place-items: center; color: #5a6b7d; font-size: 11px; text-align: center; padding: 6px; }

/* Upload tiles */
.uploads { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.up { border: 1.5px dashed var(--line-2); border-radius: 12px; height: 104px; display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--ink-2); cursor: pointer; padding: 8px; background: #fff; }
.up.done { border-style: solid; border-color: transparent; background: linear-gradient(135deg, #e3eef9, #cfdff0); color: #2a4a6b; }
.up.done::before { content: '✓ '; }

/* Folder tree */
.tree { font-size: 13px; }
.tree .row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; }
.tree .row:hover { background: #f5f5f7; }
.tree .ind1 { padding-left: 30px; }
.tree .ind2 { padding-left: 52px; }
.tree .sync { margin-left: auto; font-size: 11px; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.cal .dow { background: #fafafa; padding: 8px; font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; }
.cal .day { background: #fff; min-height: 112px; padding: 6px; }
.cal .day.out { background: #fbfbfc; color: var(--ink-3); }
.cal .day.today .dn { background: var(--red); color: #fff; }
.cal .dn { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.ev { font-size: 11px; padding: 3px 6px; border-radius: 6px; margin-bottom: 3px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.ev.scaffold { background: var(--purple-soft); color: var(--purple); }
.ev.delivery { background: var(--teal-soft); color: var(--teal); }
.ev.roof { background: var(--accent-soft); color: var(--accent-ink); }
.ev.electrics { background: var(--blue-soft); color: var(--blue); }
.ev.call { background: var(--green-soft); color: var(--green); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: currentColor; }

/* Phone frame for site app */
.phone { width: 390px; max-width: 100%; margin: 0 auto; background: #000; border-radius: 48px; padding: 12px; box-shadow: var(--shadow-lg); }
.phone-screen { background: var(--bg); border-radius: 38px; overflow: hidden; height: 780px; display: flex; flex-direction: column; }
.phone-top { background: #fff; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.phone-body { flex: 1; overflow-y: auto; padding: 14px; }

/* Signature */
.sigpad { border: 1.5px dashed var(--line-2); border-radius: 12px; background: #fcfcfd; width: 100%; height: 150px; touch-action: none; cursor: crosshair; }

/* Banner */
.banner { display: flex; gap: 12px; align-items: flex-start; background: var(--blue-soft); color: #0b4b8c; border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; font-size: 13px; }
.banner.amber { background: var(--accent-soft); color: var(--accent-ink); }
.banner.green { background: var(--green-soft); color: #136b3a; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 500; }
.dot-list { display: flex; gap: 6px; }
.dot-list i { width: 9px; height: 9px; border-radius: 50%; background: #ddd; display: inline-block; }
.dot-list i.on { background: var(--green); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* Tour */
.tour-hole { position: fixed; z-index: 200; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0,0,0,.5); transition: all .3s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.tour-pop { position: fixed; z-index: 201; width: 340px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 18px; transition: top .3s, left .3s; }
.tour-pop h3 { margin-bottom: 6px; }
.tour-pop p { margin: 0 0 14px; color: var(--ink-2); }
.tour-pop .foot { display: flex; align-items: center; justify-content: space-between; }
.tour-blocker { position: fixed; inset: 0; z-index: 199; }

/* Comments */
body.commenting, body.commenting * { cursor: crosshair !important; }
body.commenting .cm-ui, body.commenting .cm-ui * { cursor: auto !important; }
.cm-pin { position: absolute; z-index: 90; width: 28px; height: 28px; border-radius: 50% 50% 50% 4px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 3px 10px rgba(0,0,0,.25); cursor: pointer; transform: translate(-4px, -24px); border: 2px solid #fff; }
.cm-pin.resolved { background: #a1a1a6; }
.cm-pop { position: absolute; z-index: 95; width: 300px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 14px; }
.cm-pop textarea, .cm-pop input { width: 100%; font: inherit; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.cm-pop textarea { min-height: 70px; resize: vertical; }
.cm-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 340px; background: #fff; z-index: 85; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .2s; }
.cm-item { padding: 12px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cm-item:hover { background: #fafafa; }
.cm-bar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 96; background: var(--red); color: #fff; padding: 8px 16px; border-radius: 980px; font-weight: 600; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; }
.cm-bar button { background: rgba(255,255,255,.2); border: 0; color: #fff; border-radius: 980px; padding: 3px 10px; cursor: pointer; }
.cm-reply { margin-top: 8px; padding: 8px 10px; background: #f5f5f7; border-radius: 10px; font-size: 13px; }

/* Responsive */
@media (max-width: 1100px) { .g6 { grid-template-columns: repeat(3, 1fr); } .split { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; left: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex !important; }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .g4, .g3, .g2 { grid-template-columns: 1fr 1fr; }
  .g6 { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .tracker .st span { display: none; }
  .paper { padding: 24px; }
}
@media (max-width: 520px) { .g4, .g3, .g2 { grid-template-columns: 1fr; } .search { display: none; } }
.menu-btn { display: none !important; }

@media print {
  body * { visibility: hidden !important; }
  .print-area, .print-area * { visibility: visible !important; }
  .print-area { position: absolute; left: 0; top: 0; width: 100%; }
  .paper { box-shadow: none; max-width: none; }
  .paper-wrap { background: none; padding: 0; }
}
.site-split { grid-template-columns: auto 1fr; }
.site-split > * { min-width: 0; }
@media (max-width: 860px) {
  .site-split { grid-template-columns: 1fr; }
  .phone { width: 100%; padding: 0; background: none; box-shadow: none; border-radius: 0; }
  .phone-screen { border-radius: 16px; border: 1px solid var(--line); height: 640px; }
}
