.table-wrap {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel-soft) 88%, transparent), color-mix(in srgb, var(--panel) 94%, transparent));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.admin-shell .table-wrap {
    min-width: 0;
    max-width: 100%;
    margin-top: 12px;
}

.admin-table-shell .table-wrap {
    margin-top: 0;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1120px;
    table-layout: fixed;
    background: transparent;
}

.admin-table-tight {
    min-width: 0;
    table-layout: auto;
}

.admin-table-auto {
    min-width: max(100%, 720px);
    table-layout: auto;
}

.admin-shell .admin-table,
.admin-shell .admin-table-tight {
    max-width: none;
}

.col-check {
    width: var(--admin-check-column-width);
}

.col-check-compact {
    width: var(--admin-check-column-width-compact);
}

.col-product {
    width: 36%;
}

.col-product-featured {
    width: 32%;
}

.col-product-wide {
    width: 29%;
}

.col-price {
    width: 9%;
}

.col-price-compact {
    width: 7%;
}

.col-source {
    width: 13%;
}

.col-source-wide {
    width: 16%;
}

.col-rate {
    width: 9%;
}

.col-rate-wide {
    width: 12%;
}

.col-display {
    width: 13%;
}

.col-display-wide {
    width: 15%;
}

.col-expire {
    width: 15%;
}

.col-expire-compact {
    width: 14%;
}

.col-setting {
    width: 12%;
}

.col-setting-wide {
    width: 14%;
}

.admin-table th,
.admin-table td {
    padding: 12px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    position: static;
    top: auto;
    line-height: 1.45;
}

.admin-table-tight th,
.admin-table-tight td {
    padding: 6px 8px;
    font-size: 0.8rem;
}

.admin-table tbody tr {
    transition: background 160ms ease;
}

.admin-table tbody tr:hover {
    background: var(--table-row-hover);
}

.admin-table tbody tr.row-current {
    background: var(--table-row-active);
}

.admin-table th {
    text-align: left;
    color: var(--muted);
    font-weight: 500;
    font-size: 0.82rem;
    background: color-mix(in srgb, var(--panel) 90%, transparent);
    backdrop-filter: blur(12px);
}

.admin-table th:first-child {
    border-top-left-radius: 18px;
}

.admin-table th:last-child {
    border-top-right-radius: 18px;
}

.table-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    line-height: 1.2;
}

.table-label .icon {
    width: var(--icon-size-sm);
    height: var(--icon-size-sm);
}

.button-compact {
    min-height: 42px;
    padding: 0.65rem 1rem;
}

.token-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.admin-table-shell .pagination {
    margin-top: 0;
}

.pagination-link,
.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid var(--line);
    background: var(--panel-muted);
    color: var(--text);
}

.pagination-nav {
    min-width: 64px;
}

.pagination-current {
    color: var(--accent-contrast);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    border-color: transparent;
    font-weight: 700;
}

.pagination-ellipsis {
    border-color: transparent;
    color: var(--muted);
    background: transparent;
    min-width: 28px;
}

.product-cell {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.product-cell img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 12px;
}

.product-cell p {
    margin-bottom: 0;
    color: var(--muted);
}

.product-meta {
    min-width: 0;
}

.product-meta strong {
    display: -webkit-box;
    margin-bottom: 4px;
    line-height: 1.32;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    overflow-wrap: anywhere;
}

.product-meta p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    overflow-wrap: anywhere;
}

.products-admin-table {
    min-width: 1260px;
}

.products-admin-table th:nth-child(1),
.products-admin-table td:nth-child(1) {
    padding-left: 6px;
    padding-right: 4px;
}

.products-admin-table th:nth-child(2),
.products-admin-table td:nth-child(2) {
    min-width: 0;
}

.products-admin-table .product-cell img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
}

.products-admin-table .product-meta strong {
    font-size: 0.98rem;
    line-height: 1.36;
}

.products-admin-table .product-meta span {
    line-height: 1.5;
}

.col-actions {
    width: 160px;
}

.col-actions-wide {
    width: 168px;
}

.field-block-image {
    min-width: 0;
}

.image-edit-trigger {
    width: 100%;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 12px;
    border: 1px solid var(--field-border);
    background: var(--panel-muted);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.image-edit-trigger:hover,
.image-edit-trigger:focus-visible {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    background: var(--panel-soft);
}

.image-edit-trigger img,
.image-edit-placeholder {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    object-fit: cover;
    background: var(--panel-soft);
}

.image-edit-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.image-edit-trigger span:last-child {
    font-weight: 700;
    line-height: 1.2;
}

.image-modal-preview {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: var(--panel-muted);
    border: 1px solid var(--line);
}

.image-modal-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 14px;
    background: var(--panel-soft);
}

.image-modal-empty {
    margin-bottom: 0;
}

.live-room-label {
    margin-top: 2px;
    font-size: 0.76rem;
    color: var(--accent);
}

.mini-form {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 6px;
    align-items: center;
}

.row-actions {
    display: grid;
    gap: 6px;
    width: min(100%, 176px);
}

.row-actions-inline {
    display: flex;
    flex-wrap: nowrap;
    width: auto;
    gap: 8px;
    align-items: center;
}

.row-actions form {
    margin: 0;
}

.row-actions-inline form {
    width: auto;
    flex: 0 0 auto;
}

.row-actions .button {
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.row-actions .button .icon {
    width: 0.92rem;
    height: 0.92rem;
}

.row-actions-inline .button {
    width: auto;
    min-width: 88px;
    padding-inline: 12px;
}

.product-setting-summary {
    display: grid;
    gap: 6px;
    align-items: start;
}

.button-product-edit {
    width: 100%;
}

.input-mini {
    min-width: 0;
    width: 76px;
}

.column-price,
.column-rate,
.column-display,
.column-expire,
.column-setting {
    white-space: nowrap;
}

.column-display {
    min-width: 156px;
}

.column-expire .metric-inline {
    font-size: 0.82rem;
}

.column-display .subtext {
    margin-top: 2px;
    white-space: normal;
}

.mini-pill {
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.mini-pill-accent {
    color: var(--accent-contrast);
    background: linear-gradient(135deg, #6366f12e 0%, #c746d32e 100%);
}
