/* Sayes AI: müşteri sayfası. WhatsApp düzeninde sohbet arayüzü; açık ve koyu tema (WhatsApp Web renkleri). */

/* ---------- açık tema ---------- */
:root {
  color-scheme: light;
  --green: #25D366;
  --teal: #008069;
  --teal-2: #00A884;
  --teal-soft: #E7F8F1;
  --accent-ink: #008069;       /* yeşil metin (düğmeler, bağlantılar) */

  --bg-app: #FFFFFF;           /* liste, başlık (telefon) */
  --bg-panel: #F0F2F5;         /* başlık (bilgisayar), arama, alt çubuk */
  --bg-hover: #F5F6F6;
  --bg-active: #F0F2F5;
  --bg-input: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-sheet: #FFFFFF;
  --chat-bg: #EFEAE2;
  --doodle: #B9AE9C;
  --doodle-opacity: .32;

  --out: #D9FDD3;
  --in: #FFFFFF;
  --out-meta: #667781;
  --in-meta: #667781;
  --tick: #8696A0;
  --tick-blue: #53BDEB;

  --ink: #111B21;
  --ink-2: #3B4A54;
  --muted: #667781;
  --soft: #8696A0;
  --icon: #54656F;
  --line: #E9EDEF;
  --border: #DDE2E5;
  --link: #027EB5;

  --notice-bg: #FFF3C4;
  --notice-ink: #54656F;
  --notice-line: rgba(84, 101, 111, .16);
  --day-bg: #FFFFFF;
  --day-ink: #54656F;
  --chip-bg: #F0F2F5;
  --chip-ink: #54656F;
  --chip-on-bg: #D9FDD3;
  --chip-on-ink: #0B5D3B;
  --badge-bg: #25D366;
  --badge-ink: #FFFFFF;
  --track: #E6EAED;
  --err-bg: #FFF5F6;
  --ok-ink: #128C4F;

  --st-muted-bg: #EEF0F2; --st-muted-ink: #54656F;
  --st-info-bg: #E3F2FB;  --st-info-ink: #0B6BA8;
  --st-ok-bg: #DDF6E8;    --st-ok-ink: #0F7A45;
  --st-warn-bg: #FDF0D8;  --st-warn-ink: #9A5B00;
  --st-bad-bg: #FDE3E8;   --st-bad-ink: #B0002A;

  --st-pending-bg: #FFF4D6; --st-pending-ink: #A86A00;
  --st-partial-bg: #FDE6F1; --st-partial-ink: #C2185B;

  /* marka: logodaki yeşil degrade */
  --brand-grad: linear-gradient(135deg, #2AD99A 0%, #00A884 48%, #007A63 100%);
  --brand-glow: 0 12px 26px -12px rgba(0, 128, 105, .75);
  --glass: rgba(255, 255, 255, .8);

  --red: #EA0038;
  --bubble-shadow: 0 1px 1px rgba(11, 20, 26, .07), 0 2px 5px -2px rgba(11, 20, 26, .12);
  --panel-shadow: 0 14px 34px -14px rgba(11, 20, 26, .28), 0 2px 6px rgba(11, 20, 26, .05);
  --sheet-shadow: 0 24px 60px rgba(11, 20, 26, .22), 0 8px 18px rgba(11, 20, 26, .14);
  --backdrop: rgba(11, 20, 26, .45);
  --toast-bg: #2B3236;
  --toast-ink: #FFFFFF;

  /* WhatsApp'ın yazı tipleri: iPhone'da SF Pro, Android'de Roboto, bilgisayarda (WhatsApp Web) Segoe UI */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, "Lucida Grande", Arial, Ubuntu, Cantarell, "Fira Sans", sans-serif;
}

/* ---------- koyu tema (WhatsApp Web koyu renkleri) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent-ink: #00A884;
  --teal-soft: #0A332C;

  --bg-app: #111B21;
  --bg-panel: #202C33;
  --bg-hover: #202C33;
  --bg-active: #2A3942;
  --bg-input: #2A3942;
  --bg-card: #202C33;
  --bg-sheet: #233138;
  --chat-bg: #0B141A;
  --doodle: #FFFFFF;
  --doodle-opacity: .055;

  --out: #005C4B;
  --in: #202C33;
  --out-meta: rgba(255, 255, 255, .6);
  --in-meta: #8696A0;
  --tick: rgba(255, 255, 255, .6);

  --ink: #E9EDEF;
  --ink-2: #D1D7DB;
  --muted: #8696A0;
  --soft: #8696A0;
  --icon: #AEBAC1;
  --line: #222D34;
  --border: #3B4A54;
  --link: #53BDEB;

  --notice-bg: #182229;
  --notice-ink: #FFD279;
  --notice-line: rgba(255, 210, 121, .16);
  --day-bg: #182229;
  --day-ink: #8696A0;
  --chip-bg: #202C33;
  --chip-ink: #AEBAC1;
  --chip-on-bg: #0A332C;
  --chip-on-ink: #E7FCE3;
  --badge-bg: #00A884;
  --badge-ink: #111B21;
  --track: #2A3942;
  --err-bg: #3A1D24;
  --ok-ink: #25D366;

  --st-muted-bg: #2A3942; --st-muted-ink: #AEBAC1;
  --st-info-bg: #0E2A3B;  --st-info-ink: #53BDEB;
  --st-ok-bg: #0F3324;    --st-ok-ink: #25D366;
  --st-warn-bg: #3A2E12;  --st-warn-ink: #FFC24A;
  --st-bad-bg: #3D1A22;   --st-bad-ink: #F15C6D;

  --st-pending-bg: #3A3112; --st-pending-ink: #FFC24A;
  --st-partial-bg: #3B1830; --st-partial-ink: #F48FB1;

  --brand-grad: linear-gradient(135deg, #12A57F 0%, #0B7A63 50%, #075446 100%);
  --brand-glow: 0 12px 26px -12px rgba(0, 0, 0, .7);
  --glass: rgba(17, 27, 33, .82);

  --red: #F15C6D;
  --bubble-shadow: 0 1px 1px rgba(0, 0, 0, .3);
  --panel-shadow: 0 16px 36px -14px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .04);
  --sheet-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  --backdrop: rgba(0, 0, 0, .6);
  --toast-bg: #E9EDEF;
  --toast-ink: #111B21;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
/* sayfa sabit: yalnızca kaydırma; iki parmakla ve çift dokunuşla yakınlaşma yok, kenarlardan esneme yok */
html, body { touch-action: pan-x pan-y; overscroll-behavior: none; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.4; color: var(--ink); background: var(--bg-app); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--teal-2); outline-offset: 2px; }
svg { display: block; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- yerleşim: her ekranda uygulama gibi (liste ↔ sohbet); bilgisayarda ortada telefon genişliğinde ---------- */
.app { position: relative; height: 100vh; height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--bg-app); }
.side, .chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.app[data-view="list"] .chat { display: none; }
.app[data-view="chat"] .side { display: none; }

@media (min-width: 520px) {
  body { background: var(--bg-panel); }
  .app, .gate { max-width: 440px; margin: 0 auto; box-shadow: 0 0 0 1px var(--line), 0 12px 48px rgba(11, 20, 26, .14); }
}

/* ---------- liste üstü: başlık, arama, haklar, filtre ---------- */
.side { background: var(--bg-app); position: relative; }
.side-head { padding: calc(10px + env(safe-area-inset-top)) 16px 0; }
.side-top { display: flex; align-items: center; gap: 10px; min-height: 54px; }
.side-top .brand { flex: 1; min-width: 0; }
.brand-mark { flex-shrink: 0; width: 34px; height: 34px; border-radius: 11px; box-shadow: var(--brand-glow); }
.brand { font-size: 23px; font-weight: 800; color: var(--ink); letter-spacing: -0.035em; overflow-wrap: anywhere; line-height: 1.15; }

.round-btn { width: 40px; height: 40px; flex-shrink: 0; border: none; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--icon); transition: background-color .15s; }
.round-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.round-btn:hover { background: var(--bg-hover); }
.round-btn.spin svg { animation: spin .8s linear infinite; }
#menuBtn svg, #settingsBtn svg { fill: currentColor; stroke: none; }

/* yeni sohbet: sağ altta yeşil düğme (uygulamadaki gibi) */
.round-btn.fab {
  position: absolute; right: 18px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 5;
  width: 60px; height: 60px; border-radius: 20px; background: var(--brand-grad); color: #FFFFFF;
  box-shadow: 0 14px 28px -10px rgba(0, 128, 105, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.round-btn.fab svg { width: 26px; height: 26px; stroke-width: 2.2; }
.round-btn.fab:hover { background: var(--brand-grad); transform: translateY(-2px); }
.round-btn.fab:active { transform: scale(.94); }

.search { display: flex; align-items: center; gap: 10px; height: 44px; margin-top: 6px; padding: 0 14px; border-radius: 14px; background: var(--bg-panel); cursor: text; transition: box-shadow .15s; }
.search svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--icon); stroke-width: 2.2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; height: 100%; border: none; background: transparent; font-size: 16px; outline: none; color: var(--ink); }   /* 16px altı yazı kutusunda iPhone sayfayı büyütüyor */
.search input::placeholder { color: var(--soft); }
.search:focus-within { box-shadow: 0 0 0 1.5px var(--teal-2); }

/* "Your credits": marka renginde cüzdan kartı (açılır kapanır) */
.credits {
  position: relative; margin-top: 14px; border-radius: 20px; overflow: hidden; color: #FFFFFF;
  background: var(--brand-grad); box-shadow: var(--brand-glow);
}
.credits::before, .credits::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.credits::before { width: 190px; height: 190px; right: -60px; top: -90px; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 68%); }
.credits::after { width: 140px; height: 140px; left: -50px; bottom: -80px; background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%); }
.cr-title {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 14px 0 16px;
  border: none; background: transparent; text-align: left; color: #FFFFFF;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.cr-title:hover { background: rgba(255, 255, 255, .06); }
.cr-title > span:first-child { flex: 1; }
.cr-count { padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.cr-title svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: #FFFFFF; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.credits[data-open="true"] .cr-title svg { transform: rotate(180deg); }
.cr-body { position: relative; z-index: 1; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.credits[data-open="true"] .cr-body { grid-template-rows: 1fr; }
.cr-body > div { min-height: 0; overflow: hidden; }
.cr-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }
.cr {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 10px;
  border-radius: 14px; background: rgba(255, 255, 255, .15); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.cr > div { min-width: 0; max-width: 100%; }
.cr .ava.md { width: 28px; height: 28px; }
.cr .ava.md svg { width: 15px; height: 15px; }
.credits .ava.tint, :root[data-theme="dark"] .credits .ava.tint { background: #FFFFFF; color: var(--c); }
.cr b { display: block; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr small { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 500; color: rgba(255, 255, 255, .8); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr.off { opacity: .55; }

.seg { display: flex; gap: 8px; padding: 14px 0 8px; }
.seg-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 16px; border: none; border-radius: 999px;
  background: var(--chip-bg); color: var(--chip-ink); font-size: 14.5px; font-weight: 600; transition: background-color .15s, color .15s, box-shadow .15s;
}
.seg-btn[aria-selected="true"] { background: var(--chip-on-bg); color: var(--chip-on-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--teal-2) 35%, transparent); }

/* ---------- sohbet satırları ---------- */
.chats { flex: 1; overflow-y: auto; padding: 0 0 100px; overscroll-behavior: contain; }
.ci { display: flex; align-items: stretch; gap: 0; width: 100%; padding: 0 0 0 14px; border: none; background: var(--bg-app); text-align: left; transition: background-color .12s; }
.ci:hover { background: var(--bg-hover); }
.ci[aria-current="true"] { background: var(--bg-active); }
.ci > .ava { margin: 11px 14px 11px 0; align-self: center; }
/* kişi baş harfleri: renkli halka */
.ci > .ava.ini { box-shadow: 0 0 0 2px var(--bg-app), 0 0 0 3.5px color-mix(in srgb, var(--c) 40%, transparent); }
.ci-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.ci-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; min-width: 60px; padding: 15px 16px 13px 6px; border-bottom: 1px solid var(--line); }
.ci:last-child .ci-body, .ci:last-child .ci-end { border-bottom-color: transparent; }
.ci-name { font-size: 16.5px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-sub { display: flex; align-items: center; gap: 3px; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.ci-sub > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.ci-sub .draft { color: var(--teal-2); font-weight: 500; }
.ci-time { font-size: 12px; color: var(--muted); white-space: nowrap; line-height: 1.2; }
.ci.has-badge .ci-time { color: var(--teal-2); font-weight: 500; }
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--brand-grad); color: #FFFFFF; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  box-shadow: 0 3px 8px -3px rgba(0, 128, 105, .7);
}
.seg-btn .badge { min-width: 18px; height: 18px; font-size: 11px; background: var(--teal-2); color: #FFFFFF; }
.side-empty { padding: 40px 24px; text-align: center; color: var(--muted); font-size: 14.5px; }
.side-empty strong { display: block; color: var(--ink); font-size: 16px; font-weight: 500; margin-bottom: 4px; }
.empty-card { margin: 28px 20px; padding: 28px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 16px; }
.empty-card strong { display: block; font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.empty-card p { margin: 0 0 18px; font-size: 14.5px; line-height: 1.5; }
.empty-card b { color: var(--ink-2); font-weight: 600; }
.empty-card .pill-btn { flex: none; padding: 0 22px; }
.side-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 92px calc(8px + env(safe-area-inset-bottom)) 16px; border-top: 1px solid var(--line); }
.whoami { min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.whoami b { color: var(--ink-2); font-weight: 600; }

/* ---------- simgeler ---------- */
.ava {
  --c: #6B7C85;
  position: relative; flex-shrink: 0; width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center; background: var(--c); color: #FFFFFF;
}
.ava svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ava.ini { font-weight: 600; font-size: 17px; letter-spacing: .02em; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 82%, #FFFFFF), var(--c)); }
.ava.sm { width: 40px; height: 40px; }
.ava.sm svg { width: 20px; height: 20px; }
.ava.ini.sm { font-size: 14.5px; }
/* servis simgesi: yumuşak renkli zemin, renkli çizgi */
.ava.tint { background: color-mix(in srgb, var(--c) 14%, var(--bg-card)); color: var(--c); }
:root[data-theme="dark"] .ava.tint { background: color-mix(in srgb, var(--c) 22%, #111B21); color: color-mix(in srgb, var(--c) 75%, #FFFFFF); }
.ava.xs { width: 26px; height: 26px; }
.ava.xs svg { width: 14px; height: 14px; stroke-width: 2.4; }
.ava.md { width: 34px; height: 34px; }
.ava.md svg { width: 17px; height: 17px; stroke-width: 2.3; }
.ava-pink   { --c: #E5566B; }
.ava-blue   { --c: #3478F6; }
.ava-green  { --c: #1FA855; }
.ava-purple { --c: #7C5CDB; }
.ava-orange { --c: #EE7A2F; }
.ava-cyan   { --c: #109FB8; }
.ava-amber  { --c: #D79A12; }
.ava-indigo { --c: #5B5FD6; }

/* ---------- sohbet ---------- */
.chat { position: relative; background-color: var(--chat-bg); }
/* WhatsApp benzeri ince desen: renk temaya göre, desen maske ile çizilir */
.chat::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-color: var(--doodle); opacity: var(--doodle-opacity);
  -webkit-mask-image: var(--doodle-svg); mask-image: var(--doodle-svg);
  -webkit-mask-size: 160px 160px; mask-size: 160px 160px;
  --doodle-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 30s-6-4-7.5-7.5a4 4 0 0 1 7.5-2.6 4 4 0 0 1 7.5 2.6C24 26 18 30 18 30z'/%3E%3Cpath d='M92 14h18v11h-10l-5 4v-4h-3z'/%3E%3Cpath d='M58 76l2.4 5.2 5.6.6-4.2 3.8 1.2 5.6-5-2.9-5 2.9 1.2-5.6-4.2-3.8 5.6-.6z'/%3E%3Cpath d='M140 84l-18 7 7 2 2 7z'/%3E%3Ccircle cx='26' cy='118' r='6'/%3E%3Cpath d='M86 132h12a3.5 3.5 0 0 0 0-7h-1M98 141H86a3.5 3.5 0 0 1 0-7h1'/%3E%3Cpath d='M130 30l5 5M135 30l-5 5'/%3E%3Cpath d='M44 150c4-5 9-5 13 0'/%3E%3Cpath d='M118 128v8M114 132h8'/%3E%3Cpath d='M66 44h8v8h-8z'/%3E%3C/g%3E%3C/svg%3E");
}
.chat > * { position: relative; }

.chat-head {
  display: flex; align-items: center; gap: 10px; z-index: 2;
  padding: calc(8px + env(safe-area-inset-top)) 8px 8px; min-height: 62px;
  background: var(--glass); border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: 0 6px 18px -14px rgba(11, 20, 26, .35);
}
.chat-head .ava.ini { box-shadow: 0 0 0 2px var(--bg-app), 0 0 0 3.5px color-mix(in srgb, var(--c) 40%, transparent); }
.back { width: 38px; height: 40px; margin-right: -4px; border: none; border-radius: 50%; background: transparent; display: grid; place-items: center; color: var(--ink); }
.back svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chat-title { flex: 1; min-width: 0; display: flex; flex-direction: column; margin-left: 4px; }
.chat-title strong { font-size: 16.5px; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.msgs { flex: 1; overflow-y: auto; padding: 8px 4% 14px; display: flex; flex-direction: column; overscroll-behavior: contain; }
.chat-empty { margin: auto; padding: 40px 24px; text-align: center; color: var(--muted); max-width: 440px; }
.chat-empty strong { display: block; color: var(--ink); font-size: 22px; font-weight: 300; margin-bottom: 8px; }
.chat-empty .pill-btn { margin-top: 18px; padding: 0 24px; flex: none; }

.day { align-self: center; margin: 12px 0 8px; padding: 5px 12px; border-radius: 8px; background: var(--day-bg); color: var(--day-ink); font-size: 12.5px; font-weight: 500; box-shadow: var(--bubble-shadow); }
.notice { align-self: center; max-width: min(92%, 520px); margin: 8px 0 10px; padding: 7px 12px; border-radius: 8px; background: var(--notice-bg); color: var(--notice-ink); font-size: 12.5px; line-height: 1.45; text-align: center; box-shadow: var(--bubble-shadow); }
.notice.info { width: min(94%, 400px); max-width: none; margin-top: 10px; padding: 11px 14px; text-align: left; font-size: 13px; line-height: 1.5; }
.notice.info dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 16px; margin: 0; }
.notice.info dt { opacity: .72; }
.notice.info dd { margin: 0; font-weight: 500; }
.notice.info ul { margin: 0; padding: 0; list-style: none; }
.notice.info li { position: relative; padding-left: 13px; }
.notice.info li + li { margin-top: 2px; }
.notice.info li::before { content: ''; position: absolute; left: 1px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .55; }
.notice.info > :not(:first-child) { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--notice-line); }
.older { align-self: center; margin: 6px 0; height: 30px; padding: 0 14px; border: none; border-radius: 8px; background: var(--day-bg); color: var(--accent-ink); font-size: 13px; font-weight: 500; box-shadow: var(--bubble-shadow); }

.msg { display: flex; max-width: 85%; margin-top: 2px; }
.msg.first { margin-top: 10px; }
.msg.me { align-self: flex-end; }
.msg.them { align-self: flex-start; }

.bubble { position: relative; padding: 7px 10px 8px; border-radius: 14px; font-size: 15px; line-height: 1.4; color: var(--ink); box-shadow: var(--bubble-shadow); overflow-wrap: anywhere; min-width: 0; }
.me .bubble { background: var(--out); }
.them .bubble { background: var(--in); }
.msg.first.me .bubble { border-top-right-radius: 0; }
.msg.first.them .bubble { border-top-left-radius: 0; }
.msg.me:not(.first) .bubble { border-top-right-radius: 6px; }
.msg.them:not(.first) .bubble { border-top-left-radius: 6px; }
.msg.first .bubble::before { content: ""; position: absolute; top: 0; width: 8px; height: 13px; }
.msg.first.me .bubble::before { right: -8px; background: var(--out); clip-path: polygon(0 0, 100% 0, 0 100%); }
.msg.first.them .bubble::before { left: -8px; background: var(--in); clip-path: polygon(0 0, 100% 0, 100% 100%); }

.b-qty { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.b-link { display: block; font-size: 13.5px; color: var(--link); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.b-link.solo { font-size: 15px; }
.b-text { display: block; }
.b-note { display: block; margin-top: 3px; font-size: 13px; color: var(--in-meta); }
.b-note.ok { color: var(--ok-ink); }
.b-note.tip { white-space: pre-line; }
.b-meta { float: right; position: relative; top: 5px; margin: 4px 0 -3px 12px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--in-meta); white-space: nowrap; }
.me .b-meta { color: var(--out-meta); }
.b-meta.block { float: none; display: flex; justify-content: flex-end; top: 0; margin: 4px 0 -2px; }
.tick { width: 16px; height: 11px; fill: none; stroke: var(--tick); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tick.read { stroke: var(--tick-blue); }
.tick.clock { width: 12px; height: 12px; }

/* sipariş durumu: renkli simge + yazı (bekliyor, yükleniyor, gönderim sırasında, tamam, kısmen, iptal) */
.st { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px 0 6px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; letter-spacing: .01em; }
.st svg { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.st svg .f { fill: currentColor; stroke: none; }
.st svg .w { stroke: #FFFFFF; stroke-width: 2.6; }
.st svg .dim { opacity: .25; }
.st.progress svg { animation: spin 1s linear infinite; }
.st.muted { color: var(--st-muted-ink); background: var(--st-muted-bg); }
.st.pending { color: var(--st-pending-ink); background: var(--st-pending-bg); }
.st.info, .st.progress, .st.processing { color: var(--st-info-ink); background: var(--st-info-bg); }
.st.ok { color: var(--st-ok-ink); background: var(--st-ok-bg); }
.st.partial { color: var(--st-partial-ink); background: var(--st-partial-bg); }
.st.warn { color: var(--st-warn-ink); background: var(--st-warn-bg); }
.st.bad { color: var(--st-bad-ink); background: var(--st-bad-bg); }
.st.bad:not(:has(svg)) { padding-left: 9px; }

.b-bar { display: block; height: 4px; margin: 7px 0 2px; border-radius: 999px; background: var(--track); overflow: hidden; }
.b-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #1DCE8E, var(--teal-2)); }
.b-btn { display: inline-flex; align-items: center; margin-top: 8px; height: 30px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--accent-ink); font-size: 13.5px; font-weight: 500; }
.b-btn:hover { background: var(--bg-hover); }
.b-btn:disabled { opacity: .5; }

.lines { display: flex; flex-direction: column; min-width: min(250px, 62vw); }
.line { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.line + .line { border-top: 1px solid var(--line); }
.line:first-child { padding-top: 2px; }
.line-body { flex: 1; min-width: 0; }
.line-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.line-top b { font-weight: 600; }
.line-sub { display: block; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.sum { list-style: none; margin: 8px 0 2px; padding: 0; display: flex; flex-direction: column; }
.sum li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.sum li + li { border-top: 1px solid var(--line); }
.sum li b { font-weight: 600; font-variant-numeric: tabular-nums; }
.sum li.skip { color: var(--muted); }
.b-link-inline { display: block; margin-top: 6px; font-size: 13px; color: var(--link); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.msg.err .bubble { background: var(--err-bg); }
.msg.err .bubble::before { background: var(--err-bg) !important; }

.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--soft); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.msg.new { animation: pop .2s ease-out both; }

/* ---------- alt çubuk: link → sorular → özet ---------- */
.composer { display: flex; flex-direction: column; gap: 8px; z-index: 2; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }

.flow-top { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.flow-dots { display: inline-flex; gap: 4px; }
.flow-dots i { width: 18px; height: 4px; border-radius: 2px; background: var(--track); }
.flow-dots i.on { background: var(--teal-2); }
.flow-step { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--icon); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-btn { border: none; background: none; padding: 6px 8px; color: var(--accent-ink); font-size: 14px; font-weight: 600; border-radius: 8px; }
.text-btn:hover { background: color-mix(in srgb, var(--teal-2) 10%, transparent); }
.text-btn:disabled { opacity: .4; }

.send-row { display: flex; align-items: flex-end; gap: 6px; }
.link-pill { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 6px 0 16px; border-radius: 25px; background: var(--bg-input); box-shadow: 0 8px 22px -12px rgba(11, 20, 26, .35), 0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent); transition: box-shadow .15s; }
.link-pill:focus-within { box-shadow: 0 8px 22px -12px rgba(11, 20, 26, .35), 0 0 0 2px var(--teal-2); }
.link-pill > svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--soft); stroke-width: 2; stroke-linecap: round; }
.link-pill input { flex: 1; min-width: 0; height: 46px; border: none; background: transparent; font-size: 16px; outline: none; color: var(--ink); }
.link-pill input::placeholder { color: var(--soft); }
.link-pill.bad { box-shadow: 0 0 0 1.5px var(--red); }
.clear { width: 34px; height: 34px; flex-shrink: 0; border: none; border-radius: 50%; background: transparent; color: var(--soft); font-size: 22px; line-height: 1; }
.paste { height: 32px; padding: 0 12px; flex-shrink: 0; border: none; border-radius: 999px; background: var(--teal-soft); color: var(--accent-ink); font-size: 13.5px; font-weight: 600; }
.send { width: 50px; height: 50px; flex-shrink: 0; border: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand-grad); color: #FFFFFF; box-shadow: 0 10px 20px -10px rgba(0, 128, 105, .85), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .12s, filter .15s; }
.send span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.send svg { width: 22px; height: 22px; fill: #FFFFFF; margin-left: 3px; }
.send:hover:not(:disabled) { filter: brightness(1.06); }
.send:active:not(:disabled) { transform: scale(.92); }
.send:disabled { background: var(--border); box-shadow: none; }
.hint { margin: 0 10px; font-size: 13.5px; color: var(--red); }

/* soru paneli */
/* soru paneli: rengi sorulan servisin rengi (--c); köşede o renkte hafif bir ışık */
.step-ask, .step-review { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 14px; background: var(--bg-card); border-radius: 22px; box-shadow: var(--panel-shadow); overflow: hidden; }
:where(.step-ask) { --c: var(--teal-2); }      /* servis rengi (ava-pink …) gelmezse yeşil */
.step-ask::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; pointer-events: none; background: radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%); }
.step-ask > * { position: relative; }
.step-review { padding: 10px; }
.ask-head { display: flex; align-items: center; gap: 12px; }
.ask-head .ava { box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 10%, transparent); }
.ask-titles { display: flex; flex-direction: column; min-width: 0; }
.ask-titles strong { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.left { font-size: 12.5px; color: var(--muted); }
.left b { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }

.amount-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.amount-val { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 6px; cursor: text; }
.qty { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; border: none; background: transparent; color: var(--ink); padding: 0 3px; width: 3ch; min-width: 0; max-width: 100%; border-radius: 8px; text-align: center; font-variant-numeric: tabular-nums; }
/* sayı kutusunun genişliğini ölçmek için aynı yazı tipinde görünmez kopya */
.amount-val { position: relative; }
.qty-measure { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; white-space: pre; padding: 0 3px; font-family: inherit; font-size: 34px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.qty:focus { outline: none; background: var(--teal-soft); }
.unit { font-size: 15px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.step {
  width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; padding: 0 0 2px; flex-shrink: 0;
  background: transparent; font-size: 24px; line-height: 1; color: var(--accent-ink);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: background-color .12s;
}
.step:hover:not(:disabled) { background: var(--bg-hover); }
.step:active:not(:disabled) { background: color-mix(in srgb, var(--c) 12%, transparent); transform: scale(.94); }
.step-ask .step { color: var(--c); border-color: color-mix(in srgb, var(--c) 30%, var(--border)); }
.step-ask.sliding .qty { color: var(--c); }
.qty { transition: color .15s; }
.step:disabled { opacity: .35; cursor: not-allowed; }

/* kaydırma çubuğu: kalın yumuşak ray, servis renginde dolgu, büyük tutamaç; sürüklerken üstünde miktar balonu.
   touch-action: none → parmak çubuğun üstündeyken sayfa kaymaz, çubuk kayar */
.slider { position: relative; height: 46px; margin-top: 4px; --p: 0; touch-action: none; cursor: pointer; -webkit-user-select: none; user-select: none; outline: none; }
.sl-track { position: absolute; left: 0; right: 0; top: 50%; height: 10px; margin-top: -5px; border-radius: 999px; background: var(--track); overflow: hidden; box-shadow: inset 0 1px 2px rgba(11, 20, 26, .08); }
.sl-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(16px + (100% - 32px) * var(--p)); border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 45%, #FFFFFF), var(--c)); }
.sl-marks { position: absolute; left: 16px; right: 16px; top: 50%; height: 4px; margin-top: -2px; display: flex; justify-content: space-evenly; pointer-events: none; }
.sl-marks i { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .75); box-shadow: 0 0 0 1px rgba(11, 20, 26, .06); }
.sl-thumb {
  position: absolute; top: 50%; left: calc((100% - 32px) * var(--p)); width: 32px; height: 32px; margin-top: -16px; border-radius: 50%;
  background: #FFFFFF; border: 3px solid var(--c); box-shadow: 0 5px 12px -3px rgba(11, 20, 26, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.slider.active .sl-thumb { transform: scale(1.12); box-shadow: 0 0 0 9px color-mix(in srgb, var(--c) 18%, transparent), 0 6px 14px -3px rgba(11, 20, 26, .35); }
.slider:focus-visible .sl-thumb { box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 32%, transparent); }
.sl-tip { display: none; }     /* miktar zaten üstteki büyük sayıda; sürüklerken sayı servis rengine boyanır */
.step-ask.sliding .qty { transform: scale(1.04); }
.qty { transform-origin: center; transition: color .15s, transform .15s; }
.slider.off { opacity: .4; pointer-events: none; }
.range-ends { display: flex; justify-content: space-between; align-items: center; margin-top: -4px; font-size: 11.5px; font-weight: 600; color: var(--soft); font-variant-numeric: tabular-nums; }

.presets { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.presets::-webkit-scrollbar { display: none; }
.preset { flex: 1 0 auto; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; transition: background-color .12s, border-color .12s, color .12s; }
.preset:hover { background: var(--bg-hover); }
.preset[aria-pressed="true"] { background: var(--teal-soft); border-color: var(--teal-2); color: var(--accent-ink); }
.step-ask .preset[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 12%, transparent); border-color: var(--c); color: var(--c); }
.preset:active { transform: scale(.95); }

.actions { display: flex; gap: 8px; }
.pill-btn { flex: 1; height: 46px; padding: 0 18px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 15px; font-weight: 600; transition: background-color .15s; }
.pill-btn:hover { background: var(--bg-hover); }
.pill-btn.blue { background: var(--brand-grad); border-color: transparent; color: #FFFFFF; box-shadow: 0 10px 20px -12px rgba(0, 128, 105, .9), inset 0 1px 0 rgba(255, 255, 255, .22); }
.pill-btn.blue:hover { background: var(--brand-grad); filter: brightness(1.06); }
.pill-btn:active:not(:disabled) { transform: scale(.97); }
.pill-btn:disabled { opacity: .5; cursor: default; }

/* ---------- pencereler ---------- */
/* alttan açılan pencereler (bilgisayarda da uygulama sütununun altından) */
dialog.sheet {
  border: none; padding: 0 0 env(safe-area-inset-bottom); color: var(--ink);
  width: 100%; max-width: 440px; max-height: 90vh; margin: auto auto 0;
  border-radius: 20px 20px 0 0; background: var(--bg-sheet); box-shadow: var(--sheet-shadow);
}
dialog.sheet::backdrop { background: var(--backdrop); }
dialog.sheet[open] { animation: up .22s ease-out both; }
.sheet-body { padding: 24px 22px 4px; }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sheet-head h2, #nameForm h2, #setDlg h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.sheet-note { margin: 12px 2px 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
#nameForm .sheet-note { margin-top: 4px; }
.sheet-field input { width: 100%; height: 48px; margin-top: 16px; padding: 0 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-input); color: var(--ink); font-size: 16px; outline: none; }
.sheet-field input:focus { border-color: var(--teal-2); box-shadow: 0 0 0 3px rgba(0, 168, 132, .15); }
/* Instagram kullanıcı adı: başında sabit @ */
.ig-field { display: flex; align-items: center; height: 48px; margin-top: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-input); cursor: text; }
.ig-field:focus-within { border-color: var(--teal-2); box-shadow: 0 0 0 3px rgba(0, 168, 132, .15); }
.ig-field > span { padding: 0 1px 0 16px; color: var(--muted); font-size: 16px; }
.sheet-field .ig-field input { flex: 1; min-width: 0; width: auto; height: 46px; margin: 0; padding: 0 16px 0 1px; border: none; border-radius: 12px; box-shadow: none; background: transparent; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 20px 20px; }
.sheet-actions .pill-btn { flex: none; min-width: 100px; height: 42px; }
.menu-list { display: flex; flex-direction: column; margin: 0 -22px; }
.menu-item { height: 52px; padding: 0 22px; border: none; background: transparent; text-align: left; font-size: 16px; color: var(--ink); }
.menu-item:hover { background: var(--bg-hover); }
.menu-item.danger { color: var(--red); }
.menu-item.armed { background: var(--err-bg); font-weight: 600; }
#nameForm .hint, .gate-card .hint { margin: 10px 2px 0; }

/* ayarlar: bölüm başlıkları, ses anahtarı */
.set-label { margin: 18px 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
#setDlg .set-label:first-of-type { margin-top: 14px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; margin: 0 -22px; padding: 0 22px; cursor: pointer; font-size: 16px; }
.switch-row:hover { background: var(--bg-hover); }
.switch-row small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.switch-row input {
  appearance: none; -webkit-appearance: none; position: relative; flex-shrink: 0; width: 46px; height: 28px; margin: 0;
  border-radius: 999px; background: var(--border); cursor: pointer; transition: background-color .2s;
}
.switch-row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 2px 4px rgba(11, 20, 26, .25); transition: transform .2s cubic-bezier(.2, .9, .3, 1.2); }
.switch-row input:checked { background: var(--teal-2); }
.switch-row input:checked::after { transform: translateX(18px); }
.switch-row input:focus-visible { outline: 2px solid var(--teal-2); outline-offset: 3px; }

/* tema seçimi (WhatsApp'taki gibi) */
.radio-list { display: flex; flex-direction: column; margin: 12px -22px 0; }
.radio { display: flex; align-items: center; gap: 16px; min-height: 52px; padding: 0 22px; cursor: pointer; font-size: 16px; }
.radio:hover { background: var(--bg-hover); }
.radio input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 50%; border: 2px solid var(--soft); display: grid; place-items: center; flex-shrink: 0; }
.radio input::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--teal-2); transform: scale(0); transition: transform .15s; }
.radio input:checked { border-color: var(--teal-2); }
.radio input:checked::after { transform: scale(1); }
.radio input:focus-visible { outline: 2px solid var(--teal-2); outline-offset: 3px; }

/* rehber: kişi seç */
dialog.sheet.full {
  width: 100%; max-width: 440px; height: 100%; max-height: none; margin: 0 auto; overflow: hidden;
  border-radius: 0; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); background: var(--bg-app);
}
dialog.sheet.full[open] { display: flex; flex-direction: column; animation: slide .22s ease-out both; }
.pick-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-height: 62px; border-bottom: 1px solid var(--line); }
.pick-search { padding: 10px 16px 4px; }
.pick-search input { width: 100%; height: 40px; padding: 0 14px; border: none; border-radius: 20px; background: var(--bg-panel); color: var(--ink); font-size: 16px; outline: none; }
.pick-search input:focus { box-shadow: 0 0 0 1.5px var(--teal-2); }
.pick-list { flex: 1; overflow-y: auto; padding-bottom: 12px; }
.pick-list .ci { background: transparent; }
.pick-label { padding: 16px 16px 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pick-list .ci-body { border-bottom-color: transparent; }
.ava.add { --c: var(--teal-2); }

/* soru paneli animasyonu ve uçuşan simgeler */
.step-ask.enter { animation: rise .32s cubic-bezier(.2, .9, .3, 1.1) both; }
.step-ask.enter #askAva .ava { animation: beat .7s ease-out .1s both; }
.burst { position: fixed; z-index: 60; pointer-events: none; animation: floatUp .95s ease-out forwards; }
.burst .ava { width: 28px; height: 28px; }
.burst .ava svg { width: 15px; height: 15px; }

/* ---------- açılış ekranı (WhatsApp'taki gibi: logo ortada, marka altta) ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: radial-gradient(45% 30% at 50% 45%, rgba(42, 217, 154, .22), transparent 70%), var(--bg-app);
  transition: opacity .35s ease, visibility .35s ease;
}
.splash.out { opacity: 0; visibility: hidden; }
.splash-logo { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 14px 32px -12px rgba(0, 128, 105, .55); animation: splashIn .6s cubic-bezier(.2, .9, .3, 1.2) both; }
.splash-foot {
  position: absolute; left: 0; right: 0; bottom: calc(36px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 2px; animation: splashFoot .5s ease .25s both;
}
.splash-foot span { font-size: 13px; color: var(--muted); }
.splash-foot b { font-size: 16px; font-weight: 700; letter-spacing: .02em; color: var(--accent-ink); }
@keyframes splashIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes splashFoot { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- giriş ekranı ---------- */
.gate {
  position: relative; overflow: hidden; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
  background:
    radial-gradient(55% 40% at 0% 0%, rgba(42, 217, 154, .28), transparent 70%),
    radial-gradient(60% 45% at 100% 100%, rgba(0, 122, 99, .24), transparent 70%),
    var(--bg-app);
}
.gate-card {
  position: relative; width: min(380px, 100%); padding: 40px 28px 30px; text-align: center; border-radius: 28px;
  background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 30px 60px -30px rgba(11, 20, 26, .4), 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent);
  animation: rise .5s cubic-bezier(.2, .9, .3, 1.05) both;
}
.gate-logo { display: block; width: 88px; height: 88px; margin: 0 auto 22px; border-radius: 24px; box-shadow: 0 18px 34px -14px rgba(0, 128, 105, .8); }
.gate-card h1 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); overflow-wrap: anywhere; }
.gate-lead { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.gate-input { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-input); cursor: text; transition: border-color .15s, box-shadow .15s; }
.gate-input:focus-within { border-color: var(--teal-2); box-shadow: 0 0 0 3px rgba(0, 168, 132, .15); }
.gate-input svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gate-input input { flex: 1; min-width: 0; height: 100%; border: none; background: transparent; color: var(--ink); font-size: 16px; outline: none; }
.gate-btn { width: 100%; margin-top: 16px; height: 50px; border-radius: 12px; font-size: 16px; }
.gate-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; font-size: 12.5px; color: var(--muted); }
.gate-note svg { width: 15px; height: 15px; fill: none; stroke: #1DAA61; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- ana ekrana ekle: küçük balon ---------- */
/* iPhone'da alttaki Safari paylaş düğmesini ok ile gösterir; iPad'de sağ üstü; Android'de oksuz */
.install-tip {
  position: fixed; z-index: 40; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%); width: min(360px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 10px; border-radius: 14px;
  background: var(--bg-sheet); color: var(--ink); box-shadow: 0 10px 30px rgba(11, 20, 26, .28), 0 0 0 1px var(--line);
  animation: tipIn .35s ease-out both;
}
.install-tip::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: var(--bg-sheet); transform: translateX(-50%) rotate(45deg); }
.install-tip.top { left: auto; right: 12px; bottom: auto; top: calc(12px + env(safe-area-inset-top)); transform: none; }
.install-tip.top::after { left: auto; right: 22px; bottom: auto; top: -7px; transform: rotate(45deg); }
.install-tip.br { left: auto; right: 12px; transform: none; }
.install-tip.br::after { left: auto; right: 18px; transform: rotate(45deg); }
.install-tip.plain::after { display: none; }
.install-tip img { flex-shrink: 0; border-radius: 9px; }
.tip-text { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.35; color: var(--ink-2); }
.tip-text b { color: var(--ink); font-weight: 600; }
.tip-text svg { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; fill: none; stroke: var(--link); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tip-text svg circle { fill: var(--link); stroke: none; }
.tip-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.tip-close { width: 30px; height: 30px; flex-shrink: 0; align-self: flex-start; border: none; border-radius: 50%; background: transparent; color: var(--soft); font-size: 14px; }
.tip-close:hover { background: var(--bg-hover); }
.install-btn { flex: none; height: 32px; padding: 0 14px; font-size: 14px; }
@keyframes tipIn { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }

/* ---------- duyurular: sabit sohbet, bildirim kartı, üstten balon ---------- */
.ava.logo { background: transparent; overflow: hidden; }
.ava.logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.verified { display: inline-block; width: 16px; height: 16px; margin-left: 4px; vertical-align: -2px; flex-shrink: 0; }
.verified path { fill: var(--green); stroke: none; }
.verified .ck { fill: none; stroke: #FFFFFF; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ci.unread .ci-sub { color: var(--ink); font-weight: 500; }
.pin { display: grid; place-items: center; width: 20px; height: 20px; }
.pin svg { width: 16px; height: 16px; fill: none; stroke: var(--soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: rotate(45deg); }

.push-card { display: flex; align-items: center; gap: 10px; margin: 6px 12px 8px; padding: 10px 4px 10px 12px; border-radius: 14px; background: var(--teal-soft); }
.pc-ico { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: var(--teal-2); color: #FFFFFF; }
.pc-ico svg, .news-bar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pc-text b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.pc-text span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.pc-text span svg { width: 15px; height: 15px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pc-text span b { font-size: inherit; color: var(--ink-2); }
.push-card .pill-btn { flex: none; height: 34px; padding: 0 14px; font-size: 14px; }
.push-card .tip-close { align-self: center; }

.news-bar { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg-panel); color: var(--muted); font-size: 13.5px; text-align: center; }
.news-bar p { margin: 0; line-height: 1.45; }
.news-bar b { color: var(--ink-2); font-weight: 600; }
.news-bar .nb-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; font-size: 14.5px; }
.news-bar .nb-on { display: inline-flex; align-items: center; gap: 6px; color: var(--ok-ink); font-weight: 500; }
.news-bar .nb-on .text-btn { padding: 4px 6px; font-size: 13.5px; }
.news-bar .nb-note svg { width: 16px; height: 16px; vertical-align: -3px; }
.news-b { white-space: pre-wrap; }
.news-b.has-img { width: min(290px, 74vw); padding: 3px 3px 6px; }
.nb-img { display: block; width: 100%; max-height: 360px; padding: 0; border: none; border-radius: 6px; overflow: hidden; background: var(--bg-panel); cursor: zoom-in; }
.nb-img img { display: block; width: 100%; height: 100%; max-height: 360px; object-fit: cover; }
.news-b.has-img .nb-text { display: block; padding: 6px 6px 0; }
.news-b.has-img .b-meta { padding-right: 6px; }
.news-b.img-only { padding-bottom: 3px; }
.news-b.img-only .b-meta { position: absolute; float: none; top: auto; right: 9px; bottom: 8px; margin: 0; padding: 1px 6px; border-radius: 8px; background: rgba(11, 20, 26, .45); color: #FFFFFF; }
.viewer { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: calc(16px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom)); background: rgba(0, 0, 0, .92); cursor: zoom-out; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.viewer-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 16px; color: #FFFFFF; font-size: 22px; opacity: .85; }
.news-b a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.news-b .b-meta { white-space: nowrap; }

.heads {
  position: fixed; z-index: 60; left: 50%; top: calc(8px + env(safe-area-inset-top));
  width: min(420px, calc(100vw - 16px)); display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px;
  border: none; border-radius: 16px; background: var(--bg-sheet); color: var(--ink); text-align: left;
  box-shadow: 0 12px 32px rgba(11, 20, 26, .26), 0 0 0 1px var(--line);
  transform: translate(-50%, calc(-100% - 24px)); transition: transform .32s cubic-bezier(.2, .9, .3, 1.15);
}
.heads.in { transform: translate(-50%, 0); }
.heads img { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; }
.heads-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.heads-body b { font-size: 14.5px; font-weight: 600; }
.heads-body span { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
@media (prefers-reduced-motion: reduce) { .heads { transition: none; } }

.demo-tag { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 8px; border-radius: 6px; background: #FFE8A3; color: #7A5300; font-size: 11px; font-weight: 700; letter-spacing: .08em; }

/* ---------- uyarılar ---------- */
.banner { margin: 0 12px 8px; padding: 10px 14px; border-radius: 10px; background: var(--err-bg); color: var(--red); font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 70; transform: translate(-50%, 10px); opacity: 0; pointer-events: none; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 10px; background: var(--toast-bg); color: var(--toast-ink); font-size: 14.5px; box-shadow: 0 8px 20px rgba(11, 20, 26, .3); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #A3002B; color: #FFFFFF; }
.shake { animation: shake .4s; }

@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes slide { from { transform: translateX(100%); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes beat { 0% { transform: scale(.6); } 45% { transform: scale(1.18); } 70% { transform: scale(.94); } 100% { transform: scale(1); } }
@keyframes floatUp { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -160px) scale(1.1); } }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
