/* Table-first proxy workspace. Loaded after proxy-guided.css on /Proxy/Index. */
.proxy-table-first {
    --proxy-accent-contrast: var(--ui-custom-accent-contrast, #07130e);
    --proxy-accent-soft: color-mix(in srgb, var(--proxy-accent) 12%, var(--proxy-row));
    --proxy-hover: color-mix(in srgb, var(--proxy-accent) 7%, var(--proxy-row));
    --proxy-divider: color-mix(in srgb, var(--proxy-border) 82%, transparent);
    max-width: 100%;
    overflow-x: clip;
}

.proxy-table-first .proxy-hero,
.proxy-table-first .proxy-picker-panel,
.proxy-table-first .proxy-panel,
.proxy-table-first + .proxy-security-reminder {
    border-radius: 8px !important;
}

/* One continuous summary rail. */
.proxy-table-first .proxy-hero {
    margin-bottom: 12px !important;
}

.proxy-table-first .proxy-stat {
    min-height: 66px;
    padding: 11px 16px !important;
}

.proxy-table-first .proxy-stat-icon {
    width: 32px;
    height: 32px;
    color: var(--proxy-accent) !important;
    font-size: 1.15rem;
}

.proxy-table-first .proxy-stat small {
    line-height: 1.2;
}

.proxy-table-first .proxy-stat strong {
    line-height: 1.2;
}

/* Workspace frame and filter rail. */
.proxy-table-first .proxy-picker-panel {
    padding: 0 !important;
    overflow: hidden;
}

.proxy-table-first .proxy-workspace-head {
    min-height: 58px;
    padding: 12px 14px 7px;
}

.proxy-table-first .proxy-workspace-head h5 {
    font-size: 1rem !important;
    line-height: 1.25;
}

.proxy-table-first .proxy-workspace-head .text-muted {
    margin-top: 3px !important;
    font-size: .7rem !important;
    line-height: 1.35;
}

.proxy-table-first #proxyOpenCatalogBtn {
    display: none !important;
}

.proxy-table-first .proxy-group-filters {
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 5px 14px 11px;
    scrollbar-width: thin;
}

.proxy-table-first .proxy-group-filter {
    flex: 0 0 auto;
    min-height: 32px !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
    font-size: .69rem !important;
    font-weight: 650;
    white-space: nowrap;
}

.proxy-table-first .proxy-group-filter.is-active {
    border-color: var(--proxy-accent) !important;
    background: var(--proxy-accent-soft) !important;
    box-shadow: inset 0 -2px var(--proxy-accent) !important;
}

/* 72/28 table-first split. */
.proxy-table-first .proxy-guided-purchase-grid {
    display: grid;
    grid-template-columns: minmax(0, 72fr) minmax(310px, 28fr);
    gap: 14px;
    align-items: stretch;
    margin: 0 14px 14px;
}

.proxy-table-first .proxy-inline-catalog,
.proxy-table-first .proxy-guided-order {
    min-width: 0;
    border: 1px solid var(--proxy-border);
    border-radius: 7px;
    background: var(--proxy-row);
    box-shadow: none;
    overflow: hidden;
}

/* Catalog search and dense data table. */
.proxy-table-first .proxy-inline-catalog-head {
    display: block;
    min-height: 0;
    padding: 8px;
    border-bottom: 1px solid var(--proxy-border);
    background: var(--proxy-panel);
}

.proxy-table-first .proxy-inline-catalog-head h6 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.proxy-table-first .proxy-inline-search {
    grid-template-columns: 34px minmax(0, 1fr);
    width: 100%;
    min-height: 35px;
    border-radius: 6px;
    background: var(--proxy-control);
}

.proxy-table-first .proxy-inline-search i {
    color: var(--proxy-muted);
    font-size: .82rem;
}

.proxy-table-first .proxy-inline-search input {
    height: 33px;
    padding-right: 10px;
    font-size: .7rem;
}

.proxy-table-first .proxy-inline-table-wrap {
    width: 100%;
    min-height: 0;
    max-height: 462px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.proxy-table-first .proxy-inline-table {
    min-width: 760px;
    table-layout: fixed;
    font-size: .69rem;
}

.proxy-table-first .proxy-inline-table th:nth-child(1) { width: 36%; }
.proxy-table-first .proxy-inline-table th:nth-child(2) { width: 9%; }
.proxy-table-first .proxy-inline-table th:nth-child(3) { width: 13%; }
.proxy-table-first .proxy-inline-table th:nth-child(4) { width: 12%; }
.proxy-table-first .proxy-inline-table th:nth-child(5) { width: 12%; }
.proxy-table-first .proxy-inline-table th:nth-child(6) { width: 12%; }
.proxy-table-first .proxy-inline-table th:nth-child(7) { width: 6%; text-align: center; }

.proxy-table-first .proxy-inline-table th,
.proxy-table-first .proxy-inline-table td {
    height: 48px;
    padding: 7px 10px;
    border-bottom-color: var(--proxy-divider);
}

.proxy-table-first .proxy-inline-table th {
    height: 36px;
    color: var(--proxy-muted);
    background: var(--proxy-head);
    font-size: .61rem;
    letter-spacing: .01em;
}

.proxy-table-first .proxy-inline-table td:last-child {
    text-align: center;
}

.proxy-table-first .proxy-inline-table tbody tr,
.proxy-table-first .proxy-inline-table tbody tr:nth-child(even) {
    position: relative;
    background: var(--proxy-row);
}

.proxy-table-first .proxy-inline-table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--proxy-panel) 58%, var(--proxy-row));
}

.proxy-table-first .proxy-inline-table tbody tr:hover {
    background: var(--proxy-hover) !important;
}

.proxy-table-first .proxy-inline-table tbody tr.is-selected {
    background: var(--proxy-accent-soft) !important;
    box-shadow: inset 3px 0 var(--proxy-accent) !important;
}

.proxy-table-first .proxy-inline-table td:first-child strong {
    overflow: hidden;
    color: var(--proxy-text);
    font-size: .69rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.proxy-table-first .proxy-inline-table td:first-child small {
    overflow: hidden;
    margin-top: 2px;
    color: var(--proxy-muted);
    font-size: .59rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.proxy-table-first .proxy-inline-table code {
    color: color-mix(in srgb, var(--proxy-accent) 62%, var(--proxy-text));
    font-size: .64rem;
}

.proxy-table-first .proxy-inline-price {
    color: var(--proxy-text);
    font-size: .7rem;
}

.proxy-table-first .proxy-status-chip {
    justify-content: center;
    min-width: 62px;
    min-height: 22px;
    border-radius: 5px;
    font-size: .59rem;
}

.proxy-table-first .proxy-inline-select {
    width: 26px;
    height: 26px;
    border-color: color-mix(in srgb, var(--proxy-muted) 78%, transparent);
}

.proxy-table-first .proxy-inline-table tr.is-selected .proxy-inline-select {
    border-color: var(--proxy-accent);
    background: color-mix(in srgb, var(--proxy-accent) 16%, transparent);
    color: var(--proxy-accent);
}

.proxy-table-first .proxy-inline-catalog-foot {
    min-height: 34px;
    padding: 8px 10px;
    background: var(--proxy-panel);
    font-size: .61rem;
}

/* One flat inspector panel instead of nested cards. */
.proxy-table-first .proxy-guided-order {
    display: flex;
    width: 100%;
    min-width: 0;
    padding: 0;
    background: var(--proxy-panel);
}

.proxy-table-first .proxy-guided-order .proxy-picker-main {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.proxy-table-first .proxy-guided-order .proxy-picker-selected,
.proxy-table-first .proxy-guided-order .proxy-picker-buy {
    align-self: stretch !important;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.proxy-table-first .proxy-guided-order .proxy-picker-selected {
    flex: 1 1 auto;
    padding: 0 !important;
}

.proxy-table-first .proxy-picker-selected-head {
    display: block;
    padding: 14px 14px 0;
}

.proxy-table-first .proxy-picker-selected-head .text-warning {
    margin: 0 !important;
    color: var(--proxy-accent) !important;
    font-size: .59rem !important;
    letter-spacing: .035em;
}

.proxy-table-first .proxy-picker-selected-head h5,
.proxy-table-first .proxy-picker-selected-head .text-muted,
.proxy-table-first #proxySelectedTrigger {
    display: none !important;
}

.proxy-table-first .proxy-picker-trigger {
    display: block;
    width: calc(100% - 28px);
    min-height: 0 !important;
    margin: 7px 14px 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    pointer-events: none;
}

.proxy-table-first .proxy-picker-trigger strong,
.proxy-table-first .proxy-picker-trigger span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.proxy-table-first .proxy-picker-trigger strong {
    color: var(--proxy-text) !important;
    font-size: .94rem !important;
    line-height: 1.35;
}

.proxy-table-first .proxy-picker-trigger span {
    margin-top: 3px;
    color: var(--proxy-muted) !important;
    font-size: .62rem !important;
    line-height: 1.35;
}

.proxy-table-first .proxy-picker-facts {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0 !important;
    width: calc(100% - 28px);
    max-width: calc(100% - 28px);
    margin: 14px !important;
    border: 1px solid var(--proxy-border);
    border-radius: 6px;
    overflow: hidden;
}

.proxy-table-first .proxy-picker-fact {
    display: grid;
    grid-template-rows: 20px auto auto;
    place-items: center;
    min-width: 0;
    padding: 9px 4px !important;
    border: 0 !important;
    border-right: 1px solid var(--proxy-divider) !important;
    border-radius: 0 !important;
    background: var(--proxy-control) !important;
    text-align: center;
}

.proxy-table-first .proxy-picker-fact:last-child {
    border-right: 0 !important;
}

.proxy-table-first .proxy-picker-fact > i {
    color: var(--proxy-accent);
    font-size: .86rem;
    line-height: 1;
}

.proxy-table-first .proxy-picker-fact small {
    overflow: hidden;
    width: 100%;
    margin: 2px 0 1px;
    color: var(--proxy-muted) !important;
    font-size: .5rem !important;
    line-height: 1.2;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.proxy-table-first .proxy-picker-fact strong {
    overflow: hidden;
    width: 100%;
    color: var(--proxy-text) !important;
    font-size: .65rem !important;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.proxy-table-first .proxy-service-info {
    width: calc(100% - 28px);
    max-width: calc(100% - 28px);
    margin: 0 14px 14px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.proxy-table-first .proxy-service-info__head {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    border-top: 1px solid var(--proxy-divider);
    border-bottom: 1px solid var(--proxy-divider);
    background: transparent !important;
    background-image: none !important;
    color: var(--proxy-accent) !important;
    font-size: .61rem !important;
    font-weight: 750;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.proxy-table-first .proxy-service-info__list {
    max-height: 150px;
    margin: 0 !important;
    overflow-y: auto;
    scrollbar-width: thin;
}

.proxy-table-first .proxy-service-info__item {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    min-height: 34px;
    padding: 9px 0;
    border-bottom: 1px solid var(--proxy-divider);
    color: var(--proxy-muted) !important;
    font-size: .6rem !important;
    line-height: 1.35;
}

.proxy-table-first .proxy-service-info__item:last-child {
    border-bottom: 0;
}

.proxy-table-first .proxy-service-info__item i {
    margin-top: 1px;
    color: #38c976 !important;
    font-size: .7rem;
}

.proxy-table-first .proxy-guided-order .proxy-picker-buy {
    padding: 13px 14px 14px !important;
    border-top: 1px solid var(--proxy-border) !important;
    background: color-mix(in srgb, var(--proxy-head) 48%, var(--proxy-panel)) !important;
}

.proxy-table-first .proxy-picker-buy > .text-warning {
    margin-bottom: 8px !important;
    color: var(--proxy-accent) !important;
    font-size: .59rem !important;
    letter-spacing: .035em;
}

.proxy-table-first .proxy-picker-buy > .text-muted {
    display: none !important;
}

.proxy-table-first .proxy-buy-form {
    display: grid !important;
    grid-template-columns: 96px minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: end !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.proxy-table-first .proxy-buy-form .form-group {
    grid-column: 1;
}

.proxy-table-first .proxy-buy-form label {
    display: block;
    margin: 0 0 5px !important;
    color: var(--proxy-muted) !important;
    font-size: .57rem !important;
    letter-spacing: .03em;
}

.proxy-table-first .proxy-buy-form__qty {
    width: 100% !important;
    height: 34px;
    min-height: 34px !important;
    padding: 0 10px;
    border-radius: 6px !important;
}

.proxy-table-first .proxy-buy-form .btn-primary {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 37px !important;
    border-color: var(--proxy-accent) !important;
    background: var(--proxy-accent) !important;
    color: var(--proxy-accent-contrast) !important;
    -webkit-text-fill-color: var(--proxy-accent-contrast) !important;
    font-size: .69rem !important;
    font-weight: 750;
}

.proxy-table-first .proxy-buy-form__hint {
    grid-column: 1 / -1;
    margin-top: 1px;
    color: var(--proxy-muted) !important;
    font-size: .55rem !important;
    line-height: 1.4;
}

.proxy-table-first .proxy-picker-login {
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.proxy-table-first .proxy-picker-login .btn-primary {
    border-color: var(--proxy-accent) !important;
    background: var(--proxy-accent) !important;
    color: var(--proxy-accent-contrast) !important;
    -webkit-text-fill-color: var(--proxy-accent-contrast) !important;
}

/* The global simple/theme layers use ID-level button selectors. Keep the
   selected palette contrast color on the two primary purchase actions. */
#uiSimpleRoot .proxy-table-first .proxy-buy-form .btn.btn-primary,
#uiSimpleRoot .proxy-table-first .proxy-picker-login .btn.btn-primary {
    border-color: var(--proxy-accent) !important;
    background: var(--proxy-accent) !important;
    color: var(--proxy-accent-contrast) !important;
    -webkit-text-fill-color: var(--proxy-accent-contrast) !important;
}

#uiSimpleRoot .proxy-table-first .proxy-picker-trigger {
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

#uiSimpleRoot .proxy-table-first .proxy-picker-selected-head .text-warning,
#uiSimpleRoot .proxy-table-first .proxy-picker-buy > .text-warning {
    color: var(--proxy-accent) !important;
    -webkit-text-fill-color: var(--proxy-accent) !important;
}

/* Guidance, purchased packages, and security note continue the same flat system. */
.proxy-table-first .proxy-safety-rail {
    margin-top: 12px;
    border-radius: 7px !important;
}

.proxy-table-first .proxy-safety-rail > div {
    min-height: 54px;
    padding: 9px 13px;
}

.proxy-table-first .proxy-safety-rail i,
.proxy-table-first .proxy-security-reminder i {
    color: var(--proxy-accent);
}

.proxy-table-first .proxy-user-grid > .proxy-panel:last-child {
    margin-top: 12px !important;
    padding: 12px !important;
}

.proxy-table-first .proxy-user-grid > .proxy-panel:last-child > .d-flex {
    min-height: 38px;
    margin-bottom: 8px !important;
}

.proxy-table-first .proxy-user-grid > .proxy-panel:last-child h5 {
    font-size: .9rem !important;
}

.proxy-table-first .proxy-table th,
.proxy-table-first .proxy-table td {
    vertical-align: middle;
}

.proxy-table-first .proxy-empty-note {
    margin: 0;
    border-radius: 6px !important;
    box-shadow: none !important;
}

.proxy-table-first :is(button, .btn, input, select, tr) {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    filter: none !important;
}

@media (max-width: 1099.98px) {
    .proxy-table-first .proxy-guided-purchase-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .proxy-table-first .proxy-guided-order .proxy-picker-main {
        display: flex !important;
    }

    .proxy-table-first .proxy-inline-table-wrap {
        max-height: 390px;
    }
}

@media (max-width: 767.98px) {
    .proxy-table-first {
        overflow-x: hidden;
    }

    .proxy-table-first .proxy-workspace-head {
        padding: 11px 10px 6px;
    }

    .proxy-table-first .proxy-group-filters {
        padding: 4px 10px 10px;
    }

    .proxy-table-first .proxy-guided-purchase-grid {
        gap: 10px;
        margin: 0 10px 10px;
    }

    .proxy-table-first .proxy-inline-catalog,
    .proxy-table-first .proxy-guided-order,
    .proxy-table-first .proxy-inline-table-wrap {
        max-width: 100%;
    }

    .proxy-table-first .proxy-inline-table-wrap {
        max-height: 340px;
        overflow-x: auto;
    }

    .proxy-table-first .proxy-picker-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .proxy-table-first .proxy-picker-fact:nth-child(2) {
        border-right: 0 !important;
    }

    .proxy-table-first .proxy-picker-fact:nth-child(-n+2) {
        border-bottom: 1px solid var(--proxy-divider) !important;
    }
}

@media (max-width: 575.98px) {
    .proxy-table-first .proxy-stat {
        min-height: 56px;
        gap: 5px;
        padding: 8px 7px !important;
    }

    .proxy-table-first .proxy-stat-icon {
        width: 23px;
        height: 23px;
        font-size: .85rem;
    }

    .proxy-table-first .proxy-stat small {
        font-size: .52rem !important;
    }

    .proxy-table-first .proxy-stat strong {
        font-size: .82rem !important;
    }

    .proxy-table-first .proxy-workspace-head h5 {
        font-size: .91rem !important;
    }

    .proxy-table-first .proxy-group-filter {
        min-height: 30px !important;
        padding: 4px 10px !important;
        font-size: .63rem !important;
    }

    .proxy-table-first .proxy-picker-selected-head,
    .proxy-table-first .proxy-guided-order .proxy-picker-buy {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .proxy-table-first .proxy-picker-trigger {
        width: calc(100% - 24px);
        margin-right: 12px;
        margin-left: 12px;
    }

    .proxy-table-first .proxy-picker-facts,
    .proxy-table-first .proxy-service-info {
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
        margin-right: 12px !important;
        margin-left: 12px !important;
    }

    .proxy-table-first .proxy-buy-form {
        grid-template-columns: 92px minmax(0, 1fr) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .proxy-table-first *,
    .proxy-table-first *::before,
    .proxy-table-first *::after {
        animation: none !important;
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
