.hd-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.hd-overlay.active {
    opacity: 1;
    visibility: visible;
}

.hd-dialog {
    background: #ffffff;
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    transform: translateY(12px) scale(0.97);
    transition: transform 0.2s ease;
}

.hd-overlay.active .hd-dialog {
    transform: translateY(0) scale(1);
}

.hd-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.hd-icon.info {
    background: var(--hb-primary-soft);
    color: var(--hb-teal-dark);
}

.hd-icon.success {
    background: var(--hb-success-soft);
    color: var(--hb-success-dark);
}

.hd-icon.warning {
    background: #fffbeb;
    color: #d97706;
}

.hd-icon.error {
    background: #fef2f2;
    color: #dc2626;
}

.hd-title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
}

.hd-message {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #4b5563;
    white-space: pre-wrap;
}

.hd-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.hd-btn {
    border: none;
    border-radius: 10px;
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    min-width: 110px;
}

.hd-btn:hover {
    transform: translateY(-1px);
}

.hd-btn-primary {
    background: var(--hb-gradient-cta);
    color: #ffffff;
}

.hd-btn-primary:hover {
    background: linear-gradient(135deg, var(--hb-primary-dark) 0%, var(--hb-teal-dark) 100%);
}

.hd-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.hd-btn-cancel:hover {
    background: #e5e7eb;
}

.hd-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.hd-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 360px;
}

.hd-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-left: 4px solid var(--hb-primary);
    animation: hd-toast-in 0.25s ease;
}

.hd-toast.info { border-left-color: var(--hb-teal); }
.hd-toast.success { border-left-color: var(--hb-success); }
.hd-toast.warning { border-left-color: #f59e0b; }
.hd-toast.error { border-left-color: #ef4444; }

.hd-toast-icon {
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.hd-toast.info .hd-toast-icon { color: var(--hb-teal); }
.hd-toast.success .hd-toast-icon { color: var(--hb-success-dark); }
.hd-toast.warning .hd-toast-icon { color: #d97706; }
.hd-toast.error .hd-toast-icon { color: #ef4444; }

.hd-toast-text {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.45;
}

@keyframes hd-toast-in {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 480px) {
    .hd-dialog {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .hd-actions {
        flex-direction: column-reverse;
    }

    .hd-btn {
        width: 100%;
    }

    .hd-toast-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}
