
:root{
  --bg:#f3f5f8;--surface:#fff;--text:#18212f;--muted:#697386;--border:#e3e7ee;
  --primary:#173b63;--primary-dark:#102d4c;--primary-soft:#eaf0f7;

  /* Aliases used by the newer Business Portal components. */
  --chbm-bg:var(--bg);--chbm-surface:var(--surface);--chbm-text:var(--text);
  --chbm-muted:var(--muted);--chbm-border:var(--border);--chbm-primary:var(--primary);
  --chbm-primary-dark:var(--primary-dark);--chbm-primary-soft:var(--primary-soft);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body.chbm-body{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
a{color:inherit}
.chbm-login-shell{min-height:100vh;display:grid;place-items:center;padding:28px;background:radial-gradient(circle at 20% 10%,rgba(23,59,99,.08),transparent 30%),var(--bg)}
.chbm-login-card{width:min(430px,100%);background:#fff;border:1px solid var(--border);border-radius:24px;padding:38px;box-shadow:0 14px 36px rgba(23,59,99,.08)}
.chbm-brand-mark{width:54px;height:54px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(145deg,var(--primary),var(--primary-dark));color:#fff;font-size:24px;font-weight:800;margin-bottom:24px}
.chbm-brand-mark-small{width:38px;height:38px;border-radius:11px;margin:0;font-size:17px}
.chbm-eyebrow{margin:0 0 6px;color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.14em}
.chbm-muted,.chbm-page-heading p,.chbm-empty p{color:var(--muted)}
.chbm-login-card h1,.chbm-topbar h1,.chbm-page-heading h2,.chbm-card h2{margin:0}
.chbm-login-form{display:grid;gap:18px;margin-top:28px}
.chbm-login-form label{display:grid;gap:8px;font-size:13px;font-weight:700}
.chbm-login-form input{width:100%;border:1px solid var(--border);border-radius:12px;padding:13px 14px;background:#fbfcfe;outline:none}
.chbm-login-form input:focus{border-color:#8ca9c6;box-shadow:0 0 0 4px rgba(23,59,99,.08)}
.chbm-button{border:0;border-radius:12px;padding:12px 16px;font-weight:750;cursor:pointer}
.chbm-button-primary{background:var(--primary);color:#fff}
.chbm-button-primary:hover{background:var(--primary-dark)}
.chbm-button:disabled{opacity:.55;cursor:not-allowed}
.chbm-alert{margin-top:18px;border:1px solid #efcaca;background:#fff0f0;color:#8f2f2f;padding:12px 14px;border-radius:12px;font-size:13px}
.chbm-app{min-height:100vh;display:grid;grid-template-columns:250px minmax(0,1fr)}
.chbm-sidebar{min-height:100vh;position:sticky;top:0;align-self:start;background:#101a28;color:#e9eef4;padding:24px 18px;display:flex;flex-direction:column}
.chbm-brand{display:flex;align-items:center;gap:12px;padding:4px 10px 24px;text-decoration:none}
.chbm-brand strong,.chbm-brand small{display:block}
.chbm-brand small{color:#9cacbf;margin-top:2px}
.chbm-nav{display:grid;gap:6px}
.chbm-nav a{display:flex;padding:12px 13px;border-radius:12px;text-decoration:none;color:#aebac8;font-size:14px;font-weight:650}
.chbm-nav a:hover,.chbm-nav a.is-active{color:#fff;background:rgba(255,255,255,.08)}
.chbm-sidebar-footer{margin-top:auto;border-top:1px solid rgba(255,255,255,.08);padding:18px 8px 4px;display:grid;gap:4px}
.chbm-sidebar-footer small{color:#8999aa}
.chbm-sidebar-footer a{margin-top:12px;color:#aebac8;text-decoration:none;font-size:13px}
.chbm-main{min-width:0}
.chbm-topbar{padding:22px 34px;border-bottom:1px solid var(--border);background:rgba(255,255,255,.9)}
.chbm-topbar h1{font-size:24px}
.chbm-content{padding:30px 34px 48px;max-width:1500px}
.chbm-segmented{display:inline-flex;padding:4px;border:1px solid var(--border);background:#fff;border-radius:12px;margin-bottom:20px}
.chbm-segmented button{border:0;background:transparent;color:var(--muted);padding:9px 12px;border-radius:9px;font-weight:700}
.chbm-segmented button.is-active{background:var(--primary-soft);color:var(--primary)}
.chbm-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}
.chbm-card{background:#fff;border:1px solid var(--border);border-radius:18px;padding:22px;box-shadow:0 4px 16px rgba(23,59,99,.035)}
.chbm-metric-card{min-height:142px;display:flex;flex-direction:column}
.chbm-metric-card>span{color:var(--muted);font-size:13px;font-weight:700}
.chbm-metric-card strong{font-size:30px;margin:16px 0 6px}
.chbm-metric-card small{margin-top:auto;color:#8b95a5}
.chbm-grid-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.chbm-empty{min-height:220px;display:grid;place-items:center;text-align:center;align-content:center;padding:28px}
.chbm-empty p{max-width:520px;line-height:1.55}
.chbm-page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}
.chbm-page-heading p{margin:6px 0 0}
.chbm-empty-large{min-height:440px}
@media(max-width:1000px){
  .chbm-app{grid-template-columns:190px minmax(0,1fr)}
  .chbm-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  .chbm-app{display:block}
  .chbm-sidebar{min-height:auto;position:static;padding:12px}
  .chbm-brand,.chbm-sidebar-footer{display:none}
  .chbm-nav{display:flex;overflow-x:auto}
  .chbm-nav a{flex:0 0 auto}
  .chbm-topbar{padding:18px 20px}
  .chbm-content{padding:20px}
  .chbm-metric-grid,.chbm-grid-two{grid-template-columns:1fr}
  .chbm-page-heading{align-items:flex-start;flex-direction:column}
}

/* Inventory v0.2 */
.chbm-inline-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chbm-button-secondary {
    color: var(--chbm-primary);
    background: #fff;
    border: 1px solid var(--chbm-border);
}

.chbm-button-secondary:hover:not(:disabled) {
    background: var(--chbm-primary-soft);
}

.chbm-table-card {
    padding: 0;
    overflow: hidden;
}

.chbm-table-toolbar {
    min-height: 82px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--chbm-border);
}

.chbm-table-toolbar h2 {
    font-size: 17px;
}

.chbm-search-wrap {
    width: min(340px, 100%);
    position: relative;
}

.chbm-search-wrap input {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px 10px 38px;
    border: 1px solid var(--chbm-border);
    border-radius: 12px;
    outline: none;
    background: #fbfcfe;
    color: var(--chbm-text);
}

.chbm-search-wrap input:focus {
    border-color: #8ca9c6;
    box-shadow: 0 0 0 4px rgba(23, 59, 99, .07);
}

.chbm-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--chbm-muted);
    pointer-events: none;
}

.chbm-table-scroll {
    overflow-x: auto;
}

.chbm-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: 13px;
}

.chbm-table th,
.chbm-table td {
    padding: 15px 18px;
    text-align: left;
    border-bottom: 1px solid var(--chbm-border);
    vertical-align: middle;
}

.chbm-table th {
    color: var(--chbm-muted);
    background: #fafbfd;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

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

.chbm-table tbody tr:hover td {
    background: #fbfcfe;
}

.chbm-num {
    text-align: right !important;
    white-space: nowrap;
}

.chbm-stock-number {
    font-weight: 800;
}

.chbm-product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
}

.chbm-product-cell strong,
.chbm-product-cell small {
    display: block;
}

.chbm-product-cell strong {
    font-size: 13px;
}

.chbm-product-cell small {
    color: var(--chbm-muted);
    margin-top: 3px;
    font-size: 11px;
}

.chbm-product-thumb {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: var(--chbm-primary-soft);
    color: var(--chbm-primary);
    font-size: 11px;
    font-weight: 800;
}

.chbm-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chbm-stock-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.chbm-stock-badge.is-good {
    color: #17633f;
    background: #e7f5ed;
}

.chbm-stock-badge.is-low {
    color: #8a5a12;
    background: #fff4d6;
}

.chbm-stock-badge.is-out {
    color: #9a3434;
    background: #fdeaea;
}

.chbm-stock-badge.is-neutral {
    color: #667085;
    background: #eef1f5;
}

.chbm-soft-note {
    margin-top: 14px;
    padding: 13px 15px;
    border-radius: 12px;
    color: var(--chbm-muted);
    background: #eef3f8;
    font-size: 12px;
    line-height: 1.5;
}

.chbm-soft-note strong {
    color: var(--chbm-primary);
}

.chbm-table-empty,
.chbm-no-results {
    color: var(--chbm-muted);
    text-align: center;
    padding: 28px;
}

@media (max-width: 720px) {
    .chbm-inventory-heading,
    .chbm-table-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .chbm-search-wrap {
        width: 100%;
    }
}


/* Inventory Add Stock v0.3 */
.chbm-notice {
    margin: 0 0 18px;
    padding: 13px 15px;
    border: 1px solid var(--chbm-border);
    border-radius: 13px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
}

.chbm-notice.is-success {
    color: #17633f;
    background: #e9f7ef;
    border-color: #ccebd9;
}

.chbm-notice.is-error {
    color: #963737;
    background: #fff0f0;
    border-color: #f0cece;
}

body.chbm-modal-open {
    overflow: hidden;
}

.chbm-modal[hidden] {
    display: none !important;
}

.chbm-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 24px;
}

.chbm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 19, 31, .48);
    backdrop-filter: blur(4px);
}

.chbm-modal-card {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: min(820px, calc(100vh - 48px));
    overflow: auto;
    background: var(--chbm-surface);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(14, 30, 49, .22);
    padding: 24px;
}

.chbm-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--chbm-border);
}

.chbm-modal-header h2 {
    margin: 0;
    font-size: 21px;
}

.chbm-modal-close {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--chbm-border);
    border-radius: 10px;
    background: #fff;
    color: var(--chbm-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.chbm-modal-close:hover {
    color: var(--chbm-text);
    background: #f6f8fb;
}

.chbm-form {
    display: grid;
    gap: 18px;
}

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

.chbm-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

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

.chbm-field > span {
    color: var(--chbm-text);
    font-size: 12px;
    font-weight: 800;
}

.chbm-field > span small {
    color: var(--chbm-muted);
    font-weight: 600;
}

.chbm-field input,
.chbm-field select,
.chbm-field textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--chbm-border);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--chbm-text);
    background: #fbfcfe;
    outline: none;
}

.chbm-field textarea {
    min-height: 88px;
    resize: vertical;
}

.chbm-field input:focus,
.chbm-field select:focus,
.chbm-field textarea:focus {
    border-color: #8ca9c6;
    box-shadow: 0 0 0 4px rgba(23, 59, 99, .07);
}

.chbm-new-supplier {
    padding: 16px;
    border: 1px dashed #cbd5df;
    border-radius: 14px;
    background: #f8fafc;
}

.chbm-new-supplier[hidden] {
    display: none !important;
}

.chbm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

@media (max-width: 620px) {
    .chbm-modal {
        padding: 12px;
        place-items: end center;
    }

    .chbm-modal-card {
        width: 100%;
        max-height: calc(100vh - 24px);
        border-radius: 20px 20px 14px 14px;
        padding: 20px;
    }

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

    .chbm-field-full {
        grid-column: auto;
    }

    .chbm-modal-actions {
        flex-direction: column-reverse;
    }

    .chbm-modal-actions .chbm-button {
        width: 100%;
    }
}


/* Adjust Stock v0.4 */
.chbm-adjust-summary,
.chbm-form-help {
    border-radius: 12px;
    padding: 12px 14px;
    background: #f6f8fb;
    border: 1px solid var(--chbm-border);
    color: var(--chbm-muted);
    font-size: 12px;
    line-height: 1.5;
}

.chbm-form-help strong {
    color: var(--chbm-text);
}

/* Orders v0.5 */
.chbm-orders-topline{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.chbm-range-tabs a{display:inline-flex;align-items:center;justify-content:center;padding:9px 12px;border-radius:9px;color:var(--chbm-muted);text-decoration:none;font-weight:700;font-size:13px}.chbm-range-tabs a.is-active{background:var(--chbm-primary-soft);color:var(--chbm-primary)}.chbm-orders-search{width:min(340px,100%)}.chbm-orders-table-toolbar{align-items:center}.chbm-status-filters{display:flex;flex-wrap:wrap;gap:6px}.chbm-status-filters button{border:1px solid var(--chbm-border);background:#fff;color:var(--chbm-muted);border-radius:999px;padding:7px 10px;font-size:11px;font-weight:750;cursor:pointer}.chbm-status-filters button.is-active{background:var(--chbm-primary);border-color:var(--chbm-primary);color:white}.chbm-cell-sub,.chbm-order-product-line small{display:block;margin-top:4px;color:var(--chbm-muted);font-size:11px}.chbm-order-items{max-width:280px}.chbm-order-status{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:750;white-space:nowrap}.chbm-order-status.is-good{color:#17633f;background:#e7f6ed}.chbm-order-status.is-active{color:#235c91;background:#e8f1fa}.chbm-order-status.is-pending{color:#8a671e;background:#fbf3db}.chbm-order-status.is-bad{color:#983f3f;background:#fdecec}.chbm-order-status.is-neutral{color:#5f6977;background:#edf0f4}.chbm-order-action{text-align:right}.chbm-order-view{border:0;background:transparent;color:var(--chbm-primary);font-weight:800;cursor:pointer}.chbm-order-detail-row td{padding:0!important;background:#f8fafc}.chbm-order-detail{padding:22px;border-top:1px solid var(--chbm-border);border-bottom:1px solid var(--chbm-border)}.chbm-order-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:20px}.chbm-order-detail-grid section{padding:16px;border:1px solid var(--chbm-border);border-radius:14px;background:#fff}.chbm-order-detail-grid h3{margin:0 0 8px;font-size:15px}.chbm-order-detail-grid p:not(.chbm-card-kicker){margin:5px 0 0;color:var(--chbm-muted);font-size:12px}.chbm-order-products{padding:18px;border:1px solid var(--chbm-border);border-radius:14px;background:#fff}.chbm-order-product-list{margin-top:8px}.chbm-order-product-line{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--chbm-border)}.chbm-order-product-line:last-child{border-bottom:0}.chbm-order-accounting{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}.chbm-order-accounting>div{padding:16px;border:1px solid var(--chbm-border);border-radius:14px;background:#fff}.chbm-order-accounting span{display:block;color:var(--chbm-muted);font-size:11px;font-weight:700;margin-bottom:7px}.chbm-order-accounting strong{font-size:18px}.chbm-order-cost-note{margin-top:14px}@media(max-width:900px){.chbm-orders-topline{align-items:stretch;flex-direction:column}.chbm-orders-search{width:100%}.chbm-orders-table-toolbar{align-items:flex-start;flex-direction:column}.chbm-order-detail-grid,.chbm-order-accounting{grid-template-columns:1fr}}


/* Expenses v0.6 */
.chbm-expense-toolbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:18px;
}

.chbm-expense-search {
    width:min(340px,100%);
}

.chbm-metric-text {
    font-size:22px !important;
    line-height:1.15;
}

.chbm-expense-category {
    display:inline-flex;
    padding:5px 8px;
    border-radius:999px;
    background:#edf2f7;
    color:#536274;
    font-size:11px;
    font-weight:750;
    white-space:nowrap;
}

.chbm-expense-notes {
    max-width:280px;
    color:var(--chbm-muted);
}

.chbm-text-danger {
    border:0;
    background:transparent;
    color:#b74242;
    font-weight:800;
    cursor:pointer;
    padding:5px 0;
}

.chbm-text-danger:hover {
    text-decoration:underline;
}

@media(max-width:900px) {
    .chbm-expense-toolbar {
        align-items:stretch;
        flex-direction:column;
    }

    .chbm-expense-search {
        width:100%;
    }
}

/* Manual Sale v0.7 */
.chbm-sale-modal-card{width:min(900px,100%)}.chbm-sale-items{border:1px solid var(--chbm-border);border-radius:16px;padding:18px;background:#f8fafc}.chbm-sale-items-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.chbm-sale-items-heading h3{margin:0;font-size:16px}.chbm-sale-line{display:grid;grid-template-columns:minmax(250px,2fr) 90px 130px 120px 34px;gap:10px;align-items:end;padding:14px 0;border-top:1px solid var(--chbm-border)}.chbm-sale-line:first-child{border-top:0;padding-top:0}.chbm-sale-line-total{display:grid;gap:8px;padding-bottom:11px}.chbm-sale-line-total span{color:var(--chbm-muted);font-size:11px;font-weight:700}.chbm-sale-line-total strong{font-size:13px}.chbm-sale-remove{width:34px;height:34px;margin-bottom:5px;display:grid;place-items:center;border:1px solid var(--chbm-border);border-radius:10px;background:white;color:#9a3e3e;font-size:18px;cursor:pointer}.chbm-sale-grand-total{display:flex;align-items:center;justify-content:flex-end;gap:18px;padding-top:14px;border-top:1px solid var(--chbm-border)}.chbm-sale-grand-total span{color:var(--chbm-muted);font-size:12px;font-weight:700}.chbm-sale-grand-total strong{font-size:20px}@media(max-width:820px){.chbm-sale-line{grid-template-columns:1fr 1fr}.chbm-sale-product-field{grid-column:1/-1}}@media(max-width:520px){.chbm-sale-items-heading{align-items:flex-start;flex-direction:column}.chbm-sale-line{grid-template-columns:1fr}.chbm-sale-product-field{grid-column:auto}.chbm-sale-grand-total{justify-content:space-between}}


/* Suppliers v0.8 */
.chbm-suppliers-search {
    width:min(340px,100%);
}

.chbm-supplier-contact {
    display:block;
    font-weight:700;
}

.chbm-supplier-detail-row td {
    padding:0 !important;
    background:#f8fafc;
}

.chbm-supplier-detail {
    padding:22px;
    border-top:1px solid var(--chbm-border);
    border-bottom:1px solid var(--chbm-border);
}

.chbm-supplier-detail-grid {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);
    gap:16px;
    margin-bottom:18px;
}

.chbm-supplier-detail-grid > section {
    padding:18px;
    border:1px solid var(--chbm-border);
    border-radius:14px;
    background:#fff;
}

.chbm-supplier-detail-grid h3 {
    margin:0 0 10px;
    font-size:17px;
}

.chbm-supplier-detail-grid p:not(.chbm-card-kicker) {
    margin:6px 0 0;
    color:var(--chbm-muted);
    font-size:12px;
    line-height:1.5;
}

.chbm-supplier-edit-button {
    margin-top:16px;
}

.chbm-supplier-summary-list {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}

.chbm-supplier-summary-list > div {
    padding:14px;
    border:1px solid var(--chbm-border);
    border-radius:12px;
    background:#f8fafc;
}

.chbm-supplier-summary-list span {
    display:block;
    color:var(--chbm-muted);
    font-size:11px;
    font-weight:700;
    margin-bottom:7px;
}

.chbm-supplier-summary-list strong {
    font-size:16px;
}

.chbm-supplier-purchases {
    padding:18px;
    border:1px solid var(--chbm-border);
    border-radius:14px;
    background:#fff;
}

.chbm-supplier-section-heading {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:12px;
}

.chbm-supplier-section-heading h3 {
    margin:0;
    font-size:15px;
}

.chbm-inner-table {
    margin-top:6px;
}

@media(max-width:850px) {
    .chbm-supplier-detail-grid,
    .chbm-supplier-summary-list {
        grid-template-columns:1fr;
    }

    .chbm-suppliers-search {
        width:100%;
    }
}

/* Services v0.9 */
.chbm-service-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.chbm-service-search{width:min(340px,100%)}.chbm-service-status{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:750}.chbm-service-status.is-upcoming{color:#235c91;background:#e8f1fa}.chbm-service-status.is-completed{color:#17633f;background:#e7f6ed}.chbm-service-status.is-cancelled{color:#983f3f;background:#fdecec}.chbm-service-detail-row td{padding:0!important;background:#f8fafc}.chbm-service-detail{padding:22px}.chbm-service-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.chbm-service-detail-grid>section,.chbm-service-products{padding:18px;border:1px solid var(--chbm-border);border-radius:14px;background:#fff}.chbm-service-detail-grid h3{margin:0 0 8px}.chbm-service-detail-grid p{margin:5px 0;color:var(--chbm-muted);font-size:12px}.chbm-service-products{margin-top:14px}.chbm-service-line{display:flex;justify-content:space-between;gap:18px;padding:12px 0;border-bottom:1px solid var(--chbm-border)}.chbm-service-line:last-child{border-bottom:0}.chbm-service-line small{display:block;color:var(--chbm-muted);margin-top:4px}.chbm-muted-text{color:var(--chbm-muted);font-size:12px}.chbm-service-accounting{grid-template-columns:repeat(5,minmax(0,1fr))}.chbm-service-actions{display:flex;gap:10px;margin-top:16px}.chbm-service-modal-card{width:min(940px,100%)}.chbm-service-form-section{padding:18px;border:1px solid var(--chbm-border);border-radius:16px;background:#f8fafc}.chbm-service-oil-line{display:grid;grid-template-columns:minmax(280px,2fr) 90px 90px 34px;gap:10px;align-items:end;padding:14px 0;border-top:1px solid var(--chbm-border)}.chbm-service-oil-line:first-child{border-top:0}.chbm-service-oil-size{display:grid;gap:8px;padding-bottom:11px}.chbm-service-oil-size span{color:var(--chbm-muted);font-size:11px;font-weight:700}.chbm-service-liter-check{margin-top:10px;padding:11px 13px;border:1px solid var(--chbm-border);border-radius:11px;background:#fff;color:var(--chbm-muted);font-size:12px;font-weight:700}.chbm-service-liter-check.is-good{color:#17633f;background:#e9f7ef;border-color:#ccebd9}.chbm-service-liter-check.is-bad{color:#963737;background:#fff0f0;border-color:#f0cece}.chbm-service-cost-line{display:grid;grid-template-columns:minmax(220px,2fr) 150px 34px;gap:10px;align-items:end;padding:12px 0;border-top:1px solid var(--chbm-border)}
@media(max-width:900px){.chbm-service-toolbar{align-items:stretch;flex-direction:column}.chbm-service-search{width:100%}.chbm-service-detail-grid,.chbm-service-accounting{grid-template-columns:1fr}.chbm-service-oil-line,.chbm-service-cost-line{grid-template-columns:1fr 1fr}.chbm-service-oil-product-field{grid-column:1/-1}}


/* Website Bookings integration v0.10 */
.chbm-source-badge {
    display:inline-flex;
    align-items:center;
    padding:5px 8px;
    border-radius:999px;
    font-size:11px;
    font-weight:750;
    white-space:nowrap;
}

.chbm-source-badge.is-website {
    color:#235c91;
    background:#e8f1fa;
}

.chbm-source-badge.is-manual {
    color:#586578;
    background:#edf0f4;
}

.chbm-booking-location-card {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    margin-top:14px;
    padding:18px;
    border:1px solid var(--chbm-border);
    border-radius:14px;
    background:#fff;
}

.chbm-booking-location-card strong,
.chbm-booking-location-card small {
    display:block;
}

.chbm-booking-location-card small {
    margin-top:6px;
    color:var(--chbm-muted);
}

.chbm-booking-summary-strip {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
    margin-bottom:18px;
}

.chbm-booking-summary-strip > div {
    padding:13px;
    border:1px solid var(--chbm-border);
    border-radius:12px;
    background:#f8fafc;
}

.chbm-booking-summary-strip span {
    display:block;
    margin-bottom:5px;
    color:var(--chbm-muted);
    font-size:11px;
    font-weight:700;
}

.chbm-booking-summary-strip strong {
    display:block;
    font-size:13px;
}

@media(max-width:850px){
    .chbm-booking-summary-strip {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .chbm-booking-location-card {
        align-items:flex-start;
        flex-direction:column;
    }
}

@media(max-width:520px){
    .chbm-booking-summary-strip {
        grid-template-columns:1fr;
    }
}


/* UI clarity + interaction polish v0.10.1 */
.chbm-field input,
.chbm-field select,
.chbm-field textarea,
.chbm-search-wrap input {
    background:#ffffff;
    color:#18212f;
    border:1px solid #cbd4df;
    box-shadow:0 1px 2px rgba(16,45,76,.03);
}

.chbm-field input::placeholder,
.chbm-field textarea::placeholder,
.chbm-search-wrap input::placeholder {
    color:#8a95a5;
    opacity:1;
}

.chbm-field input:hover,
.chbm-field select:hover,
.chbm-field textarea:hover,
.chbm-search-wrap input:hover {
    border-color:#aebdcd;
}

.chbm-field input:focus,
.chbm-field select:focus,
.chbm-field textarea:focus,
.chbm-search-wrap input:focus {
    border-color:#496f99;
    box-shadow:0 0 0 3px rgba(23,59,99,.12);
    outline:none;
}

.chbm-field > span {
    color:#243247;
}

.chbm-modal-card {
    background:#ffffff;
    border-color:#d7dee8;
}

.chbm-service-form-section,
.chbm-sale-items {
    background:#f6f8fb;
    border-color:#dce3ec;
}

/* Date-range tabs: clear hover and selected state. */
.chbm-segmented a,
.chbm-segmented button,
.chbm-range-tabs a {
    color:#526174;
    background:transparent;
    border:0;
    cursor:pointer;
    transition:background-color .16s ease,color .16s ease,box-shadow .16s ease;
}

.chbm-segmented a:hover,
.chbm-segmented button:hover,
.chbm-range-tabs a:hover {
    color:#173b63;
    background:#eef3f8;
}

.chbm-segmented a.is-active,
.chbm-segmented button.is-active,
.chbm-range-tabs a.is-active {
    color:#ffffff !important;
    background:#173b63 !important;
    box-shadow:0 2px 7px rgba(23,59,99,.16);
}

/* In-page status filters such as All / Upcoming / Completed. */
.chbm-status-filters button {
    color:#526174;
    background:#ffffff;
    border:1px solid #d6dee8;
    cursor:pointer;
    transition:background-color .16s ease,color .16s ease,border-color .16s ease,transform .12s ease;
}

.chbm-status-filters button:hover {
    color:#173b63;
    background:#eef3f8;
    border-color:#aebed0;
}

.chbm-status-filters button.is-active {
    color:#ffffff !important;
    background:#173b63 !important;
    border-color:#173b63 !important;
}

.chbm-status-filters button:active,
.chbm-segmented a:active,
.chbm-range-tabs a:active {
    transform:translateY(1px);
}

.chbm-status-filters button:focus-visible,
.chbm-segmented a:focus-visible,
.chbm-range-tabs a:focus-visible,
.chbm-button:focus-visible {
    outline:3px solid rgba(23,59,99,.22);
    outline-offset:2px;
}

/* Booking completion form clarity. */
.chbm-booking-summary-strip > div {
    background:#f7f9fc;
    border-color:#d7e0ea;
}

.chbm-booking-summary-strip span,
.chbm-service-oil-size span {
    color:#68778a;
}

.chbm-booking-summary-strip strong,
.chbm-service-oil-size strong {
    color:#15243a;
}

.chbm-service-liter-check {
    background:#ffffff;
    color:#526174;
    border-color:#ccd6e2;
}

.chbm-service-liter-check.is-good {
    color:#17633f;
    background:#eaf7ef;
    border-color:#b9dfc8;
}

.chbm-service-liter-check.is-bad {
    color:#9a3434;
    background:#fff2f2;
    border-color:#efc9c9;
}


/* Website-booking completion reliability / visibility v0.10.2 */
.chbm-booking-process-form-v2 .chbm-service-oil-line {
    background:#ffffff;
    border:1px solid #d6e0eb;
    border-radius:12px;
    padding:12px;
    margin-bottom:10px;
}

.chbm-booking-process-form-v2 .chbm-service-oil-size strong {
    color:#102a47;
    font-size:15px;
    font-weight:800;
}

.chbm-booking-process-form-v2 .chbm-service-liter-check {
    min-height:42px;
    display:flex;
    align-items:center;
    font-weight:800;
}

.chbm-booking-process-form-v2 .chbm-button-primary {
    background:#173b63;
    color:#ffffff;
}

.chbm-booking-process-form-v2 .chbm-button-primary:hover {
    background:#102f51;
}


/* Valid website-booking modal structure v0.10.3 */
.chbm-booking-process-form-v2 {
    display:grid;
    gap:18px;
}

.chbm-booking-process-form-v2 .chbm-service-liter-check.is-good {
    border-color:#a9d9bd;
    background:#eaf7ef;
    color:#145c39;
}

.chbm-booking-process-form-v2 .chbm-service-liter-check.is-bad {
    border-color:#ecc8c8;
    background:#fff3f3;
    color:#963737;
}


/* Dashboard v0.11 */
.chbm-dashboard-toolbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:18px;
}

.chbm-dashboard-range a {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:36px;
    padding:8px 13px;
    border-radius:9px;
    color:var(--chbm-muted);
    text-decoration:none;
    font-size:13px;
    font-weight:800;
    transition:
        background-color .16s ease,
        color .16s ease,
        transform .08s ease;
}

.chbm-dashboard-range a:hover {
    background:#eef3f8;
    color:#173b63;
}

.chbm-dashboard-range a:active {
    transform:translateY(1px);
}

.chbm-dashboard-range a.is-active {
    background:#173b63;
    color:#ffffff;
    box-shadow:0 4px 12px rgba(23,59,99,.14);
}

.chbm-dashboard-context {
    color:var(--chbm-muted);
    font-size:12px;
    font-weight:700;
}

.chbm-net-profit-card {
    border-color:#d7e5dd;
    background:linear-gradient(180deg,#ffffff 0%,#f8fcfa 100%);
}

.chbm-dashboard-stat-grid {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    margin:18px 0;
}

.chbm-dashboard-stat-card {
    display:block;
    text-decoration:none;
    color:inherit;
    transition:
        transform .15s ease,
        box-shadow .15s ease,
        border-color .15s ease;
}

.chbm-dashboard-stat-card:hover {
    transform:translateY(-2px);
    border-color:#cbd8e5;
    box-shadow:0 10px 24px rgba(23,59,99,.08);
}

.chbm-dashboard-stat-card span {
    display:block;
    color:var(--chbm-muted);
    font-size:12px;
    font-weight:750;
}

.chbm-dashboard-stat-card strong {
    display:block;
    margin:10px 0 5px;
    font-size:22px;
}

.chbm-dashboard-stat-card small {
    color:#8a94a3;
}

.chbm-dashboard-section-grid {
    margin-top:18px;
}

.chbm-dashboard-breakdown {
    display:grid;
    gap:0;
    margin-top:4px;
}

.chbm-dashboard-breakdown > div {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    min-height:48px;
    padding:11px 0;
    border-bottom:1px solid var(--chbm-border);
}

.chbm-dashboard-breakdown > div:last-child {
    border-bottom:0;
}

.chbm-dashboard-breakdown span {
    color:var(--chbm-muted);
    font-size:12px;
    font-weight:700;
}

.chbm-dashboard-breakdown strong {
    font-size:13px;
}

.chbm-dashboard-breakdown .is-total {
    margin-top:6px;
    padding:14px 14px;
    border:0;
    border-radius:12px;
    background:#f4f7fa;
}

.chbm-dashboard-breakdown .is-total span,
.chbm-dashboard-breakdown .is-total strong {
    color:#173b63;
    font-weight:850;
}

.chbm-dashboard-stock-health {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    margin-top:18px;
}

.chbm-dashboard-stock-health > div {
    padding:16px;
    border:1px solid var(--chbm-border);
    border-radius:13px;
    background:#f8fafc;
}

.chbm-dashboard-stock-health span {
    display:block;
    color:var(--chbm-muted);
    font-size:11px;
    font-weight:700;
    margin-bottom:8px;
}

.chbm-dashboard-stock-health strong {
    font-size:19px;
}

.chbm-dashboard-top-products,
.chbm-dashboard-activity {
    margin-top:10px;
}

.chbm-dashboard-product-row,
.chbm-dashboard-activity-row {
    display:flex;
    align-items:center;
    gap:12px;
    min-height:62px;
    padding:12px 0;
    border-bottom:1px solid var(--chbm-border);
}

.chbm-dashboard-product-row:last-child,
.chbm-dashboard-activity-row:last-child {
    border-bottom:0;
}

.chbm-dashboard-rank {
    width:30px;
    height:30px;
    flex:0 0 30px;
    display:grid;
    place-items:center;
    border-radius:9px;
    background:#eef3f8;
    color:#173b63;
    font-size:12px;
    font-weight:850;
}

.chbm-dashboard-product-info,
.chbm-dashboard-activity-row > div:nth-child(2) {
    min-width:0;
    flex:1;
}

.chbm-dashboard-product-info strong,
.chbm-dashboard-activity-row strong {
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:13px;
}

.chbm-dashboard-product-info small,
.chbm-dashboard-activity-row small {
    display:block;
    margin-top:4px;
    color:var(--chbm-muted);
    font-size:11px;
}

.chbm-dashboard-activity-row {
    color:inherit;
    text-decoration:none;
    transition:background-color .15s ease;
}

.chbm-dashboard-activity-row:hover {
    background:#f8fafc;
}

.chbm-dashboard-activity-icon {
    width:34px;
    height:34px;
    flex:0 0 34px;
    display:grid;
    place-items:center;
    border-radius:10px;
    font-size:11px;
    font-weight:850;
}

.chbm-dashboard-activity-icon.is-order {
    background:#e8f1fa;
    color:#235c91;
}

.chbm-dashboard-activity-icon.is-service {
    background:#e9f7ef;
    color:#17633f;
}

.chbm-dashboard-activity-icon.is-expense {
    background:#fff5e8;
    color:#9a641a;
}

.chbm-dashboard-activity-icon.is-loss {
    background:#fff0f0;
    color:#963737;
}

@media(max-width:1050px) {
    .chbm-dashboard-stat-grid {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:720px) {
    .chbm-dashboard-toolbar {
        align-items:stretch;
        flex-direction:column;
    }

    .chbm-dashboard-context {
        display:none;
    }

    .chbm-dashboard-stat-grid {
        grid-template-columns:1fr;
    }

    .chbm-dashboard-stock-health {
        grid-template-columns:1fr;
    }
}


/* Products v0.12 */
.chbm-products-toolbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:18px;
}

.chbm-products-search {
    width:min(340px,100%);
}

.chbm-product-cell {
    display:flex;
    align-items:center;
    gap:12px;
    min-width:230px;
}

.chbm-product-cell img,
.chbm-product-image-placeholder {
    width:46px;
    height:46px;
    flex:0 0 46px;
    border-radius:10px;
    border:1px solid var(--chbm-border);
    background:#f5f7fa;
    object-fit:contain;
}

.chbm-product-image-placeholder {
    display:grid;
    place-items:center;
    color:#8a94a3;
    font-size:12px;
    font-weight:850;
}

.chbm-product-cell strong,
.chbm-product-cell small {
    display:block;
}

.chbm-product-cell small {
    margin-top:4px;
    color:var(--chbm-muted);
    font-size:11px;
}

.chbm-product-status {
    display:inline-flex;
    align-items:center;
    padding:5px 8px;
    border-radius:999px;
    font-size:11px;
    font-weight:800;
    white-space:nowrap;
}

.chbm-product-status.is-publish {
    color:#17633f;
    background:#e7f6ed;
}

.chbm-product-status.is-draft {
    color:#5f6977;
    background:#edf0f4;
}

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

.chbm-product-form input[type="file"] {
    padding:10px;
    background:#ffffff;
}

.chbm-product-stock-note {
    display:flex;
    align-items:flex-start;
    gap:14px;
    padding:14px 16px;
    border:1px solid #d6e1ec;
    border-radius:13px;
    background:#f7faff;
}

.chbm-product-stock-note strong {
    color:#173b63;
    white-space:nowrap;
}

.chbm-product-stock-note span {
    color:var(--chbm-muted);
    font-size:12px;
    line-height:1.5;
}

.chbm-product-current-image {
    display:flex;
    align-items:center;
    gap:12px;
    padding:10px 12px;
    border:1px solid var(--chbm-border);
    border-radius:12px;
    background:#f8fafc;
}

.chbm-product-current-image span {
    color:var(--chbm-muted);
    font-size:11px;
    font-weight:700;
}

.chbm-product-current-image img {
    width:58px;
    height:58px;
    object-fit:contain;
    border-radius:10px;
    background:#fff;
    border:1px solid var(--chbm-border);
}

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

.chbm-product-readonly-grid > div {
    padding:14px;
    border:1px solid var(--chbm-border);
    border-radius:12px;
    background:#f8fafc;
}

.chbm-product-readonly-grid span {
    display:block;
    margin-bottom:6px;
    color:var(--chbm-muted);
    font-size:11px;
    font-weight:700;
}

.chbm-product-readonly-grid strong {
    color:#173b63;
    font-size:16px;
}

.chbm-status-filters button {
    transition:
        background-color .15s ease,
        color .15s ease,
        border-color .15s ease,
        transform .08s ease;
}

.chbm-status-filters button:hover {
    border-color:#b9c9da;
    background:#eef3f8;
    color:#173b63;
}

.chbm-status-filters button:active {
    transform:translateY(1px);
}

.chbm-status-filters button.is-active {
    background:#173b63;
    border-color:#173b63;
    color:#ffffff;
    box-shadow:0 3px 10px rgba(23,59,99,.14);
}

@media(max-width:850px) {
    .chbm-products-toolbar {
        align-items:stretch;
        flex-direction:column;
    }

    .chbm-products-search {
        width:100%;
    }

    .chbm-product-readonly-grid {
        grid-template-columns:1fr;
    }

    .chbm-product-stock-note {
        flex-direction:column;
        gap:6px;
    }
}


/* Product safe-delete v0.12.1 */
.chbm-product-danger-zone {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    margin-top:18px;
    padding:16px;
    border:1px solid #efcccc;
    border-radius:13px;
    background:#fff7f7;
}

.chbm-product-danger-zone strong,
.chbm-product-danger-zone span {
    display:block;
}

.chbm-product-danger-zone strong {
    color:#8f3030;
    margin-bottom:5px;
}

.chbm-product-danger-zone span {
    color:#7d6666;
    font-size:12px;
    line-height:1.45;
}

.chbm-button-danger {
    border:1px solid #b94343;
    background:#b94343;
    color:#ffffff;
    white-space:nowrap;
}

.chbm-button-danger:hover {
    border-color:#993535;
    background:#993535;
    color:#ffffff;
}

@media(max-width:650px) {
    .chbm-product-danger-zone {
        align-items:stretch;
        flex-direction:column;
    }

    .chbm-product-danger-zone form,
    .chbm-product-danger-zone button {
        width:100%;
    }
}


/* Start Fresh v0.14 */
.chbm-reset-warning {
    margin-bottom:18px;
    padding:16px 18px;
    border:1px solid #e6baba;
    border-radius:14px;
    background:#fff6f6;
}

.chbm-reset-warning strong {
    display:block;
    margin-bottom:6px;
    color:#8f3030;
    font-size:14px;
}

.chbm-reset-warning p {
    margin:0;
    color:#775e5e;
    font-size:12px;
    line-height:1.55;
}

.chbm-reset-layout {
    margin-bottom:18px;
}

.chbm-reset-list {
    display:grid;
    gap:0;
}

.chbm-reset-list > div {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    min-height:46px;
    padding:10px 0;
    border-bottom:1px solid var(--chbm-border);
}

.chbm-reset-list > div:last-child {
    border-bottom:0;
}

.chbm-reset-list span {
    color:var(--chbm-muted);
    font-size:12px;
    font-weight:700;
}

.chbm-reset-list strong {
    color:#173b63;
    font-size:13px;
}

.chbm-reset-kept {
    display:grid;
    gap:10px;
}

.chbm-reset-kept > div {
    padding:13px 14px;
    border:1px solid var(--chbm-border);
    border-radius:12px;
    background:#f8fafc;
}

.chbm-reset-kept strong,
.chbm-reset-kept span {
    display:block;
}

.chbm-reset-kept strong {
    margin-bottom:4px;
    color:#173b63;
    font-size:12px;
}

.chbm-reset-kept span {
    color:var(--chbm-muted);
    font-size:11px;
    line-height:1.45;
}

.chbm-reset-confirm-card {
    border-color:#efd2d2;
}

.chbm-reset-form {
    display:grid;
    gap:16px;
    max-width:650px;
}

.chbm-reset-check {
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:14px;
    border:1px solid #e2e7ed;
    border-radius:12px;
    background:#fafbfc;
}

.chbm-reset-check input {
    margin-top:3px;
}

.chbm-reset-check span {
    color:#4f5d6d;
    font-size:12px;
    line-height:1.5;
}

.chbm-reset-final-note {
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:13px 14px;
    border-radius:12px;
    background:#f5f8fb;
}

.chbm-reset-final-note strong {
    color:#173b63;
    white-space:nowrap;
}

.chbm-reset-final-note span {
    color:var(--chbm-muted);
    font-size:12px;
    line-height:1.5;
}

.chbm-reset-button {
    justify-self:start;
    min-width:150px;
}

.chbm-sidebar-footer a.is-active {
    color:#ffffff;
    font-weight:800;
}

@media(max-width:700px) {
    .chbm-reset-final-note {
        flex-direction:column;
        gap:4px;
    }

    .chbm-reset-button {
        width:100%;
    }
}
