.jbw {
    --jbw-navy: #1c3049;
    --jbw-ink: #263238;
    --jbw-muted: #7a858d;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    width: 100%;
    max-width: none;
    min-height: 100vh;
    background: #f7f5f2;
    color: var(--jbw-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    text-align: left;
    isolation: isolate;
}
.jbw, .jbw * { box-sizing: border-box; }
.jbw [hidden] { display: none !important; }
.jbw h2, .jbw h3, .jbw h4, .jbw p { margin: 0; padding: 0; color: inherit; font-family: inherit; line-height: 1.5; }
.jbw button { margin: 0; min-height: 0; font: inherit; letter-spacing: normal; text-transform: none; cursor: pointer; box-shadow: none; background-image: none; }
.jbw button:focus-visible { outline: 3px solid #b5755f; outline-offset: 4px; }
.jbw-sidebar { position: sticky; top: 32px; align-self: start; height: calc(100vh - 32px); min-height: 690px; display: flex; flex-direction: column; padding: 38px 20px 24px; background: var(--jbw-navy); color: #fff; }
.jbw-brand { display: flex; flex-direction: column; padding: 0 12px 35px; }
.jbw-brand-mark { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 18px; border: 1px solid #657181; border-radius: 10px; color: #ecd7cf; font: 26px Georgia, serif; }
.jbw-brand strong { font-size: 22px; letter-spacing: -.4px; }
.jbw-brand > span:last-child { margin-top: 6px; color: #bdc8d1; font-size: 13px; }
.jbw-nav { display: grid; gap: 7px; }
.jbw .jbw-nav-item { display: flex; align-items: center; gap: 13px; width: 100%; padding: 12px 15px; border: 0; border-radius: 10px; background: transparent; color: #d3dce4; text-align: left; }
.jbw .jbw-nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.jbw .jbw-nav-item.is-active { background: rgba(255, 255, 255, .10); color: #fff; font-weight: 600; }
.jbw-nav-dot { width: 8px; height: 8px; border: 1px solid currentColor; border-radius: 2px; flex-shrink: 0; }
.jbw .is-active .jbw-nav-dot { background: currentColor; }
.jbw-sidebar-foot { display: flex; flex-direction: column; gap: 5px; margin-top: auto; padding: 28px 12px 0; color: #c4d0da; font-size: 12px; }
.jbw-main { min-width: 0; padding: 36px clamp(32px, 3vw, 40px) 48px; }
.jbw-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 25px; margin-bottom: 32px; border-bottom: 1px solid #e1e3df; }
.jbw .jbw-header h2 { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.jbw-header p:last-child { color: var(--jbw-muted); font-size: 13px; }
.jbw-avatar { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: #ecdad3; color: #674d46; font-size: 18px; }
.jbw-section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 17px; }
.jbw .jbw-section-heading h3 { font-size: 18px; font-weight: 600; }
.jbw-section-heading > span { color: var(--jbw-muted); font-size: 10px; letter-spacing: 1px; }
.jbw .jbw-demo-badge { padding: 4px 10px; border: 1px solid #dddeda; border-radius: 6px; font-size: 11px; letter-spacing: 0; }
.jbw-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.jbw-stat { background: #fff; border: 1px solid #e7e9ea; border-radius: 12px; box-shadow: 0 3px 10px #173b5704; }
.jbw-stat { position: relative; padding: 26px; overflow: hidden; }
.jbw .jbw-stat h4 { color: var(--jbw-muted); font-size: 14px; font-weight: 500; }
.jbw-stat strong { display: block; margin-top: 12px; font-size: 38px; line-height: 1.2; font-weight: 600; color: var(--jbw-navy); }
.jbw-stat-accent { position: absolute; right: 23px; bottom: 26px; width: 22px; height: 4px; border-radius: 4px; background: #e4c7bd; }
.jbw-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 0; }
.jbw .jbw-button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; padding: 11px 21px; border-radius: 10px; border: 1px solid transparent; font-size: 14px; font-weight: 500; transition: background-color .15s, border-color .15s; }
.jbw .jbw-button-primary { background: var(--jbw-navy); color: white; }
.jbw .jbw-button-primary:hover { background: #2e4d6b; }
.jbw .jbw-button-secondary { background: #fff; color: var(--jbw-navy); border-color: var(--jbw-navy); }
.jbw .jbw-button-secondary:hover { background: #efebe6; border-color: #9aaab7; }
.jbw-customers-heading { margin-top: 36px; }
.jbw-customer-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; color: #805f54; background: #f4e8e2; font-size: 14px; }
.jbw .jbw-button-view { padding: 7px 13px; border: 1px solid #dbe2e7; border-radius: 8px; background: #fff; color: var(--jbw-navy); font-size: 13px; white-space: nowrap; }
.jbw .jbw-button-view:hover { color: #9a6654; background: #faf7f4; }
.jbw-placeholder { padding: 75px 20px; background: #fff; border: 1px solid #e7e9ea; border-radius: 10px; text-align: center; }
.jbw-placeholder-mark { font-size: 40px; color: #b88774; }
.jbw .jbw-placeholder h3 { margin: 15px 0 10px; font-size: 23px; }
.jbw-placeholder p { color: var(--jbw-muted); }
.jbw-mobile-bar { display: none; }
.jbw-brand strong { color: #fff; font-weight: 700; }
.jbw .jbw-nav-item { min-height: 48px; }
.jbw-sidebar-foot strong { color: #fff; font-size: 13px; font-weight: 500; }
.jbw-main > * { max-width: 1400px; }
.jbw-user { display: flex; align-items: center; gap: 12px; flex-shrink: 0; font-size: 13px; font-weight: 500; }
.jbw-welcome { margin-bottom: 30px; }
.jbw .jbw-welcome h3 { margin-bottom: 8px; font-size: 22px; font-weight: 600; }
.jbw .jbw-welcome p { color: var(--jbw-muted); font-size: 14px; }
.jbw-quick-actions { margin-top: 30px; }
.jbw-table-card { overflow-x: auto; width: 100%; border: 1px solid #e7e9ea; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px #173b5703; }
.jbw-table-card:focus-visible { outline: 3px solid #b5755f; outline-offset: 3px; }
.jbw .jbw-customer-table { width: 100%; min-width: 640px; margin: 0; border: 0; border-collapse: collapse; border-spacing: 0; table-layout: auto; color: var(--jbw-ink); font-size: 14px; }
.jbw .jbw-customer-table th, .jbw .jbw-customer-table td { padding: 19px 24px; border: 0; border-bottom: 1px solid #e7e9ea; background: transparent; text-align: left; vertical-align: middle; line-height: 1.5; }
.jbw .jbw-customer-table thead th { padding-top: 15px; padding-bottom: 15px; background: #fcfbf9; color: var(--jbw-muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.jbw .jbw-customer-table tbody th { font-weight: 500; }
.jbw .jbw-customer-table tbody tr:last-child > * { border-bottom: 0; }
.jbw .jbw-customer-table th:last-child, .jbw .jbw-customer-table td:last-child { text-align: right; }
.jbw .jbw-customer-table td { color: #64727c; }
.jbw-customer-name { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.jbw-service-date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.jbw-customer-management > .jbw-header { flex-wrap: wrap; }
.jbw-customer-search { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; padding: 24px; border: 1px solid #e7e9ea; border-radius: 12px; background: #fff; }
.jbw-search-field { flex: 1 1 260px; min-width: 0; }
.jbw-search-field label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 500; color: var(--jbw-ink); }
.jbw .jbw-customer-search input, .jbw .jbw-customer-search select { width: 100%; height: 44px; min-height: 44px; margin: 0; padding: 10px 14px; border: 1px solid #d9dfe3; border-radius: 8px; background-color: #fff; color: var(--jbw-ink); font: inherit; font-size: 14px; box-shadow: none; }
.jbw .jbw-customer-search input::placeholder { color: #7a858d; opacity: 1; }
.jbw .jbw-customer-search select { flex: 0 1 170px; width: 170px; padding-right: 30px; }
.jbw .jbw-customer-search input:focus-visible, .jbw .jbw-customer-search select:focus-visible { outline: 2px solid var(--jbw-navy); outline-offset: 2px; }
.jbw .jbw-directory-table { min-width: 900px; }
.jbw-phone { white-space: nowrap; font-variant-numeric: tabular-nums; }
.jbw .jbw-directory-table [data-jbw-customer-empty] td { padding: 36px 24px; text-align: center; }
.jbw .jbw-search-status { margin-top: 12px; color: #64727c; font-size: 13px; }

/* Consultation prototype: page-local input only. */
.jbw-consultation-header { flex-wrap: wrap; }
.jbw-consultation-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #64727c; font-size: 13px; }
.jbw-consultation-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; }
.jbw-consultation-grid > * { min-width: 0; }
.jbw .jbw-consultation-grid h3 { margin-bottom: 10px; }
.jbw .jbw-consultation-grid h4 { font-size: 14px; font-weight: 500; }
.jbw .jbw-consultation-hint { color: #7a858d; font-size: 12px; line-height: 1.8; }
.jbw-face-map { display: block; width: 100%; max-width: 360px; height: auto; margin: 12px auto 20px; }
.jbw-face-outline { fill: none; stroke: #aaa69f; stroke-width: 1.5; }
.jbw-face-region { cursor: pointer; outline: none; }
.jbw-face-region path { fill: #f4f0eb; stroke: #d4cdc5; stroke-width: 1; }
.jbw-face-region:hover path { stroke: #98776b; stroke-width: 2; }
.jbw-face-region[aria-pressed="true"] path { fill: #eacbc3; stroke: #c19b8f; }
.jbw-face-region:focus-visible path { stroke: #1c3049; stroke-width: 3; }
.jbw-face-region text { fill: #5e534e; font-family: inherit; font-size: 10px; text-anchor: middle; dominant-baseline: middle; pointer-events: none; user-select: none; }
.jbw-selection-tags { display: flex; flex-wrap: wrap; gap: 8px; min-height: 32px; margin-top: 12px; color: #7a858d; font-size: 13px; }
.jbw-selection-tag { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 7px; background: #f2ddd6; color: #695149; font-size: 12px; }
.jbw .jbw-skin-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0 28px; padding: 0; border: 0; min-width: 0; }
.jbw .jbw-skin-options legend { padding: 0; margin-bottom: 12px; color: #64727c; font-size: 12px; }
.jbw-skin-options label { display: flex; align-items: center; gap: 9px; margin: 0; min-height: 44px; padding: 9px; border: 1px solid #e7e9ea; border-radius: 8px; cursor: pointer; font-size: 13px; }
.jbw .jbw-skin-options input { appearance: none; -webkit-appearance: none; flex: 0 0 18px; width: 18px; height: 18px; margin: 0; padding: 0; border: 1px solid #aeb9c2; border-radius: 4px; background: #fff; box-shadow: none; position: relative; }
.jbw .jbw-skin-options input:checked { background: #1c3049; border-color: #1c3049; }
.jbw .jbw-skin-options input:checked::after { content: ''; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.jbw .jbw-skin-options input:focus-visible, .jbw .jbw-consultation-notes:focus-visible { outline: 2px solid #1c3049; outline-offset: 3px; }
.jbw-notes-label { display: block; margin: 26px 0 10px; font-size: 14px; font-weight: 500; }
.jbw .jbw-consultation-notes { display: block; width: 100%; height: 120px; min-height: 120px; padding: 13px; border: 1px solid #d9dfe3; border-radius: 10px; background: #fff; color: #263238; font: inherit; font-size: 13px; line-height: 1.8; resize: vertical; box-shadow: none; }
.jbw-consultation-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 24px; border-top: 1px solid #e7e9ea; }
.jbw .jbw-consultation-message { margin-top: 16px; color: #64727c; font-size: 14px; }
@media (max-width: 900px) {
    .jbw-consultation-grid { gap: 16px; }
    .jbw-consultation-grid .jbw-detail-card { padding: 20px; }
    .jbw .jbw-skin-options { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .jbw-consultation-grid { grid-template-columns: 1fr; }
    .jbw .jbw-skin-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jbw-consultation-footer > .jbw-actions { flex: 1 1 100%; }
}

/* Customer detail prototype: all rules stay inside the workspace. */
.jbw .jbw-back { padding: 0; margin-bottom: 22px; border: 0; border-radius: 4px; background: transparent; color: var(--jbw-navy); font-size: 14px; }
.jbw .jbw-back:hover { color: #946b5e; }
.jbw-detail-header { flex-wrap: wrap; margin-bottom: 26px; }
.jbw-detail-summary, .jbw-detail-card { background: #fff; border: 1px solid #e7e9ea; border-radius: 12px; box-shadow: 0 3px 12px #1c304903; padding: 28px; }
.jbw-detail-summary { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(0, 2fr); gap: 32px; align-items: center; }
.jbw-detail-identity { display: flex; align-items: center; gap: 16px; }
.jbw-detail-identity .jbw-customer-avatar { width: 64px; height: 64px; font-size: 24px; }
.jbw .jbw-detail-identity h3 { margin-bottom: 8px; font-size: 21px; font-weight: 600; }
.jbw-customer-tag { display: inline-block; padding: 3px 9px; border-radius: 6px; background: #f5eee8; color: #80675a; font-size: 12px; }
.jbw .jbw-summary-fields, .jbw .jbw-detail-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; }
.jbw .jbw-detail dt { margin: 0 0 7px; color: #7a858d; font-size: 12px; font-weight: 400; }
.jbw .jbw-detail dd { margin: 0; color: #263238; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.jbw-detail-tabs { display: flex; gap: 26px; margin: 30px 0 24px; border-bottom: 1px solid #dce1e4; overflow-x: auto; }
.jbw .jbw-detail-tabs button { flex-shrink: 0; padding: 13px 3px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: #64727c; font-size: 14px; }
.jbw .jbw-detail-tabs button:hover { background: #efede9; color: var(--jbw-navy); }
.jbw .jbw-detail-tabs button[aria-selected="true"] { border-bottom-color: var(--jbw-navy); color: var(--jbw-navy); font-weight: 600; }
.jbw .jbw-detail-tabs button:focus-visible { outline-offset: -3px; }
.jbw-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.jbw .jbw-detail-card h3 { margin-bottom: 24px; font-size: 18px; font-weight: 600; }
.jbw .jbw-detail-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jbw-field-wide { grid-column: 1 / -1; }
.jbw-observation { padding: 18px; border-radius: 10px; background: #f8f6f3; }
.jbw .jbw-detail a { color: var(--jbw-navy); text-decoration: underline; }
.jbw-detail-quick { margin-top: 28px; }
.jbw .jbw-detail-quick h3 { margin-bottom: 14px; font-size: 16px; font-weight: 600; }
.jbw .jbw-detail-quick .jbw-button { padding: 9px 15px; font-size: 13px; }
.jbw .jbw-detail-records { list-style: none; margin: 0; padding: 0; }
.jbw .jbw-detail-records li { margin: 0; padding: 22px 0; border-bottom: 1px solid #e7e9ea; }
.jbw .jbw-detail-records li:first-child { padding-top: 0; }
.jbw-detail-records time { display: block; margin-bottom: 9px; color: #7a858d; font-size: 13px; }
.jbw .jbw-detail-records h4 { margin-bottom: 8px; font-size: 16px; font-weight: 500; }
.jbw .jbw-detail-records p { font-size: 14px; line-height: 1.9; }
.jbw .jbw-detail-note { margin-top: 24px; color: #64727c; font-size: 13px; }
.jbw-photo-placeholders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.jbw-photo-placeholders > div { display: grid; place-items: center; min-height: 170px; aspect-ratio: 4 / 3; border: 1px dashed #ccd2d6; border-radius: 10px; background: #f0f1f2; color: #64727c; font-size: 14px; }
@media (max-width: 1100px) {
    .jbw-detail-summary, .jbw-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .jbw-detail-summary, .jbw-detail-card { padding: 22px; }
    .jbw .jbw-summary-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .jbw .jbw-detail-fields, .jbw-photo-placeholders { grid-template-columns: 1fr; }
    .jbw-detail-tabs { gap: 18px; }
}

@media (max-width: 820px) {
    .jbw { grid-template-columns: 200px minmax(0, 1fr); }
    .jbw-main { padding: 28px 20px; }
    .jbw-stats { gap: 12px; }
    .jbw-stat { padding: 18px; }
    .jbw-stat strong { font-size: 30px; margin-top: 6px; }
}
@media (max-width: 640px) {
    .jbw { display: block; min-height: 0; }
    .jbw-stats { grid-template-columns: 1fr; }
    .jbw-header { flex-wrap: wrap; gap: 18px; }
    .jbw-user { margin-left: auto; }
    .jbw .jbw-welcome h3 { font-size: 20px; }
    .jbw-mobile-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px; background: var(--jbw-navy); color: #fff; }
    .jbw-mobile-bar > span { font-size: 17px; font-weight: 600; }
    .jbw .jbw-menu-toggle { padding: 6px 10px; background: transparent; color: #fff; border: 1px solid #7f909f; border-radius: 6px; font-size: 12px; }
    .jbw-sidebar { display: none; position: static; height: auto; min-height: 0; padding: 14px 16px 20px; }
    .jbw.is-menu-open .jbw-sidebar { display: flex; }
    .jbw-brand { display: none; }
    .jbw-main { padding: 26px 16px 36px; }
    .jbw-header { align-items: flex-start; }
    .jbw-avatar { width: 34px; height: 34px; }
    .jbw-actions .jbw-button { flex: 1; padding: 11px 10px; white-space: nowrap; }
    .jbw-customers-heading > span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .jbw .jbw-button { transition: none; }
}

/* Only the plugin's standalone document receives these layout resets.
   Own the toolbar offset instead of combining it with WordPress's html margin. */
html.jane-workspace-document {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    max-width: none;
    min-height: 100%;
}
body.jane-workspace-page {
    --jbw-admin-bar-height: 0px;
    display: block;
    box-sizing: border-box;
    margin: 0 !important;
    padding: var(--jbw-admin-bar-height) 0 0 !important;
    width: 100%;
    max-width: none !important;
    min-height: 100vh;
    background: #f7f5f2;
}
body.jane-workspace-page.admin-bar { --jbw-admin-bar-height: 32px; }
.jane-workspace-page .jane-workspace-shell {
    display: block;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: none;
    min-height: calc(100vh - var(--jbw-admin-bar-height));
}
.jane-workspace-page .jane-workspace-shell > .jbw {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: none;
    min-height: calc(100vh - var(--jbw-admin-bar-height));
    background: var(--jbw-navy);
}
.jane-workspace-page .jbw-main { background: #f7f5f2; }
@media (min-width: 641px) {
    .jane-workspace-page .jbw-sidebar {
        top: var(--jbw-admin-bar-height);
        height: calc(100vh - var(--jbw-admin-bar-height));
        min-height: 0;
        overflow-y: auto;
    }
}
@media (max-width: 782px) {
    body.jane-workspace-page.admin-bar { --jbw-admin-bar-height: 46px; }
}
/* WordPress normally makes the toolbar absolute on small screens.
   Keep it fixed here so the reserved offset stays accurate while scrolling. */
.jane-workspace-page.admin-bar #wpadminbar { position: fixed; top: 0; }
@media (max-width: 640px) {
    .jane-workspace-page .jane-workspace-shell > .jbw { background: #f7f5f2; }
}
