/* Onay Paneli — iOS/Apple benzeri, erişilebilir arayüz */

:root {
  --brand: #2a5aa5;
  --tint: var(--brand);
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #f2f2f7;
  --fill: rgba(120, 120, 128, .12);
  --fill-strong: rgba(120, 120, 128, .2);
  --separator: rgba(60, 60, 67, .18);
  --label: #1c1c1e;
  --label-2: rgba(60, 60, 67, .72);
  --label-3: rgba(60, 60, 67, .45);
  --green: #1e8e3e;
  --green-bg: rgba(52, 199, 89, .16);
  --orange: #b25000;
  --orange-bg: rgba(255, 149, 0, .16);
  --red: #d70015;
  --red-bg: rgba(255, 59, 48, .13);
  --blue: #0a60d0;
  --blue-bg: rgba(10, 132, 255, .13);
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px rgba(0, 0, 0, .06);
  --tabbar-h: 58px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
    --tint: color-mix(in srgb, var(--brand) 55%, #ffffff);
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --fill: rgba(120, 120, 128, .24);
    --fill-strong: rgba(120, 120, 128, .36);
    --separator: rgba(84, 84, 88, .65);
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, .7);
    --label-3: rgba(235, 235, 245, .4);
    --green: #4cd964;
    --green-bg: rgba(48, 209, 88, .2);
    --orange: #ffb340;
    --orange-bg: rgba(255, 159, 10, .2);
    --red: #ff6961;
    --red-bg: rgba(255, 69, 58, .2);
    --blue: #64a8ff;
    --blue-bg: rgba(10, 132, 255, .22);
    --shadow: none;
    color-scheme: dark;
  }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tint: color-mix(in srgb, var(--brand) 55%, #ffffff);
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --fill: rgba(120, 120, 128, .24);
    --fill-strong: rgba(120, 120, 128, .36);
    --separator: rgba(84, 84, 88, .65);
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, .7);
    --label-3: rgba(235, 235, 245, .4);
    --green: #4cd964;
    --green-bg: rgba(48, 209, 88, .2);
    --orange: #ffb340;
    --orange-bg: rgba(255, 159, 10, .2);
    --red: #ff6961;
    --red-bg: rgba(255, 69, 58, .2);
    --blue: #64a8ff;
    --blue-bg: rgba(10, 132, 255, .22);
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--label);
  font: 17px/1.45 var(--font);
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--tint); }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--tint) 70%, transparent); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--surface); color: var(--label); padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; }
.ic { width: 24px; height: 24px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 18px; height: 18px; }

/* ------------------------------------------------ iskelet */
.app { min-height: 100vh; }
.side {
  position: fixed; inset: 0 auto 0 0; width: 264px; padding: 22px 14px;
  background: var(--surface); border-right: 1px solid var(--separator);
  display: flex; flex-direction: column; gap: 18px; z-index: 20;
}
.side .home { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--label); font-weight: 700; font-size: 19px; padding: 4px 8px; }
.appicon { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(145deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #32ae75)); display: grid; place-items: center; color: #fff; flex: none; }
.appicon .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 10px;
  color: var(--label); text-decoration: none; font-weight: 500;
}
.nav a .ic { color: var(--tint); }
.nav a:hover { background: var(--fill); }
.nav a[aria-current="page"] { background: color-mix(in srgb, var(--tint) 14%, transparent); color: var(--tint); font-weight: 600; }
.side .foot { margin-top: auto; display: grid; gap: 6px; padding: 0 8px; font-size: 14px; color: var(--label-2); }
.clientpick { display: grid; gap: 6px; padding: 0 8px; }
.clientpick label { font-size: 13px; color: var(--label-2); font-weight: 500; }
select.pill, .pillsel {
  appearance: none; -webkit-appearance: none; min-height: 44px; padding: 10px 38px 10px 14px; border-radius: 12px;
  border: 0; background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  font-weight: 600; width: 100%;
}

main { margin-left: 264px; padding: 34px 40px 60px; max-width: 1340px; }
.tabbar { display: none; }

/* ------------------------------------------------ sayfa başlığı */
.pagehead { margin-bottom: 18px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.pagehead h1 { font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -.025em; }
.pagehead p { color: var(--label-2); margin-top: 6px; max-width: 60ch; }
.mobilebar { display: none; }

.monthbar { display: flex; align-items: center; gap: 6px; margin: 4px 0 18px; }
.monthbar h2 { font-size: 22px; font-weight: 700; min-width: 170px; text-align: center; letter-spacing: -.015em; }
.iconbtn {
  width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--fill); color: var(--tint);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.iconbtn:disabled { color: var(--label-3); cursor: default; }
.iconbtn:not(:disabled):hover { background: var(--fill-strong); }

/* ------------------------------------------------ düğmeler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 12px; border: 0; cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap;
  background: var(--tint); color: #fff;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.green { background: var(--green); }
.btn.gray { background: var(--fill); color: var(--tint); }
.btn.gray.danger, .btn.plain.danger { color: var(--red); }
.btn.plain { background: transparent; color: var(--tint); padding-left: 10px; padding-right: 10px; }
.btn.wide { width: 100%; }
.btn.lg { min-height: 50px; font-size: 17px; border-radius: 14px; }
.btn .ic { width: 20px; height: 20px; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.btnrow > .btn { flex: 1 1 160px; }

/* ------------------------------------------------ özet kutucukları ve segment */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--surface); border-radius: var(--radius); padding: 14px 16px; border: 0; text-align: left; cursor: pointer;
  box-shadow: var(--shadow); display: grid; gap: 2px; min-height: 84px;
}
.stat b { font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.stat span { font-size: 15px; color: var(--label-2); font-weight: 500; }
.stat.wait b { color: var(--orange); }
.stat.rev b { color: var(--red); }
.stat.ok b { color: var(--green); }
.stat.pub b { color: var(--blue); }
.stat[aria-pressed="true"] { outline: 2.5px solid var(--tint); outline-offset: -2.5px; }

.segmented { display: flex; background: var(--fill); border-radius: 11px; padding: 3px; gap: 2px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
  flex: 1 0 auto; min-height: 36px; border: 0; background: transparent; border-radius: 8px; padding: 6px 14px;
  font-size: 15px; font-weight: 500; cursor: pointer; color: var(--label);
}
.segmented button[aria-pressed="true"] { background: var(--surface); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
:root[data-theme="dark"] .segmented button[aria-pressed="true"] { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .segmented button[aria-pressed="true"] { background: #636366; } }

.callout { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 22px; box-shadow: var(--shadow); }
.callout p { color: var(--label-2); }

/* ------------------------------------------------ içerik ızgarası */
.week { margin-bottom: 28px; }
.week h3 { font-size: 20px; font-weight: 700; margin: 0 0 12px; letter-spacing: -.015em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border-radius: var(--radius); border: 0; padding: 0; overflow: hidden; cursor: pointer;
  text-align: left; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .18s ease;
}
.card:hover { transform: translateY(-2px); }
.card:active { transform: scale(.985); }
.thumb { aspect-ratio: 4 / 5; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card .meta { padding: 10px 12px 14px; display: grid; gap: 6px; }
.when { font-size: 14px; color: var(--label-2); display: flex; justify-content: space-between; gap: 6px; }
.kind { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--tint); }
.card .title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.muted { color: var(--label-2); font-size: 14px; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-onay_bekliyor, .st-talep { color: var(--orange); background: var(--orange-bg); }
.st-revize, .st-hata, .st-reddedildi { color: var(--red); background: var(--red-bg); }
.st-onaylandi, .st-tamamlandi { color: var(--green); background: var(--green-bg); }
.st-yayinlaniyor, .st-yayinlandi, .st-yayinda { color: var(--blue); background: var(--blue-bg); }
.st-iptal { color: var(--label-2); background: var(--fill); }

.empty { text-align: center; color: var(--label-2); padding: 56px 20px; background: var(--surface); border-radius: var(--radius); }
.empty .ic { width: 40px; height: 40px; color: var(--label-3); margin-bottom: 8px; }

/* ------------------------------------------------ gruplu listeler (iOS inset grouped) */
.section { margin-bottom: 30px; }
.section > h2 { font-size: 22px; font-weight: 700; margin: 0 0 10px; letter-spacing: -.015em; }
.section > .foot { font-size: 13px; color: var(--label-2); margin: 8px 4px 0; }
.group { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.group > .item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 52px; position: relative; }
.group > .item + .item::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 1px solid var(--separator); }
.item .grow { flex: 1; min-width: 0; }
.item .sub { font-size: 14px; color: var(--label-2); }
.item .ttl { font-weight: 600; }
.pad { padding: 16px; display: grid; gap: 14px; }

label.field { display: grid; gap: 6px; font-size: 15px; font-weight: 600; }
label.field small { font-weight: 400; color: var(--label-2); }
.input, textarea.input, select.input {
  width: 100%; min-height: 44px; border-radius: 11px; border: 1px solid var(--separator); background: var(--surface);
  padding: 10px 12px; font-size: 17px;
}
textarea.input { min-height: 120px; resize: vertical; line-height: 1.45; }
.input:focus { outline: 3px solid color-mix(in srgb, var(--tint) 35%, transparent); border-color: var(--tint); }
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw .eye { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: transparent; color: var(--label-2); cursor: pointer; display: grid; place-items: center; border-radius: 10px; }
.pw .eye:hover { color: var(--label); }
.err { color: var(--red); font-size: 15px; min-height: 1.2em; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 36px; border: 0; background: var(--fill); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 500; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--tint); color: #fff; }
.total { font-size: 17px; }
.total b { font-size: 22px; }

/* ------------------------------------------------ alt sayfa (sheet) */
dialog#sheet {
  border: 0; padding: 0; width: min(1080px, 96vw); max-width: 96vw; height: min(92vh, 1000px); max-height: 92vh;
  border-radius: var(--radius-lg); background: var(--bg); color: var(--label); overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
}
dialog#sheet.narrow { width: min(640px, 96vw); }
dialog::backdrop { background: rgba(0, 0, 0, .42); }
.sheet { display: flex; flex-direction: column; height: 100%; }
.sheethead {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 8px 10px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--separator); min-height: 56px; flex: none;
}
.sheethead .title { font-weight: 600; text-align: center; }
.sheethead .left { justify-self: start; }
.sheethead .right { justify-self: end; display: flex; gap: 6px; }
.grabber { display: none; }
.sheetbody { flex: 1; min-height: 0; overflow: auto; }
.postview { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100%; }
.postview .media { background: var(--surface-2); display: grid; place-items: center; padding: 24px; position: sticky; top: 0; height: calc(min(92vh, 1000px) - 57px); }
.postview .media img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; box-shadow: var(--shadow); }
.postview .info { padding: 20px 22px 32px; display: grid; gap: 22px; align-content: start; }
.postview h2 { font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; margin-top: 8px; }
.note { background: var(--surface); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.note.warn { background: var(--orange-bg); }
.note.bad { background: var(--red-bg); }
.subhead { font-size: 13px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .04em; margin: 0 4px 8px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { padding: 10px 16px; position: relative; font-size: 15px; }
.timeline li + li::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 1px solid var(--separator); }
.timeline small { color: var(--label-2); display: block; font-size: 13px; }
.timeline p { white-space: pre-wrap; margin-top: 2px; }
.timeline .k-revize small { color: var(--red); }
.timeline .k-onay small { color: var(--green); }

.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.picker button { border: 0; padding: 0; background: var(--surface-2); border-radius: 10px; overflow: hidden; cursor: pointer; position: relative; aspect-ratio: 4 / 5; }
.picker img { width: 100%; height: 100%; object-fit: contain; display: block; }
.picker button[aria-pressed="true"] { outline: 3px solid var(--tint); outline-offset: 2px; }
.picker button[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--tint); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.adthumb { width: 56px; height: 70px; object-fit: contain; border-radius: 8px; background: var(--surface-2); flex: none; }

/* ------------------------------------------------ kurumsal kimlik */
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.logo { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.logo .pv { height: 140px; display: grid; place-items: center; padding: 22px; background: #ffffff; }
.logo .pv.koyu { background: #1c3f78; }
.logo .pv img { max-height: 70px; }
.logo .ft { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 12px 16px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.swatch { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 0; padding: 0; text-align: left; cursor: pointer; }
.swatch .chipc { height: 84px; border-bottom: 1px solid var(--separator); }
.swatch .tx { padding: 10px 14px 14px; display: grid; gap: 2px; }
.swatch code { font: 600 15px ui-monospace, "SF Mono", Menlo, monospace; }
.typo { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: grid; gap: 10px; }
.typo .aa { font-family: Poppins, var(--font); font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: 0; }
.typo .glyphs { font-family: Poppins, var(--font); font-size: 20px; letter-spacing: 0; }
.rules { list-style: none; margin: 0; padding: 0; }
.rules li { display: flex; gap: 12px; padding: 12px 16px; position: relative; align-items: flex-start; }
.rules li + li::before { content: ""; position: absolute; top: 0; left: 50px; right: 0; border-top: 1px solid var(--separator); }
.rules .ic { margin-top: 1px; }
.rules.yes .ic { color: var(--green); }
.rules.no .ic { color: var(--red); }

/* ------------------------------------------------ giriş */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login form { width: min(400px, 100%); display: grid; gap: 16px; }
.login .appicon { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 4px; }
.login .appicon .ic { width: 34px; height: 34px; }
.login h1 { text-align: center; font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.login .lead { text-align: center; color: var(--label-2); margin-top: -8px; }

#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); z-index: 60;
  background: rgba(30, 30, 32, .92); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: .22s ease; max-width: calc(100vw - 32px); backdrop-filter: blur(12px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: #c4150f; }

/* ------------------------------------------------ telefon */
@media (max-width: 899px) {
  body { font-size: 17px; }
  .side { display: none; }
  main { margin: 0; padding: 12px 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 28px); }
  .mobilebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; margin-bottom: 4px; }
  .mobilebar select.pill { width: auto; max-width: 70vw; }
  .pagehead h1 { font-size: 32px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(var(--tabs, 5), 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 4px 4px env(safe-area-inset-bottom); min-height: var(--tabbar-h);
    background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--separator);
  }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 50px; text-decoration: none; color: var(--label-3); font-size: 11px; font-weight: 600; letter-spacing: 0; border-radius: 10px; }
  .tabbar a .ic { width: 26px; height: 26px; }
  .tabbar a[aria-current="page"] { color: var(--tint); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .monthbar h2 { min-width: 0; flex: 1; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card .title { font-size: 14px; }
  #toast { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px); }
  dialog#sheet, dialog#sheet.narrow {
    width: 100vw; max-width: 100vw; height: calc(100dvh - 10px); max-height: none; margin: auto 0 0;
    border-radius: 14px 14px 0 0;
  }
  .grabber { display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--fill-strong); margin: 6px auto 0; flex: none; }
  .postview { grid-template-columns: 1fr; }
  .postview .media { position: static; height: auto; padding: 16px; }
  .postview .media img { max-height: 58vh; }
  .postview .info { padding: 16px 16px 40px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (prefers-contrast: more) { :root { --separator: rgba(60, 60, 67, .5); --label-2: rgba(60, 60, 67, .9); } }

/* ------------------------------------------------ hareket (iOS yay eğrileri) */
:root { --ease-ios: cubic-bezier(.32, .72, 0, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: scale(.94) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes modalOut { to { opacity: 0; transform: scale(.96) translateY(10px); } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { from { transform: translateY(var(--drag, 0px)); } to { transform: translateY(105%); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slideFromR { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes slideFromL { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes tabPop { 0% { transform: scale(1); } 35% { transform: scale(.8); } 70% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-9px); } 40%, 60% { transform: translateX(9px); } }

dialog#sheet[open] { animation: modalIn .34s var(--ease-ios); }
dialog#sheet[open]::backdrop { animation: fadeIn .3s ease; }
dialog#sheet.closing { animation: modalOut .22s ease forwards; }
dialog#sheet.closing::backdrop { animation: fadeOut .24s ease forwards; }
.sheetbody.swap { animation: fadeIn .22s ease; }

main.page-in { animation: pageIn .38s var(--ease-ios); }
#monthbody.from-r { animation: slideFromR .42s var(--ease-ios); }
#monthbody.from-l { animation: slideFromL .42s var(--ease-ios); }
.stagger .card { animation: cardIn .5s var(--ease-ios) both; animation-delay: calc(var(--i, 0) * 30ms); }
#weeks.swap { animation: fadeIn .25s ease; }

.btn, .chip, .iconbtn, .stat, .card, .segmented button, .swatch { transition: transform .14s ease, filter .2s ease, background-color .2s ease, opacity .2s ease; }
.btn:active:not(:disabled), .chip:active, .iconbtn:active:not(:disabled), .stat:active, .swatch:active { transform: scale(.96); }
.nav a, .tabbar a { transition: background-color .2s ease, color .2s ease; }
.nav a.pop .ic, .tabbar a.pop .ic { animation: tabPop .42s var(--ease-spring); }
.pill.pop { animation: pop .45s var(--ease-spring); }
.shake { animation: shake .45s ease; }
.login .appicon { animation: modalIn .6s var(--ease-spring); }

.segmented { position: relative; isolation: isolate; }
.segmented .thumb { position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 8px; background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); z-index: -1;
  transition: transform .38s var(--ease-ios), width .38s var(--ease-ios); }
.segmented .thumb.instant { transition: none; }
.segmented button[aria-pressed="true"] { background: transparent; box-shadow: none; }
:root[data-theme="dark"] .segmented .thumb { background: #636366; }
:root[data-theme="dark"] .segmented button[aria-pressed="true"] { background: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .segmented .thumb { background: #636366; } :root:not([data-theme="light"]) .segmented button[aria-pressed="true"] { background: transparent; } }

.thumb, .postview .media, .picker button, .logo .pv:not(.koyu) {
  background-image: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--label) 7%, transparent) 50%, transparent 70%);
  background-size: 250% 100%; animation: shimmer 1.3s linear infinite;
}
.thumb:has(img.ok), .postview .media:has(img.ok), .picker button:has(img.ok), .logo .pv:has(img.ok) { animation: none; background-image: none; }
.thumb img, .postview .media img, .picker img { opacity: 0; transition: opacity .4s ease, transform .4s var(--ease-ios); transform: scale(.985); }
.thumb img.ok, .postview .media img.ok, .picker img.ok { opacity: 1; transform: none; }
.stat b { font-variant-numeric: tabular-nums; }

@media (max-width: 899px) {
  dialog#sheet[open] { animation: sheetUp .5s var(--ease-ios); }
  dialog#sheet.closing { animation: sheetDown .32s cubic-bezier(.4, 0, 1, 1) forwards; }
  .grabber, .sheethead { touch-action: none; }
  .grabber { cursor: grab; }
}
@media (prefers-reduced-motion: reduce) {
  .thumb img, .postview .media img, .picker img { opacity: 1; transform: none; }
  .thumb, .postview .media, .picker button, .logo .pv { background-image: none; }
}

.side .foot .segmented { margin-bottom: 8px; }
.side .foot .segmented button { font-size: 13px; padding: 4px 6px; min-height: 32px; }
html { transition: background-color .3s ease; }
body, .side, .group, .card, .stat, .callout, .tabbar, .sheethead { transition: background-color .3s ease, color .3s ease, border-color .3s ease; }

/* ------------------------------------------------ FinAI yan sohbet */
.nav .navact, .tabbar .navact { font: inherit; border: 0; background: transparent; cursor: pointer; text-align: left; width: 100%; }
.nav .navact { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 10px; color: var(--label); font-weight: 500; }
.nav .navact .ic { color: var(--tint); }
.nav .navact:hover { background: var(--fill); }
.nav .navact[aria-expanded="true"] { background: color-mix(in srgb, var(--tint) 14%, transparent); color: var(--tint); font-weight: 600; }
.finaifab {
  position: fixed; right: 24px; bottom: 24px; z-index: 35; width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  color: #fff; background: linear-gradient(145deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #32ae75));
  box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 45%, transparent); display: grid; place-items: center;
  transition: transform .35s var(--ease-spring), opacity .25s ease;
}
.finaifab .ic { width: 28px; height: 28px; }
.finaifab:hover { transform: scale(1.07); }
.finaifab:active { transform: scale(.94); }
body.finai-open .finaifab { opacity: 0; transform: scale(.6); pointer-events: none; }

.finai {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 45;
  background: var(--bg); border-left: 1px solid var(--separator); box-shadow: -24px 0 70px rgba(0, 0, 0, .16);
  display: flex; flex-direction: column; transform: translateX(104%); visibility: hidden;
  transition: transform .46s var(--ease-ios), visibility 0s linear .46s;
}
.finai.open { transform: none; visibility: visible; transition: transform .46s var(--ease-ios), visibility 0s; }
.finai .grabber { display: none; }
.fhead { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; min-height: 64px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(20px); border-bottom: 1px solid var(--separator); }
.fhead h2 { font-size: 17px; font-weight: 700; }
.fhead .grow { flex: 1; min-width: 0; }
.fhead .sub { font-size: 13px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #32ae75)); }
.avatar .ic { width: 20px; height: 20px; }
.avatar.lg { width: 64px; height: 64px; margin: 0 auto 6px; }
.avatar.lg .ic { width: 34px; height: 34px; }
.flog { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.fwelcome { margin: auto 0; text-align: center; display: grid; gap: 8px; padding: 10px 6px; }
.fwelcome .chips { justify-content: center; margin-top: 8px; }
.fwelcome .chip { text-align: left; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 20px; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; animation: msgIn .34s var(--ease-spring) both; }
.msg p { margin: 0 0 8px; }
.msg p:last-of-type { margin-bottom: 0; }
.msg ul, .msg ol { margin: 4px 0 8px; padding-left: 20px; }
.msg li + li { margin-top: 3px; }
.msg.user { align-self: flex-end; background: var(--tint); color: #fff; border-bottom-right-radius: 6px; transform-origin: bottom right; }
.msg.ai { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 6px; box-shadow: var(--shadow); transform-origin: bottom left; }
.msg.err { background: var(--red-bg); color: var(--red); }
.msg .copy { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; border: 0; background: var(--fill); color: var(--label-2); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 30px; }
.msg .copy:hover { color: var(--label); }
.typing { display: inline-flex; gap: 5px; padding: 4px 2px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--label-3); animation: dot 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes msgIn { from { opacity: 0; transform: scale(.9) translateY(8px); } to { opacity: 1; transform: none; } }
.compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--separator); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(20px); }
.compose textarea { flex: 1; min-height: 44px; max-height: 160px; resize: none; border-radius: 22px; border: 1px solid var(--separator); background: var(--surface); padding: 11px 16px; font-size: 17px; line-height: 1.3; }
.compose textarea:focus { outline: 3px solid color-mix(in srgb, var(--tint) 35%, transparent); border-color: var(--tint); }
.send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--tint); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; transition: transform .15s ease, opacity .2s ease; }
.send .ic { stroke-width: 2.4; }
.send:active { transform: scale(.92); }
.send:disabled { opacity: .4; }

@media (min-width: 1200px) {
  main { transition: margin-right .46s var(--ease-ios); }
  body.finai-open main { margin-right: 440px; }
}
@media (max-width: 899px) {
  .finaifab { display: none; }
  .finai { top: auto; width: 100vw; height: calc(100dvh - 10px); border-left: 0; border-radius: 14px 14px 0 0; transform: translateY(104%); box-shadow: 0 -10px 40px rgba(0, 0, 0, .2); }
  .finai .grabber { display: block; }
  .tabbar .navact { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 50px; color: var(--label-3); font-size: 11px; font-weight: 600; text-align: center; border-radius: 10px; }
  .tabbar .navact .ic { width: 26px; height: 26px; }
  .tabbar .navact[aria-expanded="true"] { color: var(--tint); }
}
.fhist { display: grid; gap: 8px; }
.fhist .item.thread { padding: 4px 6px 4px 4px; }
.fhist .tbtn { display: grid; gap: 2px; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 10px; cursor: pointer; min-height: 52px; min-width: 0; }
.fhist .tbtn .ttl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fhist .tbtn:hover { background: var(--fill); }
.fhist .item.current .ttl { color: var(--tint); }
.fwelcome .btn.plain { justify-self: center; margin-top: 6px; }

/* ------------------------------------------------ görsel ekleri */
.att { display: flex; gap: 8px; flex-wrap: wrap; }
.att.fatt { padding: 8px 12px 0; background: color-mix(in srgb, var(--surface) 92%, transparent); border-top: 1px solid var(--separator); }
.att-item { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--surface-2); animation: msgIn .3s var(--ease-spring) both; }
.att-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .3s ease; }
.att-item.loading img { opacity: .45; }
.att-item.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid #fff; border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.att-x { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; }
.att-x .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.att-grid { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.att-grid a { display: block; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.att-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msg.user .att-grid { justify-content: flex-end; }
.compose .iconbtn { flex: none; }
.dropzone { position: absolute; inset: 64px 10px 10px; border: 2.5px dashed var(--tint); border-radius: 18px; display: none; place-items: center; align-content: center; gap: 8px;
  background: color-mix(in srgb, var(--tint) 10%, var(--bg)); color: var(--tint); font-weight: 600; pointer-events: none; z-index: 2; }
.dropzone .ic { width: 40px; height: 40px; }
.finai.dragging .dropzone { display: grid; animation: fadeIn .2s ease; }
