/* =========================================================================
   NOIR tasarım sistemi
   Renkler: Noir Klasik (siyah, şampanya altını, fildişi)
   Yazı ve şekil: Manrope, yumuşak köşeler, hap biçimli kontroller
   ========================================================================= */

/* ---------- Tasarım belirteçleri ---------- */
:root {
  color-scheme: dark;

  /* Yüzeyler (koyudan açığa) */
  --bg: #0b0a08;
  --surface-1: #12110d;
  --surface-2: #181611;
  --surface-3: #201d17;
  --surface-hover: #1d1a14;

  /* Çizgiler */
  --line: #24211b;
  --line-strong: #353026;

  /* Yazı */
  --text: #ede6d6;
  --text-2: #c4baa6;
  --text-3: #8c8170;
  --text-4: #6e665a;

  /* Şampanya altını: yalnızca vurgu için, az kullanılır */
  --gold: #c9a96e;
  --gold-hover: #d8bb85;
  --gold-soft: rgba(201, 169, 110, 0.1);
  --gold-line: rgba(201, 169, 110, 0.38);
  --on-gold: #0e0d0b;

  /* Durum renkleri (sakin tonlar) */
  --success: #9cc59a;
  --success-soft: rgba(156, 197, 154, 0.1);
  --danger: #e08a7c;
  --danger-soft: rgba(224, 138, 124, 0.1);
  --info: #9fb4d0;
  --info-soft: rgba(159, 180, 208, 0.1);

  /* Yazı tipi */
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 15px;
  --fs-lg: 17px;
  --fs-xl: 21px;
  --fs-2xl: 28px;
  --fs-3xl: 36px;

  /* Boşluk */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;

  /* Köşeler */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Derinlik: yalnızca açılır pencerelerde */
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);

  /* Hareket */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 180ms;

  /* Düzen */
  --content-w: 760px;
  --page-w: 1080px;
  --topbar-h: 64px;
  --tabbar-h: 64px;
}

/* ---------- Temel ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

/* Bileşenlerin display kuralları hidden özelliğini ezmesin */
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: var(--on-gold); }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hover); }

h1, h2, h3, h4 { margin: 0; font-weight: 500; color: var(--text); letter-spacing: -0.01em; }
h1 { font-size: var(--fs-2xl); line-height: 1.25; }
h2 { font-size: var(--fs-xl); line-height: 1.3; }
h3 { font-size: var(--fs-lg); line-height: 1.4; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--gold-line); outline-offset: 2px; }

/* İnce kaydırma çubuğu */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; }
*::-webkit-scrollbar-track { background: transparent; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Yazı yardımcıları ---------- */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow--gold { color: var(--gold); }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }

/* Altın ince çizgi (başlık altı süsü) */
.hairline {
  height: 1px;
  width: 56px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border: 0;
  margin: var(--s-3) 0;
}

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 38px;
  padding: 0 var(--s-5);
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-2);
  font: 500 var(--fs-sm)/1 var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: var(--surface-hover); color: var(--text); border-color: var(--text-4); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.btn--primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 600; }
.btn--primary:hover { background: var(--gold-hover); border-color: var(--gold-hover); color: var(--on-gold); }

.btn--ghost { border-color: transparent; }
.btn--ghost:hover { border-color: transparent; }

.btn--danger { color: var(--danger); border-color: rgba(224, 138, 124, 0.35); }
.btn--danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

.btn--sm { height: 30px; padding: 0 var(--s-3); font-size: var(--fs-xs); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-3);
  font-size: 19px;
  cursor: pointer;
  position: relative;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.icon-btn.is-active { color: var(--gold); }
.icon-btn--gold { background: var(--gold); color: var(--on-gold); }
.icon-btn--gold:hover { background: var(--gold-hover); color: var(--on-gold); }

/* ---------- Form ---------- */
.field {
  width: 100%;
  height: 44px;
  padding: 0 var(--s-4);
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-1);
  color: var(--text);
  font: 400 var(--fs-md) var(--font);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.field::placeholder { color: var(--text-4); }
.field:hover { border-color: var(--line-strong); }
.field:focus { outline: none; border-color: var(--gold-line); background: var(--surface-2); }
.field--box { border-radius: var(--r-md); }

.label { display: block; font-size: var(--fs-sm); color: var(--text-3); margin-bottom: var(--s-2); }

/* Anahtar (aç/kapa) */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; border-radius: var(--r-pill);
  background: var(--surface-3); border: 1px solid var(--line-strong);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  cursor: pointer;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--text-3);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.switch input:checked + span { background: var(--gold-soft); border-color: var(--gold-line); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--gold); }
.switch input:focus-visible + span { outline: 2px solid var(--gold-line); outline-offset: 2px; }

/* ---------- Çipler ve rozetler ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 var(--s-3);
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-3);
  font: 500 var(--fs-xs)/1 var(--font);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.is-active { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 600; }
.chip--dashed { border-style: dashed; cursor: default; }
.chip--dashed:hover { color: var(--text-3); border-color: var(--line); }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--gold); color: var(--on-gold);
  font: 700 10px/1 var(--font);
}
.badge--quiet { background: var(--surface-3); color: var(--text-2); }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 500;
  background: var(--surface-3); color: var(--text-3);
}
.tag--gold { background: var(--gold-soft); color: var(--gold); }
.tag--success { background: var(--success-soft); color: var(--success); }
.tag--danger { background: var(--danger-soft); color: var(--danger); }
.tag--info { background: var(--info-soft); color: var(--info); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }

/* ---------- Kartlar ve listeler ---------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-6);
}
.card--gold { border-color: var(--gold-line); background: linear-gradient(180deg, var(--gold-soft), transparent 70%), var(--surface-1); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }

.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-2);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  transition: background var(--dur) var(--ease);
}
.row:last-child { border-bottom: 0; }
.row--interactive { cursor: pointer; border-radius: var(--r-sm); }
.row--interactive:hover { background: var(--surface-hover); }
.row__main { flex: 1; min-width: 0; }
.row__title { color: var(--text); font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__sub { color: var(--text-3); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__meta { color: var(--text-4); font-size: var(--fs-xs); flex: none; }

/* Zaman çizelgesi (ajanda) */
.timeline { display: flex; flex-direction: column; gap: var(--s-2); }
.slot { display: grid; grid-template-columns: 56px 1fr; gap: var(--s-3); align-items: center; }
.slot__time { color: var(--text-3); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.slot__body {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4); color: var(--text-2);
}
.slot.is-past .slot__body { color: var(--text-4); text-decoration: line-through; }
.slot.is-next .slot__time { color: var(--gold); }
.slot.is-next .slot__body { border-color: var(--gold-line); color: var(--text); background: var(--surface-2); }

/* ---------- Gezinme ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: 0 var(--s-6);
  background: rgba(11, 10, 8, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: var(--s-3); color: var(--text); }
.brand__mark {
  width: 30px; height: 30px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--on-gold);
  font-weight: 700; font-size: 15px;
}
.brand__name { font-weight: 600; font-size: 13px; letter-spacing: 0.32em; }

.tabs { display: flex; align-items: center; gap: var(--s-6); }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: var(--topbar-h);
  color: var(--text-3); font-size: var(--fs-sm); font-weight: 500;
  background: none; border: 0; cursor: pointer; padding: 0;
  transition: color var(--dur) var(--ease);
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); }
.tab.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--gold);
}

.topbar__actions { display: flex; align-items: center; gap: var(--s-1); }

.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(11, 10, 8, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: none; border: 0; color: var(--text-4); font: 500 11px var(--font); cursor: pointer;
  position: relative;
}
.tabbar__item i { font-size: 21px; }
.tabbar__item.is-active { color: var(--gold); }
.tabbar__item .badge { position: absolute; top: 8px; left: calc(50% + 6px); }

/* Komut çubuğu tetikleyicisi */
.search-trigger {
  display: inline-flex; align-items: center; gap: var(--s-2);
  height: 34px; padding: 0 var(--s-3);
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface-1);
  color: var(--text-4); font: 400 var(--fs-xs) var(--font); cursor: pointer;
}
.search-trigger:hover { border-color: var(--line-strong); color: var(--text-3); }
kbd {
  font: 600 10px var(--font); color: var(--text-3);
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 1px 5px;
}

/* ---------- Sayfa düzeni ---------- */
.page { width: 100%; max-width: var(--page-w); margin: 0 auto; padding: var(--s-10) var(--s-6) var(--s-12); }
.page--narrow { max-width: var(--content-w); }
.page__head { margin-bottom: var(--s-8); }
.page__head p { color: var(--text-3); margin-top: var(--s-2); }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack--lg { gap: var(--s-6); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.split { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }

/* ---------- Sohbet ---------- */
.chat { display: flex; flex-direction: column; min-height: calc(100dvh - var(--topbar-h)); }
.chat__scroll { flex: 1; overflow-y: auto; }
.chat__inner { width: 100%; max-width: var(--content-w); margin: 0 auto; padding: var(--s-10) var(--s-6) var(--s-6); display: flex; flex-direction: column; gap: var(--s-6); }
/* Boş sohbette yazma alanı selamlamanın altında ortada durur; sohbet başlayınca en alta iner */
.chat--active .chat__inner { flex: 1; }

.greeting { text-align: center; padding: var(--s-12) 0 var(--s-6); }
.greeting h1 { font-size: var(--fs-3xl); font-weight: 400; letter-spacing: -0.02em; }
.greeting__line {
  display: inline-flex; align-items: center; gap: var(--s-2);
  margin-top: var(--s-4); padding: 6px var(--s-4);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  color: var(--text-2); font-size: var(--fs-sm);
  background: transparent; cursor: pointer; font-family: var(--font);
  transition: border-color var(--dur) var(--ease);
}
.greeting__line:hover { border-color: var(--gold-line); }

.msg { display: flex; flex-direction: column; gap: var(--s-2); }
.msg--user { align-items: flex-end; }
.msg--user .msg__body {
  max-width: 78%;
  background: var(--surface-2); border: 1px solid var(--line);
  padding: var(--s-3) var(--s-4);
  border-radius: 18px 18px 6px 18px;
  color: var(--text);
}
.msg--noir .msg__body { color: var(--text-2); font-size: 16px; line-height: 1.75; max-width: 100%; }
.msg--noir .msg__body strong { color: var(--text); font-weight: 600; }
.msg__body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg__status { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--text-3); font-size: var(--fs-sm); }

/* Düşünme göstergesi: üç altın nokta */
.thinking { display: inline-flex; gap: 5px; align-items: center; height: 18px; }
.thinking span { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); animation: noir-pulse 1.2s infinite var(--ease); }
.thinking span:nth-child(2) { animation-delay: 0.15s; }
.thinking span:nth-child(3) { animation-delay: 0.3s; }
@keyframes noir-pulse { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); } 40% { opacity: 1; transform: scale(1); } }

/* Onay kartı */
.action-card {
  border: 1px solid var(--gold-line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--gold-soft), transparent 80%), var(--surface-1);
  padding: var(--s-4) var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.action-card__title { display: flex; align-items: center; gap: var(--s-2); color: var(--gold); font-size: var(--fs-sm); font-weight: 600; }
.action-card__details {
  white-space: pre-wrap; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.6;
  background: rgba(0, 0, 0, 0.25); border-radius: var(--r-md); padding: var(--s-3) var(--s-4);
  max-height: 260px; overflow-y: auto;
}
.action-card__result { font-size: var(--fs-sm); }
.action-card__result.is-ok { color: var(--success); }
.action-card__result.is-error { color: var(--danger); }

/* Mesaj yazma alanı */
.composer-wrap {
  position: sticky; bottom: 0;
  padding: var(--s-3) var(--s-6) var(--s-6);
  background: linear-gradient(180deg, transparent, var(--bg) 35%);
}
.composer {
  max-width: var(--content-w); margin: 0 auto;
  display: flex; align-items: flex-end; gap: var(--s-2);
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  padding: 6px 6px 6px var(--s-5);
  transition: border-color var(--dur) var(--ease);
}
.composer:focus-within { border-color: var(--gold-line); }
.composer textarea {
  flex: 1; resize: none; border: 0; outline: none; background: transparent;
  color: var(--text); font: 400 var(--fs-md)/1.5 var(--font);
  padding: 9px 0; max-height: 180px;
}
.composer textarea::placeholder { color: var(--text-4); }
.composer__hint { max-width: var(--content-w); margin: var(--s-2) auto 0; text-align: center; color: var(--text-4); font-size: 11px; }

.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); }

/* ---------- Sayfa bileşenleri ---------- */
.section-title { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin: var(--s-8) 0 var(--s-3); }
.section-title:first-child { margin-top: 0; }
.day-label { color: var(--text-3); font-size: var(--fs-sm); font-weight: 600; margin: var(--s-4) 0 var(--s-2); text-transform: capitalize; }
.day-label:first-child { margin-top: 0; }

/* Mail satırı: tıklayınca açılan ayrıntı */
.mail { border-bottom: 1px solid var(--line); }
.mail:last-child { border-bottom: 0; }
.mail .row { border-bottom: 0; }
.mail__detail { padding: 0 var(--s-2) var(--s-4) calc(var(--s-2) + 7px + var(--s-3)); }
.mail__body {
  white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.65;
  background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4); max-height: 360px; overflow-y: auto; margin-bottom: var(--s-3);
}
.row.is-open .row__title { white-space: normal; }

/* Ajandada satır üstüne gelince görünen işlem */
.slot { position: relative; }
.slot__body { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.slot__action { opacity: 0; transition: opacity var(--dur) var(--ease); }
.slot:hover .slot__action, .slot__action:focus-visible { opacity: 1; }
.slot.is-ongoing .slot__time { color: var(--gold); }
@media (hover: none) { .slot__action { opacity: 1; } }

.free-slot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border: 1px dashed var(--line-strong); border-radius: var(--r-md);
  color: var(--text-2); font-size: var(--fs-sm);
}

.setting { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; padding-bottom: 0; }
.setting:first-child { padding-top: 0; }
.setting__label { color: var(--text); }
.setting__control { width: 220px; flex: none; }
.setting__hint { color: var(--text-3); font-size: var(--fs-sm); }

.inline-form { display: flex; gap: var(--s-2); }
.inline-form .field { flex: 1; }
@media (max-width: 760px) { .inline-form { flex-direction: column; } }

/* ---------- Açılır katmanlar ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(5, 4, 3, 0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh var(--s-4) var(--s-4);
  animation: noir-fade var(--dur) var(--ease);
}
.overlay[hidden] { display: none; }
.dialog {
  width: 100%; max-width: 560px;
  background: var(--surface-3); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
  overflow: hidden;
  animation: noir-rise var(--dur) var(--ease);
}
.palette__input {
  width: 100%; height: 56px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--text); padding: 0 var(--s-5);
  font: 400 var(--fs-lg) var(--font); outline: none;
}
.palette__list { max-height: 360px; overflow-y: auto; padding: var(--s-2); }
.palette__item {
  display: flex; align-items: center; gap: var(--s-3); width: 100%;
  padding: var(--s-3); border-radius: var(--r-sm); border: 0; background: none;
  color: var(--text-2); font: 400 var(--fs-md) var(--font); text-align: left; cursor: pointer;
}
.palette__item i { color: var(--text-3); font-size: 18px; }
.palette__item.is-selected, .palette__item:hover { background: var(--surface-hover); color: var(--text); }
.palette__item.is-selected i { color: var(--gold); }

/* Bildirim paneli (sağdan açılır) */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90;
  width: min(400px, 100vw);
  background: var(--surface-2); border-left: 1px solid var(--line-strong);
  box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 240ms var(--ease);
}
.drawer.is-open { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--s-5) var(--s-5) var(--s-3); }
.drawer__body { flex: 1; overflow-y: auto; padding: 0 var(--s-3) var(--s-5); }

/* Kısa bildirim (toast) */
.toasts { position: fixed; z-index: 100; left: 50%; bottom: var(--s-8); transform: translateX(-50%); display: flex; flex-direction: column; gap: var(--s-2); align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-5); border-radius: var(--r-pill);
  background: var(--surface-3); border: 1px solid var(--line-strong); box-shadow: var(--shadow-pop);
  color: var(--text); font-size: var(--fs-sm);
  animation: noir-rise var(--dur) var(--ease);
}
.toast i { color: var(--gold); }
.toast--error i { color: var(--danger); }

/* ---------- Yükleniyor ve boş durum ---------- */
.skeleton {
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--surface-1), var(--surface-3), var(--surface-1));
  background-size: 200% 100%;
  animation: noir-shimmer 1.4s infinite linear;
  height: 14px;
}
@keyframes noir-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.empty { text-align: center; padding: var(--s-10) var(--s-4); color: var(--text-3); }
.empty i { font-size: 30px; color: var(--text-4); display: block; margin-bottom: var(--s-3); }
.empty h3 { color: var(--text-2); margin-bottom: var(--s-1); }

@keyframes noir-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes noir-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Telefon ---------- */
@media (max-width: 760px) {
  :root { --topbar-h: 56px; }
  .topbar { padding: 0 var(--s-4); }
  .tabs, .search-trigger { display: none; }
  .tabbar { display: flex; }
  .page { padding: var(--s-6) var(--s-4) calc(var(--tabbar-h) + var(--s-10)); }
  .chat { min-height: calc(100dvh - var(--topbar-h) - var(--tabbar-h)); }
  .chat__inner { padding: var(--s-6) var(--s-4) var(--s-4); }
  .greeting { padding: var(--s-8) 0 var(--s-4); }
  .greeting h1 { font-size: var(--fs-2xl); }
  .composer-wrap { padding: var(--s-2) var(--s-3) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--s-3)); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  /* Başlık ve yanındaki butonlar telefonda alt alta */
  .page__head.split { flex-direction: column; align-items: flex-start !important; gap: var(--s-4); }
  .setting__control { width: 150px; }
  .card { padding: var(--s-4) var(--s-5); }
  .msg--user .msg__body { max-width: 88%; }
  .overlay { padding-top: 8vh; }
}

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