.file-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 10100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.file-preview-modal.is-open {
    display: flex;
}

.file-preview-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 30, 50, 0.72);
    backdrop-filter: blur(4px);
}

.file-preview-modal__panel {
    position: relative;
    z-index: 2;
    width: min(960px, 100%);
    max-height: 92vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(26, 82, 120, 0.28);
    border: 2px solid #c5d8e6;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.file-preview-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.file-preview-modal__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1a5278;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-preview-modal__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.file-preview-modal__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid #c5d8e6;
    background: #fff;
    color: #1a5278;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.file-preview-modal__btn--primary {
    background: linear-gradient(180deg, #256992 0%, #1a5278 100%);
    color: #fff;
    border-color: transparent;
}

.file-preview-modal__close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.file-preview-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.file-preview-modal__body img {
    max-width: 100%;
    max-height: calc(92vh - 120px);
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.file-preview-modal__body iframe {
    width: 100%;
    height: min(78vh, 820px);
    border: none;
    border-radius: 8px;
    background: #fff;
}

.file-preview-modal__fallback {
    color: #e2e8f0;
    text-align: center;
    padding: 24px;
    font-size: 14px;
}
