/* App toast notifications & confirm modal */
.app-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 110000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(420px, calc(100vw - 32px));
    pointer-events: none;
}

.app-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    color: #fff;
    font-size: 14px;
    line-height: 1.45;
    pointer-events: auto;
    animation: appToastIn 0.3s ease-out;
    border-left: 4px solid rgba(255, 255, 255, 0.5);
}

.app-toast--hide {
    animation: appToastOut 0.25s ease-in forwards;
}

@keyframes appToastIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes appToastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(24px); }
}

.app-toast--success { background: #166534; }
.app-toast--error { background: #b91c1c; }
.app-toast--warning { background: #b45309; }
.app-toast--info { background: #1e40af; }

.app-toast__icon {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
}

.app-toast__text {
    flex: 1;
    font-weight: 500;
}

.app-toast__close {
    flex-shrink: 0;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
}

.app-toast__close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.app-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 110001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.app-confirm-overlay[hidden]:not(.is-open) {
    display: none !important;
}

.app-confirm-overlay.is-open {
    display: flex !important;
}

.app-confirm-modal {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.app-confirm-modal h3 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    color: #1a1a1a;
}

.app-confirm-modal p {
    margin: 0 0 20px;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

.app-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.app-confirm-btn {
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.app-confirm-btn--cancel {
    background: #f1f3f5;
    color: #333;
}

.app-confirm-btn--ok {
    background: var(--gradient-primary, linear-gradient(135deg, #2d8659, #4da375));
    color: #fff;
}

.app-confirm-btn--danger {
    background: linear-gradient(135deg, #e63946, #ff6b35);
    color: #fff;
}

@media (max-width: 480px) {
    .app-toast-container {
        left: 16px;
        right: 16px;
        max-width: none;
    }
}
