﻿.pi-upload-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

.pi-upload-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 34px;
    border-radius: 28px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    margin-bottom: 24px;
}

    .pi-upload-hero h1 {
        margin: 8px 0 10px;
        font-size: clamp(32px, 5vw, 54px);
        letter-spacing: -0.04em;
    }

    .pi-upload-hero p {
        max-width: 720px;
        color: #cbd5e1;
        font-size: 16px;
    }

.pi-eyebrow {
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #38bdf8;
}

.pi-hero-stats {
    min-width: 150px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    text-align: center;
}

    .pi-hero-stats strong {
        display: block;
        font-size: 34px;
    }

.pi-upload-shell {
    margin-top: 24px;
}

.pi-upload-form {
    display: grid;
    gap: 20px;
}

.pi-upload-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 22px;
    align-self: start;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.pi-card-heading {
    display: flex;
    gap: 14px;
    margin-bottom: 22px;
}

    .pi-card-heading h2 {
        margin: 0;
        font-size: 22px;
        color: #0f172a;
    }

    .pi-card-heading p {
        margin: 4px 0 0;
        color: #64748b;
    }

.pi-step {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.pi-upload-form {
    grid-template-columns: 1.1fr 0.9fr;
}

.pi-submit-bar {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
    padding: 22px 26px;
    border-radius: 22px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

    .pi-submit-bar p {
        margin: 4px 0 0;
        color: #64748b;
        max-width: 760px;
        font-size: .82rem;
        line-height: 1.5;
    }

    .pi-submit-bar > div > strong {
        font-size: .9rem;
    }

    .pi-submit-bar .pi-btn {
        width: auto;
        align-self: flex-start;
    }

.pi-drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 22px;
    background: #f8fafc;
    transition: 0.2s ease;
}

    .pi-drop-zone:hover {
        border-color: #2563eb;
        background: #eff6ff;
    }

.pi-file-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pi-drop-label {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    text-align: center;
}

.pi-retention-notice {
    grid-column: 1 / -1;
    margin-top: 0;
}

.pi-description-word-count {
    display: block;
    margin-top: 6px;
    color: var(--color-text-muted, #64748b);
    font-size: .75rem;
    text-align: right;
}

.pi-description-word-count.is-over-limit {
    color: var(--color-danger, #ef4444);
    font-weight: 700;
}

.pi-upload-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
}

.pi-drop-label strong {
    color: #0f172a;
    font-size: 16px;
}

.pi-drop-label small {
    color: #64748b;
}

.pi-selected-toolbar {
    margin-top: 16px;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

    .pi-selected-toolbar span {
        display: block;
        margin-top: 2px;
        color: #64748b;
        font-size: 13px;
    }

.pi-submissions-section {
    margin-top: 38px;
}

.pi-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 16px;
}

    .pi-section-heading h2 {
        margin: 6px 0 0;
        color: #0f172a;
    }

.pi-empty-state {
    padding: 40px;
    text-align: center;
    border-radius: 24px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.pi-submission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 18px;
}

.pi-submission-card {
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.pi-submission-image {
    height: 190px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-weight: 700;
}

    .pi-submission-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.pi-submission-body {
    padding: 18px;
}

.pi-submission-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

    .pi-submission-top h3 {
        margin: 0;
        color: #0f172a;
    }

    .pi-submission-top p {
        margin: 4px 0 0;
        color: #64748b;
        font-size: 13px;
    }

.pi-submission-info {
    margin-bottom: 14px;
}

    .pi-submission-info label {
        display: block;
        font-size: 12px;
        font-weight: 800;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        margin-bottom: 4px;
    }

    .pi-submission-info a,
    .pi-submission-info span {
        color: #0f172a;
        word-break: break-word;
    }

.pi-full-btn {
    width: 100%;
    justify-content: center;
}

.pi-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.72);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.pi-modal-content {
    width: min(960px, 100%);
    max-height: 86vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 26px;
    padding: 26px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
}

.pi-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

    .pi-modal-header h3 {
        margin: 0;
        color: #0f172a;
    }

    .pi-modal-header p {
        margin: 4px 0 0;
        color: #64748b;
    }

.pi-modal-close {
    border: none;
    background: #f1f5f9;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 28px;
    cursor: pointer;
}

.pi-image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
}

.pi-image-preview-item {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 10px;
    background: #f8fafc;
}

    .pi-image-preview-item img {
        width: 100%;
        height: 150px;
        object-fit: cover;
        border-radius: 14px;
    }

.pi-image-preview-info {
    margin-top: 10px;
    display: grid;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    word-break: break-word;
}

.pi-btn-small {
    padding: 7px 10px;
    font-size: 13px;
}

@media (max-width: 860px) {
    .pi-upload-hero,
    .pi-submit-bar,
    .pi-selected-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .pi-upload-form {
        grid-template-columns: 1fr;
    }
}
.pi-upload-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

    .pi-upload-notice p {
        margin: 0;
        flex: 1;
        line-height: 1.5;
    }
.pi-duplicate-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 1.75rem 0;
    padding: 1.5rem;
    background: #fff8e8;
    border: 1px solid #f5d97b;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,.05);
}

.pi-duplicate-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #fff3cd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #d97706;
    flex-shrink: 0;
}

.pi-duplicate-content {
    flex: 1;
}

.pi-duplicate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem;
}

    .pi-duplicate-header h3 {
        margin: 0;
        font-size: 1.15rem;
        font-weight: 700;
    }

.pi-reference-box {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: .75rem 1rem;
    margin: 1rem 0;
}

    .pi-reference-box small {
        display: block;
        color: #6c757d;
    }

    .pi-reference-box strong {
        font-size: 1rem;
        letter-spacing: .04em;
    }

.pi-duplicate-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.25rem;
    margin-top: 1rem;
}

    .pi-duplicate-actions form {
        display: inline;
        margin: 0;
    }

.pi-action-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    color: var(--bs-primary);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

    .pi-action-link:hover {
        text-decoration: underline;
    }

    .pi-action-link i {
        font-size: .95rem;
    }
