/* =========================================================
   Panel bildirimleri — zil menüsü + liste sayfası.
   Fila temasının header/.notifications stillerini genişletir;
   renkler --cari-* diliyle aynı açık/koyu değerlerden gelir.
   ========================================================= */

:root,
[data-theme='light'] {
    --pn-surface: #ffffff;
    --pn-surface-muted: #f8f9fc;
    --pn-unread: #f3f8ff;
    --pn-text: #1f2937;
    --pn-text-muted: #64748b;
    --pn-text-faint: #94a3b8;
    --pn-border: #eaecf2;
    --pn-primary: #0f79f3;
    --pn-primary-soft: #e7f1fe;
    --pn-critical: #dc2626;
    --pn-critical-soft: #fdecec;
    --pn-warning: #c2620a;
    --pn-warning-soft: #fff3e2;
    --pn-success: #15803d;
    --pn-success-soft: #e7f6ec;
    --pn-shadow: 0 12px 32px rgba(15, 23, 42, .12), 0 2px 6px rgba(15, 23, 42, .05);
}

[data-theme='dark'] {
    --pn-surface: #1b232d;
    --pn-surface-muted: #1f2833;
    --pn-unread: #1d2a3a;
    --pn-text: #f1f5f9;
    --pn-text-muted: #a3b0c2;
    --pn-text-faint: #7d8a9c;
    --pn-border: #2d3744;
    --pn-primary: #4c9dff;
    --pn-primary-soft: rgba(76, 157, 255, .16);
    --pn-critical: #f87171;
    --pn-critical-soft: rgba(248, 113, 113, .15);
    --pn-warning: #fbbf24;
    --pn-warning-soft: rgba(251, 191, 36, .14);
    --pn-success: #4ade80;
    --pn-success-soft: rgba(74, 222, 128, .13);
    --pn-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}

/* ---- Zil düğmesi ---- */
.right-header-content .header-right-item .notifications.dropdown.panel-notifications .panel-notifications-toggle {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: background-color .15s ease;
}

.right-header-content .header-right-item .notifications.dropdown.panel-notifications .panel-notifications-toggle:hover,
.right-header-content .header-right-item .notifications.dropdown.panel-notifications .panel-notifications-toggle.show {
    background-color: var(--pn-primary-soft);
}

.right-header-content .header-right-item .notifications.dropdown.panel-notifications .panel-notifications-toggle:focus-visible {
    outline: 2px solid var(--pn-primary);
    outline-offset: 2px;
}

.right-header-content .header-right-item .notifications.dropdown.panel-notifications .panel-notifications-toggle .material-symbols-outlined {
    font-size: 22px;
    color: var(--pn-text-muted);
}

.right-header-content .header-right-item .notifications.dropdown.panel-notifications .panel-notifications-toggle .count {
    top: 2px;
    right: 1px;
    width: auto;
    min-width: 18px;
    height: 18px;
    line-height: 14px;
    padding: 0 5px;
    border-radius: 99px;
    border: 2px solid var(--pn-surface);
    background-color: var(--pn-critical);
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* ---- Menü ---- */
.right-header-content .header-right-item .notifications.dropdown.panel-notifications .pn-menu {
    width: 380px;
    max-width: calc(100vw - 32px);
    border-radius: 12px;
    background: var(--pn-surface) !important;
    border: 1px solid var(--pn-border) !important;
    box-shadow: var(--pn-shadow);
    overflow: hidden;
    transform: translate(0, 46px) !important;
}

.pn-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 12px 18px;
    border-bottom: 1px solid var(--pn-border);
}

.pn-head-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--pn-text);
    white-space: nowrap;
}

.pn-chip {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.pn-chip-primary { color: var(--pn-primary); background: var(--pn-primary-soft); }
.pn-chip.is-critical { color: var(--pn-critical); background: var(--pn-critical-soft); }
.pn-chip.is-warning { color: var(--pn-warning); background: var(--pn-warning-soft); }
.pn-chip.is-success { color: var(--pn-success); background: var(--pn-success-soft); }

.pn-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--pn-primary);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .15s ease;
}

.pn-link-btn .material-symbols-outlined { font-size: 17px; }
.pn-link-btn:hover:not(:disabled) { background: var(--pn-primary-soft); }
.pn-link-btn:focus-visible { outline: 2px solid var(--pn-primary); outline-offset: 1px; }
.pn-link-btn:disabled { color: var(--pn-text-faint); cursor: default; }

.pn-scroll { max-height: min(420px, 60vh); }

.pn-group {
    padding: 10px 18px 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--pn-text-faint);
}

/* Bildirim satırı: menüde ve liste sayfasında aynı yapı. */
.pn-item {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    padding: 11px 32px 11px 18px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
    transition: background-color .15s ease;
}

.pn-item + .pn-item { border-top: 1px solid var(--pn-border); }
.pn-item:hover { background: var(--pn-surface-muted); color: inherit; }
.pn-item:focus-visible { outline: 2px solid var(--pn-primary); outline-offset: -2px; }
.pn-item.is-unread { background: var(--pn-unread); }
.pn-item.is-unread:hover { background: var(--pn-primary-soft); }

.pn-item.is-unread::after {
    content: "";
    position: absolute;
    top: 17px;
    right: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pn-primary);
}

.pn-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 20px;
}

.pn-icon.is-critical { color: var(--pn-critical); background: var(--pn-critical-soft); }
.pn-icon.is-warning { color: var(--pn-warning); background: var(--pn-warning-soft); }
.pn-icon.is-success { color: var(--pn-success); background: var(--pn-success-soft); }

.pn-content { min-width: 0; flex: 1; }

.pn-title {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--pn-text);
    overflow-wrap: anywhere;
}

.pn-item:not(.is-unread) .pn-title { font-weight: 500; }

.pn-body {
    display: -webkit-box;
    margin-top: 2px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--pn-text-muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pn-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--pn-text-faint);
    font-variant-numeric: tabular-nums;
}

.pn-meta .pn-chip { height: 18px; padding: 0 7px; font-size: 10.5px; }

.pn-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    border-top: 1px solid var(--pn-border);
    background: var(--pn-surface-muted);
    color: var(--pn-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.pn-foot .material-symbols-outlined { font-size: 17px; transition: transform .15s ease; }
.pn-foot:hover { color: var(--pn-primary); }
.pn-foot:hover .material-symbols-outlined { transform: translateX(3px); }

.pn-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 24px 28px;
    text-align: center;
}

.pn-empty-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--pn-primary-soft);
    color: var(--pn-primary);
    font-size: 26px;
}

.pn-empty-title { font-size: 14px; font-weight: 600; color: var(--pn-text); }
.pn-empty-hint { max-width: 280px; margin-top: 4px; font-size: 12.5px; line-height: 1.45; color: var(--pn-text-muted); }

.pn-skeleton { display: flex; gap: 12px; padding: 12px 18px; }
.pn-skeleton > span:first-child { width: 36px; height: 36px; border-radius: 10px; background: var(--pn-surface-muted); flex-shrink: 0; }
.pn-skeleton > span:last-child { flex: 1; display: flex; flex-direction: column; gap: 7px; padding-top: 3px; }
.pn-skeleton i { display: block; height: 10px; border-radius: 6px; background: var(--pn-surface-muted); }
.pn-skeleton i:first-child { width: 70%; }
.pn-skeleton i:last-child { width: 45%; }

@media (prefers-reduced-motion: no-preference) {
    .pn-skeleton i, .pn-skeleton > span:first-child { animation: pn-pulse 1.2s ease-in-out infinite; }
}

@keyframes pn-pulse { 50% { opacity: .45; } }

/* ---- Liste sayfası ---- */
.pn-card {
    background: var(--pn-surface);
    border: 1px solid var(--pn-border);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
    overflow: hidden;
}

.pn-page-sub { margin-top: 2px; font-size: 13px; color: var(--pn-text-muted); }

.pn-stat { color: inherit; text-decoration: none; transition: background-color .15s ease; }
.pn-stat:hover { background: var(--pn-surface-muted); color: inherit; }
.pn-stat.is-active { box-shadow: inset 0 -2px 0 var(--pn-primary); }

.pn-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--pn-border);
}

.pn-tabs { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--pn-surface-muted); border: 1px solid var(--pn-border); }

.pn-tab {
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--pn-text-muted);
    text-decoration: none;
    white-space: nowrap;
}

.pn-tab:hover { color: var(--pn-text); }
.pn-tab.is-active { background: var(--pn-surface); color: var(--pn-text); font-weight: 600; box-shadow: 0 1px 3px rgba(15, 23, 42, .08); }

.pn-type-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.pn-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: 99px;
    border: 1px solid var(--pn-border);
    background: var(--pn-surface);
    color: var(--pn-text-muted);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s ease, color .15s ease;
}

.pn-type-chip:hover { border-color: var(--pn-primary); color: var(--pn-primary); }
.pn-type-chip.is-active { border-color: var(--pn-primary); background: var(--pn-primary-soft); color: var(--pn-primary); font-weight: 600; }
.pn-type-chip .pn-dot { width: 7px; height: 7px; border-radius: 50%; }
.pn-dot.is-critical { background: var(--pn-critical); }
.pn-dot.is-warning { background: var(--pn-warning); }
.pn-dot.is-success { background: var(--pn-success); }

.pn-list .pn-group { padding: 14px 20px 6px; border-top: 1px solid var(--pn-border); background: var(--pn-surface); }
.pn-list .pn-group:first-child { border-top: 0; }
.pn-list .pn-item { padding: 14px 20px; align-items: center; }
.pn-list .pn-item.is-unread::after { display: none; }
.pn-list .pn-item + .pn-item { border-top: 1px solid var(--pn-border); }
.pn-list .pn-title a { color: inherit; text-decoration: none; }
.pn-list .pn-title a:hover { color: var(--pn-primary); }

.pn-row-side {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    font-size: 12.5px;
    color: var(--pn-text-faint);
    font-variant-numeric: tabular-nums;
}

.pn-read-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--pn-primary);
}

.pn-read-btn:hover { background: var(--pn-primary-soft); }
.pn-read-btn:focus-visible { outline: 2px solid var(--pn-primary); outline-offset: 1px; }
.pn-read-btn .material-symbols-outlined { font-size: 19px; }
.pn-read-spacer { width: 30px; }

.pn-pager { display: flex; justify-content: space-between; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--pn-border); }

@media (max-width: 575.98px) {
    .pn-list .pn-item { flex-wrap: wrap; padding: 12px 16px; }
    .pn-row-side { width: 100%; padding-left: 48px; justify-content: space-between; }
    .pn-toolbar { padding: 12px; }
}
