:root {
  --bg: #f7f7f5;
  --surface: #fcfcfb;
  --surface-2: #f0efec;
  --line: #e4e3df;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #7a7974;
  --accent: #2a78d6;
  --accent-ink: #ffffff;
  --bar-track: #ecebe7;
  --good: #0a7d0a;
  --warning: #fab219;
  --warning-ink: #8a5a00;
  --critical: #d03b3b;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 1px 1px rgb(0 0 0 / 0.03);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tabbar-h: 64px;
}


* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 var(--font); font-variant-numeric: tabular-nums;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
}
a { color: inherit; text-decoration: none; }
h1 { font-size: 20px; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 14px; margin: 0 0 12px; color: var(--ink-2); font-weight: 600; }
h2.section { margin: 28px 0 10px; }
h3 { font-size: 13px; margin: 0 0 6px; color: var(--ink-2); font-weight: 600; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: 0.92em; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.neg { color: var(--critical); }
.txt-warning { color: var(--warning-ink); }
.txt-critical { color: var(--critical); }
.wrap { max-width: 880px; margin: 0 auto; padding: 16px; }
.intro { margin: -4px 0 16px; }

/* Üst bar */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px;
  padding: 12px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; letter-spacing: -0.02em; font-size: 17px; }
.back { display: grid; place-items: center; width: 36px; height: 36px; margin: -6px -12px -6px -8px; border-radius: 50%; color: var(--ink); }
.back:active { background: var(--surface-2); }
.back svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* Aşağı çekip yenileme göstergesi (static/pull.js) */
.ptr { position: fixed; top: 4px; left: 50%; z-index: 30; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); color: var(--ink-3); border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.12); transform: translate(-50%, -48px); transition: color .15s; pointer-events: none; }
.ptr.ready { color: var(--accent); }
.ptr span { transition: transform .15s; }
.ptr.ready span { transform: rotate(180deg); }
.ptr.loading span { display: none; }
.ptr.loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent);
  border-right-color: transparent; animation: ptr-spin .7s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
.topnav { display: none; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topnav a { flex: none; }
.topnav a { padding: 6px 10px; border-radius: 8px; color: var(--ink-2); }
.topnav a.on { background: var(--surface-2); color: var(--ink); }
.logout { margin-left: auto; }
.linkish { background: none; border: 0; color: var(--ink-3); font: inherit; cursor: pointer; padding: 4px; }

/* Alt sekme çubuğu (mobil) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr);
  align-items: center; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); padding: 6px 0; }
.tabbar a.on { color: var(--accent); }
.tabbar a.add span {
  width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 26px; line-height: 1; margin-top: -8px;
  box-shadow: 0 4px 14px rgb(42 120 214 / 0.35);
}
@media (min-width: 760px) {
  .topnav { display: flex; }
  .tabbar { display: none; }
  body { padding-bottom: 32px; }
  .wrap { padding: 24px; }
}

/* Sayfa başı */
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.monthnav { display: flex; align-items: center; gap: 6px; }
.monthnav a, .monthnav .disabled { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; font-size: 20px; color: var(--ink-2); }
.monthnav a:hover { background: var(--surface-2); }
.monthnav .disabled { opacity: 0.25; }
.pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pills a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.pills a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Kartlar */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.cardhead { display: flex; justify-content: space-between; align-items: baseline; }
.empty { color: var(--ink-3); margin: 4px 0; }

/* KPI */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); min-width: 0; }
.kpi:first-child { grid-column: 1 / -1; }
.kpi .label { font-size: 12.5px; color: var(--ink-3); }
.kpi strong { font-size: 20px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi:first-child strong { font-size: 30px; }
.delta { font-size: 12.5px; }
.delta.up { color: var(--critical); }
.delta.down { color: var(--good); }
.delta .muted { font-size: 12px; }
@media (min-width: 760px) {
  .kpis { grid-template-columns: 1.4fr 1fr 1fr; }
  .kpi:first-child { grid-column: auto; }
}

/* Günlük grafik */
.daily { display: flex; align-items: flex-end; gap: 2px; height: 110px; }
.dbar { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; outline: none; }
.dbar .fill { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 0; }
.dbar:hover .fill, .dbar:focus .fill { filter: brightness(1.15); }
.dbar .tip {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; z-index: 2; pointer-events: none;
}
.dbar:hover .tip, .dbar:focus .tip { display: block; }
.dbar:first-child .tip { left: 0; transform: none; }
.dbar:last-child .tip { left: auto; right: 0; transform: none; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: 4px; border-top: 1px solid var(--line); padding-top: 4px; }

/* Kategori çubukları */
.catbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.catbars a { display: block; }
.catbars .row { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.catbars .amt { font-weight: 600; white-space: nowrap; }
.bar { height: 6px; background: var(--bar-track); border-radius: 4px; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.bar .fill.warning { background: var(--warning); }
.bar .fill.critical { background: var(--critical); }
.bar.budget + .small { margin-top: 4px; }

/* İşlem listesi */
.txlist { list-style: none; margin: 0; padding: 0; }
.txlist li + li { border-top: 1px solid var(--line); }
.tx { display: flex; align-items: center; gap: 12px; padding: 10px 2px; }
.tx:hover { background: var(--surface-2); border-radius: 8px; }
.tx .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 16px; flex: none; }
.tx .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tx .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .sub { font-size: 12px; color: var(--ink-3); }
.tx .val { text-align: right; font-weight: 600; white-space: nowrap; display: flex; flex-direction: column; }
.tx .val.gelir { color: var(--good); }
.tx .val.transfer { color: var(--ink-2); font-weight: 500; }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--ink-2); }
.daygroup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 4px; margin-bottom: 10px; }
.totals { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin: 0 2px 12px; }

/* Filtreler */
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.filters input[type=search] { grid-column: 1 / -1; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr repeat(4, 1fr); } .filters input[type=search] { grid-column: auto; } }

/* Formlar */
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.form label .tag { align-self: flex-start; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; }
.form label.check input { width: 20px; height: 20px; min-height: 0; }
.checks { display: flex; gap: 18px; flex-wrap: wrap; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two.narrow-first { grid-template-columns: 80px 1fr; }
.amountrow { display: grid; grid-template-columns: 1fr 110px; gap: 10px; }
.amountrow input[name=amount] { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
[hidden] { display: none !important; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border-radius: 10px; padding: 3px; }
/* Radyo görünmez ama odaklanabilir kalır. Etiket kapsayıcı olmazsa genel `input { width: 100% }` sayfa
   genişliğini alıp telefonda yatay kaydırma açıyordu (/islemler/yeni 645 px, 15 Ekim). */
.seg label { cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.seg span { display: block; text-align: center; padding: 8px; border-radius: 8px; font-size: 14px; color: var(--ink-2); }
.seg input:checked + span { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { border-color: transparent; color: var(--ink-3); }
.btn.danger { color: var(--critical); border-color: color-mix(in srgb, var(--critical) 40%, transparent); }
.btn.block { width: 100%; }
.error { background: color-mix(in srgb, var(--critical) 10%, transparent); color: var(--critical); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.error p { margin: 2px 0; }
.ok { color: var(--good); font-size: 14px; font-weight: 600; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* Düzenlenebilir satırlar */
details.editable { padding: 0; }
details.editable summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
details.editable summary::-webkit-details-marker { display: none; }
details.editable[open] summary { border-bottom: 1px solid var(--line); }
details.editable .form { padding: 16px; }
details.inactive { opacity: 0.6; }

/* Kurlar */
.rates { display: flex; gap: 16px; flex-wrap: wrap; align-items: baseline; font-size: 13px; color: var(--ink-2); padding: 4px 2px; }

/* Giriş */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { font-size: 26px; }
.login-card p { margin: -8px 0 4px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
body:has(.login) { padding-bottom: 0; }

@media (max-width: 759px) { .hide-mobile { display: none !important; } }
.tabbar svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.actions .ghost { margin-left: auto; }

/* ---------------------------------------------------------------- Aşama 2-8 */
:root { --good-ink: #0a6e0a; --alt: #1c5cab; }

.txt-good { color: var(--good-ink); }
.nowrap { white-space: nowrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wrap-gap { flex-wrap: wrap; margin-bottom: 12px; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain > li { padding: 9px 0; border-top: 1px solid var(--line); }
.plain > li:first-child { border-top: 0; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.span2 { grid-column: 1 / -1; }
@media (max-width: 420px) { .three { grid-template-columns: 1fr 1fr; } }

.btn.small { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.row-actions form { margin: 0; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-form label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
input.xs { width: 56px; min-height: 36px; padding: 6px 8px; }
input.sm { width: 96px; min-height: 36px; padding: 6px 8px; }

.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good-ink); }
.badge.warning { background: color-mix(in srgb, var(--warning) 22%, transparent); color: var(--warning-ink); }
.badge.critical { background: color-mix(in srgb, var(--critical) 14%, transparent); color: var(--critical); }
.tag.warn { background: color-mix(in srgb, var(--warning) 22%, transparent); color: var(--warning-ink); }

.notice {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; margin-bottom: 10px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px;
}
.notice span { color: var(--ink-3); }
.notice.warning { border-color: color-mix(in srgb, var(--warning) 55%, var(--line)); }
.notice.critical { border-color: color-mix(in srgb, var(--critical) 55%, var(--line)); color: var(--critical); }

/* Menü */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 3px; min-height: 104px; box-shadow: var(--shadow); }
.tile:hover { border-color: var(--accent); }
.tile-ico { font-size: 22px; margin-bottom: 4px; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, 1fr); } }

/* Sağlık */
details.med summary { display: block; }
.med-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.med-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.med-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 8px; }
.med-actions { padding: 14px 16px 0; display: flex; flex-direction: column; gap: 10px; }
.events { list-style: none; margin: 12px 16px 0; padding: 10px 0 0; border-top: 1px dashed var(--line); font-size: 13px; }
.events li { padding: 2px 0; }
.travel li { display: flex; flex-direction: column; gap: 2px; }

/* Alt düzenleme blokları */
details.sub-edit { border-top: 1px solid var(--line); }
details.sub-edit:first-of-type { border-top: 0; }
details.sub-edit > summary { list-style: none; cursor: pointer; padding: 11px 0; }
details.sub-edit > summary::-webkit-details-marker { display: none; }
details.sub-edit > .form, details.sub-edit > form { padding: 4px 0 16px; }
details.sub-edit.inactive > summary { opacity: 0.55; }
.card > details.sub-edit + details.sub-edit { border-top: 1px solid var(--line); }

/* Aylık çubuklar */
.mbars { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-bottom: 18px; position: relative; }
.mbar { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; outline: none; }
.mbar .fill { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; }
.mbar .fill.alt { background: var(--alt); }
.mbar .lbl { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: var(--ink-3); }
.mbar .tip { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; z-index: 2; pointer-events: none; }
.mbar:hover .tip, .mbar:focus .tip { display: block; }
.mbar:first-child .tip, .mbar:nth-child(2) .tip { left: 0; transform: none; }
.mbar:last-child .tip, .mbar:nth-last-child(2) .tip { left: auto; right: 0; transform: none; }
.mbar:hover .fill, .mbar:focus .fill { filter: brightness(1.15); }

/* Tablolar */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 6px 6px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl.imp select { min-height: 36px; padding: 4px 8px; font-size: 14px; min-width: 130px; }
.tbl.imp input[type=checkbox] { width: 20px; height: 20px; min-height: 0; }
.tbl tr.dup td { color: var(--ink-3); }

/* Analiz */
.askrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.answer { margin-top: 10px; min-height: 8px; }
.answer .a { font-size: 15.5px; white-space: pre-line; margin: 4px 0 0; }
.answer .q { margin: 0; }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }
.fc .row-between { padding: 5px 0; font-size: 14.5px; }
.fc .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 16px; }

/* Belgeler */
.attachments { display: flex; gap: 8px; flex-wrap: wrap; }
.att { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; background: var(--surface-2); font-size: 12px; }
.att img { width: 100%; height: 100%; object-fit: cover; }
.pending-row { padding: 4px 0 12px; }
.pending-row .row-actions { padding-left: 46px; }

.kpis .kpi:nth-child(n+4) strong { font-size: 18px; }
@media (min-width: 760px) { .kpis:has(.kpi:nth-child(5)) { grid-template-columns: 1.4fr repeat(4, 1fr); } }
.tag { white-space: nowrap; }
.two > *, .three > *, .amountrow > * { min-width: 0; }
input[type=date] { min-width: 0; }
details.sub-edit.inner { margin: 12px 16px 0; }
details.sub-edit.inner > .form { padding: 4px 0 16px; }
details.med[open] { padding-bottom: 6px; }
.two > label, .three > label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.two > label.check, .three > label.check { flex-direction: row; align-items: center; }
.sug { flex-wrap: wrap; }
.sug .inline-form { margin-left: auto; }

/* Anahtar alanları: tarayıcı kayıtlı panel şifresini buraya doldurmasın diye password değil, maskeli metin */
.secret { -webkit-text-security: disc; text-security: disc; font-family: ui-monospace, monospace; }
.secret::placeholder { font-family: inherit; }


/* 8 Ekim denetimi: uzun bağlantı/kodlar kutudan taşıp sayfayı yatay kaydırıyordu (takvim adresi) */
.row-between > * { min-width: 0; }
.row-between a, .row-between code, .plain a, code { overflow-wrap: anywhere; }
/* Görev satırı: başlık üstte, işlemler altta tek satır */
.task-row { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
.task-row:last-of-type { border-bottom: 0; }
.postpone { display: inline-block; }
.postpone > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.postpone > summary::-webkit-details-marker { display: none; }
.postpone[open] > form { display: flex; gap: 6px; margin-top: 6px; }

/* Katlanır kartlar (Ayarlar): başlık dokunulabilir, kapalıyken yalnızca başlık görünür */
section.fold > h2 { cursor: pointer; display: flex; justify-content: space-between; align-items: center; margin-bottom: 0; }
section.fold > h2::after { content: "▾"; color: var(--muted, #888); font-size: .9em; transition: transform .15s; }
section.fold.folded > h2::after { transform: rotate(-90deg); }
section.fold:not(.folded) > h2 { margin-bottom: 12px; }
section.fold.folded > :not(h2) { display: none; }

/* Finans sekmeleri ve menü listeleri (8 Ekim sadeleştirme) */
.subtabs { display: flex; gap: 6px; overflow-x: auto; margin: -4px 0 14px; padding-bottom: 2px; }
.subtabs a { flex: 0 0 auto; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line);
  color: inherit; text-decoration: none; font-size: 13.5px; background: var(--card, transparent); }
.subtabs a.on { background: var(--ink, #111); color: var(--bg, #fff); border-color: transparent; }
.linklist li { padding: 0; }
.linklist a { display: flex; gap: 8px; align-items: baseline; padding: 11px 0; color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--line); }
.linklist li:last-child a { border-bottom: 0; }
details.more-sections > summary { cursor: pointer; list-style: none; }
details.more-sections > summary::-webkit-details-marker { display: none; }
details.more-sections[open] > summary { margin-bottom: 8px; }
/* Satır içi düğme formu sıkışmasın ve kartın dışına itilmesin; metin daralsın (Plan → etkinlik "İptal") */
.row-between > form, .row-between > .row-actions, .row-between > .badge { flex-shrink: 0; }
/* Rozet (nowrap) sıkışınca metni kartın dışına taşıyordu: /entegrasyonlar telefonda 397 px (15 Ekim) */
.row-between > span:first-child, .row-between > div:first-child { flex: 1 1 auto; }
/* Sistem listesinde .plain li çizgisi + bağlantı çizgisi çift görünüyordu */
.linklist li { border: 0 !important; }

/* =====================================================================================
   8 Ekim 2026 yeniden tasarım ("Core yeni arayüz" taslağı): sakin gri zemin, beyaz kartlar,
   tek vurgu (koyu deniz yeşili), Manrope. Mevcut değişkenler ezilir; tüm sayfalar birlikte değişir.
   ===================================================================================== */
:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #eef0f2; --line: #e4e7eb;
  --ink: #101418; --ink-2: #4a525c; --ink-3: #5b6470;
  --accent: #0b6e5b; --accent-ink: #ffffff; --bar-track: #eef0f2;
  --good: #0b6e5b; --good-ink: #0b6e5b; --warning-ink: #9a4a07; --critical: #b4231a;
  --radius: 20px; --shadow: none;
  --font: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body { font-weight: 500; }
h1 { font-weight: 800; letter-spacing: -0.02em; }
.card { border-radius: var(--radius); padding: 18px; }
.btn { border-radius: 14px; font-weight: 700; }
.pills a { font-weight: 600; }
.pills a.on { background: var(--ink); color: var(--bg); border-color: transparent; }

/* Sayfa başı: küçük üst satır + büyük başlık */
.eyebrow { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-3); letter-spacing: 0.02em; }
.display { font-size: 28px; line-height: 1.15; }
.today-head { align-items: flex-end; }
.btn.ink { background: var(--ink); color: var(--bg); border-color: transparent; }
.btn.pill { border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; }
.h-strong { font-size: 16px; font-weight: 800; color: var(--ink); margin: 0; }
.cardhead a.small { color: var(--accent); font-weight: 700; }

/* Para durumu: koyu kart, toplam + hesap ayrımı + ay sonu tahmini */
.money-card { display: flex; flex-direction: column; gap: 4px; background: var(--money-bg); color: #fff;
  border-radius: 22px; padding: 20px; margin-bottom: 14px; }

.money-card .eyebrow, .money-sub { color: #a9b2bc; }
.money-sub { font-size: 12.5px; font-weight: 500; display: block; }
.money-total { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.money-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.money-acc { background: rgb(255 255 255 / 0.07); border-radius: 14px; padding: 12px 14px; display: flex;
  flex-direction: column; gap: 4px; color: #fff; }
.money-acc span { font-size: 12.5px; color: #a9b2bc; font-weight: 600; }
.money-acc b { font-size: 19px; font-weight: 800; }
.money-forecast { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid rgb(255 255 255 / 0.12); color: #fff; }
.money-forecast > span > span:first-child { font-size: 13px; font-weight: 700; color: #a9b2bc; }
.money-forecast b { font-size: 19px; font-weight: 800; color: #7fd6c2; white-space: nowrap; }

/* Dikkat satırı (onay bekleyen, ilaç) */
.alert-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.alert-row.warning, .alert-row.critical { background: var(--alert-bg); border-color: var(--alert-line); color: var(--ink); }

.alert-row > span:nth-child(2) { flex: 1; }
.alert-row .chev { color: var(--ink-3); font-size: 20px; }

/* Ay özeti: üç sayı */
.stat3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 4px; }
.stat3 > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat3 .label { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.stat3 b { font-size: 18px; font-weight: 800; }
.dbar.today .fill { background: var(--accent); }

/* Yaklaşanlar */
.upcoming > li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; }
.upcoming > li:first-child { border-top: 0; }
.date-chip { flex: 0 0 48px; text-align: center; font-size: 12px; font-weight: 800; color: var(--ink-3); line-height: 1.2; }
.upcoming .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.upcoming .grow b { font-weight: 700; }

/* Alt menü: 5 sekme, ortadaki + kalktı (Kayıt düğmesi sayfa başında) */
.tabbar a { font-weight: 600; font-size: 11.5px; }
.tabbar a.on { font-weight: 800; }

.monthnav-inline { display: inline-flex; align-items: center; gap: 4px; }
.monthnav-inline a { display: inline-grid; place-items: center; min-width: 32px; min-height: 32px; font-size: 18px; color: var(--ink-2); }

/* Günlük çubuklar gri, bugün vurgulu (taslak) */
.daily .dbar .fill { background: var(--bar-muted); }
.daily .dbar.today .fill { background: var(--accent); }

/* İşlemler filtreleri: arama tam genişlik, seçimler tek satırda hap */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters input[type=search], .filters input[name=q] { flex: 1 1 100%; min-height: 48px; border-radius: 14px; }
.filters select { flex: 1 1 0; min-width: 0; min-height: 38px; padding: 0 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background-color: var(--surface); }

/* =====================================================================================
   Tema (9 Ekim): html[data-theme] = "light" | "dark" | yok (otomatik: telefona uyar),
   html[data-accent] = vurgu rengi. Seçim cihazda saklanır (Daha fazla → Görünüm).
   Egemen: "yeni arayüz güzel ama sadece dark var, birkaç seçenek yap".
   ===================================================================================== */
:root { color-scheme: light; --money-bg: #101418; --alert-bg: #fff4e5; --alert-line: #f3d3a6; --bar-muted: #9aa3ad;
        --alt: #1c5cab; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1114; --surface: #171b20; --surface-2: #20262d; --line: #262c33;
  --ink: #f2f4f6; --ink-2: #c4cbd2; --ink-3: #a9b2bc;
  --accent: #3cc7a5; --accent-ink: #0e1114; --bar-track: #20262d;
  --good: #3cc7a5; --good-ink: #3cc7a5; --warning-ink: #f0a54a; --critical: #f07167;
  --money-bg: #1d242b; --alert-bg: #2b2116; --alert-line: #5a4122; --bar-muted: #4a525c; --alt: #6da7ec;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1114; --surface: #171b20; --surface-2: #20262d; --line: #262c33;
    --ink: #f2f4f6; --ink-2: #c4cbd2; --ink-3: #a9b2bc;
    --accent: #3cc7a5; --accent-ink: #0e1114; --bar-track: #20262d;
    --good: #3cc7a5; --good-ink: #3cc7a5; --warning-ink: #f0a54a; --critical: #f07167;
    --money-bg: #1d242b; --alert-bg: #2b2116; --alert-line: #5a4122; --bar-muted: #4a525c; --alt: #6da7ec;
  }
}
/* Vurgu renkleri (açık / koyu) — metin ve düğmede 4.5:1 kontrast */
:root[data-accent="mavi"] { --accent: #1f5fbf; }
:root[data-accent="mor"] { --accent: #6b3fb5; }
:root[data-accent="turuncu"] { --accent: #b4531a; }
:root[data-accent="grafit"] { --accent: #2e3640; }
:root[data-theme="dark"][data-accent="mavi"] { --accent: #6aa6ff; }
:root[data-theme="dark"][data-accent="mor"] { --accent: #b294ff; }
:root[data-theme="dark"][data-accent="turuncu"] { --accent: #ff9b54; }
:root[data-theme="dark"][data-accent="grafit"] { --accent: #c4cbd2; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"])[data-accent="mavi"] { --accent: #6aa6ff; }
  :root:not([data-theme="light"])[data-accent="mor"] { --accent: #b294ff; }
  :root:not([data-theme="light"])[data-accent="turuncu"] { --accent: #ff9b54; }
  :root:not([data-theme="light"])[data-accent="grafit"] { --accent: #c4cbd2; }
}
/* Görünüm seçici */
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--surface-2);
  border-radius: 14px; }
.seg button { min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2);
  font: 700 13.5px var(--font); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }
.swatches { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.swatches button { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--surface); outline: 2px solid transparent;
  cursor: pointer; }
.swatches button[aria-pressed="true"] { outline-color: var(--ink); }

/* Masaüstü (9 Ekim: "webde de düzgün görünmeli"): Bugün sayfası geniş ve iki sütun; telefonda tek sütun */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 18px; }
@media (min-width: 1000px) {
  .wrap.wide { max-width: 1180px; }
  .dash-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
  .topbar { padding-left: max(16px, calc((100% - 1180px) / 2 + 16px)); padding-right: max(16px, calc((100% - 1180px) / 2 + 16px)); }
}
@media (min-width: 760px) {
  .display { font-size: 32px; }
  .money-total { font-size: 42px; }
}

/* Haberler */
.news-list > li { display: flex; flex-direction: column; gap: 3px; padding: 12px 0; }
.news-list > li:first-child { border-top: 0; }
.news-list a b { font-weight: 700; line-height: 1.35; }
.news-sum { color: var(--ink-2); line-height: 1.45; }

/* =====================================================================================
   Ajanda (9 Ekim): hafta şeridi, gün listesi (gün boyu + saat saat), ay takvimi
   ===================================================================================== */
.agenda-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 18px; }
@media (min-width: 1000px) { .agenda-grid { grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); align-items: start; } }
.weekstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.weekstrip a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); min-height: 64px; }
.weekstrip a span { font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.weekstrip a b { font-size: 17px; font-weight: 800; }
.weekstrip a.today b { color: var(--accent); }
.weekstrip a.on { background: var(--ink); border-color: var(--ink); }
.weekstrip a.on span, .weekstrip a.on b { color: var(--bg); }
.weekstrip .dots { display: flex; gap: 3px; height: 5px; }
.weekstrip .dots em { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.weekstrip a.on .dots em { background: var(--bg); }
.agenda-list > li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 0; }
.agenda-list > li:first-child { border-top: 0; }
.agenda-list .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agenda-list .grow b { font-weight: 700; }
.ag-time { flex: 0 0 52px; font-size: 13px; font-weight: 800; color: var(--ink-2); text-align: center; display: flex; flex-direction: column; }
.ag-time small { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.timeline > li:not(.now-line) { border-left: 3px solid var(--line); padding-left: 10px; margin-left: 2px; }
.timeline > li.ag-ev { border-left-color: var(--accent); }
.timeline > li.ag-hl { border-left-color: #c2410c; }
.timeline > li.ag-rm { border-left-color: #7c3aed; }
.timeline > li.ag-tk { border-left-color: var(--ink-3); }
.agenda-list li.done .grow b { text-decoration: line-through; color: var(--ink-3); }
.agenda-list li.past { opacity: .6; }
.agenda-list .pay-form { flex: none; margin-left: 6px; }
.agenda-list .pay-form .btn { padding: 4px 10px; font-size: 12.5px; }
.now-line { min-height: 0 !important; padding: 2px 0 !important; color: var(--critical); font-size: 11.5px; font-weight: 800;
  border-top: 2px solid var(--critical) !important; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 12px; text-align: center; }
.mg-head { font-size: 11px; font-weight: 800; color: var(--ink-3); padding-bottom: 4px; }
.mg-day { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; font-weight: 700; font-size: 14px; }
.mg-day:hover { background: var(--surface-2); }
.mg-day.today { color: var(--accent); }
.mg-day.on { background: var(--ink); color: var(--bg); }
.mg-day i { position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.mg-day.on i { background: var(--bg); }

/* =====================================================================================
   Notlar (9 Ekim): Keep benzeri kartlar. 12 renk, açık/koyu ayrı tonlar.
   ===================================================================================== */
:root {
  --n-yok: var(--surface); --n-kirmizi: #faafa8; --n-turuncu: #f39f76; --n-sari: #fff8b8; --n-yesil: #e2f6d3;
  --n-turkuaz: #b4ddd3; --n-mavi: #d4e4ed; --n-lacivert: #aeccdc; --n-mor: #d3bfdb; --n-pembe: #f6e2dd;
  --n-kum: #e9e3d4; --n-gri: #efeff1;
}
:root[data-theme="dark"] {
  --n-kirmizi: #77172e; --n-turuncu: #692b17; --n-sari: #7c4a03; --n-yesil: #264d3b; --n-turkuaz: #0c625d;
  --n-mavi: #256377; --n-lacivert: #284255; --n-mor: #472e5b; --n-pembe: #6c394f; --n-kum: #4b443a; --n-gri: #2d2e30;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --n-kirmizi: #77172e; --n-turuncu: #692b17; --n-sari: #7c4a03; --n-yesil: #264d3b; --n-turkuaz: #0c625d;
    --n-mavi: #256377; --n-lacivert: #284255; --n-mor: #472e5b; --n-pembe: #6c394f; --n-kum: #4b443a; --n-gri: #2d2e30;
  }
}
.note-c-yok { --nc: var(--n-yok); } .note-c-kirmizi { --nc: var(--n-kirmizi); } .note-c-turuncu { --nc: var(--n-turuncu); }
.note-c-sari { --nc: var(--n-sari); } .note-c-yesil { --nc: var(--n-yesil); } .note-c-turkuaz { --nc: var(--n-turkuaz); }
.note-c-mavi { --nc: var(--n-mavi); } .note-c-lacivert { --nc: var(--n-lacivert); } .note-c-mor { --nc: var(--n-mor); }
.note-c-pembe { --nc: var(--n-pembe); } .note-c-kum { --nc: var(--n-kum); } .note-c-gri { --nc: var(--n-gri); }

.note-search input { width: 100%; min-height: 48px; border-radius: 14px; margin-bottom: 12px; }
.note-compose { background: var(--nc, var(--surface)); border: 1px solid var(--line); border-radius: 18px; padding: 10px 14px;
  margin: 0 auto 20px; max-width: 640px; box-shadow: 0 1px 3px rgb(0 0 0 / .06); }
.note-compose input, .note-compose textarea { width: 100%; border: 0 !important; background: transparent !important; box-shadow: none !important;
  padding: 6px 2px; font: 600 15px var(--font); color: var(--ink); resize: none; outline: none; min-height: 0; }
.note-compose .nc-title { font-weight: 800; display: none; }
.note-compose.open .nc-title, .note-compose.open .nc-bar { display: flex; }
.note-compose .nc-bar { display: none; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.note-compose .nc-bar .palette { flex: 1 1 100%; }
.note-compose #note-mic.live { background: var(--critical); color: #fff; border-color: var(--critical); }
.note-compose #mic-state { margin: 6px 0 0; }
/* not-compose kapalıyken bile sesle not düğmesi görünsün (mobilde hızlı erişim) */
.note-compose:not(.open) .nc-bar { display: flex; }
.note-compose:not(.open) .nc-bar .palette, .note-compose:not(.open) .nc-bar .primary { display: none; }

.palette { display: flex; flex-wrap: wrap; gap: 6px; }
.palette .dot { width: 28px; height: 28px; border-radius: 50%; padding: 0; border: 2px solid var(--line); background: var(--nc); cursor: pointer; }
.palette .dot.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--bg) inset; }
.palette .dot.note-c-yok { background: var(--surface); }

.note-group { font-size: 12px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin: 8px 4px 10px; }
.note-grid { columns: 2 160px; column-gap: 12px; margin-bottom: 18px; }
@media (min-width: 760px) { .note-grid { columns: 4 220px; } }
.note { break-inside: avoid; margin: 0 0 12px; background: var(--nc); border: 1px solid var(--line); border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden; }
.note:not(.note-c-yok) { border-color: transparent; }
.note-open { all: unset; cursor: pointer; display: block; padding: 14px 14px 6px; }
.note-open h3 { margin: 0 0 6px; font-size: 15px; font-weight: 800; color: var(--ink); }
.note-open p { margin: 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink);
  max-height: 16em; overflow: hidden; }
.note-meta { display: block; margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.note-actions { display: flex; gap: 2px; padding: 0 6px 6px; opacity: .85; }
.note-actions form { margin: 0; }
.note-actions button, .note-actions summary { all: unset; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; font-size: 15px; }
.note-actions button:hover, .note-actions summary:hover { background: rgb(0 0 0 / .08); }
.color-pop { position: relative; }
.color-pop > summary::-webkit-details-marker { display: none; }
.color-pop[open] .palette { position: absolute; z-index: 5; bottom: 40px; left: -40px; width: 196px; padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 24px rgb(0 0 0 / .18); }
.note-dialog { border: 0; border-radius: 20px; padding: 16px; width: min(560px, calc(100vw - 32px)); background: var(--nc, var(--surface));
  color: var(--ink); box-shadow: 0 12px 40px rgb(0 0 0 / .3); }
.note-dialog::backdrop { background: rgb(0 0 0 / .45); }
.note-dialog form { display: flex; flex-direction: column; gap: 10px; }
.note-dialog input, .note-dialog textarea { width: 100%; border: 0; background: transparent; color: var(--ink); font: 600 15px var(--font);
  outline: none; padding: 4px 2px; resize: vertical; }
.note-dialog input { font-weight: 800; font-size: 17px; }
#note-edit-form { background: var(--nc, var(--surface)); border-radius: 14px; padding: 12px; margin: -6px; }

/* Reformer devam şeridi (15 Ekim) */
.rf-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.rf { font-size: 12.5px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.rf.ok { background: color-mix(in srgb, var(--good-ink) 12%, transparent); color: var(--good-ink); border-color: transparent; }
.rf.no { background: color-mix(in srgb, var(--critical) 12%, transparent); color: var(--critical); border-color: transparent; }
.rf.q { border-style: dashed; }
.rf.next { color: var(--ink-3); }
