.workspace-body {
    min-width: 320px;
    min-height: 100vh;
    background: var(--paper);
}

.workspace-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
}

.workspace-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    align-self: start;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 28px 17px 20px;
    background: #173c2b;
    color: #fff;
    scrollbar-color: rgba(255, 255, 255, .28) transparent;
}

.workspace-brand {
    align-self: flex-start;
    margin: 0 0 43px 7px;
}

.workspace-brand .brand-mark {
    stroke: #e4c09c;
}

.workspace-brand .brand-name {
    color: #fff;
}

.workspace-label {
    margin: 0 0 12px 9px;
    color: rgba(255, 255, 255, .5);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .13em;
}

.workspace-label span {
    margin-left: 5px;
    color: #efb080;
}

.workspace-nav {
    display: grid;
    gap: 5px;
    min-height: 0;
}

.workspace-tab {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: rgba(255, 255, 255, .68);
    font-size: 11px;
    text-align: left;
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
}

.workspace-tab > span {
    width: 18px;
    color: #c9d5c9;
    font-size: 15px;
    text-align: center;
}

.workspace-tab:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.workspace-tab.is-active {
    background: #356a46;
    color: #fff;
}

.workspace-tab.is-active > span {
    color: var(--terra);
}

.sidebar-bottom {
    margin-top: auto;
}

.preview-notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .045);
}

.preview-notice > span {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #e3b18d;
    color: var(--green-dark);
    font-size: 11px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
}

.preview-notice p {
    margin: 0;
    color: rgba(255, 255, 255, .56);
    font-size: 9px;
    line-height: 1.7;
}

.preview-notice strong {
    color: #fff;
    font-weight: 600;
}

.back-to-site {
    display: block;
    margin: 17px 9px 0;
    color: rgba(255, 255, 255, .67);
    font-size: 10px;
}

.back-to-site:hover {
    color: #f0b18a;
}

.workspace-main {
    min-width: 0;
}

.workspace-topbar {
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 38px;
    border-bottom: 1px solid #e4e9e1;
    background: #fff;
}

.workspace-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #899187;
    font-size: 10px;
}

.workspace-breadcrumb strong {
    color: #2a3c30;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.demo-pill,
.sample-label {
    padding: 6px 9px;
    border: 1px solid #ead3c2;
    background: #fcf4ed;
    color: #a45b3a;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .08em;
}

.demo-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.demo-pill i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d8794d;
}

.owner-avatar {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dbe8d9;
    color: var(--green-dark);
    font-size: 11px;
    font-weight: 700;
}

.workspace-content {
    width: min(1320px, 100%);
    margin: 0 auto;
    padding: 34px 38px 20px;
}

.view-panel {
    display: none;
}

.view-panel.is-visible {
    display: block;
    animation: panel-enter .22s ease-out;
}

@keyframes panel-enter {
    from { opacity: .6; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.workspace-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.workspace-eyebrow,
.card-eyebrow {
    margin: 0 0 7px;
    color: #80907d;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .14em;
}

.workspace-heading h1 {
    margin: 0;
    color: #203b2c;
    font-family: var(--heading);
    font-size: clamp(24px, 3vw, 33px);
    font-weight: 600;
    letter-spacing: -.055em;
    line-height: 1.25;
}

.workspace-heading h1 em {
    color: #537853;
    font-family: Georgia, serif;
    font-weight: 400;
}

.heading-subtitle {
    margin: 7px 0 0;
    color: #788176;
    font-size: 10px;
}

.sample-label {
    white-space: nowrap;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.metric-card,
.workspace-card {
    border: 1px solid #e5e9e2;
    background: #fff;
}

.metric-card {
    position: relative;
    min-height: 139px;
    overflow: hidden;
    padding: 15px;
}

.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #687365;
    font-size: 9px;
}

.metric-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
}

.green-icon { background: #e6f0e2; color: #3c734e; }
.gold-icon { background: #fff1dc; color: #b17a2b; }
.blue-icon { background: #e7eff8; color: #426d99; font-size: 8px; }
.lilac-icon { background: #efeafa; color: #7466a0; }

.metric-card > strong {
    display: block;
    margin-top: 7px;
    color: #243d2d;
    font-family: var(--heading);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: 1.15;
}

.metric-card > small {
    display: block;
    margin-top: 5px;
    color: #8a9287;
    font-size: 8px;
}

.metric-card > small b {
    color: #4a8b5a;
    font-weight: 700;
}

.sparkline {
    position: absolute;
    right: 15px;
    bottom: 14px;
    height: 22px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
}

.sparkline i {
    width: 4px;
    height: 40%;
    border-radius: 2px 2px 0 0;
    background: #b6d5ad;
}

.sparkline i:nth-child(2) { height: 58%; }
.sparkline i:nth-child(3) { height: 43%; }
.sparkline i:nth-child(4) { height: 75%; }
.sparkline i:nth-child(5) { height: 56%; }
.sparkline i:nth-child(6) { height: 88%; }
.sparkline i:nth-child(7) { height: 68%; }
.sparkline i:nth-child(8) { height: 100%; }
.spark-blue i { background: #b6cde1; }

.metric-foot {
    margin-top: 13px;
    color: #7d877a;
    font-size: 8px;
}

.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 3px;
    border-radius: 50%;
}

.dot-gold { background: #dca549; }

.avatar-stack {
    display: flex;
    margin-top: 8px;
}

.avatar-stack i {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    margin-right: -5px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #dce9d8;
    color: #476343;
    font-size: 6px;
    font-style: normal;
    font-weight: 700;
}

.avatar-stack i:nth-child(2) { background: #f4dfd1; color: #9e6449; }
.avatar-stack i:nth-child(3) { background: #dfe5f4; color: #566a9b; }
.avatar-stack i:last-child { background: #eef0ea; color: #687365; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 14px;
    margin-top: 14px;
}

.workspace-card {
    padding: 18px;
}

.card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.card-eyebrow {
    margin-bottom: 5px;
    font-size: 7px;
}

.card-heading h2 {
    margin: 0;
    color: #2c4031;
    font-family: var(--heading);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.035em;
}

.quiet-action,
.request-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #497653;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
}

.quiet-action span,
.request-link span {
    margin-left: 5px;
}

.meeting-list {
    margin-top: 12px;
}

.meeting-row {
    min-height: 57px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-top: 1px solid #eef0ec;
}

.date-block {
    width: 34px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f3eb;
    color: #3d6444;
}

.date-block b {
    font-size: 12px;
    line-height: 1.1;
}

.date-block span {
    margin-top: 2px;
    font-size: 6px;
    letter-spacing: .08em;
}

.meeting-detail {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.meeting-detail b {
    overflow: hidden;
    color: #39483a;
    font-size: 9px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meeting-detail span,
.meeting-row time {
    color: #8b9388;
    font-size: 8px;
}

.meeting-row time {
    flex-shrink: 0;
}

.request-count {
    padding: 4px 8px;
    border-radius: 12px;
    background: #fff0e8;
    color: #bf6843;
    font-size: 8px;
    font-weight: 700;
}

.request-list {
    margin-top: 12px;
}

.request-list article {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-top: 1px solid #eef0ec;
}

.request-avatar {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e3eedf;
    color: #51744d;
    font-size: 8px;
    font-weight: 700;
}

.request-avatar-orange { background: #fae9df; color: #ae6849; }
.request-avatar-blue { background: #e5edf6; color: #58769a; }

.request-list article > div {
    min-width: 0;
    flex: 1;
}

.request-list b {
    color: #3b493c;
    font-size: 9px;
    font-weight: 600;
}

.request-list p {
    margin: 2px 0 0;
    color: #899187;
    font-size: 8px;
}

.request-time {
    color: #959c92;
    font-size: 8px;
}

.request-link {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid #eef0ec;
    text-align: left;
}

.finance-summary {
    margin-top: 14px;
}

.range-label {
    color: #889185;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .08em;
}

.finance-content {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 25px;
    align-items: end;
    margin-top: 13px;
}

.finance-total {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.finance-total > span,
.finance-total > small {
    color: #879084;
    font-size: 8px;
}

.finance-total strong {
    color: #284431;
    font-family: var(--heading);
    font-size: 22px;
    letter-spacing: -.05em;
}

.chart-bars {
    height: 80px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    border-bottom: 1px solid #edf0ea;
}

.chart-bars i {
    position: relative;
    width: 9%;
    max-width: 25px;
    min-height: 15px;
    background: #dce8d9;
}

.chart-bars i.bar-current {
    background: #6c9870;
}

.chart-bars i span {
    position: absolute;
    bottom: -16px;
    left: 50%;
    color: #92998e;
    font-size: 6px;
    font-style: normal;
    transform: translateX(-50%);
}

.full-card {
    margin-top: 22px;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 17px;
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-wrap th {
    padding: 10px 12px;
    background: #f6f8f4;
    color: #818a7e;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .08em;
    white-space: nowrap;
}

.table-wrap td {
    padding: 13px 12px;
    border-bottom: 1px solid #edf0eb;
    color: #596557;
    font-size: 9px;
    white-space: nowrap;
}

.table-wrap tbody tr:last-child td {
    border-bottom: 0;
}

.table-wrap td strong {
    color: #38483a;
    font-size: 9px;
    font-weight: 600;
}

.table-wrap td small {
    color: #90978e;
    font-size: 8px;
}

.status {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 12px;
    font-size: 7px;
    font-weight: 700;
}

.status-confirmed { background: #e6f1e3; color: #497950; }
.status-pending { background: #fff1dc; color: #a57732; }
.status-new { background: #fff0e8; color: #b8623d; }

.prototype-note {
    margin: 12px 0 0;
    color: #828b80;
    font-size: 9px;
    line-height: 1.7;
}

.finance-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-metrics .metric-card {
    min-height: 115px;
}

.workspace-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding: 14px 2px;
    border-top: 1px solid #e1e6de;
    color: #879085;
    font-size: 8px;
}

.workspace-footer a {
    color: #47734e;
    font-weight: 600;
}

@media (max-width: 1000px) {
    .workspace-shell {
        grid-template-columns: 205px minmax(0, 1fr);
    }

    .workspace-content {
        padding-right: 22px;
        padding-left: 22px;
    }

    .workspace-topbar {
        padding-right: 22px;
        padding-left: 22px;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .workspace-shell {
        display: block;
    }

    .workspace-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 13px 16px 10px;
    }

    .workspace-brand {
        margin: 0 0 12px 2px;
    }

    .workspace-brand .brand-mark {
        width: 30px;
        height: 30px;
    }

    .workspace-brand .brand-name {
        font-size: 22px;
    }

    .workspace-label,
    .sidebar-bottom {
        display: none;
    }

    .workspace-nav {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .workspace-tab {
        min-height: 36px;
        flex: 0 0 auto;
        gap: 6px;
        padding: 0 9px;
        font-size: 9px;
    }

    .workspace-tab > span {
        width: auto;
        font-size: 12px;
    }

    .workspace-topbar {
        min-height: 51px;
        padding: 0 16px;
    }

    .demo-pill {
        padding: 5px 6px;
        font-size: 6px;
    }

    .owner-avatar {
        width: 26px;
        height: 26px;
    }

    .workspace-content {
        padding: 23px 14px 14px;
    }

    .workspace-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 17px;
    }

    .workspace-heading h1 {
        font-size: 27px;
    }

    .metric-grid {
        gap: 9px;
    }

    .metric-card {
        min-height: 130px;
        padding: 12px;
    }

    .metric-top {
        font-size: 8px;
    }

    .metric-card > strong {
        font-size: 22px;
    }

    .dashboard-grid {
        gap: 10px;
        margin-top: 10px;
    }

    .workspace-card {
        padding: 14px 12px;
    }

    .finance-summary {
        margin-top: 10px;
    }

    .finance-content {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .chart-bars {
        height: 65px;
    }

    .full-card {
        margin-top: 14px;
    }

    .table-wrap {
        margin-right: -12px;
    }

    .table-wrap th,
    .table-wrap td {
        padding-right: 10px;
        padding-left: 10px;
    }

    .workspace-footer {
        flex-direction: column;
        gap: 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .view-panel.is-visible {
        animation: none;
    }
}

.workspace-shell[hidden],
.login-screen[hidden] {
    display: none !important;
}

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
    background:
        radial-gradient(ellipse at 82% 15%, rgba(226, 190, 149, .15), transparent 28%),
        linear-gradient(140deg, #f8f6ee 0%, #edf1e9 100%);
}

.login-brand {
    position: absolute;
    top: 28px;
    left: max(28px, calc((100% - 1120px) / 2));
}

.login-card {
    width: min(440px, 100%);
    padding: 38px;
    border: 1px solid #e5e9e1;
    background: #fff;
    box-shadow: 0 25px 70px rgba(32, 59, 44, .09);
}

.login-card h1 {
    margin: 0;
    color: #203b2c;
    font-family: var(--heading);
    font-size: 39px;
    letter-spacing: -.06em;
}

.login-card h1 em {
    color: #537853;
    font-family: Georgia, serif;
    font-weight: 400;
}

.login-subtitle {
    margin: 8px 0 25px;
    color: #788176;
    font-size: 12px;
}

.login-card label,
.record-dialog label,
.settings-form label,
.site-controls label {
    display: block;
    margin-bottom: 15px;
    color: #344a39;
    font-size: 10px;
    font-weight: 700;
}

.login-card input,
.record-dialog input,
.record-dialog select,
.record-dialog textarea,
.settings-form input,
.settings-form select,
.settings-form textarea,
.site-controls input,
.site-controls textarea {
    width: 100%;
    min-height: 43px;
    margin-top: 7px;
    padding: 11px 12px;
    border: 1px solid #dfe4dc;
    border-radius: 0;
    background: #fff;
    color: #253b2d;
    font-size: 11px;
    font-weight: 400;
}

.record-dialog textarea,
.settings-form textarea,
.site-controls textarea {
    min-height: 92px;
    resize: vertical;
}

.login-card form > .button {
    width: 100%;
    margin-top: 6px;
    cursor: pointer;
}

.login-warning {
    margin-top: 12px;
    padding: 12px;
    background: #f7f5eb;
    color: #737b6d;
    font-size: 9px;
    line-height: 1.7;
}

.login-warning strong {
    color: #985d37;
}

.login-back {
    display: inline-block;
    margin-top: 20px;
    color: #47734e;
    font-size: 10px;
    font-weight: 600;
}

.workspace-sidebar .workspace-label {
    margin-bottom: 13px;
}

.workspace-nav {
    gap: 3px;
    flex: 1 1 auto;
    overflow-y: auto;
}

.workspace-tab {
    min-height: 39px;
    font-size: 10px;
}

.workspace-topbar {
    position: sticky;
    top: 0;
    z-index: 4;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid #cfe0d0;
    background: #f2f8f1;
    color: #47734e;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .08em;
}

.live-pill i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5b9b5b;
}

.owner-name {
    color: #526250;
    font-size: 9px;
}

.signout-button {
    padding: 7px 10px;
    border: 1px solid #dfe4dc;
    background: #fff;
    color: #47634b;
    font-size: 9px;
    cursor: pointer;
}

.workspace-alert {
    margin-bottom: 16px;
    padding: 11px 14px;
    border: 1px solid #cfe0d0;
    background: #f0f7ed;
    color: #3e6d45;
    font-size: 10px;
    line-height: 1.6;
}

.workspace-alert.is-error {
    border-color: #e6c6b6;
    background: #fff5ef;
    color: #9a4c32;
}

.page-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 23px;
}

.page-toolbar h1 {
    margin: 0;
    color: #203b2c;
    font-family: var(--heading);
    font-size: clamp(24px, 3vw, 33px);
    font-weight: 600;
    letter-spacing: -.055em;
}

.page-toolbar h1 em {
    color: #537853;
    font-family: Georgia, serif;
    font-weight: 400;
}

.page-toolbar p {
    margin: 7px 0 0;
    color: #788176;
    font-size: 10px;
}

.page-toolbar .button {
    min-height: 40px;
    flex-shrink: 0;
    cursor: pointer;
}

.erp-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 17px;
}

.erp-metric {
    padding: 17px;
    border: 1px solid #e5e9e2;
    background: #fff;
}

.erp-metric span {
    color: #748071;
    font-size: 9px;
}

.erp-metric strong {
    display: block;
    margin-top: 9px;
    color: #284431;
    font-family: var(--heading);
    font-size: 25px;
    letter-spacing: -.04em;
}

.erp-metric small {
    display: block;
    margin-top: 5px;
    color: #8a9287;
    font-size: 8px;
}

.erp-card {
    margin-bottom: 15px;
    padding: 19px;
    border: 1px solid #e5e9e2;
    background: #fff;
}

.erp-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.erp-card-heading h2 {
    margin: 0;
    color: #2c4031;
    font-family: var(--heading);
    font-size: 14px;
}

.erp-card-heading p {
    margin: 0 0 4px;
    color: #879183;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .1em;
}

.erp-table-wrap {
    overflow-x: auto;
}

.erp-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.erp-table th {
    padding: 10px 11px;
    background: #f5f7f3;
    color: #778173;
    font-size: 7px;
    letter-spacing: .08em;
    white-space: nowrap;
}

.erp-table td {
    padding: 12px 11px;
    border-bottom: 1px solid #edf0eb;
    color: #586556;
    font-size: 9px;
    vertical-align: middle;
}

.erp-table tr:last-child td {
    border-bottom: 0;
}

.erp-table td strong {
    color: #36493a;
    font-weight: 600;
}

.erp-table td small {
    display: block;
    margin-top: 3px;
    color: #8b9488;
    font-size: 8px;
}

.table-action {
    padding: 5px 8px;
    border: 1px solid #dbe5d8;
    background: #f5f8f3;
    color: #416d47;
    font-size: 8px;
    font-weight: 600;
    cursor: pointer;
}

.table-action + .table-action {
    margin-left: 4px;
}

.table-action.warn {
    border-color: #ecd7be;
    background: #fff8eb;
    color: #9a6b2f;
}

.status-pill {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 12px;
    background: #e7f2e4;
    color: #47774e;
    font-size: 7px;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill.pending,
.status-pill.draft,
.status-pill.new {
    background: #fff2df;
    color: #9a7237;
}

.status-pill.cancelled,
.status-pill.void {
    background: #fbeae7;
    color: #a05244;
}

.status-pill.muted {
    background: #eef0ec;
    color: #727a70;
}

.settings-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.settings-form .wide-field,
.settings-form .settings-actions,
.settings-callout {
    grid-column: 1 / -1;
}

.settings-form .settings-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.settings-form .button {
    cursor: pointer;
}

.settings-callout {
    margin-bottom: 15px;
    padding: 12px;
    background: #f7f5eb;
    color: #737b6d;
    font-size: 9px;
    line-height: 1.8;
}

.site-customization-card {
    margin-top: 20px;
}

.site-settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr);
    gap: 24px;
    align-items: start;
}

.site-controls {
    min-width: 0;
}

.site-controls h3 {
    margin: 20px 0 12px;
    color: #263d2e;
    font-family: var(--heading);
    font-size: 15px;
}

.site-controls h3:first-child {
    margin-top: 0;
}

.site-field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.site-service-photos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
}

.site-controls label {
    min-width: 0;
}

.site-controls input,
.site-controls textarea {
    min-width: 0;
}

.site-controls input[type="color"] {
    height: 45px;
    padding: 5px;
    cursor: pointer;
}

.site-wide-field {
    display: block;
}

.site-colors-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
}

.site-helper {
    margin: 0 0 12px;
    color: #737b6d;
    font-size: 9px;
    line-height: 1.6;
}

.site-director-row {
    min-width: 0;
    margin: 0 0 12px;
    padding: 13px;
    border: 1px solid #e1e6de;
}

.site-director-row legend {
    padding: 0 5px;
    color: #5f6e5f;
    font-size: 9px;
    font-weight: 700;
}

.site-director-row .site-field-row {
    gap: 10px;
}

.site-director-row .table-action {
    margin-bottom: 4px;
}

.site-photo-upload {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.site-photo-upload label {
    min-width: 0;
    flex: 1;
}

.site-controls .site-photo-upload input[type="file"] {
    min-height: 38px;
    padding: 8px;
    font-size: 9px;
}

.site-photo-upload .table-action {
    margin-bottom: 15px;
    white-space: nowrap;
}

.site-add-director {
    margin-bottom: 14px;
    cursor: pointer;
}

.site-add-director:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.site-preview-panel {
    position: sticky;
    top: 16px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e1e6de;
    background: #f7f8f4;
}

.site-preview-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.site-preview-heading > div {
    display: grid;
    gap: 4px;
}

.site-preview-heading strong {
    color: #263d2e;
    font-size: 10px;
}

.site-preview-heading span,
.site-preview-heading a {
    color: #788176;
    font-size: 8px;
}

.site-preview-heading a {
    color: #47734e;
    white-space: nowrap;
}

.site-preview-panel iframe {
    display: block;
    width: 100%;
    height: min(72vh, 680px);
    border: 1px solid #dfe4dc;
    background: #fff;
}

.site-preview-panel > .site-helper {
    margin: 9px 0 0;
}

.site-save-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.site-save-actions > span {
    color: #737b6d;
    font-size: 9px;
}

.record-dialog {
    width: min(680px, calc(100% - 28px));
    max-height: min(88vh, 840px);
    padding: 0;
    border: 1px solid #dfe5dc;
    background: #fff;
    color: #263b2d;
    box-shadow: 0 24px 80px rgba(14, 37, 24, .24);
}

.record-dialog::backdrop {
    background: rgba(15, 33, 22, .58);
    backdrop-filter: blur(2px);
}

.dialog-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 19px 22px;
    border-bottom: 1px solid #e8ece6;
    background: #fff;
}

.dialog-head h2 {
    margin: 0;
    font-family: var(--heading);
    font-size: 19px;
    letter-spacing: -.04em;
}

.dialog-head p {
    margin: 4px 0 0;
    color: #7a8578;
    font-size: 9px;
}

.dialog-close {
    width: 29px;
    height: 29px;
    border: 1px solid #e0e5de;
    background: #fff;
    color: #4a5b4c;
    font-size: 17px;
    cursor: pointer;
}

.dialog-body {
    padding: 21px 22px 24px;
}

.dialog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 15px;
}

.dialog-grid .wide-field,
.dialog-actions,
.dialog-note,
.invoice-line-list,
.invoice-line-heading {
    grid-column: 1 / -1;
}

.dialog-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.dialog-actions .button {
    min-height: 42px;
    cursor: pointer;
}

.button-muted {
    border: 1px solid #dce3da;
    background: #fff;
    color: #4d654f;
}

.dialog-note {
    padding: 10px 12px;
    background: #f7f5eb;
    color: #737b6d;
    font-size: 9px;
    line-height: 1.7;
}

.invoice-line-heading {
    display: grid;
    grid-template-columns: 1fr 65px 105px 75px 32px;
    gap: 8px;
    margin-bottom: 5px;
    color: #7a8476;
    font-size: 8px;
    font-weight: 700;
}

.invoice-line-list .invoice-line {
    display: grid;
    grid-template-columns: 1fr 65px 105px 75px 32px;
    gap: 8px;
    align-items: center;
}

.meeting-calendar-card {
    margin-bottom: 20px;
}

.meeting-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}

.meeting-calendar-header .card-eyebrow {
    margin-bottom: 4px;
}

.meeting-calendar-header h2 {
    margin: 0;
    color: #263d2e;
    font-family: var(--heading);
    font-size: 19px;
    letter-spacing: -.04em;
}

.meeting-calendar-controls {
    display: flex;
    gap: 6px;
}

.meeting-calendar-controls .table-action {
    width: 32px;
    height: 30px;
    font-size: 14px;
}

.meeting-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.meeting-calendar-weekdays {
    border-bottom: 1px solid #e8ece6;
}

.meeting-calendar-weekdays span {
    padding: 8px 4px;
    color: #788176;
    font-size: 8px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.meeting-calendar-day,
.meeting-calendar-empty {
    min-width: 0;
    min-height: 74px;
    padding: 6px;
    border: 0;
    border-right: 1px solid #edf0eb;
    border-bottom: 1px solid #edf0eb;
    background: #fff;
}

.meeting-calendar-day {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    color: #38493b;
    text-align: left;
    cursor: pointer;
}

.meeting-calendar-day:hover {
    background: #f5f8f3;
}

.meeting-calendar-day.is-today {
    background: #f2f7ef;
    box-shadow: inset 0 0 0 1px #a9c5a5;
}

.meeting-calendar-date {
    align-self: flex-start;
    color: #4a594b;
    font-size: 9px;
    font-weight: 700;
}

.meeting-calendar-day.is-today .meeting-calendar-date {
    color: #2f7040;
}

.meeting-calendar-event {
    display: block;
    overflow: hidden;
    padding: 3px 4px;
    border-radius: 2px;
    background: #e8f1e5;
    color: #3e6944;
    font-size: 7px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meeting-calendar-event.cancelled {
    background: #fbeae7;
    color: #a05244;
}

.meeting-calendar-more {
    color: #778173;
    font-size: 7px;
}

.meeting-calendar-hint {
    margin: 11px 0 0;
    color: #798276;
    font-size: 8px;
}

.invoice-line input {
    min-width: 0;
}

.remove-line {
    width: 30px;
    height: 30px;
    border: 1px solid #eadbd2;
    background: #fff7f2;
    color: #9a543b;
    cursor: pointer;
}

.add-line {
    margin: 3px 0 15px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #47734e;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
}

.print-area {
    display: none;
}

.print-document {
    max-width: 820px;
    margin: 0 auto;
    color: #24352a;
    font-family: Arial, sans-serif;
}

.document-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 22px;
    border-bottom: 3px solid #244c34;
}

.document-brand {
    color: #244c34;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.06em;
}

.document-brand span {
    color: #b9794b;
}

.document-company-details,
.document-meta,
.document-client-details {
    color: #5d695f;
    font-size: 11px;
    line-height: 1.65;
}

.document-title {
    margin: 24px 0 5px;
    color: #244c34;
    font-size: 24px;
    letter-spacing: .06em;
}

.document-number {
    color: #6b776e;
    font-size: 12px;
    font-weight: 700;
}

.document-section-title {
    margin: 22px 0 6px;
    color: #788379;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.document-client-details {
    margin: 0;
    color: #27392d;
    font-size: 12px;
}

.document-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

.document-table th {
    background: #244c34;
    color: #fff;
    font-size: 9px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.document-table th,
.document-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #dfe5df;
    font-size: 10px;
    text-align: left;
    vertical-align: top;
}

.document-table tbody tr:nth-child(even) {
    background: #f5f7f3;
}

.document-table .numeric {
    text-align: right;
    white-space: nowrap;
}

.document-summary {
    width: min(320px, 100%);
    margin: 18px 0 0 auto;
}

.document-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 6px 0;
    border-bottom: 1px solid #e4e9e3;
    color: #5c685f;
    font-size: 11px;
}

.document-summary-row strong {
    color: #293d30;
    text-align: right;
    white-space: nowrap;
}

.document-summary-row.total {
    margin-top: 4px;
    padding: 11px 10px;
    border: 0;
    background: #244c34;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.document-summary-row.total strong {
    color: #fff;
}

.document-notes {
    margin-top: 24px;
    color: #59665c;
    font-size: 10px;
    line-height: 1.6;
}

.receipt-amount {
    margin: 22px 0;
    padding: 17px;
    border: 1px solid #d9e3d7;
    background: #f3f7f1;
    text-align: center;
}

.receipt-amount span {
    display: block;
    margin-bottom: 6px;
    color: #667366;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.receipt-amount strong {
    color: #244c34;
    font-size: 27px;
}

.document-footer {
    margin-top: 30px;
    padding-top: 10px;
    border-top: 1px solid #dfe5df;
    color: #758075;
    font-size: 9px;
    line-height: 1.6;
    text-align: center;
}

.empty-state {
    padding: 34px 20px;
    color: #828b80;
    font-size: 10px;
    text-align: center;
}

@media (max-width: 1000px) {
    .workspace-shell {
        grid-template-columns: 214px minmax(0, 1fr);
    }

    .workspace-content {
        padding-right: 20px;
        padding-left: 20px;
    }

    .erp-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .login-card {
        padding: 27px 22px;
    }

    .login-brand {
        top: 18px;
        left: 18px;
    }

    .workspace-shell {
        display: block;
    }

    .workspace-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 0;
        overflow: visible;
        padding: 12px 12px 9px;
    }

    .workspace-brand {
        margin: 0 0 10px 3px;
    }

    .workspace-sidebar .workspace-label,
    .sidebar-bottom {
        display: none;
    }

    .workspace-nav {
        display: flex;
        flex: 0 0 auto;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 3px;
        padding-bottom: 2px;
    }

    .workspace-tab {
        min-height: 35px;
        flex: 0 0 auto;
        gap: 6px;
        padding: 0 9px;
        font-size: 9px;
    }

    .workspace-tab > span {
        width: auto;
        font-size: 12px;
    }

    .workspace-topbar {
        min-height: 49px;
        padding: 0 13px;
    }

    .workspace-breadcrumb {
        gap: 6px;
        font-size: 8px;
    }

    .live-pill {
        padding: 5px 6px;
        font-size: 6px;
    }

    .owner-name {
        display: none;
    }

    .signout-button {
        padding: 6px 7px;
        font-size: 8px;
    }

    .workspace-content {
        padding: 20px 12px 12px;
    }

    .page-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .page-toolbar .button {
        width: 100%;
    }

    .erp-metric-grid {
        gap: 8px;
    }

    .erp-metric {
        padding: 13px;
    }

    .erp-metric strong {
        font-size: 21px;
    }

    .erp-card {
        padding: 13px 10px;
    }

    .erp-table-wrap {
        margin-right: -10px;
    }

    .erp-table th,
    .erp-table td {
        padding-right: 9px;
        padding-left: 9px;
    }

    .settings-form,
    .dialog-grid,
    .site-settings-layout {
        grid-template-columns: 1fr;
    }

    .site-field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .site-service-photos {
        grid-template-columns: 1fr;
    }

    .site-photo-upload {
        align-items: stretch;
        flex-direction: column;
        gap: 2px;
    }

    .site-photo-upload .table-action {
        align-self: flex-start;
        margin-top: 0;
    }

    .site-preview-panel {
        position: static;
    }

    .site-preview-panel iframe {
        height: 500px;
    }

    .settings-form .wide-field,
    .settings-form .settings-actions,
    .settings-callout,
    .dialog-grid .wide-field,
    .dialog-actions,
    .dialog-note,
    .invoice-line-heading,
    .invoice-line-list {
        grid-column: auto;
    }

    .invoice-line-heading {
        display: none;
    }

    .invoice-line-list .invoice-line {
        grid-template-columns: 1fr 1fr 1fr 32px;
        padding-bottom: 8px;
        border-bottom: 1px solid #e8ece6;
    }

    .invoice-line-list .invoice-line input:first-child {
        grid-column: 1 / -1;
    }

    .meeting-calendar-card {
        padding: 13px 8px;
    }

    .meeting-calendar-day,
    .meeting-calendar-empty {
        min-height: 61px;
        padding: 4px 2px;
    }

    .meeting-calendar-event {
        padding: 2px;
        font-size: 6px;
    }

    .meeting-calendar-weekdays span {
        padding-right: 1px;
        padding-left: 1px;
        font-size: 7px;
    }

    .dialog-body {
        padding: 17px 15px 20px;
    }

    .workspace-footer {
        flex-direction: column;
        gap: 6px;
    }
}

@media print {
    @page {
        size: A4;
        margin: 14mm;
    }

    body * {
        visibility: hidden !important;
    }

    .print-area,
    .print-area * {
        visibility: visible !important;
    }

    .print-area {
        position: absolute;
        inset: 0 auto auto 0;
        width: 100%;
        display: block !important;
        padding: 0;
        background: #fff;
        color: #111;
        font-family: Arial, sans-serif;
    }

    .print-document {
        max-width: none;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .document-header,
    .document-table,
    .document-summary,
    .receipt-amount {
        break-inside: avoid;
    }

    .print-area .print-warning {
        margin-top: 24px;
        padding: 10px;
        border: 1px solid #c6937e;
        background: #fff7f2;
        color: #733;
        font-size: 10px;
    }
}
