/* ============================================================
   Ana Sayfa modül bölümleri (ndx-*) — Views/Dashboard/_DashboardModules.cshtml + js/pages/dashboard.js
   Modül Merkezi tanıtımı, modül performansları (widget), Özelleştir penceresi, modül bekleyen işleri/önerileri, AI rehberi, son modüller.
   ============================================================ */
.ndx-slot:empty { display: none; }
.ndx-slot [hidden] { display: none !important; }

/* Yüklenirken iskelet */
.ndx-skel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.ndx-skel span { height: 118px; border-radius: 16px; background: linear-gradient(90deg, var(--bg-surface) 0%, var(--bg-elevated) 50%, var(--bg-surface) 100%); background-size: 200% 100%; border: 1px solid var(--border); animation: ndxShimmer 1.3s linear infinite; }
@keyframes ndxShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ndx-skel span { animation: none; } }

/* Hero alt başlığı */
.nd-hero-sub { display: block; font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; margin: -8px 0 14px; max-width: 640px; }
.ndx-chip img { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }

/* ---------- Modül Merkezi tanıtımı (modülü yoksa) ---------- */
.ndx-promo { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 20px; border-radius: 18px; border: 1px dashed var(--border-strong);
    background: linear-gradient(120deg, rgba(124,92,255,.07), rgba(74,147,255,.04)), var(--bg-surface); }
.ndx-promo-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; background: linear-gradient(135deg, #4f7dff, #7b5cff); color: #fff; }
.ndx-promo-ic svg { width: 22px; height: 22px; }
.ndx-promo-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ndx-promo-b b { font-size: 14.5px; color: var(--text-primary); }
.ndx-promo-b span { font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }

/* ---------- Modül performansları (widget'lar) ---------- */
.ndx-linkbtn { border: 0; background: none; padding: 0; font-family: inherit; cursor: pointer; }
.ndx-wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ndx-w { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-surface); min-width: 0; }
.ndx-w-h { display: flex; align-items: center; gap: 10px; }
.ndx-w-h img { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; }
.ndx-w-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ndx-w-tx b { font-size: 13.5px; font-weight: 800; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ndx-w-tx span { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ndx-w-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: var(--accent-soft); color: var(--accent); }
.ndx-w-ic svg { width: 16px; height: 16px; }
.ndx-w-m { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.ndx-w-v { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ndx-w-v b { font-family: var(--font-display); font-size: 19px; font-weight: 800; color: var(--text-primary); line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ndx-w-v span { font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ndx-w-err { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); padding: 8px 0; }
.ndx-w-err svg { width: 16px; height: 16px; }
.ndx-w-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; margin-top: auto; border-top: 1px solid var(--border); }
.ndx-w-f a, .ndx-w-f button { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 12px; font-weight: 700; color: var(--accent2); background: none; border: 0; padding: 0; cursor: pointer; }
.ndx-w-f button { color: #7b6cff; }
.ndx-w-f svg { width: 14px; height: 14px; }

/* ---------- Özelleştir penceresi ---------- */
.modal.ndx-cmodal { max-width: 760px; }
.ndx-cmodal .btn-sm { width: auto; }
.ndx-c-hint { font-size: 12.5px; color: var(--text-secondary); margin: -8px 0 14px; line-height: 1.5; }
.ndx-c-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ndx-c-cat { display: flex; flex-direction: column; gap: 12px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.ndx-c-mh { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.ndx-c-mh img { border-radius: 5px; }
.ndx-c-opt { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 9px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.ndx-c-opt:hover { background: var(--bg-surface); }
.ndx-c-opt svg { width: 15px; height: 15px; color: var(--text-muted); }
.ndx-c-opt input { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
.ndx-c-sel { border: 1px solid var(--border); border-radius: 13px; padding: 12px; background: var(--bg-base); min-width: 0; }
.ndx-c-selh { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }
.ndx-c-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; counter-reset: ndxc; }
.ndx-c-list li { display: flex; align-items: center; gap: 4px; padding: 7px 8px; border-radius: 10px; background: var(--bg-surface); border: 1px solid var(--border); counter-increment: ndxc; }
.ndx-c-list li::before { content: counter(ndxc); width: 20px; font-size: 11.5px; font-weight: 800; color: var(--text-muted); flex-shrink: 0; }
.ndx-c-list li.ndx-c-none { justify-content: center; color: var(--text-muted); font-size: 12.5px; background: none; border-style: dashed; }
.ndx-c-list li.ndx-c-none::before { content: none; }
.ndx-c-lt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ndx-c-lt b { font-size: 12.5px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ndx-c-lt small { font-size: 11px; color: var(--text-muted); }
.ndx-c-mv { width: 26px; height: 26px; border-radius: 7px; border: 0; background: none; display: grid; place-items: center; color: var(--text-secondary); cursor: pointer; flex-shrink: 0; }
.ndx-c-mv:hover:not(:disabled) { background: var(--bg-elevated); color: var(--text-primary); }
.ndx-c-mv:disabled { opacity: .3; cursor: default; }
.ndx-c-mv svg { width: 14px; height: 14px; }
.ndx-cmodal .modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ndx-cmodal .modal-foot [data-ndx-reset] { margin-right: auto; }

/* ---------- Bekleyen işler / öneriler: modül logoları ---------- */
.ndx-logo-ic { background: none; overflow: hidden; }
.ndx-logo-ic img, .ndw-card-ic.ndx-logo img { width: 36px; height: 36px; border-radius: 11px; display: block; object-fit: cover; }
.ndw-card-ic.ndx-logo { background: none; overflow: hidden; }
.ndx-logo-ic:not(:has(img)) { background: var(--accent-soft); color: var(--accent); }

/* AI kullanım rehberi */
.ndx-guide-steps { margin: 5px 0 8px; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }

/* ---------- Devam Et: son modüller ---------- */
.ndx-recent-mods { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ndx-rm { flex: 1 1 180px; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-base); color: inherit; }
.ndx-rm:hover { border-color: var(--border-strong); }
.ndx-rm img { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.ndx-rm-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.ndx-rm-ic svg { width: 16px; height: 16px; }
.ndx-rm-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ndx-rm-tx b { font-size: 12.5px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ndx-rm-tx span { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ndx-rm > svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }

/* ---------- Telefon ---------- */
@media (max-width: 860px) {
    .ndx-skel { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
    .ndx-skel span:nth-child(3) { display: none; }
    .ndx-skel span { height: 96px; }
    .ndx-promo { padding: 13px 14px; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
    .ndx-widgets { padding: 14px; border-radius: 16px; margin-bottom: 14px; }
    .ndx-widgets .nd-panel-h { margin-bottom: 10px; }
    .ndx-widgets .nd-panel-h h2 { font-size: 15.5px; }
    /* Widget'lar telefonda yatay kaydırılan şerit */
    .ndx-wgrid { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -14px; padding: 0 14px 4px; scrollbar-width: none; }
    .ndx-wgrid::-webkit-scrollbar { display: none; }
    .ndx-w { flex: 0 0 85%; scroll-snap-align: start; padding: 12px; gap: 10px; }
    .ndx-w-v b { font-size: 17px; }
    .ndx-c-cols { grid-template-columns: 1fr; }
    .ndx-c-cat { max-height: 34vh; }
    .ndx-c-list { max-height: 30vh; }
    .ndx-recent-mods { flex-direction: column; }
    .ndx-rm { flex-basis: auto; }
}
