/**
 * OmniTeQ Product Management — mockup look & feel
 * Presentation only; does not change product business logic.
 */

.ot-products-page {
    --otp-bg: #f4f7fe;
    --otp-surface: #ffffff;
    --otp-text: #0f172a;
    --otp-muted: #64748b;
    --otp-border: #e2e8f0;
    --otp-primary: #2563eb;
    --otp-primary-soft: rgba(37, 99, 235, 0.1);
    --otp-radius: 3px;
    --otp-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.25rem 1.5rem;
}

.ot-products-page .content-header,
.ot-products-page > .row:first-child > .col-md-12 > h1 {
    display: none;
}

/* Page header */
.ot-products-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.25rem 0 1.1rem;
}

.ot-products-header__title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--otp-text);
    line-height: 1.2;
}

.ot-products-header__subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--otp-muted);
    font-weight: 500;
}

.ot-products-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.ot-products-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 38px;
    padding: 0.45rem 0.95rem;
    border-radius: 3px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.ot-products-btn i,
.ot-products-btn svg {
    font-size: 0.9rem;
    width: 1em;
    height: 1em;
}

.ot-products-btn--primary {
    background: var(--otp-primary);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.ot-products-btn--primary:hover {
    background: #1d4ed8;
    color: #fff !important;
    transform: translateY(-1px);
}

.ot-products-btn--secondary {
    background: #fff;
    color: #334155 !important;
    border-color: var(--otp-border);
}

.ot-products-btn--secondary:hover {
    border-color: #cbd5e1;
    color: var(--otp-primary) !important;
    background: #f8fafc;
}

.ot-products-btn--ghost {
    background: transparent;
    color: #64748b !important;
    border-color: var(--otp-border);
}

.ot-products-btn--back {
    gap: 0.28rem;
    min-height: 38px;
    padding: 0.4rem 0.75rem 0.4rem 0.55rem;
    border-radius: 3px;
    background: linear-gradient(180deg, #1a2740 0%, #0f172a 100%);
    color: #fff !important;
    border: 1.5px solid #3b82f6;
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.18),
        0 4px 12px rgba(15, 23, 42, 0.24);
    font-weight: 700;
    letter-spacing: 0;
}

.ot-products-btn--back:hover {
    background: linear-gradient(180deg, #243552 0%, #152033 100%);
    border-color: #60a5fa;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow:
        0 0 0 1px rgba(96, 165, 250, 0.25),
        0 6px 16px rgba(15, 23, 42, 0.3);
}

.ot-products-btn--back svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.ot-products-btn--back span {
    line-height: 1;
}

/* Stats strip */
.ot-products-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 1.1rem;
}

.ot-products-stat {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.05rem;
    background: var(--otp-surface);
    border-radius: 3px;
    box-shadow: var(--otp-shadow);
    border: 1px solid #eef2f7;
    min-width: 0;
}

.ot-products-stat__icon {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.05rem;
}

/* Soft square icon tiles (mockup) */
.ot-products-stat__icon--blue { background: #dbeafe; color: #2563eb; }
.ot-products-stat__icon--amber { background: #fef3c7; color: #d97706; }
.ot-products-stat__icon--red { background: #fee2e2; color: #dc2626; }
.ot-products-stat__icon--sky { background: #e0f2fe; color: #0284c7; }
.ot-products-stat__icon--green { background: #dcfce7; color: #16a34a; }
.ot-products-stat__icon--teal { background: #ccfbf1; color: #0d9488; }
.ot-products-stat__icon--purple { background: #ede9fe; color: #7c3aed; }
.ot-products-stat__icon--orange { background: #ffedd5; color: #ea580c; }

.ot-products-stat__label {
    margin: 0;
    font-size: 0.75rem;
    color: var(--otp-muted);
    font-weight: 500;
}

.ot-products-stat__value {
    margin: 0.15rem 0 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--otp-text);
    line-height: 1.15;
}

.ot-products-stat__meta {
    margin: 0.2rem 0 0;
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Landing cards — compact: icon + title left-aligned on one row, short desc below */
.ot-products-landing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.ot-products-landing-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.45rem;
    min-height: 0;
    padding: 0.9rem 1rem;
    background: var(--otp-surface);
    border-radius: var(--otp-radius);
    box-shadow: var(--otp-shadow);
    border: 1px solid transparent;
    text-decoration: none !important;
    color: inherit !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ot-products-landing-card:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
    color: inherit !important;
    text-decoration: none !important;
}

.ot-products-landing-card__row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.7rem;
    min-width: 0;
    width: 100%;
}

.ot-products-landing-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

/* Soft square icon tiles — match List Products KPI icons */
.ot-products-landing-card__icon--blue { background: #dbeafe; color: #2563eb; }
.ot-products-landing-card__icon--green { background: #dcfce7; color: #16a34a; }
.ot-products-landing-card__icon--purple { background: #ede9fe; color: #7c3aed; }
.ot-products-landing-card__icon--orange { background: #ffedd5; color: #ea580c; }
.ot-products-landing-card__icon--teal { background: #ccfbf1; color: #0d9488; }
.ot-products-landing-card__icon--olive,
.ot-products-landing-card__icon--navy,
.ot-products-landing-card__icon--sky { background: #e0f2fe; color: #0284c7; }
.ot-products-landing-card__icon--maroon { background: #ffe4e6; color: #e11d48; }
.ot-products-landing-card__icon--yellow,
.ot-products-landing-card__icon--amber { background: #fef3c7; color: #d97706; }
.ot-products-landing-card__icon--red { background: #fee2e2; color: #dc2626; }
.ot-products-landing-card__icon--grey,
.ot-products-landing-card__icon--indigo { background: #e2e8f0; color: #475569; }

.ot-products-landing-card__icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.ot-products-landing-card__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--otp-text);
    line-height: 1.25;
    min-width: 0;
}

.ot-products-landing-card__desc {
    margin: 0;
    padding-left: calc(40px + 0.7rem); /* line up under the title */
    font-size: 0.8rem;
    color: var(--otp-muted);
    line-height: 1.35;
}

.ot-products-landing-card__cta {
    display: none;
}

/* Panel / table chrome */
.ot-products-panel {
    background: var(--otp-surface);
    border-radius: var(--otp-radius);
    box-shadow: var(--otp-shadow);
    padding: 0.85rem 1rem 1rem;
    margin-bottom: 1rem;
}

.ot-products-page .business-table-card,
.ot-products-page .box,
.ot-products-page .nav-tabs-custom {
    border-radius: var(--otp-radius) !important;
    box-shadow: var(--otp-shadow) !important;
    border: none !important;
    overflow: hidden;
}

.ot-products-page .business-table-card__title,
.ot-products-page .box-header .box-title {
    font-weight: 700 !important;
    color: var(--otp-text) !important;
}

.ot-products-page .btn-primary,
.ot-products-page .business-table-add-btn {
    background: var(--otp-primary) !important;
    border-color: var(--otp-primary) !important;
    border-radius: 3px !important;
    font-weight: 600 !important;
}

.ot-products-page .form-control,
.ot-products-page .select2-container--default .select2-selection--single {
    border-radius: 3px !important;
    border-color: var(--otp-border) !important;
    min-height: 38px;
}

.ot-products-page .nav-tabs-custom > .nav-tabs > li.active > a {
    color: var(--otp-primary) !important;
    border-bottom-color: var(--otp-primary) !important;
    font-weight: 600;
}

/* Form cards (Add Product) */
.ot-products-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ot-products-form-card {
    background: var(--otp-surface);
    border-radius: var(--otp-radius);
    box-shadow: var(--otp-shadow);
    padding: 1.1rem 1.15rem 1.2rem;
    min-width: 0;
}

.ot-products-form-card__title {
    margin: 0 0 0.85rem;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--otp-text);
}

.ot-products-page .box.box-solid,
.ot-products-page .box.box-primary {
    border-radius: var(--otp-radius) !important;
    box-shadow: var(--otp-shadow) !important;
    border-top: 0 !important;
}

.ot-products-page .box-header.with-border {
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 0.9rem 1.1rem !important;
}

.ot-products-page .box-body {
    padding: 1rem 1.1rem 1.15rem !important;
}

/* Stock status badges — rectangular chips (mockup), not pills */
.ot-products-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.12rem 0.42rem;
    border-radius: 3px;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.ot-products-pill--success {
    background: #dcfce7;
    color: #15803d;
}

.ot-products-pill--warning {
    background: #ffedd5;
    color: #c2410c;
}

.ot-products-pill--danger {
    background: #fee2e2;
    color: #b91c1c;
}

@media (max-width: 1280px) {
    .ot-products-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

@media (max-width: 1100px) {
    .ot-products-landing-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .ot-products-landing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .ot-products-page {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .ot-products-stats,
    .ot-products-landing-grid,
    .ot-products-form-grid {
        grid-template-columns: 1fr;
    }

    .ot-products-header__title {
        font-size: 1.3rem;
    }
}

/* ===== List Products — full mockup match ===== */

/* Hide hub secondary nav (Back / Overview / Products...) on this page */
body.ot-products-list-body .hub-area-top-nav,
body.ot-labels-page-body .hub-area-top-nav {
    display: none !important;
}

.ot-products-list-page {
    --otp-bg: #f4f7fe;
}

.ot-products-list-page .ot-products-stats {
    margin-bottom: 1rem;
    gap: 10px;
}

.ot-products-list-page .ot-products-stat {
    border-radius: 3px;
    padding: 0.9rem 0.95rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.03);
}

.ot-products-list-page .ot-products-stat__icon {
    width: 38px;
    height: 38px;
    border-radius: 3px;
    font-size: 1rem;
}

.ot-products-stat__icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.ot-products-list-page .ot-stock-cell {
    align-items: flex-start;
    gap: 0.35rem;
}

.ot-products-list-page .ot-products-pill {
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
}

.ot-products-list-page .ot-products-list-shell,
.ot-products-list-page #product_list_tab {
    overflow: visible;
    position: relative;
    z-index: 20;
}

/* Discounts: keep the list card short so the daily promotions table stays on screen */
.discount-list-page.sa-page {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.discount-list-page .ot-products-header {
    margin-bottom: 0.55rem;
}

.discount-list-page .ot-products-header__subtitle {
    margin-top: 0.15rem;
}

.discount-list-page .ot-products-filterbar {
    margin-bottom: 0.55rem;
    padding: 0.4rem 0.65rem;
}

.discount-list-page .ot-products-list-shell,
.discount-list-page #discountsBusinessTable.business-table-card,
.discount-list-page #discountsBusinessTable.business-table-component {
    flex: 0 1 auto;
    min-height: 0;
    height: auto;
}

.discount-list-page #discountsBusinessTable.business-table-card,
.discount-list-page #discountsBusinessTable.business-table-component {
    max-height: min(42vh, calc(100vh - 360px));
}

.discount-list-page #discountsBusinessTable .business-table-body,
.discount-list-page #discountsBusinessTable .business-table-body--flat {
    overflow: hidden;
    min-height: 0;
}

.discount-list-page #recurring-promotions-panel {
    flex: 0 0 auto;
    margin-top: 0.75rem;
}

/* Filter bar — single compact row */
.ot-products-filterbar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
    padding: 0.55rem 0.7rem;
    margin-bottom: 0.85rem;
    background: #fff;
    border-radius: 3px;
    box-shadow: var(--otp-shadow);
    border: 1px solid #eef2f7;
    overflow: visible;
    position: relative;
    z-index: 30;
}

.ot-products-filterbar__search {
    flex: 0 0 190px;
    width: 190px;
    min-width: 160px;
    max-width: 220px;
}

/*
 * Shared list search box (products / suppliers / purchases / POs):
 * icon is an inline leading slot — never overlays placeholder/text.
 * Uses theme tokens so dark mode never shows white chrome.
 */
.ot-products-filterbar__search .ot-dt-search,
.ot-dt-search {
    --ot-search-bg: var(--ot-control-bg-muted, #f8fafc);
    --ot-search-border: var(--ot-control-border, var(--otp-border, #e2e8f0));
    --ot-search-text: var(--ot-text, var(--otp-text, #0f172a));
    --ot-search-muted: var(--ot-text-muted, #94a3b8);
    --ot-search-focus-bg: var(--ot-control-bg, var(--ot-surface, #ffffff));
    --ot-search-focus-border: var(--ot-primary, #2563eb);

    display: flex !important;
    align-items: center;
    gap: 0.4rem;
    margin: 0 !important;
    width: 100%;
    min-height: 34px;
    height: 34px;
    padding: 0 0.55rem 0 0.65rem !important;
    border: 1px solid var(--ot-search-border) !important;
    border-radius: 3px !important;
    background: var(--ot-search-bg) !important;
    background-color: var(--ot-search-bg) !important;
    color: var(--ot-search-text) !important;
    box-shadow: none !important;
    position: relative;
    box-sizing: border-box;
}

.ot-products-filterbar__search .ot-search-icon,
.ot-dt-search .ot-search-icon {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 14px;
    text-align: center;
    color: var(--ot-search-muted) !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    z-index: 1;
    pointer-events: none;
    font-size: 0.78rem;
}

.ot-products-filterbar__search .ot-product-search-input,
.ot-dt-search .ot-product-search-input,
.ot-products-filterbar__search .dataTables_filter input,
.ot-dt-search .dataTables_filter input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    font-size: 0.78rem !important;
    line-height: 1.2 !important;
    color: var(--ot-search-text) !important;
    -webkit-text-fill-color: var(--ot-search-text) !important;
    caret-color: var(--ot-search-text);
}

.ot-products-filterbar__search .ot-product-search-input::placeholder,
.ot-dt-search .ot-product-search-input::placeholder {
    color: var(--ot-search-muted) !important;
    -webkit-text-fill-color: var(--ot-search-muted) !important;
    opacity: 1;
}

.ot-products-filterbar__search .ot-product-search-input:focus,
.ot-dt-search .ot-product-search-input:focus {
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

.ot-products-filterbar__search .ot-dt-search:focus-within,
.ot-dt-search:focus-within {
    border-color: var(--ot-search-focus-border) !important;
    background: var(--ot-search-focus-bg) !important;
    background-color: var(--ot-search-focus-bg) !important;
}

/* Kill browser search-field decorations that flash white in dark theme */
.ot-dt-search input[type="search"]::-webkit-search-decoration,
.ot-dt-search input[type="search"]::-webkit-search-cancel-button,
.ot-dt-search input[type="search"]::-webkit-search-results-button,
.ot-dt-search input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

/* Custom search input is the source of truth — hide injected DataTables filter */
.ot-products-filterbar__search:has(.ot-product-search-input) .dataTables_filter,
.ot-products-filterbar__search .ot-dt-search + .dataTables_filter {
    display: none !important;
}

.ot-filter-check {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    min-height: 28px;
    height: 28px;
    padding: 0 0.35rem;
    margin: 0;
    border: 1px solid #e8eef5;
    border-radius: 3px;
    background: #fafbfc;
    font-size: 0.66rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    cursor: pointer;
    flex: 0 0 auto;
}

.ot-filter-check__input {
    width: 12px !important;
    height: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    accent-color: var(--otp-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.ot-products-filterbar__tools {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex: 0 0 auto;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 0;
    padding-left: 0.45rem;
    border-left: 1px solid #eef2f7;
    position: relative;
    z-index: 40;
}

.ot-products-filterbar__selects {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 auto;
    min-width: 0;
}

.ot-products-filterbar__selects .select2-container {
    width: auto !important;
    flex: 1 1 0;
    min-width: 95px;
    max-width: 130px;
}

/* Compact date-range field — don't let it stretch the filter bar */
.ot-products-filterbar__selects .ot-filter-daterange,
.ot-purchases-page #purchase_list_filter_date_range,
.ot-purchase-orders-page #po_list_filter_date_range,
.ot-purchase-requisitions-page #pr_list_filter_date_range,
.ot-purchase-requisitions-page #pr_list_filter_required_by_date,
.ot-purchase-returns-page #prr_list_filter_date_range {
    flex: 0 0 158px !important;
    width: 158px !important;
    max-width: 158px !important;
    min-width: 140px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 8px !important;
    font-size: 0.72rem !important;
    line-height: 32px !important;
    text-align: left !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

/* Purchase Orders / Purchase Requests / Purchase Returns / Purchases list chrome */
.ot-purchases-page #purchaseListTable_search .dataTables_filter,
.ot-purchase-orders-page #purchaseOrderListTable_search .dataTables_filter,
.ot-purchase-requisitions-page #purchaseRequisitionListTable_search .dataTables_filter,
.ot-purchase-returns-page #purchaseReturnListTable_search .dataTables_filter {
    display: none !important;
}

.ot-purchase-orders-page #purchaseOrderListTable .dataTables_scroll,
.ot-purchase-orders-page #purchaseOrderListTable .dataTables_scrollHead,
.ot-purchase-orders-page #purchaseOrderListTable .dataTables_scrollBody,
.ot-purchase-requisitions-page #purchaseRequisitionListTable .dataTables_scroll,
.ot-purchase-requisitions-page #purchaseRequisitionListTable .dataTables_scrollHead,
.ot-purchase-requisitions-page #purchaseRequisitionListTable .dataTables_scrollBody,
.ot-purchase-returns-page #purchaseReturnListTable .dataTables_scroll,
.ot-purchase-returns-page #purchaseReturnListTable .dataTables_scrollHead,
.ot-purchase-returns-page #purchaseReturnListTable .dataTables_scrollBody {
    width: 100% !important;
}

.ot-purchase-orders-page .daterangepicker,
.ot-purchase-requisitions-page .daterangepicker,
.ot-purchase-returns-page .daterangepicker {
    z-index: 1060 !important;
}

/* Purchase returns — keep action column compact (override legacy purchase-tables widths) */
.ot-purchase-returns-page #purchase_return_datatable th.bt-col-action,
.ot-purchase-returns-page #purchase_return_datatable td.bt-col-action,
.ot-purchase-returns-page #purchase_return_datatable th.action-column,
.ot-purchase-returns-page #purchase_return_datatable td.action-column,
.ot-purchase-returns-page #purchase_return_datatable th.product-col-action,
.ot-purchase-returns-page #purchase_return_datatable td.product-col-action,
.ot-purchase-returns-page #purchase_return_datatable thead th:nth-child(1),
.ot-purchase-returns-page #purchase_return_datatable tbody td:nth-child(1),
.ot-purchase-returns-page #purchase_return_datatable tfoot td:nth-child(1) {
    width: 2.75rem !important;
    min-width: 2.75rem !important;
    max-width: 3rem !important;
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
    text-align: center !important;
}

/* Keep daterangepicker above page chrome and aligned to its input */
body > .daterangepicker {
    z-index: 1060 !important;
}

.ot-purchases-page .daterangepicker {
    z-index: 1060 !important;
}

/* Date range chrome (single-cal / dark theme) lives in omniteq-theme.css */

.ot-products-filterbar__selects .select2-container--default .select2-selection--single {
    min-height: 34px !important;
    height: 34px !important;
    border-radius: 3px !important;
    border-color: var(--otp-border) !important;
    background: #fff !important;
    display: flex;
    align-items: center;
}

.ot-products-filterbar__selects .select2-selection__rendered {
    font-size: 0.74rem !important;
    color: #334155 !important;
    line-height: 32px !important;
    padding-left: 8px !important;
    padding-right: 22px !important;
}

.ot-products-filterbar__selects .select2-selection__arrow {
    height: 32px !important;
}

.ot-products-filterbar__funnel,
.ot-products-filterbar__more-btn {
    width: 32px;
    height: 32px;
    border-radius: 3px;
    border: 1px solid var(--otp-border);
    background: #fff;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    padding: 0;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.ot-products-filterbar__funnel:hover,
.ot-products-filterbar__more-btn:hover,
.ot-products-filterbar__funnel.is-active {
    background: var(--otp-primary-soft);
    color: var(--otp-primary);
    border-color: rgba(37, 99, 235, 0.35);
}

.ot-products-filterbar__funnel.is-active {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.ot-products-filterbar__more {
    position: relative;
    z-index: 60;
}

.ot-products-filterbar__more.open {
    z-index: 80;
}

.ot-products-filterbar__more .ot-products-more-menu {
    position: absolute !important;
    top: 100%;
    right: 0;
    left: auto;
    z-index: 80;
}

.ot-products-filterbar__more-btn.dropdown-toggle::after {
    display: none;
}

.ot-products-more-menu,
body > .ot-products-more-menu.ot-floating-more-menu {
    min-width: 190px;
    padding: 0.35rem 0;
    border-radius: 3px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    margin-top: 0.35rem !important;
    z-index: 10060 !important;
}

body > .ot-products-more-menu.ot-floating-more-menu {
    position: fixed !important;
    margin-top: 0 !important;
    display: block !important;
}

.ot-products-more-menu > li > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #334155;
}

.ot-products-more-menu > li > a:hover {
    background: #f8fafc;
    color: var(--otp-primary);
}

.ot-products-more-menu > li > a i {
    width: 1em;
    text-align: center;
    color: #94a3b8;
}

.ot-products-more-menu .dropdown-header {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    padding: 0.35rem 0.9rem 0.2rem;
}

.ot-products-more-filters {
    margin: -0.35rem 0 0.85rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border-radius: 3px;
    border: 1px solid #eef2f7;
    box-shadow: var(--otp-shadow);
}

.ot-products-more-filters__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    align-items: end;
}

.ot-products-more-filters__field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.3rem;
}

.ot-products-more-filters__field--check {
    display: flex;
    align-items: center;
    min-height: 40px;
}

.ot-products-more-filters__field--actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

/* Table card */
.ot-products-table-wrap,
.ot-products-list-page .ot-products-table-card {
    background: #fff;
    border-radius: 3px;
    box-shadow: var(--otp-shadow);
    border: 1px solid #eef2f7;
    overflow: hidden;
    padding: 0 !important;
}

.ot-products-list-page .business-table-header,
.ot-products-list-page .business-table-toolbar,
.ot-products-list-page .business-table-scroll-bottom,
.ot-products-hidden-mounts {
    display: none !important;
}

.ot-products-list-page .business-table-hscroll-zone {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

.ot-products-list-page .business-table-scroll-top {
    display: none;
    margin: 0.55rem 0.85rem 0.35rem;
    border-radius: 3px;
    background: #f8fafc;
}

.ot-products-list-page .business-table-hscroll-zone--active .business-table-scroll-top,
.ot-products-list-page.business-table-hscroll-zone--active .business-table-scroll-top,
.ot-products-list-page #productListTable.business-table-hscroll-zone--active .business-table-scroll-top,
.ot-products-list-page #contactListTable.business-table-hscroll-zone--active .business-table-scroll-top,
.ot-products-list-page #purchaseListTable.business-table-hscroll-zone--active .business-table-scroll-top,
.ot-products-list-page #purchaseOrderListTable.business-table-hscroll-zone--active .business-table-scroll-top,
.ot-products-list-page #purchaseReturnListTable.business-table-hscroll-zone--active .business-table-scroll-top,
.ot-products-list-page #purchaseRequisitionListTable.business-table-hscroll-zone--active .business-table-scroll-top {
    display: block !important;
}

.ot-products-list-page .business-table-pane {
    max-width: 100%;
    min-width: 0;
}

.ot-products-list-page .business-table-body {
    overflow: visible;
    max-width: 100%;
}

.ot-products-list-page .dataTables_wrapper {
    width: 100%;
}

.ot-products-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    margin: 0 !important;
}

.ot-products-table thead th {
    background: #f8fafc !important;
    color: #64748b !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--otp-border) !important;
    border-top: none !important;
    padding: 0.65rem 0.45rem !important;
    white-space: nowrap;
    vertical-align: middle !important;
}

.ot-products-table tbody td {
    border-top: 1px solid #f1f5f9 !important;
    border-bottom: none !important;
    padding: 0.65rem 0.45rem !important;
    vertical-align: middle !important;
    color: #0f172a;
    font-size: 0.84rem;
    background: #fff !important;
}

.ot-products-table tbody tr:hover td {
    background: #f8fafc !important;
}

.ot-products-table .table-filter-row {
    display: none !important;
}

.ot-product-cell {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    max-width: none;
    width: 100%;
}

.ot-product-thumb {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.ot-product-name {
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    font-size: 0.9rem;
}

.ot-product-desc {
    margin-top: 0.12rem;
    font-size: 0.76rem;
    color: #94a3b8;
    font-weight: 500;
    line-height: 1.3;
}

.ot-sku-cell .ot-sku-main {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.84rem;
}

.ot-sku-cell .ot-sku-sub {
    margin-top: 0.1rem;
    font-size: 0.76rem;
    color: #94a3b8;
}

.ot-stock-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
}

.ot-stock-qty {
    font-weight: 700;
    color: #0f172a;
}

.ot-stock-qty--danger {
    color: #dc2626;
}

.ot-stock-qty--warning {
    color: #ea580c;
}

.ot-status-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.ot-status-dot__mark {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    flex-shrink: 0;
}

.ot-status-dot--active .ot-status-dot__mark { background: #22c55e; }
.ot-status-dot--active { color: #15803d; }
.ot-status-dot--warning .ot-status-dot__mark { background: #f59e0b; }
.ot-status-dot--warning { color: #b45309; }
.ot-status-dot--muted { color: #64748b; }

.ot-price-cell {
    white-space: nowrap;
    font-weight: 600;
    color: #0f172a;
}

.ot-branch-cell {
    max-width: 8.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #334155;
    font-weight: 500;
    font-size: 0.82rem;
}

.ot-branch-empty { color: #cbd5e1; }

/* Compact action column at start of table (products + suppliers + purchases + returns/PO/PR) */
.ot-products-list-page #productListTable #product_table .product-col-action,
.ot-products-list-page #productListTable #product_table th.product-col-action,
.ot-products-list-page #productListTable #product_table td.product-col-action,
.ot-products-list-page #productListTable #product_table .bt-col-action,
.ot-products-list-page #productListTable #product_table .action-column,
.ot-products-list-page #contactListTable #contact_table .product-col-action,
.ot-products-list-page #contactListTable #contact_table th.product-col-action,
.ot-products-list-page #contactListTable #contact_table td.product-col-action,
.ot-products-list-page #contactListTable #contact_table .bt-col-action,
.ot-products-list-page #contactListTable #contact_table .action-column,
.ot-products-list-page #purchaseListTable #purchase_table .product-col-action,
.ot-products-list-page #purchaseListTable #purchase_table th.product-col-action,
.ot-products-list-page #purchaseListTable #purchase_table td.product-col-action,
.ot-products-list-page #purchaseListTable #purchase_table .bt-col-action,
.ot-products-list-page #purchaseListTable #purchase_table .action-column,
.ot-products-list-page #purchaseReturnListTable #purchase_return_datatable .product-col-action,
.ot-products-list-page #purchaseReturnListTable #purchase_return_datatable th.product-col-action,
.ot-products-list-page #purchaseReturnListTable #purchase_return_datatable td.product-col-action,
.ot-products-list-page #purchaseReturnListTable #purchase_return_datatable .bt-col-action,
.ot-products-list-page #purchaseReturnListTable #purchase_return_datatable .action-column,
.ot-products-list-page #purchaseOrderListTable .product-col-action,
.ot-products-list-page #purchaseOrderListTable th.product-col-action,
.ot-products-list-page #purchaseOrderListTable td.product-col-action,
.ot-products-list-page #purchaseOrderListTable .bt-col-action,
.ot-products-list-page #purchaseOrderListTable .action-column,
.ot-products-list-page #purchaseRequisitionListTable .product-col-action,
.ot-products-list-page #purchaseRequisitionListTable th.product-col-action,
.ot-products-list-page #purchaseRequisitionListTable td.product-col-action,
.ot-products-list-page #purchaseRequisitionListTable .bt-col-action,
.ot-products-list-page #purchaseRequisitionListTable .action-column {
    width: 2.75rem !important;
    min-width: 2.75rem !important;
    max-width: 3rem !important;
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.ot-products-list-page #productListTable #product_table th.product-col-action,
.ot-products-list-page #contactListTable #contact_table th.product-col-action,
.ot-products-list-page #purchaseListTable #purchase_table th.product-col-action,
.ot-products-list-page #purchaseReturnListTable #purchase_return_datatable th.product-col-action,
.ot-products-list-page #purchaseOrderListTable th.product-col-action,
.ot-products-list-page #purchaseRequisitionListTable th.product-col-action {
    font-size: 0.62rem !important;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: clip;
}

.ot-products-list-page .product-col-action .sa-action-dropdown,
.ot-products-list-page .product-col-action .btn-group,
.ot-products-list-page .bt-col-action .sa-action-dropdown,
.ot-products-list-page .bt-col-action .btn-group,
.ot-products-list-page .action-column .sa-action-dropdown,
.ot-products-list-page .action-column .btn-group {
    display: inline-flex;
    justify-content: center;
    margin: 0 auto;
}

.ot-products-list-page .product-col-action .sa-action-dropdown .action-menu-button__toggle,
.ot-products-list-page .product-col-action .dropdown-toggle,
.ot-products-list-page .bt-col-action .sa-action-dropdown .action-menu-button__toggle,
.ot-products-list-page .bt-col-action .dropdown-toggle,
.ot-products-list-page .action-column .sa-action-dropdown .action-menu-button__toggle,
.ot-products-list-page .action-column .dropdown-toggle {
    width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    border-radius: 3px !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    color: #64748b !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.ot-products-list-page .product-col-action .sa-action-dropdown .action-menu-button__toggle svg,
.ot-products-list-page .bt-col-action .sa-action-dropdown .action-menu-button__toggle svg,
.ot-products-list-page .action-column .sa-action-dropdown .action-menu-button__toggle svg {
    width: 14px;
    height: 14px;
}

/* Footer */
.ot-products-table-footer,
.ot-products-list-page .business-table-footer {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem !important;
    border-top: 1px solid #f1f5f9;
    background: #fff;
}

.ot-products-table tfoot td {
    padding: 0.75rem 1rem !important;
    border-top: 1px solid #f1f5f9 !important;
    background: #fff !important;
}

.ot-products-bulk {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.ot-products-bulk__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    margin-right: 0.15rem;
}

.ot-products-table-footer__info,
.ot-products-list-page #productListTable_info {
    font-size: 0.84rem;
    color: #64748b;
    font-weight: 500;
    flex: 1 1 auto;
    text-align: center;
}

.ot-products-table-footer__paginate {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.ot-products-list-page .dataTables_paginate .paginate_button {
    border-radius: 3px !important;
    min-width: 34px;
    text-align: center;
}

.ot-products-list-page .dataTables_paginate .paginate_button.current {
    background: var(--otp-primary) !important;
    border-color: var(--otp-primary) !important;
    color: #fff !important;
}

.ot-products-list-page .dataTables_length label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    margin: 0;
}

.ot-products-stock-report-head {
    margin-bottom: 0.75rem;
}

/* ===== Print Labels (mockup layout) ===== */
.ot-labels-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
    gap: 14px;
    align-items: start;
}

.ot-labels-main,
.ot-labels-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ot-labels-page .ot-labels-card {
    margin-bottom: 0;
}

.ot-labels-section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ot-labels-step {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--otp-primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ot-labels-section-sub {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: var(--otp-muted);
}

.ot-labels-search {
    position: relative;
    max-width: none;
    margin-bottom: 0.85rem;
}

.ot-labels-search__icon,
.ot-labels-search__barcode {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.ot-labels-search__icon { left: 0.85rem; }
.ot-labels-search__barcode { right: 0.85rem; }

.ot-labels-search .form-control {
    padding-left: 2.25rem !important;
    padding-right: 2.25rem !important;
    min-height: 42px;
    background: #f8fafc;
}

.ot-labels-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    align-items: center;
}

.ot-labels-available,
.ot-labels-selected {
    position: relative;
    z-index: 1;
}

.ot-labels-available {
    margin-bottom: 1.15rem;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    background: #fff;
    overflow: hidden;
}

.ot-labels-available__head,
.ot-labels-selected__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid #eef2f7;
    background: #f8fafc;
}

.ot-labels-available__head h4,
.ot-labels-selected__head h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.ot-labels-available__badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 3px;
    padding: 0.2rem 0.6rem;
}

.ot-labels-available__scroll,
.ot-labels-selected__scroll {
    max-height: 280px;
    overflow: auto;
    background: #fff;
}

.ot-labels-selected__scroll {
    max-height: 260px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
}

.ot-labels-available__meta {
    padding: 0.45rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    border-top: 1px solid #eef2f7;
    background: #f8fafc;
}

.ot-labels-page .ot-labels-table {
    width: 100%;
    margin: 0 !important;
    background: #fff;
}

.ot-labels-page .ot-labels-table > thead > tr > th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc !important;
    color: #64748b !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 0.65rem 0.75rem !important;
    white-space: nowrap;
}

.ot-labels-page .ot-labels-table > tbody > tr > td {
    vertical-align: middle !important;
    font-size: 0.86rem !important;
    color: #0f172a !important;
    background: #fff !important;
    border-color: #eef2f7 !important;
    padding: 0.55rem 0.75rem !important;
}

.ot-labels-page .ot-labels-table > tbody > tr:hover > td {
    background: #f8fafc !important;
}

.ot-labels-page .ot-labels-avail-row {
    cursor: pointer;
}

.ot-labels-page .ot-labels-avail-row.is-selected > td {
    background: #eff6ff !important;
}

.ot-labels-col-check {
    width: 42px;
    text-align: center !important;
}

.ot-labels-prod {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.ot-labels-prod__img {
    width: 36px;
    height: 36px;
    border-radius: 3px;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.ot-labels-prod__name {
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
}

.ot-labels-selected {
    margin-top: 0.25rem;
    padding-top: 0;
    border-top: 0;
}

.ot-labels-selected__head {
    padding: 0 0 0.55rem;
    border-bottom: 0;
    background: transparent;
}

.ot-labels-empty-row td {
    text-align: center !important;
    color: #94a3b8 !important;
    padding: 1.25rem !important;
    background: #fff !important;
}

.ot-labels-selected__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eef2f7;
    font-size: 0.88rem;
    color: #0f172a;
}

.ot-labels-clear-btn {
    background: #fff !important;
    color: #dc2626 !important;
    border: 1px solid #fca5a5 !important;
}

.ot-labels-clear-btn:hover {
    background: #fef2f2 !important;
}

.ot-labels-qty {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.ot-labels-qty .form-control,
.ot-labels-qty .js-qty-input,
#default_copies {
    width: 3.25rem !important;
    min-height: 32px !important;
    text-align: center;
    padding: 0.2rem !important;
}

.ot-labels-qty__btn {
    width: 28px;
    height: 28px;
    border-radius: 3px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.ot-labels-qty__btn:hover {
    border-color: #93c5fd;
    color: var(--otp-primary);
}

.ot-labels-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #ef4444;
    cursor: pointer;
    border-radius: 3px;
}

.ot-labels-remove:hover {
    background: #fef2f2;
}

.ot-labels-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 0.85rem;
}

.ot-labels-config-grid .form-group {
    margin-bottom: 0;
}

.ot-labels-config-grid label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--otp-muted);
    margin-bottom: 0.3rem;
}

.ot-labels-checks {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid #eef2f7;
}

.ot-labels-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0;
    cursor: pointer;
    font-weight: 400;
}

.ot-labels-check input {
    margin-top: 0.2rem;
    accent-color: var(--otp-primary);
}

.ot-labels-check strong {
    display: block;
    color: var(--otp-text);
    font-size: 0.88rem;
}

.ot-labels-check small {
    display: block;
    color: var(--otp-muted);
    font-size: 0.75rem;
    margin-top: 0.1rem;
}

.ot-labels-preview-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.65rem 0.8rem;
    border-radius: 3px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 0.8rem;
    margin-bottom: 0.85rem;
}

.ot-labels-preview-frame-wrap {
    position: relative;
    min-height: 260px;
    border: 1px dashed #cbd5e1;
    border-radius: 3px;
    background: #f8fafc;
    overflow: hidden;
}

.ot-labels-preview-frame {
    width: 100%;
    height: 280px;
    border: 0;
    display: none;
    background: #fff;
}

.ot-labels-preview-frame.is-visible {
    display: block;
}

.ot-labels-preview-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    color: #94a3b8;
    font-size: 0.86rem;
}

.ot-labels-preview-empty.hide {
    display: none;
}

.ot-labels-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

@media (max-width: 1100px) {
    .ot-labels-layout {
        grid-template-columns: 1fr;
    }

    .ot-labels-filters {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .ot-labels-filters,
    .ot-labels-config-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .ot-products-more-filters__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ot-products-filterbar__search {
        flex-basis: 160px;
        width: 160px;
        min-width: 140px;
        max-width: 180px;
    }

    .ot-products-filterbar__selects .select2-container {
        min-width: 84px;
        max-width: 110px;
    }
}

@media (max-width: 767px) {
    .ot-products-filterbar {
        flex-wrap: wrap;
    }

    .ot-products-filterbar__selects {
        flex-wrap: wrap;
        width: 100%;
    }

    .ot-products-filterbar__selects .select2-container {
        flex: 1 1 calc(33.33% - 0.35rem);
        min-width: 100px;
        max-width: none;
        width: auto !important;
    }

    .ot-products-more-filters__grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Add Product — mockup 3×2 card grid ===== */
.ot-product-create-page {
    background: transparent;
}

.ot-product-create-page.ot-products-page {
    max-width: 1400px;
}

.ot-pf-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 1.25rem;
    margin: 0 0 1.15rem;
    padding: 0 0 0.15rem;
    border-bottom: 1px solid #e2e8f0;
}

.ot-pf-tabs__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 0.1rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none !important;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}

.ot-pf-tabs__link:hover {
    color: #2563eb;
}

.ot-pf-tabs__link.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.ot-pf-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.ot-pf-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.04);
    padding: 1.15rem 1.2rem 1.25rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ot-pf-card--wide {
    grid-column: 1 / -1;
}

/* Right column: compact Inventory on top, Product Images underneath */
.ot-pf-col-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    min-height: 0;
}

.ot-pf-col-stack #otpf-inventory {
    flex: 0 0 auto;
}

.ot-pf-col-stack #otpf-images {
    flex: 1 1 auto;
}

.ot-pf-card--compact {
    padding: 0.9rem 1rem 0.95rem;
}

.ot-pf-card--compact .ot-pf-card__head {
    margin-bottom: 0.65rem;
}

.ot-pf-card--compact .ot-pf-row {
    margin-bottom: 0.45rem;
}

.ot-pf-card--compact .ot-pf-switches--end {
    margin-top: 0.55rem;
}

.ot-pf-os-block {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e8edf5;
}

.ot-pf-os-block__title {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
}

.ot-pf-os-block__hint {
    margin-bottom: 0.65rem !important;
}

.ot-pf-os-loc {
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.7rem;
    border: 1px solid #e8edf5;
    border-radius: 3px;
    background: #f8fafc;
}

.ot-pf-os-loc__name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.45rem;
}

.ot-pf-os-loc .ot-pf-row {
    margin-bottom: 0;
}

.ot-pf-col-stack #otpf-images .ot-pf-dropzone {
    padding: 0.85rem 0.75rem;
    min-height: 0;
}

.ot-pf-col-stack #otpf-images .ot-pf-dropzone__icon svg {
    width: 28px;
    height: 28px;
}

/* Pricing always full width under the three columns */
.ot-pf-grid #otpf-pricing,
.ot-pf-grid:not(.is-table-pricing) #otpf-pricing {
    grid-column: 1 / -1;
}

#otpf-pricing.ot-pf-card--wide {
    display: block;
    width: 100%;
    margin-top: 1rem;
    grid-column: auto;
}

.ot-pf-plain-desc {
    min-height: 7.5rem;
    resize: vertical;
}

.ot-pf-module-inline {
    flex: 1 1 auto;
    min-width: 0;
}

.ot-pf-module-inline .col-md-3,
.ot-pf-module-inline .col-sm-3,
.ot-pf-module-inline .col-sm-4 {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
}

.ot-pf-module-inline .form-group {
    margin: 0 !important;
}

.ot-pf-module-inline br {
    display: none;
}

.ot-pf-module-inline label {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    margin: 0 !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
}

/* Module fields (e.g. Device Model) dropped into Basic card as Bootstrap cols */
.ot-product-create-page #otpf-basic .col-sm-4,
.ot-product-create-page #otpf-basic .col-md-3,
.ot-product-create-page #otpf-basic .col-sm-3 {
    width: 100% !important;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.ot-product-create-page #otpf-basic .col-sm-4 > .form-group,
.ot-product-create-page #otpf-basic .col-md-3 > .form-group {
    display: grid;
    grid-template-columns: minmax(108px, 40%) minmax(0, 1fr);
    gap: 0.35rem 0.65rem;
    align-items: center;
    margin-bottom: 0.65rem;
}

.ot-product-create-page #otpf-basic .col-sm-4 > .form-group > label,
.ot-product-create-page #otpf-basic .col-md-3 > .form-group > label {
    margin: 0 !important;
}

/* iCheck helper is an overlay, not a textbox — keep it invisible */
.ot-product-create-page .iCheck-helper {
    opacity: 0 !important;
    background: transparent !important;
}

.ot-product-create-page #not_for_selling,
.ot-product-create-page #not_for_selling + .iCheck-helper,
.ot-product-create-page .icheckbox_square-blue:has(#not_for_selling) {
    display: none !important;
}

.ot-pf-card__head {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.ot-pf-card__icon {
    width: 34px;
    height: 34px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    flex-shrink: 0;
}

.ot-pf-card__title {
    margin: 0 0 0.15rem;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.ot-pf-card__sub {
    margin: 0;
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.35;
}

.ot-pf-card__body {
    flex: 1 1 auto;
}

.ot-product-create-page .form-group {
    margin-bottom: 0.85rem;
}

.ot-product-create-page .form-group > label,
.ot-product-create-page .ot-pf-card__body > .form-group label {
    display: block;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: #334155 !important;
    margin-bottom: 0.35rem !important;
}

/* Inline label | control rows (Basic / Inventory / Additional / Pricing) */
.ot-pf-row {
    display: grid;
    grid-template-columns: minmax(108px, 40%) minmax(0, 1fr);
    gap: 0.35rem 0.65rem;
    align-items: center;
    margin-bottom: 0.65rem;
}

.ot-pf-row > label,
.ot-pf-row > .ot-pf-row__label {
    margin: 0 !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: #334155 !important;
    line-height: 1.3;
}

.ot-pf-row__control {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ot-pf-row__control > .form-control,
.ot-pf-row__control > .select2-container,
.ot-pf-row__control > .input-group,
.ot-pf-row__control > .ot-pf-affix {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

.ot-pf-row__control .input-group-btn .btn {
    height: 40px;
    border-radius: 0 3px 3px 0 !important;
}

.ot-pf-row--stack {
    grid-template-columns: 1fr;
    align-items: stretch;
}

.ot-pf-row--stack > label {
    margin-bottom: 0.3rem !important;
}

.ot-pf-row .help-block {
    grid-column: 2;
    margin-top: -0.2rem;
}

.ot-pf-row--stack .help-block {
    grid-column: 1;
}

.ot-product-create-page .ot-pf-row .select2-container--default .select2-selection--single,
.ot-product-create-page .ot-pf-row .select2-container--default .select2-selection--multiple {
    min-height: 40px !important;
}

@media (max-width: 1200px) {
    .ot-pf-col-stack {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .ot-pf-row {
        grid-template-columns: 1fr;
    }

    .ot-pf-row .help-block {
        grid-column: 1;
    }
}

.ot-req {
    color: #ef4444;
    font-weight: 700;
}

.ot-product-create-page .form-control,
.ot-product-create-page .select2-container--default .select2-selection--single {
    min-height: 40px !important;
    height: 40px !important;
    border-radius: 3px !important;
    border-color: #dbe2ea !important;
    font-size: 0.875rem !important;
    text-align: left !important;
    text-indent: 0 !important;
}

.ot-product-create-page .form-control:not(textarea) {
    padding: 0 8px !important;
}

.ot-product-create-page .select2-container--default .select2-selection--single {
    padding: 0 !important;
}

.ot-product-create-page .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 8px !important;
    padding-right: 28px !important;
    margin-top: 0 !important;
    text-align: left !important;
}

.ot-product-create-page textarea.form-control {
    height: auto !important;
    min-height: 72px !important;
    padding: 6px 8px !important;
    text-align: left !important;
}

.ot-product-create-page .help-block {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.3rem;
    margin-bottom: 0;
    font-style: normal;
}

.ot-pf-affix {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.ot-pf-affix__prefix,
.ot-pf-affix__suffix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    padding: 0 0.65rem;
    background: #f8fafc;
    border: 1px solid #dbe2ea;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
}

.ot-pf-affix__prefix {
    border-right: 0;
    border-radius: 3px 0 0 3px;
}

.ot-pf-affix__suffix {
    border-left: 0;
    border-radius: 0 3px 3px 0;
}

.ot-pf-affix > .form-control,
.ot-pf-affix > .select2-container {
    flex: 1 1 auto;
    min-width: 0;
}

.ot-pf-affix > .form-control {
    border-radius: 0 3px 3px 0 !important;
}

.ot-pf-affix__prefix + .form-control {
    border-radius: 0 3px 3px 0 !important;
}

.ot-pf-affix > .form-control:not(:last-child) {
    border-radius: 3px 0 0 3px !important;
}

.ot-pf-affix__prefix + .form-control:not(:last-child) {
    border-radius: 0 !important;
}

.ot-pf-price-stack .form-group {
    margin-bottom: 0.9rem;
}

.ot-pf-price-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    margin-bottom: 0.25rem;
}

.ot-pf-price-col__title {
    margin: 0 0 0.65rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
}

.ot-pf-price-hint {
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #64748b;
}

.ot-pf-vat-tag {
    display: inline-block;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
}

.ot-pf-price-stack .ot-pf-row--price-excl.is-vat-active .ot-pf-vat-tag,
.ot-pf-price-stack .ot-pf-row--price-incl.is-vat-active .ot-pf-vat-tag {
    color: #1d4ed8;
}

.ot-pf-price-stack .ot-pf-row--price-excl.is-vat-active > label,
.ot-pf-price-stack .ot-pf-row--price-incl.is-vat-active > label {
    color: #1e3a8a !important;
}

.ot-pf-price-stack .ot-pf-row--price-excl.is-vat-active .form-control,
.ot-pf-price-stack .ot-pf-row--price-incl.is-vat-active .form-control {
    border-color: #93c5fd !important;
    background: #f8fbff;
}

.ot-pf-tax-block {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid #e8edf5;
}

.ot-pf-tax-block--first {
    margin-top: 0;
    margin-bottom: 1.1rem;
    padding-top: 0;
    padding-bottom: 1rem;
    border-top: 0;
    border-bottom: 1px solid #e8edf5;
}

.ot-pf-tax-block--first + #product_form_part {
    margin-top: 0.15rem;
}

.ot-pf-tax-block__title {
    margin: 0 0 0.75rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
}

.ot-pf-tax-block__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem 1rem;
}

.ot-pf-tax-block__grid .ot-pf-row {
    grid-template-columns: 1fr;
    align-items: stretch;
}

.ot-pf-tax-block__grid .ot-pf-row > label {
    margin-bottom: 0.3rem !important;
}

.ot-pf-selected-file {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.65rem;
    border-radius: 3px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.8rem;
}

.ot-pf-selected-file[hidden] {
    display: none !important;
}

.ot-pf-selected-file .fa {
    color: #059669;
}

.ot-pf-dropzone.has-file {
    border-color: #86efac;
    background: #f0fdf4;
}

@media (max-width: 900px) {
    .ot-pf-price-cols,
    .ot-pf-tax-block__grid {
        grid-template-columns: 1fr;
    }
}

.ot-pf-switches {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.35rem;
}

.ot-pf-switches--end {
    margin-top: 1rem;
}

.ot-pf-switch {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 0;
    cursor: pointer;
    font-weight: 400;
}

.ot-pf-switch__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ot-pf-switch__track {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 3px;
    background: #cbd5e1;
    flex-shrink: 0;
    margin-top: 2px;
    transition: background 0.15s ease;
}

.ot-pf-switch__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transition: transform 0.15s ease;
}

.ot-pf-switch__input:checked + .ot-pf-switch__track,
.ot-pf-switch.is-on .ot-pf-switch__track--icheck {
    background: #2563eb;
}

.ot-pf-switch__input:checked + .ot-pf-switch__track .ot-pf-switch__thumb,
.ot-pf-switch.is-on .ot-pf-switch__track--icheck .ot-pf-switch__thumb {
    transform: translateX(18px);
}

.ot-pf-switch__native,
.ot-pf-switch .icheckbox_square-blue {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.ot-pf-switch__text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.ot-pf-switch__text strong {
    font-size: 0.86rem;
    color: #0f172a;
}

.ot-pf-switch__text small {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.3;
}

.ot-loc-prices {
    --loc-price-bg: #ffffff;
    --loc-price-text: #0f172a;
    --loc-price-muted: #64748b;
    --loc-price-border: #e2e8f0;
    --loc-price-row-bg: #f8fafc;
    --loc-price-error-bg: #fef2f2;
    --loc-price-error-border: #fecaca;
    --loc-price-error-text: #b91c1c;
    margin-top: 1rem;
    color: var(--loc-price-text);
}

.ot-loc-prices__switch {
    margin-bottom: 0.75rem;
}

.ot-loc-prices__hint {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--loc-price-muted);
}

.ot-loc-prices__table-wrap {
    border: 1px solid var(--loc-price-border);
    border-radius: 6px;
    background: var(--loc-price-bg);
    padding: 0.75rem 0.85rem 0.5rem;
}

.ot-loc-prices__table {
    margin-bottom: 0.35rem;
}

.ot-loc-prices__table th {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--loc-price-muted);
    border-bottom-color: var(--loc-price-border);
}

.ot-loc-prices__table td {
    vertical-align: middle;
    border-color: var(--loc-price-border);
}

.ot-loc-prices__name {
    font-weight: 600;
    color: var(--loc-price-text);
    white-space: nowrap;
}

.ot-loc-price-row--error td {
    background: var(--loc-price-error-bg);
}

.ot-loc-price-row--error .form-control {
    border-color: var(--loc-price-error-border);
}

.ot-loc-prices__error {
    margin: 0.35rem 0 0.25rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--loc-price-error-text);
}

html[data-theme="dark"] .ot-loc-prices,
[data-theme="dark"] .ot-loc-prices,
body.dark-mode .ot-loc-prices {
    --loc-price-bg: #111827;
    --loc-price-text: #e2e8f0;
    --loc-price-muted: #94a3b8;
    --loc-price-border: #334155;
    --loc-price-row-bg: #1e293b;
    --loc-price-error-bg: rgba(185, 28, 28, 0.22);
    --loc-price-error-border: #7f1d1d;
    --loc-price-error-text: #fca5a5;
}

html[data-theme="dark"] .ot-loc-prices__table-wrap,
[data-theme="dark"] .ot-loc-prices__table-wrap,
body.dark-mode .ot-loc-prices__table-wrap {
    background: var(--loc-price-bg);
    border-color: var(--loc-price-border);
}

html[data-theme="dark"] .ot-loc-prices .form-control,
[data-theme="dark"] .ot-loc-prices .form-control,
body.dark-mode .ot-loc-prices .form-control {
    background: var(--loc-price-row-bg);
    color: var(--loc-price-text);
    border-color: var(--loc-price-border);
}

.ot-product-specials {
    --special-bg: #ffffff;
    --special-text: #0f172a;
    --special-muted: #64748b;
    --special-border: #e2e8f0;
    --special-active: #eff6ff;
    --special-error: #b91c1c;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--special-border);
    color: var(--special-text);
}

.ot-product-specials__title {
    margin: 0 0 0.35rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--special-text);
}

.ot-product-specials__hint {
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--special-muted);
}

.ot-product-specials__modes {
    display: grid;
    gap: 0.5rem;
}

.ot-product-specials__mode {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--special-border);
    border-radius: 6px;
    background: var(--special-bg);
    cursor: pointer;
    font-weight: 400;
}

.ot-product-specials__mode input {
    margin-top: 0.2rem;
}

.ot-product-specials__mode strong {
    display: block;
    font-size: 0.86rem;
    color: var(--special-text);
}

.ot-product-specials__mode small {
    display: block;
    font-size: 0.74rem;
    color: var(--special-muted);
    line-height: 1.35;
}

.ot-product-specials__mode:has(input:checked),
.ot-product-specials__mode.is-on {
    border-color: #93c5fd;
    background: var(--special-active);
}

.ot-product-specials__fields {
    margin-top: 0.85rem;
    padding: 0.75rem 0.85rem 0.5rem;
    border: 1px solid var(--special-border);
    border-radius: 6px;
    background: var(--special-bg);
}

.ot-product-specials__row,
.ot-product-specials__row-grid > div {
    margin-bottom: 0.75rem;
}

.ot-product-specials__row > label,
.ot-product-specials__row-grid label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--special-text);
}

.ot-product-specials__row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.ot-product-specials__row--error .form-control {
    border-color: #fecaca;
}

.ot-product-specials__error {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--special-error);
}

.ot-product-specials__groups {
    margin-top: 0.85rem;
    padding: 0.7rem 0.8rem;
    border: 1px dashed var(--special-border);
    border-radius: 6px;
    font-size: 0.8rem;
}

.ot-product-specials__groups ul {
    margin: 0.35rem 0;
    padding-left: 1.1rem;
}

html[data-theme="dark"] .ot-product-specials,
[data-theme="dark"] .ot-product-specials,
body.dark-mode .ot-product-specials {
    --special-bg: #111827;
    --special-text: #e2e8f0;
    --special-muted: #94a3b8;
    --special-border: #334155;
    --special-active: rgba(37, 99, 235, 0.18);
    --special-error: #fca5a5;
}

html[data-theme="dark"] .ot-product-specials .form-control,
[data-theme="dark"] .ot-product-specials .form-control,
body.dark-mode .ot-product-specials .form-control {
    background: #1e293b;
    color: var(--special-text);
    border-color: var(--special-border);
}

@media (max-width: 900px) {
    .ot-product-specials__row-grid {
        grid-template-columns: 1fr;
    }
}

.ot-pf-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 200px;
    padding: 1.5rem 1rem;
    border: 1.5px dashed #cbd5e1;
    border-radius: 3px;
    background: #f8fafc;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ot-pf-dropzone.is-dragover {
    border-color: #2563eb;
    background: #eff6ff;
}

.ot-pf-dropzone__icon {
    color: #94a3b8;
    margin-bottom: 0.15rem;
}

.ot-pf-dropzone__text {
    margin: 0;
    font-size: 0.86rem;
    color: #64748b;
}

.ot-pf-dropzone__btn {
    cursor: pointer;
    margin-top: 0.15rem;
}

.ot-pf-dropzone__input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
}

.ot-pf-dropzone__hint {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    color: #94a3b8;
    max-width: 16rem;
    line-height: 1.35;
}

.ot-pf-racks h4 {
    margin: 0.5rem 0 0.65rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
}

.ot-pf-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: 1.15rem;
    padding-top: 0.25rem;
}

.ot-product-create-page #product_form_part {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ot-product-create-page #product_form_part .table-responsive,
.ot-pf-combo__table-wrap {
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    overflow: auto;
}

/* Combo composition table */
.ot-pf-combo {
    width: 100%;
}

.ot-pf-combo__search {
    max-width: 40rem;
    margin: 0 auto 1rem;
}

.ot-pf-combo__table {
    width: 100% !important;
    margin: 0 !important;
    border-collapse: collapse !important;
    table-layout: fixed;
}

.ot-pf-combo__table > thead > tr > th {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0 !important;
    border-top: 0 !important;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.7rem 0.85rem !important;
    vertical-align: middle !important;
    white-space: nowrap;
}

.ot-pf-combo__table > tbody > tr > td,
.ot-pf-combo__table > tfoot > tr > td {
    border-top: 1px solid #eef2f7 !important;
    padding: 0.7rem 0.85rem !important;
    vertical-align: middle !important;
    font-size: 0.875rem;
    color: #0f172a;
}

.ot-pf-combo__table > tbody > tr:nth-child(even) > td {
    background: #fafbfc;
}

.ot-combo-col-name {
    width: 46%;
    text-align: left !important;
}

.ot-combo-col-qty {
    width: 12%;
}

.ot-combo-col-price,
.ot-combo-col-total {
    width: 18%;
}

.ot-combo-col-actions {
    width: 6%;
}

.ot-pf-combo__table .quantity {
    width: 5.5rem !important;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    height: 36px !important;
    min-height: 36px !important;
}

.ot-pf-combo__table .sub_unit.hide {
    display: none !important;
}

.ot-combo-net-label {
    color: #334155;
    font-size: 0.875rem;
}

.ot-pf-combo__table > tfoot > tr > td {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    font-weight: 600;
}

.ot-combo-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #ef4444;
    cursor: pointer;
}

.ot-combo-remove:hover {
    background: #fef2f2;
}

.ot-pf-combo__table > tfoot > tr.ot-combo-price-inputs > td {
    vertical-align: top !important;
    font-weight: 400;
}

.ot-combo-field-label {
    display: block;
    margin: 0 0 0.35rem !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: right;
}

.ot-combo-field-affix {
    margin-left: auto;
}

.ot-pf-combo__table .ot-combo-price-inputs .form-control {
    height: 36px !important;
    min-height: 36px !important;
    text-align: right;
}

.ot-pf-combo__table .ot-combo-col-price .ot-pf-affix,
.ot-pf-combo__table .ot-combo-col-total .form-control {
    width: 100%;
    max-width: 9.5rem;
    margin-left: auto;
}

.ot-product-create-page input:disabled,
.ot-product-create-page input[readonly] {
    background: #f1f5f9 !important;
    color: #64748b;
}

@media (max-width: 1200px) {
    .ot-pf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .ot-pf-grid {
        grid-template-columns: 1fr;
    }

    .ot-pf-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0 1rem;
    }

    .ot-pf-footer {
        justify-content: stretch;
    }

    .ot-pf-footer .ot-products-btn {
        flex: 1 1 auto;
    }
}

/* Product create: visible validation (errors were squeezed inside flex controls) */
.ot-product-create-page .ot-pf-field-error {
    grid-column: 2;
    display: block;
    width: 100%;
    margin: -0.25rem 0 0.15rem;
    color: #dc2626 !important;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
}

.ot-product-create-page .ot-pf-row--stack .ot-pf-field-error {
    grid-column: 1;
}

.ot-product-create-page .ot-pf-row--invalid > label,
.ot-product-create-page .ot-pf-row--invalid > .ot-pf-row__label {
    color: #dc2626 !important;
}

.ot-product-create-page .form-control.error,
.ot-product-create-page .ot-pf-affix--invalid > .form-control,
.ot-product-create-page .ot-pf-select-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15);
}

.ot-product-create-page .ot-pf-dropzone--invalid {
    border-color: #dc2626 !important;
    background: #fef2f2;
}

.ot-product-create-page .ot-pf-dropzone .ot-pf-field-error {
    margin-top: 0.45rem;
    text-align: center;
}

@media (max-width: 520px) {
    .ot-product-create-page .ot-pf-field-error {
        grid-column: 1;
    }
}

/* ========== Import Products (mockup) ========== */
.ot-import-page {
    --oti-blue: #2563eb;
    --oti-blue-deep: #1d4ed8;
    --oti-surface: #fff;
    --oti-border: #e2e8f0;
    --oti-muted: #64748b;
    --oti-text: #0f172a;
}

.ot-import-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0 0 1rem;
    padding: 0.75rem 0.95rem;
    border-radius: 3px;
    font-size: 0.88rem;
    font-weight: 600;
}

.ot-import-alert--danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.ot-import-steps {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    background: var(--oti-surface);
    border: 1px solid var(--oti-border);
    border-radius: 3px;
    box-shadow: var(--otp-shadow);
    overflow-x: auto;
}

.ot-import-step {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    white-space: nowrap;
    color: var(--oti-muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.ot-import-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 3px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
}

.ot-import-step.is-active {
    color: var(--oti-blue-deep);
}

.ot-import-step.is-active .ot-import-step__num,
.ot-import-step.is-done .ot-import-step__num {
    background: var(--oti-blue);
    color: #fff;
}

.ot-import-step.is-done {
    color: #334155;
}

.ot-import-step__connector {
    flex: 1 1 2rem;
    min-width: 1.5rem;
    height: 2px;
    background: #e2e8f0;
    position: relative;
}

.ot-import-step__connector::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid #cbd5e1;
    transform: translateY(-50%);
}

.ot-import-top {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.ot-import-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
    gap: 1rem;
    align-items: start;
}

.ot-import-card {
    background: var(--oti-surface);
    border: 1px solid var(--oti-border);
    border-radius: 3px;
    box-shadow: var(--otp-shadow);
    min-width: 0;
}

.ot-import-card__head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem 0.35rem;
}

.ot-import-card__head--row {
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ot-import-card__head-main {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.ot-import-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 3px;
    background: var(--oti-blue);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ot-import-card__badge--soft {
    background: #dbeafe;
    color: var(--oti-blue-deep);
}

.ot-import-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--oti-text);
}

.ot-import-card__sub {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: var(--oti-muted);
    font-weight: 500;
}

.ot-import-card__body {
    padding: 0.65rem 1.1rem 1.1rem;
}

.ot-import-file-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--oti-border);
    border-radius: 3px;
    background: #f8fafc;
    margin-bottom: 0.75rem;
}

.ot-import-file-preview__icon {
    display: inline-flex;
    color: #16a34a;
    flex-shrink: 0;
}

.ot-import-file-preview__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.ot-import-file-preview__meta strong {
    font-size: 0.84rem;
    color: var(--oti-text);
}

.ot-import-file-preview__meta span {
    font-size: 0.72rem;
    color: var(--oti-muted);
}

.ot-import-download-btn {
    flex-shrink: 0;
}

.ot-import-link-btn {
    background: none;
    border: 0;
    padding: 0;
    color: var(--oti-blue);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.ot-import-link-btn:hover {
    color: var(--oti-blue-deep);
}

.ot-import-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 168px;
    padding: 1.1rem 1rem;
    border: 1.5px dashed #cbd5e1;
    border-radius: 3px;
    background: #f8fafc;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ot-import-dropzone.is-dragover,
.ot-import-dropzone.has-file {
    border-color: #93c5fd;
    background: #f0f7ff;
}

.ot-import-dropzone__icon {
    color: #94a3b8;
}

.ot-import-dropzone__text {
    margin: 0;
    font-size: 0.86rem;
    color: var(--oti-muted);
}

.ot-import-dropzone__hint {
    margin: 0.2rem 0 0;
    font-size: 0.72rem;
    color: #94a3b8;
}

.ot-import-dropzone__input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
}

.ot-import-selected {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.35rem;
    padding: 0.35rem 0.55rem;
    border-radius: 3px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.78rem;
    font-weight: 600;
}

.ot-import-selected__clear {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.15rem;
}

.ot-import-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin-bottom: 0.9rem;
}

.ot-import-stat {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--oti-border);
    border-radius: 3px;
    background: #f8fafc;
}

.ot-import-stat strong {
    display: block;
    font-size: 1rem;
    color: var(--oti-text);
    line-height: 1.15;
}

.ot-import-stat span {
    font-size: 0.7rem;
    color: var(--oti-muted);
    font-weight: 600;
}

.ot-import-stat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 3px;
    flex-shrink: 0;
    font-size: 0.78rem;
}

.ot-import-stat__icon--blue { background: #dbeafe; color: #1d4ed8; }
.ot-import-stat__icon--green { background: #dcfce7; color: #15803d; }
.ot-import-stat__icon--amber { background: #fef3c7; color: #b45309; }
.ot-import-stat__icon--red { background: #fee2e2; color: #b91c1c; }

.ot-import-issues__title {
    margin: 0 0 0.45rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--oti-text);
}

.ot-import-issues {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ot-import-issues__empty {
    font-size: 0.78rem;
    color: var(--oti-muted);
    padding: 0.55rem 0.65rem;
    border: 1px dashed var(--oti-border);
    border-radius: 3px;
    background: #f8fafc;
}

.ot-import-issue {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 3px;
    font-size: 0.76rem;
    font-weight: 600;
}

.ot-import-issue em {
    font-style: normal;
    white-space: nowrap;
    opacity: 0.9;
}

.ot-import-issue--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.ot-import-issue--warn {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.ot-import-issue--ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.ot-import-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.ot-import-check input {
    margin: 0;
}

.ot-import-map-wrap,
.ot-import-recent-wrap {
    overflow-x: auto;
    border: 1px solid var(--oti-border);
    border-radius: 3px;
}

.ot-import-map-table,
.ot-import-recent-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.ot-import-map-table th,
.ot-import-map-table td,
.ot-import-recent-table th,
.ot-import-recent-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    vertical-align: middle;
    color: #334155;
}

.ot-import-map-table thead th,
.ot-import-recent-table thead th {
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    text-transform: none;
    white-space: nowrap;
}

.ot-import-th-sub {
    display: block;
    font-weight: 500;
    color: #94a3b8;
    font-size: 0.68rem;
    margin-top: 0.1rem;
}

.ot-import-map-table__preview-head th {
    background: #fff;
    font-weight: 600;
    color: #94a3b8;
    border-bottom: 1px solid #eef2f7;
}

.ot-import-map-table tbody tr:last-child td,
.ot-import-recent-table tbody tr:last-child td {
    border-bottom: 0;
}

.ot-import-file-col {
    font-weight: 600;
    color: var(--oti-text);
}

.ot-import-map-select {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 150px;
}

.ot-import-map-select .form-control {
    height: 34px !important;
    min-height: 34px !important;
    font-size: 0.78rem;
    border-radius: 3px !important;
    background: #f8fafc;
}

.ot-import-map-ok {
    color: #16a34a;
    font-size: 1rem;
}

.ot-import-preview-cell {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
    font-size: 0.76rem;
}

.ot-import-map-note {
    margin: 0.7rem 0 0.85rem;
    font-size: 0.74rem;
    color: var(--oti-muted);
    line-height: 1.4;
}

.ot-import-map-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.ot-import-recent-empty {
    text-align: center;
    color: var(--oti-muted);
    font-size: 0.8rem;
    padding: 1.4rem 0.75rem !important;
}

.ot-import-status {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 3px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.ot-import-status--completed {
    background: #dcfce7;
    color: #15803d;
}

.ot-import-status--warnings {
    background: #ffedd5;
    color: #c2410c;
}

.ot-import-status--failed {
    background: #fee2e2;
    color: #b91c1c;
}

@media (max-width: 1200px) {
    .ot-import-top {
        grid-template-columns: 1fr;
    }

    .ot-import-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ot-import-file-preview {
        flex-wrap: wrap;
    }

    .ot-import-map-actions {
        justify-content: stretch;
    }

    .ot-import-map-actions .ot-products-btn {
        flex: 1 1 auto;
    }
}

/* Contact import (customers / suppliers) — mockup polish */
.ot-import-step__copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.ot-import-step__sub {
    font-size: 0.72rem;
    font-weight: 500;
    color: #94a3b8;
    white-space: normal;
}

.ot-import-step.is-active .ot-import-step__sub {
    color: #60a5fa;
}

.ot-import-alert--info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    margin: 0 0 0.85rem;
}

.ot-import-map-actions--head {
    margin: 0;
    align-items: center;
}

.ot-import-ftype {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 600;
}

.ot-import-req-yes {
    color: #16a34a;
}

.ot-import-mapped {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 700;
}

.ot-import-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 3px;
    color: #1e40af;
    font-size: 0.84rem;
    font-weight: 500;
}

.ot-import-tip .fa {
    margin-top: 0.15rem;
    color: #2563eb;
}

.ot-import-tip .ot-import-link-btn {
    display: inline;
    padding: 0;
    margin-left: 0.15rem;
}

.ot-contact-import-page .ot-import-download-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.55rem;
}

[data-theme="dark"] .ot-import-tip,
[data-theme="dark"] .ot-import-alert--info {
    background: rgba(37, 99, 235, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    color: #93c5fd !important;
}

[data-theme="dark"] .ot-import-ftype {
    background: #243247;
    color: #cbd5e1;
}

[data-theme="dark"] .ot-import-step__sub {
    color: #64748b;
}

/* ========== Import Starting Stock (dedicated mock) ========== */
.ot-iss-page {
    --iss-blue: #2563eb;
    --iss-border: #e2e8f0;
    --iss-muted: #64748b;
    --iss-text: #0f172a;
}

.ot-iss-top {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.9fr);
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: start;
}

.ot-iss-card {
    background: #fff;
    border: 1px solid var(--iss-border);
    border-radius: 3px;
    box-shadow: var(--otp-shadow);
}

.ot-iss-workflow {
    padding: 1.1rem 1.15rem 1.2rem;
}

.ot-iss-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.ot-iss-step {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
}

.ot-iss-step__num {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
}

.ot-iss-step.is-active .ot-iss-step__num,
.ot-iss-step.is-done .ot-iss-step__num {
    background: var(--iss-blue);
    color: #fff;
}

.ot-iss-step__title {
    margin: 0 0 0.3rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--iss-text);
}

.ot-iss-step__text {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    color: var(--iss-muted);
    line-height: 1.4;
}

.ot-iss-download {
    border-color: #93c5fd !important;
    color: var(--iss-blue) !important;
    background: #eff6ff !important;
}

.ot-iss-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 132px;
    padding: 1rem;
    border: 1.5px dashed #cbd5e1;
    border-radius: 3px;
    background: #f8fafc;
    text-align: center;
    cursor: pointer;
}

.ot-iss-zone-selected {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
    padding: 0.35rem 0.55rem;
    border-radius: 3px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.78rem;
    font-weight: 600;
}

.ot-iss-zone-selected[hidden] {
    display: none !important;
}

.ot-iss-selected__clear {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.2rem;
}

.ot-iss-filebar[hidden] {
    display: none !important;
}

.ot-iss-filebar.is-visible {
    display: flex !important;
}

.ot-iss-batch-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: 3px;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.4;
}

.ot-iss-batch-notice[hidden] {
    display: none !important;
}

.ot-iss-batch-notice i {
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.ot-iss-batch-notice.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.ot-iss-batch-notice.is-warn {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.ot-iss-batch-notice.is-ready {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.ot-iss-dropzone.is-dragover,
.ot-iss-dropzone.has-file {
    border-color: #93c5fd;
    background: #f0f7ff;
}

.ot-iss-dropzone__icon { color: #94a3b8; }

.ot-iss-dropzone__text {
    margin: 0;
    font-size: 0.84rem;
    color: #475569;
}

.ot-iss-browse {
    color: var(--iss-blue);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    margin: 0;
}

.ot-iss-dropzone__hint {
    margin: 0.15rem 0 0;
    font-size: 0.72rem;
    color: #94a3b8;
}

.ot-iss-dropzone__input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
}

.ot-iss-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.ot-iss-metric {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
    background: #fff;
    border: 1px solid var(--iss-border);
    border-radius: 3px;
    box-shadow: var(--otp-shadow);
}

.ot-iss-metric strong {
    display: block;
    font-size: 1.55rem;
    line-height: 1.1;
    color: var(--iss-text);
}

.ot-iss-metric span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--iss-muted);
}

.ot-iss-metric span .fa {
    font-size: 0.7rem;
    opacity: 0.75;
}

.ot-iss-metric__icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.05rem;
}

.ot-iss-metric--green .ot-iss-metric__icon { background: #dcfce7; color: #15803d; }
.ot-iss-metric--blue .ot-iss-metric__icon { background: #dbeafe; color: #1d4ed8; }
.ot-iss-metric--amber .ot-iss-metric__icon { background: #ffedd5; color: #c2410c; }
.ot-iss-metric--red .ot-iss-metric__icon { background: #fee2e2; color: #b91c1c; }

.ot-iss-filebar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1.05rem;
    background: #fff;
    border: 1px solid var(--iss-border);
    border-radius: 3px;
    box-shadow: var(--otp-shadow);
}

.ot-iss-filebar__meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.ot-iss-filebar__icon { color: #16a34a; flex-shrink: 0; }

.ot-iss-filebar__meta strong {
    display: block;
    font-size: 0.9rem;
    color: var(--iss-text);
}

.ot-iss-filebar__meta span {
    font-size: 0.74rem;
    color: var(--iss-muted);
}

.ot-iss-filebar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ot-iss-results { padding: 0; overflow: hidden; }

.ot-iss-results__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid #eef2f7;
}

.ot-iss-results__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--iss-text);
}

.ot-iss-results__title span {
    color: var(--iss-muted);
    font-weight: 600;
}

.ot-iss-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ot-iss-tab {
    border: 1px solid var(--iss-border);
    background: #fff;
    color: #475569;
    border-radius: 3px;
    padding: 0.28rem 0.7rem;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
}

.ot-iss-tab em {
    font-style: normal;
    margin-left: 0.2rem;
    color: #94a3b8;
}

.ot-iss-tab.is-active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.ot-iss-tab.is-active em { color: #2563eb; }

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

.ot-iss-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.ot-iss-table th,
.ot-iss-table td {
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    vertical-align: middle;
    color: #334155;
}

.ot-iss-table thead th {
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
}

.ot-iss-empty-row td {
    text-align: center;
    color: var(--iss-muted);
    padding: 2rem 1rem !important;
}

.ot-iss-product {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 150px;
}

.ot-iss-thumb {
    width: 34px;
    height: 34px;
    border-radius: 3px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.ot-iss-thumb--empty {
    display: inline-block;
    background: #e2e8f0;
}

.ot-iss-muted { color: #94a3b8; }

.ot-iss-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.55rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.ot-iss-badge--matched { background: #dcfce7; color: #15803d; }
.ot-iss-badge--warning { background: #ffedd5; color: #c2410c; }
.ot-iss-badge--error { background: #fee2e2; color: #b91c1c; }

.ot-iss-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.75rem 1.1rem;
    border-top: 1px solid #eef2f7;
    font-size: 0.76rem;
    color: var(--iss-muted);
}

.ot-iss-pager__btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.ot-iss-page-btn {
    min-width: 2rem;
    height: 2rem;
    border: 1px solid var(--iss-border);
    background: #fff;
    border-radius: 3px;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
}

.ot-iss-page-btn.is-active {
    background: var(--iss-blue);
    border-color: var(--iss-blue);
    color: #fff;
}

.ot-iss-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ot-iss-page-ellipsis { color: #94a3b8; padding: 0 0.2rem; }

.ot-iss-howto-list {
    margin: 0 0 0.75rem;
    padding-left: 1.2rem;
    color: #334155;
    line-height: 1.55;
}

.ot-products-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

@media (max-width: 1100px) {
    .ot-iss-top { grid-template-columns: 1fr; }
    .ot-iss-metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .ot-iss-metrics { grid-template-columns: 1fr; }
    .ot-iss-filebar__actions { width: 100%; }
    .ot-iss-filebar__actions .ot-products-btn { flex: 1 1 auto; }
}


/* ===== Suppliers list (contacts?type=supplier) — products list chrome ===== */
.ot-suppliers-page .ot-products-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ot-suppliers-page .ot-products-table-wrap,
.ot-suppliers-page .business-table-pane {
    max-width: 100%;
    min-width: 0;
}

.ot-supplier-colvis-wrap {
    padding: 0.25rem 0.55rem 0.45rem;
    max-height: 260px;
    overflow: auto;
}

.ot-supplier-colvis-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ot-supplier-colvis-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.28rem 0.15rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
}

.ot-supplier-colvis-item input {
    margin: 0;
}

.ot-supplier-colvis-restore {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.ot-supplier-colvis-restore:hover {
    background: #eff6ff;
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.3);
}

.ot-products-more-menu .ot-export-trigger {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 6px 16px;
    font-size: 0.84rem;
    color: #334155;
    cursor: pointer;
}

.ot-products-more-menu .ot-export-trigger:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Supplier name initials tile — same footprint as product thumb */
.ot-supplier-thumb {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #1d4ed8;
    background: #dbeafe !important;
    border-color: #bfdbfe !important;
    object-fit: unset;
}

.ot-suppliers-page #contact_table.ot-products-table thead th,
.ot-suppliers-page #contact_table.ot-products-table tbody td {
    padding: 0.6rem 0.4rem !important;
}

.ot-suppliers-page #contact_table .product-col-name {
    min-width: 180px;
    width: 22%;
}

.ot-suppliers-page #contact_table .ot-supplier-col-contact {
    min-width: 110px;
    width: 12%;
}

.ot-suppliers-page #contact_table .ot-supplier-col-phone {
    min-width: 140px;
    width: 15%;
    white-space: nowrap !important;
}

.ot-suppliers-page #contact_table .product-col-status {
    min-width: 90px;
    width: 10%;
}

.ot-suppliers-page #contact_table .ot-supplier-col-email {
    min-width: 140px;
    width: 16%;
}

.ot-suppliers-page #contact_table .ot-supplier-col-balance {
    text-align: right !important;
    white-space: nowrap;
    min-width: 120px;
    width: 14%;
}

.ot-suppliers-page #contactListTable_search .dataTables_filter {
    display: none !important;
}

.ot-suppliers-page #contactListTable .dataTables_scroll,
.ot-suppliers-page #contactListTable .dataTables_scrollHead,
.ot-suppliers-page #contactListTable .dataTables_scrollBody {
    width: 100% !important;
}

@media (max-width: 1100px) {
    .ot-suppliers-page .ot-products-stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .ot-suppliers-page .ot-products-stats {
        grid-template-columns: 1fr;
    }
}


/* ===== Customers list (contacts?type=customer) ===== */
.ot-customers-page .ot-customers-more {
    display: inline-block;
    position: relative;
}

.ot-customers-page .ot-customers-more .dropdown-toggle .caret {
    margin-left: 0.35rem;
}

.ot-customers-page .ot-customers-more-menu {
    min-width: 220px;
    padding: 0.35rem 0;
    margin-top: 0.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.ot-customers-page .ot-customers-more-menu > li > a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.9rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
}

.ot-customers-page .ot-customers-more-menu > li > a i {
    width: 1rem;
    text-align: center;
    color: #64748b;
}

.ot-customers-page .ot-customers-more-menu > li > a:hover {
    background: #eff6ff;
    color: #2563eb;
}

.ot-customers-page .ot-customers-more-menu > li > a:hover i {
    color: #2563eb;
}

.ot-customers-page .ot-products-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ot-customers-page .ot-products-stats:has(.ot-products-stat:nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ot-customers-page .ot-products-table-wrap,
.ot-customers-page .business-table-pane {
    max-width: 100%;
    min-width: 0;
}

.ot-customers-page #contactListTable_search .dataTables_filter {
    display: none !important;
}

.ot-customers-page .ot-products-filterbar {
    overflow: visible;
}

.ot-customers-page .ot-products-filterbar__selects .select2-container {
    min-width: 110px;
    max-width: 150px;
}

.ot-customers-page .ot-products-filterbar__funnel,
.ot-customers-page .ot-products-filterbar__more-btn {
    width: 34px;
    height: 34px;
    overflow: hidden;
}

.ot-customer-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.ot-customer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #1d4ed8;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
}

.ot-customer-card__meta {
    min-width: 0;
}

.ot-customer-card__name {
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.ot-customer-card__id {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.1rem;
}

.ot-customer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.ot-customer-contact__line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    color: #475569;
    min-width: 0;
}

.ot-customer-contact__line i {
    width: 14px;
    color: #94a3b8;
    text-align: center;
}

.ot-customer-contact__line span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ot-customer-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: nowrap;
}

.ot-customer-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-height: 30px;
    padding: 0.2rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    background: #fff;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
}

.ot-customer-action-btn:hover,
.ot-customer-action-btn:focus {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.ot-customer-actions .btn-group,
.ot-customer-actions .dropdown {
    display: inline-flex;
}

.ot-customers-page #contact_table .ot-customer-outstanding.is-due,
.ot-customers-page #contact_table .ot-customer-outstanding.is-due .contact_due {
    color: #dc2626 !important;
    font-weight: 700;
}

.ot-customers-page #contact_table.ot-products-table thead th,
.ot-customers-page #contact_table.ot-products-table tbody td {
    padding: 0.65rem 0.45rem !important;
    vertical-align: middle;
}

@media (max-width: 1200px) {
    .ot-customers-page .ot-products-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ot-customer-action-btn span {
        display: none;
    }
}

@media (max-width: 767px) {
    .ot-customers-page .ot-products-stats {
        grid-template-columns: 1fr;
    }
}

[data-theme="dark"] .ot-customer-card__name {
    color: #f1f5f9;
}

[data-theme="dark"] .ot-customer-card__id,
[data-theme="dark"] .ot-customer-contact__line {
    color: #94a3b8;
}

[data-theme="dark"] .ot-customer-avatar {
    background: #1e3a5f;
    border-color: #334155;
    color: #93c5fd;
}

[data-theme="dark"] .ot-customer-action-btn {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}


/* ===== Suppliers & Purchases landing (mock) ===== */
.ot-sp-landing {
    --otp-bg: #f5f7fb;
}

.ot-sp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 1.25rem;
}

.ot-sp-kpi {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.04);
    padding: 1rem 1.05rem 0.85rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ot-sp-kpi__top {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.ot-sp-kpi__icon {
    width: 42px;
    height: 42px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ot-sp-kpi__icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.ot-sp-kpi__icon--blue { background: #dbeafe; color: #2563eb; }
.ot-sp-kpi__icon--orange { background: #ffedd5; color: #ea580c; }
.ot-sp-kpi__icon--green { background: #dcfce7; color: #16a34a; }
.ot-sp-kpi__icon--red { background: #fee2e2; color: #dc2626; }

.ot-sp-kpi__body {
    min-width: 0;
    flex: 1;
}

.ot-sp-kpi__title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.2;
}

.ot-sp-kpi__value {
    margin: 0.28rem 0 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.ot-sp-kpi__label {
    margin: 0.28rem 0 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: #94a3b8;
}

.ot-sp-kpi__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0.7rem;
    border-top: 1px solid #f1f5f9;
}

.ot-sp-kpi__trend {
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.ot-sp-kpi__trend--good { color: #16a34a; }
.ot-sp-kpi__trend--bad { color: #dc2626; }
.ot-sp-kpi__trend--neutral { color: #94a3b8; }

.ot-sp-kpi__vs {
    font-size: 0.72rem;
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
}

.ot-sp-quick {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.04);
    padding: 1.15rem 1.2rem 1.25rem;
}

.ot-sp-quick__head {
    margin-bottom: 1rem;
}

.ot-sp-quick__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.ot-sp-quick__subtitle {
    margin: 0.28rem 0 0;
    font-size: 0.84rem;
    font-weight: 500;
    color: #94a3b8;
}

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

.ot-sp-quick-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border: 1px solid #e8edf5;
    border-radius: 3px;
    background: #fff;
    text-decoration: none !important;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    min-width: 0;
}

.ot-sp-quick-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
    color: inherit;
    text-decoration: none !important;
}

.ot-sp-quick-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 3px;
    border: 1.5px solid #93c5fd;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fff;
}

.ot-sp-quick-card__icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.ot-sp-quick-card__copy {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
    flex: 1;
}

.ot-sp-quick-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.ot-sp-quick-card__desc {
    font-size: 0.78rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.35;
}

.ot-sp-quick-card__chevron {
    color: #2563eb;
    flex-shrink: 0;
    display: inline-flex;
    opacity: 0.9;
}

.ot-sp-back-bar {
    display: flex;
    align-items: center;
    margin: 0 0 0.85rem;
}

@media (max-width: 1200px) {
    .ot-sp-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 767px) {
    .ot-sp-kpi-grid,
    .ot-sp-quick__grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Add Supplier create page (mock) ===== */
.ot-supplier-create-page {
    max-width: 1180px;
}

.ot-supplier-create-page .ot-products-header {
    margin-bottom: 1.25rem;
}

.ot-sp-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ot-sp-form-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.04);
    padding: 1.25rem 1.35rem 1.4rem;
}

.ot-sp-form-card__title {
    margin: 0 0 1.05rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.ot-sp-form-grid {
    display: grid;
    gap: 0.95rem 1rem;
}

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

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

.ot-sp-form-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0.95rem;
}

.ot-sp-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ot-sp-field > label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

.ot-supplier-create-page .ot-sp-field .form-control {
    height: 42px;
    border-radius: 3px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    background: #fff;
    color: #0f172a;
    font-size: 0.9rem;
}

.ot-supplier-create-page .ot-sp-field .form-control:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ot-supplier-create-page .ot-sp-field .form-control::placeholder {
    color: #94a3b8;
}

.ot-supplier-create-page .ot-sp-field .select2-container--default .select2-selection--single {
    height: 42px !important;
    border-radius: 3px !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
}

.ot-supplier-create-page .ot-sp-field .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
    padding-left: 12px !important;
    color: #0f172a !important;
}

.ot-supplier-create-page .ot-sp-field .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
}

.ot-supplier-create-page .ot-pf-affix {
    width: 100%;
}

.ot-supplier-create-page .ot-pf-affix > .form-control {
    border-radius: 3px 0 0 3px;
}

.ot-supplier-create-page .ot-pf-affix__suffix {
    min-width: 42px;
    height: 42px;
    border-radius: 0 3px 3px 0;
    border: 1px solid #e2e8f0;
    border-left: 0;
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .ot-sp-form-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .ot-sp-form-grid--2,
    .ot-sp-form-grid--3,
    .ot-sp-form-grid--4 {
        grid-template-columns: 1fr;
    }
}

/* Add Supplier — contact person panel + also-customer checkbox */
.ot-sp-field--checkbox {
    justify-content: center;
}

.ot-sp-check {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 0;
    cursor: pointer;
    padding: 0.55rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    background: #f8fafc;
    min-height: 42px;
}

.ot-sp-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ot-sp-check__box {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 3px;
    border: 1.5px solid #94a3b8;
    background: #fff;
    flex-shrink: 0;
    position: relative;
}

.ot-sp-check input:checked + .ot-sp-check__box {
    background: #2563eb;
    border-color: #2563eb;
}

.ot-sp-check input:checked + .ot-sp-check__box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ot-sp-check input:disabled + .ot-sp-check__box {
    opacity: 0.5;
}

.ot-sp-check__copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.ot-sp-check__copy strong {
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.ot-sp-check__copy small {
    font-size: 0.72rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.3;
}

.ot-sp-contact-panel {
    padding: 0;
    overflow: hidden;
}

.ot-sp-contact-panel__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 1.35rem;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

.ot-sp-contact-panel__toggle:hover {
    background: #f8fafc;
}

.ot-sp-contact-panel__toggle-main {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-width: 0;
}

.ot-sp-contact-panel__toggle-icon {
    width: 36px;
    height: 36px;
    border-radius: 3px;
    border: 1.5px solid #93c5fd;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #eff6ff;
}

.ot-sp-contact-panel__toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.ot-sp-contact-panel__toggle-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.ot-sp-contact-panel__toggle-hint {
    font-size: 0.78rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.35;
}

.ot-sp-contact-panel__chevron {
    color: #2563eb;
    flex-shrink: 0;
    transition: transform 0.18s ease;
    display: inline-flex;
}

.ot-sp-contact-panel.is-open .ot-sp-contact-panel__chevron {
    transform: rotate(180deg);
}

.ot-sp-contact-panel__body {
    padding: 0 1.35rem 1.25rem;
    border-top: 1px solid #eef2f7;
}

.ot-sp-contact-panel__body[hidden] {
    display: none !important;
}

.ot-sp-contact-panel__body .ot-sp-form-grid {
    padding-top: 1.05rem;
}

.ot-sp-contact-panel__note {
    margin: 0.85rem 0 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: #94a3b8;
}

/* POPIA consent on Add Supplier */
.ot-sp-form-card--consent {
    padding: 1rem 1.35rem;
}

.ot-sp-check--consent {
    align-items: flex-start;
}

.ot-sp-check--consent .ot-sp-check__copy strong {
    font-weight: 600;
    font-size: 0.84rem;
}

.ot-sp-check--consent .ot-sp-check__copy a {
    color: #2563eb;
    font-weight: 600;
}

.ot-supplier-create-page .ot-sp-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* ===== Add Customer create page (tabbed mock) ===== */
.ot-customer-create-page {
    max-width: 1180px;
}

/* Compact: label + control on one row */
.ot-customer-create-page .ot-sp-form {
    gap: 0.75rem;
}

.ot-customer-create-page .ot-sp-form-card {
    padding: 0.9rem 1.1rem 1rem;
}

.ot-customer-create-page .ot-sp-form-card__title {
    margin-bottom: 0.7rem;
    font-size: 0.98rem;
}

.ot-customer-create-page .ot-sp-form-card__head .ot-sp-form-card__title {
    margin-bottom: 0.7rem;
}

.ot-customer-create-page .ot-sp-form-grid {
    gap: 0.55rem 0.85rem;
}

.ot-customer-create-page .ot-sp-form-grid--3,
.ot-customer-create-page .ot-sp-form-grid--4 {
    margin-top: 0.55rem;
}

.ot-customer-create-page .ot-sp-field {
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
}

.ot-customer-create-page .ot-sp-field > label {
    flex: 0 0 148px;
    width: 148px;
    max-width: 148px;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.25;
}

.ot-customer-create-page .ot-sp-field > .form-control,
.ot-customer-create-page .ot-sp-field > .select2-container,
.ot-customer-create-page .ot-sp-field > .ot-pf-affix,
.ot-customer-create-page .ot-sp-field > textarea.form-control {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
}

.ot-customer-create-page .ot-sp-field > .select2-container {
    display: block;
}

.ot-customer-create-page .ot-sp-field:has(textarea) {
    align-items: flex-start;
}

.ot-customer-create-page .ot-sp-field:has(textarea) > label {
    padding-top: 0.55rem;
}

/* Multi-column grids: slightly narrower labels */
.ot-customer-create-page .ot-sp-form-grid--2 .ot-sp-field > label,
.ot-customer-create-page .ot-sp-form-grid--3 .ot-sp-field > label {
    flex-basis: 112px;
    width: 112px;
    max-width: 112px;
}

.ot-customer-create-page .ot-field-optional {
    display: block;
    margin-left: 0;
    margin-top: 0.1rem;
    line-height: 1.1;
}

.ot-customer-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 1.25rem;
    margin: 0 0 1.15rem;
    padding: 0 0.15rem;
    border-bottom: 1px solid #e2e8f0;
}

.ot-customer-tabs__btn {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0.7rem 0.1rem 0.85rem;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.ot-customer-tabs__btn:hover {
    color: #334155;
}

.ot-customer-tabs__btn.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.ot-customer-tab-panel[hidden] {
    display: none !important;
}

.ot-customer-card-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 0;
}

.ot-customer-card-row + .ot-customer-card-row {
    margin-top: 0;
}

.ot-sp-form-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.ot-sp-form-card__head--row {
    flex-wrap: wrap;
}

.ot-sp-form-card__head .ot-sp-form-card__title {
    margin-bottom: 1.05rem;
}

.ot-sp-form-card__title .fa {
    margin-right: 0.35rem;
    color: #64748b;
}

.ot-field-optional {
    margin-left: 0.25rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: #94a3b8;
}

.ot-sp-check--inline {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 1.05rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.ot-customer-help {
    margin: 0.85rem 0 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

#ot_shipping_fields.is-disabled {
    opacity: 0.55;
}

@media (max-width: 900px) {
    .ot-customer-card-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .ot-customer-create-page .ot-sp-field {
        flex-direction: column;
        align-items: stretch;
        gap: 0.3rem;
    }

    .ot-customer-create-page .ot-sp-field > label,
    .ot-customer-create-page .ot-sp-form-grid--2 .ot-sp-field > label,
    .ot-customer-create-page .ot-sp-form-grid--3 .ot-sp-field > label {
        flex: none;
        width: auto;
        max-width: none;
    }

    .ot-customer-create-page .ot-sp-field:has(textarea) > label {
        padding-top: 0;
    }

    .ot-customer-create-page .ot-field-optional {
        display: inline;
        margin-left: 0.25rem;
        margin-top: 0;
    }
}

[data-theme="dark"] .ot-customer-tabs {
    border-bottom-color: rgba(71, 85, 105, 0.65);
}

[data-theme="dark"] .ot-customer-tabs__btn {
    color: #94a3b8;
}

[data-theme="dark"] .ot-customer-tabs__btn.is-active {
    color: #93c5fd;
    border-bottom-color: #3b82f6;
}

/* Supplier extended fields + module embeds */
.ot-sp-form-grid--1 {
    grid-template-columns: 1fr;
}

.ot-sp-field__hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: #94a3b8;
}

.ot-sp-modules-card__intro {
    margin: -0.35rem 0 1rem;
    font-size: 0.84rem;
    font-weight: 500;
    color: #94a3b8;
}

.ot-sp-modules .cfm-expand-wrap,
.ot-sp-modules .cfm-person-block {
    margin-bottom: 0.65rem;
}

.ot-sp-modules .cfm-expand-btn,
.ot-sp-modules .more_btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    border-radius: 3px;
    padding: 0.55rem 0.85rem;
    font-size: 0.86rem;
    font-weight: 600;
}

.ot-sp-modules .cfm-expand-btn:hover,
.ot-sp-modules .more_btn:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.ot-sp-modules .cfm-expand-panel,
.ot-sp-modules .cfm-person-panel {
    margin-top: 0.75rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid #e8edf5;
    border-radius: 3px;
    background: #f8fafc;
}

.ot-sp-modules .procurement-supplier-fields {
    margin-top: 0.5rem;
}

.ot-sp-modules .procurement-supplier-fields .form-group label,
.ot-sp-modules .cfm-person-panel .form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
}

.ot-sp-modules .form-control {
    border-radius: 3px;
    border-color: #e2e8f0;
    height: 40px;
}

.ot-sp-modules hr {
    border-top-color: #e8edf5;
    margin: 1rem 0;
}

/* ===== Supplier & Purchases analytics dashboard ===== */
.ot-pa-page {
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.ot-pa-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.ot-pa-header__left {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-width: 0;
}

.ot-pa-header__titles {
    min-width: 0;
}

.ot-pa-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.ot-pa-subtitle {
    margin: 0.3rem 0 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
}

.ot-pa-header__actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.ot-pa-daterange {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 38px;
    padding: 0 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    color: #64748b;
}

.ot-pa-daterange__input {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 34px !important;
    min-height: 34px !important;
    width: 180px;
    max-width: 210px;
    padding: 0 !important;
    font-size: 0.82rem !important;
    font-weight: 600;
    color: #334155 !important;
    cursor: pointer;
}

.ot-pa-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 38px;
    padding: 0 0.9rem;
    border-radius: 3px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    cursor: pointer;
}

.ot-pa-filter-btn:hover {
    background: #f8fafc;
    color: #2563eb;
    border-color: #bfdbfe;
}

.ot-pa-kpi-grid {
    margin-bottom: 1.15rem;
}

.ot-pa-charts,
.ot-pa-tables {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}

.ot-pa-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.04);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ot-pa-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem 0.35rem;
}

.ot-pa-card__title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
}

.ot-pa-card__link {
    font-size: 0.78rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.ot-pa-card__link:hover {
    text-decoration: underline;
}

.ot-pa-card__body {
    padding: 0.35rem 0.85rem 0.85rem;
    flex: 1;
}

.ot-pa-card__body--table {
    padding: 0.25rem 0.4rem 0.35rem;
}

.ot-pa-card__foot {
    padding: 0.55rem 1.1rem 0.9rem;
    border-top: 1px solid #f1f5f9;
}

.ot-pa-foot-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.ot-pa-foot-link:hover {
    text-decoration: underline;
}

.ot-pa-chart {
    width: 100%;
    min-height: 260px;
}

.ot-pa-donut-body {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 0.35rem 0.75rem;
}

.ot-pa-legend {
    list-style: none;
    margin: 0;
    padding: 0 0.4rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.ot-pa-legend__item {
    display: grid;
    grid-template-columns: 10px 1fr auto auto;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
}

.ot-pa-legend__dot {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: #94a3b8;
}

.ot-pa-legend__item--paid .ot-pa-legend__dot { background: #3B82F6; }
.ot-pa-legend__item--partial .ot-pa-legend__dot { background: #F97316; }
.ot-pa-legend__item--due .ot-pa-legend__dot { background: #EF4444; }

.ot-pa-legend__label {
    font-weight: 600;
    color: #475569;
}

.ot-pa-legend__amount {
    font-weight: 700;
    color: #0f172a;
}

.ot-pa-legend__pct {
    color: #94a3b8;
    font-weight: 500;
}

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

.ot-pa-table th,
.ot-pa-table td {
    padding: 0.72rem 0.7rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.8rem;
    text-align: left;
    white-space: nowrap;
}

.ot-pa-table th {
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: none;
    letter-spacing: 0.01em;
}

.ot-pa-table td {
    color: #334155;
    font-weight: 500;
}

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

.ot-pa-invoice-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.ot-pa-invoice-link:hover {
    text-decoration: underline;
}

.ot-pa-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.3;
}

.ot-pa-badge--paid {
    background: #dcfce7;
    color: #15803d;
}

.ot-pa-badge--partial {
    background: #ffedd5;
    color: #c2410c;
}

.ot-pa-badge--due {
    background: #fee2e2;
    color: #b91c1c;
}

.ot-pa-empty {
    text-align: center;
    color: #94a3b8 !important;
    padding: 1.4rem 0.75rem !important;
}

@media (max-width: 1100px) {
    .ot-pa-charts,
    .ot-pa-tables {
        grid-template-columns: 1fr;
    }

    .ot-pa-donut-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ot-pa-title {
        font-size: 1.25rem;
    }

    .ot-pa-daterange__input {
        width: 150px;
    }
}

/* ===== Contact profile (customer / supplier show) ===== */
.ot-contact-show-page {
    max-width: 1280px;
}

/* Square chrome: cards, buttons, inputs, badges */
.ot-contact-show-page .ot-products-btn,
.ot-contact-show-page .ot-sp-form-card,
.ot-contact-show-page .ot-profile-hero,
.ot-contact-show-page .ot-profile-kpi,
.ot-contact-show-page .ot-profile-fact__icon,
.ot-contact-show-page .ot-profile-kpi__icon,
.ot-contact-show-page .ot-profile-badge,
.ot-contact-show-page .ot-profile-timeline__icon,
.ot-contact-show-page .form-control,
.ot-contact-show-page .select2-container--default .select2-selection--single,
.ot-contact-show-page .select2-container--default .select2-selection--multiple,
.ot-contact-show-page .btn,
.ot-contact-show-page input[type="text"],
.ot-contact-show-page input[type="email"],
.ot-contact-show-page input[type="number"],
.ot-contact-show-page input[type="search"],
.ot-contact-show-page select,
.ot-contact-show-page textarea {
    border-radius: 3px !important;
}

.ot-contact-show-page .ot-profile-avatar {
    border-radius: 3px;
}

/* Ensure FA5 solid icons render (Roboto override elsewhere) */
.ot-contact-show-page .fa,
.ot-contact-show-page .fas,
.ot-contact-show-page .far,
.ot-contact-show-page .fab,
.ot-contact-show-page [class*="fa-"] {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands" !important;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    line-height: 1;
    display: inline-block;
}

.ot-contact-show-page .fa,
.ot-contact-show-page .fas,
.ot-contact-show-page .fa:before,
.ot-contact-show-page .fas:before,
.ot-contact-show-page [class*="fa-"]:before {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
}

.ot-contact-show-page .far,
.ot-contact-show-page .far:before {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 400 !important;
}

.ot-contact-show-page .fab,
.ot-contact-show-page .fab:before {
    font-family: "Font Awesome 5 Brands" !important;
    font-weight: 400 !important;
}

.ot-profile-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: -0.35rem 0 1rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
}

.ot-profile-back:hover {
    color: #2563eb;
    text-decoration: none;
}

.ot-profile-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    padding: 1.25rem 1.4rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.04);
}

.ot-profile-hero__identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.ot-profile-avatar {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.ot-profile-hero__name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.ot-profile-hero__code {
    margin: 0.2rem 0 0.55rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: #94a3b8;
}

.ot-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ot-profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
}

.ot-profile-badge__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.ot-profile-badge--active {
    background: #dcfce7;
    color: #15803d;
}

.ot-profile-badge--credit {
    background: #ffedd5;
    color: #c2410c;
}

.ot-profile-badge--loyalty {
    background: #fef3c7;
    color: #b45309;
}

.ot-profile-badge--muted {
    background: #f1f5f9;
    color: #64748b;
}

.ot-profile-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
}

.ot-profile-fact {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    min-width: 140px;
}

.ot-profile-fact__icon {
    width: 36px;
    height: 36px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #64748b;
}

.ot-profile-fact__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.1rem;
}

.ot-profile-fact__value {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    word-break: break-word;
}

.ot-profile-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}

.ot-profile-kpi {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ot-profile-kpi__icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.ot-profile-kpi__icon--blue { background: #dbeafe; color: #2563eb; }
.ot-profile-kpi__icon--red { background: #fee2e2; color: #dc2626; }
.ot-profile-kpi__icon--orange { background: #ffedd5; color: #ea580c; }
.ot-profile-kpi__icon--purple { background: #ede9fe; color: #7c3aed; }
.ot-profile-kpi__icon--green { background: #dcfce7; color: #16a34a; }

.ot-profile-kpi__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.15rem;
}

.ot-profile-kpi__value {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.ot-profile-kpi__hint {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: #94a3b8;
}

.ot-contact-show-page .ot-profile-tabs {
    margin-bottom: 1rem;
}

.ot-profile-panel[hidden] {
    display: none !important;
}

.ot-profile-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1rem;
    align-items: start;
}

.ot-profile-overview__main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.ot-profile-card-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.ot-profile-card .ot-sp-form-card__title {
    margin-bottom: 0.85rem;
    font-size: 0.98rem;
}

.ot-profile-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.ot-profile-dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ot-profile-dl > div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 0.5rem;
}

.ot-profile-dl dt {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
}

.ot-profile-dl dd {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: #0f172a;
}

.ot-profile-address {
    margin: 0;
    white-space: pre-line;
    font-size: 0.88rem;
    font-weight: 500;
    color: #334155;
    line-height: 1.5;
}

.ot-profile-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

.ot-profile-link:hover {
    text-decoration: underline;
}

.ot-profile-table {
    margin: 0;
}

.ot-profile-table > thead > tr > th {
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: transparent;
}

.ot-profile-table > tbody > tr > td {
    border-top: 1px solid #f1f5f9;
    font-size: 0.86rem;
    color: #0f172a;
    vertical-align: middle;
}

.ot-pay-status {
    font-size: 0.78rem;
    font-weight: 700;
}

.ot-pay-status--paid { color: #16a34a; }
.ot-pay-status--partial { color: #ea580c; }
.ot-pay-status--due,
.ot-pay-status--overdue { color: #dc2626; }

.ot-profile-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.ot-profile-timeline__item {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
}

.ot-profile-timeline__icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.8rem;
}

.ot-profile-timeline__item--green .ot-profile-timeline__icon { background: #dcfce7; color: #16a34a; }
.ot-profile-timeline__item--blue .ot-profile-timeline__icon { background: #dbeafe; color: #2563eb; }
.ot-profile-timeline__item--orange .ot-profile-timeline__icon { background: #ffedd5; color: #ea580c; }
.ot-profile-timeline__item--red .ot-profile-timeline__icon { background: #fee2e2; color: #dc2626; }
.ot-profile-timeline__item--purple .ot-profile-timeline__icon { background: #ede9fe; color: #7c3aed; }

.ot-profile-timeline__item strong {
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
}

.ot-profile-timeline__item span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.74rem;
    font-weight: 500;
    color: #94a3b8;
}

.ot-profile-timeline__item small {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.72rem;
    color: #64748b;
}

.ot-profile-timeline__empty {
    font-size: 0.84rem;
    color: #94a3b8;
}

@media (max-width: 1100px) {
    .ot-profile-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ot-profile-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .ot-profile-kpis,
    .ot-profile-card-row {
        grid-template-columns: 1fr;
    }

    .ot-profile-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}

[data-theme="dark"] .ot-profile-hero,
[data-theme="dark"] .ot-profile-kpi,
[data-theme="dark"] .ot-contact-show-page .ot-sp-form-card {
    background: #0f172a;
    border-color: rgba(71, 85, 105, 0.55);
}

[data-theme="dark"] .ot-profile-hero__name,
[data-theme="dark"] .ot-profile-kpi__value,
[data-theme="dark"] .ot-profile-fact__value,
[data-theme="dark"] .ot-profile-dl dd,
[data-theme="dark"] .ot-profile-timeline__item strong {
    color: #f1f5f9;
}

[data-theme="dark"] .ot-profile-address,
[data-theme="dark"] .ot-profile-table > tbody > tr > td {
    color: #e2e8f0;
}


/* ===== Customer Groups mock (split view) ===== */
.ot-cg-page {
    --ot-cg-radius: 3px;
    max-width: 1400px;
    margin: 0 auto;
}

.ot-cg-page .ot-products-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ot-cg-page .ot-products-stat,
.ot-cg-page .ot-products-btn,
.ot-cg-page .ot-products-btn--primary,
.ot-cg-page .ot-products-btn--secondary,
.ot-cg-page .ot-products-btn--back {
    border-radius: var(--ot-cg-radius) !important;
}

.ot-cg-page .ot-products-stat__icon {
    border-radius: 3px !important;
}

.ot-cg-split {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.ot-cg-list-card,
.ot-cg-detail-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: var(--ot-cg-radius);
    box-shadow: var(--otp-shadow, 0 1px 2px rgba(15, 23, 42, 0.04));
    overflow: hidden;
}

.ot-cg-list-card__head {
    padding: 0.9rem 1rem 0.75rem;
    border-bottom: 1px solid #eef2f7;
}

.ot-cg-list-card__title {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.ot-cg-list-search {
    position: relative;
}

.ot-cg-list-search > i {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.8rem;
    pointer-events: none;
}

.ot-cg-list-search .form-control {
    height: 36px;
    padding-left: 2rem;
    border-radius: var(--ot-cg-radius);
    border-color: #e2e8f0;
    font-size: 0.84rem;
    box-shadow: none;
}

.ot-cg-list {
    list-style: none;
    margin: 0;
    padding: 0.4rem;
    max-height: min(62vh, 640px);
    overflow-y: auto;
}

.ot-cg-list-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid transparent;
    border-radius: var(--ot-cg-radius);
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.ot-cg-list-item:hover {
    background: #f8fafc;
}

.ot-cg-list-item.is-active {
    background: #eff6ff;
    border-color: #bfdbfe;
    box-shadow: inset 3px 0 0 #2563eb;
}

.ot-cg-list-item__copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.ot-cg-list-item__name {
    font-size: 0.9rem;
    font-weight: 650;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ot-cg-list-item__meta {
    font-size: 0.75rem;
    color: #64748b;
}

.ot-cg-list-empty {
    padding: 1.25rem 0.85rem;
    font-size: 0.84rem;
    color: #64748b;
    text-align: center;
}

.ot-cg-list-card__foot {
    padding: 0.65rem 1rem;
    border-top: 1px solid #eef2f7;
    font-size: 0.75rem;
    color: #64748b;
    background: #fafbfc;
}

.ot-cg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #1d4ed8;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
}

.ot-cg-avatar--lg {
    width: 48px;
    height: 48px;
    font-size: 0.85rem;
}

.ot-cg-avatar--sm {
    width: 32px;
    height: 32px;
    font-size: 0.68rem;
}

.ot-cg-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    font-size: 0.68rem;
    font-weight: 650;
    white-space: nowrap;
    flex-shrink: 0;
}

.ot-cg-badge--active {
    color: #15803d;
    background: #dcfce7;
}

.ot-cg-badge--muted {
    color: #64748b;
    background: #f1f5f9;
}

.ot-cg-detail-card {
    padding: 1.1rem 1.15rem 1rem;
    min-height: 420px;
}

.ot-cg-detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 360px;
    color: #94a3b8;
    text-align: center;
}

.ot-cg-detail-empty i {
    font-size: 2rem;
}

.ot-cg-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.ot-cg-detail-head__left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.ot-cg-detail-head__title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ot-cg-detail-head__name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 750;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.ot-cg-detail-head__meta {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
}

.ot-cg-detail-head__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.ot-cg-more .dropdown-menu {
    min-width: 180px;
    border-radius: var(--ot-cg-radius);
    border-color: #e2e8f0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    padding: 0.35rem 0;
}

.ot-cg-page .ot-products-filterbar__more-btn {
    border-radius: var(--ot-cg-radius) !important;
}

.ot-cg-more .dropdown-menu > li > a,
.ot-cg-more .dropdown-menu .ot-cg-menu-danger {
    display: block;
    width: 100%;
    padding: 0.45rem 0.9rem;
    border: 0;
    background: transparent;
    text-align: left;
    font-size: 0.84rem;
    color: #334155;
}

.ot-cg-more .dropdown-menu .ot-cg-menu-danger {
    color: #dc2626;
}

.ot-cg-more .dropdown-menu > li > a:hover,
.ot-cg-more .dropdown-menu .ot-cg-menu-danger:hover {
    background: #f8fafc;
}

.ot-cg-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.15rem;
}

.ot-cg-info-card {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: var(--ot-cg-radius);
    padding: 0.75rem 0.85rem;
    min-height: 84px;
}

.ot-cg-info-card__label {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 650;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ot-cg-info-card__label i {
    margin-right: 0.25rem;
    color: #94a3b8;
}

.ot-cg-info-card__value {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
}

.ot-cg-members__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.ot-cg-members__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.ot-cg-members__viewall {
    font-size: 0.82rem;
    font-weight: 600;
    color: #2563eb;
}

.ot-cg-members-table-wrap {
    border: 1px solid #eef2f7;
    border-radius: var(--ot-cg-radius);
    overflow: auto;
}

.ot-cg-members-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.ot-cg-members-table thead th {
    padding: 0.65rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.ot-cg-members-table tbody td {
    padding: 0.7rem 0.75rem;
    font-size: 0.84rem;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.ot-cg-members-table tbody tr:last-child td {
    border-bottom: 0;
}

.ot-cg-members-empty {
    text-align: center !important;
    color: #94a3b8 !important;
    padding: 1.5rem 0.75rem !important;
}

.ot-cg-member {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.ot-cg-member__copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ot-cg-member__name {
    font-weight: 650;
    color: #0f172a;
    text-decoration: none;
}

.ot-cg-member__name:hover {
    color: #2563eb;
}

.ot-cg-member__id {
    font-size: 0.72rem;
    color: #94a3b8;
}

.ot-cg-member-contact {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.78rem;
    color: #475569;
}

.ot-cg-member-contact i {
    width: 1em;
    color: #94a3b8;
    margin-right: 0.2rem;
}

.ot-cg-outstanding.is-due {
    color: #dc2626 !important;
    font-weight: 700;
}

.ot-cg-outstanding.is-clear {
    color: #15803d;
    font-weight: 600;
}

.ot-cg-members__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.7rem;
    font-size: 0.78rem;
    color: #64748b;
}

.ot-cg-members__foot a {
    font-weight: 650;
    color: #2563eb;
}

@media (max-width: 1100px) {
    .ot-cg-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .ot-cg-split {
        grid-template-columns: 1fr;
    }

    .ot-cg-list {
        max-height: 280px;
    }

    .ot-cg-page .ot-products-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .ot-cg-page .ot-products-stats,
    .ot-cg-info-grid {
        grid-template-columns: 1fr;
    }
}

[data-theme="dark"] .ot-cg-list-card,
[data-theme="dark"] .ot-cg-detail-card {
    background: #0f172a;
    border-color: rgba(71, 85, 105, 0.55);
}

[data-theme="dark"] .ot-cg-list-card__title,
[data-theme="dark"] .ot-cg-detail-head__name,
[data-theme="dark"] .ot-cg-list-item__name,
[data-theme="dark"] .ot-cg-info-card__value,
[data-theme="dark"] .ot-cg-members__title,
[data-theme="dark"] .ot-cg-member__name,
[data-theme="dark"] .ot-cg-members-table tbody td {
    color: #f1f5f9;
}

[data-theme="dark"] .ot-cg-list-item:hover {
    background: rgba(30, 41, 59, 0.8);
}

[data-theme="dark"] .ot-cg-list-item.is-active {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(59, 130, 246, 0.45);
}

[data-theme="dark"] .ot-cg-info-card,
[data-theme="dark"] .ot-cg-members-table thead th,
[data-theme="dark"] .ot-cg-list-card__foot {
    background: #1e293b;
    border-color: rgba(71, 85, 105, 0.55);
    color: #94a3b8;
}

[data-theme="dark"] .ot-cg-members-table-wrap {
    border-color: rgba(71, 85, 105, 0.55);
}

/* ===== Product Categories (taxonomies?type=product) ===== */
.ot-categories-page {
    --otp-radius: 3px;
}

.ot-categories-page .ot-products-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ot-categories-page .ot-products-stat,
.ot-categories-page .ot-products-btn,
.ot-categories-page .ot-products-stat__icon,
.ot-categories-page .ot-products-table-card,
.ot-categories-page .ot-products-filterbar,
.ot-categories-page .form-control,
.ot-categories-page .select2-container--default .select2-selection--single {
    border-radius: 3px !important;
}

.ot-categories-page .ot-products-filterbar__selects {
    min-width: 180px;
    max-width: 220px;
}

.ot-categories-page #taxonomyListTable_dt_search {
    display: none !important;
}

.ot-cat-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.ot-cat-badge--parent {
    color: #1d4ed8;
    background: #dbeafe;
}

.ot-cat-badge--sub {
    color: #7c3aed;
    background: #ede9fe;
}

.ot-cat-count {
    font-weight: 600;
    color: #334155;
}

.ot-categories-page .bt-col-count {
    text-align: right;
}

@media (max-width: 1100px) {
    .ot-categories-page .ot-products-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

[data-theme="dark"] .ot-cat-badge--parent {
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .ot-cat-badge--sub {
    color: #c4b5fd;
    background: rgba(124, 58, 237, 0.25);
}

[data-theme="dark"] .ot-cat-count {
    color: #e2e8f0;
}

/* ===== Variation Templates ===== */
.ot-variations-page {
    --otp-radius: 3px;
}

.ot-variations-page .ot-products-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ot-variations-page .ot-products-stat,
.ot-variations-page .ot-products-btn,
.ot-variations-page .ot-products-stat__icon,
.ot-variations-page .ot-products-table-card,
.ot-variations-page .ot-products-filterbar,
.ot-variations-page .form-control,
.ot-variations-page .select2-container--default .select2-selection--single {
    border-radius: 3px !important;
}

.ot-variations-page .ot-products-filterbar__selects {
    min-width: 160px;
    max-width: 200px;
}

.ot-variations-page #variationListTable_dt_search {
    display: none !important;
}

.ot-var-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    max-width: 360px;
}

.ot-var-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #334155;
    background: #f1f5f9;
    white-space: nowrap;
}

.ot-var-chip--more {
    color: #2563eb;
    background: #dbeafe;
}

.ot-var-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.ot-var-badge--used {
    color: #15803d;
    background: #dcfce7;
}

.ot-var-badge--unused {
    color: #c2410c;
    background: #ffedd5;
}

.ot-var-count {
    font-weight: 600;
    color: #334155;
}

.ot-var-muted {
    color: #94a3b8;
}

@media (max-width: 1100px) {
    .ot-variations-page .ot-products-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

[data-theme="dark"] .ot-var-chip {
    color: #e2e8f0;
    background: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .ot-var-chip--more {
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .ot-var-badge--used {
    color: #86efac;
    background: rgba(22, 163, 74, 0.25);
}

[data-theme="dark"] .ot-var-badge--unused {
    color: #fdba74;
    background: rgba(194, 65, 12, 0.25);
}

.ot-cust-kind {
    display: inline-flex;
    align-items: stretch;
    padding: 3px;
    gap: 3px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.ot-cust-kind__opt {
    margin: 0;
    cursor: pointer;
}

.ot-cust-kind__opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ot-cust-kind__opt span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    padding: 0.42rem 0.9rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    line-height: 1.2;
}

.ot-cust-kind__opt input:checked + span {
    background: #fff;
    color: #1d4ed8;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.ot-extra-contacts {
    margin-top: 1.15rem;
    padding-top: 0.95rem;
    border-top: 1px dashed #e2e8f0;
}

.ot-extra-contacts__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.15rem;
}

.ot-extra-contacts__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
}

.ot-extra-contacts__add {
    white-space: nowrap;
}

.ot-extra-contacts__list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 0.7rem;
}

.ot-extra-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.7rem 0.75rem 0.8rem;
    border: 1px solid #e8edf5;
    border-radius: 6px;
    background: #f8fafc;
}

.ot-extra-contact-row__grid {
    flex: 1 1 auto;
    min-width: 0;
}

.ot-extra-contact-row .ot-sp-field {
    flex-direction: column;
    align-items: stretch;
    gap: 0.28rem;
}

.ot-extra-contact-row .ot-sp-field > label,
.ot-customer-create-page .ot-extra-contact-row .ot-sp-field > label,
.ot-customer-create-page .ot-sp-form-grid--4 .ot-extra-contact-row .ot-sp-field > label {
    flex: none;
    width: auto;
    max-width: none;
    font-size: 0.72rem;
    color: #64748b;
}

.ot-extra-contact-row__remove {
    appearance: none;
    border: 0;
    background: transparent;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    margin-top: 1.15rem;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.ot-extra-contact-row__remove:hover {
    color: #b91c1c;
    background: #fef2f2;
}

.ot-profile-extra-contacts {
    list-style: none;
    margin: 0.65rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.ot-profile-extra-contacts li {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.84rem;
    color: #334155;
}

.ot-profile-extra-contacts__role {
    font-weight: 500;
    color: #64748b;
}

html[data-theme="dark"] .ot-cust-kind,
[data-theme="dark"] .ot-cust-kind,
body.dark-mode .ot-cust-kind {
    border-color: #334155;
    background: #0f172a;
}

html[data-theme="dark"] .ot-cust-kind__opt span,
[data-theme="dark"] .ot-cust-kind__opt span,
body.dark-mode .ot-cust-kind__opt span {
    color: #94a3b8;
}

html[data-theme="dark"] .ot-cust-kind__opt input:checked + span,
[data-theme="dark"] .ot-cust-kind__opt input:checked + span,
body.dark-mode .ot-cust-kind__opt input:checked + span {
    background: #1e293b;
    color: #93c5fd;
    box-shadow: none;
}

html[data-theme="dark"] .ot-extra-contacts,
[data-theme="dark"] .ot-extra-contacts,
body.dark-mode .ot-extra-contacts {
    border-top-color: #334155;
}

html[data-theme="dark"] .ot-extra-contacts__title,
[data-theme="dark"] .ot-extra-contacts__title,
body.dark-mode .ot-extra-contacts__title {
    color: #e2e8f0;
}

html[data-theme="dark"] .ot-extra-contact-row,
[data-theme="dark"] .ot-extra-contact-row,
body.dark-mode .ot-extra-contact-row {
    border-color: #334155;
    background: #0f172a;
}

html[data-theme="dark"] .ot-extra-contact-row .ot-sp-field > label,
[data-theme="dark"] .ot-extra-contact-row .ot-sp-field > label,
body.dark-mode .ot-extra-contact-row .ot-sp-field > label,
html[data-theme="dark"] .ot-customer-create-page .ot-sp-field > label,
[data-theme="dark"] .ot-customer-create-page .ot-sp-field > label,
body.dark-mode .ot-customer-create-page .ot-sp-field > label {
    color: #cbd5e1;
}

html[data-theme="dark"] .ot-extra-contact-row__remove:hover,
[data-theme="dark"] .ot-extra-contact-row__remove:hover,
body.dark-mode .ot-extra-contact-row__remove:hover {
    color: #fca5a5;
    background: rgba(185, 28, 28, 0.2);
}

html[data-theme="dark"] .ot-profile-extra-contacts li,
[data-theme="dark"] .ot-profile-extra-contacts li,
body.dark-mode .ot-profile-extra-contacts li {
    color: #e2e8f0;
}

html[data-theme="dark"] .ot-profile-extra-contacts__role,
[data-theme="dark"] .ot-profile-extra-contacts__role,
body.dark-mode .ot-profile-extra-contacts__role {
    color: #94a3b8;
}

html[data-theme="dark"] .ot-customer-tabs,
[data-theme="dark"] .ot-customer-tabs,
body.dark-mode .ot-customer-tabs {
    border-bottom-color: rgba(71, 85, 105, 0.65);
}

html[data-theme="dark"] .ot-customer-tabs__btn,
[data-theme="dark"] .ot-customer-tabs__btn,
body.dark-mode .ot-customer-tabs__btn {
    color: #94a3b8;
}

html[data-theme="dark"] .ot-customer-tabs__btn.is-active,
[data-theme="dark"] .ot-customer-tabs__btn.is-active,
body.dark-mode .ot-customer-tabs__btn.is-active {
    color: #93c5fd;
    border-bottom-color: #3b82f6;
}


.discount-recurring-panel {
    --panel-bg: #ffffff;
    --panel-text: #111827;
    --panel-muted: #6b7280;
    --panel-border: #e5e7eb;
    background: var(--panel-bg);
    color: var(--panel-text);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 0.9rem 1rem 1rem;
}
.discount-recurring-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.discount-recurring-panel__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}
.discount-recurring-panel__help {
    margin: 0.25rem 0 0;
    color: var(--panel-muted);
    font-size: 0.86rem;
}
html[data-theme="dark"] .discount-recurring-panel,
body.dark-mode .discount-recurring-panel,
[data-theme="dark"] .discount-recurring-panel {
    --panel-bg: #111827;
    --panel-text: #e2e8f0;
    --panel-muted: #94a3b8;
    --panel-border: #334155;
}
