.alert.crm-alert {
    --crm-alert-accent: #2563eb;
    --crm-alert-bg: #eff6ff;
    --crm-alert-border: #bfdbfe;
    --crm-alert-color: #1e3a8a;
    --crm-alert-shadow: rgba(37, 99, 235, 0.16);
    --crm-alert-icon: "i";
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: 56px;
    padding: 0.95rem 1rem;
    overflow: hidden;
    color: var(--crm-alert-color);
    font-size: 0.94rem;
    font-weight: 650;
    line-height: 1.45;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.48)),
        var(--crm-alert-bg);
    border: 1px solid var(--crm-alert-border);
    border-left: 5px solid var(--crm-alert-accent);
    border-radius: 14px;
    box-shadow:
        0 14px 30px var(--crm-alert-shadow),
        0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.alert.crm-alert::before {
    content: var(--crm-alert-icon);
    display: inline-grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin-top: -1px;
    place-items: center;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
    background: var(--crm-alert-accent);
    border-radius: 999px;
    box-shadow: 0 8px 18px var(--crm-alert-shadow);
}

.alert.crm-alert[data-crm-alert-autoclose="true"]::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--crm-alert-accent);
    opacity: 0.4;
    transform-origin: right center;
    animation: crm-alert-timeout 10s linear forwards;
}

.alert.crm-alert.alert-dismissible {
    padding-right: 3.25rem;
}

.alert.crm-alert .btn-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 0.8rem;
    height: 0.8rem;
    padding: 0.5rem;
    border-radius: 999px;
    opacity: 0.58;
    transform: translateY(-50%);
}

.alert.crm-alert .btn-close:hover,
.alert.crm-alert .btn-close:focus {
    background-color: rgba(15, 23, 42, 0.08);
    opacity: 0.9;
}

.alert-success.crm-alert {
    --crm-alert-accent: #0f766e;
    --crm-alert-bg: #ecfdf5;
    --crm-alert-border: #99f6e4;
    --crm-alert-color: #064e3b;
    --crm-alert-shadow: rgba(15, 118, 110, 0.17);
    --crm-alert-icon: "✓";
}

.alert-danger.crm-alert {
    --crm-alert-accent: #dc2626;
    --crm-alert-bg: #fef2f2;
    --crm-alert-border: #fecaca;
    --crm-alert-color: #7f1d1d;
    --crm-alert-shadow: rgba(220, 38, 38, 0.17);
    --crm-alert-icon: "!";
}

.alert-warning.crm-alert {
    --crm-alert-accent: #d97706;
    --crm-alert-bg: #fffbeb;
    --crm-alert-border: #fde68a;
    --crm-alert-color: #78350f;
    --crm-alert-shadow: rgba(217, 119, 6, 0.16);
    --crm-alert-icon: "!";
}

.alert-info.crm-alert {
    --crm-alert-accent: #2563eb;
    --crm-alert-bg: #eff6ff;
    --crm-alert-border: #bfdbfe;
    --crm-alert-color: #1e3a8a;
    --crm-alert-shadow: rgba(37, 99, 235, 0.16);
    --crm-alert-icon: "i";
}

@keyframes crm-alert-timeout {
    to {
        transform: scaleX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .alert.crm-alert[data-crm-alert-autoclose="true"]::after {
        animation: none;
    }
}

.password-visibility-toggle {
    min-width: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-visibility-toggle i {
    pointer-events: none;
}
