.miu-field {
    margin-bottom: 18px;
}

.miu-label {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--exn-ink, #0f172a);
}

.miu-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--exn-muted, #64748b);
}

.miu-shell {
    position: relative;
}

.miu-file-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.miu-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--exn-line, #dbe3ef);
    border-radius: 8px;
    background: var(--exn-surface, #ffffff);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.miu-shell.has-error .miu-card {
    border-color: #be123c;
}

.miu-preview-wrap {
    flex: 0 0 172px;
}

.miu-preview {
    width: 172px;
    height: 172px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--exn-soft, #f8fafc);
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.miu-preview.has-image {
    border-style: solid;
    border-color: var(--exn-line, #dbe3ef);
}

.miu-preview__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.miu-preview__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-align: center;
    padding: 14px;
}

.miu-preview__icon {
    font-size: 1.35rem;
    line-height: 1;
    margin-bottom: 8px;
}

.miu-preview__text {
    font-size: 0.8rem;
    font-weight: 750;
}

.miu-meta {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.miu-meta__title {
    font-size: 0.94rem;
    font-weight: 800;
    color: var(--exn-ink, #0f172a);
}

.miu-meta__sub {
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--exn-muted, #64748b);
    line-height: 1.45;
}

.miu-file-info {
    margin-top: 12px;
    padding: 11px 12px;
    border: 1px solid var(--exn-line, #dbe3ef);
    border-radius: 8px;
    background: var(--exn-soft, #f8fafc);
}

.miu-file-info__name {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--exn-ink, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.miu-file-info__size {
    margin-top: 3px;
    font-size: 0.78rem;
    color: var(--exn-muted, #64748b);
}

.miu-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.miu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
    cursor: pointer;
}

.miu-btn--primary {
    background: var(--exn-primary, #2563eb);
    color: #ffffff;
}

.miu-btn--primary:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.miu-btn--light {
    background: #ffffff;
    border-color: var(--exn-line, #dbe3ef);
    color: var(--exn-ink, #0f172a);
}

.miu-btn--light:hover:not(:disabled) {
    border-color: var(--exn-primary, #2563eb);
    color: var(--exn-primary, #2563eb);
}

.miu-btn--light:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 767.98px) {
    .miu-card {
        flex-direction: column;
    }

    .miu-preview-wrap,
    .miu-preview {
        width: 100%;
        flex: unset;
    }

    .miu-preview {
        height: 220px;
    }
}

[data-bs-theme="dark"] .miu-label {
    color: #f8fafc;
}

[data-bs-theme="dark"] .miu-hint {
    color: #a7b4c7;
}

[data-bs-theme="dark"] .miu-card {
    background: #111c2f;
    border-color: #314158;
    box-shadow: none;
}

[data-bs-theme="dark"] .miu-preview,
[data-bs-theme="dark"] .miu-file-info {
    background: #0f1a2c;
    border-color: #314158;
}

[data-bs-theme="dark"] .miu-meta__title,
[data-bs-theme="dark"] .miu-file-info__name {
    color: #f8fafc;
}

[data-bs-theme="dark"] .miu-meta__sub,
[data-bs-theme="dark"] .miu-file-info__size,
[data-bs-theme="dark"] .miu-preview__empty {
    color: #a7b4c7;
}

[data-bs-theme="dark"] .miu-btn--light {
    background: #0f1a2c;
    border-color: #314158;
    color: #f8fafc;
}
