@font-face { font-family: Geist; src: url("vendor/geist-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
/* Locally licensed Geist: vendor/geist.license.txt. Shell tokens follow measured PostFlow. */
:root { --cpw-brand: #00805f; --cpw-bg: #f8f8fa; --cpw-surface: #fff; --cpw-text: #090b12; --cpw-muted: #667085; --cpw-border: #dce0e8; --cpw-nav: #f8fbfa; --cpw-active: #a9dfcf; --cpw-radius: 14px; --tblr-primary: #00805f; --tblr-primary-rgb: 0,128,95; }
body.cpw { margin: 0; background: var(--cpw-bg); color: var(--cpw-text); font-family: Geist, Arial, sans-serif; font-size: 14px; line-height: 1.5; }
.cpw [hidden] { display: none !important; }
.cpw button, .cpw input, .cpw textarea, .cpw select { font: inherit; }
.cpw button, .cpw a { -webkit-tap-highlight-color: transparent; }
.cpw :focus-visible { outline: 2px solid var(--cpw-brand); outline-offset: 3px; }
.cpw-skip { position: fixed; left: 12px; top: -60px; z-index: 1200; background: var(--cpw-surface); padding: 10px; border-radius: 8px; }
.cpw-skip:focus { top: 8px; }
.cpw-content { padding: 16px 16px calc(88px + env(safe-area-inset-bottom)); min-width: 0; }
.cpw-content:focus { outline: none; }
.cpw-topbar { position: sticky; top: 0; z-index: 100; min-height: 57px; padding: 6px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--cpw-border); background: var(--cpw-surface); }
#page-title { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.cpw-topbar-actions { display: flex; align-items: center; gap: 8px; }
.cpw-user { display: flex; align-items: center; gap: 10px; padding-left: 8px; border-left: 1px solid var(--cpw-border); }
.cpw-user-name { display: none; text-align: right; line-height: 16px; }
.cpw-user-name strong { display: block; font-size: 12px; font-weight: 500; }
.cpw-user-name span { color: var(--cpw-brand); font-size: 10px; }
.cpw-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--cpw-brand); color: #fff; font-size: 12px; font-weight: 600; position: relative; }
.cpw-avatar::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #10b981; border: 2px solid var(--cpw-surface); position: absolute; bottom: -1px; right: -1px; }
.cpw-icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; gap: 6px; border: 0; border-radius: 8px; padding: 0 10px; color: var(--cpw-muted); background: transparent; cursor: pointer; }
.cpw-icon-button:hover { background: var(--cpw-bg); }
.cpw-icon-button svg { width: 16px; height: 16px; display: block; }
.cpw-install-label { display: none; font-size: 12px; }
#mobile-settings { flex: none; text-decoration: none; }
@media (max-width: 767px) { #install-app { display: none; } .cpw-topbar-actions { gap: 4px; } }
@media (min-width: 768px) { #mobile-settings { display: none; } }
.cpw-sidebar { display: none; }
.cpw-bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 101; height: calc(65px + env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom); display: flex; align-items: center; background: var(--cpw-nav); border-top: 1px solid var(--cpw-border); }
.cpw-nav-link { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 64px; color: #52605b; text-decoration: none; border-radius: 14px; min-width: 0; }
.cpw-nav-icon { position: relative; flex-shrink: 0; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 12px; }
.cpw-nav-icon svg { width: 20px; height: 20px; stroke-width: 2.2; }
.cpw-nav-label { max-width: 100%; min-height: 24px; padding: 0 2px; white-space: normal; overflow-wrap: anywhere; text-align: center; font-size: 10px; font-weight: 500; line-height: 12px; letter-spacing: .01em; }
.cpw-nav-link.active { color: var(--cpw-brand); }
.cpw-nav-link.active .cpw-nav-icon { background: var(--cpw-active); }
.cpw-nav-link.active .cpw-nav-label { font-weight: 600; }
.cpw-nav-link.active::before { content: ""; position: absolute; top: 0; left: calc(50% - 12px); width: 24px; height: 3px; border-radius: 4px; background: var(--cpw-brand); }
.cpw-nav-link:hover .cpw-nav-icon { background: #e5eeeb; }
.cpw-dot { position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: #e5484d; border: 1px solid var(--cpw-surface); }
.cpw-login-mode .cpw-content { padding: 0; }
.cpw-login-mode .cpw-shell { margin-left: 0; }
.cpw-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; }
.cpw-login-card { width: 100%; max-width: 448px; border: 1px solid var(--cpw-border); border-radius: 12px; background: var(--cpw-surface); padding: 32px; box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); }
.cpw-login-heading { text-align: center; margin-bottom: 32px; }
.cpw-login-icon { margin-bottom: 28px; }
.cpw-login-icon img { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto; }
.cpw-login-heading h1 { font-size: 24px; font-weight: 700; line-height: 32px; margin: 0 0 8px; }
.cpw-login-heading p { color: var(--cpw-muted); font-size: 14px; line-height: 20px; margin: 0; }
.cpw-field { margin-bottom: 20px; }
.cpw-field label { display: block; font-size: 14px; line-height: 20px; font-weight: 500; margin-bottom: 6px; }
.cpw-field input { width: 100%; height: 36px; border: 1px solid var(--cpw-border); border-radius: 8px; padding: 4px 12px; background: transparent; color: var(--cpw-text); font-size: 16px; line-height: 24px; box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.cpw-primary, .cpw .btn-primary { background: var(--cpw-brand); color: #fff; border: 0; border-radius: 8px; font-weight: 500; box-shadow: inset 0 1px rgb(255 255 255 / .16), inset 0 0 0 1px rgb(0 0 0 / .12), 0 2px 0 #006b50, 0 3px 4px -1px rgb(0 0 0 / .1), 0 6px 12px -2px rgb(0 128 95 / .34); }
.cpw-primary { display: block; width: 100%; height: 36px; padding: 8px 16px; font-size: 14px; line-height: 20px; cursor: pointer; }
.cpw-primary:hover, .cpw .btn-primary:hover { background: #006b50; }
.cpw button:disabled { opacity: .6; cursor: wait; }
.cpw-form-error { color: #b42318; margin: 16px 0 0; font-size: 14px; }
.cpw .card { border: 1px solid var(--cpw-border); border-radius: var(--cpw-radius); background: var(--cpw-surface); box-shadow: none; margin-bottom: 16px; }
.cpw .card-body { padding: 20px; }
.cpw .form-control, .cpw .form-select { border-color: var(--cpw-border); background-color: var(--cpw-surface); color: var(--cpw-text); border-radius: 8px; min-height: 36px; box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.cpw .btn { border-radius: 8px; min-height: 36px; }
.cpw .btn-link { color: var(--cpw-brand); }
.cpw-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 24px; flex-wrap: wrap; }
.cpw-title h1 { font-size: 18px; line-height: 28px; font-weight: 600; margin: 0; }
.cpw-kpi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cpw-kpi .card-body { padding: 20px; }
.cpw-kpi .h1 { font-size: 26px; margin: 8px 0; }
.cpw-kpi .sub { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--cpw-muted); }
.cpw-list { display: flex; flex-direction: column; }
.cpw-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--cpw-border); cursor: pointer; }
.cpw-row:last-child { border-bottom: 0; }
.cpw-mono { font-family: ui-monospace, monospace; font-size: 12px; overflow-wrap: anywhere; }
.cpw-kv { display: grid; grid-template-columns: minmax(100px, 40%) 1fr; gap: 6px 10px; font-size: 13px; }
.cpw-kv > div { border-bottom: 1px solid var(--cpw-border); padding: 4px 0; overflow-wrap: anywhere; }
.cpw-chip { font-size: 11px; border-radius: 6px; }
.cpw .bg-green-lt, .cpw .bg-teal-lt { color: #047857 !important; background: #d1fae5 !important; }
.cpw .bg-blue-lt { color: #1d4ed8 !important; background: #dbeafe !important; }
.cpw .bg-yellow-lt, .cpw .bg-orange-lt { color: #92400e !important; background: #fef3c7 !important; }
.cpw .bg-red-lt { color: #b91c1c !important; background: #fee2e2 !important; }
.cpw .bg-secondary-lt { color: #4b5563 !important; background: #f3f4f6 !important; }
.cpw-thumbs { display: flex; gap: 4px; }
.cpw-thumbs img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; border: 1px solid var(--cpw-border); }
.cpw-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.cpw-photos figure { margin: 0; }
.cpw-photos img { width: 100%; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--cpw-border); }
.cpw-photos figcaption { font-size: 11px; color: var(--cpw-muted); margin-top: 4px; text-align: center; }
.cpw-chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; }
.cpw-chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.cpw-chart .bar > div { width: 100%; background: var(--cpw-brand); border-radius: 6px 6px 0 0; min-height: 4px; }
.cpw-chart .val, .cpw-chart .lbl { font-size: 11px; color: var(--cpw-muted); }
.cpw-bubble { padding: 12px; border-radius: 14px; margin-bottom: 8px; max-width: 86%; font-size: 14px; overflow-wrap: anywhere; }
.cpw-bubble.them { background: #eef1f4; }
.cpw-bubble.me { background: #dff3ec; margin-left: auto; }
.cpw-bubble .meta, .cpw-day { font-size: 11px; color: var(--cpw-muted); }
.cpw-day { text-align: center; margin: 10px 0 6px; }
.cpw-sheet-wrap { position: fixed; inset: 0; z-index: 1050; }
.cpw-sheet-backdrop { position: absolute; inset: 0; background: rgb(15 23 42 / .45); }
.cpw-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; background: var(--cpw-surface); border-radius: 18px 18px 0 0; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }
.cpw-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.cpw-sheet-head svg { width: 18px; height: 18px; }
.cpw-sheet-body .card { margin-bottom: 12px; }
.cpw-sheet .btn svg { width: 18px; height: 18px; }
.cpw-skel { height: 14px; border-radius: 6px; background: #eef1f4; }
#toasts { position: fixed; top: 68px; right: 16px; left: 16px; z-index: 1100; pointer-events: none; }
.cpw-toast { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; margin-bottom: 8px; border: 1px solid #a7dcc7; background: #edf9f3; color: #065f46; border-radius: 12px; box-shadow: 0 4px 14px rgb(0 0 0 / .1); pointer-events: auto; overflow-wrap: anywhere; }
.cpw-toast-danger { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.cpw-toast-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.cpw-locale { display: inline-flex; align-items: center; gap: 6px; color: var(--cpw-muted); font-size: 12px; }
.cpw-locale svg { width: 16px; height: 16px; }
.cpw-language-select { max-width: 100%; min-height: 36px; border: 1px solid var(--cpw-border); border-radius: 8px; background: var(--cpw-surface); color: var(--cpw-text); padding: 4px 6px; cursor: pointer; }
.cpw-login-language { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.cpw-content :is(h1, h2, h3, p), .cpw-toast > span { overflow-wrap: anywhere; min-width: 0; }
.cpw-primary { height: auto; min-height: 36px; white-space: normal; }
.cpw-topbar-actions { flex-shrink: 0; }
@media (max-width: 359px) { .cpw-topbar { padding-inline: 8px; gap: 4px; } .cpw-topbar-actions { gap: 0; } .cpw-user { display: none; } .cpw-login-card { padding: 24px; } }
.cpw-sync-state { margin: 0; padding: 8px 16px; color: #92400e; background: #fffbeb; font-size: 12px; }
.cpw-screen-loading { color: var(--cpw-muted); font-size: 13px; }
.cpw-screen-error { max-width: 480px; padding: 20px; border: 1px solid var(--cpw-border); border-radius: 14px; background: var(--cpw-surface); }
.cpw-screen-error h1 { font-size: 18px; font-weight: 600; }
.cpw-install-card { position: fixed; left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 104; background: var(--cpw-surface); padding: 14px; border: 1px solid #e9edf1; border-radius: 18px; box-shadow: 0 10px 30px rgb(0 0 0 / .08); }
.cpw-install-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cpw-install-head img { flex-shrink: 0; border-radius: 12px; background: #e3f1ec; padding: 2px; }
.cpw-install-head > div { min-width: 0; flex: 1; }
.cpw-install-head h2 { margin: 0; font-size: 14px; line-height: 20px; font-weight: 500; }
.cpw-install-head p { margin: 0; font-size: 12px; color: var(--cpw-muted); }
.cpw-install-head button { align-self: flex-start; color: var(--cpw-muted); border: 0; background: transparent; padding: 0; font-size: 20px; line-height: 20px; cursor: pointer; }
.cpw-install-card .cpw-primary { height: 40px; }
@media (min-width: 768px) { .cpw-install-card { width: 322px; left: auto; right: 16px; bottom: 16px; } }
.cpw.theme-dark { --cpw-bg: #111827; --cpw-surface: #1b2431; --cpw-text: #f3f4f6; --cpw-muted: #a0aab8; --cpw-border: #374151; --cpw-nav: #172922; --cpw-active: #235a48; }
.cpw.theme-dark .cpw-bubble.them { background: #273244; }
.cpw.theme-dark .cpw-bubble.me { background: #164b3c; }
@media (min-width: 640px) { .cpw-user-name, .cpw-install-label { display: block; } }
@media (min-width: 768px) {
  .cpw-shell { margin-left: 76px; }
  .cpw-sidebar { position: fixed; inset: 0 auto 0 0; width: 76px; display: flex; flex-direction: column; z-index: 102; border-right: 1px solid var(--cpw-border); background: var(--cpw-nav); }
  .cpw-brand { height: 56px; display: grid; place-items: center; color: var(--cpw-brand); border-bottom: 1px solid var(--cpw-border); }
  .cpw-brand svg { width: 24px; height: 24px; }
  #desktop-nav { padding: 12px 6px; }
  .cpw-sidebar .cpw-nav-link { height: 72px; margin-bottom: 2px; }
  .cpw-sidebar [data-view="profile"] { margin-top: 15px; }
  .cpw-sidebar .cpw-nav-link.active::before { left: -6px; top: 21px; width: 3px; height: 24px; }
  .cpw-bottom-nav { display: none; }
  .cpw-topbar { min-height: 56px; padding: 6px 24px; }
  .cpw-content { padding: 24px; }
  .cpw-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #toasts { left: auto; width: 380px; }
  .cpw-sheet { max-width: 720px; margin: 0 auto; }
}
/* App-owned private file viewer: chrome never scrolls away from the document. */
.cpw-file-viewer-open { overflow: hidden; }
.cpw-file-viewer { position: fixed; inset: 0; z-index: 1300; display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--cpw-bg); color: var(--cpw-text); padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); box-sizing: border-box; }
.cpw-file-viewer-header { display: flex; align-items: center; gap: 12px; padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); background: var(--cpw-surface); border-bottom: 1px solid var(--cpw-border); flex-shrink: 0; }
.cpw-file-viewer-header h2 { flex: 1; min-width: 0; margin: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpw-file-viewer button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--cpw-border); border-radius: 8px; background: var(--cpw-surface); color: var(--cpw-brand); cursor: pointer; flex-shrink: 0; }
.cpw-file-viewer [data-file-close] { font-weight: 600; border-color: var(--cpw-brand); }
.cpw-file-viewer-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: var(--cpw-surface); border-bottom: 1px solid var(--cpw-border); flex-shrink: 0; }
.cpw-file-viewer-toolbar nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cpw-file-viewer-toolbar [data-file-page] { font-size: 12px; }
.cpw-file-viewer-viewport { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 12px; text-align: center; -webkit-overflow-scrolling: touch; }
.cpw-file-viewer-viewport canvas { display: block; max-width: 100%; margin: 0 auto; background: #fff; }
.cpw-file-viewer-viewport img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.cpw-file-viewer-viewport [data-file-status] { max-width: 580px; margin: 16px auto; overflow-wrap: anywhere; }
.cpw-file-viewer-viewport [role="alert"] { color: #b42318; background: #fff1f2; border: 1px solid #fecdd3; border-radius: 8px; padding: 12px; }
