.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

body[data-theme="dark"] .modal-overlay {
    background: rgba(8, 15, 35, 0.7);
}

.modal-confirm,
.modal-pdf,
.modal-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border-soft);
    color: var(--color-text);
    animation: slideDown 0.3s ease-out;
}

.modal-confirm {
    width: min(450px, 90%);
}

.modal-pdf {
    width: min(1000px, 92%);
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-card {
    width: min(520px, 94%);
    display: flex;
    flex-direction: column;
}
.modal-card .modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.modal-card .modal-footer {
    justify-content: flex-end;
}

.modal-header {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--color-text-strong);
}

.modal-body,
.modal-body-pdf {
    padding: 1.5rem;
    flex: 1;
    overflow: auto;
}

.modal-body p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.6;
}

.modal-body-pdf {
    padding: 0;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-confirm {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-strong) 100%);
    color: #fff;
}

.btn-cancel {
    background: var(--color-surface-muted);
    color: var(--color-muted-strong);
    border: 1px solid var(--color-border);
}

.btn-close {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface-muted);
    color: var(--color-muted-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: var(--color-surface-hover);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.btn-confirm {
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-confirm:hover {
    filter: brightness(1.05);
}

.btn-cancel {
    border: 1px solid var(--color-border);
}

.btn-cancel:hover {
    background: var(--color-surface-hover);
}


.modal-panel {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-soft);
    width: min(1100px, 95%);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-panel .modal-body {
    flex: 1;
    overflow-y: auto;
}
