.upload-widget {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.75rem;
    overflow: hidden;
    min-width: 0;
}

.upload-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
    background: linear-gradient(180deg, #fff, #fbfcfe);
}

.upload-widget__title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.upload-widget__title-icon {
    width: 34px;
    height: 34px;
    border-radius: 0.65rem;
    display: grid;
    place-items: center;
    color: rgb(var(--na-primary-rgb, 0, 170, 255));
    background: rgba(var(--na-primary-rgb, 0, 170, 255), 0.08);
    flex: 0 0 auto;
}

.upload-widget__title-text {
    min-width: 0;
}

.upload-widget__title-text strong {
    display: block;
    font-size: 0.98rem;
    line-height: 1.2;
}

.upload-widget__title-text span {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-widget__badge {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.09);
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.upload-widget__body {
    padding: 14px;
    display: grid;
    gap: 12px;
}

.upload-dropzone {
    position: relative;
    border: 1.5px dashed rgba(15, 23, 42, 0.18);
    border-radius: 0.75rem;
    background: linear-gradient(180deg, rgba(var(--na-primary-rgb, 0, 170, 255), 0.045), rgba(var(--na-primary-rgb, 0, 170, 255), 0.015));
    min-height: 178px;
    display: grid;
    place-items: center;
    padding: 22px;
    text-align: center;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
    cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragover {
    border-color: rgb(var(--na-primary-rgb, 0, 170, 255));
    background: rgba(var(--na-primary-rgb, 0, 170, 255), 0.14);
    transform: translateY(-1px);
}

.upload-dropzone__icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 1rem;
    background: #fff;
    color: rgb(var(--na-primary-rgb, 0, 170, 255));
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(var(--na-primary-rgb, 0, 170, 255), 0.18);
}

.upload-dropzone h2 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.upload-dropzone p {
    margin: 6px auto 0;
    max-width: 440px;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.45;
}

.upload-dropzone input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.upload-actions {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    pointer-events: none;
}

.upload-actions button {
    pointer-events: auto;
}

.na-upload-button {
    border: 1px solid transparent;
    border-radius: 0.55rem;
    padding: 7px 11px;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 650;
    cursor: pointer;
}

.na-upload-button--primary {
    background: rgb(var(--na-primary-rgb, 0, 170, 255));
    color: #fff;
}

.na-upload-button--soft {
    background: #fff;
    color: #172033;
    border-color: rgba(15, 23, 42, 0.12);
}

.na-upload-button:hover {
    filter: brightness(0.98);
}

.upload-file-list {
    display: grid;
    gap: 8px;
}

.upload-file-list--compact {
    grid-column: 1 / -1;
}

.upload-file {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.65rem;
    background: #fff;
}

.upload-file__type {
    width: 36px;
    height: 36px;
    border-radius: 0.55rem;
    display: grid;
    place-items: center;
    background: rgba(100, 116, 139, 0.09);
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.upload-file__main {
    min-width: 0;
}

.upload-file__name {
    font-size: 0.9rem;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-file__meta {
    margin-top: 3px;
    color: #64748b;
    font-size: 0.78rem;
}

.upload-file__status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-file__remove {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

.upload-file__remove:hover {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.upload-status-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 900;
}

.upload-status-icon--done {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
}

.upload-status-icon--error {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.upload-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 0.8rem;
    padding-top: 2px;
}

.upload-compact-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.75rem;
    background: #fff;
    min-width: 0;
    max-width: 760px;
}

.upload-compact-row__label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 0.88rem;
}

.upload-compact-row__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-inline {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.upload-inline__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: #64748b;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.upload-inline__link:hover:not(:disabled) {
    color: rgb(var(--na-primary-rgb, 0, 170, 255));
}

.upload-inline__link:disabled {
    opacity: 0.6;
    cursor: default;
}

.upload-inline__icon {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.upload-inline__status {
    color: #64748b;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-inline__status--error {
    color: #dc3545;
}

@media (max-width: 640px) {

    .upload-widget__header,
    .upload-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .upload-file {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .upload-file__status {
        grid-column: 2;
        justify-content: flex-start;
    }
}