/* ═══════════════════════════════════════════════════════════
   BİLDİRİM MERKEZİ STİLLERİ
   ═══════════════════════════════════════════════════════════ */

/* Bildirim wrapper */
.notif-wrap {
    position: relative;
    margin-right: 4px;
}

/* Bildirim butonu */
.notif-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    color: #e2e8f0;
}

.notif-btn:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.35);
    transform: scale(1.05);
}

.notif-btn.has-notif {
    animation: bellShake 0.5s ease-in-out;
}

@keyframes bellShake {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

/* Bildirim badge */
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 8px;
    border: 1.5px solid rgba(30,41,59,0.8);
    min-width: 17px;
    text-align: center;
    line-height: 1.3;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
}

/* Dışarı tıklayınca kapatma overlay'i */
.notif-overlay {
    position: fixed;
    inset: 0;
    z-index: 8999;
    background: transparent;
}

/* Bildirim paneli */
.notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 400px;
    max-width: calc(100vw - 24px);
    max-height: 520px;
    background: var(--t-card, #fff);
    border: 1px solid var(--t-card-border, rgba(0,0,0,0.08));
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.03);
    z-index: 9000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: notifSlideIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes notifSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Bildirim header */
.notif-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid var(--t-card-border, #f1f5f9);
    flex-shrink: 0;
    min-height: 0;
    gap: 8px;
    overflow: hidden;
}

/* Bildirim Sekmeleri */
.notif-tabs {
    display: flex;
    flex-shrink: 0;
    border-bottom: 2px solid var(--t-card-border, #e2e8f0);
    background: var(--t-card, #fff);
    border-radius: 16px 16px 0 0;
    overflow: visible;
}
.notif-tab {
    flex: 1;
    padding: 10px 8px;
    margin: 0;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--t-text-muted, #94a3b8);
    transition: color 0.2s, border-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
    box-shadow: none;
}
.notif-tab:hover {
    color: var(--t-accent, #6366f1);
}
.notif-tab.active {
    color: var(--t-accent, #6366f1);
    border-bottom-color: var(--t-accent, #6366f1);
}

.notif-tab-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.58rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 14px;
    text-align: center;
    line-height: 1.2;
    flex-shrink: 0;
}

/* İşlem filtre alanı */
.notif-islem-filters {
    padding: 5px 12px;
    border-bottom: 1px solid var(--t-card-border, #f1f5f9);
    flex-shrink: 0;
    overflow: visible;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
}
.notif-islem-filters > :first-child { flex: 1; min-width: 0; }
/* SearchSelect input — bildirim filtresi içinde küçük */
.notif-islem-filters .ss-wrap .m-input {
    height: 32px !important;
    padding: 4px 10px !important;
    font-size: 0.74rem !important;
    border-radius: 7px !important;
}
.notif-filter-clear {
    flex-shrink: 0;
    padding: 4px 8px;
    border: 1.5px solid var(--t-danger, #ef4444);
    border-radius: 6px;
    background: rgba(239,68,68,0.08);
    color: var(--t-danger, #ef4444);
    font-size: 0.66rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
    transition: background 0.15s, color 0.15s;
}
.notif-filter-clear:hover {
    background: var(--t-danger, #ef4444);
    color: #fff;
}
.notif-islem-select {
    width: 100%;
    padding: 5px 10px;
    border: 1.5px solid var(--t-card-border, #e2e8f0);
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--t-text-muted, #64748b);
    background: var(--t-surface, white);
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
}
.notif-islem-select:focus {
    border-color: var(--t-accent, #6366f1);
}

.notif-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--t-text, #1e293b);
}

.notif-mark-all {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--t-accent, #6366f1);
    background: rgba(99,102,241,0.06);
    border: 1px solid rgba(99,102,241,0.15);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-mark-all:hover {
    background: var(--t-accent-light, #eff6ff);
    border-color: var(--t-accent, #6366f1);
}

/* Bildirim body */
.notif-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    max-height: 440px;
}

/* Bildirim item */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--t-card-border, #f8fafc);
    transition: all 0.15s;
    position: relative;
    overflow: hidden;
}

.notif-item:hover {
    background: var(--t-hover, #f8fafc);
}

.notif-item.unread {
    background: var(--t-accent-light, #eff6ff);
}

.notif-item.unread:hover {
    background: var(--t-accent-light, #dbeafe);
    filter: brightness(0.97);
}

/* Bildirim icon */
.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.notif-icon.masraf {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.notif-icon.izin {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.notif-icon.avans {
    background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
}

.notif-icon.mesaj {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

.notif-icon.odeme {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}

.notif-icon.ekipman {
    background: linear-gradient(135deg, #fed7aa, #fdba74);
}

.notif-icon.sistem {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.notif-icon.is_girisi {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}

.notif-icon.egitim {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
}

.notif-icon.hasta {
    background: linear-gradient(135deg, #ccfbf1, #99f6e4);
}

.notif-icon.destek {
    background: linear-gradient(135deg, #fef9c3, #fde047);
}

.notif-icon.sozlesme {
    background: linear-gradient(135deg, #e0f2fe, #7dd3fc);
}

.notif-icon.performans {
    background: linear-gradient(135deg, #ede9fe, #c4b5fd);
}

.notif-icon.fatura {
    background: linear-gradient(135deg, #fef3c7, #fcd34d);
}

.notif-icon.kalibrasyon {
    background: linear-gradient(135deg, #ecfccb, #bef264);
}

.notif-icon.kargo {
    background: linear-gradient(135deg, #fff7ed, #fdba74);
}

.notif-icon.belge {
    background: linear-gradient(135deg, #f0f9ff, #bae6fd);
}

/* Bildirim content */
.notif-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.notif-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--t-text, #1e293b);
    margin-bottom: 3px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notif-desc {
    font-size: 0.78rem;
    color: var(--t-text-muted, #64748b);
    line-height: 1.4;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.notif-time {
    font-size: 0.7rem;
    color: var(--t-text-muted, #94a3b8);
    font-weight: 600;
}

/* Okunmadı noktası */
.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--t-accent, #3b82f6);
    flex-shrink: 0;
    margin-top: 6px;
}

/* Boş durum */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
}

.notif-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.notif-empty-text {
    font-size: 0.85rem;
    color: var(--t-text-muted, #94a3b8);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 600px) {
    .notif-panel {
        position: fixed;
        top: 54px;
        right: 6px;
        left: 6px;
        width: auto;
        max-height: calc(100vh - 72px);
        max-height: calc(100dvh - 72px);
        border-radius: 14px;
    }

    .notif-body {
        max-height: calc(100vh - 170px);
        max-height: calc(100dvh - 170px);
    }

    .notif-wrap {
        margin-right: 2px;
    }

    .notif-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .notif-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .notif-icon {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }

    .notif-header {
        padding: 6px 12px;
    }

    .notif-mark-all {
        font-size: 0.65rem;
        padding: 4px 8px;
    }

    .notif-tab {
        font-size: 0.7rem;
        padding: 9px 6px;
        gap: 3px;
    }

    .notif-tab-badge {
        font-size: 0.52rem;
        padding: 1px 4px;
        min-width: 12px;
    }

    .notif-title {
        font-size: 0.78rem;
    }

    .notif-desc {
        font-size: 0.72rem;
    }

    .notif-islem-filters {
        padding: 4px 8px;
        gap: 4px;
    }

    .notif-islem-filters .ss-wrap .m-input {
        height: 28px !important;
        padding: 3px 8px !important;
        font-size: 0.68rem !important;
    }

    .notif-filter-clear {
        font-size: 0.58rem;
        padding: 2px 5px;
        max-width: 90px;
    }
}

/* Son İşlemlerim — genişleme/daraltma */
.notif-desc-trunc {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
}

.notif-expanded {
    background: var(--t-bg-card-active, rgba(59,130,246,0.06)) !important;
}

.notif-expanded .notif-desc {
    -webkit-line-clamp: unset;
    display: block;
    white-space: normal;
    overflow: visible;
    word-break: break-word;
}

.notif-expand-icon {
    font-size: 0.65rem;
    color: var(--t-text-muted, #94a3b8);
    flex-shrink: 0;
    align-self: center;
    margin-left: 2px;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.notif-item:hover .notif-expand-icon {
    opacity: 1;
}

/* Küçük ekranlar (380px altı) */
@media (max-width: 380px) {
    .notif-tab {
        font-size: 0.64rem;
        padding: 8px 4px;
        gap: 2px;
    }

    .notif-mark-all {
        font-size: 0.6rem;
        padding: 3px 6px;
    }

    .notif-item {
        padding: 8px 10px;
        gap: 8px;
    }

    .notif-icon {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .notif-title {
        font-size: 0.74rem;
    }

    .notif-desc {
        font-size: 0.68rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   YÖNETİM DARK THEME OVERRIDE
   .yonetim-wrapper (dashboard) ve .ym-page (alt sayfalar)
   altındaki bildirim merkezi koyu topbar'a uyumlu
   ═══════════════════════════════════════════════════════════ */

.yonetim-wrapper .notif-panel,
.ym-page .notif-panel {
    background: #1e293b;
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
}

.yonetim-wrapper .notif-tabs,
.ym-page .notif-tabs {
    background: #1e293b;
    border-bottom-color: rgba(255,255,255,0.08);
}

.yonetim-wrapper .notif-tab,
.ym-page .notif-tab {
    color: #94a3b8;
}
.yonetim-wrapper .notif-tab:hover,
.ym-page .notif-tab:hover {
    color: #60a5fa;
}
.yonetim-wrapper .notif-tab.active,
.ym-page .notif-tab.active {
    color: #60a5fa;
    border-bottom-color: #3b82f6;
}

.yonetim-wrapper .notif-header,
.ym-page .notif-header {
    border-bottom-color: rgba(255,255,255,0.08);
}
.yonetim-wrapper .notif-header h4,
.ym-page .notif-header h4 {
    color: #e2e8f0;
}

.yonetim-wrapper .notif-mark-all,
.ym-page .notif-mark-all {
    color: #60a5fa;
    background: rgba(59,130,246,0.12);
    border-color: rgba(59,130,246,0.25);
}
.yonetim-wrapper .notif-mark-all:hover,
.ym-page .notif-mark-all:hover {
    background: rgba(59,130,246,0.22);
    border-color: #3b82f6;
}

.yonetim-wrapper .notif-item,
.ym-page .notif-item {
    border-bottom-color: rgba(255,255,255,0.05);
}
.yonetim-wrapper .notif-item:hover,
.ym-page .notif-item:hover {
    background: rgba(255,255,255,0.05);
}
.yonetim-wrapper .notif-item.unread,
.ym-page .notif-item.unread {
    background: rgba(59,130,246,0.1);
}
.yonetim-wrapper .notif-item.unread:hover,
.ym-page .notif-item.unread:hover {
    background: rgba(59,130,246,0.16);
    filter: none;
}

.yonetim-wrapper .notif-title,
.ym-page .notif-title {
    color: #f1f5f9;
}
.yonetim-wrapper .notif-desc,
.ym-page .notif-desc {
    color: #94a3b8;
}
.yonetim-wrapper .notif-time,
.ym-page .notif-time {
    color: #64748b;
}

.yonetim-wrapper .notif-dot,
.ym-page .notif-dot {
    background: #3b82f6;
}

.yonetim-wrapper .notif-empty-text,
.ym-page .notif-empty-text {
    color: #64748b;
}

.yonetim-wrapper .notif-expanded,
.ym-page .notif-expanded {
    background: rgba(59,130,246,0.1) !important;
}
.yonetim-wrapper .notif-expand-icon,
.ym-page .notif-expand-icon {
    color: #64748b;
}

/* Yönetim — icon arka planları (koyu temaya uyumlu, biraz daha mat) */
.yonetim-wrapper .notif-icon.masraf,     .ym-page .notif-icon.masraf     { background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(245,158,11,0.15)); }
.yonetim-wrapper .notif-icon.izin,       .ym-page .notif-icon.izin       { background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(96,165,250,0.15)); }
.yonetim-wrapper .notif-icon.avans,      .ym-page .notif-icon.avans      { background: linear-gradient(135deg, rgba(168,85,247,0.2), rgba(139,92,246,0.15)); }
.yonetim-wrapper .notif-icon.mesaj,      .ym-page .notif-icon.mesaj      { background: linear-gradient(135deg, rgba(34,197,94,0.2), rgba(74,222,128,0.15)); }
.yonetim-wrapper .notif-icon.odeme,      .ym-page .notif-icon.odeme      { background: linear-gradient(135deg, rgba(34,197,94,0.2), rgba(74,222,128,0.15)); }
.yonetim-wrapper .notif-icon.ekipman,    .ym-page .notif-icon.ekipman    { background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(251,146,60,0.15)); }
.yonetim-wrapper .notif-icon.sistem,     .ym-page .notif-icon.sistem     { background: linear-gradient(135deg, rgba(148,163,184,0.2), rgba(100,116,139,0.15)); }
.yonetim-wrapper .notif-icon.is_girisi,  .ym-page .notif-icon.is_girisi  { background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(129,140,248,0.15)); }
.yonetim-wrapper .notif-icon.egitim,     .ym-page .notif-icon.egitim     { background: linear-gradient(135deg, rgba(236,72,153,0.2), rgba(244,114,182,0.15)); }
.yonetim-wrapper .notif-icon.hasta,      .ym-page .notif-icon.hasta      { background: linear-gradient(135deg, rgba(20,184,166,0.2), rgba(45,212,191,0.15)); }
.yonetim-wrapper .notif-icon.destek,     .ym-page .notif-icon.destek     { background: linear-gradient(135deg, rgba(234,179,8,0.2), rgba(250,204,21,0.15)); }
.yonetim-wrapper .notif-icon.sozlesme,   .ym-page .notif-icon.sozlesme   { background: linear-gradient(135deg, rgba(14,165,233,0.2), rgba(56,189,248,0.15)); }
.yonetim-wrapper .notif-icon.performans, .ym-page .notif-icon.performans { background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(167,139,250,0.15)); }
.yonetim-wrapper .notif-icon.fatura,     .ym-page .notif-icon.fatura     { background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(252,211,77,0.15)); }
.yonetim-wrapper .notif-icon.kalibrasyon,.ym-page .notif-icon.kalibrasyon { background: linear-gradient(135deg, rgba(132,204,22,0.2), rgba(163,230,53,0.15)); }
.yonetim-wrapper .notif-icon.kargo,      .ym-page .notif-icon.kargo      { background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(251,146,60,0.15)); }
.yonetim-wrapper .notif-icon.belge,      .ym-page .notif-icon.belge      { background: linear-gradient(135deg, rgba(14,165,233,0.2), rgba(125,211,252,0.15)); }

/* Yönetim — filtre alanı */
.yonetim-wrapper .notif-islem-filters,
.ym-page .notif-islem-filters {
    border-bottom-color: rgba(255,255,255,0.08);
}
.yonetim-wrapper .notif-filter-clear,
.ym-page .notif-filter-clear {
    border-color: rgba(239,68,68,0.4);
    background: rgba(239,68,68,0.12);
    color: #f87171;
}
.yonetim-wrapper .notif-filter-clear:hover,
.ym-page .notif-filter-clear:hover {
    background: #ef4444;
    color: #fff;
}

/* Yönetim — SearchSelect dropdown (filtre) koyu tema */
.yonetim-wrapper .notif-islem-filters .ss-wrap .m-input,
.ym-page .notif-islem-filters .ss-wrap .m-input {
    height: 32px !important;
    padding: 4px 10px !important;
    font-size: 0.74rem !important;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
    color: #e2e8f0;
}
.yonetim-wrapper .notif-islem-filters .ss-wrap .m-input::placeholder,
.ym-page .notif-islem-filters .ss-wrap .m-input::placeholder {
    color: #64748b;
}
.yonetim-wrapper .notif-islem-filters .ss-wrap .m-input:focus,
.yonetim-wrapper .notif-islem-filters .ss-wrap .m-input.ss-open,
.ym-page .notif-islem-filters .ss-wrap .m-input:focus,
.ym-page .notif-islem-filters .ss-wrap .m-input.ss-open {
    border-color: #3b82f6;
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.yonetim-wrapper .notif-islem-filters .ss-panel,
.ym-page .notif-islem-filters .ss-panel {
    background: #1e293b;
    border-color: #3b82f6;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.yonetim-wrapper .notif-islem-filters .ss-item,
.ym-page .notif-islem-filters .ss-item {
    color: #cbd5e1;
    border-bottom-color: rgba(255,255,255,0.06);
}
.yonetim-wrapper .notif-islem-filters .ss-item:hover,
.ym-page .notif-islem-filters .ss-item:hover {
    background: rgba(59,130,246,0.15);
    color: #60a5fa;
}
.yonetim-wrapper .notif-islem-filters .ss-sel,
.ym-page .notif-islem-filters .ss-sel {
    background: rgba(59,130,246,0.2);
    color: #60a5fa;
}
.yonetim-wrapper .notif-islem-filters .ss-empty,
.ym-page .notif-islem-filters .ss-empty {
    color: #64748b;
}
.yonetim-wrapper .notif-islem-filters .ss-panel::-webkit-scrollbar-thumb,
.ym-page .notif-islem-filters .ss-panel::-webkit-scrollbar-thumb {
    background: #475569;
}
