/* ==========================================================================
   UI KIT: MODALS (Изскачащи прозорци)
   ========================================================================== */
.aopc-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.8); /* Тъмният Slate 900 */
    backdrop-filter: blur(4px);
    z-index: var(--z-modal, 9999);
    display: grid;
    place-items: center;
    padding: 20px;
    overflow-y: auto;
    animation: aopc-fade-in 0.2s ease-out;
}

.aopc-modal {
    background: var(--fiptec-white);
    border-radius: var(--fiptec-radius-global, 14px);
    box-shadow: var(--fiptec-shadow-xl);
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: aopc-modal-in 0.3s ease-out forwards;
}

.aopc-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--fiptec-slate-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--fiptec-slate-50);
}

.aopc-modal-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--fiptec-slate-900);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.aopc-modal-close {
    background: transparent;
    border: none;
    color: var(--fiptec-slate-400);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aopc-modal-close:hover {
    background: var(--fiptec-slate-200);
    color: var(--fiptec-red);
}

.aopc-modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    background-color: var(--fiptec-slate-50);
}

.aopc-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--fiptec-slate-100);
    background-color: var(--fiptec-white);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@keyframes aopc-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes aopc-modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}