.peez-upload-portal {
    max-width: 720px;
    margin: 32px auto 48px;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.peez-upload-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    padding: 28px 24px;
}

.peez-upload-error {
    text-align: center;
}

.peez-upload-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.peez-upload-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
    color: #111827;
}

.peez-upload-subtitle {
    margin: 0;
    color: #4b5563;
}

.peez-upload-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.peez-upload-stat-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.peez-upload-stat-card:hover,
.peez-upload-stat-card.is-active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.peez-upload-stat-card strong {
    display: block;
    font-size: 24px;
    color: #111827;
}

.peez-upload-stat-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #2563eb;
}

.peez-upload-stats div {
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px 16px;
}

.peez-upload-stat-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.peez-upload-stats strong {
    font-size: 24px;
    color: #111827;
}

.peez-upload-dropzone {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.peez-upload-dropzone.is-dragover {
    border-color: #2563eb;
    background: #eff6ff;
}

.peez-upload-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.peez-upload-dropzone-copy strong {
    display: block;
    font-size: 18px;
    color: #111827;
    margin-bottom: 6px;
}

.peez-upload-dropzone-copy span {
    color: #6b7280;
    font-size: 14px;
}

.peez-upload-queue {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
}

.peez-upload-queue li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.peez-upload-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.peez-upload-retry {
    border: 1px solid #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
}

.peez-upload-retry:hover {
    background: #dbeafe;
}

.peez-upload-queue li:last-child {
    border-bottom: 0;
}

.peez-upload-queue .peez-upload-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.peez-upload-status {
    font-weight: 600;
}

.peez-upload-status.is-pending {
    color: #6b7280;
}

.peez-upload-status.is-uploading {
    color: #2563eb;
}

.peez-upload-status.is-done {
    color: #15803d;
}

.peez-upload-status.is-error {
    color: #b91c1c;
}

.peez-upload-note {
    margin: 18px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.peez-upload-gallery-panel {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.peez-upload-gallery-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.peez-upload-gallery-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.peez-upload-gallery-delete-all {
    border: 0;
    background: transparent;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
}

.peez-upload-gallery-delete-all:hover {
    color: #991b1b;
    text-decoration: underline;
}

.peez-upload-gallery-head h2 {
    margin: 0;
    font-size: 18px;
    color: #111827;
}

.peez-upload-gallery-close {
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.peez-upload-gallery-empty,
.peez-upload-gallery-loading {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.peez-upload-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}

.peez-upload-gallery-item {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.peez-upload-gallery-item img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.peez-upload-gallery-caption {
    display: block;
    padding: 6px 8px;
    font-size: 11px;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.peez-upload-gallery-delete {
    display: block;
    width: 100%;
    border: 0;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
    padding: 8px;
    cursor: pointer;
}

.peez-upload-gallery-delete:hover {
    background: #fef2f2;
}

@media (max-width: 600px) {
    .peez-upload-card {
        padding: 22px 18px;
    }

    .peez-upload-header h1 {
        font-size: 24px;
    }
}
