/* =============================================================
   admin-enterprise-system.css
   Global enterprise UI system for admin pages.
   Reuses existing theme variables and palette.
   ============================================================= */

:root {
    /* ── Enterprise-layer variables: alias to canonical ds-tokens ── */
    --ui-radius-xs: var(--ds-radius-xs, 4px);
    --ui-radius-sm: var(--ds-radius-sm, 6px);
    --ui-radius-md: var(--ds-radius-md, 8px);

    --ui-space-1: var(--ds-space-4, 4px);
    --ui-space-2: var(--ds-space-8, 8px);
    --ui-space-3: var(--ds-space-12, 12px);
    --ui-space-4: var(--ds-space-16, 16px);
    --ui-space-5: var(--ds-space-20, 20px);
    --ui-space-6: var(--ds-space-24, 24px);

    --ui-text-xs: var(--ds-font-size-12, 12px);
    --ui-text-sm: var(--ds-font-size-13, 13px);
    --ui-text-md: var(--ds-font-size-14, 14px);
    --ui-text-lg: var(--ds-font-size-16, 16px);

    --ui-surface: var(--ds-surface, #ffffff);
    --ui-surface-subtle: var(--ds-surface-muted, #f7fbff);
    --ui-border: var(--ds-border-subtle, #dde6e9);
    --ui-border-strong: var(--ds-border-strong, #d4dde6);
    --ui-text: var(--ds-text-primary, #3c4d60);
    --ui-text-muted: var(--ds-text-muted, #6c7a89);
    --ui-heading: var(--ds-heading, #1f2d3d);

    --ui-shadow-sm: var(--ds-shadow-chip, 0 1px 2px rgba(15, 23, 42, 0.08));
    --ui-shadow-md: var(--ds-shadow-page-card, 0 12px 28px rgba(15, 23, 42, 0.12));

    --inner-heading-bg: #ffffff;
    --inner-heading-border: #d4dde6;
    --inner-heading-title: var(--secondary-color);
    --inner-heading-subtitle: #6c7a89;
}

.bgpositionshorthand body {
    color: var(--ui-text);
    font-size: var(--ui-text-md);
}

.content-wrapper {
    padding: var(--ui-space-5);
}

.content-wrapper .content-heading {
    padding: 1rem 1.25rem;
    margin-bottom: var(--ui-space-5);
    border-bottom: 1px solid var(--ui-border-strong);
    background: #fbfdff;
}

.tag_replacement_header.text_wrapper h1 {
    font-size: 1.2rem;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

.tag_replacement_header.text_wrapper small {
    margin-top: 2px;
    font-size: var(--ui-text-xs);
    color: var(--ui-text-muted);
}

.breadcrumb {
    margin-bottom: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

.breadcrumb-item,
.breadcrumb-item a {
    font-size: var(--ui-text-sm);
}

/* Global breadcrumb color policy:
   clickable nodes use secondary color; terminal active node uses default text color. */
.breadcrumb .breadcrumb-item a,
.breadcrumb .breadcrumb-item a:visited,
.breadcrumb .breadcrumb-item a:hover,
.breadcrumb .breadcrumb-item a:focus {
    color: var(--seconday-color, var(--secondary-color));
}

.breadcrumb .breadcrumb-item a em {
    color: inherit;
}

.breadcrumb .breadcrumb-item.active {
    color: var(--form-container-text-color, var(--ui-text));
}

/* Global toastr reset: match stock toastr defaults and override earlier custom toast styles. */
#toast-container {
    z-index: 999999 !important;
    pointer-events: none;
    position: fixed !important;
    left: 50% !important;
    top: 24px !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(360px, calc(100vw - 32px)) !important;
}

#toast-container * {
    box-sizing: border-box;
}

#toast-container > div {
    position: relative;
    pointer-events: auto;
    overflow: hidden;
    text-align: left !important;
    margin: 0 0 12px !important;
    padding: 12px 46px 12px 58px !important;
    width: 100% !important;
    min-height: 50px !important;
    height: auto !important;
    border: 0 !important;
    border-radius: 8px !important;
    background-position: 15px center !important;
    background-repeat: no-repeat !important;
    box-shadow: 0 14px 32px rgba(16, 24, 40, 0.18) !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

#toast-container > div:hover {
    box-shadow: 0 18px 36px rgba(16, 24, 40, 0.24) !important;
    opacity: 1 !important;
    cursor: pointer;
}

#toast-container > .toast-success {
    background: linear-gradient(135deg, #39c67a 0%, #2bb673 100%) !important;
}

#toast-container > .toast-error {
    background: linear-gradient(135deg, #ff6b5a 0%, #ef3b2d 100%) !important;
}

#toast-container > .toast-info {
    background: linear-gradient(135deg, #27a6ff 0%, #1f7fe0 100%) !important;
}

#toast-container > .toast-warning {
    background: linear-gradient(135deg, #ffca48 0%, #f4ad21 100%) !important;
}

#toast-container > .toast-success::before,
#toast-container > .toast-error::before,
#toast-container > .toast-info::before,
#toast-container > .toast-warning::before {
    position: absolute;
    left: 16px;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-50%);
}

#toast-container > .toast-success::before {
    content: '✓';
    color: #2bb673;
}

#toast-container > .toast-error::before {
    content: '×';
    color: #ef3b2d;
}

#toast-container > .toast-info::before {
    content: 'i';
    color: #1f7fe0;
    font-family: Georgia, serif;
}

#toast-container > .toast-warning::before {
    content: '!';
    color: #f4ad21;
}

#toast-container .toast-title {
    font-weight: 800 !important;
    margin-bottom: 3px;
    color: #ffffff !important;
}

#toast-container .toast-title:empty {
    display: none !important;
    margin: 0 !important;
}

#toast-container > div .toast-message {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: auto !important;
    min-height: 26px;
    margin: 0 !important;
    padding-right: 4px;
    text-align: left !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    letter-spacing: 0.1px !important;
    color: #ffffff !important;
    opacity: 0.95 !important;
}

#toast-container > div .toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.35);
    opacity: 1;
}

#toast-container .toast-close-button {
    position: absolute;
    right: 12px;
    top: 50%;
    float: none;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    transform: translateY(-50%);
    color: #ffffff;
    text-shadow: none;
    opacity: 0.9;
}

#toast-container .toast-close-button:hover,
#toast-container .toast-close-button:focus {
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    opacity: 0.7;
}

.card {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    box-shadow: var(--ui-shadow-sm);
    background: var(--ui-surface);
}

.card .card-header {
    border-bottom: 1px solid #e8eff6;
    padding: 0.9rem 1rem;
    font-size: var(--ui-text-lg);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

/* Unified inner-page section heading style for list/detail cards. */
.card .card-header.list-card-heading-red-body,
.card .card-header.list-card-heading-body {
    min-height: 76px;
    padding: 0.85rem 1rem !important;
    border-bottom: 1px solid var(--inner-heading-border) !important;
    background: var(--inner-heading-bg) !important;
    float: none !important;
}

/* Legacy inline headers (no .row child): keep flex alignment so icon + title stay centered. */
.card .card-header.list-card-heading-red-body:not(:has(.row)),
.card .card-header.list-card-heading-body:not(:has(.row)) {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
}

/* Coupon-style heading rhythm for simple list headers (icon + title + subtitle). */
.card .card-header.list-card-heading-red-body:not(:has(.row)) > small,
.card .card-header.list-card-heading-body:not(:has(.row)) > small {
    flex: 0 0 100%;
    margin-top: 0.15rem;
    margin-left: 1.7rem;
}

/* Row-based headers (new Categories style): full-width row. */

.card .card-header.list-card-heading-red-body .row,
.card .card-header.list-card-heading-body .row {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.card .card-header.list-card-heading-red-body .row > [class*='col-'],
.card .card-header.list-card-heading-body .row > [class*='col-'] {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}

.card .card-header.list-card-heading-red-body .row > [class*='col-']:first-child,
.card .card-header.list-card-heading-body .row > [class*='col-']:first-child {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
}

.card .card-header.list-card-heading-red-body .row > [class*='col-']:first-child small,
.card .card-header.list-card-heading-body .row > [class*='col-']:first-child small {
    flex: 0 0 100%;
}

.card .card-header.list-card-heading-red-body span:not(.category-list-title-text),
.card .card-header.list-card-heading-body span:not(.category-list-title-text),
.card .card-header.list-card-heading-red-body b,
.card .card-header.list-card-heading-body b {
    color: var(--inner-heading-title);
    font-weight: normal;
}

.card .card-header.list-card-heading-red-body small:not(.category-table-subtitle),
.card .card-header.list-card-heading-body small:not(.category-table-subtitle) {
    display: block;
    margin-top: 0.3rem;
    color: var(--inner-heading-subtitle);
    font-size: 0.87rem;
    line-height: 1.25;
}

.card .card-header.list-card-heading-body span.text-danger,
.card .card-header.list-card-heading-red-body span.text-danger,
.card .card-header.list-card-heading-body b.text-danger,
.card .card-header.list-card-heading-red-body b.text-danger {
    color: var(--inner-heading-title) !important;
}

.card .card-header.list-card-heading-body > i,
.card .card-header.list-card-heading-red-body > i,
.card .card-header.list-card-heading-body [class*='col-'] > i:not(.category-list-title-icon),
.card .card-header.list-card-heading-red-body [class*='col-'] > i:not(.category-list-title-icon) {
    color: var(--primary-color) !important;
}

.card .card-body {
    padding: 1rem;
}

.btn {
    min-height: 36px;
    border-radius: var(--ui-radius-sm);
    font-size: var(--ui-text-sm);
    font-weight: 600;
    padding: 0.36rem 0.88rem;
    border-width: 1px;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.btn:focus,
.btn:active:focus,
.btn.active:focus {
    outline: 0 !important;
    box-shadow: 0 0 0 3px rgba(20, 90, 134, 0.14) !important;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-labeled {
    display: inline-flex;
    align-items: center;
}

.btn-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    border-radius: var(--ui-radius-xs) 0 0 var(--ui-radius-xs);
}

.btn-primary,
.btn-success,
.btn-info,
.btn-danger {
    border-radius: var(--ui-radius-sm);
}

.form-group {
    margin-bottom: var(--ui-space-4);
}

label,
.control-label,
.form-group > label {
    margin-bottom: 0.35rem;
    font-size: var(--ui-text-sm);
    font-weight: 600;
    color: #3c4d60;
}

.form-control,
select.form-control,
textarea.form-control {
    min-height: 38px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-sm);
    box-shadow: none;
    background: #ffffff;
    color: var(--ui-text);
    font-size: var(--ui-text-md);
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

textarea.form-control {
    min-height: 96px;
}

.form-control::placeholder {
    color: #9aa8b6;
}

.form-control:focus,
select.form-control:focus,
textarea.form-control:focus,
.dropdown .btn.btn-default:focus {
    border-color: #a6bfd7;
    box-shadow: 0 0 0 3px rgba(20, 90, 134, 0.1);
}

.input-group-addon,
.input-group-text {
    border-color: var(--ui-border);
}

.dropdown .btn.btn-default,
.dropdown-menu,
.chosen-container-single .chosen-single,
.select2-container--default .select2-selection--single {
    border-radius: var(--ui-radius-sm);
}

.dropdown-menu {
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-md);
}

.dropdown-menu > li > a,
.dropdown-item {
    font-size: var(--ui-text-sm);
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.dropdown-menu > li > a:hover,
.dropdown-item:hover {
    background: #f4f9fe;
}

.table,
.table-bordered,
.yajra-datatable {
    border-color: #e5edf6;
}

.table > thead > tr > th {
    border-bottom: 1px solid #dce8f4;
    color: #3f5368;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #f6fbff;
}

.table > tbody > tr > td {
    font-size: 13px;
    color: var(--ui-text);
    border-top: 1px solid #edf3f8;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th {
    background: #f5fafe;
}

.table-responsive {
    border-radius: var(--ui-radius-md);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: var(--ui-radius-sm);
}

/* Cross-module consistency pass: tighten shared section rhythm and controls. */
.content-wrapper .card > .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.content-wrapper .card > .card-header .row {
    width: 100%;
}

/* Keep simple icon+title section headers left-aligned in tab panes.
   Preserve space-between for headers that contain actions/rows. */
.content-wrapper
    .subscription-panel
    .card
    > .card-header:not(:has(.row)):not(:has(.btn)):not(:has(.dropdown)):not(
        :has([class*='float-'])
    ) {
    justify-content: flex-start;
}

.content-wrapper .table-responsive {
    border: 1px solid #e5edf6;
    border-radius: var(--ui-radius-sm);
    background: #ffffff;
}

.content-wrapper .table-responsive .table {
    margin-bottom: 0;
}

.content-wrapper .input-group .form-control {
    min-width: 0;
}

.content-wrapper .btn.btn-sm,
.content-wrapper .btn-xs {
    min-height: 32px;
    font-size: 12px;
    padding-top: 0.28rem;
    padding-bottom: 0.28rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--ui-radius-sm) !important;
}

/* Global Customer ID style for any DataTable column labeled "Customer ID".
   Applied by legacy-datatables-init.js via .dt-customer-id-pill class. */
.dataTables_wrapper .dt-customer-id-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    max-width: 100%;
    padding: 0.22rem 0.5rem;
    border: 1px solid #d4e8ef;
    border-radius: var(--ds-radius-full, 9999px);
    background: #edf7fb;
    color: var(--secondary-color, #0a6f86) !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.dataTables_wrapper .dt-customer-id-pill:hover,
.dataTables_wrapper .dt-customer-id-pill:focus,
.dataTables_wrapper .dt-customer-id-pill:visited {
    color: var(--secondary-color, #0a6f86) !important;
    text-decoration: none;
}

/* Global Order # style for any DataTable order identifier column.
   Applied by legacy-datatables-init.js via .dt-order-id-pill class. */
.dataTables_wrapper .dt-order-id-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    max-width: 100%;
    padding: 0.22rem 0.5rem;
    border: 1px solid #d8e3fb;
    border-radius: var(--ds-radius-full, 9999px);
    background: #eef4ff;
    color: #2f63bf !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.dataTables_wrapper .dt-order-id-pill:hover,
.dataTables_wrapper .dt-order-id-pill:focus,
.dataTables_wrapper .dt-order-id-pill:visited {
    color: #2f63bf !important;
    text-decoration: none;
}

/* Orders Type column: keep Affiliate/API info icon inline and in primary color,
   and use primary color for the affiliate code in dropdown details. */
.dataTables_wrapper .order-affiliate-type-wrap {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.dataTables_wrapper .order-affiliate-type-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.dataTables_wrapper .order-affiliate-type-btn .caret {
    margin-left: 2px;
}

.dataTables_wrapper .order-affiliate-info-icon,
.dataTables_wrapper .order-affiliate-code {
    color: var(--primary-color) !important;
}

.dataTables_wrapper .order-affiliate-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
}

.dataTables_wrapper .order-affiliate-code {
    font-weight: 600;
}

.alert,
.badge,
.label {
    border-radius: var(--ui-radius-sm);
}

.ui-stack-sm {
    display: grid;
    gap: var(--ui-space-2);
}

.ui-stack-md {
    display: grid;
    gap: var(--ui-space-4);
}

.ui-inline {
    display: inline-flex;
    align-items: center;
    gap: var(--ui-space-2);
}

.ui-section {
    margin-bottom: var(--ui-space-5);
}

.ui-card-shell {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-sm);
}

.ui-pill {
    display: inline-flex;
    align-items: center;
    border-radius: var(--ui-radius-sm);
    padding: 0.18rem 0.5rem;
    font-size: 12px;
    font-weight: 600;
}

.parsley-errors-list > li,
.invalid-feedback,
.help-block.text-danger,
.text-danger {
    font-size: 12px;
}

/* Suppress outline for mouse users only; keyboard focus-visible is preserved below */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
[role='button']:focus:not(:focus-visible),
.dropdown-toggle:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* Reduce visual noise from rounded utility classes used in legacy templates. */
.rounded,
.rounded-lg,
.rounded-pill {
    border-radius: var(--ui-radius-sm) !important;
}

/* Login pages aligned with enterprise spacing and controls. */
.admin-login-wrapper .card {
    border-radius: var(--ui-radius-md);
}

.admin-login-wrapper .form-control,
.admin-login-wrapper .login-form-control {
    border-radius: var(--ui-radius-sm);
}

.admin-login-wrapper .btn,
.admin-login-wrapper .btn-red {
    border-radius: var(--ui-radius-sm);
    min-height: 38px;
}

/* Content dropdown toggles inside DataTables cells (e.g. Type column
   "Affiliate Purchase") should not show focus/active outlines or shadows. */
.dataTables_wrapper tbody .dropdown > .btn.dropdown-toggle:focus,
.dataTables_wrapper tbody .dropdown > .btn.dropdown-toggle:active,
.dataTables_wrapper tbody .dropdown.show > .btn.dropdown-toggle {
    box-shadow: none !important;
    outline: 0 !important;
    border-color: transparent !important;
}

/* Table row action controls: compact icon-only enterprise style.
   Scoped to .arrow-dropdown-toggle / .dropleft action wrappers so content
   dropdowns (e.g. Type column "Affiliate Purchase") keep their text label. */
.dataTables_wrapper .arrow-dropdown-toggle,
.dataTables_wrapper .dropleft > .btn.dropdown-toggle,
.dataTables_wrapper .arrow-dropleft .btn.dropdown-toggle,
.bootgrid-table .arrow-dropdown-toggle,
.bootgrid-table .dropleft > .btn.dropdown-toggle,
.bootgrid .arrow-dropdown-toggle {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: var(--secondary-color) !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    font-size: 0 !important;
    line-height: 1;
    transition: none !important;
}

.dataTables_wrapper .arrow-dropdown-toggle:hover,
.dataTables_wrapper .dropleft > .btn.dropdown-toggle:hover,
.dataTables_wrapper .arrow-dropleft .btn.dropdown-toggle:hover,
.bootgrid-table .arrow-dropdown-toggle:hover,
.bootgrid-table .dropleft > .btn.dropdown-toggle:hover,
.bootgrid .arrow-dropdown-toggle:hover,
.dataTables_wrapper .show > .arrow-dropdown-toggle,
.dataTables_wrapper .show > .dropleft > .btn.dropdown-toggle,
.bootgrid-table .show > .arrow-dropdown-toggle,
.bootgrid .show > .arrow-dropdown-toggle {
    border: 0 !important;
    border-color: transparent !important;
    background: transparent !important;
    color: var(--secondary-color) !important;
    box-shadow: none !important;
    transform: translateY(-1px);
}

.dataTables_wrapper .arrow-dropdown-toggle:focus,
.dataTables_wrapper .arrow-dropdown-toggle:active,
.dataTables_wrapper .dropleft > .btn.dropdown-toggle:focus,
.dataTables_wrapper .dropleft > .btn.dropdown-toggle:active,
.dataTables_wrapper .arrow-dropleft .btn.dropdown-toggle:focus,
.dataTables_wrapper .arrow-dropleft .btn.dropdown-toggle:active,
.bootgrid-table .arrow-dropdown-toggle:focus,
.bootgrid-table .arrow-dropdown-toggle:active,
.bootgrid-table .dropleft > .btn.dropdown-toggle:focus,
.bootgrid-table .dropleft > .btn.dropdown-toggle:active,
.bootgrid .arrow-dropdown-toggle:focus,
.bootgrid .arrow-dropdown-toggle:active {
    border: 0 !important;
    border-color: transparent !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.dataTables_wrapper .arrow-dropdown-toggle::after,
.dataTables_wrapper .dropleft > .btn.dropdown-toggle::after,
.dataTables_wrapper .arrow-dropleft .btn.dropdown-toggle::after,
.bootgrid-table .arrow-dropdown-toggle::after,
.bootgrid-table .dropleft > .btn.dropdown-toggle::after,
.bootgrid .arrow-dropdown-toggle::after,
.dataTables_wrapper .dropleft .dropdown-toggle.arrow-dropdown-toggle::after {
    display: none !important;
}

.dataTables_wrapper .arrow-dropdown-toggle .dropdown-text,
.dataTables_wrapper .dropleft > .btn.dropdown-toggle .dropdown-text,
.bootgrid-table .arrow-dropdown-toggle .dropdown-text,
.bootgrid-table .dropleft > .btn.dropdown-toggle .dropdown-text,
.bootgrid .arrow-dropdown-toggle .dropdown-text,
.dataTables_wrapper .arrow-dropdown-toggle .caret,
.dataTables_wrapper .dropleft > .btn.dropdown-toggle .caret,
.bootgrid-table .arrow-dropdown-toggle .caret,
.bootgrid-table .dropleft > .btn.dropdown-toggle .caret,
.bootgrid .arrow-dropdown-toggle .caret {
    display: none !important;
}

.dataTables_wrapper .arrow-dropdown-toggle i,
.dataTables_wrapper .dropleft > .btn.dropdown-toggle i,
.bootgrid-table .arrow-dropdown-toggle i,
.bootgrid-table .dropleft > .btn.dropdown-toggle i,
.bootgrid .arrow-dropdown-toggle i {
    display: none !important;
}

.dataTables_wrapper .arrow-dropdown-toggle::before,
.dataTables_wrapper .dropleft .dropdown-toggle.arrow-dropdown-toggle::before,
.dataTables_wrapper .dropleft > .btn.dropdown-toggle.dropdown-toggle-nocaret::before,
.dataTables_wrapper .dropleft .dropdown-toggle.before-none::before,
.bootgrid-table .dropleft .dropdown-toggle.arrow-dropdown-toggle::before,
.bootgrid-table .dropleft > .btn.dropdown-toggle.dropdown-toggle-nocaret::before,
.bootgrid-table .dropleft .dropdown-toggle.before-none::before,
.bootgrid .arrow-dropdown-toggle.dropdown-toggle-nocaret::before {
    content: '' !important;
    width: 4px !important;
    height: 4px !important;
    border-radius: 50% !important;
    background: currentColor !important;
    box-shadow:
        0 -6px 0 currentColor,
        0 6px 0 currentColor !important;
    color: var(--secondary-color) !important;
    display: inline-block !important;
}

.dataTables_wrapper .arrow-dropdown-toggle:disabled,
.dataTables_wrapper .dropleft > .btn.dropdown-toggle:disabled,
.bootgrid-table .arrow-dropdown-toggle:disabled,
.bootgrid-table .dropleft > .btn.dropdown-toggle:disabled,
.bootgrid .arrow-dropdown-toggle:disabled {
    opacity: 0.45;
}

/* Price matrix tables use the legacy ellipsis icon element. Keep it visible even
   when other global dropdown-icon rules hide icon or pseudo-icon variants. */
.dataTables_wrapper #priceMatrixListTable .arrow-dropdown-toggle i,
#priceMatrixListTable .arrow-dropdown-toggle i {
    display: inline-block !important;
    margin-left: 0 !important;
    font-size: 13px !important;
    color: var(--secondary-color) !important;
}

.dataTables_wrapper #priceMatrixListTable .arrow-dropdown-toggle::before,
#priceMatrixListTable .arrow-dropdown-toggle::before {
    display: none !important;
}

.dataTables_wrapper #priceMatrixListTable .arrow-dropdown-toggle,
#priceMatrixListTable .arrow-dropdown-toggle,
.dataTables_wrapper #priceMatrixListTable .arrow-dropdown-toggle:hover,
#priceMatrixListTable .arrow-dropdown-toggle:hover,
.dataTables_wrapper #priceMatrixListTable .arrow-dropdown-toggle:focus,
#priceMatrixListTable .arrow-dropdown-toggle:focus,
.dataTables_wrapper #priceMatrixListTable .arrow-dropdown-toggle:active,
#priceMatrixListTable .arrow-dropdown-toggle:active,
.dataTables_wrapper #priceMatrixListTable .show > .arrow-dropdown-toggle,
#priceMatrixListTable .show > .arrow-dropdown-toggle {
    outline: none !important;
    box-shadow: none !important;
    border: 0 !important;
    border-color: transparent !important;
    background: transparent !important;
}

/* Price Matrix popup styled to match enterprise admin theme. */
.swal2-popup.pm-swal-popup {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    box-shadow: var(--ui-shadow-md);
    padding: 0;
    overflow: hidden;
}

.pm-popup {
    text-align: left;
}

.pm-popup__header {
    position: relative;
    padding: var(--ui-space-5);
    padding-left: 2.35rem;
}

.pm-popup__header::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 1.35rem;
    width: 6px;
    height: 32px;
    border-radius: var(--ds-radius-full);
    background: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(20, 90, 134, 0.1);
}

.pm-popup__title {
    margin: 0;
    color: var(--inner-heading-title);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.pm-popup__subtitle {
    margin: var(--ui-space-2) 0 0;
    color: var(--ui-text-muted);
    font-size: var(--ui-text-md);
}

.pm-popup__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ui-space-2);
    margin-top: var(--ui-space-3);
}

.pm-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--ui-border-strong);
    border-radius: var(--ui-radius-sm);
    background: var(--ui-surface-subtle);
    color: var(--ui-text);
    font-size: var(--ui-text-sm);
    font-weight: 600;
    padding: 0.2rem 0.55rem;
}

.pm-chip--success {
    border-color: #bcead4;
    background: #e9f9f1;
    color: #117a52;
}

.pm-chip--muted {
    border-color: #d6dee8;
    background: #f4f7fb;
    color: #5b6c80;
}

.pm-popup__table-wrap {
    max-height: 430px;
    overflow: auto;
    padding: 0 var(--ui-space-5) var(--ui-space-5);
}

.pm-popup__table {
    border-color: var(--ui-border);
}

.pm-popup__table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f6fbff;
}

.pm-popup__table tbody td {
    vertical-align: middle;
}

.pm-status {
    display: inline-flex;
    align-items: center;
    border-radius: var(--ds-radius-full);
    padding: 0.12rem 0.6rem;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.pm-status--enabled {
    background: #e9f9f1;
    color: #117a52;
    border: 1px solid #bcead4;
}

.pm-status--disabled {
    background: #f3f6f9;
    color: #55697e;
    border: 1px solid #d8e0ea;
}

.swal2-popup.pm-swal-popup .swal2-actions {
    margin: 0;
    padding: var(--ui-space-4) var(--ui-space-5) var(--ui-space-5);
    border-top: 1px solid var(--ui-border);
    justify-content: center;
}

.swal2-popup.pm-swal-popup .pm-swal-btn {
    min-width: 92px;
    border-radius: var(--ui-radius-sm);
}

@media (max-width: 767.98px) {
    .pm-popup__header {
        padding: var(--ui-space-4);
        padding-left: 2rem;
    }

    .pm-popup__header::before {
        left: 0.8rem;
        top: 1rem;
        height: 24px;
    }

    .pm-popup__title {
        font-size: 1.2rem;
    }

    .pm-popup__table-wrap {
        padding: 0 var(--ui-space-4) var(--ui-space-4);
    }
}

/* Responsive consistency */
@media (max-width: 991.98px) {
    .content-wrapper {
        padding: 1rem;
    }

    .content-wrapper .content-heading {
        margin-bottom: 1rem;
        padding: 0.85rem 1rem;
    }
}

@media (max-width: 767.98px) {
    .content-wrapper .content-heading {
        padding: 0.75rem 0.9rem;
    }

    .card .card-header,
    .card .card-body {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }

    .btn {
        min-height: 34px;
        font-size: 12px;
    }

    .table > tbody > tr > td,
    .table > thead > tr > th {
        white-space: normal;
    }

    .dataTables_wrapper .table-responsive,
    .dataTables_wrapper .mobile-datatable-scrollbar {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .dataTables_wrapper table.dataTable {
        min-width: 980px !important;
    }

    .dataTables_wrapper table.dataTable thead th,
    .dataTables_wrapper table.dataTable tbody td {
        white-space: nowrap !important;
    }
}

/* ============================================================
   Disable browser focus / active outlines globally
   Applies to both login and admin layouts (loaded everywhere).
   NOTE: removes default focus-ring; ensure interactive controls
   still have visible state via background/border/box-shadow.
   ============================================================ */
*:focus,
*:focus-visible,
*:active,
*:focus-within,
/* Mouse/pointer users: suppress outline but keep box-shadow focus ring from components */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible),
.btn:focus:not(:focus-visible),
.form-control:focus:not(:focus-visible) {
    outline: none !important;
    outline-offset: 0 !important;
}

/* Keep Add Card modal close control visible on light modal headers. */
#creditCardModalRegister .modal-header [data-dismiss="modal"],
#AddCardForm .modal-header [data-dismiss="modal"] {
    color: #1f2937 !important;
    opacity: 1 !important;
}

#creditCardModalRegister .modal-header [data-dismiss="modal"] i,
#AddCardForm .modal-header [data-dismiss="modal"] i,
#AddCardForm .modal-header [data-dismiss="modal"] span {
    color: #1f2937 !important;
    opacity: 1 !important;
}

/* Customer header More Options: keep dropdown menu above neighboring containers. */
.customer-header-actions .dropdown,
.customer-more-options-dropdown {
    position: relative;
    z-index: 1080;
}

.customer-header-actions .dropdown .dropdown-menu,
.customer-more-options-dropdown .customer-more-options-menu {
    z-index: 1090;
    min-width: 220px;
}
