﻿@keyframes toastIn {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(10px);
        opacity: 0;
    }
}

@keyframes niSearchDrop {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ni-fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: #1877f2;
    border: none;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .24);
    z-index: 99998;
    display: grid;
    place-items: center;
    color: #fff;
    font-family: system-ui, -apple-system, Segoe UI, Roboto;
}

.ni-badge {
    position: absolute;
    right: -2px;
    top: -2px;
    background: #ff3b30;
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    padding: 2px 6px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .18);
    display: none;
}

.ni-panel {
    position: fixed;
    right: 16px;
    bottom: 84px;
    width: 360px;
    height: 480px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
    border: 1px solid rgba(0, 0, 0, .08);
    z-index: 99998;
    display: none;
    font-family: system-ui, -apple-system, Segoe UI, Roboto;
}

    .ni-panel.open {
        display: block;
    }

.ni-head {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: #f7f8fa;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.ni-title {
    font-weight: 900;
    font-size: 15px;
}

.ni-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .08);
    background: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    opacity: .9;
}

.ni-datebar {
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.ni-datebar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ni-date-label {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    white-space: nowrap;
}

.ni-date-input {
    flex: 1;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .10);
    background: #fff;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

    .ni-date-input:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, .18);
    }

.ni-body {
    height: calc(100% - 52px);
    display: flex;
    flex-direction: column;
}

.ni-list {
    overflow: auto;
    padding: 10px;
    flex: 1;
}

.ni-item {
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 10px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .06);
}

.ni-item-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.ni-item-title {
    font-weight: 900;
    font-size: 14px;
}

.ni-item-time {
    font-size: 12px;
    opacity: .65;
    white-space: nowrap;
}

.ni-item-msg {
    margin-top: 6px;
    font-size: 13px;
    opacity: .9;
    white-space: pre-line;
    line-height: 1.35;
}

.ni-pill {
    margin-top: 8px;
    display: inline-block;
    font-size: 11.5px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .10);
    opacity: .85;
}

.ni-empty {
    padding: 16px;
    text-align: center;
    opacity: .6;
    font-size: 13px;
}

.ni-switch-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 8px;
}

.ni-switch-label {
    font-size: 12px;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
}

.ni-switch {
    position: relative;
    width: 46px;
    height: 26px;
    display: inline-block;
}

    .ni-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.ni-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #d1d5db;
    border-radius: 999px;
    transition: all .25s ease;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}

    .ni-slider::before {
        content: "";
        position: absolute;
        width: 20px;
        height: 20px;
        left: 3px;
        top: 3px;
        background: #fff;
        border-radius: 50%;
        box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
        transition: all .25s ease;
    }

.ni-switch input:checked + .ni-slider {
    background: #22c55e;
}

    .ni-switch input:checked + .ni-slider::before {
        transform: translateX(20px);
    }

.ni-switch input:focus + .ni-slider {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}

.ni-search-pop {
    display: none;
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    animation: niSearchDrop .18s ease;
}

    .ni-search-pop.open {
        display: block;
    }

.ni-search-pop-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ni-search-input {
    flex: 1;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, .10);
    background: #fff;
    padding: 0 12px;
    font-size: 13px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

    .ni-search-input::placeholder {
        color: #9ca3af;
    }

    .ni-search-input:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, .18);
    }

.ni-search-clear {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .10);
    cursor: pointer;
    font-size: 18px;
    color: #555;
    transition: all .2s ease;
}

    .ni-search-clear:hover {
        background: #f3f4f6;
    }

.toast-host {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}