:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #131416;
  background: #fff;
  font-synthesis: none;
  --mint: #6bdb94;
  --mint-deep: #47b987;
  --line: #e2e2e7;
  --muted: #85858b;
  --card: #f4f4f5;
  --drawing: #f2f1f7;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, canvas:focus-visible {
  outline: 3px solid #47c780; outline-offset: 4px;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 32px; line-height: 1.2; letter-spacing: -.9px; margin-bottom: 10px; font-weight: 650; }
h2 { font-size: 21px; letter-spacing: -.4px; }
h3 { font-size: 17px; }
p { line-height: 1.6; }
.muted, small { color: var(--muted); }
.eyebrow { font-size: 11px; letter-spacing: 1.3px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.primary, .secondary, .subtle, .tab, .back { border: 0; border-radius: 24px; padding: 12px 19px; font-weight: 600; }
.primary { background: linear-gradient(115deg, #75dd92, #42b481); color: #fff; box-shadow: 0 9px 28px #55c48930; }
.secondary { background: #ffffffd9; border: 1px solid #e9e9ec; color: #555c67; font-size: 13px; box-shadow: 0 4px 18px #232b3810; }
.subtle, .back { background: transparent; color: inherit; }
.error { color: #b52a36; font-size: 14px; }
.icon { width: 22px; height: 22px; flex-shrink: 0; }
.login-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 20%, #e6f8ee, transparent 55%), #fff; }
.login-card { width: min(460px,100%); padding: 42px; background: var(--card); border-radius: 30px; }
.login-card h1 { font-size: 32px; margin-top: 18px; }
.login-card p:not(.eyebrow) { font-size: 14px; color: #606065; }
.login-card label { display: block; font-size: 14px; font-weight: 600; margin: 28px 0 9px; }
.login-card input { width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.login-card .primary { width: 100%; display: flex; justify-content: space-between; margin-top: 16px; padding: 16px 22px; }
.login-card small { display: block; text-align: center; font-size: 11px; }
.brand-symbol { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 16px; background: #d9eee4; color: #668895; font-size: 36px; font-weight: 650; }
.brand-symbol.small { width: 32px; height: 34px; background: transparent; font-size: 28px; }
.brand-symbol span { font-size: 18px; }
.workspace { display: grid; grid-template-columns: 220px 1fr; min-height: 100dvh; }
.sidebar { background: #fafafa; border-right: 1px solid #f0f0f2; position: fixed; inset: 0 auto 0 0; width: 220px; padding: 30px 18px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 650; letter-spacing: -.5px; }
.web-tag { font-size: 8px; font-weight: 500; letter-spacing: .8px; align-self: flex-start; color: var(--muted); padding-top: 7px; }
.workspace-label { font-size: 10px; letter-spacing: 1px; color: #a0a0a6; margin: 48px 12px 15px; }
.sidebar nav { display: grid; gap: 10px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; border-radius: 18px; padding: 14px; color: #717176; font-size: 14px; }
.sidebar nav a.active { background: #e6f5eb; color: #328258; }
.count { margin-left: auto; font-size: 12px; color: inherit; }
.sidebar-bottom { margin-top: auto; padding: 24px 12px 0; font-size: 12px; color: #73747a; }
.sidebar-bottom p { font-size: 11px; color: #9b9ba1; margin-top: 12px; }
.sidebar-bottom button { padding-left: 0; font-size: 12px; }
.connection-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); margin-right: 7px; }
main { grid-column: 2; min-width: 0; }
.topbar { height: 82px; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; background: #ffffffea; backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 5; }
.content { padding: 28px 36px 70px; max-width: 1220px; margin: auto; }
.page-heading { display: flex; align-items: flex-end; gap: 20px; justify-content: space-between; margin-bottom: 32px; }
.page-heading p { margin: 0; color: #707076; font-size: 14px; }
.search { border: 0; background: #f3f3f5; border-radius: 14px; padding: 13px 17px; width: 260px; font-size: 13px; }
.directory-links { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; margin-bottom: 38px; }
.directory-link { display: flex; align-items: center; gap: 14px; padding: 21px; border-radius: 22px; background: var(--card); }
.directory-link .icon { color: #999a9e; }
.directory-link strong { font-weight: 600; font-size: 16px; }
.row-chevron { color: #b6b6bb; font-size: 28px; line-height: 1; margin-left: auto; font-weight: 300; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 21px; }
.section-heading .muted { font-size: 11px; }
.badge { font-size: 11px; font-weight: 600; color: #46b974; background: #dbf0e1; border-radius: 20px; padding: 6px 11px; white-space: nowrap; }
.project-list { background: var(--card); border-radius: 24px; overflow: hidden; padding: 0 22px; }
.project-card { display: flex; align-items: center; gap: 20px; padding: 21px 0; border-bottom: 1px solid #dedee2; transition: background .15s; }
.project-card:last-child { border-bottom: 0; }
.project-card:hover { background: #ededf0; }
.mini-plan { width: 95px; height: 80px; flex-shrink: 0; border-radius: 16px; background: #edf2f5; overflow: hidden; }
.mini-plan canvas { width: 100%; height: 100%; }
.project-card-body { flex: 1; min-width: 0; }
.project-card h3 { margin: 0 0 5px; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.client-name { font-size: 13px; color: #67676d; }
.card-footer { margin-top: 6px; font-size: 11px; color: var(--muted); }
.empty { padding: 60px 24px; background: var(--card); border-radius: 24px; text-align: center; }
.empty h2 { margin-top: 16px; }
.empty p { max-width: 500px; margin: 0 auto; color: var(--muted); font-size: 14px; }
.panel { background: var(--card); border: 0; border-radius: 24px; padding: 24px; min-width: 0; }
.panel h3 { margin-bottom: 18px; }
.facts { margin: 0; display: grid; grid-template-columns: minmax(80px,1fr) minmax(0,2fr); gap: 8px 22px; font-size: 14px; }
.facts dt { color: #8b8b91; }
.facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; white-space: pre-wrap; }
.back { display: inline-block; padding: 0; margin-bottom: 24px; color: var(--muted); font-size: 13px; }
.project-page { max-width: 940px; margin: 0 auto; }
.project-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.project-titlebar h1 { font-size: 24px; text-align: center; margin: 0; flex: 1; overflow-wrap: anywhere; }
.circle-button { width: 46px; height: 46px; border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: #151619; box-shadow: 0 7px 30px #172b3a0c; font-size: 25px; flex-shrink: 0; }
.project-titlebar .back { margin: 0; font-size: 36px; font-weight: 300; padding-bottom: 5px; }
.project-summary { margin-bottom: 20px; }
.summary-client { display: flex; gap: 10px; align-items: center; border-top: 1px solid #e4e4e7; padding-top: 16px; margin-top: 19px; color: #66666c; font-size: 14px; }
.summary-client .icon { color: #9c9ca2; width: 20px; }
.summary-client a { color: #25262a; }
.project-sections { display: grid; gap: 18px; }
.project-section { border-radius: 25px; background: var(--card); min-width: 0; overflow: hidden; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
.project-section > summary { display: flex; align-items: center; gap: 14px; padding: 22px 24px; }
.project-section > summary h2 { font-size: 21px; font-weight: 600; margin: 0; flex: 1; }
.chevron { color: #9b9b9f; font-size: 28px; font-weight: 300; line-height: 1; transition: transform .18s; }
details[open] > summary > .chevron { transform: rotate(90deg); }
.note-count { display: flex; align-items: center; gap: 5px; color: #a0a0a6; font-size: 12px; }
.note-count .icon { width: 15px; height: 15px; }
.section-body { padding: 0 20px 20px; }
.viewer { position: relative; background: radial-gradient(ellipse at top, #dcf1eaa0, transparent 65%), #f2f6fa; border-radius: 20px; overflow: hidden; }
.viewer canvas { width: 100%; height: 440px; display: block; touch-action: none; }
.reset { position: absolute; right: 15px; top: 15px; }
.drawing-preview { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 19px; background: var(--drawing); overflow: hidden; color: inherit; cursor: zoom-in; }
.drawing-preview > svg { display: block; width: 100%; height: auto; max-height: 580px; }
.inspect-hint { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border: 0; background: #ffffffec; box-shadow: 0 6px 20px #2429360a; color: #85858c; border-radius: 24px; font-size: 12px; }
.inspect-hint .icon { width: 14px; height: 14px; }
.inline-hint, .sync-footnote { font-size: 12px; color: #96969b; text-align: center; margin: 13px 0 0; }
.sync-footnote { margin: 26px 0; }
.section-notes:empty { display: none; }
.note-card { margin-top: 16px; background: #fff; border: 1px solid #e4e4e8; border-radius: 21px; overflow: hidden; }
.note-card summary { display: flex; gap: 10px; align-items: center; padding: 17px 19px; font-weight: 600; font-size: 16px; }
.note-card summary > span:not(.chevron) { flex: 1; }
.note-card .icon { width: 19px; }
.note { margin: 0 16px 16px; padding: 20px; border-radius: 15px; background: var(--drawing); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.65; }
.client-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.client-table th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 500; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.client-table td { padding: 20px 14px; border-bottom: 1px solid #dfdfe4; }
.client-table tr:last-child td { border: 0; }
.client-table a { font-weight: 600; }
.client-table .muted { font-size: 12px; margin-top: 5px; }
.client-layout { display: grid; grid-template-columns: 300px 1fr; gap: 22px; }
.client-layout .facts { display: block; }
.client-layout .facts dt { margin-top: 16px; font-size: 12px; }
.client-layout .facts dd { text-align: left; margin-top: 5px; }
.client-layout .mini-plan { display: none; }
.client-layout .project-card { gap: 12px; }
#notice { background: #fff3df; color: #7b581b; padding: 12px 36px; font-size: 13px; }
.loading { color: var(--muted); padding: 60px; text-align: center; }
.inspector { position: fixed; inset: 0; border: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; background: var(--drawing); color: #17191d; }
.inspector[open] { display: flex; flex-direction: column; }
.inspector::backdrop { background: #fff; }
.inspection-header { padding: 24px 30px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.inspection-header h2 { margin: 0; font-size: 18px; font-weight: 600; }
.close-inspector { background: #5f6065; color: white; font-size: 29px; box-shadow: none; }
.inspection-stage { flex: 1; min-height: 0; display: flex; overflow: hidden; }
.inspection-stage > svg, .inspection-stage > canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.inspection-stage > canvas { background: radial-gradient(ellipse at top, #d9eee8a0, transparent 65%), #f2f6fa; }
.inspection-footer { display: flex; justify-content: space-between; align-items: center; padding: 18px 30px 24px; gap: 20px; }
.inspection-footer p { margin: 0; color: #92929a; font-size: 12px; }
.inspection-controls { display: flex; align-items: center; gap: 12px; }
.inspection-controls .circle-button { font-size: 23px; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 190px 1fr; }
  .sidebar { width: 190px; padding: 28px 14px; }
  .brand { font-size: 18px; gap: 3px; }
  .content { padding: 25px 24px 60px; }
  .topbar { padding: 0 24px; }
  .project-card { gap: 14px; }
  .project-card .mini-plan { width: 72px; height: 65px; }
  .client-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .workspace { display: block; }
  .sidebar { position: static; width: 100%; padding: 20px 20px 10px; display: block; background: #fff; border: 0; }
  .brand { justify-content: center; font-size: 22px; gap: 7px; }
  .workspace-label, .sidebar-bottom, .web-tag { display: none; }
  .sidebar nav { display: flex; margin-top: 24px; gap: 10px; }
  .sidebar nav a { flex: 1; padding: 13px 16px; background: #f4f4f5; }
  .sidebar nav a.active { background: #e4f4e9; }
  .topbar { height: 60px; padding: 0 20px; }
  .topbar > span { font-size: 11px; }
  .topbar .secondary { font-size: 12px; padding: 10px 14px; }
  .content { padding: 24px 16px 50px; }
  .page-heading { flex-direction: column; align-items: stretch; gap: 20px; margin-bottom: 24px; }
  h1 { font-size: 28px; }
  .search { width: 100%; font-size: 15px; }
  .directory-links { grid-template-columns: 1fr; gap: 12px; margin-bottom: 30px; }
  .directory-link { padding: 17px 20px; border-radius: 20px; }
  .section-heading .muted { display: none; }
  .project-list { padding: 0 18px; }
  .project-card { gap: 12px; padding: 20px 0; flex-wrap: wrap; }
  .project-card .mini-plan { display: none; }
  .project-card h3 { font-size: 17px; }
  .project-card .badge { font-size: 10px; padding: 6px 9px; }
  .project-card .row-chevron { display: none; }
  .project-titlebar { gap: 10px; margin-bottom: 22px; }
  .project-titlebar h1 { font-size: 20px; }
  .project-titlebar .badge { display: none; }
  .project-titlebar::after { content: ''; width: 46px; flex-shrink: 0; }
  .project-summary { padding: 20px; }
  .facts { font-size: 13px; gap: 8px 14px; }
  .project-section > summary { padding: 22px 20px; }
  .project-section > summary h2 { font-size: 20px; }
  .section-body { padding: 0 14px 16px; }
  .project-sections { gap: 16px; }
  .viewer canvas { height: 350px; }
  .drawing-preview > svg { min-height: 280px; }
  .inspect-hint { font-size: 11px; padding: 8px 11px; right: 10px; bottom: 10px; }
  .note-card { border-radius: 18px; }
  .client-table th, .client-table td { padding: 14px 7px; }
  .client-table .phone-column { display: none; }
  .panel { padding: 20px; }
  .login-card { padding: 30px; }
  .inspection-header { padding: 20px; }
  .inspection-footer { padding: 16px 20px 24px; flex-direction: column-reverse; gap: 16px; }
  .inspection-footer p { text-align: center; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
/* The web module reuses the app's own CabinetFit mark. */
img.brand-symbol { object-fit: contain; background: transparent; }
.sidebar nav .icon { width: 21px; height: 21px; }
@media (max-width: 700px) {
  .dimension-label-content { transform: scale(1.65); }
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
#mobile-logout { display: none; }
@media (max-width: 700px) {
  #mobile-logout { display: inline-block; color: #85858b; font-size: 11px; padding: 8px 0 8px 6px; }
  .topbar > span { max-width: 38%; }
}
