/* BIMOS toast + validation alerts — forest theme */
.bimos-toast-host {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    display: grid;
    gap: 10px;
    width: min(380px, calc(100vw - 28px));
    pointer-events: none;
}

.bimos-toast {
    pointer-events: auto;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding: 12px 12px 12px 10px;
    border-radius: 14px;
    border: 1px solid rgba(37, 61, 50, 0.12);
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 28, 23, 0.14);
    transform: translateX(18px);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.bimos-toast.is-in {
    transform: translateX(0);
    opacity: 1;
}

.bimos-toast.is-out {
    transform: translateX(18px);
    opacity: 0;
}

.bimos-toast-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 16px;
    line-height: 1;
}

.bimos-toast-body {
    min-width: 0;
    padding-top: 2px;
}

.bimos-toast-title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1f332b;
    line-height: 1.3;
}

.bimos-toast-msg {
    margin: 3px 0 0;
    font-size: 12.5px;
    font-weight: 500;
    color: #5a6f65;
    line-height: 1.4;
}

.bimos-toast-close {
    border: 0;
    background: transparent;
    color: #7a9186;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.bimos-toast-close:hover {
    background: rgba(37, 61, 50, 0.06);
    color: #253d32;
}

.bimos-toast.success {
    border-color: rgba(47, 122, 86, 0.28);
    background: linear-gradient(180deg, #f5faf7 0%, #fff 55%);
}
.bimos-toast.success .bimos-toast-icon {
    background: #e8f3ec;
    color: #1f4d38;
}

.bimos-toast.error {
    border-color: rgba(196, 92, 74, 0.3);
    background: linear-gradient(180deg, #fdf6f4 0%, #fff 55%);
}
.bimos-toast.error .bimos-toast-icon {
    background: #fdecea;
    color: #8a2f24;
}

.bimos-toast.warning {
    border-color: rgba(196, 165, 116, 0.4);
    background: linear-gradient(180deg, #fdf8f1 0%, #fff 55%);
}
.bimos-toast.warning .bimos-toast-icon {
    background: #faf0de;
    color: #7a5520;
}

.bimos-toast.info {
    border-color: rgba(90, 122, 156, 0.3);
    background: linear-gradient(180deg, #f4f7fb 0%, #fff 55%);
}
.bimos-toast.info .bimos-toast-icon {
    background: #e8eef6;
    color: #2f4a66;
}

.bimos-alert {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    border-radius: 14px;
    border: 1px solid rgba(37, 61, 50, 0.12);
    padding: 12px 14px;
    margin-bottom: 14px;
    background: #fff;
    animation: bimos-alert-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bimos-alert i {
    font-size: 16px;
    line-height: 1.2;
    margin-top: 1px;
}

.bimos-alert-body strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #1f332b;
    margin-bottom: 2px;
}

.bimos-alert-body p,
.bimos-alert-body ul {
    margin: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: #5a6f65;
    line-height: 1.45;
}

.bimos-alert-body ul {
    padding-left: 16px;
    margin-top: 4px;
}

.bimos-alert-close {
    border: 0;
    background: transparent;
    color: #7a9186;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: grid;
    place-items: center;
}

.bimos-alert-close:hover {
    background: rgba(37, 61, 50, 0.06);
    color: #253d32;
}

.bimos-alert.success {
    background: #f3f8f5;
    border-color: rgba(47, 122, 86, 0.28);
}
.bimos-alert.success > i { color: #1f4d38; }

.bimos-alert.error {
    background: #fdf6f4;
    border-color: rgba(196, 92, 74, 0.28);
}
.bimos-alert.error > i { color: #8a2f24; }

.bimos-alert.warning {
    background: #fdf8f1;
    border-color: rgba(196, 165, 116, 0.35);
}
.bimos-alert.warning > i { color: #7a5520; }

.bimos-alert.info {
    background: #f4f7fb;
    border-color: rgba(90, 122, 156, 0.28);
}
.bimos-alert.info > i { color: #2f4a66; }

.fa-form .field.has-error .lbl,
.fa-form .field.has-error .label-row .lbl {
    color: #b4533a;
}

.fa-form input.is-error:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(196, 92, 74, 0.18);
}

.fa-form .fa-error {
    display: flex;
    align-items: center;
    gap: 5px;
}

.fa-form .fa-error::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #dc2626;
    flex: 0 0 auto;
}

.login-form-alert {
    margin-bottom: 14px;
}

@keyframes bimos-alert-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Confirm dialog (logout / destructive actions) */
.bimos-confirm {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 20px;
}
.bimos-confirm[hidden] {
    display: none !important;
}
.bimos-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 28, 23, 0.48);
    backdrop-filter: blur(3px);
}
.bimos-confirm-dialog {
    position: relative;
    width: min(400px, 100%);
    background: #fff;
    border: 1px solid rgba(37, 61, 50, 0.14);
    border-radius: 18px;
    padding: 22px 20px 16px;
    box-shadow: 0 18px 50px rgba(15, 28, 23, 0.22);
    display: grid;
    gap: 14px;
    justify-items: center;
    text-align: center;
    animation: bimos-confirm-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.bimos-confirm-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #fdf6f4;
    color: #8a2f24;
    border: 1px solid rgba(196, 92, 74, 0.28);
    font-size: 22px;
}
.bimos-confirm-body h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1f332b;
}
.bimos-confirm-body p {
    margin: 0;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.45;
    color: #5a6f65;
}
.bimos-confirm-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
}
.bimos-confirm-actions .btn {
    flex: 1;
    justify-content: center;
}
.bimos-confirm-actions .btn.primary {
    background: #8a2f24;
    border-color: #8a2f24;
    color: #fff;
}
.bimos-confirm-actions .btn.primary:hover {
    background: #6f261d;
    border-color: #6f261d;
}

@keyframes bimos-confirm-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 720px) {
    .bimos-toast-host {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
    }
}
