/* ═══════════════════════════════════════════════════════════════
   DoommTrack — единая система уведомлений (toast)
   ═══════════════════════════════════════════════════════════════ */

/* ── Toast-контейнер (фиксированный, сверху по центру) ── */
.dt-toast-wrap {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 92%;
    max-width: 520px;
}

/* ── Один toast ── */
.dt-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #1e293b;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.06);
    border-left: 4px solid #94a3b8;
    animation: dtToastIn .35s ease;
    position: relative;
    overflow: hidden;
}
.dt-toast.hiding {
    animation: dtToastOut .3s ease forwards;
}

/* ── Иконка ── */
.dt-toast-icon {
    flex: none;
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* ── Типы ── */
.dt-toast.success { border-left-color: #22c55e; }
.dt-toast.success .dt-toast-icon { background: #dcfce7; color: #16a34a; }

.dt-toast.error { border-left-color: #ef4444; }
.dt-toast.error .dt-toast-icon { background: #fee2e2; color: #dc2626; }

.dt-toast.warning { border-left-color: #f59e0b; }
.dt-toast.warning .dt-toast-icon { background: #fef3c7; color: #d97706; }

.dt-toast.info { border-left-color: #3b82f6; }
.dt-toast.info .dt-toast-icon { background: #dbeafe; color: #2563eb; }

/* ── Прогресс-бар автозакрытия ── */
.dt-toast-progress {
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    background: currentColor;
    opacity: .2;
    animation: dtToastProgress var(--dt-toast-dur, 5s) linear forwards;
}

/* ── Кнопка закрытия ── */
.dt-toast-close {
    flex: none;
    width: 28px; height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.dt-toast-close:hover { background: #f1f5f9; color: #475569; }

/* ── Анимации ── */
@keyframes dtToastIn {
    from { opacity: 0; transform: translateY(-16px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dtToastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(-16px) scale(.96); }
}
@keyframes dtToastProgress {
    from { width: 100%; }
    to   { width: 0; }
}

/* ── Старый flash-message (совместимость) ── */
.flash-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    max-width: 520px;
    width: 92%;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    text-align: left;
}
.flash-message.show {
    opacity: 1;
}
.flash-message.success {
    background: #fff;
    color: #15803d;
    border-left: 4px solid #22c55e;
    border: 1px solid #bbf7d0;
}
.flash-message.error {
    background: #fff;
    color: #b91c1c;
    border-left: 4px solid #ef4444;
    border: 1px solid #fecaca;
}
.flash-message.warning {
    background: #fff;
    color: #92400e;
    border-left: 4px solid #f59e0b;
    border: 1px solid #fde68a;
}
.flash-message.info {
    background: #fff;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
    border: 1px solid #bfdbfe;
}

/* ── Notifications page (list) ── */
.notifications-container {
    max-width: 500px;
    margin: 20px auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
}
.notification-filters { display: flex; gap: 10px; margin-bottom: 15px; }
.filter-btn { padding: 5px 10px; border: 1px solid #ddd; background: white; border-radius: 4px; cursor: pointer; }
.filter-btn.active { background: #007bff; color: white; border-color: #007bff; }
.notification-item { display: flex; gap: 15px; padding: 10px; border-bottom: 1px solid #eee; cursor: pointer; }
.notification-item.unread { background-color: #f8f9fa; font-weight: 500; }
.notification-type { font-size: 1.5em; }
.notification-content { flex: 1; }
.notification-content small { color: #6c757d; font-size: .8em; }
