/* ParaFOMO Uygulamalar — ortak tema (tüm app.parafomo.com uygulamaları bunu yükler).
   Jetonlar + taban öğeler burada; uygulamaya özel stiller kendi css'inde.
   Varlık renkleri anlamsal ve dataviz validator'dan geçti
   (açık #F7F9F8 / koyu #101B1A yüzeyler). */

:root {
  --bg: #F7F9F8;
  --surface: #FFFFFF;
  --ink: #10201E;
  --ink-2: #3E4F4C;
  --muted: #68807B;
  --line: #DDE6E3;
  --line-soft: #EAF0EE;
  --brand: #2BB194;
  --brand-deep: #0F766E;
  --brand-deep-ink: #FFFFFF;
  --gain: #15803D;
  --loss: #BE3B33;
  --a-bist: #0891B2;
  --a-gold: #9C6A10;
  --a-silver: #5570B8;
  --chip-bist: #E3F3F8;
  --chip-gold: #F6EDDA;
  --chip-silver: #E7ECF8;
  --focus: #0F766E;
  --shadow: 0 10px 30px rgba(16, 32, 30, .12);
  --r-control: 10px;
  --r-sheet: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1514;
    --surface: #101B1A;
    --ink: #E9F0EE;
    --ink-2: #BCCBC7;
    --muted: #8DA29D;
    --line: #233431;
    --line-soft: #1A2927;
    --brand: #2BB194;
    --brand-deep: #19A38D;
    --brand-deep-ink: #06201C;
    --gain: #46C879;
    --loss: #F0776A;
    --a-bist: #0891B2;
    --a-gold: #BA851F;
    --a-silver: #7488D8;
    --chip-bist: #0D2A33;
    --chip-gold: #2E2410;
    --chip-silver: #1C2340;
    --focus: #4FD8BE;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  --bg: #0C1514;
  --surface: #101B1A;
  --ink: #E9F0EE;
  --ink-2: #BCCBC7;
  --muted: #8DA29D;
  --line: #233431;
  --line-soft: #1A2927;
  --brand: #2BB194;
  --brand-deep: #19A38D;
  --brand-deep-ink: #06201C;
  --gain: #46C879;
  --loss: #F0776A;
  --a-bist: #0891B2;
  --a-gold: #BA851F;
  --a-silver: #7488D8;
  --chip-bist: #0D2A33;
  --chip-gold: #2E2410;
  --chip-silver: #1C2340;
  --focus: #4FD8BE;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15.5px/1.55 "IBM Plex Sans", system-ui, sans-serif;
}
.num { font-variant-numeric: tabular-nums; }

a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 50;
  background: var(--brand-deep); color: var(--brand-deep-ink);
  padding: 8px 14px; border-radius: var(--r-control);
}
.skip:focus { left: 8px; }

/* ---- üst çubuk + marka ---- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 980px; margin: 0 auto; padding: 14px 16px; width: 100%;
}
.wordmark { display: inline-flex; align-items: baseline; gap: 7px; text-decoration: none; }
.wordmark:hover { text-decoration: none; }
.wm-name { font-weight: 700; font-size: 1.18rem; letter-spacing: -.02em; color: var(--ink); }
.wm-app {
  font-weight: 600; font-size: .82rem; color: var(--brand-deep);
  border: 1.5px solid var(--brand); border-radius: 999px; padding: 1px 9px 2px;
}
.bar-right { display: flex; align-items: center; gap: 8px; }

.foot {
  border-top: 1px solid var(--line-soft);
  max-width: 980px; margin: 0 auto; width: 100%;
  padding: 18px 16px 26px; display: flex; flex-wrap: wrap; gap: 8px 20px;
  font-size: .85rem; color: var(--muted);
}
.foot a { color: var(--muted); }
.foot-note { flex-basis: 100%; }

/* ---- düğmeler, girişler ---- */
.btn {
  font: 600 .95rem/1 "IBM Plex Sans", system-ui, sans-serif;
  border: 1.5px solid transparent; border-radius: var(--r-control);
  padding: 11px 18px; cursor: pointer; color: var(--ink);
  background: transparent; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand-deep); color: var(--brand-deep-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-quiet { border-color: var(--line); }
.btn-quiet:hover { border-color: var(--muted); }
.btn-danger { color: var(--loss); border-color: transparent; }
.btn-danger:hover { text-decoration: underline; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-icon { padding: 9px; border-radius: var(--r-control); border: 1.5px solid var(--line); background: transparent; cursor: pointer; color: var(--ink-2); line-height: 0; }
.btn-icon:hover { border-color: var(--muted); }
.btn-icon[aria-pressed="true"] { border-color: var(--brand-deep); color: var(--brand-deep); }

.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: .88rem; font-weight: 500; color: var(--ink-2); margin-bottom: 5px; }
.field input, .field textarea {
  width: 100%; font: 400 1rem/1.4 "IBM Plex Sans", system-ui, sans-serif;
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--r-control); padding: 10px 12px;
}
.field input:focus, .field textarea:focus { border-color: var(--brand-deep); outline: none; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.form-error { color: var(--loss); font-size: .9rem; margin: 10px 0 0; min-height: 1.3em; }

/* ---- bildirimler ---- */
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(94vw, 420px); }
.toast {
  background: var(--ink); color: var(--bg); border-radius: var(--r-control);
  padding: 11px 16px; font-size: .92rem; box-shadow: var(--shadow); text-align: center;
}
.toast-err { background: var(--loss); color: #fff; }

.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -3px; }
@media (prefers-reduced-motion: no-preference) {
  .spin { animation: sp .7s linear infinite; }
  @keyframes sp { to { transform: rotate(360deg); } }
}

/* ---- menü ---- */
.menu { position: relative; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 200px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-control);
  box-shadow: var(--shadow); padding: 6px; margin: 0; list-style: none;
}
.menu-list .who { padding: 8px 10px; font-size: .86rem; color: var(--muted); border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; overflow-wrap: anywhere; }
.menu-list button, .menu-list a {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 9px 10px; border-radius: 7px; font: inherit; color: var(--ink); cursor: pointer;
  text-decoration: none;
}
.menu-list button:hover, .menu-list a:hover { background: var(--line-soft); text-decoration: none; }

/* hidden özniteliği her zaman kazanır (display'li sınıflar ezemesin) */
[hidden] { display: none !important; }
