/* İyi Yaşam · uygulama kabuğu
   Hesap, profil ve gezinti katmanının görsel dili. Klinik ekranların
   değişkenlerini (--accent, --line, --surface …) devralır, böylece profil
   temasıyla birlikte renk değiştirir. */

:root {
  --ay-bar-h: 72px;
  --ay-tabbar-h: 66px;
  --ay-radius-lg: 26px;
  --ay-radius-md: 16px;
  --ay-glass: #ffffffd6;
  --ay-glass-strong: #fffffff2;
  --ay-hairline: #1c2a3d1f;
  --ay-danger: #b52f38;
  --ay-danger-soft: #fff1f1;
  --ay-danger-strong: #8f2129;
}

/* Uygulamanın kendi başlığı kanallarda hiç gösterilmez; marka üst çubukta
   (shell.js) durur. Eskiden yalnız kabuk devraldıktan sonra gizleniyordu;
   kabuk betiği sayfanın en sonunda çalıştığı için yüklenirken bir an paketin
   başlığı görünüyordu. v142'de o başlığın logosu kanal HTML'inden çıkarıldı
   (split.mjs), boş kalan başlık ilk boyamadan itibaren gizli. */
.topbar { display: none; }
body[data-ay-shell] main { padding-top: 6px; }

body[data-ay-boot="pending"] #generalPlanView,
body[data-ay-boot="pending"] #maternalHealthView,
body[data-ay-boot="pending"] #drawingLauncher,
body[data-ay-view="auth"] #generalPlanView,
body[data-ay-view="auth"] #maternalHealthView,
body[data-ay-view="auth"] #drawingLauncher,
body[data-ay-view="profiles"] #generalPlanView,
body[data-ay-view="profiles"] #maternalHealthView,
body[data-ay-view="profiles"] #drawingLauncher,
body[data-ay-view="account"] #generalPlanView,
body[data-ay-view="account"] #maternalHealthView,
body[data-ay-view="account"] #drawingLauncher,
body[data-ay-view="plans"] #generalPlanView,
body[data-ay-view="plans"] #maternalHealthView,
body[data-ay-view="plans"] #drawingLauncher { display: none !important; }

/* Pro paketi çözülürken (boot.js) ücretsiz işaretleme bir an görünmesin. */
html[data-iy-loading] main { visibility: hidden; }
html[data-iy-loading] body::after {
  content: "";
  position: fixed;
  inset: 50% auto auto 50%;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 3px solid var(--accent-soft, #e5eefb);
  border-top-color: var(--accent, #2f6fd6);
  animation: ay-spin .8s linear infinite;
}

body[data-ay-view="auth"] .offline-review-banner,
body[data-ay-boot="pending"] .offline-review-banner { display: none; }

.ay-hidden { display: none !important; }

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

/* ---------------------------------------------------------------- üst çubuk */

.ay-bar {
  position: sticky;
  top: 10px;
  z-index: 45;
  width: min(1160px, 100% - 40px);
  margin: 10px auto 0;
  min-height: var(--ay-bar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 14px;
  border: 1px solid #ffffffd9;
  border-radius: var(--ay-radius-lg);
  background: var(--ay-glass);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
  backdrop-filter: blur(26px) saturate(1.4);
  box-shadow: 0 14px 44px #2b3e5818, inset 0 1px 0 #fff;
}

.ay-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-size: 17px;
  background: none;
  border: 0;
  padding: 4px 6px;
  border-radius: 14px;
  cursor: pointer;
}
.ay-brand:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }

.ay-brand-mark {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  flex: none;
  border-radius: 12px;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(145deg, var(--accent-light), var(--accent));
  box-shadow: 0 8px 20px var(--accent-shadow);
}

.ay-brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.ay-brand-text b { font-size: 17px; font-weight: 750; }
.ay-brand-text small {
  font-size: 11px; font-weight: 700; color: var(--muted);
  letter-spacing: 0.04em; text-transform: uppercase;
}

.ay-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
  padding: 4px;
  border-radius: 16px;
  background: #eef2f7b8;
  border: 1px solid #ffffffb0;
}

.ay-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 690;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s, color .16s, box-shadow .16s;
}
.ay-nav-item svg { width: 18px; height: 18px; flex: none; }
.ay-nav-item:hover { color: var(--ink); background: #ffffffa8; }
.ay-nav-item[aria-current="page"] {
  color: var(--accent-strong);
  background: #fff;
  box-shadow: 0 3px 12px #2d3c501f;
}
.ay-nav-item:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }

.ay-bar-actions { display: flex; align-items: center; gap: 8px; }

.ay-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 220px;
  min-height: 44px;
  padding: 0 13px 0 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffffcc;
  cursor: pointer;
  font-size: 13px;
  font-weight: 680;
  color: var(--ink);
  text-align: start;
  line-height: 1.25;
  transition: border-color .16s, box-shadow .16s;
}
.ay-profile-chip:hover { border-color: var(--accent-border); box-shadow: 0 6px 18px #2b3e5814; }
.ay-profile-chip:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.ay-profile-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ay-profile-chip small { color: var(--muted); font-weight: 640; font-size: 11.5px; }

.ay-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 780;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.ay-avatar--lg { width: 52px; height: 52px; border-radius: 17px; font-size: 20px; }

.ay-account-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px 0 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffffcc;
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.ay-account-button:hover { border-color: var(--accent-border); }
.ay-account-button:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.ay-account-button .ay-caret { width: 12px; height: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- açılır menü */

.ay-menu-wrap { position: relative; }

.ay-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  z-index: 60;
  min-width: 264px;
  padding: 8px;
  border: 1px solid var(--ay-hairline);
  border-radius: 20px;
  background: var(--ay-glass-strong);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 22px 60px #2b3e5826;
  animation: ay-pop .14s ease-out;
}
@keyframes ay-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ay-menu { animation: none; } }

.ay-menu-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
  display: flex;
  gap: 11px;
  align-items: center;
}
.ay-menu-head div { min-width: 0; }
.ay-menu-head strong { display: block; font-size: 14px; letter-spacing: -0.01em; }
.ay-menu-head small {
  display: block; color: var(--muted); font-size: 12px; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.ay-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-align: start;
  cursor: pointer;
  text-decoration: none;
}
.ay-menu-item svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.ay-menu-item:hover { background: var(--accent-soft); color: var(--accent-strong); }
.ay-menu-item:hover svg { color: var(--accent-strong); }
.ay-menu-item:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: -2px; }
.ay-menu-item--danger { color: var(--ay-danger); }
.ay-menu-item--danger svg { color: var(--ay-danger); }
.ay-menu-item--danger:hover { background: var(--ay-danger-soft); color: var(--ay-danger-strong); }
.ay-menu-item--danger:hover svg { color: var(--ay-danger-strong); }
.ay-menu-sep { height: 1px; margin: 6px 8px; background: var(--line); }

/* ---------------------------------------------------------------- alt sekmeler */

.ay-tabbar { display: none; }

@media (max-width: 920px) {
  .ay-bar { width: calc(100% - 24px); padding: 8px 10px; gap: 10px; }
  .ay-nav { display: none; }
  .ay-profile-chip { display: none; }
  .ay-bar-actions { margin-inline-start: auto; }

  .ay-tabbar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 44;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 2px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--ay-hairline);
    background: #ffffffee;
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    box-shadow: 0 -10px 34px #2b3e5814;
  }
  .ay-tab {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-height: 52px;
    padding: 6px 4px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
  }
  .ay-tab svg { width: 21px; height: 21px; }
  .ay-tab[aria-current="page"] { color: var(--accent-strong); background: var(--accent-soft); }
  .ay-tab:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: -2px; }

  body[data-ay-shell] main { padding-bottom: calc(var(--ay-tabbar-h) + 34px + env(safe-area-inset-bottom)); }
  body[data-ay-shell] .drawing-launcher {
    bottom: calc(var(--ay-tabbar-h) + 14px + env(safe-area-inset-bottom));
  }
  body[data-ay-view="auth"] .ay-tabbar,
  body[data-ay-boot="pending"] .ay-tabbar { display: none; }
}

@media (max-width: 420px) {
  .ay-brand-text small { display: none; }
  .ay-account-label { display: none; }
  .ay-account-button { padding: 0 6px 0 5px; gap: 4px; }
}

/* ---------------------------------------------------------------- kabuk sayfaları */

.ay-view {
  width: min(1160px, 100% - 40px);
  margin: 0 auto;
  padding: 22px 0 40px;
}
@media (max-width: 640px) { .ay-view { width: calc(100% - 24px); padding-top: 14px; } }

.ay-page-head { margin: 6px 0 22px; }
.ay-page-head .ay-eyebrow,
.ay-auth-hero .ay-eyebrow {
  display: block;
  color: var(--accent-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 760;
}
.ay-page-head h1 {
  margin: 10px 0 8px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}
.ay-page-head h1[tabindex]:focus, .ay-page-head h1[tabindex]:focus-visible { outline: none; }
.ay-page-head p { margin: 0; max-width: 62ch; color: var(--muted); font-size: 15px; line-height: 1.55; }

.ay-card {
  background: var(--surface);
  border: 1px solid #ffffffdb;
  border-radius: var(--ay-radius-lg);
  box-shadow: var(--shadow-small);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  padding: clamp(20px, 3vw, 28px);
}
.ay-card + .ay-card { margin-top: 18px; }
.ay-card h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.03em; }
.ay-card > p.ay-card-lead { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ---------------------------------------------------------------- formlar */

.ay-field { display: flex; flex-direction: column; min-width: 0; }
.ay-field > span {
  font-size: 14px;
  font-weight: 680;
  margin-bottom: 7px;
  color: var(--ink);
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
}
.ay-field > span em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 650; }
.ay-field input,
.ay-field select,
.ay-field textarea {
  width: 100%;
  min-height: 48px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #8996a8;
  border-radius: 12px;
  outline: none;
  padding: 12px 14px;
  font: inherit;
  transition: border-color .16s, box-shadow .16s;
}
.ay-field textarea { min-height: 78px; resize: vertical; line-height: 1.5; }
.ay-field input:focus,
.ay-field select:focus,
.ay-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ay-field input:disabled { background: #f2f5f9; color: var(--muted); }
.ay-field input[aria-invalid="true"],
.ay-field select[aria-invalid="true"] { border-color: var(--ay-danger); box-shadow: 0 0 0 3px #b52f3822; }
.ay-field small { color: var(--quiet); margin-top: 7px; font-size: 13px; line-height: 1.45; }

.ay-grid { display: grid; gap: 16px; }
.ay-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ay-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .ay-grid--2, .ay-grid--3 { grid-template-columns: minmax(0, 1fr); } }

.ay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 14px;
  border: 0;
  font: inherit;
  font-weight: 730;
  cursor: pointer;
  transition: background .16s, transform .16s, box-shadow .16s, border-color .16s;
}
.ay-btn:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.ay-btn:disabled { opacity: .55; cursor: not-allowed; }
.ay-btn svg { width: 17px; height: 17px; }

.ay-btn--primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 24px var(--accent-shadow);
}
.ay-btn--primary:hover:not(:disabled) { background: var(--accent-strong); transform: translateY(-1px); }
.ay-btn--primary:active { transform: translateY(0); }

.ay-btn--ghost { color: #31445d; background: #fff; border: 1px solid #91a1b6; }
.ay-btn--ghost:hover:not(:disabled) { border-color: var(--accent-border); color: var(--accent-strong); }

.ay-btn--quiet { color: var(--muted); background: transparent; border: 1px solid var(--line); }
.ay-btn--quiet:hover:not(:disabled) { color: var(--ink); background: #ffffffb0; }

.ay-btn--danger { color: #fff; background: var(--ay-danger); box-shadow: 0 10px 24px #b52f3833; }
.ay-btn--danger:hover:not(:disabled) { background: var(--ay-danger-strong); }

.ay-btn--block { width: 100%; }
.ay-btn--sm { min-height: 42px; padding: 0 14px; font-size: 13.5px; }

.ay-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.ay-note {
  display: block;
  padding: 12px 14px;
  border-radius: var(--ay-radius-md);
  font-size: 13.5px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.ay-note strong { font-weight: 730; }
.ay-note--info { color: #2b4a72; background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 20%, transparent); }
.ay-note--warn { color: #624719; background: var(--amber-soft); border-color: #7a4a0047; }
.ay-note--error { color: #8c242c; background: var(--ay-danger-soft); border-color: #b52f3833; }
.ay-note--ok { color: #1c5c42; background: var(--green-soft); border-color: #1f744f33; }
.ay-note:empty { display: none; }

/* ---------------------------------------------------------------- giriş ekranı */

.ay-auth {
  min-height: calc(100vh - var(--ay-bar-h) - 40px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  width: min(1160px, 100% - 40px);
  margin: 0 auto;
  padding: 26px 0 48px;
}
@media (max-width: 920px) {
  .ay-auth { grid-template-columns: minmax(0, 1fr); min-height: auto; gap: 26px; width: calc(100% - 24px); }
  .ay-auth-hero { order: 2; }
}

.ay-auth-hero h1 {
  margin: 14px 0 16px;
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.0;
  letter-spacing: -0.055em;
  max-width: 12ch;
}
.ay-auth-hero > p { margin: 0 0 26px; max-width: 46ch; color: var(--muted); font-size: 16px; line-height: 1.6; }

.ay-auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.ay-auth-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; }
.ay-auth-points b { display: block; font-weight: 720; }
.ay-auth-points li > span:last-child > span { color: var(--muted); }
.ay-auth-tick {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent-strong);
  font-size: 14px; font-weight: 800;
}

.ay-auth-card {
  background: var(--surface-solid);
  border: 1px solid #ffffffdb;
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 34px);
}
.ay-auth-card h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -0.035em; }
.ay-auth-card h2[tabindex]:focus, .ay-auth-card h2[tabindex]:focus-visible { outline: none; }
.ay-auth-card > p { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.ay-auth-fineprint { margin: 18px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--quiet); }

.ay-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  margin-bottom: 22px;
  background: #edf1f6;
  border-radius: 14px;
}
.ay-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 690;
  font-size: 14px;
  cursor: pointer;
  transition: background .16s, color .16s, box-shadow .16s;
}
.ay-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 3px 12px #2d3c501a; }
.ay-tabs button:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }

.ay-auth-form { display: grid; gap: 16px; }

.ay-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0 16px; color: var(--quiet); font-size: 12.5px; font-weight: 650;
}
.ay-divider::before, .ay-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.ay-password-wrap { position: relative; display: block; }
.ay-password-wrap input { padding-inline-end: 82px; }
.ay-password-toggle {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.ay-password-toggle:hover { background: var(--accent-soft); }
.ay-password-toggle:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 1px; }

/* ---------------------------------------------------------------- profil kartları */

.ay-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 16px;
}
@media (max-width: 640px) { .ay-profile-grid { grid-template-columns: minmax(0, 1fr); } }

.ay-profile-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid #ffffffdb;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.ay-profile-card-top { display: flex; gap: 13px; align-items: flex-start; }
.ay-profile-card-top div { min-width: 0; flex: 1; }
.ay-profile-card h3 {
  margin: 0 0 3px;
  font-size: 17px;
  letter-spacing: -0.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ay-profile-card .ay-profile-role { color: var(--muted); font-size: 13px; font-weight: 640; }

.ay-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ay-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffffb5;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.ay-chip b { color: var(--ink); font-weight: 730; }
.ay-chip--accent { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-strong); }
.ay-chip--accent b { color: var(--accent-strong); }

.ay-profile-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--quiet);
  border-inline-start: 3px solid var(--line);
  padding-inline-start: 10px;
}

.ay-profile-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.ay-profile-actions .ay-btn--primary { flex: 1; }
.ay-icon-btn {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  flex: none;
  border-radius: 12px;
  border: 1px solid #91a1b6;
  background: #fff;
  color: #31445d;
  cursor: pointer;
}
.ay-icon-btn svg { width: 17px; height: 17px; }
.ay-icon-btn:hover { border-color: var(--accent-border); color: var(--accent-strong); }
.ay-icon-btn--danger:hover { border-color: var(--ay-danger); color: var(--ay-danger); background: var(--ay-danger-soft); }
.ay-icon-btn:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }

.ay-profile-add {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 210px;
  padding: 22px;
  border: 2px dashed color-mix(in srgb, var(--accent) 34%, #c4cedb);
  border-radius: 24px;
  background: #ffffff6b;
  color: var(--accent-strong);
  font: inherit;
  font-size: 15px;
  font-weight: 720;
  cursor: pointer;
  transition: background .16s, border-color .16s;
}
.ay-profile-add:hover { background: var(--accent-soft); border-color: var(--accent); }
.ay-profile-add:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 3px; }
.ay-profile-add-mark {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 15px;
  background: var(--accent-soft); font-size: 24px; font-weight: 400;
}

.ay-empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 46px 24px;
  text-align: center;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #ffffff8f;
}
.ay-empty h3 { margin: 0; font-size: 19px; letter-spacing: -0.02em; }
.ay-empty p { margin: 0; max-width: 44ch; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ---------------------------------------------------------------- kip pencere */

.ay-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: min(88vh, 860px);
  padding: 0;
  border: 1px solid #ffffffdb;
  border-radius: 26px;
  background: var(--surface-solid);
  box-shadow: 0 40px 100px #1c2a3d3d;
  color: var(--ink);
  overflow: hidden;
}
.ay-dialog::backdrop { background: #16233480; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ay-dialog-inner { display: flex; flex-direction: column; max-height: min(88vh, 860px); }
.ay-dialog-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--line);
}
.ay-dialog-head div { flex: 1; min-width: 0; }
.ay-dialog-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.03em; }
.ay-dialog-head p { margin: 5px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.ay-dialog-body { padding: 20px 22px; overflow-y: auto; display: grid; gap: 16px; }
.ay-dialog-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--line);
  background: #f7f9fc9c;
}
@media (max-width: 480px) {
  .ay-dialog-foot { flex-direction: column-reverse; }
  .ay-dialog-foot .ay-btn { width: 100%; }
}

.ay-dialog-close {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 17px;
}
.ay-dialog-close:hover { color: var(--ink); border-color: var(--accent-border); }
.ay-dialog-close:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }

/* ---------------------------------------------------------------- seçim grubu */

.ay-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.ay-fieldset > legend {
  padding: 0;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 680;
  color: var(--ink);
}

.ay-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  border-radius: 14px;
  background: #edf1f6;
}
.ay-choice input { position: absolute; opacity: 0; pointer-events: none; }
.ay-choice label {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
  text-align: center;
  cursor: pointer;
  transition: background .16s, color .16s, box-shadow .16s;
}
.ay-choice input:checked + label { color: var(--ink); background: #fff; box-shadow: 0 3px 12px #2d3c501a; }
.ay-choice input:focus-visible + label { outline: 3px solid var(--accent-ring); outline-offset: 2px; }

/* ---------------------------------------------------------------- tehlikeli bölge */

.ay-danger-card {
  border: 1px solid #b52f3833;
  border-radius: var(--ay-radius-lg);
  background: linear-gradient(180deg, #fff8f8, #fff);
  padding: clamp(20px, 3vw, 28px);
  margin-top: 18px;
}
.ay-danger-card h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.03em; color: var(--ay-danger-strong); }
.ay-danger-card p { margin: 0 0 14px; color: #7c4046; font-size: 14px; line-height: 1.6; max-width: 66ch; }
.ay-danger-card ul { margin: 0 0 18px; padding-inline-start: 20px; color: #7c4046; font-size: 14px; line-height: 1.65; }

/* ---------------------------------------------------------------- hesap (ayarlar)
   Katmanlı "Ayarlar" düzeni (29.09.2026): özet + gruplanmış satırlar; parola, veri
   indirme ve silme alt sayfalarda. Satırlar iOS/Android ayar listeleri gibi. */

body[data-ay-shell] .ay-view.ay-settings { width: min(760px, calc(100% - var(--layout-gutters, 40px))); }
.ay-settings .ay-page-head { margin: 4px 0 18px; }
.ay-settings-head h1 { font-size: clamp(28px, 3.6vw, 40px); }

.ay-back {
  display: inline-flex; align-items: center; gap: 2px;
  margin: 0 0 4px -8px; padding: 8px 12px 8px 6px;
  border: 0; border-radius: 12px; background: transparent;
  color: var(--accent-strong); font: inherit; font-size: 14.5px; font-weight: 650; cursor: pointer;
}
.ay-back svg { width: 19px; height: 19px; }
.ay-back:hover { background: var(--accent-soft); }
.ay-back:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }

.ay-settings-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-small);
}
.ay-settings-hero-text { min-width: 0; display: grid; gap: 6px; }
.ay-settings-hero-text strong { font-size: 17px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.ay-settings-hero-text > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ay-settings-hero-text small { color: var(--muted); font-size: 13px; }
.ay-settings-badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: 999px; background: #eef2f7; color: #3c4a5d;
  font-size: 12px; font-weight: 760; letter-spacing: .02em;
}
.ay-settings-badge--pro { background: var(--accent-soft); color: var(--accent-strong); }

.ay-settings-title {
  margin: 26px 6px 8px;
  color: var(--quiet); font-size: 12.5px; font-weight: 760;
  letter-spacing: .07em; text-transform: uppercase;
}
.ay-settings-list {
  list-style: none; margin: 0; padding: 0;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px #1c2a3d0a;
}
.ay-settings-list > li + li { border-top: 1px solid var(--line); }
.ay-settings-row {
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 64px; padding: 12px 16px;
  border: 0; background: transparent; color: var(--ink);
  font: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.ay-settings-row:hover { background: #f5f8fc; }
.ay-settings-row:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: -3px; }
.ay-settings-row--static { cursor: default; }
.ay-settings-row--static:hover { background: transparent; }
.ay-settings-icon {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent-strong);
}
.ay-settings-icon svg { width: 19px; height: 19px; }
.ay-settings-row--muted .ay-settings-icon { background: #f1f3f6; color: #7a8698; }
.ay-settings-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ay-settings-text b { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.ay-settings-text small { color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.ay-settings-trailing { flex: none; display: grid; color: #93a0b1; }
.ay-settings-trailing svg { width: 18px; height: 18px; }

.ay-settings-logout {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 54px; margin-top: 28px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface-solid); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 650; cursor: pointer;
}
.ay-settings-logout svg { width: 18px; height: 18px; color: var(--muted); }
.ay-settings-logout:hover { background: #f5f8fc; }
.ay-settings-logout:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }

.ay-settings-card { border-radius: 20px; }
.ay-settings-card-title { margin: 0 0 10px; font-size: 17px; letter-spacing: -0.02em; }
.ay-settings-bullets { margin: 0 0 16px; padding-inline-start: 20px; font-size: 14.5px; line-height: 1.7; }
.ay-settings-card .ay-note { margin: 0 0 16px; }
.ay-settings-foot { margin: 18px 0 8px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.ay-check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 18px; font-size: 14.5px; line-height: 1.5; cursor: pointer; }
.ay-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.ay-settings-disclaimer { margin: 18px 6px 0; color: var(--quiet); font-size: 13px; line-height: 1.55; }

/* ---------------------------------------------------------------- bildirim */

.ay-toasts {
  position: fixed;
  z-index: 90;
  top: max(14px, env(safe-area-inset-top));
  inset-inline: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0 12px;
  pointer-events: none;
}
.ay-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(520px, 100%);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 660;
  color: #fff;
  background: #22304a;
  box-shadow: 0 18px 46px #1c2a3d3b;
  animation: ay-toast-in .18s ease-out;
  pointer-events: auto;
}
.ay-toast--ok { background: #1f744f; }
.ay-toast--error { background: var(--ay-danger); }
@keyframes ay-toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ay-toast { animation: none; } }

/* ---------------------------------------------------------------- yükleniyor */

.ay-boot {
  display: grid;
  place-items: center;
  gap: 16px;
  min-height: 62vh;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}
.ay-spinner {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: ay-spin .8s linear infinite;
}
@keyframes ay-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ay-spinner { animation-duration: 2.4s; } }

.ay-btn[data-busy="true"] { position: relative; color: transparent !important; }
.ay-btn[data-busy="true"]::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid #ffffff66;
  border-top-color: #fff;
  animation: ay-spin .7s linear infinite;
}
.ay-btn--ghost[data-busy="true"]::after,
.ay-btn--quiet[data-busy="true"]::after { border-color: #31445d44; border-top-color: #31445d; }

/* ---------------------------------------------------------------- bilgi şeridi */

.offline-review-banner { width: min(1160px, calc(100% - 40px)); }
@media (max-width: 920px) { .offline-review-banner { width: calc(100% - 24px); } }

/* 29.09.2026: sarı, çok satırlı şerit yerine sade bir satır; dokununca/tıklanınca
   tamamı açılır (shell.js). İlk cümle tıbbi uyarıdır ve kapalıyken de görünür.
   Ekran okuyucu metnin tamamını her durumda okur (yalnız görsel kırpma). */
body[data-ay-shell] .offline-review-banner {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
  margin-top: 10px; padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffffb8;
  color: var(--muted);
  box-shadow: none;
  font-size: 13px; line-height: 1.5;
  cursor: pointer;
}
body[data-ay-shell] .offline-review-banner strong { display: inline; color: var(--ink); font-size: 13px; font-weight: 720; }
body[data-ay-shell] .offline-review-banner span {
  flex: 1 1 320px; min-width: 0;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
body[data-ay-shell] .offline-review-banner[data-open="true"] span { display: block; -webkit-line-clamp: unset; overflow: visible; }
body[data-ay-shell] .offline-review-banner:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
@media (max-width: 640px) { body[data-ay-shell] .offline-review-banner span { -webkit-line-clamp: 3; } }

/* ---------------------------------------------------- klinik sütunla hizalama */
/* v142'den beri klinik içerik tek bir okunur sütunda duruyor: genişlik
   --layout-max-width (52.5rem), kenar boşluğu --layout-gutters (40 / 48 /
   24 px, app.css). Şerit ve kabuk sayfaları 1160 px'te kalınca masaüstünde
   içerikten ~320 px taşıp kayık görünüyordu; aynı değişkenlere bağlanıyorlar.
   Değişken tanımlı değilse (v113 ve öncesi) yedek değerler eski genişliklerin
   aynısı. Üst çubuk bilerek dışarıda: gezinti + profil + hesap düğmeleriyle
   doğal genişliği ~880 px (Gebelik sekmesiyle ~990 px, ölçüldü); 840 px'e
   sıkışınca "Hesap" etiketi harf harf kırılıyordu. Site başlığı gibi geniş
   kalıyor. */
body[data-ay-shell] .ay-view,
body[data-ay-shell] .offline-review-banner {
  width: min(var(--layout-max-width, 1160px), calc(100% - var(--layout-gutters, 40px)));
}
@media (max-width: 920px) {
  body[data-ay-shell] .offline-review-banner {
    width: min(var(--layout-max-width, 1160px), calc(100% - var(--layout-gutters, 24px)));
  }
}
@media (max-width: 640px) {
  body[data-ay-shell] .ay-view {
    width: min(var(--layout-max-width, 1160px), calc(100% - var(--layout-gutters, 24px)));
  }
}

/* Klinik bölüm çubuğu (.filter-bar: Tümü / Planım / Kontroller …) app.css'te
   top: 14px ile yapışkan; kabuğun yapışkan üst çubuğu (top: 10px, 74 px) onu
   kaydırınca tamamen örtüyordu (ölçüldü: 56 px'lik çubuğun 56 px'i). v142'de
   bu çubuk bölümler arası ana gezinti olduğu için görünür kalmalı: üst
   çubuğun hemen altına yapıştırılır. app.js bölüme kaydırırken
   getComputedStyle(filterBar).top okuduğu için hedefler de doğru yere iner. */
body[data-ay-shell] .filter-bar { top: calc(var(--ay-bar-h) + 20px); }

/* ---------------------------------------------------------------- Pro ve kilit */

.ay-pro-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--accent-light), var(--accent));
  color: #fff;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 6px 16px var(--accent-shadow);
}
.ay-upgrade { white-space: nowrap; }
@media (max-width: 420px) { .ay-upgrade span { display: none; } .ay-upgrade { padding-inline: 10px; } }

/* Ücretsiz sürümde kilitli bölüm düğmeleri: küçük kilit işareti. */
.filter-button.ay-locked::after {
  content: "";
  display: inline-block;
  width: 11px; height: 11px;
  margin-inline-start: 6px;
  vertical-align: -1px;
  background: currentColor;
  opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V8a5 5 0 0 1 10 0v2h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1Zm2 0h6V8a3 3 0 0 0-6 0v2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V8a5 5 0 0 1 10 0v2h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1Zm2 0h6V8a3 3 0 0 0-6 0v2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ay-locked-card {
  grid-column: 1 / -1;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: clamp(20px, 3.4vw, 30px);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, #ffffff);
  border-radius: var(--ay-radius-lg);
  background: linear-gradient(160deg, var(--accent-soft), #ffffff 62%);
  box-shadow: var(--shadow-small);
}
.ay-locked-card h2 { margin: 2px 0 8px; font-size: clamp(20px, 2.4vw, 24px); letter-spacing: -0.03em; }
.ay-locked-card p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; line-height: 1.6; max-width: 62ch; }
.ay-locked-icon {
  display: grid; place-items: center; flex: none;
  width: 48px; height: 48px; border-radius: 16px;
  background: #fff; color: var(--accent-strong);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}
.ay-locked-icon svg { width: 24px; height: 24px; }
@media (max-width: 560px) { .ay-locked-card { flex-direction: column; } }

.ay-feature-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 9px; }
.ay-feature-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.ay-feature-list svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--accent-strong); }

/* ---------------------------------------------------------------- planlar */

.ay-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 720px) { .ay-plan-grid { grid-template-columns: minmax(0, 1fr); } }

.ay-plan-card {
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--ay-radius-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-small);
}
.ay-plan-card h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.03em; }
.ay-plan-card--pro { border-color: color-mix(in srgb, var(--accent) 38%, #ffffff); background: linear-gradient(170deg, var(--accent-soft), var(--surface-solid) 48%); }
.ay-plan-card--current { outline: 2px solid var(--accent); outline-offset: -2px; }
.ay-plan-price { margin: 0 0 18px; font-size: 34px; font-weight: 800; letter-spacing: -0.04em; }
.ay-plan-price small { font-size: 15px; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.ay-plan-tax { font-size: 12px; font-weight: 600; color: var(--quiet); letter-spacing: 0; white-space: nowrap; }
.ay-plan-current { margin: auto 0 0; color: var(--accent-strong); font-size: 14px; font-weight: 720; }
.ay-plan-card .ay-actions { margin-top: auto; }
.ay-plan-card .ay-note { margin-bottom: 12px; }
.ay-plan-fine { margin: 14px 0 0; color: var(--quiet); font-size: 12.5px; line-height: 1.55; }

.ay-linklike {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ay-linklike:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- yüksek kontrast */

@media (forced-colors: active) {
  .ay-bar, .ay-card, .ay-profile-card, .ay-menu, .ay-dialog { border: 1px solid CanvasText; }
  .ay-nav-item[aria-current="page"], .ay-tab[aria-current="page"] { outline: 2px solid CanvasText; }
}
