/* MORGANA BOTS — ek sayfalarin stilleri (style.css'teki renk degiskenlerini kullanir) */

.nav { overflow-y: auto; scrollbar-width: thin; }
.spacer { flex: 1; }
.card.stack { align-content: start; }
/* Genis tablolar sayfayi degil sadece kendi kutusunu kaydirsin */
.view > *, .stack > *, .grid > *, .card { min-width: 0; }
.avatar-sm { flex: none; }
.role-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--purple); flex: none; }
.pick-row input { width: 16px; height: 16px; accent-color: var(--purple); flex: none; }
.note-text { white-space: pre-wrap; word-break: break-word; }
.loca-card:hover { border-color: var(--border-strong); }
.setting-row { align-items: flex-start; }
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
code { background: rgba(8, 6, 14, 0.7); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 12px; }
#bell.on { color: var(--purple-2); }
.topbar-right { display: flex; align-items: center; gap: 8px; }

/* Acma/kapama anahtari ve koruma satirlari */
.switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i { width: 46px; height: 26px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-strong); transition: background 0.18s var(--ease), border-color 0.18s; position: relative; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform 0.18s var(--ease), background 0.18s; }
.switch input:checked + i { background: linear-gradient(135deg, var(--purple), var(--pink)); border-color: transparent; box-shadow: 0 0 14px var(--glow); }
.switch input:checked + i::after { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + i { outline: 2px solid var(--purple-2); outline-offset: 2px; }
.switch input:disabled + i { opacity: 0.5; }
.toggle-row { padding: 14px; gap: 14px; }
.toggle-row .sub { white-space: normal; }
.toggle-row.off .title { color: var(--text-2); }
.toggle-row.master { border-color: var(--border-strong); }
.toggle-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(139, 92, 246, 0.14); color: var(--purple-2); border: 1px solid rgba(139, 92, 246, 0.25); }
.toggle-row.off .toggle-icon { background: var(--surface-3); color: var(--text-3); border-color: var(--border); }
.mini-fields { margin-top: 10px; gap: 12px; }
.mini-field { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; }
.mini-field input { width: 76px; padding: 6px 8px; text-align: center; }
.dimmed { opacity: 0.55; }
.sitter-row { flex-wrap: wrap; }
.sitter-row select { width: auto; min-width: 190px; max-width: 280px; }
.sitter-row .mini-field { gap: 6px; }

/* Imlec bilgi kutusu */
.tip { position: fixed; z-index: 200; pointer-events: none; background: var(--surface-solid); color: var(--text); border: 1px solid var(--border-strong); border-radius: 9px; padding: 6px 10px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; }
.tip.hidden { display: none; }

/* Cizgi grafik: 2px cizgi, geri planda izgara, metinler metin renginde */
.linechart { width: 100%; height: auto; display: block; overflow: visible; }
.lc-grid { stroke: var(--border); stroke-width: 1; }
.lc-axis { fill: var(--text-3); font-size: 11px; font-family: inherit; }
.lc-line { fill: none; stroke: var(--lc); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.lc-hit rect { fill: transparent; }
.lc-hit line { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.lc-hit circle { fill: var(--lc); stroke: var(--surface-solid); stroke-width: 2; opacity: 0; }
.lc-hit:hover line, .lc-hit:hover circle { opacity: 1; }

/* Isi haritasi: tek renk, deger arttikca koyulasir */
.heat { display: grid; gap: 2px; }
.heat-row { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; align-items: center; }
.heat-row i { aspect-ratio: 1; min-height: 12px; border-radius: 4px; background: rgba(139, 92, 246, calc(0.07 + var(--t) * 0.93)); }
.heat-row i:hover { outline: 2px solid var(--text); outline-offset: -1px; }
.heat-head span, .heat-day { color: var(--text-3); font-size: 10px; }
.heat-head span { text-align: left; }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; color: var(--text-3); font-size: 11px; }
.heat-legend b { width: 110px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(139, 92, 246, 0.07), rgba(139, 92, 246, 1)); }

/* Yatay cubuklar (kaynak dagilimi) */
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 54px; align-items: center; gap: 10px; font-size: 13px; }
.hbar span { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar div { height: 14px; border-radius: 4px; background: rgba(8, 6, 14, 0.55); }
.hbar i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--purple); }
.hbar b { text-align: right; }

/* Tablolar */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; vertical-align: middle; }
.data-table th { color: var(--text-3); font-weight: 700; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover, .data-table th.sorted { color: var(--purple-2); }
.data-table th.sorted::after { content: ' ↓'; }
.data-table tbody tr:hover { background: rgba(139, 92, 246, 0.05); }
.data-table .cell-actions { text-align: right; }
.data-table .cell-actions .btn { margin-left: 6px; }
.data-table td .title { font-weight: 600; }

/* Sistem: hata kayitlari */
.logbox { margin: 0; padding: 12px; max-height: 320px; overflow: auto; background: rgba(4, 3, 8, 0.85); border: 1px solid var(--border); border-radius: 12px; color: var(--text-2); font: 11.5px/1.5 Consolas, 'Courier New', monospace; white-space: pre-wrap; word-break: break-word; }

/* Duyuru onizleme */
.an-preview { --an: #8b5cf6; border-left: 4px solid var(--an); background: rgba(8, 6, 14, 0.6); border-radius: 6px 12px 12px 6px; padding: 14px 16px; display: grid; gap: 8px; word-break: break-word; min-height: 90px; }
.an-preview h4 { margin: 0; font-size: 18px; }

/* Genel arama */
.qs-title { padding: 8px 9px 2px; color: var(--text-3); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.quick-results { max-height: 70vh; }
.quick-results .list-item > svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }

@media (max-width: 900px) {
  .quick-search { width: auto; flex: 1; min-width: 0; }
  .hbar { grid-template-columns: 96px 1fr 44px; }
  .heat-row { grid-template-columns: 28px repeat(24, minmax(0, 1fr)); gap: 1px; }
  .heat-row i { border-radius: 2px; min-height: 9px; }
  .list-item { flex-wrap: wrap; }
  #last-update { display: none; }
  .topbar-title h1 { font-size: 17px; }
}
