:root {
    color-scheme: light;
    --bg: #f3f2f5;
    --panel: #ffffff;
    --panel-soft: #fbf7ff;
    --line: #eadff2;
    --line-strong: #d8cfe3;
    --text: #26323a;
    --muted: #64717c;
    --brand: #4b0082;
    --brand-strong: #5f1696;
    --brand-soft: #e7ddff;
    --brand-hover: #eee8f8;
    --brand-frame: #fbf7ff;
    --brand-frame-line: #eee5f6;
    --warning: #9b6716;
    --danger: #b42318;
    --success: #247a4c;
    --shadow: 0 6px 18px rgba(44, 36, 58, 0.08);
    --shadow-strong: 0 16px 34px rgba(44, 36, 58, 0.16);
    --sidebar-collapsed: 70px;
    --sidebar-expanded: 240px;
    --topbar-height: 50px;
    --frame-width: 1450px;
}

/* Reports information architecture: section nav + report subnav */
.reports-workspace {
    gap: 12px;
}

.reports-titlebar {
    min-height: 72px;
    padding: 14px 16px;
    box-shadow: 0 6px 18px rgba(55, 30, 80, 0.06);
}

.reports-subnav-shell {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #e5d9ee;
    border-radius: 8px;
    padding: 6px 8px 6px 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(44, 24, 64, 0.05);
}

.reports-subnav-label {
    color: var(--brand);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.reports-subnav {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.reports-subnav a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #dcd4e6;
    border-radius: 8px;
    padding: 0 11px;
    background: linear-gradient(180deg, #fff 0%, #faf7fd 100%);
    color: #44364e;
    font-size: 0.78rem;
    font-weight: 850;
    box-shadow: 0 2px 8px rgba(44, 24, 64, 0.05);
}

.reports-subnav a .ui-icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
    color: var(--brand);
}

.reports-subnav a:hover,
.reports-subnav a:focus-visible {
    border-color: #b58bd4;
    background: #f8f1fc;
    color: var(--brand);
    outline: none;
}

.reports-subnav a.active {
    border-color: #6e2cac;
    background: #f3eafd;
    color: var(--brand);
    box-shadow: inset 0 0 0 1px rgba(110, 44, 172, 0.11), 0 2px 8px rgba(44, 24, 64, 0.05);
}

.reports-filter-disclosure {
    overflow: hidden;
    border: 1px solid #e5dced;
    border-radius: 8px;
    background: #fbfafc;
}

.reports-filter-disclosure > summary {
    min-height: 52px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    list-style: none;
}

.reports-filter-disclosure > summary::-webkit-details-marker {
    display: none;
}

.reports-filter-summary-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eee5f6;
    color: var(--brand);
}

.reports-filter-summary-icon .ui-icon {
    width: 18px;
    height: 18px;
}

.reports-filter-disclosure summary strong,
.reports-filter-disclosure summary small {
    display: block;
}

.reports-filter-disclosure summary strong {
    color: #3d3048;
    font-size: 0.81rem;
}

.reports-filter-disclosure summary small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.69rem;
}

.reports-filter-toggle {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #dcd3e4;
    border-radius: 8px;
    padding: 0 10px;
    background: #fff;
    color: var(--brand);
    font-size: 0.73rem;
    font-weight: 900;
}

.reports-filter-toggle .ui-icon {
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
}

.reports-filter-disclosure[open] .reports-filter-toggle .ui-icon {
    transform: rotate(180deg);
}

.reports-filter-disclosure .reports-filter-panel {
    grid-template-columns: 1fr;
    gap: 10px;
    border: 0;
    border-top: 1px solid #e5dced;
    border-radius: 0;
    padding: 12px;
    background: #fff;
}

.reports-filter-disclosure .reports-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.reports-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reports-kpi {
    min-height: 92px;
    align-items: center;
}

.reports-directory {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.reports-directory > a {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 12px;
    border: 1px solid #e2d7eb;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(55, 30, 80, 0.05);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.reports-directory > a:hover,
.reports-directory > a:focus-visible {
    border-color: #b997d2;
    box-shadow: 0 8px 20px rgba(55, 30, 80, 0.09);
    transform: translateY(-1px);
    outline: none;
}

.reports-directory-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eee5f6;
    color: var(--brand);
}

.reports-directory > a > span:nth-child(2) > * {
    display: block;
}

.reports-directory small {
    color: var(--brand);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.reports-directory strong {
    margin-top: 4px;
    color: #30253a;
    font-size: 0.93rem;
}

.reports-directory em {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 700;
}

.reports-directory > a > .ui-icon {
    width: 18px;
    height: 18px;
    color: #9a7aae;
}

.reports-grid-focus {
    grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
}

.reports-grid-focus > .reports-table-card,
.reports-grid-focus > .reports-compliance-card {
    width: 100%;
}

.reports-stat-card .reports-health-grid {
    align-content: start;
}

@media (max-width: 900px) {
    .reports-subnav-shell {
        align-items: flex-start;
        flex-direction: column;
    }

    .reports-subnav {
        justify-content: flex-start;
        width: 100%;
    }

    .reports-directory {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .reports-kpi-grid {
        grid-template-columns: 1fr;
    }

    .reports-subnav {
        display: grid;
        grid-template-columns: 1fr;
    }

    .reports-subnav a {
        justify-content: flex-start;
    }

    .reports-filter-disclosure > summary {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .reports-filter-toggle {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

/* Reports workspace */
.reports-workspace {
    display: grid;
    gap: 14px;
    color: #2f2938;
}

.reports-titlebar,
.reports-title-actions,
.reports-filter-heading,
.reports-filter-actions,
.reports-card-header,
.reports-definition-note,
.reports-service-name,
.reports-service-values,
.reports-status-row > div:first-child,
.reports-channel-grid article > span,
.reports-compliance-list > div,
.reports-compliance-list > div > span {
    display: flex;
    align-items: center;
}

.reports-titlebar {
    justify-content: space-between;
    gap: 18px;
    min-height: 78px;
    border: 1px solid #dfd1ec;
    border-radius: 8px;
    padding: 15px 17px;
    background: linear-gradient(135deg, #ffffff 0%, #fbf9ff 58%, #f4eef9 100%);
    box-shadow: 0 10px 26px rgba(55, 30, 80, 0.08);
}

.reports-eyebrow,
.reports-card-header > div > span {
    display: block;
    color: var(--brand);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.reports-titlebar h2 {
    margin: 2px 0 0;
    color: #2f2140;
    font-size: 1.55rem;
    line-height: 1.1;
}

.reports-titlebar p,
.reports-card-header p {
    margin: 4px 0 0;
    color: var(--muted);
}

.reports-titlebar p {
    font-size: 0.86rem;
}

.reports-title-actions {
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
}

.reports-period-chip {
    flex: 0 0 auto;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #ded2e8;
    border-radius: 8px;
    padding: 0 11px;
    background: #fff;
    color: #564661;
    font-size: 0.78rem;
    font-weight: 850;
    white-space: nowrap;
}

.reports-period-chip .ui-icon {
    width: 17px;
    height: 17px;
    color: var(--brand);
}

.reports-filter-panel {
    display: grid;
    grid-template-columns: minmax(190px, 0.85fr) minmax(0, 3fr) auto;
    gap: 13px;
    align-items: end;
    border: 1px solid #e5dced;
    border-radius: 8px;
    padding: 13px 14px;
    background: #fbfafc;
}

.reports-filter-heading {
    align-self: center;
    gap: 9px;
    min-width: 0;
}

.reports-filter-heading > span {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eee5f6;
    color: var(--brand);
}

.reports-filter-heading strong,
.reports-filter-heading small {
    display: block;
}

.reports-filter-heading strong {
    font-size: 0.82rem;
}

.reports-filter-heading small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.25;
}

.reports-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(105px, 1fr));
    gap: 8px;
}

.reports-filter-grid label > span {
    display: block;
    margin: 0 0 4px 2px;
    color: #675873;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.reports-filter-grid input,
.reports-filter-grid select {
    width: 100%;
    min-height: 36px;
    border: 1px solid #dcd3e4;
    border-radius: 7px;
    padding: 6px 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 0.76rem;
}

.reports-filter-actions {
    justify-content: flex-end;
    gap: 7px;
}

.reports-filter-actions .btn {
    min-height: 36px;
    white-space: nowrap;
}

.reports-definition-note {
    gap: 8px;
    border: 1px solid #d8e8de;
    border-left: 3px solid #4a9567;
    border-radius: 7px;
    padding: 9px 12px;
    background: #f5fbf7;
    color: #456252;
    font-size: 0.75rem;
    line-height: 1.35;
}

.reports-definition-note .ui-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: #2d7b4c;
}

.reports-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.reports-kpi {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border: 1px solid #e6dcef;
    border-radius: 8px;
    padding: 13px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(55, 30, 80, 0.05);
}

.reports-kpi-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eee5f6;
    color: var(--brand);
}

.reports-kpi.is-primary .reports-kpi-icon {
    background: #e8e0f4;
}

.reports-kpi.is-warning .reports-kpi-icon {
    background: #fff2d7;
    color: #966214;
}

.reports-kpi.is-success .reports-kpi-icon {
    background: #e5f4ea;
    color: #28784a;
}

.reports-kpi small,
.reports-kpi strong,
.reports-kpi div > span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reports-kpi small {
    color: #6d5d78;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.reports-kpi strong {
    margin-top: 5px;
    color: #25323a;
    font-size: 1.28rem;
    line-height: 1;
}

.reports-kpi div > span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 750;
}

.reports-kpi .reports-trend.positive {
    color: #28784a;
}

.reports-kpi .reports-trend.negative {
    color: #a64a3f;
}

.reports-micro-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #e6dcef;
    border-radius: 8px;
    background: #faf8fc;
}

.reports-micro-metrics > div {
    min-width: 0;
    padding: 10px 13px;
    border-left: 1px solid #e6dcef;
}

.reports-micro-metrics > div:first-child {
    border-left: 0;
}

.reports-micro-metrics span,
.reports-micro-metrics strong {
    display: block;
}

.reports-micro-metrics span {
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 800;
}

.reports-micro-metrics strong {
    margin-top: 3px;
    color: #3d3048;
    font-size: 0.94rem;
}

.reports-grid {
    display: grid;
    gap: 14px;
}

.reports-grid-primary {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
}

.reports-grid-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reports-grid-bottom {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
}

.reports-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    box-shadow: var(--shadow);
}

.reports-card-header {
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 13px;
}

.reports-card-header h3 {
    margin: 2px 0 0;
    color: #2f2140;
    font-size: 1rem;
}

.reports-card-header p {
    font-size: 0.73rem;
    line-height: 1.35;
}

.reports-card-header > a {
    flex: 0 0 auto;
    border: 1px solid #ddd2e7;
    border-radius: 7px;
    padding: 5px 8px;
    background: #fbf9fd;
    color: var(--brand);
    font-size: 0.68rem;
    font-weight: 900;
}

.reports-card-header > a:hover {
    border-color: #bda9cf;
    background: #f3edf8;
}

.reports-service-list,
.reports-status-list,
.reports-value-list,
.reports-compliance-list {
    display: grid;
    gap: 9px;
}

.reports-service-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.75fr) minmax(180px, 1fr);
    gap: 5px 16px;
    padding: 8px 0;
    border-bottom: 1px solid #eee8f2;
}

.reports-service-row:last-child {
    border-bottom: 0;
}

.reports-service-name,
.reports-service-values {
    justify-content: space-between;
    gap: 10px;
}

.reports-service-name {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
}

.reports-service-name strong {
    font-size: 0.82rem;
}

.reports-service-name span,
.reports-service-values span {
    color: var(--muted);
    font-size: 0.68rem;
}

.reports-service-values {
    align-items: flex-end;
}

.reports-service-values strong {
    color: #392643;
    font-size: 0.88rem;
}

.reports-bar {
    grid-column: 1 / -1;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #eee9f2;
}

.reports-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #5f1696, #9b74bc);
}

.reports-status-row {
    display: grid;
    gap: 5px;
    padding: 7px 0;
}

.reports-status-row > div:first-child {
    justify-content: space-between;
    gap: 12px;
}

.reports-status-row > div:first-child strong {
    font-size: 0.9rem;
}

.reports-bar.is-status {
    grid-column: auto;
    height: 6px;
}

.reports-status-row small {
    color: var(--muted);
    font-size: 0.66rem;
    text-align: right;
}

.reports-table-card {
    padding-bottom: 9px;
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
}

.reports-table th,
.reports-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #eee8f2;
    font-size: 0.76rem;
    text-align: left;
    white-space: nowrap;
}

.reports-table th {
    color: #695974;
    background: #faf8fc;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.reports-table tbody tr:last-child td {
    border-bottom: 0;
}

.reports-value-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid #eee8f2;
}

.reports-value-list > div:last-child {
    border-bottom: 0;
}

.reports-value-list span,
.reports-value-list small {
    display: block;
}

.reports-value-list span {
    font-size: 0.78rem;
    font-weight: 800;
}

.reports-value-list small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 700;
}

.reports-value-list strong {
    color: #3d3048;
    font-size: 0.86rem;
}

.reports-health-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.reports-health-grid > div {
    border: 1px solid #e9e1ee;
    border-radius: 7px;
    padding: 11px;
    background: #fbfafc;
}

.reports-health-grid strong,
.reports-health-grid span {
    display: block;
}

.reports-health-grid strong {
    color: #4a225c;
    font-size: 1.12rem;
}

.reports-health-grid span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 800;
}

.reports-channel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.reports-channel-grid article {
    border: 1px solid #e9e1ee;
    border-radius: 7px;
    padding: 11px;
    background: #fbfafc;
}

.reports-channel-grid article > span {
    gap: 6px;
    color: #5b4668;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.reports-channel-grid .ui-icon {
    width: 16px;
    height: 16px;
    color: var(--brand);
}

.reports-channel-grid strong,
.reports-channel-grid small {
    display: block;
}

.reports-channel-grid strong {
    margin-top: 7px;
    font-size: 1.18rem;
}

.reports-channel-grid small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.65rem;
    line-height: 1.35;
}

.reports-usage-line {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 9px;
}

.reports-usage-line > span {
    border-radius: 999px;
    padding: 5px 8px;
    background: #eee8f5;
    color: #624c70;
    font-size: 0.63rem;
    font-weight: 750;
}

.reports-inventory-strip {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: -3px 0 10px;
    color: var(--muted);
    font-size: 0.69rem;
}

.reports-inventory-strip strong {
    color: #4a3057;
}

.reports-compliance-list > div {
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #e8e1ed;
    border-radius: 7px;
    padding: 10px;
    background: #fbfafc;
}

.reports-compliance-list > div.needs-attention {
    border-color: #ead6ad;
    background: #fffaf0;
}

.reports-compliance-list > div > span {
    gap: 8px;
    min-width: 0;
}

.reports-compliance-list .ui-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    color: var(--brand);
}

.reports-compliance-list strong,
.reports-compliance-list small {
    display: block;
}

.reports-compliance-list strong {
    font-size: 0.75rem;
}

.reports-compliance-list small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.63rem;
}

.reports-compliance-list b {
    color: #4b245f;
    font-size: 1rem;
}

.reports-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    border: 1px dashed #dcd3e4;
    border-radius: 8px;
    padding: 20px;
    background: #fbfafc;
    color: var(--muted);
    text-align: center;
}

.reports-empty.is-compact {
    min-height: 130px;
}

.reports-empty .ui-icon {
    color: #9b85aa;
}

.reports-empty strong {
    color: #564661;
    font-size: 0.82rem;
}

.reports-empty span,
.reports-inline-empty {
    color: var(--muted);
    font-size: 0.72rem;
}

@media (max-width: 1240px) {
    .reports-filter-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .reports-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .reports-filter-actions {
        justify-content: flex-start;
    }

    .reports-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .reports-titlebar,
    .reports-grid-primary,
    .reports-grid-secondary,
    .reports-grid-bottom {
        grid-template-columns: 1fr;
    }

    .reports-titlebar {
        display: grid;
    }

    .reports-title-actions {
        justify-content: flex-start;
    }

    .reports-micro-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reports-micro-metrics > div:nth-child(odd) {
        border-left: 0;
    }
}

@media (max-width: 620px) {
    .reports-filter-grid,
    .reports-kpi-grid,
    .reports-health-grid,
    .reports-channel-grid,
    .reports-micro-metrics {
        grid-template-columns: 1fr;
    }

    .reports-micro-metrics > div {
        border-top: 1px solid #e6dcef;
        border-left: 0;
    }

    .reports-micro-metrics > div:first-child {
        border-top: 0;
    }

    .reports-title-actions,
    .reports-title-actions .btn,
    .reports-period-chip,
    .reports-filter-actions,
    .reports-filter-actions .btn {
        width: 100%;
    }

    .reports-title-actions .btn,
    .reports-period-chip,
    .reports-filter-actions .btn {
        justify-content: center;
    }

    .reports-service-row {
        grid-template-columns: 1fr;
    }

    .reports-service-values {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }
}

/* OmOffice-aligned POS terminal */
.content:has(.pos-terminal) {
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
    padding: 12px 18px;
}

.content-frame:has(.pos-terminal) {
    height: 100%;
    min-height: 0;
    margin-bottom: 0;
}

.content-surface:has(.pos-terminal) {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 14px;
}

.pos-terminal.pos-register-form {
    height: 100%;
    min-height: 0;
    margin: 0;
}

.pos-terminal .pos-register-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 380px);
    height: 100%;
    min-height: 0;
    align-items: stretch;
    gap: 14px;
}

.pos-terminal .pos-register-catalog {
    grid-template-rows: auto auto minmax(180px, 1fr);
    height: 100%;
    min-height: 0;
    align-content: start;
    gap: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-right: 3px;
}

.pos-terminal .pos-sale-section {
    padding: 14px;
}

.pos-section-heading,
.pos-date-controls,
.pos-cart-header,
.pos-cart-title {
    display: flex;
    align-items: center;
}

.pos-section-heading,
.pos-cart-header {
    justify-content: space-between;
    gap: 12px;
}

.pos-section-heading {
    margin-bottom: 10px;
}

.pos-section-heading h2,
.pos-cart-header h2 {
    margin: 0;
    color: #2f2938;
    font-size: 1rem;
    line-height: 1.2;
}

.pos-section-heading p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.pos-date-controls {
    gap: 7px;
    flex-wrap: nowrap;
}

.pos-date-controls input {
    width: 132px;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 5px 8px;
    background: #fff;
    font: inherit;
    font-size: 0.78rem;
}

.pos-icon-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--brand);
    cursor: pointer;
}

.pos-icon-btn:hover {
    border-color: #bda9cf;
    background: #f8f4fb;
}

.pos-appointment-rail {
    display: flex;
    gap: 9px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 3px;
}

.pos-appointment-card {
    flex: 0 0 232px;
    width: 232px;
    height: 104px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    grid-template-rows: 24px 21px 21px;
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
    border: 1px solid #ddd6e5;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    color: #2f2938;
    text-align: left;
    cursor: pointer;
}

.pos-appointment-card:hover,
.pos-appointment-card.is-selected {
    border-color: #8dbfa0;
    box-shadow: inset 0 0 0 1px rgba(60, 133, 87, 0.14);
}

.pos-appointment-card.is-selected {
    background: #eff8f2;
}

.pos-appointment-card.is-closed {
    opacity: 0.58;
    cursor: default;
}

.pos-appointment-avatar {
    grid-column: 1;
    grid-row: 1 / span 3;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eee5f6;
    color: var(--brand);
}

.pos-appointment-card strong,
.pos-appointment-card > span:not(.pos-appointment-avatar),
.pos-appointment-card small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-appointment-card strong {
    grid-column: 2 / span 2;
    font-size: 0.87rem;
}

.pos-appointment-card > span:not(.pos-appointment-avatar) {
    grid-column: 2 / span 2;
    color: var(--muted);
    font-size: 0.78rem;
}

.pos-appointment-card small {
    grid-column: 2;
    color: var(--muted);
    font-size: 0.72rem;
}

.pos-appointment-card b {
    grid-column: 3;
    justify-self: end;
    color: #4b245f;
    font-size: 0.8rem;
}

.pos-empty-rail {
    min-height: 96px;
    min-width: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px dashed #d9d1e1;
    border-radius: 8px;
    padding: 16px;
    color: var(--muted);
    background: #faf9fb;
}

.pos-empty-rail span {
    display: block;
}

.pos-quick-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.pos-quick-grid button {
    min-height: 82px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    border: 1px solid #ddd6e5;
    border-radius: 8px;
    background: #fff;
    color: #332b3b;
    cursor: pointer;
}

.pos-quick-grid button:hover {
    border-color: #bda9cf;
    background: #faf7fc;
}

.pos-quick-grid button span {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eee5f6;
    color: var(--brand);
}

.pos-quick-grid button strong {
    font-size: 0.79rem;
}

.pos-terminal .pos-product-shelf {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    gap: 8px;
    align-items: stretch;
    min-width: 0;
}

.pos-terminal .pos-product-shelf.is-unpaged {
    grid-template-columns: minmax(0, 1fr);
}

.pos-terminal .pos-product-page {
    width: 28px;
    min-width: 28px;
    height: 336px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd6e5;
    border-radius: 8px;
    background: #fff;
    color: var(--brand);
    cursor: pointer;
}

.pos-terminal .pos-product-page[hidden] {
    display: none;
}

.pos-terminal .pos-product-page:disabled {
    opacity: 0.35;
    cursor: default;
}

.pos-terminal .pos-product-page:not(:disabled):hover {
    border-color: #bda9cf;
    background: #f8f4fb;
}

.pos-terminal .pos-products-section .pos-product-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(2, 164px);
    grid-auto-rows: 164px;
    grid-auto-flow: row;
    height: 336px;
    min-height: 336px;
    max-height: 336px;
    align-content: start;
    overflow: hidden;
}

.pos-terminal .pos-products-section {
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
}

.pos-terminal .pos-product-tile {
    height: 164px;
    min-height: 164px;
    max-height: 164px;
    display: grid;
    grid-template-rows: 86px minmax(30px, 1fr) 20px;
    gap: 4px;
    padding: 7px;
    overflow: hidden;
}

.pos-terminal .pos-product-tile .pos-product-media {
    width: 100%;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 7px;
    background: #f7f5f2;
    color: var(--muted);
}

.pos-terminal .pos-product-tile .pos-product-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.pos-terminal .pos-product-tile > strong {
    min-width: 0;
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.15;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.pos-terminal .pos-product-tile .pos-product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
    color: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.pos-terminal .pos-product-tile .pos-product-footer b {
    font-size: 0.82rem;
}

.pos-terminal .pos-product-tile .pos-product-footer em {
    min-width: 0;
    overflow: hidden;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-terminal .pos-products-section .pos-empty-rail {
    grid-column: 1 / -1;
    align-self: start;
    justify-self: stretch;
    min-width: 0;
    min-height: 96px;
}

.pos-terminal .pos-register-cart {
    position: static;
    top: auto;
    height: 100%;
    min-height: 0;
    align-content: start;
    gap: 13px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 15px;
}

.pos-cart-title {
    gap: 10px;
    min-width: 0;
}

.pos-cart-title > span {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eee5f6;
    color: var(--brand);
}

.pos-cart-title small {
    display: block;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.pos-cart-title h2 {
    max-width: 250px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-customer-block {
    display: grid;
    gap: 6px;
}

.pos-customer-block label,
.pos-tender-section > label {
    font-size: 0.78rem;
    font-weight: 900;
}

.pos-customer-required {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-left: 3px solid #d89b3d;
    padding: 10px 11px;
    color: #72511e;
    background: #fff9e9;
    font-size: 0.77rem;
    font-weight: 800;
}

.pos-customer-required[hidden],
.pos-selected-customer[hidden] {
    display: none;
}

.pos-customer-required strong,
.pos-customer-required span,
.pos-selected-customer span,
.pos-selected-customer strong,
.pos-selected-customer small {
    display: block;
}

.pos-customer-required span {
    margin-top: 2px;
    font-weight: 700;
}

.pos-selected-customer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #d9d1e1;
    border-radius: 8px;
    padding: 10px 11px;
    background: #faf9fb;
}

.pos-selected-customer span {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.pos-selected-customer strong {
    margin-top: 2px;
    color: #2f2938;
    font-size: 0.9rem;
}

.pos-selected-customer small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
}

.pos-terminal .pos-cart-lines {
    max-height: 280px;
    overflow-y: auto;
}

.pos-terminal .pos-cart-line {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.pos-terminal .pos-payment-methods {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 7px;
}

.pos-terminal .pos-payment-methods .payment-method-card {
    position: relative;
    width: 100%;
    height: 56px;
    min-height: 56px;
    display: grid;
    grid-template-columns: 22px minmax(0, auto);
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 10px;
    background: #fff;
    color: #332b3b;
    font-size: 0.75rem;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.pos-terminal .pos-payment-methods button.payment-method-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font: inherit;
}

.pos-terminal .pos-payment-methods .payment-method-card[hidden] {
    display: none;
}

.pos-terminal .pos-payment-methods .payment-method-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.pos-terminal .pos-payment-methods .payment-method-card span {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
}

.pos-terminal .pos-payment-methods .payment-method-card span .ui-icon {
    width: 20px;
    height: 20px;
}

.pos-terminal .pos-payment-methods .payment-method-card:has(input:checked),
.pos-terminal .pos-payment-methods .payment-method-card.is-active {
    border-color: #c5adef;
    background: var(--brand-soft);
    color: var(--brand);
    box-shadow: inset 0 0 0 1px rgba(75, 0, 130, 0.1);
}

.pos-terminal .pos-payment-methods .payment-method-card:focus-within {
    outline: 2px solid rgba(75, 0, 130, 0.3);
    outline-offset: 2px;
}

.pos-tender-section,
.pos-value-tenders {
    display: grid;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.pos-terminal .pos-sale-summary {
    gap: 6px;
}

/* OmOffice receipt column */
.pos-terminal .pos-register-cart {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px 12px 14px;
}

.pos-terminal .pos-cart-header {
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
}

.pos-terminal .pos-cart-title {
    flex: 1 1 auto;
    gap: 8px;
}

.pos-terminal .pos-cart-title h2 {
    max-width: 100%;
    margin: 0;
    color: #2f2938;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.1;
}

.pos-cart-change {
    min-height: 28px;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 999px;
    padding: 4px 8px;
    background: #f2e8fa;
    color: var(--brand);
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 900;
}

.pos-cart-change .ui-icon {
    width: 14px;
    height: 14px;
}

.pos-cart-change:hover,
.pos-cart-change:focus-visible {
    background: #eadcf7;
    outline: none;
}

.pos-cart-change[hidden],
.pos-void-transaction[hidden],
.pos-customer-actions[hidden] {
    display: none;
}

.pos-void-transaction {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(110, 44, 172, 0.12);
    border-radius: 50%;
    padding: 0;
    background: #f4ecfb;
    color: #202232;
    cursor: pointer;
    transition: width 0.18s ease, max-width 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.pos-void-transaction span {
    display: inline-flex;
}

.pos-void-transaction strong {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    font-size: 0.72rem;
    white-space: nowrap;
    transition: max-width 0.18s ease, opacity 0.18s ease;
}

.pos-void-transaction:hover,
.pos-void-transaction:focus-visible {
    width: 78px;
    min-width: 78px;
    max-width: 78px;
    gap: 6px;
    border-color: rgba(185, 28, 28, 0.2);
    border-radius: 999px;
    background: #fff1f2;
    color: #b91c1c;
    outline: none;
}

.pos-void-transaction:hover strong,
.pos-void-transaction:focus-visible strong {
    max-width: 34px;
    opacity: 1;
}

.pos-terminal .pos-customer-block {
    flex: 0 0 auto;
    gap: 8px;
    margin-bottom: 7px;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--line);
}

.pos-terminal .pos-register-cart.has-customer .pos-customer-block {
    display: none;
}

.pos-terminal .pos-customer-required {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    margin: 0;
    border: 1px solid #f0c36d;
    border-radius: 8px;
    padding: 9px 10px;
    background: #fff8e8;
    box-shadow: inset 3px 0 0 #c07b00;
    color: #6f4700;
}

.pos-terminal .pos-customer-required-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #ffe8ae;
    color: #7a4d08;
}

.pos-terminal .pos-customer-required-icon .ui-icon {
    width: 15px;
    height: 15px;
}

.pos-terminal .pos-customer-required strong {
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.15;
}

.pos-terminal .pos-customer-required span:not(.pos-customer-required-icon) {
    margin-top: 2px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.15;
}

.pos-customer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pos-customer-actions .btn {
    min-height: 34px;
    padding: 5px 8px;
    font-size: 0.72rem;
}

.pos-terminal .pos-cart-lines {
    flex: 1 1 auto;
    min-height: 150px;
    max-height: none;
    gap: 0;
    margin: 4px 0 7px;
    padding: 3px 0;
}

.pos-terminal.has-customer .pos-cart-lines,
.pos-terminal .pos-register-cart.has-customer .pos-cart-lines {
    min-height: 260px;
}

.pos-terminal .pos-empty-cart {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(110, 44, 172, 0.25);
    border-radius: 10px;
    padding: 14px;
    background: #fbf9fd;
    color: #8b8493;
    font-size: 0.8rem;
    font-style: italic;
}

.pos-terminal .pos-cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 7px;
    background: #fff;
}

.pos-terminal .pos-cart-line + .pos-cart-line {
    margin-top: 5px;
}

.pos-terminal .pos-cart-line-details {
    min-width: 0;
}

.pos-terminal .pos-cart-line strong,
.pos-terminal .pos-cart-line > b {
    color: #2f2938;
    font-size: 0.72rem;
    font-weight: 850;
}

.pos-terminal .pos-cart-line span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.62rem;
}

.pos-terminal .pos-cart-qty {
    grid-template-columns: 22px 30px 22px;
    border-radius: 6px;
}

.pos-terminal .pos-cart-qty button,
.pos-terminal .pos-cart-qty input {
    min-height: 22px;
    height: 22px;
    padding: 0;
    font-size: 0.7rem;
}

.pos-cart-remove {
    width: 22px;
    height: 22px;
    border: 0;
    padding: 0;
    background: transparent;
    color: #b4232a;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
}

.pos-cart-remove:hover,
.pos-cart-remove:focus-visible {
    color: #8f1720;
    outline: none;
}

.pos-terminal .pos-sale-summary {
    flex: 0 0 auto;
    gap: 0;
    margin-top: 4px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
}

.pos-terminal .pos-sale-summary div {
    margin: 2px 0;
    color: var(--muted);
    font-size: 0.74rem;
}

.pos-terminal .pos-sale-summary .total {
    margin-top: 5px;
    padding-top: 5px;
    color: #2f2938;
    font-size: 0.98rem;
}

.pos-terminal .pos-sale-summary .total strong {
    color: #2f2938;
}

.pos-terminal .pos-tender-section {
    flex: 0 0 auto;
    gap: 6px;
    margin-top: 7px;
    border-top: 0;
    padding-top: 5px;
}

.pos-payment-label {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 900;
}

.pos-terminal .pos-payment-methods {
    gap: 8px;
    margin-top: 0;
}

.pos-terminal .pos-payment-methods .payment-method-card {
    height: 52px;
    min-height: 52px;
    border-radius: 10px;
}

.pos-compact-payment {
    margin-top: 4px;
    border: 0;
    border-radius: 0;
    padding: 5px 0;
    background: transparent;
}

.pos-compact-payment .form-grid {
    gap: 5px;
}

.pos-compact-payment label {
    font-size: 0.64rem;
}

.pos-compact-payment input {
    min-height: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.74rem;
}

.pos-terminal .pos-value-tenders {
    flex: 0 0 auto;
    border-top: 0;
    padding-top: 4px;
}

.pos-terminal .pos-complete-sale {
    flex: 0 0 auto;
    min-height: 40px;
    margin-top: auto;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 0.82rem;
}

.pos-modal[hidden] {
    display: none;
}

.pos-modal {
    position: fixed;
    z-index: 500;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(29, 24, 34, 0.48);
}

.pos-modal-card {
    position: relative;
    width: min(440px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    display: grid;
    gap: 14px;
    border: 1px solid #d9d1e1;
    border-radius: 8px;
    padding: 22px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(24, 15, 30, 0.24);
}

.pos-modal-card.pos-modal-wide {
    width: min(680px, 100%);
}

.pos-gift-modal-card {
    width: min(680px, 100%);
    gap: 0;
    padding: 0;
}

.pos-gift-modal-header {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    border-bottom: 1px solid #eadff2;
    padding: 12px 16px;
    background: linear-gradient(180deg, #fbf7ff 0%, #f1e7fb 100%);
}

.pos-gift-modal-header .pos-modal-close {
    position: static;
    flex: 0 0 32px;
    border-radius: 50%;
    background: #f2e8fa;
    color: var(--brand);
}

.pos-gift-modal-header .pos-modal-close:hover,
.pos-gift-modal-header .pos-modal-close:focus-visible {
    background: #e5d4f2;
    outline: none;
}

.pos-gift-modal-body {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.pos-gift-amount-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.pos-gift-amount-options button {
    min-height: 42px;
    border: 1px solid #d8e0eb;
    border-radius: 8px;
    background: #fff;
    color: #2f3747;
    cursor: pointer;
    font: inherit;
    font-weight: 850;
}

.pos-gift-amount-options button:hover,
.pos-gift-amount-options button:focus-visible,
.pos-gift-amount-options button.is-active {
    border-color: #c5adef;
    background: var(--brand-soft);
    color: var(--brand);
    outline: none;
}

.pos-gift-recipient-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
}

.pos-gift-recipient-add {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8e0eb;
    border-radius: 8px;
    background: #f7fafc;
    color: var(--brand);
    cursor: pointer;
}

.pos-gift-recipient-add:hover,
.pos-gift-recipient-add:focus-visible {
    border-color: #c5adef;
    background: var(--brand-soft);
    outline: none;
}

.pos-gift-recipient-results {
    max-height: 220px;
    display: grid;
    gap: 8px;
    overflow-y: auto;
}

.pos-gift-recipient-results > button,
.pos-gift-recipient-empty {
    width: 100%;
    display: grid;
    gap: 3px;
    border: 1px solid #d8e0eb;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: #2f3747;
    text-align: left;
}

.pos-gift-recipient-results > button {
    cursor: pointer;
    font: inherit;
}

.pos-gift-recipient-results > button:hover,
.pos-gift-recipient-results > button:focus-visible {
    border-color: #8dbfa0;
    background: #eff8f2;
    outline: none;
}

.pos-gift-recipient-results > button.is-best-match {
    border-color: #c5adef;
    background: #faf7ff;
}

.pos-gift-recipient-results strong {
    font-weight: 900;
}

.pos-gift-recipient-results span,
.pos-gift-recipient-empty {
    color: #627080;
    font-size: 0.75rem;
}

.pos-gift-recipient-empty {
    border-style: dashed;
    font-weight: 800;
}

.pos-gift-new-recipient {
    border: 1px solid #d8e0eb;
    border-radius: 8px;
    padding: 12px;
    background: #fbfdff;
}

.pos-gift-error {
    margin: -4px 0 0;
    border-left: 3px solid var(--danger);
    padding: 7px 10px;
    background: #fff5f7;
    color: var(--danger);
    font-size: 0.78rem;
    font-weight: 850;
}

.pos-gift-done {
    width: 100%;
}

.pos-customer-modal-card {
    width: min(540px, 100%);
}

.pos-package-sale-modal-card {
    width: min(560px, 100%);
}

.pos-package-client-results {
    max-height: 230px;
}

.pos-customer-search-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.pos-customer-search-heading small {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
}

.pos-customer-results {
    max-height: 360px;
    display: grid;
    gap: 7px;
    overflow-y: auto;
}

.pos-customer-results > button {
    width: 100%;
    min-height: 58px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border: 1px solid #ddd6e5;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    color: #2f2938;
    text-align: left;
    cursor: pointer;
}

.pos-customer-results > button:hover,
.pos-customer-results > button:focus-visible {
    border-color: #8dbfa0;
    background: #eff8f2;
    outline: none;
}

.pos-customer-results > button.is-best-match {
    border-color: #c5adef;
    background: #faf7ff;
}

.pos-customer-results > button > span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eee5f6;
    color: var(--brand);
}

.pos-customer-results strong,
.pos-customer-results small {
    display: block;
}

.pos-customer-results small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.74rem;
}

.pos-customer-no-results {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #d8cfe3;
    border-radius: 8px;
    padding: 14px;
    background: #fbf9fd;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.pos-modal-card h2 {
    margin: 0;
    font-size: 1.1rem;
}

.pos-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.4rem;
    cursor: pointer;
}

.pos-amount-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.pos-amount-options button {
    min-height: 42px;
    border: 1px solid #d9d1e1;
    border-radius: 6px;
    background: #fff;
    color: var(--brand);
    font-weight: 900;
    cursor: pointer;
}

.pos-package-options,
.pos-package-template-list {
    display: grid;
    gap: 8px;
}

.pos-package-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid #d9d1e1;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
}

.pos-package-option:has(input:checked) {
    border-color: #8dbfa0;
    background: #eff8f2;
}

.pos-package-option span,
.pos-package-option small {
    display: block;
}

.pos-package-option small {
    margin-top: 3px;
    color: var(--muted);
}

.pos-package-settings {
    margin-top: 16px;
}

.pos-package-editor {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 100px 120px 140px;
    align-items: end;
    gap: 10px;
    margin-top: 14px;
}

.pos-package-description {
    grid-column: span 2;
}

.pos-package-template-list {
    margin-top: 16px;
}

.pos-package-template-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.pos-package-template-row summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    cursor: pointer;
}

.pos-package-template-row summary strong,
.pos-package-template-row summary small {
    display: block;
}

.pos-package-template-row summary small,
.pos-package-template-row summary em {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    font-style: normal;
}

.pos-package-template-row .pos-package-editor {
    border-top: 1px solid var(--line);
    margin: 0;
    padding: 12px;
}

@media (max-width: 1120px) {
    .pos-terminal .pos-register-grid {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 380px);
    }

    .pos-quick-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pos-terminal .pos-products-section .pos-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .pos-package-editor {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .content:has(.pos-terminal) {
        height: auto;
        min-height: calc(100vh - var(--topbar-height));
        overflow: visible;
        padding: 12px;
    }

    .content-frame:has(.pos-terminal),
    .content-surface:has(.pos-terminal),
    .pos-terminal.pos-register-form,
    .pos-terminal .pos-register-grid,
    .pos-terminal .pos-register-catalog,
    .pos-terminal .pos-register-cart {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .pos-terminal .pos-register-catalog,
    .pos-terminal .pos-products-section {
        grid-template-rows: auto;
    }

    .pos-terminal .pos-products-section .pos-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: repeat(2, 164px);
        grid-auto-rows: 164px;
        height: 336px;
        min-height: 336px;
        max-height: 336px;
    }

    .content-frame:has(.pos-terminal) {
        margin-bottom: 20px;
    }

    .pos-terminal .pos-register-grid {
        grid-template-columns: 1fr;
    }

    .pos-terminal .pos-register-cart {
        position: static;
    }

    .pos-package-editor {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .content-surface:has(.pos-terminal) {
        padding: 8px;
    }

    .pos-terminal .pos-products-section .pos-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pos-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .pos-date-controls {
        flex-wrap: wrap;
    }

    .pos-quick-grid,
    .pos-terminal .pos-payment-methods,
    .pos-package-editor {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pos-terminal .pos-product-tools,
    .pos-modal-card .form-grid {
        grid-template-columns: 1fr;
    }

    .pos-gift-amount-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pos-package-description {
        grid-column: auto;
    }
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 20;
    width: var(--sidebar-collapsed);
    min-height: 100vh;
    background: #f7f5fa;
    color: var(--text);
    overflow-x: hidden;
    overflow-y: auto;
    white-space: nowrap;
    transition: width 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.sidebar::after {
    content: "";
    position: absolute;
    top: 47px;
    right: 0;
    bottom: 0;
    width: 3px;
    background: var(--line-strong);
    pointer-events: none;
}

.sidebar:hover,
.sidebar:focus-within {
    width: var(--sidebar-expanded);
}

.sidebar-logo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
    padding: 10px 0;
    margin-bottom: 10px;
    color: var(--brand);
}

.logo-mark {
    width: 42px;
    height: 42px;
    border: 1px solid #cdb8ef;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.92rem;
    font-weight: 900;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(75, 0, 130, 0.08), 0 4px 12px rgba(44, 36, 58, 0.08);
    transition: opacity 0.25s ease;
}

.logo-expanded {
    position: absolute;
    left: 20px;
    right: 16px;
    top: 50%;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(-50%);
    opacity: 0;
    visibility: hidden;
    color: #2f2140;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-expanded strong,
.brand-copy strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1;
}

.logo-expanded .brand-wordmark {
    font-size: 1.5rem;
}

.brand-copy .brand-wordmark {
    font-size: 1.32rem;
}

.brand-wordmark {
    display: inline-flex;
    align-items: baseline;
    color: #231629;
    font-weight: 850;
    letter-spacing: 0;
}

.brand-wordmark-accent {
    color: #5d2f88;
    font-style: normal;
    font-weight: 760;
}

.logo-expanded small,
.brand-copy > span {
    display: block;
    max-width: 190px;
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.74rem;
    text-overflow: ellipsis;
}

.sidebar:hover .logo-collapsed,
.sidebar:focus-within .logo-collapsed {
    opacity: 0;
}

.sidebar:hover .logo-expanded,
.sidebar:focus-within .logo-expanded {
    opacity: 1;
    visibility: visible;
}

.nav {
    display: grid;
    gap: 0;
    padding-bottom: 18px;
}

.sidebar-button {
    min-height: 48px;
    display: flex;
    align-items: center;
    margin: 0 8px 6px;
    padding: 0 12px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-weight: 800;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.sidebar-button:hover,
.sidebar-button:focus-visible {
    border-color: var(--line-strong);
    background: var(--brand-hover);
    box-shadow: 0 4px 12px rgba(44, 36, 58, 0.06);
    outline: none;
}

.sidebar-button.is-active {
    border-color: #cdb8ef;
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 1px rgba(75, 0, 130, 0.08), 0 6px 14px rgba(44, 36, 58, 0.07);
}

.ui-icon {
    width: 20px;
    height: 20px;
    display: block;
    flex: 0 0 20px;
}

.nav-icon {
    min-width: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--brand);
}

.button-text {
    display: inline-block;
    color: var(--brand);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease 0.1s, visibility 0.2s ease 0.1s;
}

.sidebar:hover .button-text,
.sidebar:focus-within .button-text {
    opacity: 1;
    visibility: visible;
}

.main {
    min-width: 0;
    margin-left: var(--sidebar-collapsed);
    padding-top: var(--topbar-height);
    transition: margin-left 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.sidebar:hover ~ .main,
.sidebar:focus-within ~ .main {
    margin-left: var(--sidebar-expanded);
}

.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-collapsed);
    right: 0;
    z-index: 15;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #f7f5fa;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(to right, var(--line-strong), #eee8f5, var(--line-strong)) 1 stretch;
    transition: left 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.sidebar:hover ~ .main .topbar,
.sidebar:focus-within ~ .main .topbar {
    left: var(--sidebar-expanded);
}

.top-nav-list {
    flex: 0 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    padding: 5px 8px;
}

.top-nav-title {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #2f2140;
    font-size: 0.9rem;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(44, 24, 64, 0.05);
}

.top-nav-item {
    height: 100%;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text);
    font-weight: 800;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, padding 0.3s ease;
}

.top-nav-icon {
    min-width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
}

.top-nav-icon .ui-icon {
    width: 19px;
    height: 19px;
}

.top-nav-text {
    max-width: 0;
    margin-left: 0;
    opacity: 0;
    visibility: hidden;
    color: var(--text);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: max-width 0.3s ease, opacity 0.3s ease 0.1s, visibility 0s linear 0.3s, margin-left 0.3s ease, color 0.2s ease;
}

.top-nav-item:hover,
.top-nav-item:focus-visible {
    border-color: var(--line-strong);
    background: var(--brand-hover);
    box-shadow: 0 4px 12px rgba(44, 36, 58, 0.06);
    outline: none;
}

.top-nav-item:hover .top-nav-text,
.top-nav-item:focus-visible .top-nav-text {
    max-width: 200px;
    margin-left: 8px;
    opacity: 1;
    visibility: visible;
    transition-delay: 0s, 0.1s, 0s, 0s, 0s;
}

.top-nav-item.is-active {
    border-color: #cdb8ef;
    background: var(--brand-soft);
    padding: 0 18px;
    box-shadow: inset 0 0 0 1px rgba(75, 0, 130, 0.08), 0 5px 14px rgba(44, 36, 58, 0.07);
}

.top-nav-item.is-active .top-nav-text {
    max-width: 200px;
    margin-left: 8px;
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.profile-menu {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
    margin-right: 20px;
    cursor: pointer;
    z-index: 20;
}

.profile-trigger {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #cdb8ef;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    box-shadow: inset 0 0 0 1px rgba(75, 0, 130, 0.08), 0 4px 12px rgba(44, 36, 58, 0.08);
}

.profile-trigger-initials {
    font-size: 0.78rem;
    font-weight: 900;
}

.profile-dropdown {
    position: absolute;
    top: 44px;
    right: 0;
    min-width: 260px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-strong);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.profile-menu:hover .profile-dropdown,
.profile-menu:focus-within .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-header {
    padding: 14px 16px;
    border-bottom: 1px solid #eee8f5;
    background: #fbfafc;
}

.profile-header .name {
    color: var(--text);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.15;
}

.profile-header .email {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.profile-links {
    display: grid;
    gap: 4px;
    padding: 8px;
}

.profile-links a,
.profile-links button {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 10px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    text-align: left;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.profile-links a:hover,
.profile-links button:hover,
.profile-links a:focus-visible,
.profile-links button:focus-visible {
    border-color: var(--line-strong);
    background: var(--brand-hover);
    color: var(--brand);
    outline: none;
}

.profile-link-icon {
    width: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
}

.profile-link-icon .ui-icon {
    width: 18px;
    height: 18px;
}

.content {
    width: 100%;
    padding: 16px 18px 34px;
}

.content:has(.calendar-workspace-clean) {
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
    padding: 0;
}

.content:has(.soap-documentation-workspace) {
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
    padding: 12px 18px;
}

.content-frame {
    width: 100%;
    max-width: var(--frame-width);
    margin: 0 auto 28px;
    padding: 5px;
    border: 1px solid var(--brand-frame-line);
    border-radius: 10px;
    background: var(--brand-frame);
}

.content-frame:has(.calendar-workspace-clean) {
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.content-frame:has(.soap-documentation-workspace) {
    height: 100%;
    max-width: none;
    margin: 0;
}

.content-surface {
    min-height: calc(100vh - 88px);
    padding: 18px;
    border-radius: 6px;
    background: #fff;
}

.content-surface:has(.calendar-workspace-clean) {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    border-radius: 0;
}

.content-surface:has(.soap-documentation-workspace) {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 14px;
}

.content-surface:has(.soap-documentation-workspace) .page-header {
    margin-bottom: 0;
}

.page-header {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(44, 24, 64, 0.05);
}

.page-header h2,
.section-title {
    margin: 0;
    color: #2f2140;
    font-size: 1.35rem;
    line-height: 1.15;
}

.page-header p,
.muted {
    color: var(--muted);
}

.page-header p {
    margin: 4px 0 0;
}

.page-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.grid {
    display: grid;
    gap: 14px;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 16px;
}

.panel.plain {
    box-shadow: none;
}

.panel h3 {
    margin: 0 0 12px;
    color: #2f2140;
    font-size: 1rem;
}

.stat {
    display: grid;
    gap: 6px;
}

.stat span {
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stat strong {
    color: var(--text);
    font-size: 1.75rem;
    line-height: 1;
}

.progress {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #eee8f5;
}

.progress > span {
    display: block;
    height: 100%;
    background: var(--brand);
}

.table-wrap {
    overflow-x: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.badge {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3eafd;
    color: var(--brand);
    font-size: 0.74rem;
    font-weight: 900;
}

.badge.success {
    background: #e3f4eb;
    color: var(--success);
}

.badge.warning {
    background: #fff2d8;
    color: var(--warning);
}

.badge.danger {
    background: #fff5f7;
    color: var(--danger);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

form {
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
    display: grid;
    gap: 6px;
}

.field.full {
    grid-column: 1 / -1;
}

.field-hint {
    color: #6a7883;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.35;
}

label {
    color: #3a3142;
    font-size: 0.78rem;
    font-weight: 900;
}

input,
select,
textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid #dcd4e6;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #b58bd4;
    outline: 2px solid rgba(75, 0, 130, 0.12);
}

textarea {
    min-height: 86px;
    resize: vertical;
}

.checkbox-line {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-line input {
    width: 16px;
    min-height: 16px;
}

.btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #dcd4e6;
    border-radius: 8px;
    padding: 0 12px;
    background: linear-gradient(180deg, #ffffff 0%, #faf7fd 100%);
    color: #33233f;
    box-shadow: 0 2px 8px rgba(44, 24, 64, 0.06);
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 850;
    line-height: 1;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
    border-color: #b58bd4;
    background: #f8f1fc;
    color: var(--brand);
    outline: none;
}

.btn.primary {
    border-color: var(--brand-strong);
    background: var(--brand-strong);
    color: #fff;
    box-shadow: 0 6px 14px rgba(75, 0, 130, 0.16);
}

.btn.primary:hover,
.btn.primary:focus-visible {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.btn.danger {
    border-color: #f3c5cf;
    background: #fff5f7;
    color: var(--danger);
}

.btn.danger:hover,
.btn.danger:focus-visible {
    border-color: #eaa4af;
    background: #ffe9ee;
    color: #981b1b;
}

.btn.small {
    min-height: 30px;
    padding: 0 9px;
    font-size: 0.76rem;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    border-color: #e7dfec;
    background: #f3eef7;
    color: #978aa0;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn.primary:disabled,
.btn.primary[aria-disabled="true"] {
    border-color: #d8c4e8;
    background: #d8c4e8;
    color: #ffffff;
}

.flash-stack {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.flash {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(44, 24, 64, 0.04);
}

.flash.success {
    border-color: #bfe5cf;
    background: #ecf9f1;
}

.flash.error {
    border-color: #f0c4c4;
    background: #fff0f0;
}

.flash.info {
    border-color: #d8cfe3;
    background: #fbf7ff;
}

.om-toast-stack {
    position: fixed;
    top: 76px;
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.om-toast {
    --om-toast-accent: #6e2cac;
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    overflow: hidden;
    padding: 14px 14px 12px;
    border: 1px solid rgba(110, 44, 172, 0.24);
    border-left: 5px solid var(--om-toast-accent);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 244, 255, 0.98));
    color: #2f1948;
    box-shadow: 0 18px 40px rgba(47, 25, 72, 0.18);
    opacity: 0;
    pointer-events: auto;
    transform: translateX(18px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.om-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.om-toast.success,
.om-toast.good {
    --om-toast-accent: #6e2cac;
}

.om-toast.error,
.om-toast.danger {
    --om-toast-accent: #b42318;
    border-color: rgba(180, 35, 24, 0.22);
}

.om-toast.warning,
.om-toast.warn {
    --om-toast-accent: #b54708;
    border-color: rgba(181, 71, 8, 0.22);
}

.om-toast.info {
    --om-toast-accent: #5b21b6;
}

.om-toast-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--om-toast-accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(110, 44, 172, 0.25);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
}

.om-toast-body {
    min-width: 0;
}

.om-toast-title {
    display: block;
    margin-bottom: 2px;
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.2;
}

.om-toast-message {
    margin: 0;
    color: #5f5170;
    font-size: 0.88rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.om-toast-close {
    min-height: 0;
    border: 0;
    padding: 2px;
    background: transparent;
    color: #6b5c78;
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
    line-height: 1;
}

.om-toast-close:hover,
.om-toast-close:focus-visible {
    color: var(--brand);
    outline: none;
}

.om-toast-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--om-toast-accent), rgba(110, 44, 172, 0.22));
    transform-origin: left center;
    animation: om-toast-progress linear forwards;
}

@keyframes om-toast-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

@media (max-width: 700px) {
    .om-toast-stack {
        top: 68px;
        right: 12px;
        left: 12px;
        width: auto;
    }
}

.stack {
    display: grid;
    gap: 12px;
}

.list {
    display: grid;
    gap: 10px;
}

.list-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.financial-command-panel {
    border: 1px solid #dfd1ec;
    border-radius: 8px;
    padding: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #fbf9ff 55%, #f5f1fa 100%);
    box-shadow: 0 12px 28px rgba(55, 30, 80, 0.08);
}

.financial-command-heading,
.financial-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.financial-command-heading span:not(.badge),
.financial-section-heading span {
    display: block;
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.financial-command-heading h3,
.financial-section-heading h3 {
    margin: 2px 0 0;
    color: #2f2140;
    font-size: 1rem;
}

.financial-metric-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.financial-metric-grid > div {
    min-width: 0;
    border: 1px solid #e6dcef;
    border-radius: 8px;
    padding: 13px 14px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(55, 30, 80, 0.05);
}

.financial-metric-grid span,
.financial-metric-grid small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.financial-metric-grid span {
    color: #6d5d78;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.financial-metric-grid strong {
    display: block;
    margin-top: 5px;
    color: #25323a;
    font-size: 1.35rem;
    line-height: 1;
}

.financial-metric-grid small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.financial-tracker-panel table strong,
.financial-ledger-panel .list-row strong {
    display: block;
}

.financial-pos-transactions-panel {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.financial-pos-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.financial-pos-summary > div {
    border: 1px solid #e6dcef;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
}

.financial-pos-summary span,
.financial-pos-summary strong {
    display: block;
}

.financial-pos-summary span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.financial-pos-summary strong {
    margin-top: 4px;
    color: #25323a;
    font-size: 1.2rem;
}

.content-surface:has(.marketing-workspace) {
    padding: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, #f8faf9 0%, #ffffff 34%, #fbfafd 100%);
}

.marketing-workspace {
    display: grid;
    gap: 16px;
    padding: 18px;
    color: #25323a;
}

.marketing-hero {
    min-height: 232px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.72fr);
    gap: 18px;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #d9e8e1;
    border-radius: 8px;
    padding: 22px;
    background:
        linear-gradient(125deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 251, 247, 0.96) 47%, rgba(255, 248, 235, 0.94) 100%),
        linear-gradient(90deg, rgba(49, 108, 99, 0.14), rgba(95, 22, 150, 0.1));
    box-shadow: 0 18px 38px rgba(35, 45, 42, 0.09);
}

.marketing-hero-copy {
    min-width: 0;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 12px;
}

.marketing-eyebrow,
.marketing-section-kicker {
    color: #2f6f63;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.marketing-hero h2 {
    max-width: 760px;
    margin: 0;
    color: #17282e;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.marketing-hero p {
    max-width: 690px;
    margin: 0;
    color: #52626a;
    font-size: 1.02rem;
    font-weight: 720;
}

.marketing-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 4px;
}

.marketing-hero-panel {
    min-width: 0;
    display: grid;
    gap: 12px;
    align-content: center;
}

.marketing-hero-panel > div {
    display: grid;
    gap: 6px;
    border: 1px solid rgba(68, 115, 105, 0.18);
    border-radius: 8px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 26px rgba(32, 49, 45, 0.08);
}

.marketing-hero-panel span,
.marketing-kpi-copy span,
.marketing-mini-row span {
    color: #687985;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.marketing-hero-panel strong {
    color: #18292d;
    font-size: 1.35rem;
    line-height: 1.1;
}

.marketing-hero-panel small,
.marketing-kpi-copy small {
    color: #63727b;
    font-size: 0.82rem;
    font-weight: 780;
    line-height: 1.35;
}

.marketing-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.marketing-kpi,
.marketing-card {
    border: 1px solid #e0e7e4;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(35, 45, 42, 0.07);
}

.marketing-kpi {
    min-height: 140px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 16px;
}

.marketing-kpi-icon,
.marketing-rule-icon,
.marketing-playbook-list span {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e6f3ef;
    color: #1f6d5e;
}

.marketing-kpi:nth-child(2) .marketing-kpi-icon {
    background: #eef1ff;
    color: #3854a3;
}

.marketing-kpi:nth-child(3) .marketing-kpi-icon {
    background: #fff0d6;
    color: #97630f;
}

.marketing-kpi:nth-child(4) .marketing-kpi-icon {
    background: #f4ecff;
    color: #6c259b;
}

.marketing-kpi-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.marketing-kpi-copy strong {
    color: #17282e;
    font-size: 1.9rem;
    line-height: 1;
}

.marketing-progress {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eeec;
}

.marketing-progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2f7d6f, #7a4fb2);
}

.marketing-mini-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
    padding-top: 9px;
    border-top: 1px solid #eef1f0;
}

.marketing-mini-row b {
    min-width: 0;
    overflow: hidden;
    color: #29363d;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketing-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
    gap: 16px;
    align-items: start;
}

.marketing-side-stack,
.marketing-insight-grid,
.marketing-rule-grid,
.marketing-list,
.marketing-playbook-list {
    display: grid;
    gap: 12px;
}

.marketing-card {
    min-width: 0;
    padding: 16px;
}

.marketing-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.marketing-card-header h3 {
    margin: 3px 0 0;
    color: #18292d;
    font-size: 1.04rem;
    line-height: 1.15;
}

.marketing-channel-pill,
.marketing-count-badge,
.marketing-filter-pills span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #dbe8e4;
    border-radius: 999px;
    padding: 4px 9px;
    background: #f5fbf8;
    color: #2a6259;
    font-size: 0.76rem;
    font-weight: 900;
    white-space: nowrap;
}

.marketing-form,
.marketing-form-grid {
    display: grid;
    gap: 12px;
}

.marketing-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marketing-form-grid.single {
    grid-template-columns: 1fr;
}

.marketing-form-grid .full {
    grid-column: 1 / -1;
}

.marketing-form input,
.marketing-form select,
.marketing-form textarea {
    min-height: 42px;
    border-color: #d9e3df;
    background: #fbfdfc;
}

.marketing-form textarea {
    min-height: 116px;
}

.marketing-form.compact textarea {
    min-height: 92px;
}

.marketing-two-fields {
    display: grid;
    grid-template-columns: minmax(120px, 0.48fr) minmax(0, 0.52fr);
    gap: 10px;
}

.marketing-builder-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 2px;
    padding-top: 14px;
    border-top: 1px solid #edf1ef;
}

.marketing-builder-footer > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #63727b;
    font-size: 0.82rem;
    font-weight: 850;
}

.marketing-playbook {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 250, 0.98));
}

.marketing-playbook-list > div {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    padding: 12px;
    border: 1px solid #e4ebe8;
    border-radius: 8px;
    background: #fff;
}

.marketing-playbook-list strong,
.marketing-playbook-list small {
    display: block;
}

.marketing-playbook-list strong,
.marketing-list-row strong,
.marketing-rule-card strong,
.marketing-campaign-name strong {
    color: #24333a;
    font-weight: 950;
}

.marketing-playbook-list small,
.marketing-list-row span,
.marketing-rule-card span,
.marketing-campaign-name span {
    margin-top: 2px;
    color: #65747c;
    font-size: 0.8rem;
    font-weight: 760;
    line-height: 1.35;
}

.marketing-campaigns {
    padding-bottom: 12px;
}

.marketing-filter-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.marketing-table-shell {
    overflow-x: auto;
    border: 1px solid #edf1ef;
    border-radius: 8px;
}

.marketing-table {
    min-width: 780px;
}

.marketing-table th {
    background: #f7faf9;
    color: #65747c;
}

.marketing-table td {
    padding: 13px 12px;
    border-bottom-color: #edf1ef;
}

.marketing-table tbody tr:hover {
    background: #fbfdfc;
}

.marketing-campaign-name {
    display: grid;
    gap: 2px;
}

.marketing-icon-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #34454d;
    font-size: 0.84rem;
    font-weight: 900;
}

.marketing-icon-label .ui-icon {
    width: 17px;
    height: 17px;
    color: #2f7d6f;
}

.marketing-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid #dcebe6;
    border-radius: 999px;
    padding: 0 10px;
    background: #f7fcfa;
    color: #2f6f63;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.marketing-table td:last-child {
    text-align: right;
}

.marketing-table td .btn {
    white-space: nowrap;
}

.marketing-program-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.marketing-automation-table {
    min-width: 1160px;
}

.marketing-rule-builder {
    display: grid;
    gap: 14px;
}

.marketing-rule-builder-section {
    display: grid;
    gap: 10px;
    border: 1px solid #edf1ef;
    border-radius: 8px;
    padding: 12px;
    background: #fbfdfc;
}

.marketing-rule-builder-section > span {
    color: #2f6f63;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.marketing-rule-builder .field[hidden] {
    display: none;
}

.marketing-insight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.marketing-insight-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marketing-list {
    max-height: 360px;
    overflow: auto;
}

.marketing-list-row,
.marketing-rule-card {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #edf1ef;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
}

.marketing-list-row > div,
.marketing-rule-card > div:not(.marketing-rule-icon) {
    min-width: 0;
    display: grid;
}

.marketing-list-row strong,
.marketing-list-row span,
.marketing-rule-card strong,
.marketing-rule-card span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketing-list-row b {
    color: #2f6f63;
    white-space: nowrap;
}

.marketing-rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marketing-rule-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
}

.marketing-rule-icon {
    background: #eef1ff;
    color: #3854a3;
}

.loyalty-ladder-list {
    display: grid;
    gap: 10px;
}

.loyalty-ladder-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 12px;
    min-height: 74px;
    border: 1px solid #edf1ef;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.loyalty-ladder-row:hover {
    border-color: #d8e7e1;
    background: #fbfdfc;
}

.loyalty-ladder-row.is-reward {
    border-color: #eee6f5;
}

.loyalty-ladder-row.is-reward:hover {
    border-color: #ddcaed;
    background: #fdfaff;
}

.loyalty-ladder-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eef9f4;
    color: #2f6f63;
}

.loyalty-ladder-row.is-reward .loyalty-ladder-icon {
    background: #f7efff;
    color: var(--brand);
}

.loyalty-ladder-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.loyalty-ladder-copy strong {
    overflow: hidden;
    color: #25343b;
    font-size: 0.93rem;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loyalty-ladder-copy span {
    overflow: hidden;
    color: #65747c;
    font-size: 0.8rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loyalty-ladder-metric {
    min-width: 82px;
    display: grid;
    justify-items: end;
    gap: 1px;
}

.loyalty-ladder-metric strong {
    color: #2f6f63;
    font-size: 1.08rem;
    font-weight: 950;
}

.loyalty-ladder-row.is-reward .loyalty-ladder-metric strong {
    color: var(--brand);
}

.loyalty-ladder-metric span {
    color: #65747c;
    font-size: 0.72rem;
    font-weight: 850;
}

.marketing-empty {
    border: 1px dashed #d8e5df;
    border-radius: 8px;
    padding: 14px;
    background: #fbfdfc;
    color: #65747c;
    font-weight: 820;
}

@media (max-width: 1150px) {
    .marketing-hero,
    .marketing-main-grid,
    .marketing-insight-grid,
    .marketing-insight-grid.two {
        grid-template-columns: 1fr;
    }

    .marketing-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 760px) {
    .marketing-workspace {
        padding: 12px;
        overflow-x: hidden;
    }

    .marketing-hero,
    .marketing-titlebar,
    .marketing-kpi,
    .marketing-card {
        width: 100%;
        max-width: calc(100vw - 48px);
        justify-self: center;
    }

    .marketing-hero {
        min-height: 0;
        padding: 16px;
    }

    .marketing-hero h2 {
        max-width: 12ch;
        font-size: 1.88rem;
    }

    .marketing-hero-copy {
        justify-items: stretch;
    }

    .marketing-hero p {
        max-width: 31ch;
        font-size: 0.95rem;
        overflow-wrap: anywhere;
    }

    .marketing-hero-actions,
    .marketing-builder-footer,
    .marketing-card-header {
        align-items: stretch;
        flex-direction: column;
    }

    .loyalty-ladder-row {
        grid-template-columns: 40px minmax(0, 1fr) auto;
    }

    .loyalty-ladder-icon {
        grid-row: 1 / 3;
    }

    .loyalty-ladder-copy {
        grid-column: 2;
    }

    .loyalty-ladder-metric {
        grid-column: 2;
        grid-row: 2;
        justify-items: start;
    }

    .loyalty-ladder-row .badge {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }

    .loyalty-ladder-row .btn {
        grid-column: 3;
        grid-row: 2;
        justify-self: end;
    }

    .marketing-hero-actions {
        width: min(100%, 320px);
    }

    .marketing-hero-actions .btn,
    .marketing-builder-footer .btn,
    .marketing-form .btn {
        width: 100%;
    }

    .marketing-kpis,
    .marketing-form-grid,
    .marketing-two-fields,
    .marketing-rule-grid,
    .marketing-program-grid {
        grid-template-columns: 1fr;
    }

    .marketing-kpi {
        min-height: 0;
    }

    .marketing-filter-pills {
        justify-content: flex-start;
    }

    .marketing-list {
        max-height: none;
    }
}

.marketing-titlebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 18px;
    border: 1px solid #e0e7e4;
    border-radius: 8px;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.98), rgba(247, 252, 249, 0.98)),
        linear-gradient(90deg, rgba(47, 111, 99, 0.1), rgba(95, 22, 150, 0.08));
    box-shadow: 0 10px 24px rgba(35, 45, 42, 0.06);
}

.marketing-titlebar > * {
    min-width: 0;
}

.marketing-titlebar h2 {
    max-width: 760px;
    margin: 3px 0 0;
    color: #17282e;
    font-size: 1.62rem;
    line-height: 1.08;
}

.marketing-titlebar p {
    max-width: 760px;
    margin: 6px 0 0;
    color: #63727b;
    font-size: 0.92rem;
    font-weight: 780;
}

.marketing-workspace [id] {
    scroll-margin-top: calc(var(--topbar-height) + 16px);
}

.marketing-subnav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.marketing-subnav a {
    min-width: 0;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe8e4;
    border-radius: 8px;
    padding: 0 10px;
    background: #fff;
    color: #2a6259;
    font-size: 0.8rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketing-subnav a:hover,
.marketing-subnav a:focus-visible {
    border-color: #b9d8cf;
    background: #f3fbf7;
    outline: none;
}

.marketing-recommendations {
    background: linear-gradient(180deg, #ffffff, #fbfdfc);
}

.marketing-recommendation-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.marketing-recommendation {
    min-width: 0;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid #edf1ef;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.marketing-recommendation > span {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e6f3ef;
    color: #1f6d5e;
}

.marketing-recommendation:nth-child(2) > span {
    background: #eef1ff;
    color: #3854a3;
}

.marketing-recommendation:nth-child(3) > span {
    background: #fff0d6;
    color: #97630f;
}

.marketing-recommendation strong,
.marketing-recommendation small {
    display: block;
    min-width: 0;
}

.marketing-recommendation strong {
    color: #24333a;
    font-weight: 950;
}

.marketing-recommendation small {
    margin-top: 3px;
    color: #65747c;
    font-size: 0.8rem;
    font-weight: 760;
    line-height: 1.35;
}

.marketing-edit-list {
    display: grid;
    gap: 12px;
}

.marketing-edit-card {
    min-width: 0;
    display: grid;
    gap: 14px;
    border: 1px solid #edf1ef;
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}

.marketing-edit-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.marketing-edit-card-heading strong,
.marketing-edit-card-heading span {
    display: block;
}

.marketing-edit-card-heading strong {
    color: #24333a;
    font-size: 0.98rem;
    font-weight: 950;
}

.marketing-edit-card-heading span:not(.badge) {
    margin-top: 3px;
    color: #65747c;
    font-size: 0.82rem;
    font-weight: 760;
}

.marketing-edit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.marketing-edit-grid label {
    min-width: 0;
    display: grid;
    gap: 6px;
    color: #433650;
    font-size: 0.78rem;
    font-weight: 900;
}

.marketing-edit-grid input,
.marketing-edit-grid select,
.marketing-edit-grid textarea {
    width: 100%;
    min-width: 0;
}

.marketing-edit-grid textarea {
    min-height: 96px;
}

.marketing-edit-grid .full {
    grid-column: 1 / -1;
}

.marketing-edit-toggle {
    align-self: end;
    min-height: 42px;
    display: inline-flex !important;
    grid-auto-flow: column;
    justify-content: start;
    align-items: center;
    gap: 8px !important;
    border: 1px solid #e1e5e8;
    border-radius: 8px;
    padding: 9px 11px;
    background: #f8f9fa;
}

.marketing-edit-toggle input {
    width: 16px;
    height: 16px;
}

.marketing-edit-actions {
    display: flex;
    justify-content: flex-end;
}

.marketing-fab-ladder {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 60;
    display: grid;
    justify-items: end;
    gap: 14px;
}

.floating-add-button.marketing-floating-add {
    position: static;
    right: auto;
    bottom: auto;
    z-index: auto;
}

.marketing-fab-actions {
    display: grid;
    gap: 9px;
    justify-items: end;
    opacity: 0;
    pointer-events: none;
    padding-bottom: 12px;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.marketing-fab-ladder:hover .marketing-fab-actions,
.marketing-fab-ladder:focus-within .marketing-fab-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.marketing-fab-actions button {
    width: max-content;
    min-width: 0;
    max-width: none;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    border: 1px solid #e4dae9;
    border-radius: 999px;
    padding: 0 13px 0 12px;
    background: #fff;
    color: #3a2b48;
    box-shadow: 0 12px 28px rgba(44, 24, 64, 0.15);
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 900;
    white-space: nowrap;
}

.marketing-fab-actions button span {
    min-width: max-content;
    overflow: visible;
    text-overflow: clip;
}

.marketing-fab-actions button:hover,
.marketing-fab-actions button:focus-visible {
    border-color: #cdb8ef;
    background: #fbf7ff;
    color: var(--brand);
    outline: none;
}

.marketing-fab-actions .ui-icon {
    order: -1;
    width: 16px;
    height: 16px;
    color: var(--brand);
}

.marketing-modal {
    width: min(820px, 100%);
}

.marketing-automation-modal {
    width: min(920px, 100%);
}

.marketing-automation-form {
    width: min(900px, 100%);
}

.marketing-program-modal {
    width: min(760px, 100%);
}

.marketing-program-modal-body {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
}

.marketing-program-rail {
    min-height: 168px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 9px;
    border: 1px solid #dbeee8;
    border-radius: 8px;
    padding: 14px;
    background: linear-gradient(180deg, #f4fcf8, #ffffff);
    color: #2f6f63;
}

.marketing-program-rail.is-reward {
    border-color: #eadbf7;
    background: linear-gradient(180deg, #fbf7ff, #ffffff);
    color: var(--brand);
}

.marketing-program-rail span {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(47, 111, 99, 0.1);
}

.marketing-program-rail.is-reward span {
    background: rgba(95, 22, 150, 0.1);
}

.marketing-program-rail strong {
    color: #25343b;
    font-size: 0.8rem;
    font-weight: 950;
    text-transform: uppercase;
}

.marketing-program-rail b {
    font-size: 1.28rem;
    font-weight: 950;
}

.marketing-program-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
}

.marketing-program-fields input,
.marketing-program-fields select {
    min-height: 44px;
    height: 44px;
    padding: 0 12px;
    line-height: 1.2;
}

.marketing-modal-form textarea {
    min-height: 108px;
}

.marketing-modal-form .service-modal-actions {
    position: sticky;
    bottom: -20px;
    margin: 0 -20px -20px;
    padding: 12px 20px;
    border-top: 1px solid #eee4f5;
    background: rgba(255, 255, 255, 0.96);
}

@media (max-width: 1150px) {
    .marketing-titlebar,
    .marketing-recommendation-grid,
    .marketing-program-grid {
        grid-template-columns: 1fr;
    }

    .marketing-subnav {
        grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    }

    .marketing-recommendation {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .marketing-recommendation .btn {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .marketing-edit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .marketing-titlebar {
        padding: 14px;
    }

    .marketing-titlebar h2 {
        max-width: 16ch;
        font-size: 1.35rem;
        overflow-wrap: anywhere;
    }

    .marketing-titlebar p {
        max-width: 32ch;
        overflow-wrap: anywhere;
    }

    .marketing-subnav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        max-width: 100%;
        gap: 6px;
    }

    .marketing-subnav a {
        min-height: 34px;
        padding: 0 6px;
        font-size: 0.72rem;
    }

    .marketing-subnav a[href="#automation"] {
        grid-column: 1 / -1;
    }

    .marketing-fab-ladder {
        right: 24px;
        bottom: 24px;
    }

    .marketing-fab-actions button {
        max-width: calc(100vw - 112px);
    }

    .marketing-program-modal-body {
        grid-template-columns: 1fr;
    }

    .marketing-program-rail {
        min-height: 0;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        align-content: center;
        justify-items: start;
    }

    .marketing-program-rail .ui-icon {
        margin-bottom: 0;
    }

    .marketing-program-fields {
        grid-template-columns: 1fr;
    }

    .marketing-edit-card-heading,
    .marketing-edit-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .marketing-edit-grid {
        grid-template-columns: 1fr;
    }

    .marketing-modal-backdrop {
        padding: 14px;
    }

    .marketing-modal-form .service-modal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .marketing-subnav {
        grid-template-columns: 1fr;
    }

    .marketing-subnav a[href="#automation"] {
        grid-column: auto;
    }
}

.placeholder {
    border: 1px dashed #d8cfe3;
    border-radius: 8px;
    padding: 14px;
    background: var(--brand-frame);
    color: var(--muted);
}

.pos-terminal-grid {
    align-items: start;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.pos-terminal h3,
.pos-subsection h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-subsection {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(44, 24, 64, 0.04);
}

.pos-subsection h4 {
    margin: 0 0 12px;
    color: #2f2140;
    font-size: 0.95rem;
}

.payment-method-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.payment-method-card {
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #dcd4e6;
    border-radius: 8px;
    padding: 10px;
    background: linear-gradient(180deg, #fff 0%, #faf7fd 100%);
    color: #33233f;
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(44, 24, 64, 0.05);
}

.payment-method-card input {
    width: 16px;
    min-height: 16px;
}

.payment-method-card span {
    color: var(--brand);
}

.payment-method-card:has(input:checked) {
    border-color: #cdb8ef;
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 1px rgba(75, 0, 130, 0.08), 0 6px 14px rgba(44, 36, 58, 0.07);
}

.pos-register-form {
    margin-top: 16px;
}

.pos-register-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
    align-items: start;
    gap: 16px;
}

.pos-register-catalog,
.pos-register-cart,
.pos-inventory-panel {
    display: grid;
    gap: 14px;
}

.pos-register-cart {
    position: sticky;
    top: 86px;
}

.pos-panel-heading,
.pos-section-header-inline,
.pos-product-editor-actions,
.pos-product-edit-row summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pos-panel-heading span,
.pos-section-header-inline span {
    display: block;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pos-panel-heading h3,
.pos-section-header-inline h4 {
    margin: 2px 0 0;
}

.pos-product-tools {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.35fr);
    gap: 10px;
    margin-bottom: 12px;
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
    gap: 10px;
}

.pos-product-tile {
    min-height: 150px;
    display: grid;
    align-content: start;
    gap: 6px;
    border: 1px solid #dcd4e6;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    color: #2f2140;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(44, 24, 64, 0.05);
}

.pos-product-tile:hover {
    border-color: #b8d6c0;
    box-shadow: 0 8px 18px rgba(31, 80, 54, 0.09);
    transform: translateY(-1px);
}

.pos-product-tile span,
.pos-product-tile small,
.pos-product-tile em {
    color: var(--muted);
    font-size: 0.78rem;
    font-style: normal;
}

.pos-product-tile span {
    color: #20613e;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pos-product-tile strong {
    line-height: 1.2;
}

.pos-product-tile b {
    font-size: 1.05rem;
}

.pos-product-tile.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pos-cart-lines {
    display: grid;
    gap: 8px;
    min-height: 70px;
}

.pos-empty-cart {
    border: 1px dashed #d8cfe3;
    border-radius: 8px;
    padding: 14px;
    color: var(--muted);
    background: #fff;
}

.pos-cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.pos-cart-line strong,
.pos-cart-line span {
    display: block;
}

.pos-cart-line span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.8rem;
}

.pos-cart-qty {
    display: grid;
    grid-template-columns: 30px 52px 30px;
    border: 1px solid #dcd4e6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.pos-cart-qty button,
.pos-cart-qty input {
    min-height: 32px;
    border: 0;
    text-align: center;
    background: #fff;
    font-weight: 900;
}

.pos-cart-qty button {
    cursor: pointer;
    color: var(--brand);
}

.pos-cart-qty input {
    border-left: 1px solid #eee8f4;
    border-right: 1px solid #eee8f4;
}

.pos-cart-details {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
}

.pos-cart-details summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 900;
}

.pos-cart-details .form-grid {
    margin-top: 12px;
}

.pos-payment-methods {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pos-sale-summary {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.pos-sale-summary div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
}

.pos-sale-summary strong {
    color: #2f2140;
}

.pos-sale-summary .total {
    color: #1f5138;
    font-size: 1.12rem;
    font-weight: 900;
}

.pos-sale-summary .total strong {
    color: #1f5138;
}

.pos-complete-sale {
    width: 100%;
    justify-content: center;
}

.pos-inventory-panel {
    margin-top: 16px;
}

.pos-product-editor {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}

.pos-product-editor.compact {
    margin-top: 12px;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #33233f;
    font-weight: 800;
}

.checkbox-inline input {
    width: 16px;
    min-height: 16px;
}

.pos-product-list {
    display: grid;
    gap: 8px;
}

.pos-product-edit-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    background: #fff;
}

.pos-product-edit-row summary {
    min-height: 52px;
    padding: 12px 14px;
    cursor: pointer;
}

.pos-product-edit-row summary span,
.pos-product-edit-row summary em {
    color: var(--muted);
    font-style: normal;
}

.pos-product-edit-row summary b {
    color: #1f5138;
}

.pos-inventory-stats {
    margin-top: 14px;
}

.pos-inventory-stat {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pos-inventory-stat > div > span,
.pos-inventory-stat > div > strong {
    display: block;
}

.pos-inventory-stat-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f1e8f8;
    color: var(--brand);
}

.pos-inventory-stat-icon.is-success {
    background: #e8f7ee;
    color: #23714a;
}

.pos-inventory-stat-icon.is-blue {
    background: #eaf1fb;
    color: #315f91;
}

.pos-inventory-stat-icon.is-warning {
    background: #fff3da;
    color: #9b6516;
}

.pos-inventory-workspace,
.pos-inventory-movements,
.pos-settings-form {
    margin-top: 16px;
}

.pos-inventory-workspace,
.pos-inventory-movements {
    padding: 0;
    overflow: hidden;
}

.pos-inventory-panel-header {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
}

.pos-inventory-panel-header h3,
.pos-inventory-panel-header p {
    margin: 0;
}

.pos-inventory-panel-header h3 {
    color: #2f2938;
    font-size: 1rem;
}

.pos-inventory-panel-header p,
.pos-inventory-panel-header > strong {
    color: var(--muted);
    font-size: 0.78rem;
}

.pos-inventory-panel-header p {
    margin-top: 3px;
}

.pos-inventory-panel-header > strong {
    white-space: nowrap;
}

.pos-inventory-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(150px, 0.22fr) minmax(170px, 0.25fr);
    align-items: end;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
    background: #fbfafd;
}

.pos-inventory-search {
    position: relative;
}

.pos-inventory-search > span {
    position: absolute;
    left: 11px;
    bottom: 10px;
    display: inline-flex;
    color: var(--muted);
    pointer-events: none;
}

.pos-inventory-search input {
    padding-left: 38px;
}

.pos-inventory-table-wrap {
    overflow-x: auto;
}

.pos-inventory-table {
    width: 100%;
    min-width: 1060px;
}

.pos-inventory-table th,
.pos-inventory-table td {
    padding: 10px 12px;
    vertical-align: middle;
}

.pos-inventory-table tbody tr:hover td {
    background: #fcfafd;
}

.pos-inventory-table td strong,
.pos-inventory-table td span {
    display: block;
}

.pos-inventory-table .numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pos-inventory-image,
.pos-inventory-upload-preview {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e4dce9;
    border-radius: 8px;
    background: #f5f1f7;
    color: var(--brand);
}

.pos-inventory-image img,
.pos-inventory-upload-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.pos-inventory-product-cell {
    min-width: 260px;
}

.pos-inventory-product-cell > strong {
    color: #2f2938;
    font-size: 0.84rem;
}

.pos-inventory-product-cell > span {
    max-width: 340px;
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-inventory-stock {
    width: fit-content;
    min-width: 46px;
    border-radius: 999px;
    padding: 4px 8px;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 900;
}

.pos-inventory-stock.is-good {
    background: #e7f6ed;
    color: #1d6b43;
}

.pos-inventory-stock.is-low {
    background: #fff2d7;
    color: #915d0e;
}

.pos-inventory-stock.is-out {
    background: #fde7e7;
    color: #a82626;
}

.pos-inventory-actions {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

.pos-inventory-actions .btn {
    min-height: 32px;
    padding: 0 9px;
}

.pos-inventory-actions .ui-icon {
    width: 15px;
    height: 15px;
}

.pos-inventory-empty {
    padding: 38px !important;
    color: var(--muted);
    text-align: center;
}

body.has-inventory-modal {
    overflow: hidden;
}

.pos-inventory-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(26, 22, 31, 0.54);
}

.pos-inventory-modal[hidden] {
    display: none;
}

.pos-inventory-modal-card {
    width: min(860px, 100%);
    max-height: min(90vh, 880px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dccfea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(31, 22, 39, 0.3);
}

.pos-inventory-modal-card.is-small {
    width: min(500px, 100%);
}

.pos-inventory-modal-card > form {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.pos-inventory-modal-header,
.pos-inventory-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
}

.pos-inventory-modal-header {
    border-bottom: 1px solid #e9e1ee;
    background: #faf7fc;
}

.pos-inventory-modal-header h2 {
    margin: 0;
    color: #2f2938;
    font-size: 1.05rem;
}

.pos-inventory-modal-body {
    display: grid;
    gap: 12px;
    overflow-y: auto;
    padding: 16px;
}

.pos-inventory-modal-footer {
    justify-content: flex-end;
    border-top: 1px solid #e9e1ee;
    background: #fff;
}

.pos-inventory-form-section {
    display: grid;
    gap: 10px;
    border-bottom: 1px solid #ebe5ef;
    padding: 0 0 14px;
}

.pos-inventory-form-section:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.pos-inventory-form-section h3 {
    margin: 0;
    color: #433a4d;
    font-size: 0.85rem;
}

.pos-inventory-checks {
    align-content: end;
    gap: 8px;
    padding-bottom: 6px;
}

.pos-inventory-upload {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border: 1px dashed #d9cfe1;
    border-radius: 8px;
    padding: 12px;
    background: #fbfafc;
}

.pos-inventory-upload-preview {
    width: 72px;
    height: 72px;
}

.pos-inventory-upload .field small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.7rem;
}

.pos-inventory-adjust-product {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #ebe5ef;
    padding-bottom: 12px;
}

.pos-inventory-adjust-product strong,
.pos-inventory-adjust-product span {
    display: block;
}

.pos-inventory-adjust-product span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
}

.pos-inventory-adjust-preview {
    border-left: 3px solid #8c63ad;
    padding: 9px 11px;
    background: #f7f2fa;
    color: #4b3e56;
    font-size: 0.8rem;
    font-weight: 800;
}

.pos-inventory-adjust-preview.is-invalid {
    border-left-color: #bc3636;
    background: #fff0f0;
    color: #9c2424;
}

.pos-settings-masthead {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #e6ddec;
    border-radius: 8px;
    padding: 6px 8px 6px 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(44, 24, 64, 0.05);
}

.pos-settings-eyebrow {
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pos-settings-subnav {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.pos-settings-subnav button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #ddd5e5;
    border-radius: 8px;
    padding: 0 11px;
    background: #fff;
    color: #3c3445;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 850;
    white-space: nowrap;
    box-shadow: 0 2px 7px rgba(44, 24, 64, 0.04);
}

.pos-settings-subnav button:hover,
.pos-settings-subnav button:focus-visible {
    border-color: #b99dcd;
    background: #faf6fc;
    color: var(--brand);
    outline: none;
}

.pos-settings-subnav button.is-active {
    border-color: #8d58b5;
    background: #f2e8f9;
    color: var(--brand);
    box-shadow: inset 0 0 0 1px rgba(110, 44, 172, 0.1);
}

.pos-settings-subnav .ui-icon {
    width: 17px;
    height: 17px;
}

.pos-settings-form {
    margin-top: 10px;
}

.pos-settings-page-section {
    margin-top: 10px;
    padding: 0;
    overflow: hidden;
}

.pos-settings-form .pos-settings-page-section {
    margin-top: 0;
}

.pos-settings-section-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding: 16px 18px;
}

.pos-settings-section-header h2,
.pos-settings-section-header p {
    margin: 0;
}

.pos-settings-section-header h2 {
    color: #2f2938;
    font-size: 1.35rem;
}

.pos-settings-section-header p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.84rem;
}

.pos-settings-block {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.pos-settings-block-heading {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
}

.pos-settings-block-heading h3,
.pos-settings-block-heading p {
    margin: 0;
}

.pos-settings-block-heading h3 {
    color: #372f40;
    font-size: 0.96rem;
}

.pos-settings-block-heading p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
}

.pos-settings-block-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f1e8f8;
    color: var(--brand);
}

.pos-settings-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.pos-settings-choice {
    min-height: 92px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    border: 1px solid #ddd6e5;
    border-radius: 8px;
    padding: 13px;
    background: #fbf9fc;
    cursor: pointer;
}

.pos-settings-choice:has(input:checked) {
    border-color: #b795ce;
    background: #f5eef9;
    box-shadow: inset 0 0 0 1px rgba(110, 44, 172, 0.08);
}

.pos-settings-choice input {
    margin-top: 2px;
}

.pos-settings-choice strong,
.pos-settings-choice small {
    display: block;
}

.pos-settings-choice strong {
    color: #362d40;
    font-size: 0.82rem;
}

.pos-settings-choice small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.pos-settings-payment-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.pos-settings-payment-method {
    min-height: 70px;
    display: grid;
    grid-template-columns: 18px 28px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border: 1px solid #ddd6e5;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    cursor: pointer;
}

.pos-settings-payment-method:has(input:checked) {
    border-color: #b795ce;
    background: #f3e9fa;
}

.pos-settings-payment-method > span {
    display: inline-flex;
    color: var(--brand);
}

.pos-settings-payment-method strong {
    min-width: 0;
    font-size: 0.78rem;
}

.pos-settings-control-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.55fr) minmax(320px, 1fr);
    align-items: start;
    gap: 16px;
}

.pos-settings-toggle-list {
    display: grid;
    gap: 8px;
}

.pos-settings-toggle-list > label {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #e1d9e7;
    border-radius: 8px;
    padding: 9px 11px;
    background: #fbfafd;
    cursor: pointer;
}

.pos-settings-toggle-list strong,
.pos-settings-toggle-list small {
    display: block;
}

.pos-settings-toggle-list strong {
    color: #3c3445;
    font-size: 0.8rem;
}

.pos-settings-toggle-list small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.7rem;
}

.pos-settings-toggle-list input {
    width: 18px;
    min-width: 18px;
    min-height: 18px;
}

.pos-settings-section-actions {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    padding: 12px 18px;
    background: #fbfafd;
}

.pos-package-catalog {
    margin: 18px;
    overflow: hidden;
    border: 1px solid #e3dce8;
    border-radius: 8px;
}

.pos-package-catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e3dce8;
    padding: 11px 13px;
    background: #fbfafd;
    color: #403748;
    font-size: 0.8rem;
}

.pos-package-catalog-header span {
    color: var(--muted);
}

.pos-package-table {
    width: 100%;
    min-width: 840px;
}

.pos-package-table td:first-child {
    min-width: 220px;
}

.pos-package-table td strong,
.pos-package-table td span {
    display: block;
}

.pos-package-table td span {
    max-width: 300px;
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-settings-empty {
    padding: 34px !important;
    color: var(--muted);
    text-align: center;
}

body.has-pos-settings-modal {
    overflow: hidden;
}

.pos-settings-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(26, 22, 31, 0.54);
}

.pos-settings-modal[hidden] {
    display: none;
}

.pos-settings-modal-card {
    width: min(650px, 100%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dccfea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(31, 22, 39, 0.3);
}

.pos-settings-modal-card > form {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.pos-settings-modal-header,
.pos-settings-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
}

.pos-settings-modal-header {
    border-bottom: 1px solid #e9e1ee;
    background: #faf7fc;
}

.pos-settings-modal-header h2 {
    margin: 0;
    color: #2f2938;
    font-size: 1.05rem;
}

.pos-settings-modal-body {
    overflow-y: auto;
    padding: 16px;
}

.pos-settings-modal-footer {
    justify-content: flex-end;
    border-top: 1px solid #e9e1ee;
}

@media (max-width: 980px) {
    .pos-settings-masthead {
        align-items: flex-start;
        flex-direction: column;
    }

    .pos-settings-subnav {
        justify-content: flex-start;
        width: 100%;
    }

    .pos-settings-choice-grid {
        grid-template-columns: 1fr;
    }

    .pos-settings-payment-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .pos-settings-subnav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 3px;
    }

    .pos-settings-section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .pos-settings-control-grid,
    .pos-settings-payment-grid {
        grid-template-columns: 1fr;
    }

    .pos-settings-section-actions .btn,
    .pos-settings-section-header .btn {
        width: 100%;
        justify-content: center;
    }

    .pos-settings-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .pos-settings-modal-card {
        max-height: 94vh;
    }
}

.body-chart-workspace {
    display: grid;
    grid-template-columns: minmax(560px, 1.35fr) minmax(360px, 0.75fr);
    gap: 14px;
    align-items: start;
}

.body-chart-workspace.is-embedded {
    display: contents;
}

.body-chart-appointment-context {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px;
}

.body-chart-appointment-context div,
.body-chart-locked-appointment {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #e3dce9;
    border-radius: 8px;
    background: #fbfdfe;
}

.body-chart-appointment-context span,
.body-chart-locked-appointment span,
.body-chart-locked-appointment small {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
}

.body-chart-appointment-context strong,
.body-chart-locked-appointment strong {
    display: block;
    margin-top: 4px;
    color: #26323a;
    font-size: 0.94rem;
    font-weight: 900;
}

.body-chart-locked-appointment small {
    margin-top: 4px;
}

.body-chart-appointment-picker {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.body-chart-picker-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.body-chart-picker-heading h3 {
    margin: 0 0 4px;
}

.body-chart-picker-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.body-chart-appointment-list {
    display: grid;
    gap: 8px;
}

.body-chart-appointment-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid #e6dee9;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.body-chart-appointment-card:hover,
.body-chart-appointment-card:focus-visible {
    border-color: #cdb8ef;
    background: #fbf7ff;
    outline: none;
}

.body-chart-appointment-card strong,
.body-chart-appointment-card span {
    display: block;
}

.body-chart-appointment-card strong {
    color: #26323a;
    font-size: 0.95rem;
}

.body-chart-appointment-card > div:first-child span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.body-chart-appointment-card > div:last-child {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.body-chart-map-panel,
.body-chart-editor-panel {
    padding: 0;
    overflow: hidden;
}

.body-chart-map-panel,
.body-chart-editor-panel,
.soap-note-panel {
    height: 100%;
}

.body-chart-map-panel {
    min-width: 0;
}

.body-chart-editor-panel {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    opacity: 1;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.soap-documentation-workspace.has-body-chart:not(.body-editor-open) .body-chart-editor-panel {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateX(18px);
    border-color: transparent;
    box-shadow: none;
}

.body-chart-toolbar {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: #fbfafc;
}

.body-chart-toolbar h3 {
    margin: 0 0 2px;
}

.body-chart-toolbar span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.body-chart-view-switch {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid #dcd4e6;
    border-radius: 8px;
    background: #fff;
}

.body-chart-view-switch button {
    min-width: 86px;
    min-height: 36px;
    border: 0;
    border-right: 1px solid #e8dfef;
    background: transparent;
    color: #3a2b48;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 900;
}

.body-chart-view-switch button:last-child {
    border-right: 0;
}

.body-chart-view-switch button.is-active {
    background: var(--brand);
    color: #fff;
}

.body-map-stage {
    position: relative;
    display: none;
    min-height: 720px;
    padding: 18px 138px 18px;
    background:
        linear-gradient(90deg, rgba(255, 248, 229, 0.35), rgba(255, 255, 255, 0) 22%, rgba(241, 249, 250, 0.4) 78%, rgba(245, 235, 255, 0.34)),
        #fff;
}

.body-map-stage.is-active {
    display: grid;
    place-items: center;
}

.body-chart-workspace.is-embedded .body-map-stage {
    height: calc(100% - 62px);
    min-height: 0;
    padding: 14px 92px;
}

.body-map-canvas {
    position: relative;
    width: min(440px, 100%);
    height: min(720px, calc(100vh - 260px));
    min-height: 620px;
    overflow: visible;
}

.body-chart-workspace.is-embedded .body-map-canvas {
    width: min(390px, 100%);
    height: min(100%, 620px);
    min-height: 0;
}

.body-map-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.body-zone {
    cursor: pointer;
    outline: none;
}

.body-zone path,
.body-zone ellipse,
.body-zone rect {
    fill: url(#body-fill-front);
    stroke: #d9cce5;
    stroke-width: 2;
    transition: fill 0.16s ease, stroke 0.16s ease, filter 0.16s ease;
}

[data-body-map="back"] .body-zone path,
[data-body-map="back"] .body-zone ellipse,
[data-body-map="back"] .body-zone rect {
    fill: url(#body-fill-back);
}

.body-zone text {
    fill: #5b188b;
    font-size: 11px;
    font-weight: 900;
    paint-order: stroke;
    pointer-events: none;
    stroke: rgba(255, 255, 255, 0.96);
    stroke-linejoin: round;
    stroke-width: 4px;
    text-anchor: middle;
}

.body-zone:hover path,
.body-zone:hover ellipse,
.body-zone:hover rect,
.body-zone:focus-visible path,
.body-zone:focus-visible ellipse,
.body-zone:focus-visible rect,
.body-zone.is-selected path,
.body-zone.is-selected ellipse,
.body-zone.is-selected rect {
    fill: #f4e7ff;
    stroke: #7a1bb0;
    filter: drop-shadow(0 8px 14px rgba(75, 0, 130, 0.13));
}

.body-zone[data-zone="neck"] rect,
.body-zone[data-zone="neck_back"] rect,
.body-zone[data-zone="left_shoulder"] ellipse,
.body-zone[data-zone="right_shoulder"] ellipse,
.body-zone[data-zone="left_trap"] path,
.body-zone[data-zone="right_trap"] path {
    fill: #fbf7ff;
    stroke: #d0bfde;
    stroke-width: 2;
}

.body-zone.has-annotation path,
.body-zone.has-annotation ellipse,
.body-zone.has-annotation rect {
    stroke: #7a1bb0;
    stroke-width: 2;
}

.body-zone.has-annotation text {
    fill: #45115f;
}

.body-zone[data-zone="neck"] text,
.body-zone[data-zone="neck_back"] text,
.body-zone[data-zone="left_shoulder"] text,
.body-zone[data-zone="right_shoulder"] text,
.body-zone[data-zone="left_trap"] text,
.body-zone[data-zone="right_trap"] text {
    fill: #5b188b;
    font-size: 11px;
    stroke-width: 3px;
}

.body-zone[data-zone="neck"]:hover rect,
.body-zone[data-zone="neck_back"]:hover rect,
.body-zone[data-zone="left_shoulder"]:hover ellipse,
.body-zone[data-zone="right_shoulder"]:hover ellipse,
.body-zone[data-zone="left_trap"]:hover path,
.body-zone[data-zone="right_trap"]:hover path,
.body-zone[data-zone="neck"]:focus-visible rect,
.body-zone[data-zone="neck_back"]:focus-visible rect,
.body-zone[data-zone="left_shoulder"]:focus-visible ellipse,
.body-zone[data-zone="right_shoulder"]:focus-visible ellipse,
.body-zone[data-zone="left_trap"]:focus-visible path,
.body-zone[data-zone="right_trap"]:focus-visible path,
.body-zone[data-zone="neck"].is-selected rect,
.body-zone[data-zone="neck_back"].is-selected rect,
.body-zone[data-zone="left_shoulder"].is-selected ellipse,
.body-zone[data-zone="right_shoulder"].is-selected ellipse,
.body-zone[data-zone="left_trap"].is-selected path,
.body-zone[data-zone="right_trap"].is-selected path {
    fill: #f4e7ff;
    stroke: #7a1bb0;
    stroke-width: 2;
}

.body-map-midline {
    fill: none;
    stroke: rgba(75, 0, 130, 0.13);
    stroke-dasharray: 5 7;
    stroke-width: 2;
    pointer-events: none;
}

.body-callout {
    position: absolute;
    left: var(--x);
    top: var(--y);
    z-index: 3;
    width: min(238px, 44%);
    pointer-events: auto;
    cursor: pointer;
}

.body-callout.is-right {
    transform: translate(22px, -50%);
}

.body-callout.is-left {
    transform: translate(calc(-100% - 22px), -50%);
}

.body-callout-pin {
    position: absolute;
    top: 50%;
    width: 22px;
    height: 2px;
    background: #b58bd4;
}

.body-callout.is-right .body-callout-pin {
    left: -22px;
}

.body-callout.is-left .body-callout-pin {
    right: -22px;
}

.body-callout-pin::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #7a1bb0;
    box-shadow: 0 0 0 2px rgba(122, 27, 176, 0.18);
    transform: translateY(-50%);
}

.body-callout.is-right .body-callout-pin::before {
    left: -6px;
}

.body-callout.is-left .body-callout-pin::before {
    right: -6px;
}

.body-callout-card {
    padding: 10px 10px 9px;
    border: 1px solid #e2d5eb;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 26px rgba(44, 24, 64, 0.12);
}

.body-callout.is-active .body-callout-card,
.body-annotation-row.is-active {
    border-color: #7a1bb0;
    box-shadow: 0 12px 28px rgba(75, 0, 130, 0.15);
}

.body-callout-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.body-callout-edit {
    width: 24px;
    height: 24px;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #e2d5eb;
    border-radius: 999px;
    background: #fff;
    color: var(--brand);
    cursor: pointer;
}

.body-callout-edit svg {
    width: 13px;
    height: 13px;
}

.body-callout-card strong,
.body-callout-card span,
.body-callout-card p {
    display: block;
}

.body-callout-card strong {
    color: #26323a;
    font-size: 0.82rem;
}

.body-callout-card span {
    margin-top: 3px;
    color: #6b3a91;
    font-size: 0.72rem;
    font-weight: 900;
}

.body-callout-card p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.body-callout-card .body-callout-treatment {
    color: #3b2d46;
    font-weight: 800;
}

.body-callout-draft .body-callout-card {
    border-color: #cdb8ef;
    background: #fbf7ff;
}

.body-chart-form {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 10px;
    padding: 16px;
}

.body-chart-workspace.is-embedded .body-chart-form {
    min-height: 0;
    padding: 12px;
    overflow: hidden;
}

.body-chart-note-grid {
    min-height: 0;
    overflow: auto;
    gap: 8px;
    grid-template-rows: auto auto auto minmax(132px, 1fr) minmax(132px, 1fr);
}

.body-chart-form textarea {
    height: 100%;
    min-height: 132px;
    resize: none;
}

.body-chart-form [data-save-annotation] {
    width: 100%;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    padding: 0 14px;
}

.body-region-field,
.body-quality-field,
.body-intensity-field {
    gap: 4px;
}

.body-region-field {
    margin-bottom: -8px;
}

.body-quality-field select {
    max-width: none;
    width: 100%;
    min-height: 46px;
    padding: 9px 12px;
    font-size: 0.98rem;
    font-weight: 850;
}

.body-note-field,
.body-treatment-field {
    min-height: 0;
}

.body-chart-editor-close {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #dcd4e6;
    border-radius: 8px;
    background: #fff;
    color: var(--brand);
    cursor: pointer;
}

.body-chart-editor-close svg {
    width: 17px;
    height: 17px;
}

.body-region-readout {
    min-height: 20px;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #26323a;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1.25;
}

.body-intensity-value {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-left: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f3eafd;
    color: var(--brand);
    font-size: 0.72rem;
}

.body-intensity-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
}

.body-intensity-choice {
    min-width: 0;
    position: relative;
}

.body-intensity-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.body-intensity-choice span {
    min-height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid #e0d6e8;
    border-radius: 8px;
    background: #fff;
    color: #3a2b48;
    font-size: 0.86rem;
    font-weight: 900;
    cursor: pointer;
    transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.body-intensity-choice input:checked + span {
    border-color: #7a1bb0;
    background: #f4e7ff;
    color: #4b0082;
    box-shadow: inset 0 0 0 1px rgba(122, 27, 176, 0.12);
}

.body-intensity-choice input:focus-visible + span,
.body-intensity-choice:hover span {
    border-color: #b98cdc;
    background: #fbf7ff;
}

.body-chart-recent {
    display: grid;
    gap: 8px;
    padding: 0 16px 16px;
}

.body-chart-recent h3 {
    margin-top: 4px;
}

.body-annotation-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border: 1px solid #edf1f5;
    border-radius: 8px;
    background: #fbfdfe;
    cursor: pointer;
}

.body-annotation-row strong,
.body-annotation-row span,
.body-annotation-row small {
    display: block;
}

.body-annotation-row-actions {
    display: grid;
    justify-items: end;
    gap: 6px;
    flex: 0 0 auto;
}

.body-annotation-row strong {
    color: #26323a;
    font-size: 0.84rem;
}

.body-annotation-row span,
.body-annotation-row small,
.body-annotation-row time {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
}

.body-annotation-row small {
    margin-top: 4px;
    max-width: 260px;
    line-height: 1.35;
}

.calendar-toolbar a,
.calendar-date-row,
.panel h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-workspace {
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calendar-workspace-clean {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid #d8dee7;
    background: #fbfafc;
}

.calendar-toolbar-title {
    min-width: 160px;
    display: grid;
    justify-items: end;
    gap: 2px;
}

.calendar-title {
    color: #2f2140;
    font-size: 1.08rem;
}

.calendar-toolbar-title span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.calendar-view-switch {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid #cbd7df;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(44, 24, 64, 0.06);
}

.calendar-view-option {
    min-height: 36px;
    padding: 8px 12px;
    border-right: 1px solid #cbd7df;
    color: #263238;
    font-weight: 800;
}

.calendar-view-option:last-child {
    border-right: 0;
}

.calendar-view-option.is-active {
    background: var(--brand);
    color: #fff;
}

.calendar-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.calendar-icon-btn,
.calendar-today-btn,
.calendar-reschedule-toggle {
    min-height: 36px;
    border: 1px solid #cbd7df;
    border-radius: 8px;
    background: #fff;
    color: #263238;
    font-weight: 800;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.calendar-icon-btn {
    width: 38px;
    justify-content: center;
}

.calendar-today-btn,
.calendar-reschedule-toggle {
    padding: 8px 12px;
}

.calendar-reschedule-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.calendar-icon-btn:hover,
.calendar-today-btn:hover,
.calendar-reschedule-toggle:hover,
.calendar-view-option:hover {
    border-color: #d7bee9;
    background: #f8f4fc;
    color: var(--brand);
}

.modal-close-button {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-height: 40px;
    border-color: #cfdde5;
    border-radius: 8px;
    background: #fff;
    color: #26323a;
    box-shadow: 0 8px 20px rgba(32, 42, 48, 0.06);
}

.modal-close-button svg {
    width: 21px;
    height: 21px;
}

.calendar-reschedule-toggle.is-active {
    border-color: var(--brand);
    background: #f0e7fb;
    color: var(--brand);
    box-shadow: inset 0 0 0 1px rgba(75, 0, 130, 0.12), 0 0 0 3px rgba(75, 0, 130, 0.08);
}

.calendar-view-option.is-active:hover {
    background: var(--brand);
    border-color: transparent;
    color: #fff;
}

.calendar-shell {
    min-height: calc(100vh - var(--topbar-height) - 65px);
    background: #fff;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-bottom: 1px solid #edf1f5;
    background: #f8fafc;
}

.calendar-weekdays span {
    min-width: 0;
    padding: 10px 12px;
    color: #52636d;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-grid-week {
    min-height: calc(100vh - var(--topbar-height) - 108px);
}

.calendar-day {
    min-width: 0;
    min-height: 154px;
    padding: 8px;
    border-right: 1px solid #edf1f5;
    border-bottom: 1px solid #edf1f5;
    background: #fff;
    cursor: default;
}

.calendar-grid-month .calendar-day {
    cursor: pointer;
}

.calendar-grid-week .calendar-day {
    min-height: calc(100vh - var(--topbar-height) - 108px);
}

.calendar-day:nth-child(7n) {
    border-right: 0;
}

.calendar-day.is-outside-month {
    background: #fbfbfc;
    color: #8c98a1;
}

.calendar-day.is-today {
    box-shadow: inset 0 0 0 2px rgba(75, 0, 130, 0.16);
}

.calendar-date-row {
    min-height: 25px;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
    color: inherit;
}

.calendar-date-row strong {
    min-width: 0;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-date-number {
    display: inline-grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    color: #374750;
    font-weight: 900;
}

.calendar-day.is-today .calendar-date-number {
    background: var(--brand);
    color: #fff;
}

.calendar-date-badge {
    max-width: 100%;
    padding: 3px 6px;
    border: 1px solid #cdb8ef;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.68rem;
    font-weight: 900;
}

.calendar-events {
    display: grid;
    gap: 6px;
}

.calendar-event {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    padding: 7px 8px;
    border: 1px solid #e2b463;
    border-radius: 5px;
    background: #fff7e6;
    color: #5f410f;
    font-size: 0.76rem;
    line-height: 1.2;
}

.calendar-event:hover {
    box-shadow: 0 4px 12px rgba(38, 50, 56, 0.08);
}

.calendar-workspace-clean.is-reschedule-mode .calendar-event {
    cursor: grab;
    box-shadow: 0 0 0 2px rgba(75, 0, 130, 0.08);
}

.calendar-workspace-clean.is-reschedule-mode .calendar-event[data-can-reschedule="0"] {
    cursor: not-allowed;
    opacity: 0.72;
    box-shadow: inset 0 0 0 1px rgba(100, 113, 124, 0.18);
}

.calendar-workspace-clean.is-reschedule-mode .calendar-event:active,
.calendar-event.is-dragging {
    cursor: grabbing;
}

.calendar-drag-image {
    position: fixed !important;
    top: -10000px !important;
    left: -10000px !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

.calendar-pointer-drag-image {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 9999 !important;
    pointer-events: none !important;
    opacity: 0.92;
    transform: translate(-10000px, -10000px);
    box-shadow: 0 18px 40px rgba(38, 50, 56, 0.2), 0 0 0 2px rgba(75, 0, 130, 0.16) !important;
}

.calendar-drop-warning {
    position: fixed;
    z-index: 10000;
    max-width: min(260px, calc(100vw - 24px));
    padding: 8px 10px;
    border: 1px solid rgba(180, 35, 24, 0.68);
    border-radius: 7px;
    background: rgba(255, 247, 245, 0.98);
    box-shadow: 0 14px 30px rgba(133, 39, 39, 0.22);
    color: #852727;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
}

.calendar-drop-warning[hidden] {
    display: none;
}

.calendar-workspace-clean.is-reschedule-mode [data-calendar-drop-target] {
    outline: 1px dashed rgba(75, 0, 130, 0.22);
    outline-offset: -4px;
}

[data-calendar-drop-target]::after {
    content: "";
    position: absolute;
    inset: 3px;
    z-index: 1;
    border-radius: 5px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

[data-calendar-drop-target]::before {
    content: attr(data-drop-message);
    position: absolute;
    top: 6px;
    left: 8px;
    right: 8px;
    z-index: 8;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border: 1px solid rgba(180, 35, 24, 0.62);
    border-radius: 6px;
    background: rgba(255, 247, 245, 0.98);
    box-shadow: 0 8px 18px rgba(133, 39, 39, 0.18);
    color: #852727;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-2px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.calendar-workspace-clean.is-reschedule-dragging [data-calendar-drop-target] {
    cursor: copy;
}

.calendar-workspace-clean.is-reschedule-dragging [data-calendar-drop-target].is-drop-allowed {
    outline-color: rgba(36, 122, 76, 0.22);
}

.calendar-workspace-clean.is-reschedule-dragging [data-calendar-drop-target].is-drop-unavailable {
    cursor: no-drop;
    outline-color: rgba(180, 35, 24, 0.6);
    box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.14);
}

.calendar-workspace-clean.is-reschedule-dragging [data-calendar-drop-target].is-drop-same-place {
    cursor: default;
    outline-color: rgba(100, 113, 124, 0.3);
}

[data-calendar-drop-target].is-drop-hover {
    background: #f1e9fb !important;
    box-shadow: inset 0 0 0 2px rgba(75, 0, 130, 0.32);
}

[data-calendar-drop-target].is-drop-allowed.is-drop-hover,
[data-calendar-drop-target].is-drop-range {
    background: #eef9f0 !important;
    box-shadow: inset 0 0 0 2px rgba(36, 122, 76, 0.3);
}

[data-calendar-drop-target].is-drop-same-place.is-drop-hover {
    background: #f4f6f8 !important;
    box-shadow: inset 0 0 0 2px rgba(100, 113, 124, 0.28);
}

[data-calendar-drop-target].is-drop-range::after {
    opacity: 1;
    background: rgba(36, 122, 76, 0.08);
    box-shadow: inset 0 0 0 1px rgba(36, 122, 76, 0.18);
}

[data-calendar-drop-target].is-drop-conflict-range,
[data-calendar-drop-target].is-drop-unavailable.is-drop-hover,
[data-calendar-drop-target].is-drop-rejected {
    background: #ffe8e8 !important;
    box-shadow: inset 0 0 0 2px rgba(180, 35, 24, 0.66);
}

[data-calendar-drop-target].is-drop-conflict-range::after,
[data-calendar-drop-target].is-drop-unavailable.is-drop-hover::after,
[data-calendar-drop-target].is-drop-rejected::after {
    opacity: 1;
    background:
        repeating-linear-gradient(
            -45deg,
            rgba(180, 35, 24, 0.18) 0,
            rgba(180, 35, 24, 0.18) 7px,
            rgba(255, 255, 255, 0.46) 7px,
            rgba(255, 255, 255, 0.46) 14px
        );
    box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.34);
}

[data-calendar-drop-target].is-drop-unavailable.is-drop-hover::before,
[data-calendar-drop-target].is-drop-rejected::before {
    opacity: 1;
    transform: translateY(0);
}

.calendar-event-time {
    grid-column: 1 / -1;
    min-width: 0;
    color: inherit;
    font-size: 0.68rem;
    font-weight: 850;
    opacity: 0.82;
    white-space: nowrap;
}

.calendar-event strong,
.calendar-event small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event strong.calendar-event-client {
    grid-column: 1 / -1;
    display: -webkit-box;
    color: inherit;
    font-size: 0.84rem;
    font-weight: 950;
    line-height: 1.12;
    overflow-wrap: anywhere;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.calendar-event small {
    grid-column: 1 / -1;
    align-self: center;
    color: inherit;
    font-size: 0.68rem;
    opacity: 0.78;
}

.calendar-event .calendar-payment-pill {
    grid-column: 1 / -1;
}

.calendar-event.status-confirmed,
.calendar-event.status-completed {
    border-color: #8cc79b;
    background: #eef9f0;
    color: #24562d;
}

.calendar-event.status-cancelled {
    border-color: #dfb8a8;
    background: #fff2eb;
    color: #7a3f25;
}

.calendar-event.status-no-show,
.calendar-event.status-no_show {
    border-color: #d99999;
    background: #fff0f0;
    color: #852727;
}

.calendar-event.has-service-color {
    border-color: var(--calendar-event-border);
    background: var(--calendar-event-bg);
    opacity: 1;
    color: var(--calendar-event-text);
}

.calendar-event.is-drag-invalid,
.calendar-event.has-service-color.is-drag-invalid {
    border-color: #b42318 !important;
    background: #fff0f0 !important;
    box-shadow: 0 8px 22px rgba(133, 39, 39, 0.2), 0 0 0 2px rgba(180, 35, 24, 0.44) !important;
    color: #852727 !important;
}

.calendar-week-cell .calendar-event,
.calendar-time-events .calendar-event {
    padding: 6px 7px;
    font-size: 0.7rem;
}

.calendar-week-cell .calendar-event strong.calendar-event-client {
    font-size: 0.78rem;
}

.calendar-week-board {
    min-height: 0;
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    background: #fff;
}

.calendar-week-header {
    position: sticky;
    top: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: 74px repeat(7, minmax(0, 1fr));
    border-bottom: 2px solid #d8dee7;
    background: #fff;
}

.calendar-week-time-corner,
.calendar-week-day-heading {
    min-height: 52px;
    display: grid;
    align-content: center;
    padding: 8px 10px;
    border-right: 1px solid #d8dee7;
}

.calendar-week-time-corner {
    color: #64717c;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-week-day-heading {
    justify-items: center;
    gap: 2px;
    color: #26323a;
}

.calendar-week-day-heading strong {
    font-size: 0.82rem;
    font-weight: 900;
}

.calendar-week-day-heading span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.calendar-week-day-heading.is-today {
    background: var(--brand-soft);
    color: var(--brand);
}

.calendar-week-body {
    position: relative;
    min-height: 0;
    display: grid;
    grid-template-rows: repeat(var(--calendar-hour-count), minmax(0, 1fr));
    overflow: hidden;
}

.calendar-current-time-line {
    position: absolute;
    right: 0;
    z-index: 9;
    height: 2px;
    background: #df2b26;
    box-shadow: 0 0 0 1px rgba(223, 43, 38, 0.08);
    transform: translateY(-1px);
    pointer-events: none;
}

.calendar-current-time-line[hidden] {
    display: none;
}

.calendar-current-time-line span {
    position: absolute;
    top: 50%;
    left: -5px;
    width: 11px;
    height: 11px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #df2b26;
    box-shadow: 0 2px 6px rgba(130, 27, 24, 0.28);
    transform: translateY(-50%);
}

.calendar-week-body .calendar-current-time-line {
    left: 74px;
}

.calendar-week-row {
    display: grid;
    grid-template-columns: 74px repeat(7, minmax(0, 1fr));
    min-height: 0;
}

.calendar-week-row.period-morning .calendar-week-time-label,
.calendar-week-row.period-morning .calendar-week-cell {
    background: #fffefa;
}

.calendar-week-row.period-daytime .calendar-week-time-label,
.calendar-week-row.period-daytime .calendar-week-cell {
    background: #f8fdff;
}

.calendar-week-row.period-dusk .calendar-week-time-label,
.calendar-week-row.period-dusk .calendar-week-cell {
    background: #fefcff;
}

.calendar-week-row:nth-child(even).period-morning .calendar-week-time-label,
.calendar-week-row:nth-child(even).period-morning .calendar-week-cell {
    background: #fcfbf4;
}

.calendar-week-row:nth-child(even).period-daytime .calendar-week-time-label,
.calendar-week-row:nth-child(even).period-daytime .calendar-week-cell {
    background: #f3f8fa;
}

.calendar-week-row:nth-child(even).period-dusk .calendar-week-time-label,
.calendar-week-row:nth-child(even).period-dusk .calendar-week-cell {
    background: #faf7fc;
}

.calendar-week-time-label,
.calendar-week-cell {
    min-width: 0;
    border-right: 1px solid #d8dee7;
    border-bottom: 1px solid #edf1f5;
}

.calendar-week-time-label {
    padding: 9px 8px;
    color: #26323a;
    font-size: 0.8rem;
    font-weight: 850;
}

.calendar-week-row.is-sub-slot .calendar-week-time-label {
    color: #7a8790;
    font-size: 0.68rem;
    font-weight: 800;
}

.calendar-week-row.is-sub-slot .calendar-week-time-label,
.calendar-week-row.is-sub-slot .calendar-week-cell {
    border-bottom-style: dashed;
}

.calendar-week-cell {
    position: relative;
    overflow: visible;
    display: grid;
    align-content: start;
    gap: 4px;
    padding: 4px 6px;
}

.calendar-week-cell.is-today {
    box-shadow: inset 2px 0 0 rgba(75, 0, 130, 0.15), inset -2px 0 0 rgba(75, 0, 130, 0.15);
}

.calendar-day-board {
    min-height: 0;
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    background: #fff;
}

.calendar-day-board-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    border-bottom: 1px solid #edf1f5;
    background: #f8fafc;
}

.calendar-day-board-header span,
.calendar-day-board-header strong {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #52636d;
    font-size: 0.78rem;
    font-weight: 900;
}

.calendar-day-board-header span {
    border-right: 1px solid #edf1f5;
    text-transform: uppercase;
}

.calendar-day-body {
    position: relative;
    min-height: 0;
    display: grid;
    grid-template-rows: repeat(var(--calendar-hour-count), minmax(0, 1fr));
    overflow: hidden;
}

.calendar-day-body .calendar-current-time-line {
    left: 86px;
}

.calendar-time-row {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    min-height: 0;
    border-bottom: 1px solid #edf1f5;
}

.calendar-time-row.period-morning .calendar-time-label,
.calendar-time-row.period-morning .calendar-time-events {
    background: #fffefa;
}

.calendar-time-row.period-daytime .calendar-time-label,
.calendar-time-row.period-daytime .calendar-time-events {
    background: #f8fdff;
}

.calendar-time-row.period-dusk .calendar-time-label,
.calendar-time-row.period-dusk .calendar-time-events {
    background: #fefcff;
}

.calendar-time-row:nth-child(even).period-morning .calendar-time-label,
.calendar-time-row:nth-child(even).period-morning .calendar-time-events {
    background: #fcfbf4;
}

.calendar-time-row:nth-child(even).period-daytime .calendar-time-label,
.calendar-time-row:nth-child(even).period-daytime .calendar-time-events {
    background: #f3f8fa;
}

.calendar-time-row:nth-child(even).period-dusk .calendar-time-label,
.calendar-time-row:nth-child(even).period-dusk .calendar-time-events {
    background: #faf7fc;
}

.calendar-time-label {
    padding: 7px 10px;
    border-right: 1px solid #edf1f5;
    color: #64717c;
    font-size: 0.78rem;
    font-weight: 900;
}

.calendar-time-row.is-sub-slot .calendar-time-label {
    color: #7a8790;
    font-size: 0.68rem;
    font-weight: 800;
}

.calendar-time-row.is-sub-slot {
    border-bottom-style: dashed;
}

.calendar-time-events {
    position: relative;
    min-width: 0;
    overflow: visible;
    display: grid;
    align-content: start;
    gap: 4px;
    padding: 4px 6px;
}

.calendar-event-wide {
    max-width: 720px;
}

.calendar-week-cell .calendar-event,
.calendar-time-events .calendar-event {
    position: absolute;
    inset: 4px 6px auto 6px;
    z-index: 4;
    min-height: calc(var(--calendar-event-height, 100%) - 8px);
    height: calc(var(--calendar-event-height, 100%) - 8px);
    align-content: start;
}

.calendar-time-events .calendar-event-wide {
    right: auto;
    width: min(720px, calc(100% - 12px));
}

.reschedule-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(22, 16, 31, 0.35);
}

.reschedule-modal-backdrop[hidden] {
    display: none;
}

.reschedule-modal {
    position: relative;
    width: min(520px, 100%);
    border: 1px solid #d8cfe3;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-strong);
}

.reschedule-modal form {
    display: grid;
    gap: 20px;
    padding: 22px;
}

.reschedule-modal-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    padding-right: 54px;
}

.reschedule-modal-header span {
    color: var(--brand);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.reschedule-modal-header h2 {
    margin: 2px 0 0;
    color: #2f2140;
    font-size: 1.1rem;
}

.reschedule-summary {
    display: grid;
    margin: 0;
    border: 1px solid #edf1f5;
    border-radius: 8px;
    overflow: hidden;
}

.reschedule-summary div {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid #edf1f5;
    background: #fff;
}

.reschedule-summary div:last-child {
    border-bottom: 0;
}

.reschedule-summary dt {
    color: #26323a;
    font-size: 0.78rem;
    font-weight: 900;
}

.reschedule-summary dd {
    min-width: 0;
    margin: 0;
    color: #26323a;
    font-weight: 850;
}

.reschedule-time-stack {
    display: grid;
    gap: 7px;
}

.reschedule-time-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.reschedule-time-caption {
    min-width: 32px;
    color: #26323a;
    font-size: 0.78rem;
    font-weight: 900;
}

.reschedule-time-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.reschedule-time-pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 8px;
    border: 1px solid #e3d8eb;
    border-radius: 999px;
    background: #fbf8fe;
    color: #26323a;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1;
}

.reschedule-new-time .reschedule-time-pill {
    border-color: #d7bee9;
    background: #f7f0fc;
    color: #2f2140;
}

.reschedule-old-time .reschedule-time-caption,
.reschedule-old-time .reschedule-time-pill {
    color: #7a8790;
    font-size: 0.7rem;
}

.reschedule-old-time .reschedule-time-pill {
    border-color: #e4e9ee;
    background: #fafbfc;
    min-height: 21px;
    padding: 3px 7px;
    font-weight: 800;
}

.reschedule-notification {
    display: grid;
    gap: 10px;
}

.reschedule-notification h3 {
    margin: 0;
    color: #2f2140;
    font-size: 0.94rem;
}

.reschedule-notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reschedule-notification-actions .btn {
    min-width: 92px;
}

.reschedule-cancel-wide {
    width: 100%;
}

.appointment-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 62;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(22, 16, 31, 0.35);
}

.appointment-modal-backdrop[hidden] {
    display: none;
}

.appointment-modal {
    position: relative;
    width: min(860px, 100%);
    max-height: min(840px, calc(100vh - 44px));
    overflow: auto;
    display: grid;
    gap: 10px;
    padding: 18px;
    border: 1px solid #d8cfe3;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-strong);
}

.appointment-create-modal {
    width: min(760px, 100%);
}

.appointment-create-form {
    display: grid;
    gap: 14px;
}

.appointment-create-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.appointment-create-grid .field.full {
    grid-column: 1 / -1;
}

.client-picker {
    position: relative;
    display: grid;
    gap: 8px;
}

.client-picker-control {
    min-height: 42px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 8px;
    border: 1px solid #d8cfe3;
    border-radius: 8px;
    padding: 0 8px 0 11px;
    background: #fff;
    color: #5b5164;
    box-shadow: 0 1px 2px rgba(44, 24, 64, 0.04);
}

.client-picker-control:focus-within {
    border-color: #b88add;
    box-shadow: 0 0 0 3px rgba(75, 0, 130, 0.1);
}

.client-picker-control input {
    width: 100%;
    min-height: 38px;
    border: 0;
    padding: 0;
    background: transparent;
    color: #2f2140;
    font: inherit;
    font-weight: 850;
    outline: none;
}

.client-picker.is-selected .client-picker-control {
    display: none;
}

.client-picker-clear {
    width: 30px;
    min-height: 30px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #6f6278;
    cursor: pointer;
}

.client-picker-clear:hover,
.client-picker-clear:focus-visible {
    background: #f7effc;
    color: var(--brand);
    outline: none;
}

.client-picker-selected,
.client-picker-results {
    border: 1px solid #e4d8ec;
    border-radius: 8px;
    background: #fff;
}

.client-picker-selected {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    background: #fbf7ff;
}

.client-picker-selected-card {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.client-picker-change {
    min-height: 32px;
    border: 1px solid #dac8ec;
    border-radius: 7px;
    padding: 0 11px;
    background: #fff;
    color: #4a215f;
    font-size: 0.78rem;
    font-weight: 950;
    cursor: pointer;
}

.client-picker-change:hover,
.client-picker-change:focus-visible {
    border-color: #b98bda;
    background: #f7effc;
    outline: none;
}

.client-picker-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    max-height: min(340px, 48vh);
    overflow: auto;
    box-shadow: 0 18px 42px rgba(43, 29, 56, 0.18);
}

.client-picker-results[hidden],
.client-picker-selected[hidden] {
    display: none;
}

.client-picker-option {
    width: 100%;
    display: grid;
    gap: 6px;
    border: 0;
    padding: 10px 12px;
    background: #fff;
    color: #2f2140;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.client-picker-option:hover,
.client-picker-option:focus-visible,
.client-picker-option.is-active {
    background: #f7f0fc;
    outline: none;
}

.client-picker-separator {
    display: block;
    height: 1px;
    background: #efe7f4;
}

.client-picker-empty {
    padding: 12px;
    color: #6b5e74;
    font-size: 0.86rem;
    font-weight: 850;
}

.client-picker-row {
    min-width: 0;
}

.client-picker-row-main {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.2fr);
    gap: 10px;
    align-items: baseline;
}

.client-picker-row-main strong,
.client-picker-row-main span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-picker-row-main strong {
    color: #2f2140;
    font-size: 0.9rem;
    font-weight: 950;
}

.client-picker-row-main span {
    color: #5f6d76;
    font-size: 0.8rem;
    font-weight: 800;
}

.client-picker-row-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.client-preference-pill {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    max-width: 100%;
    border: 1px solid #d9c5eb;
    border-radius: 999px;
    padding: 3px 8px;
    background: #f7effc;
    color: #4b136f;
    font-size: 0.72rem;
    font-weight: 950;
    line-height: 1.1;
}

.client-preference-pill.is-muted {
    border-color: #e5e8ec;
    background: #f8fafc;
    color: #6b7780;
}

.appointment-service-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px;
}

.appointment-service-card {
    --service-card-accent: #6b159e;
    position: relative;
    min-height: 76px;
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 7px;
    overflow: hidden;
    border: 1px solid #e2d5eb;
    border-radius: 8px;
    padding: 10px 12px 10px 16px;
    background: #fff;
    color: #2f2140;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(44, 24, 64, 0.04);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.appointment-service-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--service-card-accent);
}

.appointment-service-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.appointment-service-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    min-width: 0;
}

.appointment-service-card-meta span {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    border: 1px solid #e4d5f2;
    border-radius: 999px;
    padding: 3px 8px;
    background: #f7edff;
    color: #4b136f;
    font-size: 0.72rem;
    font-weight: 950;
    line-height: 1.1;
}

.appointment-service-card strong {
    min-width: 0;
    color: #2f2140;
    font-size: 0.9rem;
    font-weight: 950;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.appointment-service-card:hover,
.appointment-service-card:focus-within {
    border-color: #c7a8e3;
    background: #fbf7ff;
    box-shadow: 0 0 0 3px rgba(75, 0, 130, 0.08);
}

.appointment-service-card:has(input:checked) {
    border-color: #6b159e;
    background: #fbf7ff;
    box-shadow: inset 0 0 0 2px rgba(107, 21, 158, 0.86), 0 8px 18px rgba(75, 0, 130, 0.12);
}

.appointment-payment-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.appointment-payment-card {
    position: relative;
    min-height: 78px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    gap: 2px 9px;
    border: 1px solid #e2d5eb;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    color: #2f2140;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(44, 24, 64, 0.04);
}

.appointment-payment-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.appointment-payment-card > span {
    grid-row: 1 / 3;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #dac8ec;
    border-radius: 8px;
    background: #f7effc;
    color: var(--brand);
}

.appointment-payment-card strong,
.appointment-payment-card small {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.appointment-payment-card strong {
    color: #2f2140;
    font-size: 0.86rem;
    font-weight: 950;
}

.appointment-payment-card small {
    color: #6d5d78;
    font-size: 0.75rem;
    font-weight: 850;
}

.appointment-payment-card:hover,
.appointment-payment-card:focus-within {
    border-color: #c7a8e3;
    background: #fbf7ff;
    box-shadow: 0 0 0 3px rgba(75, 0, 130, 0.08);
}

.appointment-payment-card:has(input:checked) {
    border-color: #6b159e;
    background: #fbf7ff;
    box-shadow: inset 0 0 0 2px rgba(107, 21, 158, 0.86), 0 8px 18px rgba(75, 0, 130, 0.12);
}

.appointment-create-grid small {
    display: block;
    min-height: 18px;
    margin-top: 6px;
    color: #6d5d78;
    font-size: 0.78rem;
    font-weight: 800;
}

.appointment-create-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #eadff2;
}

.appointment-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-right: 56px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eadff2;
}

.appointment-modal-header span {
    color: var(--brand);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.appointment-modal-header h2 {
    margin: 2px 0 0;
    color: #2f2140;
    font-size: 1.28rem;
}

.appointment-modal-header p {
    margin: 3px 0 0;
    color: #60707c;
    font-weight: 800;
}

.appointment-detail-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
    border: 1px solid #d8e4e8;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbfb 0%, #f4f7fb 100%);
}

.appointment-detail-main span,
.appointment-detail-grid span,
.appointment-section-heading span {
    display: block;
    color: #60707c;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.appointment-detail-main strong {
    display: block;
    margin-top: 4px;
    color: #21323a;
    font-size: 1.02rem;
}

.appointment-detail-badges {
    display: flex;
    align-content: flex-start;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
}

.appointment-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border: 1px solid #d7bee9;
    border-radius: 999px;
    background: #f7f0fc;
    color: #2f2140;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
}

.appointment-status-badge.muted {
    border-color: #dde6ea;
    background: #fff;
    color: #60707c;
}

.appointment-detail-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
}

.appointment-detail-grid div {
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #dde6ea;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.78);
}

.appointment-detail-grid strong {
    display: block;
    margin-top: 4px;
    color: #21323a;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.appointment-payment-action-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid #efd49d;
    border-radius: 8px;
    background: #fff8e8;
}

.appointment-payment-action-card[hidden] {
    display: none;
}

.appointment-payment-action-card span {
    display: block;
    color: #8b5d14;
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.appointment-payment-action-card strong {
    display: block;
    margin-top: 3px;
    color: #3a2a0e;
    font-size: 0.96rem;
    font-weight: 950;
}

.appointment-payment-action-card p {
    margin: 4px 0 0;
    color: #66512a;
    font-size: 0.84rem;
    font-weight: 800;
}

.appointment-payment-action-card form {
    display: flex;
    justify-content: flex-end;
}

.calendar-payment-pill {
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    border: 1px solid rgba(75, 0, 130, 0.14);
    border-radius: 999px;
    padding: 2px 7px;
    background: rgba(255, 255, 255, 0.72);
    color: #3c2b47;
    font-size: 0.68rem;
    font-weight: 950;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-payment-pill.payment-status-paid,
.calendar-payment-pill.payment-status-card-secured {
    border-color: rgba(36, 122, 76, 0.22);
    background: #e7f6ee;
    color: #247a4c;
}

.calendar-payment-pill.payment-status-prepay-due,
.calendar-payment-pill.payment-status-card-needed,
.calendar-payment-pill.payment-status-invoice-open {
    border-color: rgba(155, 103, 22, 0.2);
    background: #fff5df;
    color: #8b5d14;
}

.calendar-payment-pill.payment-status-partial {
    border-color: rgba(75, 0, 130, 0.2);
    background: #f1e8ff;
    color: var(--brand);
}

.appointment-note-history-panel {
    display: grid;
    gap: 10px;
    padding: 10px;
    border: 1px solid #edf1f5;
    border-radius: 8px;
    background: #fff;
}

.appointment-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.appointment-section-heading h3 {
    margin: 2px 0 0;
    color: #2f2140;
    font-size: 1rem;
}

.appointment-section-heading .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.appointment-section-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.appointment-note-history {
    display: grid;
    gap: 8px;
}

.appointment-note-row,
.appointment-note-empty {
    border: 1px solid #dde6ea;
    border-radius: 6px;
    background: #f9fbfc;
    padding: 9px 10px;
}

.appointment-note-row-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.appointment-note-row-heading strong {
    color: #21323a;
    font-size: 0.94rem;
}

.appointment-note-row-heading span {
    color: #60707c;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.appointment-note-row p {
    margin: 6px 0 0;
    color: #3c4d57;
    font-size: 0.86rem;
}

.appointment-note-date,
.appointment-note-empty {
    color: #60707c;
    font-size: 0.78rem;
    font-weight: 800;
}

.appointment-action-panel {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px;
    border: 1px solid #edf1f5;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff 0%, #fbfafc 100%);
}

.appointment-action-panel form {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    width: auto;
}

.appointment-action-panel .btn {
    min-width: 92px;
}

.appointment-action-panel .btn.is-current {
    border-color: #d7bee9;
    background: #f7f0fc;
    color: #6b3a91;
    cursor: default;
    opacity: 1;
}

.soap-page-header {
    align-items: flex-start;
}

.soap-documentation-stack,
.soap-appointment-picker {
    display: grid;
    gap: 14px;
}

.soap-documentation-stack {
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
}

.soap-documentation-workspace {
    display: grid;
    grid-template-columns: minmax(330px, 0.44fr) minmax(620px, 1fr) 0;
    gap: 14px;
    align-items: stretch;
    min-height: 0;
    height: 100%;
    transition: grid-template-columns 0.24s ease;
}

.soap-documentation-workspace.body-editor-open {
    grid-template-columns: minmax(310px, 0.38fr) minmax(500px, 0.86fr) minmax(310px, 0.36fr);
}

.soap-documentation-workspace.is-note-only {
    grid-template-columns: minmax(0, 1fr);
}

.soap-visit-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
}

.soap-visit-details,
.soap-visit-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.soap-visit-actions {
    justify-content: flex-end;
}

.soap-visit-strip strong,
.soap-visit-strip span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border: 1px solid #e3dce9;
    border-radius: 999px;
    background: #fbfdfe;
    color: #26323a;
    font-size: 0.82rem;
    font-weight: 900;
}

.soap-visit-strip span {
    color: var(--muted);
}

.soap-visit-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
}

.soap-visit-summary div {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #e3dce9;
    border-radius: 8px;
    background: #fbfdfe;
}

.soap-visit-summary span {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
}

.soap-visit-summary strong {
    display: block;
    margin-top: 4px;
    color: #26323a;
    font-size: 0.94rem;
    font-weight: 900;
}

.soap-note-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    align-content: stretch;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.soap-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.soap-panel-heading h3 {
    margin: 0 0 3px;
}

.soap-panel-heading span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.soap-dynamic-form {
    height: 100%;
    min-height: 0;
    gap: 12px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-items: stretch;
}

.soap-dynamic-form:has(.soap-form-select-field.is-hidden) {
    grid-template-rows: minmax(0, 1fr) auto;
}

.soap-form-select-field.is-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.soap-appointment-summary {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid #e6edf2;
    border-radius: 8px;
    background: #fbfdfe;
}

.soap-appointment-summary strong {
    color: #26323a;
    font-size: 1rem;
}

.soap-appointment-summary span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.soap-appointment-summary div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.time-pill {
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid #e3d6ea;
    border-radius: 999px;
    background: #fbf7fe;
    color: #3a2b48;
    font-size: 0.76rem;
    font-weight: 900;
}

.soap-form-fields {
    align-self: stretch;
    display: grid;
    align-content: start;
    gap: 9px;
    height: 100%;
    min-height: 0;
    overflow: auto;
    padding: 10px;
    overscroll-behavior: contain;
    border: 1px solid #eadff2;
    border-radius: 8px;
    background: #fbfafc;
}

.soap-form-fields.is-compact {
    gap: 8px;
}

.soap-form-fields.is-dense {
    gap: 7px;
    padding: 8px;
}

.soap-form-fields[data-field-count="4"]:not(.is-readonly) {
    grid-template-rows: repeat(4, minmax(0, 1fr));
    align-content: stretch;
    overflow: hidden;
}

.soap-dynamic-field {
    padding: 8px;
    border: 1px solid #edf1f5;
    border-radius: 8px;
    background: #fff;
}

.soap-form-fields[data-field-count="4"]:not(.is-readonly) .soap-dynamic-field {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 7px;
}

.soap-dynamic-field textarea {
    min-height: 92px;
}

.soap-form-fields[data-field-count="4"]:not(.is-readonly) .soap-dynamic-field textarea {
    height: 100%;
    min-height: 0;
    resize: none;
}

.soap-form-fields.is-compact .soap-dynamic-field {
    padding: 7px;
}

.soap-form-fields.is-compact .soap-dynamic-field textarea {
    min-height: 74px;
}

.soap-form-fields.is-dense .soap-dynamic-field textarea {
    min-height: 62px;
}

.soap-form-fields.is-readonly {
    grid-auto-rows: minmax(74px, 1fr);
    background: #fff;
}

.soap-readonly-field {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid #edf1f5;
    border-radius: 8px;
    background: #fbfdfe;
}

.soap-readonly-field span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
}

.soap-readonly-field strong {
    color: #26323a;
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.35;
}

.soap-note-empty {
    color: #94a0aa;
    font-weight: 800;
}

.client-share-badge {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef2f0;
    color: #5f6b64;
    font-size: 0.72rem;
    font-weight: 900;
}

.client-share-badge.is-shared {
    background: #dff3e8;
    color: #247a4c;
}

.resource-share-overlay {
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(31, 18, 42, 0.28);
}

.resource-share-overlay[hidden],
.resource-share-drawer[hidden] {
    display: none;
}

.resource-share-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    height: 100dvh;
    width: min(430px, calc(100vw - 18px));
    overflow: hidden;
    border-left: 1px solid var(--line-strong);
    background: #fff;
    box-shadow: -18px 0 36px rgba(44, 36, 58, 0.18);
}

.resource-share-form {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px;
}

.resource-share-header,
.resource-share-status,
.resource-share-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.resource-share-header h3 {
    margin: 0 0 3px;
    color: #2f2140;
    font-size: 1.05rem;
}

.resource-share-header span,
.resource-share-status span:not(.client-share-badge) {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.resource-share-form textarea {
    min-height: 108px;
}

.resource-share-list {
    min-height: 0;
    overflow: auto;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 8px;
    border: 1px solid #eadff2;
    border-radius: 8px;
    background: #fbfafc;
}

.resource-share-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e6edf2;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.resource-share-option.is-filtered-out {
    display: none !important;
}

.resource-share-empty {
    margin: 0;
    text-align: center;
}

.resource-share-option:has(input:checked) {
    border-color: #bfe5cf;
    background: #f3fbf6;
}

.resource-share-option input {
    width: 16px;
    min-height: 16px;
    margin-top: 2px;
}

.resource-share-option span,
.resource-share-option strong,
.resource-share-option small {
    display: block;
    min-width: 0;
}

.resource-share-option strong {
    color: #26323a;
    font-size: 0.88rem;
}

.resource-share-option small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 750;
}

.resource-share-actions {
    justify-content: flex-end;
    padding-top: 4px;
    border-top: 1px solid var(--line);
}

.section-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-heading-row h3 {
    margin: 0 0 3px;
}

.section-heading-row span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 750;
}

.client-note-history-panel {
    margin-top: 16px;
}

.soap-choice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.soap-choice {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid #e4dae9;
    border-radius: 8px;
    background: #fff;
    color: #3a3142;
    font-size: 0.82rem;
    font-weight: 850;
}

.soap-choice input {
    width: 16px;
    min-height: 16px;
}

.soap-form-actions {
    align-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 0 0;
    border-top: 1px solid #efe8f4;
    background: #fff;
}

.soap-form-actions .btn {
    min-width: 104px;
    min-height: 38px;
    height: 38px;
    flex: 0 0 auto;
    padding: 0 12px;
}

.services-page-header {
    padding-right: 76px;
}

.forms-page-header {
    padding-right: 76px;
}

.service-table-panel {
    padding: 0;
    overflow: hidden;
}

.service-table-panel,
.form-table-panel,
.form-assignments-panel {
    padding: 0;
    overflow: hidden;
}

.form-table-panel,
.form-assignments-panel {
    margin-bottom: 16px;
}

.resource-create-panel,
.resource-library-panel {
    margin-bottom: 16px;
}

.resource-create-form {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(130px, 0.7fr) minmax(220px, 1.2fr) minmax(190px, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.resource-create-form textarea {
    min-height: 58px;
}

.resource-create-form .btn {
    min-height: 38px;
}

.resource-library-toolbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: #fbfafc;
}

.resource-library-toolbar h3 {
    margin-bottom: 2px;
}

.resource-search-form {
    min-width: min(420px, 100%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.resource-source-cell a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand);
    font-weight: 900;
}

.service-table-toolbar,
.form-table-toolbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: #fbfafc;
}

.service-table-toolbar h3,
.form-table-toolbar h3 {
    margin-bottom: 2px;
}

.service-table th,
.form-template-table th {
    background: #f8f7fa;
    padding: 12px 14px;
}

.service-table td,
.form-template-table td {
    padding: 12px 14px;
}

.service-table tbody tr:hover td,
.form-template-table tbody tr:hover td {
    background: #fbf9fc;
}

.form-template-table td {
    vertical-align: middle;
}

.form-template-table td strong,
.form-template-table td span {
    display: block;
}

.form-template-table td span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
}

.form-assignments-panel .list-row {
    margin: 0 16px 12px;
}

.service-name-cell {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 240px;
}

.service-name-cell strong,
.service-name-cell span {
    display: block;
}

.service-name-cell span {
    max-width: 460px;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
}

.service-color-dot {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 2px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--service-color);
    box-shadow: 0 0 0 1px rgba(38, 50, 56, 0.14), 0 2px 6px rgba(38, 50, 56, 0.12);
}

.service-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.service-chip {
    min-height: 23px;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid #e8dfef;
    border-radius: 999px;
    background: #fbf8fe;
    color: #3a2b48;
    font-size: 0.72rem;
    font-weight: 850;
}

.service-edit-button {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid #e4dae9;
    border-radius: 8px;
    background: #fff;
    color: #3a2b48;
    font-size: 0.78rem;
    font-weight: 850;
    cursor: pointer;
}

.service-edit-button:hover,
.service-edit-button:focus-visible {
    border-color: #cdb8ef;
    background: #f8f1ff;
    color: var(--brand);
    outline: none;
}

.service-edit-button .ui-icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
}

.floating-add-button {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 50;
    width: 56px;
    height: 56px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    box-shadow: 0 16px 34px rgba(75, 0, 130, 0.3);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.floating-add-button:hover,
.floating-add-button:focus-visible {
    transform: translateY(-2px) scale(1.03);
    background: #5f1a96;
    box-shadow: 0 20px 42px rgba(75, 0, 130, 0.36);
    outline: none;
}

.clients-workspace {
    position: relative;
    min-height: calc(100vh - 132px);
    padding-bottom: 76px;
}

.clients-page-header {
    align-items: stretch;
    overflow: hidden;
    padding: 0;
    border-color: #e5d9f0;
    background: linear-gradient(135deg, #ffffff 0%, #fcf8ff 48%, #f3ecff 100%);
}

.client-page-title {
    display: grid;
    align-content: center;
    padding: 18px 20px;
}

.client-page-kicker {
    margin-bottom: 4px;
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.client-page-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(86px, 1fr));
    min-width: min(560px, 100%);
    border-left: 1px solid rgba(95, 22, 150, 0.16);
    background: rgba(255, 255, 255, 0.72);
}

.client-page-metrics div {
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 16px 18px;
    border-left: 1px solid rgba(95, 22, 150, 0.12);
}

.client-page-metrics div:first-child {
    border-left: 0;
}

.client-page-metrics strong {
    color: #1f2f35;
    font-size: 1.55rem;
    line-height: 1;
}

.client-page-metrics span {
    color: #5d6d72;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.client-directory-panel {
    overflow: hidden;
    border: 1px solid #e7ddef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(44, 24, 64, 0.08);
}

.client-directory-toolbar {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid #ebe2f3;
    background: #fcfaff;
}

.client-directory-toolbar h3 {
    margin: 0 0 3px;
    color: #2f2140;
    font-size: 1.05rem;
}

.client-search-form {
    width: min(600px, 100%);
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.client-search-field {
    position: relative;
}

.client-search-field input {
    min-height: 44px;
    padding-left: 42px;
    padding-right: 42px;
    border-color: #e2d7eb;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(38, 50, 56, 0.03);
}

.client-search-icon,
.client-search-clear {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.client-search-icon {
    left: 13px;
    display: inline-flex;
    color: var(--brand);
    pointer-events: none;
}

.client-search-icon .ui-icon,
.client-search-clear .ui-icon {
    width: 17px;
    height: 17px;
}

.client-search-clear {
    right: 10px;
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7a8791;
    cursor: pointer;
}

.client-search-clear:hover,
.client-search-clear:focus-visible {
    background: #f5effb;
    color: var(--brand);
    outline: none;
}

.client-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #ede4f4;
    background: #ffffff;
}

.client-filter-group {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid #e4dae9;
    border-radius: 8px;
    background: #fbf8fe;
}

.client-filter-pill {
    min-height: 34px;
    border: 0;
    border-left: 1px solid #e4dae9;
    padding: 0 12px;
    background: transparent;
    color: #44344f;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
}

.client-filter-pill:first-child {
    border-left: 0;
}

.client-filter-pill:hover,
.client-filter-pill:focus-visible,
.client-filter-pill.is-active {
    background: #f0e7ff;
    color: var(--brand);
    outline: none;
}

.client-tag-filter select {
    min-height: 36px;
    min-width: 150px;
    border-color: #e4dae9;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 850;
}

.client-filter-reset .ui-icon {
    width: 16px;
    height: 16px;
}

.client-table-status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.client-directory-table-shell {
    max-height: min(680px, calc(100vh - 325px));
    overflow: auto;
    background:
        linear-gradient(90deg, #fff 30%, rgba(255, 255, 255, 0)),
        linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 70%) 100% 0,
        linear-gradient(90deg, rgba(95, 22, 150, 0.08), rgba(95, 22, 150, 0)),
        linear-gradient(90deg, rgba(95, 22, 150, 0), rgba(95, 22, 150, 0.08)) 100% 0;
    background-attachment: local, local, scroll, scroll;
    background-repeat: no-repeat;
    background-size: 36px 100%, 36px 100%, 12px 100%, 12px 100%;
}

.client-directory-table {
    min-width: 1040px;
}

.client-directory-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 0;
    border-bottom-color: #e5d9f0;
    background: #fbf8fe;
}

.client-directory-table tbody tr:nth-child(even) td {
    background: #fffafe;
}

.client-directory-table tbody tr:hover td {
    background: #fbf4ff;
}

.client-directory-table td {
    padding: 13px 12px;
    border-bottom-color: #eee5f4;
    vertical-align: middle;
}

.client-directory-table .client-name-column {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 264px;
    background: #fff;
    box-shadow: 8px 0 16px rgba(44, 24, 64, 0.04);
}

.client-directory-table tbody tr:nth-child(even) .client-name-column {
    background: #fffafe;
}

.client-directory-table tbody tr:hover .client-name-column {
    background: #fbf4ff;
}

.client-directory-table thead th:first-child {
    left: 0;
    z-index: 4;
}

.client-sort-button {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 0;
    padding: 0 12px;
    background: transparent;
    color: #5d6d72;
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-align: left;
    text-transform: uppercase;
}

.client-sort-button .ui-icon {
    width: 15px;
    height: 15px;
    color: #8b9a9e;
}

.client-sort-button:hover,
.client-sort-button:focus-visible,
.client-sort-button.is-active {
    color: var(--brand);
    outline: none;
}

.client-sort-button.is-active .ui-icon {
    color: var(--brand);
}

.client-th-label {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #5d6d72;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.client-identity {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.client-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #dac8ee;
    border-radius: 50%;
    background: linear-gradient(135deg, #f4edff, #fff7fb);
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 900;
}

.client-identity strong,
.client-identity small,
.client-last-column strong,
.client-last-column span {
    display: block;
}

.client-identity strong {
    max-width: 210px;
    overflow: hidden;
    color: #213139;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-identity small {
    margin-top: 2px;
    color: #687981;
    font-size: 0.75rem;
    font-weight: 800;
}

.client-contact-column {
    min-width: 230px;
}

.client-contact-column a,
.client-contact-column span {
    min-height: 22px;
    display: flex;
    align-items: center;
    gap: 7px;
    overflow-wrap: anywhere;
    color: #31434b;
    font-size: 0.84rem;
    font-weight: 800;
}

.client-contact-column a + a,
.client-contact-column a + span,
.client-contact-column span + a,
.client-contact-column span + span {
    margin-top: 3px;
}

.client-contact-column .ui-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    color: var(--brand);
}

.client-care-note {
    display: block;
    max-width: 230px;
    margin-top: 5px;
    overflow: hidden;
    color: #64717c;
    font-size: 0.78rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clients-workspace .badge.success {
    background: #f0e7ff;
    color: var(--brand);
}

.client-portal-state {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border: 1px solid #e1e6ea;
    border-radius: 999px;
    background: #f8fafb;
    color: #64717c;
    font-size: 0.76rem;
    font-weight: 900;
}

.client-portal-state.enabled {
    border-color: #d5c0eb;
    background: #f3ecff;
    color: var(--brand);
}

.client-portal-state .ui-icon {
    width: 15px;
    height: 15px;
}

.client-tags-column {
    max-width: 260px;
}

.client-tag {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    margin: 2px 3px 2px 0;
    border: 1px solid #e3e9ec;
    border-radius: 999px;
    padding: 3px 8px;
    background: #fff;
    color: #40545b;
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 850;
}

.client-tag:hover,
.client-tag:focus-visible {
    border-color: #d5c0eb;
    background: #f5effb;
    color: var(--brand);
    outline: none;
}

.client-last-column {
    min-width: 125px;
}

.client-last-column strong {
    color: #2b3d43;
    font-size: 0.86rem;
}

.client-last-column span {
    margin-top: 2px;
    font-size: 0.75rem;
    font-weight: 800;
}

.client-row-action-form {
    margin: 0;
}

.client-row-action {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #e4dae9;
    border-radius: 8px;
    padding: 6px 10px;
    background: #fff;
    color: var(--brand);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(44, 24, 64, 0.04);
}

.client-row-action:hover,
.client-row-action:focus-visible {
    border-color: #cdb8ef;
    background: #f5effb;
    outline: none;
}

.client-row-action .ui-icon {
    width: 15px;
    height: 15px;
}

.client-empty-state {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 42px 16px;
    color: #64717c;
}

.client-empty-state strong {
    color: #2b3d43;
    font-size: 1rem;
}

.clients-workspace.is-loading .client-directory-panel {
    cursor: progress;
}

.clients-workspace.is-loading .client-directory-table-shell {
    opacity: 0.72;
}

.client-usage-strip {
    display: grid;
    grid-template-columns: minmax(210px, auto) minmax(180px, 1fr);
    align-items: center;
    gap: 18px;
    margin-top: 14px;
    padding: 13px 16px;
    border: 1px solid #e7ddef;
    border-radius: 8px;
    background: #fcfaff;
}

.client-usage-strip strong,
.client-usage-strip span {
    display: block;
}

.client-usage-strip strong {
    color: #223238;
}

.client-usage-strip span {
    margin-top: 2px;
    color: #64717c;
    font-size: 0.78rem;
    font-weight: 800;
}

.client-usage-strip .progress > span {
    background: linear-gradient(90deg, var(--brand), #8f43c4);
}

.client-floating-add-button {
    background: linear-gradient(135deg, var(--brand), #8f43c4);
}

.client-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    justify-content: flex-end;
    background: rgba(31, 18, 42, 0.36);
}

.client-drawer-backdrop[hidden] {
    display: none;
}

.client-create-drawer {
    width: min(680px, calc(100vw - 32px));
    height: 100%;
    overflow: hidden;
    border-left: 1px solid #d8cfe3;
    background: #fff;
    box-shadow: -22px 0 50px rgba(35, 24, 45, 0.24);
}

.client-create-form {
    height: 100%;
    overflow: auto;
    display: grid;
    align-content: start;
    gap: 15px;
    padding: 22px;
}

.client-drawer-header {
    position: sticky;
    top: -22px;
    z-index: 2;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    margin: -22px -22px 0;
    padding: 20px 22px 16px;
    border-bottom: 1px solid #e8eef0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
}

.client-drawer-header span {
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.client-drawer-header h2 {
    margin: 2px 0 0;
    color: #223238;
    font-size: 1.18rem;
}

.client-fieldset {
    min-width: 0;
    margin: 0;
    padding: 14px;
    border: 1px solid #eadff2;
    border-radius: 8px;
    background: #fcfaff;
}

.client-fieldset legend {
    padding: 0 6px;
    color: #223238;
    font-size: 0.84rem;
    font-weight: 900;
}

.client-consent-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

.client-drawer-actions {
    position: sticky;
    bottom: -22px;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 -22px -22px;
    padding: 14px 22px;
    border-top: 1px solid #e8eef0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
}

.client-record-workspace {
    display: grid;
    gap: 14px;
    padding-bottom: 24px;
}

.client-record-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid #e4d8ef;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #fcf8ff 54%, #f3ecff 100%);
    box-shadow: 0 12px 28px rgba(44, 24, 64, 0.08);
}

.client-record-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.client-record-avatar {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    border: 1px solid #d4bdea;
    border-radius: 50%;
    background: #f0e7ff;
    color: var(--brand);
    font-size: 1rem;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(75, 0, 130, 0.08);
}

.client-record-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.client-record-hero h2 {
    margin: 0;
    color: #2f2140;
    font-size: 1.55rem;
    line-height: 1.05;
}

.client-record-contact-line,
.client-record-badges,
.client-record-actions,
.client-chip-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.client-record-contact-line {
    margin-top: 7px;
    color: #63717b;
    font-size: 0.86rem;
    font-weight: 800;
}

.client-record-contact-line a,
.client-record-contact-line span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.client-record-contact-line .ui-icon {
    width: 15px;
    height: 15px;
    color: var(--brand);
}

.client-record-badges {
    margin-top: 10px;
}

.client-record-badge,
.client-record-tag,
.client-consent-chip,
.client-table-status-pill {
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2d8eb;
    border-radius: 999px;
    padding: 4px 9px;
    background: #fff;
    color: #3f314b;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: capitalize;
}

.client-record-badge.is-active,
.client-consent-chip.is-active {
    border-color: #d4bdea;
    background: #f0e7ff;
    color: var(--brand);
}

.client-record-badge.is-muted,
.client-consent-chip.is-muted {
    background: #fbfafc;
    color: #67727c;
}

.client-record-tag {
    background: #fff;
    color: #463552;
}

.client-record-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.client-record-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.client-record-metric {
    min-width: 0;
    padding: 14px 15px;
    border: 1px solid #e6dcef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(44, 24, 64, 0.05);
}

.client-record-metric span,
.client-care-summary span,
.client-key-value-list span {
    display: block;
    color: #6d5d78;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.client-record-metric strong {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: #2f2140;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-record-metric small {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-record-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr) minmax(300px, 0.8fr);
    gap: 14px;
    align-items: start;
}

.client-record-workflows,
.client-record-split,
.client-record-library {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.client-record-library {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.client-record-panel {
    min-width: 0;
    padding: 16px;
    border: 1px solid #eadff2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(44, 24, 64, 0.06);
}

.client-record-panel-large {
    min-height: 100%;
}

.client-record-panel h3,
.client-record-panel-heading h3 {
    margin: 0;
    color: #2f2140;
    font-size: 1rem;
}

.client-record-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

.client-record-panel-heading span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.client-care-summary,
.client-key-value-list,
.client-mini-list {
    display: grid;
    gap: 0;
}

.client-care-summary > div,
.client-key-value-list > div,
.client-mini-list > div,
.client-timeline-item {
    display: grid;
    gap: 4px;
    padding: 11px 0;
    border-bottom: 1px solid #efe7f5;
}

.client-care-summary > div:first-child,
.client-key-value-list > div:first-child,
.client-mini-list > div:first-child {
    padding-top: 0;
}

.client-care-summary > div:last-child,
.client-key-value-list > div:last-child,
.client-mini-list > div:last-child,
.client-timeline-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.client-care-summary p {
    margin: 0;
    color: #31414a;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.35;
}

.client-record-note,
.client-empty-compact {
    margin-top: 12px;
    border: 1px dashed #d8cfe3;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fbf7ff;
    color: #62556f;
    font-size: 0.84rem;
    font-weight: 800;
}

.client-empty-compact {
    margin-top: 0;
}

.client-appointment-card {
    display: grid;
    gap: 3px;
    padding: 12px 0;
    border-top: 1px solid #efe7f5;
    border-bottom: 1px solid #efe7f5;
}

.client-appointment-card strong,
.client-appointment-card span,
.client-appointment-card small,
.client-mini-list strong,
.client-mini-list span,
.client-key-value-list strong {
    display: block;
}

.client-appointment-card strong,
.client-mini-list strong,
.client-key-value-list strong {
    color: #2f3d45;
    font-size: 0.9rem;
}

.client-appointment-card span,
.client-mini-list span,
.client-appointment-card small {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.client-key-value-list > div {
    grid-template-columns: minmax(100px, 0.7fr) minmax(0, 1fr);
    align-items: center;
}

.client-chip-row {
    margin-top: 12px;
}

.client-record-form {
    display: grid;
    gap: 12px;
}

.client-record-form textarea {
    min-height: 92px;
}

.client-record-form .btn {
    justify-self: end;
}

.client-inline-check {
    align-self: end;
}

.client-record-table-wrap {
    min-width: 0;
    overflow-x: auto;
}

.client-record-table th,
.client-record-table td {
    padding: 10px 9px;
}

.client-record-table tbody tr:hover td {
    background: #fbf7ff;
}

.client-table-status-pill {
    min-height: 23px;
    padding: 3px 8px;
    background: #fbf8fe;
    color: #4a3b55;
    white-space: nowrap;
}

.client-record-timeline {
    display: grid;
}

.client-timeline-item {
    grid-template-columns: 128px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
}

.client-timeline-item > span {
    color: #6d5d78;
    font-size: 0.78rem;
    font-weight: 900;
}

.client-timeline-item strong,
.client-timeline-item p {
    display: block;
}

.client-timeline-item strong {
    color: #26323a;
}

.client-timeline-item p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.client-record-workspace {
    display: grid;
    gap: 12px;
    padding-bottom: 28px;
}

.client-record-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    min-width: 0;
    padding: 20px 22px;
    border: 1px solid #dfd1ec;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #fbf8ff 52%, #f3ebff 100%);
    box-shadow: 0 12px 28px rgba(55, 30, 80, 0.08);
}

.client-record-banner-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.client-record-identity {
    min-width: 0;
    display: block;
}

.client-record-avatar {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    display: grid;
    place-items: center;
    border: 1px solid #cfb6e8;
    border-radius: 50%;
    background: #eee3ff;
    color: var(--brand);
    font-size: 1rem;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(95, 22, 150, 0.1);
}

.client-record-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.client-record-banner h2 {
    margin: 0;
    color: #2f2140;
    font-size: 1.62rem;
    line-height: 1.05;
}

.client-record-contact-line,
.client-record-badges,
.client-record-banner-actions,
.client-chip-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.client-record-contact-line {
    margin-top: 7px;
    color: #63717b;
    font-size: 0.86rem;
    font-weight: 800;
}

.client-record-contact-line a,
.client-record-contact-line span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.client-record-contact-line .ui-icon {
    width: 15px;
    height: 15px;
    color: var(--brand);
}

.client-record-badges {
    margin-top: 10px;
}

.client-record-badge,
.client-record-tag,
.client-consent-chip,
.client-table-status-pill {
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2d8eb;
    border-radius: 999px;
    padding: 4px 9px;
    background: #fff;
    color: #3f314b;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: capitalize;
}

.client-record-badge.is-active,
.client-consent-chip.is-active {
    border-color: #caaee8;
    background: #f0e7ff;
    color: var(--brand);
}

.client-record-badge.is-muted,
.client-consent-chip.is-muted {
    background: #fbfafc;
    color: #67727c;
}

.client-record-tag {
    background: #fff;
    color: #463552;
}

.client-record-banner-actions {
    justify-content: flex-end;
}

.client-record-subnav {
    position: sticky;
    top: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 54px;
    padding: 8px 10px 8px 16px;
    border: 1px solid #e3d7ee;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 20px rgba(55, 30, 80, 0.07);
    backdrop-filter: blur(12px);
}

.client-record-subnav-label {
    flex: 0 0 auto;
    color: #6e5d7b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.client-record-subnav-links {
    min-width: 0;
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.client-record-tab,
.client-record-subnav-links a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8c5ea;
    border-radius: 8px;
    padding: 0 14px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(55, 30, 80, 0.06);
    color: #3d2b4e;
    font-size: 0.8rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.client-record-tab:hover,
.client-record-tab:focus-visible,
.client-record-subnav-links a:hover,
.client-record-subnav-links a:focus-visible {
    border-color: #b88add;
    background: #f4ecff;
    color: var(--brand);
    box-shadow: 0 5px 14px rgba(75, 0, 130, 0.12);
}

.client-record-tab.is-active,
.client-record-subnav-links a.is-active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
    box-shadow: 0 8px 18px rgba(75, 0, 130, 0.22);
}

.client-record-tab.is-active:focus-visible,
.client-record-subnav-links a.is-active:focus-visible {
    outline: 2px solid #cfb6e8;
    outline-offset: 2px;
}

.client-record-section {
    min-width: 0;
    overflow: hidden;
    scroll-margin-top: 72px;
    border: 1px solid #e5d9ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(55, 30, 80, 0.055);
}

.client-record-section[hidden] {
    display: none !important;
}

.client-record-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border-bottom: 1px solid #eee4f5;
    background: #fff;
}

.client-record-section-header span {
    display: block;
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.client-record-section-header h3,
.client-record-block h4,
.client-record-form-header h4 {
    margin: 2px 0 0;
    color: #2f2140;
    font-size: 1rem;
}

.client-record-section-header p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: right;
}

.client-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: #fcfaff;
    border-bottom: 1px solid #eee4f5;
}

.client-summary-item {
    min-width: 0;
    padding: 14px 18px;
    border-left: 1px solid #eee4f5;
}

.client-summary-item:first-child {
    border-left: 0;
}

.client-summary-item span,
.client-data-rows span,
.client-mini-table span {
    display: block;
    color: #6d5d78;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.client-summary-item strong {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: #2f2140;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-summary-item small {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-overview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
}

.client-record-side {
    display: grid;
    grid-template-rows: auto 1fr;
    border-left: 1px solid #eee4f5;
}

.client-record-block {
    min-width: 0;
    padding: 18px;
}

.client-record-side .client-record-block + .client-record-block,
.client-library-layout .client-record-block.is-wide {
    border-top: 1px solid #eee4f5;
}

.client-record-block h4,
.client-record-form-header h4 {
    font-size: 0.95rem;
}

.client-record-block p,
.client-record-form-header span {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.81rem;
    font-weight: 800;
    line-height: 1.35;
}

.client-data-rows {
    display: grid;
    gap: 0;
    margin-top: 13px;
}

.client-data-rows > div,
.client-mini-table > div {
    display: grid;
    grid-template-columns: minmax(128px, 0.34fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid #f0e8f6;
}

.client-data-rows > div:first-child,
.client-mini-table > div:first-child {
    padding-top: 0;
}

.client-data-rows > div:last-child,
.client-mini-table > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.client-data-rows strong,
.client-mini-table strong {
    min-width: 0;
    color: #31414a;
    font-size: 0.88rem;
    font-weight: 850;
    line-height: 1.35;
}

.client-data-rows.is-compact > div {
    grid-template-columns: 112px minmax(0, 1fr);
}

.client-record-note,
.client-empty-compact {
    margin-top: 12px;
    border: 1px dashed #d8cfe3;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fbf7ff;
    color: #62556f;
    font-size: 0.84rem;
    font-weight: 800;
}

.client-empty-compact {
    display: inline-flex;
    margin-top: 0;
}

.client-visit-focus {
    display: grid;
    gap: 3px;
    margin-top: 13px;
    padding: 13px 14px;
    border: 1px solid #e3d7ee;
    border-radius: 8px;
    background: #fbf8ff;
}

.client-visit-focus strong,
.client-visit-focus span,
.client-visit-focus small {
    display: block;
}

.client-visit-focus strong {
    color: #2f2140;
    font-size: 0.95rem;
}

.client-visit-focus span,
.client-visit-focus small {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.client-mini-table {
    display: grid;
    margin-top: 13px;
}

.client-record-table-wrap {
    min-width: 0;
    overflow-x: auto;
}

.client-record-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.client-record-table th,
.client-record-table td {
    padding: 12px 18px;
    border-bottom: 1px solid #efe7f5;
    text-align: left;
    vertical-align: middle;
}

.client-record-table th {
    background: #fbf8ff;
    color: #6d5d78;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.client-record-table td {
    color: #31414a;
    font-size: 0.86rem;
    font-weight: 780;
}

.client-record-table td strong,
.client-record-table td span {
    display: block;
}

.client-record-table td span:not(.client-table-status-pill) {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.client-record-table tbody tr:last-child td {
    border-bottom: 0;
}

.client-record-table tbody tr:hover td {
    background: #fcf9ff;
}

.client-table-status-pill {
    min-height: 23px;
    width: max-content;
    padding: 3px 8px;
    background: #fbf8fe;
    color: #4a3b55;
    white-space: nowrap;
}

.client-library-layout,
.client-settings-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-library-layout .client-record-block,
.client-settings-layout .client-record-form {
    border-left: 1px solid #eee4f5;
}

.client-library-layout .client-record-block:first-child,
.client-settings-layout .client-record-form:first-child {
    border-left: 0;
}

.client-library-layout .client-record-block.is-wide {
    grid-column: 1 / -1;
    border-left: 0;
}

.client-library-layout .client-record-table {
    margin-top: 13px;
}

.client-record-form {
    min-width: 0;
    display: grid;
    gap: 13px;
    padding: 18px;
}

.client-record-form textarea {
    min-height: 104px;
}

.client-record-form .btn {
    justify-self: end;
}

.client-record-form-header {
    min-width: 0;
}

.client-inline-check {
    align-self: end;
}

.client-record-workspace {
    --client-record-panel-height: clamp(380px, calc(100vh - 372px), 680px);
}

.client-record-section {
    display: flex;
    flex-direction: column;
}

.client-record-section.is-active {
    max-height: var(--client-record-panel-height);
}

.client-record-section-header,
.client-summary-strip {
    flex: 0 0 auto;
}

.client-overview-layout,
.client-contact-layout,
.client-visits-layout,
.client-library-layout,
.client-payment-layout,
.client-preferences-layout {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.client-contact-layout,
.client-payment-layout,
.client-preferences-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-contact-layout .client-record-block,
.client-payment-layout .client-record-block,
.client-preferences-layout .client-record-block {
    min-height: 0;
    overflow: auto;
    border-left: 1px solid #eee4f5;
}

.client-contact-layout .client-record-block:first-child,
.client-payment-layout .client-record-block:first-child,
.client-preferences-layout .client-record-block:first-child {
    border-left: 0;
}

.client-contact-layout .client-record-block.is-wide {
    grid-column: 1 / -1;
    border-top: 1px solid #eee4f5;
    border-left: 0;
}

.client-overview-layout .client-record-block,
.client-record-side,
.client-library-layout .client-record-block {
    min-height: 0;
    overflow: auto;
}

.client-visits-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.client-visits-layout.has-flyout {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.client-visits-list {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    padding: 12px;
}

.client-visit-accordion {
    border: 1px solid #eadff2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(55, 30, 80, 0.04);
}

.client-visit-accordion + .client-visit-accordion {
    margin-top: 8px;
}

.client-visit-accordion summary {
    min-height: 54px;
    display: grid;
    grid-template-columns: minmax(190px, 0.55fr) minmax(230px, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 9px 14px;
    color: #2f2140;
    cursor: pointer;
    list-style: none;
}

.client-visit-accordion summary::-webkit-details-marker {
    display: none;
}

.client-visit-accordion summary strong,
.client-visit-accordion summary small {
    display: inline;
}

.client-visit-accordion summary small {
    margin-top: 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.client-visit-date,
.client-visit-service {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}

.client-visit-service strong {
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-visit-counts {
    display: inline-flex;
    justify-content: flex-end;
    gap: 6px;
}

.client-visit-counts b {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddcfeb;
    border-radius: 999px;
    padding: 3px 9px;
    background: #fbf8ff;
    color: #4b3860;
    font-size: 0.74rem;
    font-weight: 900;
    white-space: nowrap;
}

.client-visit-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 0 14px 14px;
    border-top: 1px solid #f0e8f6;
}

.client-visit-note-list {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding-top: 12px;
}

.client-visit-note-list article {
    display: grid;
    gap: 7px;
    border: 1px solid #eee4f5;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fcfaff;
}

.client-visit-note-list article strong,
.client-visit-note-list article span {
    display: block;
}

.client-visit-note-list article span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.client-visit-note-list article p {
    margin: 0;
    color: #31414a;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.42;
}

.client-visit-actions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding-top: 12px;
}

.client-body-chart-flyout {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    border-left: 1px solid #eee4f5;
    background: #fbf8ff;
}

.client-body-chart-heading {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 15px;
    border-bottom: 1px solid #eadff2;
    background: rgba(251, 248, 255, 0.96);
    backdrop-filter: blur(10px);
}

.client-body-chart-heading h4 {
    margin: 0;
    color: #2f2140;
    font-size: 0.95rem;
}

.client-body-chart-heading span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.client-body-chart-content {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.client-body-chart-mark {
    display: grid;
    gap: 5px;
    border: 1px solid #e3d7ee;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.client-body-chart-mark strong,
.client-body-chart-mark span {
    display: block;
}

.client-body-chart-mark span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: capitalize;
}

.client-body-chart-mark p {
    margin: 0;
    color: #31414a;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.4;
}

.client-payment-layout {
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
}

.client-payment-stack {
    min-height: 0;
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    border-right: 1px solid #eee4f5;
}

.client-payment-stack .client-record-block {
    border-left: 0;
    border-bottom: 1px solid #eee4f5;
}

.client-payment-stack .client-record-block:last-child {
    border-bottom: 0;
}

.client-payment-focus {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.client-payment-focus span {
    color: #6d5d78;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.client-payment-focus strong {
    color: #2f2140;
    font-size: 1.25rem;
}

.client-payment-focus .btn {
    justify-self: start;
}

.client-payment-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    flex: 0 0 auto;
    border-bottom: 1px solid #eee4f5;
    background: #fcfaff;
}

.client-payment-summary-strip > div {
    min-width: 0;
    padding: 14px 18px;
    border-left: 1px solid #eee4f5;
}

.client-payment-summary-strip > div:first-child {
    border-left: 0;
}

.client-payment-summary-strip span,
.client-payment-summary-strip small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-payment-summary-strip span {
    color: #6d5d78;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.client-payment-summary-strip strong {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: #2f2140;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-payment-summary-strip small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.client-payment-ledger-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eee4f5;
}

.client-payment-ledger-grid h4 {
    margin-bottom: 8px;
}

.client-financial-row {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0e8f6;
}

.client-financial-row:last-child {
    border-bottom: 0;
}

.client-financial-row strong,
.client-financial-row span:not(.client-table-status-pill) {
    display: block;
}

.client-financial-row strong {
    color: #2f2140;
    font-size: 0.88rem;
}

.client-financial-row span:not(.client-table-status-pill) {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.client-preferences-form {
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.client-preferences-layout {
    grid-template-columns: minmax(0, 1fr);
}

.client-preferences-layout .client-record-block {
    min-height: 0;
    overflow: auto;
}

.client-preferences-form:not(.is-editing) textarea {
    border-color: transparent;
    background: #fbfcfc;
    box-shadow: none;
    color: #2f3a40;
    resize: none;
}

.client-preferences-form:not(.is-editing) textarea:focus {
    outline: none;
    border-color: transparent;
    box-shadow: none;
}

.client-care-edit-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.client-record-badge.is-preference {
    border-color: #d8cfe3;
    background: #fff;
    color: #4d3d5d;
}

.client-overview-status-form {
    gap: 12px;
}

.client-app-access-toggle {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #e1e5e8;
    border-radius: 8px;
    padding: 9px 11px;
    background: #f8f9fa;
    color: #66747c;
    font-weight: 900;
}

.client-app-access-toggle.is-on {
    border-color: #d3b9ea;
    background: #f4ecff;
    color: var(--brand);
}

.client-app-access-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.client-contact-note {
    margin: 14px 0 0;
    color: #6d5d78;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.4;
}

.client-record-controls {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.client-preferences-actions {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #eee4f5;
    padding: 12px 18px;
    background: #fff;
}

.client-record-tab {
    flex: 0 0 auto;
}

.service-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(31, 18, 42, 0.42);
}

.service-modal-backdrop[hidden] {
    display: none;
}

.service-modal {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border: 1px solid #d8cfe3;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-strong);
}

.form-builder-modal {
    width: min(820px, 100%);
}

.service-modal-form {
    max-height: calc(100vh - 48px);
    overflow: auto;
    display: grid;
    gap: 18px;
    padding: 20px;
}

.service-modal-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    padding-right: 54px;
}

.service-modal-header span {
    color: var(--brand);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.service-modal-header h2 {
    margin: 2px 0 0;
    color: #2f2140;
    font-size: 1.18rem;
}

.service-fieldset {
    min-width: 0;
    margin: 0;
    padding: 14px;
    border: 1px solid #eadff2;
    border-radius: 8px;
}

.service-fieldset legend {
    padding: 0 6px;
    color: #2f2140;
    font-size: 0.86rem;
    font-weight: 900;
}

.form-fields-fieldset {
    background: #fbfafc;
}

.clinical-note-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e6edf2;
    border-radius: 8px;
    background: #fbfdfe;
}

.clinical-note-summary strong,
.clinical-note-summary span {
    display: block;
}

.clinical-note-summary strong {
    color: #26323a;
    font-size: 0.98rem;
}

.clinical-note-summary span {
    max-width: 480px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.form-field-builder-list {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.form-field-builder-row {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e8dfef;
    border-radius: 8px;
    background: #fff;
}

.form-field-builder-main {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(160px, 0.8fr) auto auto 36px;
    align-items: end;
    gap: 10px;
}

.share-client-line {
    display: none;
}

.service-modal-form.is-note-form .form-fields-fieldset {
    background: #fff;
}

.service-modal-form.is-note-form .form-field-builder-main {
    grid-template-columns: minmax(260px, 1fr) 160px auto 36px;
}

.service-modal-form.is-note-form .form-field-builder-row .required-line {
    display: none;
}

.service-modal-form.is-note-form .form-field-builder-row .share-client-line {
    display: flex;
}

.service-modal-form.is-note-form .form-field-builder-row {
    padding: 10px;
}

.form-field-builder-row textarea {
    min-height: 38px;
    resize: vertical;
}

.form-field-builder-row .calendar-icon-btn {
    align-self: end;
}

.form-field-builder-row .checkbox-line {
    align-self: center;
    min-height: 38px;
    color: #3a3142;
    font-size: 0.78rem;
    font-weight: 900;
}

.form-field-choices[hidden] {
    display: none;
}

.form-field-choices textarea {
    min-height: 58px;
}

.form-static-value {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #e4dae9;
    border-radius: 8px;
    background: #fbfafc;
    color: #3a2b48;
    font-size: 0.86rem;
    font-weight: 900;
}

.form-static-value .ui-icon {
    width: 16px;
    height: 16px;
    color: var(--brand);
}

.soap-body-chart-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #dce8ee;
    border-radius: 8px;
    background: #fbfdfe;
}

.soap-body-chart-field.is-disabled {
    background: #f7f8fa;
    color: #7a8791;
}

.soap-body-chart-field.is-disabled .btn {
    cursor: not-allowed;
    opacity: 0.65;
}

.soap-body-chart-field strong,
.soap-body-chart-field span {
    display: block;
}

.soap-body-chart-field strong {
    color: #26323a;
    font-size: 0.9rem;
}

.soap-body-chart-field span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.form-advanced-settings {
    padding: 12px 14px;
    border: 1px solid #eadff2;
    border-radius: 8px;
    background: #fff;
}

.form-advanced-settings summary {
    cursor: pointer;
    color: #3a2b48;
    font-size: 0.86rem;
    font-weight: 900;
}

.form-advanced-settings .form-grid {
    margin-top: 12px;
}

.service-color-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.service-color-choice {
    min-width: 0;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid #e4dae9;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.service-color-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.service-color-choice span {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--service-color);
    box-shadow: 0 0 0 1px rgba(38, 50, 56, 0.18);
}

.service-color-choice strong {
    min-width: 0;
    overflow: hidden;
    color: #2f2140;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-color-choice:has(input:checked) {
    border-color: #cdb8ef;
    background: #f8f1ff;
    box-shadow: inset 0 0 0 1px rgba(75, 0, 130, 0.08);
}

.service-form-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.service-form-option {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px;
    border: 1px solid #e4dae9;
    border-radius: 8px;
    background: #fff;
}

.service-form-option span,
.service-form-option strong,
.service-form-option small {
    display: block;
    min-width: 0;
}

.service-form-option strong {
    color: #26323a;
    font-size: 0.84rem;
}

.service-form-option small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: capitalize;
}

.service-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border: 1px solid #cdb8ef;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 900;
    overflow: hidden;
    flex: 0 0 38px;
}

.auth-page,
.portal-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background: #f3f2f5;
}

.auth-card,
.portal-card {
    width: min(520px, 100%);
    border: 1px solid var(--brand-frame-line);
    border-radius: 10px;
    padding: 33px;
    background: #fff;
    box-shadow: 0 0 0 5px var(--brand-frame), 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1050px) {
    .clients-page-header,
    .client-directory-toolbar,
    .client-usage-strip {
        display: grid;
        grid-template-columns: 1fr;
    }

    .client-page-metrics {
        min-width: 0;
        border-top: 1px solid rgba(95, 22, 150, 0.16);
        border-left: 0;
    }

    .client-search-form {
        width: 100%;
    }

    .client-record-hero,
    .client-record-grid,
    .client-record-workflows,
    .client-record-split,
    .client-record-library {
        grid-template-columns: 1fr;
    }

    .client-record-hero {
        display: grid;
    }

    .client-record-actions {
        justify-content: flex-start;
    }

    .client-record-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid.four,
    .grid.three,
    .grid.two,
    .financial-metric-grid,
    .financial-pos-summary,
    .soap-documentation-workspace,
    .body-chart-workspace,
    .pos-terminal-grid,
    .pos-register-grid,
    .pos-product-tools,
    .pos-inventory-toolbar,
    .pos-settings-grid,
    .form-grid,
    .form-grid.three {
        grid-template-columns: 1fr;
    }

    .form-field-builder-main,
    .service-modal-form.is-note-form .form-field-builder-main {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .resource-create-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resource-create-form .btn {
        justify-content: center;
    }

    .clinical-note-summary,
    .soap-body-chart-field {
        align-items: stretch;
        flex-direction: column;
    }

    .body-chart-appointment-context {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .soap-visit-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .appointment-payment-picker,
    .client-payment-summary-strip,
    .client-payment-ledger-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .body-map-stage {
        padding-inline: 108px;
    }

    .top-nav-list {
        scrollbar-width: thin;
    }
}

@media (max-width: 760px) {
    .clients-workspace {
        padding-bottom: 82px;
    }

    .client-page-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .client-page-metrics div:nth-child(odd) {
        border-left: 0;
    }

    .client-directory-toolbar,
    .client-filter-bar {
        align-items: stretch;
    }

    .client-search-form,
    .client-consent-grid {
        grid-template-columns: 1fr;
    }

    .financial-metric-grid,
    .financial-pos-summary,
    .appointment-payment-picker,
    .appointment-payment-action-card,
    .client-payment-summary-strip,
    .client-payment-ledger-grid,
    .pos-payment-methods,
    .pos-product-grid,
    .pos-settings-check-grid {
        grid-template-columns: 1fr;
    }

    .pos-register-cart {
        position: static;
    }

    .pos-cart-line {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .pos-product-edit-row summary,
    .pos-product-editor-actions,
    .pos-settings-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .pos-inventory-row-panel {
        width: min(680px, calc(100vw - 52px));
    }

    .client-search-submit {
        width: 100%;
    }

    .client-filter-group,
    .client-tag-filter,
    .client-tag-filter select,
    .client-filter-reset {
        width: 100%;
    }

    .client-filter-pill {
        flex: 1;
        padding: 0 8px;
    }

    .client-directory-table-shell {
        max-height: none;
    }

    .client-record-identity {
        align-items: flex-start;
    }

    .client-record-avatar {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .client-record-metrics {
        grid-template-columns: 1fr;
    }

    .client-record-actions .btn {
        flex: 1;
    }

    .client-key-value-list > div,
    .client-timeline-item {
        grid-template-columns: 1fr;
    }

    .client-record-form .btn {
        width: 100%;
        justify-self: stretch;
    }

    .appointment-payment-action-card .btn {
        width: 100%;
        justify-content: center;
    }

    .client-create-drawer {
        width: 100%;
    }

    .client-create-form {
        padding: 18px;
    }

    .client-drawer-header {
        top: -18px;
        margin: -18px -18px 0;
        padding: 18px;
    }

    .client-drawer-actions {
        bottom: -18px;
        margin: 0 -18px -18px;
        padding: 12px 18px;
    }

    .sidebar {
        position: static;
        width: 100%;
        min-height: 0;
        white-space: normal;
    }

    .sidebar::after {
        display: none;
    }

    .sidebar:hover,
    .sidebar:focus-within {
        width: 100%;
    }

    .sidebar-logo {
        justify-content: flex-start;
        min-height: 58px;
        padding: 10px 14px;
    }

    .logo-collapsed {
        opacity: 1;
    }

    .logo-expanded {
        position: static;
        transform: none;
        margin-left: 10px;
        opacity: 1;
        visibility: visible;
    }

    .logo-expanded-mark {
        display: none;
    }

    .nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 8px 10px;
    }

    .button-text {
        opacity: 1;
        visibility: visible;
    }

    .main,
    .sidebar:hover ~ .main,
    .sidebar:focus-within ~ .main {
        margin-left: 0;
        padding-top: 0;
    }

    .topbar {
        position: sticky;
        left: 0;
        top: 0;
    }

    .sidebar:hover ~ .main .topbar,
    .sidebar:focus-within ~ .main .topbar {
        left: 0;
    }

    .content {
        padding: 12px;
    }

    .content-surface {
        padding: 12px;
    }

    .page-header {
        display: grid;
    }

    .page-header-actions {
        justify-content: flex-start;
    }

    .resource-create-form,
    .resource-library-toolbar,
    .resource-search-form {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .calendar-toolbar {
        align-items: stretch;
    }

    .calendar-view-switch,
    .calendar-nav {
        width: 100%;
    }

    .calendar-view-option,
    .calendar-today-btn {
        flex: 1;
        justify-content: center;
    }

    .calendar-toolbar-title {
        width: 100%;
        justify-items: start;
    }

    .calendar-shell {
        overflow-x: auto;
    }

    .calendar-weekdays,
    .calendar-grid {
        min-width: 760px;
    }

    .calendar-day {
        min-height: 136px;
    }

    .body-map-stage {
        min-height: 680px;
        padding-inline: 12px;
    }

    .body-chart-appointment-context {
        grid-template-columns: 1fr;
    }

    .soap-visit-summary {
        grid-template-columns: 1fr;
    }

    .body-chart-picker-heading,
    .body-chart-appointment-card {
        align-items: stretch;
        flex-direction: column;
    }

    .body-chart-appointment-card > div:last-child {
        justify-content: flex-start;
    }

    .body-map-canvas {
        width: min(360px, 100%);
        height: 620px;
        min-height: 560px;
    }

    .body-callout {
        width: 164px;
    }

    .body-callout.is-right,
    .body-callout.is-left {
        transform: translate(-50%, calc(-100% - 14px));
    }

    .body-callout-pin {
        display: none;
    }
}

@media (max-width: 520px) {
    .nav {
        grid-template-columns: 1fr;
    }

    .top-nav-title {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .profile-dropdown {
        right: -8px;
        min-width: 230px;
    }

    .payment-method-cards {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 1050px) {
    .client-record-banner,
    .client-overview-layout,
    .client-library-layout,
    .client-settings-layout {
        grid-template-columns: 1fr;
    }

    .client-record-banner-actions {
        justify-content: flex-start;
    }

    .client-record-side,
    .client-library-layout .client-record-block,
    .client-settings-layout .client-record-form {
        border-left: 0;
        border-top: 1px solid #eee4f5;
    }

    .client-library-layout .client-record-block:first-child,
    .client-settings-layout .client-record-form:first-child {
        border-top: 0;
    }

    .client-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .client-summary-item:nth-child(odd) {
        border-left: 0;
    }
}

@media (max-width: 760px) {
    .client-record-banner-main {
        align-items: flex-start;
    }

    .client-record-banner-actions,
    .client-record-subnav {
        align-items: stretch;
    }

    .client-record-banner-actions .btn {
        flex: 1;
    }

    .client-record-subnav {
        position: static;
        display: grid;
    }

    .client-record-subnav-links {
        margin-left: 0;
        justify-content: flex-start;
    }

    .client-record-subnav-links a {
        flex: 0 0 auto;
    }

    .client-record-section-header {
        display: grid;
    }

    .client-record-section-header p {
        max-width: none;
        text-align: left;
    }

    .client-summary-strip {
        grid-template-columns: 1fr;
    }

    .client-summary-item {
        border-left: 0;
        border-top: 1px solid #eee4f5;
    }

    .client-summary-item:first-child {
        border-top: 0;
    }

    .client-data-rows > div,
    .client-mini-table > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .client-record-table th,
    .client-record-table td {
        padding: 10px 12px;
    }

    .client-record-form .btn {
        width: 100%;
        justify-self: stretch;
    }
}

@media (max-width: 1050px) {
    .client-contact-layout,
    .client-payment-layout,
    .client-preferences-layout,
    .client-visits-layout.has-flyout {
        grid-template-columns: 1fr;
    }

    .client-contact-layout .client-record-block,
    .client-payment-layout .client-record-block,
    .client-preferences-layout .client-record-block,
    .client-payment-stack,
    .client-body-chart-flyout {
        border-left: 0;
    }

    .client-contact-layout .client-record-block,
    .client-payment-layout .client-record-block,
    .client-preferences-layout .client-record-block,
    .client-body-chart-flyout {
        border-top: 1px solid #eee4f5;
    }

    .client-contact-layout .client-record-block:first-child,
    .client-payment-layout .client-record-block:first-child,
    .client-preferences-layout .client-record-block:first-child {
        border-top: 0;
    }
}

@media (max-width: 760px) {
    .client-record-workspace {
        --client-record-panel-height: auto;
    }

    .client-record-section.is-active {
        max-height: none;
    }

    .client-visit-accordion summary,
    .client-visit-detail {
        grid-template-columns: 1fr;
    }

    .client-visit-date,
    .client-visit-service {
        flex-wrap: wrap;
        white-space: normal;
    }

    .client-visit-actions {
        flex-wrap: wrap;
    }

    .client-visit-actions .btn {
        flex: 1;
    }

    .client-payment-stack {
        grid-template-rows: auto;
    }
}

/* Client redesign: compact directory and single-panel record workspace. */
.content:has(.clients-workspace) {
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
    padding: 12px 18px;
}

.content-frame:has(.clients-workspace),
.content-surface:has(.clients-workspace) {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.content-surface:has(.clients-workspace) {
    padding: 14px;
}

.clients-workspace {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    overflow: hidden;
    padding-bottom: 0;
}

.clients-workspace .clients-page-header {
    margin-bottom: 0;
}

.clients-workspace .client-directory-panel {
    height: 100%;
    min-height: 0;
    align-self: stretch;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
}

.clients-workspace .client-directory-table-shell {
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow: auto;
}

.client-directory-table-redesign thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fbf7ff;
}

.clients-workspace .client-usage-strip {
    display: none;
}

.content:has(.client-record-workspace) {
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
    padding: 12px 18px;
}

.content-frame:has(.client-record-workspace),
.content-surface:has(.client-record-workspace) {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.content-frame:has(.client-record-workspace) {
    margin-bottom: 0;
}

.content-surface:has(.client-record-workspace) {
    padding: 14px;
}

.client-directory-table-redesign {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.client-directory-table-redesign .client-name-column {
    width: 24%;
    min-width: 0;
}

.client-directory-table-redesign .client-contact-column {
    width: 22%;
    min-width: 0;
}

.client-directory-table-redesign .client-care-column {
    width: 30%;
    min-width: 0;
    max-width: none;
}

.client-directory-table-redesign .client-last-column {
    width: 16%;
    min-width: 0;
}

.client-directory-table-redesign th:last-child,
.client-directory-table-redesign td:last-child {
    width: 8%;
    min-width: 0;
}

.client-table-pill {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #d9c4ec;
    border-radius: 999px;
    padding: 3px 9px;
    background: #f3ecff;
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 900;
}

.client-table-pill.is-muted {
    border-color: #dce1e5;
    background: #f7f8f9;
    color: #68747c;
}

.client-care-text {
    margin: 0;
    color: #31414a;
    font-size: 0.84rem;
    font-weight: 780;
    line-height: 1.35;
    white-space: normal;
}

.client-record-workspace {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 0;
}

.client-record-banner {
    min-height: 128px;
    grid-template-columns: minmax(0, 1fr);
    padding: 16px 18px;
    box-shadow: 0 8px 22px rgba(55, 30, 80, 0.06);
}

.client-record-banner-main {
    gap: 16px;
}

.client-record-avatar {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    background: #eee3ff;
}

.client-record-banner h2 {
    font-size: 1.42rem;
}

.client-record-contact-line {
    gap: 10px;
}

.client-record-contact-line a,
.client-record-contact-line span {
    color: #61717a;
    font-size: 0.83rem;
    font-weight: 850;
}

.client-record-subnav {
    position: static;
    min-height: 50px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 7px 10px;
}

.client-record-subnav-label {
    align-self: center;
}

.client-record-subnav-links {
    align-items: center;
}

.client-record-tab {
    min-height: 36px;
    border: 1px solid #d8c5ea;
    border-radius: 8px;
    padding: 0 13px;
    background: #fff;
}

.client-record-tab.is-active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.client-record-section {
    height: 100%;
    max-height: none;
    min-height: 0;
}

.client-record-section.is-active {
    height: 100%;
    max-height: none;
}

.client-record-section-header {
    min-height: 60px;
    align-items: center;
    padding: 13px 16px;
}

.client-record-section-header p {
    display: none;
}

.client-summary-strip {
    min-height: 86px;
}

.client-summary-item {
    padding: 12px 16px;
}

.client-overview-layout,
.client-contact-layout,
.client-visits-layout,
.client-forms-layout,
.client-payment-layout,
.client-preferences-layout {
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.client-overview-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.client-record-block {
    min-height: 0;
    overflow: auto;
    padding: 16px;
}

.client-care-data-rows > div {
    grid-template-columns: minmax(142px, 0.25fr) minmax(0, 1fr);
}

.client-care-data-rows strong,
.client-note-preview p,
.client-form-response-list p,
.client-all-notes-list p {
    white-space: normal;
}

.client-note-preview {
    display: grid;
    gap: 5px;
    margin-top: 12px;
}

.client-note-preview strong,
.client-note-preview span {
    display: block;
}

.client-note-preview span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.client-note-preview p {
    margin: 0;
    color: #31414a;
    font-size: 0.84rem;
    font-weight: 760;
    line-height: 1.42;
}

.client-contact-layout {
    grid-template-columns: minmax(340px, 1.05fr) minmax(360px, 1.1fr) minmax(260px, 0.72fr);
}

.client-contact-layout .client-record-block,
.client-payment-layout .client-record-block,
.client-preferences-layout .client-record-block {
    border-left: 1px solid #eee4f5;
}

.client-contact-layout .client-record-block:nth-child(3n + 1),
.client-payment-layout .client-record-block:first-child,
.client-preferences-layout .client-record-block:first-child {
    border-left: 0;
}

.client-contact-layout .client-record-block.is-wide {
    grid-column: 1 / -1;
    border-top: 1px solid #eee4f5;
    border-left: 0;
}

.client-message-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 14px;
}

.client-message-button {
    min-height: 84px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 5px;
    border: 1px solid #d9c4ec;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    color: var(--brand);
    cursor: pointer;
    font: inherit;
    box-shadow: 0 4px 12px rgba(55, 30, 80, 0.05);
}

.client-message-button[disabled],
.client-message-button[aria-disabled="true"] {
    border-color: #e1e5e8;
    background: #f8f9fa;
    color: #79848b;
    cursor: not-allowed;
    pointer-events: none;
}

.client-message-button .ui-icon {
    width: 20px;
    height: 20px;
}

.client-message-button span {
    font-size: 0.86rem;
    font-weight: 900;
}

.client-message-button small {
    color: #66747c;
    font-size: 0.72rem;
    font-weight: 800;
}

.client-notification-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 14px;
}

.client-notification-grid label {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #e1e5e8;
    border-radius: 8px;
    padding: 8px 10px;
    background: #f8f9fa;
    color: #66747c;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: capitalize;
}

.client-notification-grid label.is-on {
    border-color: #d3b9ea;
    background: #f4ecff;
    color: var(--brand);
}

.client-notification-grid input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.client-notification-grid .ui-icon {
    width: 16px;
    height: 16px;
}

.client-contact-settings-form {
    display: grid;
    align-content: start;
    gap: 12px;
}

.client-contact-settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.client-contact-data-rows {
    margin-top: 4px;
}

.client-thread-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 16px 0 8px;
}

.client-thread-heading h5 {
    margin: 0;
    color: #2f2140;
    font-size: 0.9rem;
}

.client-thread-heading span {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 850;
}

.client-sms-thread-list {
    max-height: min(32vh, 280px);
    display: grid;
    gap: 8px;
    overflow: auto;
    padding-right: 2px;
}

.client-sms-bubble {
    display: grid;
    gap: 5px;
    max-width: 88%;
    border: 1px solid #eadff2;
    border-radius: 8px;
    padding: 9px 10px;
    background: #fff;
}

.client-sms-bubble.is-outbound {
    justify-self: end;
    border-color: var(--brand);
    background: var(--brand);
}

.client-sms-bubble.is-inbound {
    justify-self: start;
    border-color: #e1e5e8;
    background: #f4f5f6;
}

.client-sms-bubble div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.client-sms-bubble strong,
.client-sms-bubble span {
    display: block;
}

.client-sms-bubble strong {
    color: #2f2140;
    font-size: 0.78rem;
}

.client-sms-bubble.is-outbound strong,
.client-sms-bubble.is-outbound span,
.client-sms-bubble.is-outbound p {
    color: #fff;
}

.client-sms-bubble span {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
}

.client-sms-bubble p {
    margin: 0;
    color: #31414a;
    font-size: 0.82rem;
    font-weight: 740;
    line-height: 1.38;
    white-space: pre-wrap;
}

.client-permission-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.client-visits-layout {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
}

.client-visits-list {
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 8px;
    overflow: auto;
    padding: 14px;
}

.client-all-notes-panel {
    border-left: 1px solid #eee4f5;
    padding: 14px;
    background: #fff;
}

.client-all-notes-panel h4 {
    margin: 0 0 12px;
    color: #2f2140;
    font-size: 0.95rem;
}

.client-all-notes-list,
.client-form-response-list {
    display: grid;
    gap: 9px;
}

.client-all-notes-list article,
.client-form-response-list article {
    display: grid;
    gap: 5px;
    border: 1px solid #eadff2;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
}

.client-all-notes-list strong,
.client-all-notes-list span,
.client-form-response-list strong,
.client-form-response-list span {
    display: block;
}

.client-all-notes-list span,
.client-form-response-list span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.client-all-notes-list p,
.client-form-response-list p {
    margin: 0;
    color: #31414a;
    font-size: 0.83rem;
    font-weight: 750;
    line-height: 1.4;
}

.client-visit-accordion {
    border-left-width: 4px;
}

.client-visit-accordion.is-upcoming {
    border-left-color: var(--brand);
    background: #fff;
}

.client-visit-accordion.is-history {
    border-color: #eadff2;
    border-left-color: #cdb8ef;
    background: #fbf8ff;
}

.client-visit-accordion summary {
    min-height: 50px;
    grid-template-columns: minmax(118px, 0.55fr) minmax(132px, 0.62fr) minmax(220px, 1.05fr) minmax(86px, 0.36fr) minmax(150px, 0.72fr) auto 14px;
    gap: 12px;
    padding: 8px 14px 8px 12px;
}

.client-visit-accordion summary::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.client-visit-accordion[open] summary::after {
    transform: rotate(225deg);
}

.client-visit-date,
.client-visit-service {
    display: block;
    overflow: hidden;
    white-space: nowrap;
}

.client-visit-time,
.client-visit-status,
.client-visit-regions {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-visit-regions {
    color: #5b188b;
}

.client-visit-service strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-visit-counts {
    white-space: nowrap;
}

.client-visit-detail {
    grid-template-columns: minmax(0, 1fr) auto;
}

.client-message-overlay,
.client-body-chart-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(32, 24, 39, 0.42);
    backdrop-filter: blur(1px);
}

.client-message-drawer,
.client-body-chart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 91;
    width: min(500px, 92vw);
    height: 100dvh;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    border-left: 1px solid #e3d4ef;
    background: #fff;
    box-shadow: -22px 0 44px rgba(50, 26, 72, 0.18);
}

.client-message-drawer .client-drawer-header,
.client-body-chart-drawer .client-drawer-header {
    position: static;
    top: auto;
    margin: 0;
    padding: 18px 20px 16px;
}

.client-message-drawer {
    grid-template-rows: minmax(0, 1fr);
}

.client-message-drawer-form {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.client-message-drawer-body,
.client-body-chart-drawer-body {
    min-height: 0;
    overflow: auto;
    padding: 16px;
}

.client-message-drawer-body {
    background: #fbfafc;
}

.client-message-drawer .client-drawer-footer {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid #eee4f5;
    background: #fff;
}

.client-message-drawer .client-drawer-footer textarea {
    min-height: 56px;
    max-height: 120px;
    resize: vertical;
}

.client-message-composer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.client-message-count {
    margin-right: auto;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
}

.client-message-chat-list {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
}

.client-message-chat-bubble {
    max-width: 82%;
    display: grid;
    gap: 5px;
    border: 1px solid #e1e5e8;
    border-radius: 14px;
    padding: 10px 12px;
    background: #f4f5f6;
}

.client-message-chat-bubble.is-outbound {
    align-self: flex-end;
    border-color: var(--brand);
    border-bottom-right-radius: 5px;
    background: var(--brand);
    color: #fff;
}

.client-message-chat-bubble.is-inbound {
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.client-message-chat-bubble div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.client-message-chat-bubble strong,
.client-message-chat-bubble span {
    display: block;
    font-size: 0.72rem;
    font-weight: 900;
}

.client-message-chat-bubble span {
    color: #6a7880;
    font-weight: 800;
}

.client-message-chat-bubble.is-outbound span {
    color: rgba(255, 255, 255, 0.78);
}

.client-message-chat-bubble p {
    margin: 0;
    color: #31414a;
    font-size: 0.86rem;
    font-weight: 760;
    line-height: 1.38;
    white-space: pre-wrap;
}

.client-message-chat-bubble.is-outbound p {
    color: #fff;
}

.client-body-chart-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #eee4f5;
    background: #fbfafc;
}

.client-body-chart-switch button {
    min-height: 38px;
    border: 1px solid #d8c5ea;
    border-radius: 8px;
    background: #fff;
    color: #3a2b48;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 900;
}

.client-body-chart-switch button.is-active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.client-body-chart-side-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #eadff2;
    border-radius: 8px;
    padding: 12px;
    background: #fbf7ff;
}

.client-body-chart-side-card strong {
    color: #2f2140;
    font-size: 0.95rem;
}

.client-body-chart-side-card span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.client-body-chart-drawer-body {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    overflow: hidden;
}

.client-body-chart-visual {
    display: grid;
    place-items: center;
    min-height: 0;
    height: 100%;
    border: 1px solid #eadff2;
    border-radius: 8px;
    padding: 16px;
    background:
        linear-gradient(90deg, rgba(251, 247, 255, 0.85), rgba(255, 255, 255, 0.92)),
        #fff;
}

.client-body-chart-figure {
    position: relative;
    width: min(250px, 74%);
    height: 100%;
    min-height: 390px;
    max-height: 620px;
}

.client-body-chart-figure::before,
.client-body-chart-figure::after {
    content: none;
}

.client-body-chart-part {
    position: absolute;
    z-index: 1;
    border: 2px solid #d8c5ea;
    background: #fbf7ff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.client-body-chart-visual[data-body-chart-side="back"] .client-body-chart-part {
    background: #f5effb;
}

.client-body-chart-head {
    top: 0%;
    left: 50%;
    width: 48px;
    height: 10%;
    border-radius: 999px;
    transform: translateX(-50%);
}

.client-body-chart-neck {
    top: 9%;
    left: 50%;
    width: 28px;
    height: 5%;
    border-radius: 10px;
    transform: translateX(-50%);
}

.client-body-chart-torso {
    top: 14%;
    left: 50%;
    width: 96px;
    height: 31%;
    border-radius: 46px 46px 28px 28px;
    transform: translateX(-50%);
}

.client-body-chart-pelvis {
    top: 43%;
    left: 50%;
    width: 98px;
    height: 12%;
    border-radius: 16px 16px 34px 34px;
    transform: translateX(-50%);
}

.client-body-chart-left-upper-arm,
.client-body-chart-right-upper-arm {
    top: 18%;
    width: 32px;
    height: 21%;
    border-radius: 18px;
}

.client-body-chart-left-upper-arm {
    left: 38px;
    transform: rotate(9deg);
}

.client-body-chart-right-upper-arm {
    right: 38px;
    transform: rotate(-9deg);
}

.client-body-chart-left-forearm,
.client-body-chart-right-forearm {
    top: 37%;
    width: 30px;
    height: 23%;
    border-radius: 17px;
}

.client-body-chart-left-forearm {
    left: 32px;
    transform: rotate(4deg);
}

.client-body-chart-right-forearm {
    right: 32px;
    transform: rotate(-4deg);
}

.client-body-chart-left-hand,
.client-body-chart-right-hand {
    top: 58%;
    width: 34px;
    height: 8%;
    border-radius: 999px;
}

.client-body-chart-left-hand {
    left: 28px;
}

.client-body-chart-right-hand {
    right: 28px;
}

.client-body-chart-left-thigh,
.client-body-chart-right-thigh {
    top: 54%;
    width: 42px;
    height: 23%;
    border-radius: 16px 16px 20px 20px;
}

.client-body-chart-left-thigh {
    left: 76px;
    transform: rotate(4deg);
}

.client-body-chart-right-thigh {
    right: 76px;
    transform: rotate(-4deg);
}

.client-body-chart-left-lower-leg,
.client-body-chart-right-lower-leg {
    top: 75%;
    width: 42px;
    height: 21%;
    border-radius: 18px;
}

.client-body-chart-left-lower-leg {
    left: 72px;
}

.client-body-chart-right-lower-leg {
    right: 72px;
}

.client-body-chart-left-foot,
.client-body-chart-right-foot {
    top: 94%;
    width: 50px;
    height: 6%;
    border-radius: 999px 999px 12px 12px;
}

.client-body-chart-left-foot {
    left: 64px;
}

.client-body-chart-right-foot {
    right: 64px;
}

.client-body-chart-pin {
    position: absolute;
    z-index: 3;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 950;
    box-shadow: 0 8px 18px rgba(75, 0, 130, 0.24);
}

.client-body-chart-content {
    display: grid;
    gap: 9px;
    max-height: 170px;
    overflow: auto;
}

.client-body-chart-mark {
    display: grid;
    gap: 5px;
    border: 1px solid #eadff2;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.client-body-chart-mark strong {
    color: #2f2140;
}

.client-body-chart-mark span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: capitalize;
}

.client-body-chart-mark p {
    margin: 0;
    color: #31414a;
    font-size: 0.84rem;
    font-weight: 760;
    line-height: 1.4;
    white-space: pre-wrap;
}

.client-forms-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.client-forms-layout .client-record-block {
    border-left: 1px solid #eee4f5;
    border-top: 1px solid #eee4f5;
}

.client-forms-layout .client-record-block:nth-child(1),
.client-forms-layout .client-record-block:nth-child(2) {
    border-top: 0;
}

.client-forms-layout .client-record-block:nth-child(odd) {
    border-left: 0;
}

.client-payment-layout {
    grid-template-columns: minmax(280px, 0.65fr) minmax(0, 1.35fr);
}

.client-preferences-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
}

.client-preferences-layout textarea {
    min-height: 74px;
}

.client-status-toggle {
    position: relative;
    width: min(100%, 260px);
    min-height: 40px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    border: 1px solid #d8c5ea;
    border-radius: 999px;
    padding: 3px;
    background: #f3f5f6;
    overflow: hidden;
}

.client-status-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.client-status-toggle label {
    position: relative;
    z-index: 2;
    min-height: 32px;
    display: grid;
    place-items: center;
    margin: 0;
    color: #64717c;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 900;
    transition: color 0.18s ease;
}

.client-status-slider {
    position: absolute;
    z-index: 1;
    left: 3px;
    top: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 5px 14px rgba(75, 0, 130, 0.22);
    transition: transform 0.22s cubic-bezier(0.2, 0, 0, 1), background-color 0.22s ease;
}

.client-status-toggle input[value="active"]:checked ~ label[for="client-status-active"],
.client-status-toggle input[value="inactive"]:checked ~ label[for="client-status-inactive"] {
    color: #fff;
}

.client-status-toggle input[value="inactive"]:checked ~ .client-status-slider {
    background: #77838b;
    transform: translateX(100%);
}

.settings-panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.settings-panel-heading h3 {
    margin: 0 0 4px;
}

.settings-location-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
    gap: 14px;
}

.settings-location-list {
    display: grid;
    align-content: start;
    gap: 8px;
}

.settings-location-card {
    display: grid;
    gap: 6px;
    border: 1px solid #eadff2;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.settings-location-card strong,
.settings-location-card span,
.settings-location-card small {
    display: block;
}

.settings-location-card strong {
    color: #2f2140;
}

.settings-location-card span,
.settings-location-card small {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.settings-location-form {
    display: grid;
    gap: 12px;
}

.settings-location-form .btn {
    justify-self: end;
}

/* Settings workspace: subpage navigation, read-only forms, and table-first management. */
.content:has(.settings-workspace) {
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
    padding: 12px 18px;
}

.content-frame:has(.settings-workspace),
.content-surface:has(.settings-workspace) {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.content-surface:has(.settings-workspace) {
    padding: 14px;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
}

.settings-workspace {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 12px;
    overflow: hidden;
    padding-bottom: 14px;
    scrollbar-gutter: stable;
}

.settings-hero,
.settings-subnav,
.settings-panel {
    border: 1px solid #eadff2;
    border-radius: 8px;
    background: #fff;
}

.settings-hero {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    box-shadow: 0 8px 22px rgba(55, 30, 80, 0.05);
}

.settings-hero h2,
.settings-hero p {
    margin: 0;
}

.settings-hero h2 {
    color: #2f2140;
    font-size: 1.32rem;
}

.settings-hero p {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 760;
}

.settings-eyebrow {
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-subnav {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 7px 10px;
}

.settings-tab {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8c5ea;
    border-radius: 8px;
    padding: 0 13px;
    background: #fff;
    color: #3a2b48;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none;
}

.settings-tab.is-active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.settings-subnav-standalone {
    margin: 0 0 12px;
}

.settings-panel {
    height: 100%;
    min-height: 0;
    overflow: auto;
    box-shadow: 0 12px 26px rgba(55, 30, 80, 0.05);
}

.settings-panel-header,
.settings-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #eee4f5;
}

.settings-panel-header span,
.settings-table-header span {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
}

.settings-panel-header > div > span {
    color: var(--brand);
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-panel-header h3,
.settings-table-header h4 {
    margin: 2px 0 0;
    color: #2f2140;
}

.settings-account-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid #eee4f5;
}

.settings-account-card {
    min-height: 112px;
    display: grid;
    align-content: center;
    gap: 5px;
    padding: 16px;
    border-left: 1px solid #eee4f5;
}

.settings-account-card:first-child {
    border-left: 0;
}

.settings-account-card.is-primary {
    background: #fbf7ff;
}

.settings-account-card span,
.settings-account-card small {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.settings-account-card strong {
    color: #2f2140;
    font-size: 1.2rem;
    font-weight: 950;
}

.settings-readonly-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 0;
}

.settings-readonly-item {
    min-height: 76px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 14px 16px;
    border-right: 1px solid #eee4f5;
    border-bottom: 1px solid #eee4f5;
    background: #fbfdfe;
}

.settings-readonly-item:nth-child(3n) {
    border-right: 0;
}

.settings-readonly-item:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.settings-readonly-item span,
.settings-profile-summary span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 950;
    text-transform: uppercase;
}

.settings-readonly-item strong,
.settings-profile-summary strong {
    color: #2f2140;
    font-size: 0.96rem;
    font-weight: 900;
}

.settings-payment-current {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid #eee4f5;
    border-bottom: 1px solid #eee4f5;
    background: #fbfdfe;
}

.settings-payment-current strong span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 950;
}

.settings-payment-current strong {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: #2f2140;
    font-size: 1rem;
    font-weight: 950;
}

.settings-payment-current small {
    color: #52626a;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.35;
}

.settings-payout-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.settings-payout-card {
    min-height: 166px;
    display: grid;
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
    align-content: start;
    gap: 7px;
    padding: 16px;
    border-right: 1px solid #eee4f5;
    border-top: 0;
    border-bottom: 0;
    border-left: 0;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
}

.settings-payout-card:last-child {
    border-right: 0;
}

.settings-payout-card.is-selected {
    background: #fbf7ff;
    box-shadow: inset 0 0 0 2px #6b159e;
}

.settings-payout-card.is-unavailable {
    background: #fdfbff;
}

.settings-payout-card span {
    width: max-content;
    border: 1px solid #e4d5f2;
    border-radius: 999px;
    padding: 3px 8px;
    background: #f7edff;
    color: var(--brand);
    font-size: 0.7rem;
    font-weight: 950;
    text-transform: uppercase;
}

.settings-payout-card strong {
    color: #2f2140;
    font-size: 0.98rem;
    font-weight: 950;
}

.settings-payout-card p {
    margin: 0;
    color: #52626a;
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1.4;
}

.settings-provider-status {
    width: max-content;
    border: 1px solid #dbe7df;
    border-radius: 999px;
    padding: 3px 8px;
    background: #effaf3;
    color: #25613a;
    font-size: 0.7rem;
    font-weight: 950;
    text-transform: uppercase;
}

.settings-provider-status.is-disconnected {
    border-color: #ecd6d6;
    background: #fff5f5;
    color: #9b2f2f;
}

.settings-payout-card .settings-provider-note {
    color: #687983;
    font-size: 0.76rem;
    font-weight: 760;
}

.settings-provider-connect-note {
    border-left: 3px solid #cfb2df;
    padding-left: 8px;
    color: #5f526a;
    font-size: 0.74rem;
    font-weight: 820;
    line-height: 1.32;
}

.settings-payout-action {
    width: max-content;
    align-self: end;
    margin-top: 4px;
    border: 1px solid #dac8ec;
    border-radius: 7px;
    background: #fff;
    color: #4a215f;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 950;
    cursor: pointer;
}

.settings-payout-action:disabled {
    cursor: default;
    opacity: 0.72;
}

.settings-payout-card.is-selected .settings-payout-action {
    border-color: #6b159e;
    background: #6b159e;
    color: #fff;
}

.settings-provider-advanced {
    border-top: 1px solid #eee4f5;
    background: #fbfdfe;
}

.settings-provider-advanced summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #4a215f;
    font-size: 0.8rem;
    font-weight: 950;
    cursor: pointer;
}

.settings-provider-advanced summary:focus-visible {
    outline: 3px solid rgba(75, 0, 130, 0.18);
    outline-offset: -3px;
}

.settings-provider-oauth-note {
    display: grid;
    gap: 3px;
    padding: 0 16px 12px;
    color: #5f526a;
}

.settings-provider-oauth-note strong {
    color: #2f2140;
    font-size: 0.82rem;
    font-weight: 950;
}

.settings-provider-oauth-note span {
    font-size: 0.76rem;
    font-weight: 780;
    line-height: 1.35;
}

.settings-provider-setup-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #eee4f5;
    background: #fbfdfe;
}

.settings-provider-setup-form {
    display: grid;
    grid-template-columns: minmax(92px, 0.32fr) minmax(0, 1fr);
    gap: 8px 10px;
    align-items: center;
    padding: 14px 16px;
    border-right: 1px solid #eee4f5;
}

.settings-provider-setup-form:last-child {
    border-right: 0;
}

.settings-provider-setup-form > div {
    grid-column: 1 / -1;
    display: grid;
    gap: 2px;
    min-height: 46px;
}

.settings-provider-setup-form strong {
    color: #2f2140;
    font-size: 0.9rem;
    font-weight: 950;
}

.settings-provider-setup-form span {
    color: #687983;
    font-size: 0.74rem;
    font-weight: 760;
    line-height: 1.28;
}

.settings-provider-setup-form label {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 950;
    text-transform: uppercase;
}

.settings-provider-setup-form input,
.settings-provider-setup-form select {
    min-height: 34px;
    width: 100%;
    min-width: 0;
    border: 1px solid #ded2e7;
    border-radius: 7px;
    padding: 7px 9px;
    background: #fff;
    color: #2f2140;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
}

.settings-provider-setup-form button {
    grid-column: 2;
    justify-self: start;
}

.settings-danger-zone {
    margin: 14px 16px 16px;
    border: 1px solid #f0c9c3;
    border-radius: 8px;
    background: #fff;
}

.settings-danger-zone summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0 14px;
    color: #8f1f16;
    font-size: 0.86rem;
    font-weight: 950;
}

.settings-danger-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
    gap: 16px;
    border-top: 1px solid #f0c9c3;
    padding: 14px;
}

.settings-danger-content h4,
.settings-danger-content p {
    margin: 0;
}

.settings-danger-content p {
    margin-top: 5px;
    color: #765a58;
    font-size: 0.84rem;
    font-weight: 760;
    line-height: 1.4;
}

.settings-danger-confirm {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
}

.settings-danger-confirm label {
    grid-column: 1 / -1;
    color: #8f1f16;
    font-size: 0.76rem;
    font-weight: 900;
}

.settings-editable-form,
.settings-table-card {
    border-bottom: 1px solid #eee4f5;
}

.settings-editable-form:last-child,
.settings-table-card:last-child {
    border-bottom: 0;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
}

.settings-form-grid.compact {
    padding: 0;
}

.settings-form-grid .field.full {
    grid-column: 1 / -1;
}

.settings-editable-form:not(.is-editing) input:not([type="hidden"]):not([type="checkbox"]),
.settings-editable-form:not(.is-editing) select,
.settings-editable-form:not(.is-editing) textarea {
    border-color: transparent;
    background: #fbfdfe;
    color: #26323a;
    box-shadow: none;
}

.settings-editable-form:not(.is-editing) input[type="number"] {
    appearance: textfield;
}

.settings-editable-form:not(.is-editing) input[type="number"]::-webkit-inner-spin-button,
.settings-editable-form:not(.is-editing) input[type="number"]::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}

.settings-editable-form:not(.is-editing) select {
    appearance: none;
}

.settings-check {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #eadff2;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fbfdfe;
    color: #31414a;
    font-size: 0.86rem;
    font-weight: 850;
}

.settings-check input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--brand);
}

.settings-check.full {
    grid-column: 1 / -1;
}

.settings-confirmation {
    grid-column: 1 / -1;
    display: grid;
    gap: 7px;
    border: 1px solid #e6d8f1;
    border-radius: 8px;
    padding: 10px;
    background: #fbf7ff;
}

.settings-confirmation[hidden] {
    display: none;
}

.settings-confirmation .settings-check {
    min-height: 38px;
    padding: 8px 10px;
    background: #fff;
}

.settings-confirmation p,
.settings-inline-note {
    margin: 0;
    color: #6a596f;
    font-size: 0.8rem;
    font-weight: 760;
    line-height: 1.35;
}

.settings-inline-note.full,
.settings-policy-note.full {
    grid-column: 1 / -1;
}

.settings-policy-note {
    min-height: 58px;
    display: grid;
    align-content: center;
    gap: 4px;
    border: 1px solid #eadff2;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fbfdfe;
}

.settings-policy-note span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 950;
    text-transform: uppercase;
}

.settings-policy-note strong {
    color: #2f2140;
    font-size: 0.88rem;
    font-weight: 900;
}

.settings-edit-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.settings-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
    gap: 16px;
    padding: 16px;
}

.settings-profile-grid {
    gap: 12px 14px;
    align-items: start;
}

.settings-profile-grid .field {
    grid-template-rows: auto minmax(32px, auto) 40px;
    gap: 5px;
}

.settings-profile-grid .field-hint {
    min-height: 32px;
    height: 32px;
    display: flex;
    align-items: flex-start;
    color: #64737d;
    font-size: 0.74rem;
    font-weight: 820;
    line-height: 1.3;
    overflow: hidden;
}

.settings-profile-grid select {
    min-height: 40px;
    height: 40px;
    padding: 0 34px 0 11px;
    font-size: 0.9rem;
    font-weight: 820;
    line-height: 1.1;
}

.settings-profile-grid .settings-check {
    min-height: 54px;
    padding: 10px 14px;
    gap: 10px;
    font-size: 0.86rem;
    line-height: 1.25;
}

.settings-profile-grid .settings-check input {
    flex: 0 0 auto;
}

.settings-profile-grid .settings-confirmation {
    gap: 8px;
    padding: 12px;
}

.settings-profile-grid .settings-confirmation .settings-check {
    min-height: 46px;
    padding: 9px 12px;
}

.settings-profile-summary {
    display: grid;
    align-content: start;
    gap: 8px;
    border-left: 1px solid #eee4f5;
    padding-left: 16px;
}

.settings-profile-summary p {
    margin: 0;
    color: #52626a;
    font-size: 0.86rem;
    font-weight: 760;
    line-height: 1.45;
}

.settings-rule-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
}

.settings-rule-card {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 16px;
    border-right: 1px solid #eee4f5;
    border-bottom: 1px solid #eee4f5;
}

.settings-rule-card:nth-child(2n) {
    border-right: 0;
}

.settings-rule-card:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
}

.settings-rule-card h5 {
    margin: 0;
    color: #2f2140;
    font-size: 0.94rem;
}

.settings-data-table {
    width: 100%;
    border-collapse: collapse;
}

.settings-data-table th,
.settings-data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee4f5;
    color: #31414a;
    font-size: 0.84rem;
    font-weight: 760;
    text-align: left;
}

.settings-data-table th {
    color: #66747c;
    font-size: 0.74rem;
    font-weight: 950;
    text-transform: uppercase;
}

.settings-data-table tr:last-child td {
    border-bottom: 0;
}

.settings-floating-add {
    background: var(--brand);
}

.settings-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    justify-content: flex-end;
    background: rgba(31, 18, 42, 0.36);
}

.settings-drawer-backdrop[hidden] {
    display: none;
}

.settings-create-drawer {
    width: min(620px, calc(100vw - 32px));
    height: 100%;
    overflow: hidden;
    border-left: 1px solid #d8cfe3;
    background: #fff;
    box-shadow: -22px 0 50px rgba(35, 24, 45, 0.24);
}

.settings-create-drawer .settings-location-form {
    height: 100%;
    overflow: auto;
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 22px;
}

.settings-create-drawer .client-drawer-header {
    position: sticky;
}

@media (max-width: 1050px) {
    .content:has(.client-record-workspace) {
        height: auto;
        overflow: visible;
    }

    .content-frame:has(.client-record-workspace),
    .content-surface:has(.client-record-workspace),
    .client-record-workspace,
    .client-record-section,
    .client-record-section.is-active {
        height: auto;
    }

    .content-surface:has(.client-record-workspace),
    .client-record-section {
        overflow: visible;
    }

    .client-record-subnav {
        grid-template-columns: 1fr;
    }

    .client-record-subnav-links {
        justify-content: flex-start;
        margin-left: 0;
    }

    .client-overview-layout,
    .client-contact-layout,
    .client-visits-layout,
    .client-visits-layout.has-flyout,
    .client-forms-layout,
    .client-payment-layout,
    .client-preferences-layout,
    .settings-location-grid {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    .client-record-block,
    .client-visits-list,
    .client-all-notes-panel {
        overflow: visible;
    }

    .client-contact-layout .client-record-block,
    .client-payment-layout .client-record-block,
    .client-preferences-layout .client-record-block,
    .client-forms-layout .client-record-block,
    .client-all-notes-panel,
    .client-body-chart-flyout {
        border-left: 0;
        border-top: 1px solid #eee4f5;
    }

    .client-contact-layout .client-record-block:first-child,
    .client-preferences-layout .client-record-block:first-child,
    .client-forms-layout .client-record-block:first-child {
        border-top: 0;
    }

    .settings-readonly-grid,
    .settings-payout-grid,
    .settings-provider-setup-grid,
    .settings-danger-content,
    .settings-profile-layout,
    .settings-rule-grid,
    .settings-form-grid,
    .settings-form-grid.compact {
        grid-template-columns: 1fr;
    }

    .settings-payment-current {
        gap: 5px;
        align-items: start;
    }

    .settings-readonly-item,
    .settings-readonly-item:nth-child(3n),
    .settings-rule-card,
    .settings-rule-card:nth-child(2n),
    .settings-rule-card:last-child {
        grid-column: auto;
        border-right: 0;
        border-bottom: 1px solid #eee4f5;
    }

    .settings-readonly-item:last-child,
    .settings-rule-card:last-child {
        border-bottom: 0;
    }

    .settings-payout-card {
        border-right: 0;
        border-bottom: 1px solid #eee4f5;
    }

    .settings-payout-card:last-child {
        border-bottom: 0;
    }

    .settings-provider-setup-form {
        grid-template-columns: 1fr;
        border-right: 0;
        border-bottom: 1px solid #eee4f5;
    }

    .settings-provider-setup-form:last-child {
        border-bottom: 0;
    }

    .settings-provider-setup-form button {
        grid-column: 1;
    }

    .settings-danger-confirm {
        grid-template-columns: 1fr;
    }

    .settings-profile-summary {
        border-left: 0;
        border-top: 1px solid #eee4f5;
        padding-top: 16px;
        padding-left: 0;
    }

    .settings-profile-grid .field {
        grid-template-rows: auto auto 40px;
    }

    .settings-profile-grid .field-hint {
        min-height: 0;
        height: auto;
        overflow: visible;
    }
}

@media (max-width: 760px) {
    .content:has(.client-record-workspace) {
        padding: 12px;
    }

    .client-record-banner {
        min-height: 0;
    }

    .client-record-banner-main {
        align-items: flex-start;
    }

    .client-record-contact-line {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .client-record-subnav-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }

    .appointment-create-grid {
        grid-template-columns: 1fr;
    }

    .client-picker-row-main {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .client-record-tab {
        width: 100%;
    }

    .client-summary-strip {
        grid-template-columns: 1fr;
    }

    .client-message-actions,
    .client-notification-grid {
        grid-template-columns: 1fr;
    }

    .client-visit-accordion summary {
        grid-template-columns: 1fr auto;
        white-space: normal;
    }

    .client-visit-time,
    .client-visit-status,
    .client-visit-service strong {
        white-space: normal;
    }

    .settings-location-form .btn {
        width: 100%;
        justify-self: stretch;
    }
}

/* Reports redesign cascade overrides */
.reports-workspace {
    gap: 12px;
}

.reports-titlebar {
    min-height: 72px;
    padding: 14px 16px;
    box-shadow: 0 6px 18px rgba(55, 30, 80, 0.06);
}

.reports-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reports-kpi {
    min-height: 92px;
    align-items: center;
}

@media (max-width: 620px) {
    .reports-kpi-grid {
        grid-template-columns: 1fr;
    }
}
