/* Apple HIG-inspired presentation layer.
   Glass is deliberately limited to navigation and persistent chrome; financial
   content stays on opaque surfaces for hierarchy, contrast, and data density. */

:root {
  color-scheme: dark;
  --bg: #0a0d1a;
  --surface: #111726;
  --surface-2: #161e30;
  --surface-3: #1e293f;
  --ink: #eaf0fa;
  --ink-2: #aebbd0;
  --muted: #7585a0;
  --line: #1f2940;
  --line-2: #2b3855;
  --accent: #4f9cf9;
  --accent-2: #6cb0ff;
  --gold: #d6ad45;
  --good: #34d39a;
  --warn: #f3b44e;
  --bad: #f06a72;
  --good-bg: rgba(52, 211, 154, .12);
  --warn-bg: rgba(243, 180, 78, .12);
  --bad-bg: rgba(240, 106, 114, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 34px rgba(0, 0, 0, .30);
  --glass: rgba(12, 16, 34, .84);
  --glass-edge: rgba(79, 156, 249, .24);
  --glass-shadow: 0 12px 38px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .08);
  --glow-1: rgba(56, 150, 255, .13);
  --glow-2: rgba(124, 92, 255, .17);
  --hairline: rgba(255, 255, 255, .12);
  --backdrop: rgba(4, 8, 18, .72);
  --sheet-bg: linear-gradient(165deg, #141c30, #0c1222);
  --sheet-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  --teal: #26a69a;
  --violet: #a78bfa;
  --radius-m: 16px;
  --radius-l: 22px;
}

/* Açık tema: <html data-theme="light"> — index.html <head>'deki betik ve js/core/theme.js yazar.
   Seçici (0,2,0) özgüllükte: satır içi <style>'daki ve yukarıdaki kök tanımlarını kaynak sırasından
   bağımsız yener. Durum renkleri beyaz zeminde en az 4.5:1 karşıtlık verecek kadar koyu. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #edf1f7;
  --ink: #0f1729;
  --ink-2: #3c4a62;
  --muted: #5f6e85;
  --line: #e2e7ef;
  --line-2: #cfd8e5;
  --accent: #1f6feb;
  --accent-2: #1a5fd0;
  --gold: #8a6810;
  --good: #0b7d55;
  --warn: #9a6006;
  --bad: #cf3341;
  --good-bg: rgba(11, 125, 85, .10);
  --warn-bg: rgba(154, 96, 6, .10);
  --bad-bg: rgba(207, 51, 65, .09);
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --glass: rgba(255, 255, 255, .84);
  --glass-edge: rgba(31, 111, 235, .18);
  --glass-shadow: 0 12px 38px rgba(15, 23, 42, .14), inset 0 1px 0 rgba(255, 255, 255, .7);
  --glow-1: rgba(56, 150, 255, .08);
  --glow-2: rgba(124, 92, 255, .06);
  --hairline: rgba(15, 23, 42, .14);
  --backdrop: rgba(15, 23, 42, .38);
  --sheet-bg: linear-gradient(165deg, #ffffff, #f6f8fb);
  --sheet-shadow: 0 20px 50px rgba(15, 23, 42, .18);
  --teal: #0f7f74;
  --violet: #7c3aed;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: -.006em;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 8% -12%, var(--glow-1), transparent 64%),
    radial-gradient(760px 480px at 94% 2%, var(--glow-2), transparent 62%);
}

::selection { background: rgba(10, 132, 255, .24); }

.skip-link {
  position: fixed;
  z-index: 10001;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #fff;
  background: #007aff;
  transform: translateY(-150%);
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }

.hd-badge,
.hd-badge.mcap,
#pwaInstall,
.lang-btn {
  min-height: 34px;
  border-radius: 999px;
  background: rgba(120, 120, 128, .12);
  border-color: var(--line);
  box-shadow: none;
}

.live-price .lp-val,
.hd-badge.mcap .mc-lbl { color: var(--ink); }

.market-tape {
  height: 36px;
  border-block: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
}
.market-tape::before { background: linear-gradient(90deg, var(--glass), transparent); }
.market-tape::after { background: linear-gradient(270deg, var(--glass), transparent); }
.tape-item { border-color: var(--line); }

.wrap { max-width: 1240px; padding: 30px 30px 84px; }
.page.active { animation: applePageIn .34s cubic-bezier(.2, .8, .2, 1); }
@keyframes applePageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Content remains opaque and calm, preserving hierarchy beneath the glass chrome. */
.card {
  padding: 24px 26px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 6px;
  padding: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -.025em;
  line-height: 1.22;
}
.card h2::before { display: none; }
.card .sub { margin-bottom: 17px; color: var(--muted); font-size: 13px; line-height: 1.6; }

.private-search,
input.cell,
select.cell,
.scan-inputs input,
.watch-add input,
.bd-field input,
.bd-secret input {
  min-height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 13px;
  color: var(--ink);
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.voice-mic { width: 42px; height: 42px; border-radius: 12px; }

.toolbar { gap: 9px; margin-bottom: 16px; }
button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--ink-2);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s cubic-bezier(.2, .8, .2, 1), box-shadow .16s ease;
}
button:hover { color: var(--accent-2); border-color: var(--accent); background: var(--surface-3); }
button.primary {
  border-color: transparent;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #4f9cf9, #2f6fd0);
  box-shadow: 0 5px 16px rgba(47, 111, 208, .38);
}
button.primary:hover { color: #fff; filter: brightness(1.08); box-shadow: 0 7px 20px rgba(47, 111, 208, .46); }
button:active, .shell-brand:active { transform: scale(.975); }

:where(button, input, select, a, [role="button"]):focus-visible {
  outline: 3px solid rgba(10, 132, 255, .48);
  outline-offset: 3px;
}

input::placeholder { color: var(--muted); opacity: 1; }
input.cell:focus,
select.cell:focus,
.private-search:focus,
.scan-inputs input:focus,
.watch-add input:focus,
.bd-field input:focus,
.bd-secret input:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, .16);
}

.grid { gap: 12px; }
.kpi,
.tgt-box,
.earn-tile,
.akd-kpi {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface-2);
  box-shadow: none;
}
.kpi { padding: 17px 18px; }
.kpi::after { display: none; }
.kpi .lbl, .tgt-box .lbl, .akd-kpi .lbl { color: var(--muted); font-weight: 650; letter-spacing: .01em; }
.kpi .val { color: var(--ink); font-size: 24px; font-weight: 730; letter-spacing: -.025em; }

table { border-collapse: separate; border-spacing: 0; }
th, td { padding: 11px 12px; border-color: var(--line); }
thead th { color: var(--muted); background: var(--surface-2); font-size: 11px; font-weight: 700; letter-spacing: .035em; }
thead th:first-child { border-radius: 12px 0 0 0; }
thead th:last-child { border-radius: 0 12px 0 0; }
tbody tr:hover td { background: rgba(120, 120, 128, .08); }
tbody tr.group td { color: var(--ink); background: rgba(10, 132, 255, .09); }

.pill { padding: 4px 10px; border-radius: 999px; }
.bar { height: 7px; border: 0; background: rgba(120, 120, 128, .18); }
.flag,
.balcheck,
.news,
.st-item,
.private-focus-item { border-radius: 14px; border-color: var(--line); background: var(--surface-2); }
.news:hover { border-color: var(--line-2); background: var(--surface-3); }

.cbox,
.scan-chip { min-height: 42px; border-radius: 14px; background: var(--surface); border-color: var(--line); }
.cbox.active,
.scan-chip.active { color: var(--accent-2); border-color: rgba(10, 132, 255, .35); background: rgba(10, 132, 255, .11); }
.econ-side { top: 84px; }

.private-hero {
  background: radial-gradient(circle at 88% 12%, rgba(10, 132, 255, .16), transparent 38%), var(--surface);
  border-color: var(--line);
}
.private-hero::after { border-color: rgba(10, 132, 255, .06); }
.private-kicker { color: var(--ink-2); background: var(--surface-2); border-color: var(--line); }
.private-company {
  min-height: 218px;
  padding: 19px;
  border-radius: 18px;
  border-color: var(--line);
  background: var(--surface-2);
  box-shadow: none;
}
.private-company:hover { border-color: rgba(10, 132, 255, .32); box-shadow: 0 12px 28px rgba(0, 0, 0, .08); }
.private-ipo { border-color: rgba(10, 132, 255, .18); background: rgba(10, 132, 255, .08); }
.private-detail-hero { background: var(--surface); }

.forum-menu,
.pwa-sheet-card {
  border-color: var(--glass-edge);
  border-radius: 20px;
  background: var(--glass);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: saturate(190%) blur(28px);
  backdrop-filter: saturate(190%) blur(28px);
}
.pwa-sheet { background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

.akd-panel,
#earnChart { border-color: var(--line); border-radius: 18px; background: var(--surface-2); box-shadow: none; }

a { color: var(--accent-2); text-underline-offset: 3px; }
.hint { color: var(--muted); }
.ratio-name, .flag .ttl, .st-body { color: var(--ink); }

* { scrollbar-color: rgba(120, 120, 128, .35) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: rgba(120, 120, 128, .35); background-clip: padding-box; }

@media (hover: hover) {
  .private-company:hover { transform: translateY(-2px); }
}

@media (prefers-reduced-transparency: reduce) {
  .shell-nav,
  .page-chips,
  .page-bar,
  .bottom-nav,
  .market-tape,
  .forum-menu,
  .pwa-sheet-card {
    background: var(--surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  .card, button, input, select, .shell-nav { border-width: 2px; }
  .muted, .hint, .card .sub { color: var(--ink-2); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 720px) {
  .wrap { padding: 18px 12px 64px; }
  .card { padding: 18px 16px; border-radius: 19px; margin-bottom: 14px; }
  .card h2 { font-size: 18px; }
  button { min-height: 42px; }
  .private-grid { gap: 10px; }
}

@media print { .skip-link { display: none !important; } }

/* İzleme listesi — enstrüman seçici ve bölümler */
.watch-toolbar{display:flex;justify-content:flex-end;margin:6px 0 10px}
.watch-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px;margin:0 0 14px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}
.watch-picker h4{margin:0 0 6px;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.watch-picker label{display:flex;align-items:center;gap:8px;padding:3px 0;font-size:13px;color:var(--ink);cursor:pointer}
.watch-picker input{accent-color:var(--accent)}

/* Seçicideki ipucu ve Kapat düğmesi grid sütununa sıkışmasın, tam genişlik alsın. */
.watch-picker .instr-hint{grid-column:1/-1;margin:0 0 2px}
.watch-picker .instr-foot{grid-column:1/-1;display:flex;justify-content:flex-end}
.watch-picker .instr-foot button{padding:6px 16px;font-size:12px}.watch-section-title{display:flex;align-items:center;min-height:26px;margin:14px 0 6px;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.watch-section-title:first-child{margin-top:0}

/* İzleme listesi — Web Push bildirim paneli */
.watch-notification-panel{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:15px 0;padding:14px 15px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(135deg,rgba(10,132,255,.10),var(--surface-2) 55%)}
.watch-notification-copy{display:flex;min-width:0;flex-direction:column;gap:3px}.watch-notification-copy strong{color:var(--ink);font-size:14px}.watch-notification-copy span{color:var(--ink-2);font-size:12.5px}.watch-notification-copy small{color:var(--muted);font-size:11px;line-height:1.45}
.watch-notification-actions{display:flex;flex:0 0 auto;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.watch-notification-actions button{white-space:nowrap}
.watch-notification-panel.is-active{border-color:rgba(48,209,88,.38);background:linear-gradient(135deg,rgba(48,209,88,.10),var(--surface-2) 55%)}
.watch-notification-panel.is-error{border-color:rgba(255,69,58,.38)}
@media(max-width:720px){.watch-notification-panel{align-items:stretch;flex-direction:column}.watch-notification-actions{display:grid;grid-template-columns:1fr 1fr}.watch-notification-actions .primary{grid-column:1/-1}.watch-notification-actions button{width:100%}}

/* Şerit: sabit tek satır (kayan animasyon kaldırıldı), mobilde yatay kaydırma */
.market-tape{overflow-x:auto;white-space:nowrap}.market-tape-track{display:inline-flex;gap:18px}.t-px{font-weight:700;color:var(--ink)}

/* Widget katmanı: fiyat grafiği/hızlı özet/canlı fiyat */
.qs-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}.qs-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px;margin-top:8px}.lp-px{font-weight:800;font-size:18px}.pc-btns{margin-bottom:6px}

/* Ana sayfa: izleme listesi başlığı/ekle kutusu, detay paneli */
.watch-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.watch-add{display:flex;gap:6px}.watch-add input{min-width:220px}#watchBody tr.active td{background:var(--surface-2)}.wd-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.wd-actions{display:flex;gap:6px}.wd-section{margin-top:14px}.wd-section h3{font-size:14px;color:var(--muted);margin:0 0 6px;text-transform:uppercase;letter-spacing:.04em}
.pf-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 18px; margin-bottom: 14px; }
.pf-summary .pf-sum-main b { font-size: 26px; font-weight: 800; display: block; }
.pf-summary .pf-sum-cell { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink-2); }
.pf-summary .pf-sum-cell b:not(.up):not(.down) { color: var(--ink); }
.pf-summary .pf-sum-cell b { font-size: 15px; font-variant-numeric: tabular-nums; }
.pf-summary .pf-sum-ccy { margin-left: auto; display: flex; gap: 6px; }
.pf-summary .pf-sum-ccy button { padding: 5px 12px; font-size: 12px; }
.pf-summary #pfMissing { flex-basis: 100%; }
@media (max-width: 600px) { .pf-summary { gap: 12px; } .pf-summary .pf-sum-ccy { margin-left: 0; } }
.pf-pos-info{display:flex;flex-wrap:wrap;gap:16px;margin:10px 0 4px} .pf-pos-info .pf-i{display:flex;gap:6px;align-items:baseline;font-size:13px}

/* Hisse kodu öneri listesi (js/widgets/symbol-suggest.js). .sugg'a display VERİLMEZ:
   gizleme hidden özniteliğiyle yapılır; [hidden] kuralı özgüllükte önde (0,2,0) ki
   kaynak sırasına bağlı kalmasın — .hidden'ın ezilmesiyle yaşanan hatanın tekrarı olmasın. */
.sugg-host{position:relative}
.sugg{position:absolute;z-index:60;max-height:320px;overflow-y:auto;padding:4px;background:var(--surface);border:1px solid var(--line-2);border-radius:12px;box-shadow:var(--shadow)}
.sugg[hidden]{display:none}
.sugg-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;cursor:pointer;font-size:13px;color:var(--ink)}
.sugg-row:hover,.sugg-row.active{background:var(--surface-2)}
.sugg-sym{font-weight:800;letter-spacing:.02em}
.sugg-name{min-width:0;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sugg-mkt{font-size:11px;color:var(--muted);white-space:nowrap}
.sugg-status{padding:8px 10px;font-size:12px;color:var(--muted)}

/* ===== Kabuk (spec 2026-09-28 §4): masaüstünde sol kenar çubuğu; telefonda üst çubuk + grup
   düğmeleri + alt sekme çubuğu. Katmanlar: içerik 1–60 → menü 90–100 → paneller 9999+. ===== */
.ico { width: 20px; height: 20px; flex: 0 0 auto; }
.shell-nav { position: relative; z-index: 100; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); }
.shell-brand { display: flex; align-items: center; gap: 10px; min-width: 0; border-radius: 12px; cursor: pointer; }
.shell-brand img { display: block; width: 34px; height: 34px; }
.brand-word { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-size: 18px; font-weight: 760; letter-spacing: -.02em; white-space: nowrap; }
.brand-accent { color: var(--accent); }
.side-nav { display: none; }
.shell-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.shell-actions #pwaInstall { margin: 0; }
/* Satır içi .lang-btn'in eski başlıktan kalan 10px sol boşluğu: kabukta aralığı gap verir */
.shell-actions .lang-btn { margin-left: 0; }
.page-bar { display: none; }
.page-bar-title { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--ink); font-size: 18px; font-weight: 760; letter-spacing: -.02em; }
.page-bar-title .ico { width: 22px; height: 22px; color: var(--accent-2); }
.snav-item, .chip, .bnav-item { border: 0; background: transparent; box-shadow: none; cursor: pointer; font-family: inherit; }
.snav-item:focus-visible, .chip:focus-visible, .bnav-item:focus-visible, .shell-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 899.98px) {
  .page-chips { position: sticky; top: 0; z-index: 90; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); }
  .page-chips::-webkit-scrollbar { display: none; }
  /* Telefon üst çubuğu: hesap + dil + tema + Yükle sığsın, marka yazısının üstüne binmesin */
  .shell-nav { gap: 8px; padding-inline: 12px; }
  .shell-actions { flex: 0 0 auto; gap: 6px; }
  #pwaInstall .pwa-label { display: none; }
  .chip { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); font-size: 13px; font-weight: 650; white-space: nowrap; }
  .chip .ico { width: 16px; height: 16px; }
  .chip.active { color: var(--ink); border-color: rgba(79, 156, 249, .45); background: rgba(79, 156, 249, .18); }
  body.page-stock .page-bar { display: flex; justify-content: flex-end; padding: 10px 12px 0; }
  .page-bar-title { display: none; }
  .bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 100; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); }
  .bnav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 4px; border-radius: 12px; color: var(--muted); font-size: 11.5px; font-weight: 650; }
  .bnav-item .ico { width: 22px; height: 22px; }
  .bnav-item.active { color: var(--accent-2); }
  .shell-main { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

@media (min-width: 900px) {
  .app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
  .shell-nav { position: sticky; top: 0; align-self: start; height: 100vh; flex-direction: column; align-items: stretch; gap: 0; padding: 18px 12px 14px; overflow-y: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .shell-brand { padding: 2px 8px 14px; }
  .side-nav { display: flex; flex: 1 1 auto; flex-direction: column; gap: 10px; }
  .snav-group { display: flex; flex-direction: column; gap: 2px; }
  .snav-head { padding: 0 10px 4px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .snav-item { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 6px 10px; border-radius: 10px; color: var(--ink-2); font-size: 13.5px; font-weight: 600; text-align: left; }
  .snav-item:hover { color: var(--ink); background: rgba(120, 120, 128, .12); }
  .snav-item.active { color: var(--ink); background: rgba(79, 156, 249, .16); }
  .snav-item.active::before { content: ''; position: absolute; top: 7px; bottom: 7px; left: -12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
  .snav-item.active .ico { color: var(--accent-2); }
  .shell-actions { flex-wrap: wrap; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
  .page-chips, .bottom-nav { display: none; }
  .page-bar { position: sticky; top: 0; z-index: 90; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 10px 30px; border-bottom: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); }
}

/* Yazdırma (spec §4.4): menüler .no-print ile gizlenir; boş kalan kenar sütunu da kalkar */
@media print { .app-shell { display: block; } .shell-main { padding-bottom: 0; } }

/* ===== Hesap (spec 2026-09-30 §6.3): hesap düğmesi, pencere, panel, kısa bildirim ===== */
.acct-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(120, 120, 128, .12); color: var(--ink); font-size: 13px; font-weight: 650; box-shadow: none; cursor: pointer; }
.acct-btn .ico { width: 18px; height: 18px; }
.acct-btn.is-user { padding: 3px 10px 3px 3px; }
.acct-avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; }
.acct-avatar.lg { flex: 0 0 auto; width: 44px; height: 44px; font-size: 18px; }
.acct-sync { color: var(--good); font-size: 12px; }
.acct-sync[data-s="pending"], .acct-sync[data-s="error"], .acct-sync[data-s="idle"] { color: var(--warn); }
.bd-sheet { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--backdrop); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.bd-sheet[hidden] { display: none; }
.bd-sheet-card { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 20px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--sheet-bg); box-shadow: var(--sheet-shadow); color: var(--ink); }
.bd-sheet-card:focus { outline: none; }
.bd-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bd-sheet-head h3 { margin: 0; font-size: 18px; font-weight: 800; }
.bd-x { width: 34px; min-height: 34px; padding: 0; border-radius: 50%; font-size: 20px; line-height: 1; }
.bd-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.bd-tabs button { flex: 1; }
.bd-tabs button[aria-selected="true"] { border-color: rgba(79, 156, 249, .5); background: rgba(79, 156, 249, .18); color: var(--ink); }
.bd-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; color: var(--ink-2); font-size: 13px; }
.bd-field input { width: 100%; }
.bd-err { margin: 0 0 8px; color: var(--bad); font-size: 12.5px; }
.bd-err:empty { display: none; }
.bd-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--ink); font-size: 13px; line-height: 1.5; }
.bd-sheet form button[type="submit"] { width: 100%; margin-top: 4px; }
.bd-me { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bd-me div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bd-me b { overflow: hidden; text-overflow: ellipsis; }
.bd-me small, .bd-list small { color: var(--muted); font-size: 12px; }
.bd-sec { margin: 0 0 14px; padding: 14px 0 0; border-top: 1px solid var(--line); }
.bd-sec h4 { margin: 0 0 10px; font-size: 14px; }
.bd-sec h5 { margin: 14px 0 6px; color: var(--ink-2); font-size: 13px; }
.bd-sec > button { margin-top: 8px; }
.bd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bd-list { margin: 0; padding: 0; list-style: none; }
.bd-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bd-list li > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.bd-secret { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; padding: 12px; border: 1px solid rgba(79, 156, 249, .35); border-radius: 12px; background: rgba(79, 156, 249, .08); }
.bd-secret code { font-size: 18px; font-weight: 800; letter-spacing: .08em; }
.bd-secret input { width: 100%; font-size: 12px; }
.bd-danger { color: var(--bad); }
.bd-block { width: 100%; margin-top: 4px; }
.bd-link-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 16px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; }
.bd-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 10002; max-width: min(520px, calc(100vw - 32px)); padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-3); color: var(--ink); font-size: 13px; box-shadow: var(--shadow); transform: translateX(-50%); }
.bd-toast[hidden] { display: none; }
@media (max-width: 899.98px) {
  .bd-sheet { align-items: flex-end; padding: 0; }
  .bd-sheet-card { width: 100%; max-height: 88vh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
  .bd-toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .acct-btn .acct-label { display: none; }
}

/* Portföy formu: hata ve yönlendirme iletisi uyarı renginde (soluk .hint gözden kaçıyordu) */
#pfAddStatus.pf-warn, #pfDetailStatus.pf-warn { color: var(--warn); font-weight: 600; }
/* Pozisyon paneli: Alım/Satım ve Elle düzelt ayrı, başlıklı gruplar */
.pf-op { margin: 10px 0 4px; }
.pf-op h4 { margin: 0 0 6px; font-size: 13px; color: var(--ink-2); }
/* Tema düğmesi (Sistem / Açık / Koyu): dil düğmesiyle aynı hap, içinde tek ikon */
.theme-btn { padding: 0 9px; }
.theme-btn .ico { width: 17px; height: 17px; }
.watch-add input, .bd-field input, .bd-secret input { padding: 0 12px; }
.watch-add input, .bd-field input { font: inherit; }
/* İzleme listesi KAP alarmı: başlığın yanında küçük zil; açıklama kutusu ancak basınca açılır */
.watch-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.watch-title h2 { margin: 0; }
.notify-bell { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; }
.notify-bell .nb-ico { display: inline-flex; }
.notify-bell .ico { width: 16px; height: 16px; }
.notify-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.notify-bell.is-active .notify-dot { background: var(--good); box-shadow: 0 0 0 3px var(--good-bg); }
.notify-bell.is-error .notify-dot { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.notify-bell[aria-expanded="true"] { color: var(--accent-2); border-color: var(--accent); }
/* İzleme listesi sıralaması: başlık düğmeleri (başlık metni gibi görünür), kendi sıraya dönüş, sürükleme tutamacı */
.th-sort { min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.th-sort:hover, .th-sort.on { color: var(--accent-2); background: none; }
.watch-own-order { min-height: 26px; margin-left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; letter-spacing: 0; text-transform: none; }
.drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; min-height: 28px; margin: -4px 6px -4px -6px; padding: 0; border: 0; border-radius: 8px; background: none; box-shadow: none; color: var(--muted); font-size: 16px; line-height: 1; vertical-align: middle; cursor: grab; touch-action: none; }
.drag-handle:hover { color: var(--ink); background: var(--surface-3); }
tbody.drag-active { user-select: none; -webkit-user-select: none; }
tbody.drag-active .drag-handle { cursor: grabbing; }
/* Sürükleme/sıralama animasyonu: tutulan satır kalkar ve imleci izler (geçişsiz), öbürleri kayarak yer açar,
   bırakınca satır yerine kayar. Hareket azaltma açıksa genel kural süreleri sıfırlar. */
/* Kalkan satır: tek parça vurgu çerçevesi (outline satırın tamamına çizilir). Hücre başına gölge/çerçeve ya da
   renkli arka plan, sütun sınırları kesirli pikselde olunca hücreler arasında ince çizgiler bırakıyordu. */
tr.dragging { position: relative; z-index: 3; outline: 2px solid var(--accent); outline-offset: -2px; }
tr.dragging td { background: var(--surface); }
tr.drag-shift { transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
tr.dragging.drag-settle { transition: transform .16s ease-out; }
#watchBody td:first-child, #pfList td:first-child { white-space: nowrap; }
/* Tablo altı: ipucu solda, "Kendi sıram" sağda (tablonun üstünde değil: görününce satırlar kaymasın) */
.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; margin-top: 8px; }
/* Fiyat alarmı bölmesi (detay paneli): kurulu alarmlar listesi, ekleme formu, ipuçları */
.pa-list { margin: 0 0 10px; padding: 0; list-style: none; }
.pa-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.pa-list li.off { color: var(--muted); }
.pa-list li.hint { border-bottom: 0; }
.pa-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pa-form select { flex: 1 1 220px; width: auto; }
.pa-form input { flex: 0 1 130px; width: 130px; }
.pa-now, .pa-msg { margin-top: 6px; }
.pa-msg:empty, .pa-now:empty { display: none; }
.pa-msg.pf-warn { color: var(--warn); font-weight: 600; }
/* Portföy: işlem geçmişi listesi ve kapanan pozisyonlar */
.pf-hist { margin: 0; padding: 0; list-style: none; }
.pf-hist li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pf-hist li .sub { color: var(--muted); margin-right: 4px; }
.pf-hist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pf-hist-main { flex: 1 1 auto; min-width: 0; }
.pf-hist-acts { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.pf-hist-btn { min-height: 30px; padding: 3px 9px; font-size: 12px; border-radius: 9px; }
.pf-hist li.pf-hist-editing { background: var(--surface-2); outline: 1px solid var(--line-2); border-radius: 8px; }
.pf-hist-date.pf-hist-nodate { border-color: var(--warn); color: var(--warn); }
.pf-div-h { margin: 4px 0 2px; font-size: 13px; color: var(--ink-2); }
.pf-div-amt { width: 96px; min-height: 32px; padding: 4px 8px; }
.pf-div-all { margin-top: 6px; }
/* İşlem tarihi: formlarda etiketli alan; geçmişte yazı gibi duran, dokununca seçici açılan alan */
.pf-date { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.pf-date input.cell { width: 150px; }
.pf-hist-date { font: inherit; font-size: 12.5px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 1px 4px; margin: 0 2px 0 -4px; cursor: pointer; min-height: 0; }
.pf-hist-date:hover, .pf-hist-date:focus { border-color: var(--line-2); color: var(--ink); outline: none; }
.pf-closed { margin-top: 14px; }
.pf-closed summary { cursor: pointer; color: var(--ink-2); font-size: 13px; font-weight: 650; padding: 6px 0; }
/* Portföy değer grafiği */
.pf-chart { margin: 4px 0 16px; }
.pf-chart:empty { display: none; }
.pf-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; font-size: 13px; color: var(--ink); }
.pf-chart-read { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.pf-chart-btns { display: flex; gap: 6px; margin-bottom: 8px; }
.pf-chart-btns button { min-height: 30px; padding: 4px 10px; font-size: 12px; }
/* Kıyaslama: seçenekler, renkli çizgiler ve açıklama */
.pf-chart-bench { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -2px 0 8px; font-size: 12px; }
.pf-chart-bench button { min-height: 28px; padding: 3px 9px; font-size: 12px; display: inline-flex; align-items: center; gap: 5px; }
.pf-s { stroke: var(--muted); }
.pf-s-pf { stroke: var(--accent); }
.pf-s-xu100 { stroke: var(--teal); }
.pf-s-usd { stroke: var(--good); }
.pf-s-gold { stroke: var(--gold); }
.pf-s-spx { stroke: var(--violet); }
.pf-sw { display: inline-block; width: 10px; height: 3px; border-radius: 2px; background: var(--muted); }
.pf-sw.pf-s-pf { background: var(--accent); }
.pf-sw.pf-s-xu100 { background: var(--teal); }
.pf-sw.pf-s-usd { background: var(--good); }
.pf-sw.pf-s-gold { background: var(--gold); }
.pf-sw.pf-s-spx { background: var(--violet); }
.pf-chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pf-lg { display: inline-flex; align-items: center; gap: 5px; }
/* İzleme listeleri: sekmeler ve seçili listenin araçları */
.watch-tabs { margin: 10px 0 4px; }
.watch-tabs:empty { display: none; }
.watch-tabs-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.watch-tabs-row::-webkit-scrollbar { display: none; }
.watch-tab { flex: 0 0 auto; min-height: 32px; padding: 4px 12px; font-size: 13px; white-space: nowrap; }
.watch-tab-n { font-size: 11px; opacity: .7; margin-left: 2px; font-variant-numeric: tabular-nums; }
.watch-tab-add { color: var(--muted); }
.watch-tab-tools { display: flex; gap: 8px; margin-top: 6px; }
/* Portföy dağılımı: yatay çubuklar */
.pf-alloc { margin: 16px 0 4px; }
.pf-alloc:empty { display: none; }
.pf-alloc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; color: var(--ink); }
.pf-alloc-head .pf-chart-btns { margin: 0; flex-wrap: wrap; }
.pf-bar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr 11em; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pf-bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-bar-t { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.pf-bar-t i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.pf-bar-v { text-align: right; white-space: nowrap; }
@media (max-width: 520px) { .pf-bar { grid-template-columns: 1fr auto; } .pf-bar-t { grid-column: 1 / -1; grid-row: 2; } }
.pf-chart-svg { display: block; width: 100%; height: 170px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); touch-action: pan-y; }
.pf-chart-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
/* CSV düğmeleri: küçük, ikincil */
.pf-csv { margin: 14px 0 0; flex-wrap: wrap; }
.pf-csv button, .watch-toolbar button { min-height: 34px; padding: 6px 12px; font-size: 12.5px; }
.watch-toolbar { gap: 8px; flex-wrap: wrap; }
/* Telefonda tutamaç sütunu da sığsın: hücre kenar boşlukları daralır (✕ ekrandan taşmasın) */
@media (max-width: 600px) { #watchBody, #pfList { overflow-x: auto; } #watchBody table, #pfList table { display: table; width: 100%; } #watchBody th, #watchBody td, #pfList th, #pfList td { padding-left: 6px; padding-right: 6px; } .drag-handle { width: 24px; margin-right: 2px; } }

/* .hidden bir yardımcı sınıftır ve her şeyi gizlemek ZORUNDADIR.
   Sayfa içi <style> bloğundaki .hidden kuralı bu dosyadan ÖNCE geldiği için, buradaki
   tek sınıflı display kuralları (.watch-picker, .page-tabs, .pf-summary, .wd-head …)
   eşit özgüllükte olup kaynak sırasıyla onu eziyordu: sınıf uygulanıyor ama eleman
   ekranda kalıyordu. Bu kural dosyanın SONUNDA durur ki hepsini yensin. */
.hidden{display:none}

/* Kayan piyasa şeridi (kullanıcı isteği): içerik tape.js'te iki kez basılır, animasyon
   tam yarısı kadar kaydırınca ikinci kopya birincinin yerine oturur — dikişsiz döngü.
   Bu kurallar dosyanın sonunda durur ki yukarıdaki .market-tape kuralını yensin. */
.market-tape{overflow:hidden}
.market-tape-track{will-change:transform;animation:tape-scroll 60s linear infinite}
.market-tape-track .tape-dup{display:inline-flex;align-items:center;gap:18px}
@keyframes tape-scroll{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media (prefers-reduced-motion: reduce){.market-tape-track{animation:none}.market-tape{overflow-x:auto}}
