html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    transition: background 0.3s;
    font-family: "Microsoft JhengHei", sans-serif;
    font-size: 14px;
    overflow: hidden; /* This prevents double scrollbars */
    background: #f4f1fa; /* 設定底色與主題一致 */
}

#content_area_dom {
    width: 100%;
    height: 100%;
    overflow: auto; /* This ensures scrolling within the content area */
    position: relative; /* Helps with positioning of child elements */
}

.webixapp {
    height: 100% !important;
}



@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.menu-icon {
    margin-right: 5px;
    font-size: 16px;
    color: #333;
}

.menu-text {
    font-weight: bold;
}

/* 🎯 IO 配置視窗的槽位卡片樣式 */
.io_slot_card {
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    margin: 5px;
    background: #ecf0f1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.io_slot_card:hover {
    border-color: #3498db;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);  /* 🎯 hover 時稍微上移 */
}

/* 🎯 可點擊的槽位卡片樣式 */
.io_slot_clickable {
    cursor: pointer;
}

.io_slot_clickable:hover {
    background: #d5e8f7 !important;  /* 🎯 hover 時背景色變化 */
}

.io_slot_clickable:active {
    transform: translateY(0px);  /* 🎯 點擊時回到原位 */
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.5);
}


/*底下是櫃子的配置顏色範例*/
.cabinetColor_1 {
    background-color: darkgreen;
    color: white;
}

.cabinetColor_2 {
    background-color: teal;
    color: white;
}

.cabinetColor_3 {
    background-color: purple;
    color: white;
}

.textCenter {
    text-align: center;
    line-height: 100px;
    font-size: 20px;
}




/*StoreProduct*/
.prod-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.prod-header {
    font-weight: bold;
    margin-bottom: 4px;
}

.prod-thumb img {
    max-width: 100%;
    display: block;
    margin: 4px auto;
}

.prod-info div {
    font-size: 12px;
    margin: 2px 0;
}

.prod-actions {
    text-align: center;
    margin-top: 6px;
}

    .prod-actions button {
        margin: 0 4px;
    }

/* 整條 toolbar 背景、邊框、高度 */
.component-toolbar {
    background: #f0f0f0;
    border-bottom: 1px solid #ccc;
    height: 40px;
    box-sizing: border-box;
}

/* toolbar 裡每個 item 的高度與文字置中 */
.component-toolbar-item {
    height: 32px;
    line-height: 32px;
    padding: 0 8px;
}

    /* icon 顏色與間距 */
    .component-toolbar-item .fa {
        color: #555;
        margin-right: 4px;
    }


/*列印用*/
@page {
    size: A4 landscape; /* 改成橫向 */
    margin: 10mm;
}

@media print {
    .webix_toolbar, .webix_button {
        display: none !important;
    }

    .printable-area {
        max-width: 750px;
        margin: auto;
        font-size: 12px; /* 縮小字體 */
    }

        .printable-area .webix_view.webix_datatable {
            width: auto !important;
            overflow: visible !important;
            max-width: 100% !important;
        }

        .printable-area .webix_ss_center_scroll,
        .printable-area .webix_ss_center {
            overflow: visible !important;
            width: 100% !important;
        }

        .printable-area .webix_column {
            white-space: nowrap !important;
            padding: 2px 4px !important; /* 減少內邊距 */
        }

        .printable-area .webix_cell {
            font-size: 11px !important; /* 進一步縮小儲存格字體 */
        }
}

/* 報表相關樣式 */
.report-card-head-wrap {
    background: transparent !important;
    border: none !important;
}

.report-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 14px;
    height: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    background: linear-gradient(180deg, #fbfcfe 0%, #f3f7fb 100%);
    border: 1px solid #dbe4ec;
    border-left: 5px solid #3498db;
    border-radius: 12px 12px 0 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.report-card-head-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 220px;
}

.report-card-head-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2d3d;
    min-width: 0;
}

.report-card-head-meta {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: #5d7288;
}

.report-card-head-tip {
    color: #7d8ea1;
    font-size: 14px;
    cursor: help;
    flex: 0 0 auto;
}

.report-inline-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    background: #f8f9fa;
    border-top: 1px solid #e1e4e8;
    color: #2c3e50;
}

.report-inline-summary-tip {
    color: #7d8ea1;
    font-size: 13px;
    cursor: help;
}

.report-chart-tilt-x .webix_canvas_text.webix_axis_item_x {
    transform: translateY(6px) rotate(-35deg);
    transform-origin: top center;
    white-space: nowrap;
    line-height: 1.1;
    font-size: 11px;
}

.kpi-card-container {
    margin: 0 10px;
}

.kpi-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
   transition: transform 0.2s;
}

.kpi-card:hover {
transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.kpi-card .kpi-title {
    font-size: 14px;
   color: #666;
    margin-bottom: 10px;
    font-weight: 600;
}

.kpi-card .kpi-value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
}

.kpi-card .kpi-comparison {
    font-size: 12px;
    color: #888;
    margin-top: 10px;
}

.kpi-card .kpi-comparison .fa {
 margin-left: 5px;
}

.datatable-action-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid #c9d6ea;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
    color: #36507a;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 1px 2px rgba(54, 80, 122, 0.12);
}

.datatable-action-chip:hover {
    background: linear-gradient(180deg, #f8fbff 0%, #dfeaff 100%);
    border-color: #9fb6df;
    color: #243b63;
    box-shadow: 0 3px 8px rgba(54, 80, 122, 0.18);
}

.datatable-action-chip .fa {
    font-size: 11px;
}

.replenish-info-box {
    border-radius: 16px;
    border: 1px solid #d9e5f4;
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    box-shadow: 0 8px 20px rgba(71, 92, 130, 0.08);
}

.replenish-card {
    border: 1px solid #d9e5f4;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    box-shadow: 0 6px 16px rgba(71, 92, 130, 0.06);
    overflow: hidden;
}

.replenish-summary-card .webix_template {
    padding-left: 2px;
    padding-right: 2px;
}

.replenish-qty-card {
    min-height: 130px;
    overflow: visible;
}

.replenish-card-label {
    font-size: 13px;
    color: #5f7698;
    font-weight: 700;
    margin-bottom: 6px;
}

.replenish-nested-box {
    box-shadow: none;
    border-color: #e4ecf8;
    background: linear-gradient(180deg, #fbfdff 0%, #f3f7fd 100%);
}

.replenish-thumb-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 14px;
    background:
        radial-gradient(circle at top right, rgba(118, 75, 162, 0.08), transparent 35%),
        linear-gradient(180deg, #f7fbff 0%, #eef4fd 100%);
    border-radius: 14px;
}

.replenish-thumb-image {
    max-width: 100%;
    max-height: 190px;
    object-fit: contain;
    filter: drop-shadow(0 8px 12px rgba(33, 48, 79, 0.12));
}

.replenish-summary-line {
    background: transparent !important;
}

.replenish-summary-title {
    font-size: 20px;
    font-weight: 700;
    color: #20324f;
    line-height: 1.35;
}

.replenish-summary-subtitle {
    font-size: 14px;
    color: #60738f;
    line-height: 1.45;
    margin-top: 6px;
}

.replenish-summary-meta {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.replenish-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e5eefb;
    color: #35537f;
    font-size: 12px;
    font-weight: 700;
}

.replenish-capacity {
    background: transparent !important;
}

.replenish-capacity-value {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: 28px;
    font-weight: 700;
    color: #284268;
}

.replenish-detail-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: #324d74;
    padding: 2px 0;
    background: transparent !important;
}

.replenish-detail-label {
    color: #70819a;
    font-weight: 600;
}

.replenish-detail-inline {
    background: transparent !important;
}

.cabinet-manager-shell {
    padding: 12px;
    background:
        radial-gradient(circle at top right, rgba(120, 149, 190, 0.14), transparent 32%),
        linear-gradient(180deg, #f7f9fc 0%, #eef3f9 100%);
}

.cabinet-main-pane {
    min-width: 0;
}

.cabinet-toolbar {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #d8e3f0;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(54, 80, 122, 0.06);
}

.cabinet-inspector-pane {
    background: transparent;
}

.cabinet-inspector-scroll {
    background: transparent !important;
}

.cabinet-side-card {
    border-radius: 20px;
    border: 1px solid #d8e3f0;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(246,250,255,0.98) 100%);
    box-shadow: 0 16px 32px rgba(53, 74, 108, 0.08);
    overflow: hidden;
}

.cabinet-side-card .webix_template,
.cabinet-layout-preview .webix_template,
.io-dialog-summary-shell .webix_template,
.io-section-title .webix_template,
.io-selection-shell .webix_template,
.io-draft-shell .webix_template,
.io-help-shell .webix_template,
.io-slot-card-shell .webix_template {
    padding: 0 !important;
}

.cabinet-side-card-hero {
    background:
        radial-gradient(circle at top right, rgba(100, 142, 214, 0.22), transparent 34%),
        linear-gradient(135deg, #153a63 0%, #3f6b9c 100%);
    border: none;
}

.cabinet-inspector-hero-inner {
    color: #fff;
    padding: 18px 20px;
}

.cabinet-inspector-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.cabinet-inspector-title {
    margin-top: 14px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.cabinet-inspector-subtitle {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.84);
}

.cabinet-inspector-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.cabinet-inspector-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.cabinet-inspector-chip.is-active {
    background: rgba(84, 214, 144, 0.22);
}

.cabinet-inspector-chip.is-inactive {
    background: rgba(255, 179, 71, 0.22);
}

.cabinet-side-card-meta {
    padding: 14px;
}

.cabinet-inspector-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.cabinet-meta-item {
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fdfefe 0%, #f2f7fd 100%);
    border: 1px solid #e1eaf5;
}

.cabinet-meta-label {
    display: block;
    font-size: 12px;
    color: #7a8ca8;
    font-weight: 700;
    margin-bottom: 6px;
}

.cabinet-meta-value {
    display: block;
    font-size: 15px;
    color: #223654;
    line-height: 1.35;
}

.cabinet-side-card-title {
    border-bottom: 1px solid #e7eef7;
    background: rgba(248, 251, 255, 0.84);
}

.cabinet-side-card-title-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px 13px;
    color: #244166;
    font-size: 13px;
    font-weight: 700;
}

.cabinet-side-card-title-inner span:last-child {
    color: #8aa0bd;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cabinet-image-template,
.cabinet-desc-template {
    background: transparent !important;
}

.cabinet-visual-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 176px;
    padding: 16px 18px;
    background:
        radial-gradient(circle at top right, rgba(81, 128, 201, 0.12), transparent 32%),
        linear-gradient(180deg, #f8fbff 0%, #eff5fc 100%);
}

.cabinet-visual-image {
    max-width: 100%;
    max-height: 108px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(36, 63, 98, 0.18));
}

.cabinet-visual-caption {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(31, 62, 102, 0.08);
    color: #37557f;
    font-size: 12px;
    font-weight: 700;
}

.cabinet-visual-frame-empty {
    color: #6f84a0;
}

.cabinet-visual-empty-icon {
    font-size: 28px;
    color: #90a6c2;
}

.cabinet-visual-empty-text {
    font-size: 13px;
}

.cabinet-layout-preview {
    background: transparent !important;
}

.cabinet-layout-preview .webix_view {
    background: transparent !important;
}

.cabinet-structure-empty {
    background: transparent !important;
}

.cabinet-structure-empty-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 150px;
    border: 1px dashed #c9d7e8;
    border-radius: 18px;
    color: #7f90a8;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f9fe 100%);
}

.cabinet-structure-leaf {
    border-radius: 18px;
    border: 1px solid #d4e0ee;
    background: linear-gradient(180deg, #ffffff 0%, #eff5fb 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.cabinet-structure-leaf-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 76px;
    padding: 12px;
}

.cabinet-structure-leaf-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #dfe9f7;
    color: #2d4a72;
    font-size: 12px;
    font-weight: 800;
}

.cabinet-description-body {
    padding: 18px;
}

.cabinet-description-text {
    margin: 0;
    color: #304868;
    line-height: 1.7;
    font-size: 14px;
}

.cabinet-description-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.cabinet-description-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eaf1fb;
    color: #31517c;
    font-size: 12px;
    font-weight: 700;
}

.cabinet-description-note {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f7faff;
    border: 1px solid #e3ecf7;
    color: #647a98;
    font-size: 12px;
    line-height: 1.6;
}

.cabinet-description-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 148px;
    padding: 16px;
    color: #7a8da7;
}

.cabinet-description-empty-icon {
    font-size: 26px;
    color: #9bb0ca;
}

.io-dialog-summary-shell {
    border-radius: 18px;
    border: 1px solid #dce7f4;
    background: linear-gradient(135deg, #143b63 0%, #315a86 100%);
    margin-bottom: 12px;
    overflow: hidden;
}

.io-dialog-summary {
    padding: 18px 20px;
    color: #fff;
}

.io-dialog-summary-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    font-size: 12px;
    font-weight: 700;
}

.io-dialog-summary-title {
    font-size: 24px;
    font-weight: 700;
    white-space: nowrap;
}

.io-dialog-summary-subtitle {
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    white-space: nowrap;
}

.io-dialog-summary-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.io-dialog-summary-divider {
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,0.22);
}

.io-dialog-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.io-dialog-stat {
    padding: 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.14);
}

.io-dialog-stat-label {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.72);
    font-weight: 700;
}

.io-dialog-stat-value {
    display: block;
    margin-top: 5px;
    font-size: 16px;
    color: #fff;
}

.io-editor-form .webix_el_box {
    padding-left: 0;
    padding-right: 0;
}

.io-editor-form .webix_inp_top_label {
    color: #405c82;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.io-editor-form .webix_el_richselect .webix_inp_static,
.io-editor-form .webix_el_richselect input {
    min-height: 40px;
}

.io-grid-panel,
.io-editor-panel {
    border-radius: 18px;
    border: 1px solid #d8e3f0;
    background: linear-gradient(180deg, #ffffff 0%, #f6fafe 100%);
    box-shadow: 0 12px 28px rgba(53, 74, 108, 0.07);
    overflow: hidden;
}

.io-section-title {
    border-bottom: 1px solid #e6edf7;
    background: rgba(248, 251, 255, 0.9);
}

.io-section-title-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    color: #29456c;
    font-size: 13px;
    font-weight: 700;
}

.io-section-title-inner span:last-child {
    color: #8ba0bb;
    font-size: 11px;
    font-weight: 700;
}

.io-grid-scroll,
.io-editor-scroll {
    background: transparent !important;
}

.io-slot-card-shell {
    background: transparent !important;
}

.io-slot-card-action,
.io-slot-placeholder {
    height: 100%;
    border-radius: 16px;
    border: 1px solid #d9e4f1;
    background: linear-gradient(180deg, #ffffff 0%, #f3f8fe 100%);
    padding: 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.io-slot-card-action {
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(52, 77, 112, 0.06);
}

.io-slot-card-action:hover {
    transform: translateY(-2px);
    border-color: #a9bfdc;
    box-shadow: 0 12px 24px rgba(52, 77, 112, 0.12);
}

.io-slot-card-action.is-selected {
    border-color: #3b6ea8;
    box-shadow: 0 14px 28px rgba(41, 78, 123, 0.2);
    background: linear-gradient(180deg, #fefefe 0%, #e9f2fd 100%);
}

.io-slot-card-action.is-configured {
    background: linear-gradient(180deg, #ffffff 0%, #edf7f1 100%);
}

.io-slot-card-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.io-slot-chip,
.io-selection-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #e7eef8;
    color: #35557e;
    font-size: 12px;
    font-weight: 700;
}

.io-slot-card-title {
    margin-top: 12px;
    color: #243a5a;
    font-size: 17px;
    font-weight: 700;
}

.io-slot-card-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.io-selection-values,
.io-draft-values {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.io-slot-card-value,
.io-selection-values span,
.io-draft-values span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 12px;
    background: rgba(36, 63, 98, 0.06);
    color: #405c82;
    font-size: 12px;
    font-weight: 700;
}

.io-slot-card-value {
    display: flex;
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 7px 8px;
    gap: 4px;
}

.io-slot-card-value span,
.io-slot-card-value strong {
    white-space: nowrap;
}

.io-slot-card-value strong,
.io-selection-values strong,
.io-draft-values strong {
    color: #223654;
    font-size: 14px;
}

.io-slot-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    border-style: dashed;
    color: #7d91ab;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f8fc 100%);
}

.io-slot-placeholder-chip {
    font-size: 12px;
    font-weight: 700;
}

.io-slot-placeholder-text {
    font-size: 12px;
    line-height: 1.5;
}

.io-grid-empty-inner,
.io-selection-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 130px;
    color: #8092aa;
}

.io-selection-card {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid #dbe5f1;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fd 100%);
}

.io-selection-shell,
.io-help-shell {
    background: transparent !important;
}

.io-selection-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.io-selection-title {
    font-size: 16px;
    color: #233654;
    font-weight: 700;
    line-height: 1.2;
}

.io-selection-meta {
    display: flex;
    gap: 8px;
    margin-top: 0;
}

.io-draft-card {
    margin-top: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #edf3fb;
    color: #314f7a;
}

.io-draft-card-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #778ca8;
}

.io-draft-label {
    font-size: 12px;
    font-weight: 700;
}

.io-help-card {
    margin-top: 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfcfe 0%, #f3f7fc 100%);
    border: 1px solid #e1e9f4;
}

.io-help-line {
    color: #657b99;
    font-size: 12px;
    line-height: 1.6;
}

.io-help-line + .io-help-line {
    margin-top: 9px;
}

.io-slot-card-status {
    margin-top: 10px;
    color: #657b99;
    font-size: 12px;
    line-height: 1.6;
}

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

    .io-dialog-summary-title,
    .io-dialog-summary-subtitle {
        white-space: normal;
    }

    .io-dialog-summary-divider {
        display: none;
    }
}

.replenish-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #d9e5f4;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
    color: #2e4a75;
    font-size: 13px;
}

.replenish-meta-item strong {
    font-size: 15px;
    color: #1f3659;
}

.replenish-meta-label {
    color: #6f82a0;
    font-weight: 700;
}

.replenish-store-simple {
    background: transparent !important;
}

.replenish-store-simple-line {
    color: #2f4c77;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    padding: 4px 2px;
}

.replenish-counter .webix_el_box,
.replenish-counter .webix_inp_counter {
    height: 42px !important;
}

.replenish-counter input {
    border-radius: 10px !important;
    border: 1px solid #cfdbef !important;
    background: #fff !important;
    font-size: 16px;
    font-weight: 700;
    color: #26446f;
}

.replenish-counter .webix_inp_counter_next,
.replenish-counter .webix_inp_counter_prev {
    background: #e8effa !important;
    color: #47658f !important;
    border-radius: 10px !important;
}

.replenish-price-counter input {
    font-size: 18px;
}

.replenish-flat-panel {
    border: 1px solid #d9e5f4;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
    box-shadow: 0 6px 16px rgba(71, 92, 130, 0.06);
}

.replenish-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 2px 10px;
    color: #4a6286;
    font-size: 14px;
    font-weight: 700;
}

.replenish-price-label {
    color: #6f82a0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cabinet-window-head-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.cabinet-window-head-title-compact {
    font-size: 12px;
    letter-spacing: 0.01em;
}

.io_slot_card {
    border: 1px solid #d7e3f4;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    box-shadow: 0 6px 14px rgba(74, 98, 138, 0.08);
    overflow: hidden;
}

.io_slot_clickable {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.io_slot_clickable:hover {
    transform: translateY(-2px);
    border-color: #94afe0;
    box-shadow: 0 10px 20px rgba(74, 98, 138, 0.16);
}

.io-slot-card-inner {
    height: 100%;
    padding: 12px 14px;
    background:
        radial-gradient(circle at top right, rgba(118, 75, 162, 0.08), transparent 38%),
        linear-gradient(180deg, rgba(235, 243, 255, 0.9) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.io-slot-card-head {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.io-slot-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e4edfb;
    color: #47628c;
    font-size: 11px;
    font-weight: 700;
}

.io-slot-card-title {
    color: #23344d;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
}

.io-config-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding: 0 14px;
    background: linear-gradient(135deg, #314563 0%, #3f5a84 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border-top: 1px solid #d9e2f0;
}

.io-config-panel {
    background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.io-selected-slot-card {
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #eff5ff 100%);
    border: 1px solid #d5e1f1;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
    padding: 8px 10px;
}

.io-selected-slot-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 100%;
}

.io-selected-slot-summary-label {
    color: #667892;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.io-selected-slot-empty {
    color: #7b8798;
    font-size: 14px;
    font-weight: 700;
}

.io-selected-slot-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: #dfeafb;
    color: #2f4e78;
    font-size: 14px;
    font-weight: 700;
}

.io-selected-slot-meta {
    color: #7d8da3;
    font-size: 11px;
    font-weight: 700;
}

.io-compact-combo .webix_inp_top_label,
.io-compact-combo .webix_el_box > label {
    font-size: 12px;
    font-weight: 700;
    color: #445a7c;
}

.io-compact-combo .webix_el_box {
    height: 36px !important;
}

.io-compact-combo input,
.io-compact-combo .webix_input_icon,
.io-compact-combo .webix_input {
    height: 36px !important;
    line-height: 36px !important;
}

.io-compact-combo input {
    border: 1px solid #cfdbef !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: inset 0 1px 2px rgba(39, 58, 93, 0.04);
    font-size: 13px;
    color: #30496d;
}

.io-compact-combo .webix_input_icon {
    color: #8aa0c3;
}

.io-confirm-button {
    border-radius: 10px !important;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(132, 103, 194, 0.2);
    font-size: 13px !important;
}

/* Webix confirm / alert / prompt dialogs should follow the misty lavender theme */
.theme-misty div.webix_modal_cover {
    background: rgba(92, 68, 136, 0.18);
    opacity: 1;
    backdrop-filter: blur(2px);
}

.theme-misty .webix_modal_box {
    border: 1px solid #ddd1f1;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
    box-shadow: 0 18px 42px rgba(92, 68, 136, 0.2);
    overflow: hidden;
    font-family: "Microsoft JhengHei", sans-serif;
}

.theme-misty .webix_popup_title {
    padding: 22px 20px 10px;
    color: #665187;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.02em;
}

.theme-misty .webix_popup_text {
    padding: 10px 24px 0;
    color: #705d92;
    line-height: 1.7;
    text-align: center;
}

.theme-misty .webix_alert .webix_popup_title,
.theme-misty .webix_confirm .webix_popup_title,
.theme-misty .webix_prompt .webix_popup_title,
.theme-misty .webix_alert .webix_popup_text,
.theme-misty .webix_confirm .webix_popup_text,
.theme-misty .webix_prompt .webix_popup_text,
.theme-misty .webix_alert-warning .webix_popup_title,
.theme-misty .webix_confirm-warning .webix_popup_title,
.theme-misty .webix_prompt-warning .webix_popup_title,
.theme-misty .webix_alert-warning .webix_popup_text,
.theme-misty .webix_confirm-warning .webix_popup_text,
.theme-misty .webix_prompt-warning .webix_popup_text,
.theme-misty .webix_alert-error .webix_popup_title,
.theme-misty .webix_confirm-error .webix_popup_title,
.theme-misty .webix_prompt-error .webix_popup_title,
.theme-misty .webix_alert-error .webix_popup_text,
.theme-misty .webix_confirm-error .webix_popup_text,
.theme-misty .webix_prompt-error .webix_popup_text {
    box-shadow: inset 0 4px #cbb4eb !important;
}

.theme-misty .webix_popup_controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 18px 20px 22px;
}

.theme-misty .webix_modal_box .webix_popup_button {
    margin: 0;
}

.theme-misty .webix_popup_button {
    min-width: 108px;
    height: 38px;
    line-height: 38px;
    border: 1px solid #dfd2f1;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8f2ff 0%, #f0e7fb 100%);
    color: #775da7;
    font-family: "Microsoft JhengHei", sans-serif;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 8px 16px rgba(132, 103, 194, 0.12);
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.theme-misty .webix_popup_button div {
    color: inherit;
    font-weight: inherit;
}

.theme-misty .webix_popup_button:hover,
.theme-misty .webix_popup_button:focus {
    background: linear-gradient(180deg, #f2e8ff 0%, #e9dcfb 100%);
    box-shadow: 0 10px 18px rgba(132, 103, 194, 0.16);
}

.theme-misty .webix_popup_button:active {
    background: #e8dbfb;
    transform: translateY(1px);
}

.theme-misty .webix_popup_button.confirm {
    border-color: #bda0e8;
    background: linear-gradient(180deg, #cbb2f0 0%, #b493e4 100%);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(132, 103, 194, 0.24);
}

.theme-misty .webix_popup_button.confirm:hover,
.theme-misty .webix_popup_button.confirm:focus {
    background: linear-gradient(180deg, #c3a8ec 0%, #ab89de 100%);
}

.theme-misty .webix_popup_button.confirm:active {
    background: #a783db;
}

/* Webix hint / tooltip should match the misty lavender theme */
.theme-misty .webix_tooltip,
.theme-misty .webix_global_tooltip {
    padding: 6px 10px;
    border: 1px solid #cdbce8;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(109, 87, 148, 0.96) 0%, rgba(92, 70, 129, 0.96) 100%);
    color: #fffdfd;
    font-family: "Microsoft JhengHei", sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 24px rgba(72, 54, 108, 0.26);
    backdrop-filter: blur(4px);
}

/* Webix tabview / datatable states should not fall back to the default blue */
.theme-misty .webix_all_tabs {
    background: linear-gradient(180deg, #f7f2fc 0%, #efe6f8 100%);
    border-bottom: 1px solid #ddd1f1;
}

.theme-misty .webix_item_tab {
    color: #7a6799;
    background: transparent;
    border: none;
    border-radius: 12px 12px 0 0;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.theme-misty .webix_item_tab:hover,
.theme-misty .webix_item_tab:focus {
    background: rgba(203, 180, 235, 0.18);
    color: #654e88;
}

.theme-misty .webix_all_tabs .webix_item_tab.webix_selected,
.theme-misty .webix_all_tabs .webix_item_tab.webix_selected:hover,
.theme-misty .webix_all_tabs .webix_item_tab.webix_selected:focus,
.theme-misty .webixtype_bottom .webix_item_tab.webix_selected,
.theme-misty .webixtype_bottom .webix_item_tab.webix_selected:hover,
.theme-misty .webixtype_bottom .webix_item_tab.webix_selected:focus {
    background: linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
    color: #5d4585;
    box-shadow: inset 0 -3px #b999e6;
}

.theme-misty .webix_item_tab.webix_selected .webix_icon,
.theme-misty .webix_item_tab.webix_selected .webix_img_btn_text,
.theme-misty .webix_item_tab.webix_selected .webix_icon_btn,
.theme-misty .webix_all_tabs .webix_tab_more_icon .webix_icon {
    color: #7d60ad;
}

.theme-misty .webix_dtable .webix_ss_header .webix_hcell,
.theme-misty .webix_dtable .webix_ss_footer .webix_hcell {
    background: linear-gradient(180deg, #f6f1fb 0%, #eee4f8 100%);
    color: #684f8d;
}

.theme-misty .webix_hcell .webix_icon,
.theme-misty .webix_hcell .fa,
.theme-misty .webix_hcell .fas,
.theme-misty .webix_hcell .webix_excel_filter,
.theme-misty .webix_hcell .webix_sort_icon {
    color: #8a6cbc !important;
}

.theme-misty .webix_dtable .webix_ss_header .webix_hcolumn div.webix_last_row,
.theme-misty .webix_dtable .webix_ss_header .webix_span.webix_last_row,
.theme-misty .webix_dtable div.webix_ss_vscroll_header {
    border-bottom-color: #c8afea;
}

.theme-misty .webix_column > div.webix_row_select,
.theme-misty .webix_column > div.webix_cell_select,
.theme-misty .webix_column > div.webix_column_select,
.theme-misty .webix_cell.webix_dtable_colrow.webix_selected {
    background: linear-gradient(180deg, #f7f1fd 0%, #efe4fa 100%);
    color: #563f7c;
    box-shadow: inset 4px 0 0 #b693e5;
}

.theme-misty .webix_column > div.webix_row_select:focus,
.theme-misty .webix_column > div.webix_cell_select:focus,
.theme-misty .webix_column > div.webix_column_select:focus,
.theme-misty .webix_cell.webix_dtable_colrow.webix_selected:focus,
.theme-misty .webix_dtable_focused .webix_column > div.webix_row_select,
.theme-misty .webix_dtable_focused .webix_cell.webix_dtable_colrow.webix_selected {
    background: linear-gradient(180deg, #f3ebfc 0%, #e8dbf8 100%);
    color: #4d3773;
}

.category-page-shell {
    padding: 12px;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(139, 112, 191, 0.12), transparent 28%),
        linear-gradient(180deg, #f7f3fb 0%, #f1edf8 100%);
}

.category-toolbar {
    margin-bottom: 10px;
    border: 1px solid #ddd1f1;
    border-radius: 16px;
    min-width: 0;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(98, 76, 138, 0.08);
}

.category-toolbar-sub {
    margin-top: -6px;
}

.category-toolbar .webix_el_button button,
.category-toolbar .webix_el_button .webix_button {
    white-space: nowrap;
}

.category-panel {
    border: 1px solid #ddd1f1;
    border-radius: 18px;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    background: linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
    box-shadow: 0 12px 24px rgba(98, 76, 138, 0.08);
    overflow: hidden;
}

.category-panel-header {
    background: linear-gradient(180deg, #f7f2fc 0%, #eee5f8 100%) !important;
    color: #654d89 !important;
    border-bottom: 1px solid #ddd1f1 !important;
    font-weight: 700;
}

.category-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 2px;
}

.category-panel-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(123, 97, 170, 0.12);
    color: #71539d;
    font-size: 12px;
    font-weight: 700;
}

.category-summary-template .webix_template,
.category-image-template .webix_template,
.category-usage-template .webix_template {
    padding: 0 !important;
}

.category-summary-card {
    height: 100%;
    box-sizing: border-box;
    padding: 16px 18px;
    background:
        radial-gradient(circle at top right, rgba(143, 112, 197, 0.16), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f7f1fd 100%);
}

.category-summary-card.is-empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-summary-title {
    color: #4d3b70;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.category-summary-title .fa {
    margin-right: 8px;
    color: #8a6cbc;
}

.category-summary-subtitle {
    margin-top: 8px;
    color: #6f6288;
    font-size: 13px;
    line-height: 1.6;
}

.category-summary-metrics {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.category-summary-metric {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(121, 95, 168, 0.08);
    color: #5a467d;
    font-size: 12px;
    font-weight: 700;
}

.category-summary-metric strong {
    font-size: 15px;
    color: #40305f;
}

.category-summary-metric .fa {
    color: #8768b7;
}

.category-detail-form .webix_el_box {
    padding-left: 0;
    padding-right: 0;
}

.category-detail-form .webix_form {
    padding-bottom: 6px;
}

.category-page-shell .webix_layout_space,
.category-page-shell .webix_resizer,
.category-page-shell .webix_scroll_cont,
.category-page-shell .webix_view {
    box-sizing: border-box;
}

.category-image-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 16px;
    background:
        radial-gradient(circle at top right, rgba(143, 112, 197, 0.14), transparent 34%),
        linear-gradient(180deg, #faf7fe 0%, #f3eef9 100%);
}

.category-image-preview {
    max-width: 100%;
    max-height: 126px;
    object-fit: contain;
    filter: drop-shadow(0 10px 16px rgba(77, 59, 112, 0.16));
}

.category-image-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #8a7ca5;
    font-size: 13px;
    font-weight: 700;
}

.category-image-empty .fa {
    font-size: 28px;
    color: #a792cb;
}

.category-info-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    color: #6e6481;
    line-height: 1.6;
}

.category-info-empty .fa {
    color: #8a6cbc;
}

.category-usage-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 16px 8px;
}

.category-usage-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f2fc 100%);
    border: 1px solid #e2d7f2;
    color: #6d5a8d;
}

.category-usage-item .fa {
    color: #8a6cbc;
}

.category-usage-item strong {
    color: #453460;
    font-size: 15px;
}

.category-usage-item label {
    color: #7d7192;
    font-size: 12px;
    font-weight: 700;
}

.category-usage-reason {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0 16px 14px;
    color: #6d6282;
    font-size: 13px;
    line-height: 1.6;
}

.category-usage-reason .fa {
    margin-top: 2px;
    color: #8a6cbc;
}

@media (max-width: 1280px) {
    .category-usage-grid {
        grid-template-columns: 1fr;
    }
}
