/* ResellSetu supplier portal + OTP auth */
:root {
    --p2-navy: #0F2C59;
    --p2-navy-deep: #0A1E3D;
    --p2-orange: #FF6B00;
    --p2-orange-hover: #E05E00;
    --p2-bg: #F3F5F9;
    --p2-text: #334155;
    --p2-muted: #64748B;
    --p2-line: #E6EBF2;
    --p2-error-bg: #FEF2F2;
    --p2-error-text: #B91C1C;
    --p2-error-border: #FECACA;
    --p2-ok-bg: #ECFDF5;
    --p2-ok-text: #047857;
    --p2-ok-border: #A7F3D0;
    --p2-sidebar: 248px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.p2-body {
    min-height: 100vh;
    background: var(--p2-bg);
    color: var(--p2-text);
}

/* Shared form bits (also used by supplier/login.php) */
.p2-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--p2-orange);
}

.p2-alert {
    margin: 0 0 1.15rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.45;
}

.p2-alert-error {
    background: var(--p2-error-bg);
    color: var(--p2-error-text);
    border: 1px solid var(--p2-error-border);
}

.p2-alert-success {
    background: var(--p2-ok-bg);
    color: var(--p2-ok-text);
    border: 1px solid var(--p2-ok-border);
}

.p2-alert-info {
    background: #EEF2FF;
    color: var(--p2-navy);
    border: 1px solid #C7D2FE;
}

.p2-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--p2-navy);
}

.p2-input {
    width: 100%;
    min-height: 48px;
    margin-bottom: 1rem;
    padding: 0.75rem 0.95rem;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--p2-text);
    background: #fff;
}

.p2-input:focus {
    outline: none;
    border-color: var(--p2-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.16);
}

.p2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0 1.2rem;
    border: none;
    border-radius: 10px;
    background: var(--p2-orange);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.p2-btn:hover {
    background: var(--p2-orange-hover);
}

.p2-btn-inline {
    margin-top: 0.85rem;
}

.p2-login-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1rem 2rem;
}

.p2-login-brand {
    text-align: center;
    margin-bottom: 1.25rem;
}

.p2-login-brand img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.p2-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 10px 30px rgba(15, 44, 89, 0.08);
    border: 1px solid var(--p2-line);
}

.p2-title {
    margin: 0 0 0.35rem;
    color: var(--p2-navy);
    font-size: 1.45rem;
    font-weight: 800;
}

.p2-sub {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: var(--p2-muted);
}

.p2-links {
    margin: 1.15rem 0 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--p2-muted);
}

.p2-links a {
    color: var(--p2-navy);
    font-weight: 700;
    text-decoration: none;
}

@media (min-width: 640px) {
    .p2-login-wrap {
        justify-content: center;
        padding: 2rem;
    }

    .p2-card {
        padding: 2rem 1.75rem;
    }
}

/* Login / OTP — centered, no page scroll */
html:has(.auth-body) {
    height: 100%;
    overflow: hidden;
}

.auth-body {
    height: 100dvh;
    overflow: hidden;
    color: var(--p2-text);
    background:
        radial-gradient(900px 480px at 8% -8%, rgba(255, 107, 0, 0.14), transparent 55%),
        radial-gradient(800px 420px at 108% 108%, rgba(15, 44, 89, 0.14), transparent 50%),
        var(--p2-bg);
}

.auth-screen {
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    width: min(100%, 420px);
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem 1.35rem 1.25rem;
    border: 1px solid var(--p2-line);
    box-shadow: 0 18px 50px rgba(15, 44, 89, 0.12);
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 0.85rem;
}

.auth-logo img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.auth-title {
    margin: 0 0 0.3rem;
    text-align: center;
    color: var(--p2-navy);
    font-size: 1.45rem;
    font-weight: 800;
}

.auth-sub,
.auth-links {
    text-align: center;
    color: var(--p2-muted);
    font-size: 0.85rem;
}

.auth-sub {
    margin: 0 0 1rem;
    line-height: 1.45;
}

.auth-links {
    margin: 0.85rem 0 0;
}

.auth-links a {
    color: var(--p2-navy);
    font-weight: 700;
    text-decoration: none;
}

.auth-input,
.auth-otp-input {
    margin-bottom: 0.85rem;
}

.auth-otp-input {
    letter-spacing: 0.38em;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
}

.auth-screen .p2-btn {
    width: 100%;
}

.auth-resend {
    text-align: center;
    margin-top: 0.55rem;
}

.auth-otp {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
}

html:has(.auth-otp) {
    height: auto;
    overflow: auto;
}

.auth-otp .auth-screen {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    padding: 1.5rem 1rem;
}

/* App shell */
.p2-app-body {
    min-height: 100vh;
    background: var(--p2-bg);
    color: var(--p2-text);
}

.p2-app {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

.p2-sidebar {
    width: var(--p2-sidebar);
    flex-shrink: 0;
    background: var(--p2-navy-deep);
    color: #fff;
    padding: 1.2rem 0.85rem 1.25rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.p2-sidebar-brand {
    display: flex;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
}

.p2-sidebar-brand img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.p2-sidebar-kicker {
    margin: 1.15rem 0.5rem 0.5rem;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
}

.p2-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.p2-nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.78rem 0.8rem;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
}

.p2-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.p2-nav-link.is-active {
    background: var(--p2-orange);
}

.p2-nav-logout {
    margin-top: auto;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.p2-nav-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    flex-shrink: 0;
}

.p2-nav-icon svg {
    width: 20px;
    height: 20px;
}

.p2-app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.p2-topbar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--p2-line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.p2-menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--p2-line);
    border-radius: 10px;
    background: #fff;
    color: var(--p2-navy);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.p2-menu-btn svg {
    width: 22px;
    height: 22px;
}

.p2-topbar-title {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--p2-navy);
}

.p2-userchip {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    max-width: 240px;
}

.p2-userchip-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--p2-navy);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.p2-userchip-name {
    font-size: 0.88rem;
    font-weight: 650;
    color: var(--p2-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p2-overlay {
    display: none;
}

.p2-content {
    flex: 1;
    width: 100%;
    padding: 1.5rem 1.5rem 2.5rem;
}

.p2-page-lead {
    margin: 0 0 1.25rem;
    color: var(--p2-muted);
    font-size: 0.95rem;
    max-width: 70ch;
    line-height: 1.5;
}

.p2-page-lead a {
    color: var(--p2-navy);
    font-weight: 700;
    text-decoration: none;
}

/* Dashboard */
.p2-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.6rem 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--p2-navy-deep) 0%, var(--p2-navy) 58%, #163d73 100%);
    color: #fff;
}

.p2-banner-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 700;
}

.p2-banner h2 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
}

.p2-banner-copy p {
    margin: 0;
    max-width: 58ch;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.5;
}

.p2-btn-banner {
    background: var(--p2-orange);
    flex-shrink: 0;
}

.p2-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.p2-stat-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: #fff;
    border: 1px solid var(--p2-line);
    border-radius: 16px;
    padding: 1.1rem 1.15rem;
}

.p2-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #EEF2FF;
    color: var(--p2-navy);
    flex-shrink: 0;
}

.p2-stat-icon svg {
    width: 20px;
    height: 20px;
}

.p2-stat-icon-ok {
    background: #ECFDF5;
    color: #047857;
}

.p2-stat-icon-warn {
    background: #FFF7ED;
    color: var(--p2-orange);
}

.p2-stat-icon-alert {
    background: #FEF2F2;
    color: #B91C1C;
}

.p2-stat-label {
    margin: 0;
    color: var(--p2-muted);
    font-size: 0.8rem;
}

.p2-stat-value {
    margin: 0.1rem 0 0;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--p2-navy);
    line-height: 1.1;
}

a.p2-stat-card {
    text-decoration: none;
    color: inherit;
}

a.p2-stat-card:hover {
    border-color: #FDBA74;
    box-shadow: 0 10px 24px rgba(15, 44, 89, 0.08);
}

.p2-dash-split {
    display: grid;
    gap: 1rem;
}

.p2-dash-split-3 {
    margin-bottom: 1.25rem;
}

.p2-status-select {
    min-height: 36px;
    width: auto;
    max-width: 140px;
    padding: 0.3rem 0.55rem;
    font-size: 0.82rem;
}

.p2-panel {
    background: #fff;
    border: 1px solid var(--p2-line);
    border-radius: 16px;
    padding: 1.25rem 1.2rem;
}

.p2-panel h2 {
    margin: 0 0 0.7rem;
    font-size: 1.05rem;
    color: var(--p2-navy);
}

.p2-panel-link {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    text-decoration: none;
    color: inherit;
}

.p2-panel-link:hover {
    border-color: #FDBA74;
    box-shadow: 0 10px 24px rgba(15, 44, 89, 0.08);
}

.p2-action-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFF7ED;
    color: var(--p2-orange);
    flex-shrink: 0;
}

.p2-action-icon svg {
    width: 22px;
    height: 22px;
}

.p2-panel-link p {
    margin: 0.2rem 0 0;
    color: var(--p2-muted);
    font-size: 0.88rem;
}

.p2-panel-arrow {
    margin-left: auto;
    color: var(--p2-orange);
    font-size: 1.2rem;
    font-weight: 700;
}

.p2-feature-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.p2-feature-grid .p2-action-icon {
    margin-bottom: 0.75rem;
}

.p2-feature-grid h2 {
    margin: 0 0 0.45rem;
}

.p2-feature-grid .p2-panel-link {
    align-items: flex-start;
    flex-direction: column;
}

.p2-feature-grid .p2-panel-arrow {
    margin-left: 0;
}

.p2-soon {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: #FFF7ED;
    color: var(--p2-orange);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

.p2-steps {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--p2-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.p2-steps li + li {
    margin-top: 0.35rem;
}

/* Upload form */
.p2-upload-form {
    width: 100%;
}

.p2-upload-grid {
    display: grid;
    gap: 1.15rem;
    margin-bottom: 1.15rem;
}

.p2-upload-card {
    background: #fff;
    border: 1px solid var(--p2-line);
    border-radius: 16px;
    padding: 1.35rem 1.25rem 0.5rem;
    margin-bottom: 1.15rem;
}

.p2-section-title {
    margin: 0 0 1.05rem;
    color: var(--p2-navy);
    font-size: 1.12rem;
}

.p2-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.p2-req {
    color: #B91C1C;
}

.p2-hint {
    margin: -0.35rem 0 1rem;
    font-size: 0.8rem;
    color: var(--p2-muted);
}

.p2-textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.55;
}

.p2-mode-toggle {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 1.15rem;
}

.p2-mode-option {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.9rem 0.95rem;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
}

.p2-mode-option:has(input:checked) {
    border-color: var(--p2-orange);
    background: #FFF7ED;
}

.p2-mode-option input {
    margin-top: 0.25rem;
    accent-color: var(--p2-orange);
}

.p2-mode-option strong {
    display: block;
    color: var(--p2-navy);
    font-size: 0.95rem;
}

.p2-mode-option small {
    display: block;
    color: var(--p2-muted);
    font-size: 0.78rem;
    margin-top: 0.15rem;
}

.p2-price-wrap {
    position: relative;
}

.p2-price-prefix {
    position: absolute;
    left: 0.95rem;
    top: 14px;
    color: var(--p2-navy);
    font-weight: 700;
}

.p2-price-input {
    padding-left: 1.85rem;
}

.p2-price-preview[hidden] {
    display: none !important;
}

.p2-price-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    margin: -0.35rem 0 1.15rem;
    padding: 0.75rem 0.9rem;
    background: #F8FAFC;
    border-radius: 10px;
    font-size: 0.82rem;
    color: var(--p2-navy);
}

.p2-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.p2-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 140px;
    margin-bottom: 0.85rem;
    padding: 1.1rem;
    border: 1.5px dashed #CBD5E1;
    border-radius: 12px;
    background: #F8FAFC;
    text-align: center;
    cursor: pointer;
    color: var(--p2-muted);
    font-size: 0.82rem;
}

.p2-dropzone strong {
    color: var(--p2-navy);
    font-size: 0.95rem;
}

.p2-dropzone-icon {
    color: var(--p2-navy);
    margin-bottom: 0.2rem;
}

.p2-dropzone-icon svg {
    width: 28px;
    height: 28px;
}

.p2-image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
}

.p2-image-previews img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
}

.p2-btn-secondary,
.p2-link-btn {
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    background: transparent;
}

.p2-btn-secondary {
    min-height: 40px;
    padding: 0 0.9rem;
    border: 1.5px solid var(--p2-navy);
    border-radius: 10px;
    color: var(--p2-navy);
    font-size: 0.82rem;
    white-space: nowrap;
}

.p2-link-btn {
    border: none;
    color: var(--p2-orange);
    font-size: 0.82rem;
    padding: 0.35rem 0;
}

.p2-variant-card {
    border: 1px solid var(--p2-line);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #FCFDFE;
    scroll-margin-top: 5rem;
}

.p2-variant-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.p2-variant-top h3 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--p2-navy);
}

.p2-size-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: start;
}

.p2-size-row .p2-input {
    margin-bottom: 0.65rem;
}

.p2-size-row-no-stock {
    grid-template-columns: minmax(0, 1fr) auto;
}

.p2-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0 1.5rem;
}

a.p2-btn-secondary {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.p2-btn-wide {
    min-width: 220px;
}

@media (min-width: 720px) {
    .p2-mode-toggle {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 900px) {
    .p2-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .p2-dash-split {
        grid-template-columns: 1.2fr 0.8fr;
    }

    .p2-dash-split-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .p2-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .p2-content {
        padding: 1.75rem 2rem 2.75rem;
    }

    .p2-upload-grid {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: start;
    }

    .p2-feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .p2-upload-grid .p2-upload-card {
        margin-bottom: 0;
    }
}

@media (max-width: 1023px) {
    .p2-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        box-shadow: 12px 0 30px rgba(15, 44, 89, 0.18);
        height: 100dvh;
    }

    .p2-sidebar.is-open {
        transform: translateX(0);
    }

    .p2-menu-btn {
        display: inline-flex;
    }

    .p2-overlay:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(10, 30, 61, 0.45);
        z-index: 30;
    }

    .p2-nav-open {
        overflow: hidden;
    }

    .p2-topbar,
    .p2-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 640px) {
    .p2-userchip-name {
        display: none;
    }

    .p2-size-row,
    .p2-size-row-no-stock {
        grid-template-columns: 1fr;
    }

    .p2-form-actions {
        justify-content: stretch;
    }

    .p2-btn-wide {
        width: 100%;
        min-width: 0;
    }

    .p2-section-head-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .p2-banner {
        padding: 1.25rem 1.1rem;
    }
}

.p2-nav-badge {
    margin-left: auto;
    min-width: 1.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: #fff;
    color: var(--p2-navy);
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
}

.p2-nav-link.is-active .p2-nav-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.p2-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.15rem;
}

.p2-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--p2-line);
    background: #fff;
    color: var(--p2-navy);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 650;
}

.p2-filter-tab span {
    color: var(--p2-muted);
    font-weight: 700;
}

.p2-filter-tab.is-active {
    background: var(--p2-navy);
    border-color: var(--p2-navy);
    color: #fff;
}

.p2-filter-tab.is-active span {
    color: #FDBA74;
}

.p2-table-wrap {
    overflow-x: visible;
    background: #fff;
    border: 1px solid var(--p2-line);
    border-radius: 16px;
}

.p2-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.p2-table th,
.p2-table td {
    padding: 0.95rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--p2-line);
    vertical-align: top;
}

.p2-table th {
    color: var(--p2-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.p2-table-muted {
    margin-top: 0.2rem;
    color: var(--p2-muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.p2-empty {
    text-align: center;
    color: var(--p2-muted);
    padding: 2.5rem 1rem !important;
}

.p2-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.p2-badge-pending_review {
    background: #FFF7ED;
    color: #C2410C;
}

.p2-badge-active {
    background: #ECFDF5;
    color: #047857;
}

.p2-badge-rejected {
    background: #FEF2F2;
    color: #B91C1C;
}

.p2-badge-out_of_stock {
    background: #F1F5F9;
    color: #475569;
}

.p2-badge-unpublished {
    background: #EEF2FF;
    color: #3730A3;
}

.p2-catalogue-cell {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.p2-table-thumb,
.p2-table-thumb-empty {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 56px;
    background: #F8FAFC;
    border: 1px solid var(--p2-line);
}

.p2-table-catalogue {
    min-width: 0;
}

.p2-inline-form {
    display: inline;
    margin: 0;
}

.p2-existing-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 0 0 1rem;
}

.p2-existing-image {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 72px;
}

.p2-existing-image img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
}

.p2-existing-image span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 650;
    color: #B91C1C;
}

.p2-review-grid {
    display: grid;
    gap: 1.15rem;
}
.p2-detail-list {
    display: grid;
    gap: 0.85rem;
    margin: 0;
}
.p2-detail-list div {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 0.35rem 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #E2E8F0;
}
.p2-detail-list dt {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748B;
}
.p2-detail-list dd {
    margin: 0;
    color: var(--p2-navy);
    line-height: 1.45;
    word-break: break-word;
}
.p2-row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
@media (max-width: 640px) {
    .p2-detail-list div {
        grid-template-columns: 1fr;
    }
}

.p2-gallery-main {
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    background: #F8FAFC;
    border-radius: 12px;
    border: 1px solid var(--p2-line);
    margin-bottom: 0.75rem;
}

.p2-thumb-btn {
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
}

.p2-size-chips,
.p2-price-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.p2-chip {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #F1F5F9;
    color: var(--p2-navy);
    font-size: 0.8rem;
    font-weight: 650;
}

.p2-price-facts div {
    flex: 1 1 140px;
    background: #F8FAFC;
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
}

.p2-price-facts span {
    display: block;
    color: var(--p2-muted);
    font-size: 0.75rem;
}

.p2-price-facts strong {
    color: var(--p2-navy);
    font-size: 1.05rem;
}

.p2-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
    margin: 0.35rem 0 1rem;
}

.p2-btn-danger {
    background: #DC2626;
}

.p2-btn-danger:hover {
    background: #B91C1C;
}

.p2-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.45rem;
    align-items: center;
    margin: 0 0 1rem;
    font-size: 0.9rem;
}

.p2-crumbs a {
    color: var(--p2-navy);
    font-weight: 650;
}

.p2-cat-cascade {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 0.75rem;
    margin-bottom: 1rem;
}

.p2-attr-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--p2-line);
}

.p2-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.7rem;
    align-items: center;
    justify-content: flex-end;
}

.p2-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.65rem 0 1rem;
    font-size: 0.9rem;
    color: var(--p2-navy);
}

.p2-attr-fields .p2-label {
    margin-top: 0.35rem;
}

@media (min-width: 1024px) {
    .p2-review-grid {
        grid-template-columns: 0.9fr 1.1fr;
        align-items: start;
    }
}

.p2-cat-filters {
    margin-bottom: 1rem;
}

.p2-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.4rem;
    margin-bottom: 1.25rem;
}

.p2-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--p2-line);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.p2-product-card:hover {
    border-color: #FDBA74;
    box-shadow: 0 10px 24px rgba(15, 44, 89, 0.08);
}

.p2-product-card img,
.p2-product-ph {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    max-height: none;
    object-fit: cover;
    object-position: top center;
    background: #F8FAFC;
    display: block;
}

.p2-product-card .pub-card-media {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    max-height: 42vw;
    padding-bottom: 0;
    background: #F8FAFC;
}

.p2-product-card .pub-card-media img,
.p2-product-card .pub-card-media .p2-product-ph {
    position: absolute;
    inset: 0;
}

.p2-product-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--p2-muted);
    font-size: 0.85rem;
    font-weight: 650;
}

.p2-product-body {
    padding: 0.4rem 0.45rem 0.55rem;
}

.p2-product-body h2 {
    margin: 0.25rem 0 0.2rem;
    font-size: 0.78rem;
    line-height: 1.25;
    color: var(--p2-navy);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.p2-product-body h2 a {
    color: inherit;
    text-decoration: none;
}

.p2-product-cost {
    margin: 0;
    color: var(--p2-muted);
    font-size: 0.8rem;
}

.p2-product-sell {
    margin: 0.15rem 0 0;
    color: var(--p2-navy);
    font-weight: 800;
    font-size: 1.02rem;
}

.p2-mode-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #EEF2FF;
    color: var(--p2-navy);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.p2-product-desc {
    margin: 0.75rem 0 0;
    color: var(--p2-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.p2-product-share {
    display: inline-block;
    margin-top: 0.45rem;
    color: var(--p2-orange);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.p2-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0.85rem 0 0.35rem;
}

.p2-share-page {
    max-width: 560px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
}

.p2-share-brand img {
    height: 36px;
    width: auto;
}

.p2-share-from {
    margin: 0 0 1rem;
    color: var(--p2-navy);
    font-size: 0.95rem;
    font-weight: 700;
}

.p2-share-title {
    margin: 0.85rem 0 0.25rem;
    font-size: 1.35rem;
    color: var(--p2-navy);
}

.p2-share-price {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--p2-navy);
}

@media (min-width: 900px) {
    .p2-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }
    .p2-product-card .pub-card-media {
        max-height: 240px;
    }
    .p2-product-card img,
    .p2-product-ph {
        max-height: none;
    }
    .p2-product-body {
        padding: 0.75rem 0.85rem 0.95rem;
    }
    .p2-product-body h2 {
        font-size: 0.95rem;
    }
}

@media (min-width: 1200px) {
    .p2-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.p2-inq-media {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.p2-inq-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    background: #F8FAFC;
    flex-shrink: 0;
}

.p2-inq-thumb-lg {
    width: 96px;
    height: 96px;
}

.p2-inq-thumb-ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 650;
    color: var(--p2-muted);
}

.p2-reply-body {
    display: flex;
    justify-content: center;
    padding: 1.25rem 1rem 2.5rem;
}

.p2-reply-card {
    width: min(440px, 100%);
    background: #fff;
    border: 1px solid var(--p2-line);
    border-radius: 18px;
    padding: 1.15rem 1.15rem 1.4rem;
    box-shadow: 0 10px 24px rgba(15, 44, 89, 0.08);
}

.p2-reply-card h1 {
    margin: 0.7rem 0 0.35rem;
    font-size: 1.25rem;
    color: var(--p2-navy);
}

.p2-reply-hero {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 14px;
    background: #F8FAFC;
}

.p2-reply-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1rem;
}

.p2-variant-pick {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 0.65rem;
    margin: 0 0 1rem;
}

.p2-variant-opt {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    padding: 0.4rem;
    border: 2px solid var(--p2-line);
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
    color: var(--p2-navy);
    font-size: 0.8rem;
    font-weight: 650;
    text-align: center;
}

.p2-variant-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.p2-variant-opt:has(input:checked) {
    border-color: var(--p2-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.16);
}

.p2-variant-opt img,
.p2-variant-ph {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    background: #F8FAFC;
}

.p2-size-pick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.85rem;
}

.p2-chip-pick {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.p2-chip-pick input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.p2-chip-pick span,
.p2-chip-on {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 2px solid var(--p2-line);
    background: #F1F5F9;
    color: var(--p2-navy);
    font-size: 0.85rem;
    font-weight: 650;
}

.p2-chip-pick:has(input:checked) span,
.p2-chip-on {
    border-color: var(--p2-orange);
    background: #FFF7ED;
}

.p2-inq-grid {
    display: grid;
    gap: 1rem;
}

.p2-inq-card {
    display: grid;
    gap: 0.85rem;
    background: #fff;
    border: 1px solid var(--p2-line);
    border-radius: 16px;
    overflow: hidden;
}

.p2-inq-card-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #F8FAFC;
}

.p2-inq-card-body {
    padding: 0 1rem 1rem;
}

.p2-inq-card-body h2 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    color: var(--p2-navy);
}

@media (min-width: 720px) {
    .p2-inq-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.p2-badge-order-pending,
.p2-badge-pay-pending {
    background: #FFF7ED;
    color: #C2410C;
}

.p2-badge-order-confirmed,
.p2-badge-order-packed,
.p2-badge-pay-received {
    background: #EEF2FF;
    color: #3730A3;
}

.p2-badge-order-shipped {
    background: #ECFEFF;
    color: #0E7490;
}

.p2-badge-order-delivered,
.p2-badge-order-completed {
    background: #ECFDF5;
    color: #047857;
}

.p2-ship-banner {
    display: inline-block;
    margin: 0.75rem 0 0;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: #ECFDF5;
    color: #047857;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.p2-pay-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
}
.p2-pay-methods li {
    background: #F1F5F9;
    color: #0B2240;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}
.p2-pay-methods .p2-pay-more {
    background: #0B2240;
    color: #fff;
    border-color: #0B2240;
    min-width: 1.8rem;
    text-align: center;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
}

.p2-badge-order-cancelled,
.p2-badge-pay-failed,
.p2-badge-pay-refunded {
    background: #FEF2F2;
    color: #B91C1C;
}

.p2-star-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 0 0 1rem;
}

.p2-star-row label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 700;
    color: var(--p2-navy);
}

@media (max-width: 800px) {
    .p2-table-wrap {
        background: transparent;
        border: 0;
        border-radius: 0;
        overflow: visible;
    }

    .p2-upload-card .p2-table-wrap {
        margin: 0 -0.15rem;
    }

    .p2-table,
    .p2-table tbody {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .p2-table thead {
        display: none;
    }

    .p2-table tbody {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .p2-table tr {
        display: block;
        background: #fff;
        border: 1px solid var(--p2-line);
        border-radius: 16px;
        padding: 0.85rem 1rem 0.95rem;
    }

    .p2-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
        border: 0;
        padding: 0.4rem 0;
    }

    .p2-table td::before {
        content: attr(data-label);
        flex: 0 0 34%;
        max-width: 7.5rem;
        color: var(--p2-muted);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        line-height: 1.35;
        padding-top: 0.15rem;
    }

    .p2-table td:not([data-label])::before,
    .p2-table td[data-label=""]::before {
        display: none;
        content: none;
    }

    .p2-table td:first-child {
        display: block;
        padding-bottom: 0.65rem;
    }

    .p2-table td:first-child::before {
        display: none;
        content: none;
    }

    .p2-table td:last-child:not([data-label]),
    .p2-table td:last-child[data-label=""] {
        display: block;
        margin-top: 0.45rem;
        padding-top: 0.7rem;
        border-top: 1px solid var(--p2-line);
    }

    .p2-table td.p2-empty {
        display: block;
        border: 0;
        padding: 1.5rem 0.5rem !important;
    }

    .p2-table td.p2-empty::before {
        display: none;
        content: none;
    }

    .p2-table .p2-row-actions {
        justify-content: flex-start;
    }

    .p2-table .p2-status-select {
        width: 100%;
        max-width: none;
    }

    .p2-table .p2-catalogue-cell,
    .p2-table .p2-inq-media {
        align-items: flex-start;
    }

    .p2-cat-cascade {
        grid-template-columns: 1fr;
    }

    .p2-upload-card .p2-table tbody {
        gap: 0;
    }

    .p2-upload-card .p2-table tr {
        border: 0;
        border-radius: 0;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--p2-line);
    }

    .p2-upload-card .p2-table tr:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }
}

@media (min-width: 801px) {
    .p2-table-wrap {
        overflow-x: auto;
    }
}

.p2-upi-card .p2-upi-amount {
    margin: 0 0 0.35rem;
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--p2-navy);
    letter-spacing: -0.03em;
}

.p2-upi-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.25rem;
    align-items: start;
    margin: 1rem 0;
}

.p2-upi-qr {
    width: 240px;
    height: 240px;
    max-width: 100%;
    border: 1px solid var(--p2-line);
    border-radius: 12px;
    background: #fff;
}

.p2-upi-mono {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--p2-navy);
    word-break: break-all;
}

.p2-upi-mono .p2-link-btn {
    margin-left: 0.4rem;
    font-weight: 600;
}

.p2-upi-pay-btn {
    width: 100%;
    max-width: 420px;
}

@media (max-width: 800px) {
    .p2-upi-grid {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: left;
    }

    .p2-upi-grid > div {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .p2-product-share {
        display: none;
    }
    .p2-product-cost {
        font-size: 0.7rem;
    }
    .p2-product-sell {
        font-size: 0.88rem;
    }
}
