/* ================== NOTIFICATION SYSTEM ================== */

/* ---- Bell button ---- */
.notiBellWrap { position: relative; display: inline-block; }
.notiBellBtn {
    border: none; background: transparent; cursor: pointer;
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #475569; font-size: 16px; transition: background .15s;
    position: relative;
}
.notiBellBtn:hover { background: #e2e8f0; color: #0f172a; }
.notiBellBtn.has-noti { color: #f59e0b; }
.notiBellBadge {
    position: absolute; top: 2px; right: 2px;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: #ef4444; color: #fff; border-radius: 9px;
    font-size: 11px; font-weight: 700; line-height: 18px;
    text-align: center; box-shadow: 0 0 0 2px #fff;
}

/* ---- Dropdown ---- */
.notiDropdownBackdrop {
    position: fixed; inset: 0; background: transparent; z-index: 9000;
}
.notiDropdownPanel {
    position: fixed; top: 60px; right: 16px;
    width: 400px; max-height: 560px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,.18);
    z-index: 10001; display: flex; flex-direction: column; overflow: hidden;
    animation: notiSlide .18s ease-out;
}
.notiDropdownBackdrop { z-index: 10000 !important; }
@keyframes notiSlide { from{opacity:0;transform:translateY(-8px);} to{opacity:1;transform:translateY(0);} }

.notiDropdownHeader {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid #f1f5f9; background: #fff;
}
.notiDropdownHeader .title { font-weight: 700; font-size: 15px; color: #1e3a8a; user-select:none; }
.notiHeaderBtn {
    border: 1px solid #e2e8f0; background: #fff; cursor: pointer;
    width: 32px; height: 32px; border-radius: 8px; color: #1d4ed8;
    display: inline-flex; align-items: center; justify-content: center;
}
.notiHeaderBtn:hover { background: #f1f5f9; color: #0f172a; }

.notiDropdownTabs {
    display: flex; gap: 6px; padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9; background: #f8fafc;
}
.notiDropdownTabs span {
    cursor: pointer; padding: 5px 12px; border-radius: 16px;
    font-size: 12px; font-weight: 600; color: #64748b; transition: all .15s;
}
.notiDropdownTabs span:hover { background: #e2e8f0; color: #0f172a; }
.notiDropdownTabs span.active { background: #2563eb; color: #fff; }

.notiDropdownBody { flex: 1; overflow-y: auto; max-height: 420px; }
.notiDropdownLoading, .notiDropdownEmpty {
    padding: 40px 20px; text-align: center; color: #94a3b8; font-size: 13px;
}
.notiDropdownEmpty i { font-size: 32px; color: #cbd5e1; margin-bottom: 10px; display: block; }

.notiItem {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background .15s;
    align-items: flex-start;
    background-color: #FAFAFA;
}
.notiItem:hover { background: #FAFAFA; }
    .notiItem.unread {
        background: #E8F5E9;
    }
        .notiItem.unread:hover {
            background: #C8E6C9;
        }

.notiIcon {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex: none; color: #fff; font-size: 15px; box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.notiIcon.info    { background: linear-gradient(135deg,#3b82f6,#1d4ed8); }
.notiIcon.success { background: linear-gradient(135deg,#10b981,#047857); }
.notiIcon.warning { background: linear-gradient(135deg,#f59e0b,#b45309); }
.notiIcon.error   { background: linear-gradient(135deg,#ef4444,#b91c1c); }

.notiContent { flex: 1; min-width: 0; }
.notiTitle { font-weight: 600; font-size: 13px; color: #0f172a; margin-bottom: 5px; }
.notiMsg {
    font-size: 13px; color: #334155;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.notiMeta { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: #b45309; }
.notiMeta .dot { width: 8px; height: 8px; border-radius: 50%; background: #2563eb; box-shadow: 0 0 0 3px #dbeafe; }

.notiItemActions { display: flex; flex-direction: column; gap: 4px; }
.notiTinyBtn {
    border: none; background: transparent; cursor: pointer;
    width: 26px; height: 26px; border-radius: 6px; color: #64748b;
    display: inline-flex; align-items: center; justify-content: center; font-size: 11px;
}
.notiItemActions .notiTinyBtn i {
    color: #64748b !important;
}
.notiTinyBtn:hover {
    background: #fff;
    color: #0f172a;
}
.notiTinyBtn.danger:hover { background: #fff; color: #b91c1c; }

.notiDropdownFooter {
    padding: 10px; border-top: 1px solid #f1f5f9;
    display: flex; justify-content: center; background: #f8fafc;
}
.notiSeeAllBtn {
    border: none; background: transparent; cursor: pointer;
    color: #2563eb; font-weight: 600; font-size: 13px; padding: 6px 14px; border-radius: 8px;
}
.notiSeeAllBtn:hover { background: #dbeafe; }

/* ================== TOAST STACK (góc dưới trái) ================== */
.notiStackWrap {
    position: fixed; left: 16px; bottom: 16px;
    width: 380px; max-width: calc(100vw - 32px);
    display: flex; flex-direction: column-reverse; gap: 10px;
    z-index: 10000; pointer-events: none;
}
.notiStackItem {
    pointer-events: auto;
    display: flex; gap: 10px; padding: 12px 14px 12px 12px;
    background: #fff; border-radius: 12px; border: 1px solid #e2e8f0;
    box-shadow: 0 12px 32px rgba(15,23,42,.18);
    position: relative; overflow: hidden;
    animation: notiToastIn .25s cubic-bezier(.2,.7,.3,1.4);
}
@keyframes notiToastIn { from{opacity:0;transform:translateX(-20px) scale(.96);} to{opacity:1;transform:translateX(0) scale(1);} }

.notiStackItem::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
}
.notiStackItem.type-info::before    { background: #3b82f6; }
.notiStackItem.type-success::before { background: #10b981; }
.notiStackItem.type-warning::before { background: #f59e0b; }
.notiStackItem.type-error::before   { background: #ef4444; }

.notiStackIcon {
    width: 36px; height: 36px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px;
}
.notiStackItem.type-info .notiStackIcon    { background: linear-gradient(135deg,#3b82f6,#1d4ed8); }
.notiStackItem.type-success .notiStackIcon { background: linear-gradient(135deg,#10b981,#047857); }
.notiStackItem.type-warning .notiStackIcon { background: linear-gradient(135deg,#f59e0b,#b45309); }
.notiStackItem.type-error .notiStackIcon   { background: linear-gradient(135deg,#ef4444,#b91c1c); }

.notiStackBody { flex: 1; min-width: 0; }
.notiStackHeader { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.notiStackTitle { font-weight: 700; font-size: 13px; color: #0f172a; }
.notiStackTime { font-size: 11px; color: #b45309; margin-right:18px; }
.notiStackMsg {
    font-size: 13px; color: #334155; line-height: 1.45; font-style:italic;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.notiStackActions { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.notiBtn {
    border: 1px solid #e2e8f0; background: #fff; cursor: pointer;
    padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; color: #475569;
    display: inline-flex; align-items: center; gap: 4px; transition: all .15s;
}
.notiBtn:hover { background: #f1f5f9; color: #0f172a; }
.notiBtn.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.notiBtn.primary:hover { background: #1d4ed8; color: #fff; }
.notiBtn.ghost { border-color: transparent; }
.notiStackClose {
    position: absolute; top: 6px; right: 6px;
    width: 24px; height: 24px; border-radius: 6px;
    border: none; background: transparent; cursor: pointer; color: #94a3b8;
    display: inline-flex; align-items: center; justify-content: center;
}
.notiStackClose:hover { background: #f1f5f9; color: #0f172a; }

/* ================== NOTIFICATION CENTER PAGE (Modern v2) ================== */
.notiPage {
    border-top: 2px solid #4CAF50;
    padding: 4px 2px 16px;
}

/* HERO */
.notiHero {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 10px 15px; border-radius: 14px;
    background: #fff;
    margin-top:10px;
    margin-right:10px;
    margin-left:10px;
    color: #fff; box-shadow: 0 8px 24px rgba(37,99,235,.18);
    margin-bottom: 14px; flex-wrap: wrap;
    user-select:none;
}
.notiHeroTitle { font-size: 18px; font-weight: 800; letter-spacing: .2px; color:#1d4ed8; }
.notiHeroSub { font-size: 12px; opacity: 1; margin-top: 8px; color:#047857; }
.notiHeroStats { display: flex; gap: 10px; flex-wrap: wrap; }
.notiHeroStat {
    background: #fff;
    color:#64748b;
    padding: 8px 14px;
    border-radius: 10px;
    min-width: 84px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.notiHeroStat .num { font-size: 20px; font-weight: 800; line-height: 1.1; }
.notiHeroStat .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; 
                     margin-top:2px; color:#64748b;
}
    .notiHeroStat.unread {
        background: #FFF8E1;
        color: #F57C00;
    }
    .notiHeroStat.read {
        background: #E8F5E9;
        color: #388E3C;
    }
.notiHeroStat.today  { background: rgba(255,255,255,.22); }

/* GRID */
.notiPageGrid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 14px;
    align-items: start;
    padding-left: 10px;
    padding-right: 10px;
    height: calc(100svh - 200px);
    overflow: auto;
}
@media (max-width: 900px) { .notiPageGrid { grid-template-columns: 1fr; } }

/* SIDEBAR */
.notiSide {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 12px; position: sticky; top: 8px;
}
.notiSideBlock + .notiSideBlock { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e2e8f0; }
.notiSideTitle {
    font-size: 11px; font-weight: 700; color: #047857;
    text-transform: uppercase; letter-spacing: .8px; margin-bottom: 8px;
}
.notiSideList { list-style: none; padding: 0; margin: 0; }
.notiSideList li {
    display: flex; align-items: center; gap: 6px; cursor: pointer;
    padding: 7px 10px; border-radius: 8px; font-size: 13px; color: #334155;
    transition: background .15s, color .15s; user-select: none;
}
.notiSideList li:hover { background: #f1f5f9; color: #0f172a; }
.notiSideList li.active { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.notiSideList li .cnt {
    margin-left: auto; background: #ef4444; color: #fff;
    padding: 1px 7px; border-radius: 9px; font-size: 10px; font-weight: 700;
}
.notiSideList li.tinfo i    { color: #2563eb; }
.notiSideList li.tsuccess i { color: #059669; }
.notiSideList li.twarning i { color: #d97706; }
.notiSideList li.terror i   { color: #dc2626; }

.notiSideDate { display: flex; flex-direction: column; gap: 6px; }
.notiSideActions { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.notiSideActions .e-btn { width: 100% !important; justify-content: flex-start !important; }

.notiSideDate .e-date-wrapper.e-date-container.e-input-group.inputBase {
    border: 0px;
    border-bottom: 1px solid rgba(0,0,0,.18) !important;
}
/* SEARCH BAR */
.notiSearchBar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 10px;
}
.notiSearchBar > i { color: #ef4444; font-size: 14px; }
.notiSearchBar > .e-input-group, .notiSearchBar > div { flex: 1; }
    .notiSearchBar .inputBase.e-input-group {
        border:0px;
        border-bottom: 1px solid rgba(0,0,0,.18) !important;
    }
    /* DAY GROUP */
    .notiDayGroup {
        margin-bottom: 18px;
    }
.notiDayLabel {
    font-size: 12px; font-weight: 700; color: #475569;
    text-transform: uppercase; letter-spacing: .6px;
    padding: 0 4px 8px; border-bottom: 1px dashed #e2e8f0; margin-bottom: 8px;
    display: flex; align-items: baseline; gap: 8px;
    display:none;
}
.notiDayLabel .cnt { font-size: 10px; font-weight: 500; color: #94a3b8; text-transform: none; letter-spacing: 0; }

/* ROW */
.notiRow {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 12px 14px; background: #fff;
    border: 1px solid #e2e8f0; border-radius: 10px;
    margin-bottom: 6px; cursor: pointer; transition: all .15s;
    position: relative;
}
.notiRow:hover { border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(15,23,42,.06); transform: translateY(-1px); }
.notiRow.unread { background: linear-gradient(90deg,#eff6ff 0%,#fff 60%); border-left: 3px solid #2563eb; }

.notiRowIcon {
    width: 38px; height: 38px; border-radius: 10px; flex: none;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px; box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.notiRow.type-info    .notiRowIcon { background: linear-gradient(135deg,#3b82f6,#1d4ed8); }
.notiRow.type-success .notiRowIcon { background: linear-gradient(135deg,#10b981,#047857); }
.notiRow.type-warning .notiRowIcon { background: linear-gradient(135deg,#f59e0b,#b45309); }
.notiRow.type-error   .notiRowIcon { background: linear-gradient(135deg,#ef4444,#b91c1c); }

.notiRowBody { flex: 1; min-width: 0; }
.notiRowHead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.notiRowHead .ttl { font-size: 13px; font-weight: 700; color: #0f172a; }
.notiRowHead .time { margin-left: auto; font-size: 11px; color: #d97706; font-style:italic;}
.notiRowHead .badge { padding: 1px 7px; border-radius: 9px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.notiRowHead .badge.info    { background: #dbeafe; color: #1d4ed8; }
.notiRowHead .badge.success { background: #d1fae5; color: #047857; }
.notiRowHead .badge.warning { background: #fef3c7; color: #b45309; }
.notiRowHead .badge.error   { background: #fee2e2; color: #b91c1c; }
.notiRowHead .dot { width: 7px; height: 7px; border-radius: 50%; background: #2563eb; box-shadow: 0 0 0 3px #dbeafe; }

.notiRowMsg {
    font-size: 13px; color: #334155; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notiRowFoot { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; font-size: 11px; color: #b45309; font-style:italic; }

.notiRowActions { display: flex; gap: 4px; align-items: flex-start;transition: opacity .15s; }
.notiRow:hover .notiRowActions {  }
.rowBtn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    color: #1E88E5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #1d4ed8;
    margin-left: 5px;
    transition: all .15s;
    border: 0px solid #e2e8f0 !important;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}
.rowBtn:hover { background: #f1f5f9; color: #0f172a; border-color: #cbd5e1; }
.rowBtn.danger:hover { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }

/* EMPTY */
.notiEmptyState {
    background: #fff; border: 1px dashed #cbd5e1; border-radius: 14px;
    padding: 60px 20px; text-align: center; color: #94a3b8;
    user-select:none;
}
.notiEmptyState > i { font-size: 48px; color: #cbd5e1; display: block; margin-bottom: 12px; }
.notiEmptyState .t1 { font-size: 16px; font-weight: 700; color: #475569; margin-bottom: 4px; }
    .notiEmptyState .t2 {
        font-size: 13px;
        margin-top: 20px;
        margin-top: 10px;
    }

.notiPagerWrap { margin-top: 14px; display: flex; justify-content: center; }
.btnNotiSearchReload{
    background-color:transparent;
    box-shadow:none;
    outline:none;
    border:0px;
}
.btnNotiSearchReload:hover{background-color:transparent;color:#ef4444;}
.btnNotiToolMarkAll {
    background-color: #1976D2;
    color: #fff !important;
    font-weight: 500 !important;
    border-radius: 5px;
}
    .btnNotiToolMarkAll:hover {
        background-color: #1565C0;
        color: #fff !important;
    }
.btnNotiToolDelAll {
    background-color: #E91E63;
    color: #fff !important;
    font-weight: 500 !important;
    border-radius: 5px;
}
    .btnNotiToolDelAll:hover {
        background-color: #D81B60;
        color: #fff !important;
    }