/* Midas Sinyal — ortak tasarım (Hisseler + Analiz + Fonlar sayfaları) */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600&display=swap");
:root {
  color-scheme: dark;
  --bg: #0f1113; --panel: #131619; --panel-2: #1e2328; --panel-3: #262c33;
  --border: #20252a; --border-soft: #1c2024; --hover: #191d21;
  --text: #e8eaec; --text-2: #a7afb7; --muted: #808993; --muted-2: #5f6977;
  --green: #5fc9a0; --green-bg: rgba(95,201,160,0.12);
  --red: #f08a72; --red-bg: rgba(240,138,114,0.13);
  --blue: #a7b0ff; --blue-bg: rgba(167,176,255,0.12);
  --amber: #e3b765; --amber-bg: #1d1a13; --amber-line: #3a3320;
  --radius: 16px;
  --maxw: 1180px;
  --ease: cubic-bezier(.22,1,.36,1); --ease-io: cubic-bezier(.65,0,.35,1);
  --mono: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); min-height: 100vh; font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.45; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.up { color: var(--green); } .down { color: var(--red); } .flat { color: var(--muted); }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* --- animasyonlar --- */
@keyframes riseA { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes riseB { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes livePulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.75); } }
.rise { animation: riseA 640ms var(--ease) both; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; transition-delay: 0ms !important; } }

/* --- Üst menü --- */
.topbar { border-bottom: 1px solid var(--border-soft); }
.topbar-in { max-width: var(--maxw); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.brand svg { color: var(--blue); }
.tabs { display: flex; gap: 4px; }
.tabs a { display: flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 10px; font-weight: 500; color: var(--text-2); transition: background-color 320ms var(--ease); }
.tabs a:hover { background-color: var(--hover); }
.tabs a.active { background-color: var(--panel-2); color: var(--text); }
.gsearch { flex: 1 1 260px; max-width: 380px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: #14171a; color: var(--muted); transition: box-shadow 320ms var(--ease); }
.gsearch:focus-within { box-shadow: 0 0 0 2px rgba(167,176,255,.45); }
.gsearch svg { flex: none; }
.gsearch input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--text); font: inherit; }
.gsearch input:focus-visible { outline: 0; }
.gsearch input::placeholder { color: var(--muted); }
.live { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: livePulse 2600ms var(--ease-io) infinite; }
.live .t { color: var(--muted); }
.live.off i { background: var(--red); animation: none; }

.page { max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 64px; }
.page.wide { padding-top: 28px; }
.card { background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius); }
.label { font-size: 13px; color: var(--muted); }
.warn { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-line); border-radius: 12px; padding: 10px 14px; font-size: 13px; margin: 0 0 14px; display: none; }
h1 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
h2 { font-weight: 600; }
.lede { margin: 0; max-width: 64ch; color: var(--text-2); text-wrap: pretty; }
.lede b { color: var(--text); font-weight: 600; }

@media (max-width: 900px) {
  .topbar-in, .page { padding-left: 16px; padding-right: 16px; }
  .gsearch { order: 5; flex: 1 1 100%; max-width: none; }
}
@media (max-width: 640px) {
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: 14px; }
  .topbar-in { padding-top: 8px; padding-bottom: 10px; gap: 6px 12px; }
  .brand { min-height: 40px; }
  .live { order: 1; font-size: 13px; }
  .tabs { order: 2; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: 1 1 0; justify-content: center; padding: 0 10px; }
  .page, .page.wide { padding-top: 20px; padding-bottom: 40px; }
  h1 { font-size: 24px; }
  .inp, .gsearch input { font-size: 16px; }   /* iOS odaklanınca yakınlaştırmasın */
  .trow { padding: 0 14px; }
  .tbl-foot { padding: 14px; flex-wrap: wrap; gap: 10px; }
  .suggest { min-width: 0; }
}

/* --- ortak bileşenler: segment, çip, düğme, alan --- */
.segs { position: relative; display: grid; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: #14171a; max-width: 100%; }
.segs .thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 9px; background: var(--panel-3); transition: transform 560ms var(--ease-io); }
.segs button { position: relative; height: 38px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font-weight: 500; cursor: pointer; transition: color 360ms var(--ease); }
.segs button[aria-pressed="true"] { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color 360ms var(--ease), color 360ms var(--ease), border-color 360ms var(--ease); }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: #23292f; border-color: #323a42; color: var(--text); }
.chip .n { color: var(--muted); font-weight: 400; }
.inp { height: 44px; padding: 0 12px; width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; transition: border-color 320ms var(--ease), box-shadow 320ms var(--ease); }
.inp:focus { outline: 0; border-color: #59607a; box-shadow: 0 0 0 2px rgba(167,176,255,.35); }
.inp::placeholder { color: #6f7780; }
input[type=date].inp { color-scheme: dark; }
.btn { height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--blue); color: var(--bg); font-weight: 600; cursor: pointer; transition: background-color 320ms var(--ease), transform 320ms var(--ease); }
.btn:hover { background: #c1c7ff; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--panel-3); color: var(--text); }
.btn.ghost:hover { background: #2f363d; }
.icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); cursor: pointer; transition: background-color 320ms var(--ease), transform 320ms var(--ease); }
.icon:hover { background: var(--panel-2); }
.icon:active { transform: scale(.94); }

/* --- tablo (grid satırları) --- */
.tbl { border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.tbl-scroll { overflow-x: auto; }
.tbl-inner { min-width: 860px; }
.trow { display: grid; align-items: center; padding: 0 20px; text-align: right; }
.trow.head { height: 46px; font-size: 13px; color: var(--muted); }
.trow.head > div { cursor: pointer; user-select: none; white-space: nowrap; }
.trow.head > div:hover { color: var(--text); }
.trow.head .ar { color: var(--blue); margin-left: 4px; }
.trow.body { min-height: 62px; border-top: 1px solid var(--border-soft); transition: background-color 300ms var(--ease); }
.trow.body:hover { background-color: var(--hover); }
.trow .l { text-align: left; }
.trow .dim { color: var(--text-2); font-size: 14px; }
.tbl-foot { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: 14px; }
.empty { padding: 40px 20px; border-top: 1px solid var(--border-soft); text-align: center; color: var(--text-2); }

/* --- Fon takibi (eski sayfalar da kullanır) --- */
.bd { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.bd.new { background: var(--green-bg); color: var(--green); }
.bd.inc { background: var(--green-bg); color: var(--green); }
.bd.dec { background: var(--red-bg); color: var(--red); }
.bd.closed { background: var(--red-bg); color: var(--red); }
.bd.first { background: var(--blue-bg); color: var(--blue); }
.bd.flat { background: rgba(255,255,255,0.06); color: var(--muted); }
.lnk { color: var(--blue); } .lnk:hover { text-decoration: underline; }
.note { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0 0 16px; }

.chg { font-weight: 500; white-space: nowrap; }

/* --- arama önerileri --- */
.sg-host { position: relative; }
.suggest { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); min-width: 260px; max-height: 340px; overflow-y: auto; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); box-shadow: 0 12px 32px rgba(0,0,0,.5); animation: riseA 240ms var(--ease) both; }
.sg-i { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: 8px; cursor: pointer; color: var(--text); }
.sg-i.on { background: var(--panel-3); }
.sg-i b { font-weight: 600; letter-spacing: 0.01em; }
.sg-i .sg-n { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-i .sg-m { font-size: 11px; padding: 2px 7px; border: 1px solid #2a3037; border-radius: 6px; color: var(--text-2); }
.sg-i mark { background: none; color: var(--blue); }
.sg-empty { padding: 14px 10px; font-size: 14px; color: var(--muted); }

/* --- ABD oturum rozeti (üst menü) --- */
.live .sess { margin-left: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid var(--border); color: var(--text-2); }
.live .sess.regular { color: var(--green); border-color: rgba(95,201,160,.35); }
.live .sess.pre, .live .sess.post { color: var(--amber); border-color: var(--amber-line); }
.live .sess.overnight { color: var(--blue); border-color: rgba(167,176,255,.35); }
.live .sess.closed { color: var(--muted); }
@media (max-width: 640px) { .live .sess { display: none; } }

/* --- 11 ajanlı konsey kartı --- */
.cc { background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.cc.ok { border-color: rgba(95,201,160,.35); }
.cc-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.cc-flag { font-size: 13px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-2); white-space: nowrap; }
.cc-sym { font-size: 20px; font-weight: 600; letter-spacing: .01em; }
.cc-badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 6px; }
.cc-badge.ok { background: var(--green-bg); color: var(--green); }
.cc-badge.no { background: rgba(255,255,255,.06); color: var(--muted); }
.cc-sess { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--blue-bg); color: var(--blue); }
.cc-rate { margin-left: auto; font-size: 13px; color: var(--muted); }
.cc-setup { color: var(--text-2); font-size: 14px; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cc-cell { background: var(--panel-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.cc-cell .l { font-size: 12px; color: var(--muted); }
.cc-cell b { font-weight: 600; font-size: 15px; }
.cc-money { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.cc-warn { margin-top: 4px; padding: 8px 12px; border-radius: 10px; background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-line); font-size: 13px; }
.cc-why { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.cc-ag summary { cursor: pointer; color: var(--text-2); font-size: 14px; min-height: 36px; display: flex; align-items: center; }
.cc-ag[open] summary { color: var(--text); }
.cc-row { display: grid; grid-template-columns: 22px minmax(120px, 190px) minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--border-soft); font-size: 13px; }
.cc-row b { font-weight: 600; }
.cc-row .t { color: var(--text-2); }
.cc-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }
.cc-ticket { color: var(--muted); }
/* ayrıntılı konsey raporu */
.cc-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.cc-h3 { margin: 0; font-size: 15px; font-weight: 600; }
.cc-vote { display: grid; grid-template-columns: minmax(150px, 210px) minmax(80px, 1fr); gap: 4px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border-soft); font-size: 13px; }
.cc-vote .n { display: flex; gap: 8px; align-items: center; }
.cc-vote .bar { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.cc-vote .bar i { display: block; height: 100%; border-radius: 99px; background: var(--muted); }
.cc-vote .bar i.up { background: var(--green); } .cc-vote .bar i.down { background: var(--red); }
.cc-vote .m { grid-column: 1 / -1; color: var(--text-2); }
.cc-vote.off { opacity: .6; }
.cc-sum { padding: 10px 12px; border-radius: 10px; background: var(--panel-2); font-size: 14px; font-weight: 600; }
.cc-gate { display: grid; grid-template-columns: 22px minmax(120px, 190px) minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--border-soft); font-size: 13px; }
.cc-gate.veto .t { color: var(--red); } .cc-gate .t { color: var(--text-2); }
.cc-chart { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border-soft); }
.cc-more { align-self: flex-start; }
@media (max-width: 640px) { .cc-vote { grid-template-columns: 1fr; } .cc-gate { grid-template-columns: 22px minmax(0, 1fr); } .cc-gate .t { grid-column: 2; } }
@media (max-width: 640px) { .cc { padding: 14px; } .cc-row { grid-template-columns: 22px minmax(0, 1fr); } .cc-row .t { grid-column: 2; } .cc-rate { margin-left: 0; } }

/* --- konsey kartı: dar sütunlarda (analiz sayfası sağ kolon) kendi genişliğine göre sığar --- */
.cc { container-type: inline-size; min-width: 0; overflow-wrap: anywhere; }
.cc-flag::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--blue); }
.cc-flag.bist::before { background: var(--amber); }
.cc-vote .n, .cc-vote .m, .cc-row .t, .cc-gate .t { min-width: 0; }
@container (max-width: 480px) {
  .cc { padding: 14px; gap: 10px; }
  .cc-rate { margin-left: 0; flex-basis: 100%; }
  .cc-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
  .cc-vote { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .cc-vote .bar { width: 100%; }
  .cc-row, .cc-gate { grid-template-columns: 22px minmax(0, 1fr); }
  .cc-row .t, .cc-gate .t { grid-column: 2; }
  .cc-sum { font-size: 13px; }
}
