/* ============================================================
   Klinik Takip — clineo marka teması (v3)
   Logo paleti: lacivert #152d56 · yeşil #55b893 · teal #2ba69e · mavi #1f7cb6 · gök #5cb4de
   Lüks · hareketli · şık · ergonomik · AI-odaklı
   ============================================================ */
:root {
  /* yüzeyler — serin, mavi-teal alt tonlu */
  --bg: #edf2f4;
  --bg-2: #e5edf0;
  --surface: #ffffff;
  --surface-2: #f6fafb;
  --line: #e2eaed;
  --line-2: #d2dde2;

  /* mürekkep — lacivert ailesi */
  --ink: #142338;
  --ink-2: #42536a;
  --muted: #72818f;

  /* marka — clineo logosu (bulut gradyanı) */
  --brand: #1f7cb6;
  --brand-2: #14639c;
  --brand-ink: #152d56;
  --brand-soft: #e7f2f8;
  --brand-grad: linear-gradient(135deg, #3fb28e 0%, #26a3a3 46%, #1f7cb6 100%);
  --navy-grad: linear-gradient(180deg, #1a3862 0%, #0f2244 100%);
  /* ikincil aksan — logo teal'i */
  --accent: #2ba69e;
  --accent-soft: #e2f4f2;
  --sky: #5cb4de;

  /* Neo — kliniğin akıllı asistanı (mor AI klişesi kaldırıldı → marka camgöbeği/mavi) */
  --neo: #0e9bad;          /* aydınlık temada Neo camgöbeği (koyu, okunur) */
  --neo-2: #2f6fe0;        /* Neo mavi */
  --neo-3: #7fd6e6;        /* açık camgöbeği */
  --neo-ink: #04222a;      /* Neo gradyanı üstündeki koyu mürekkep */
  --neo-grad: linear-gradient(150deg, #0e9bad 0%, #2f6fe0 100%);
  /* sıcak insan aksanı (canlılık, tahsilat, uyarı-sıcağı) */
  --warm: #ef6a4b;
  --warm-2: #f0805f;
  --warm-soft: #fdeae4;
  /* AI aksanı — geriye uyum: eski --ai* isimleri artık Neo'ya işaret eder */
  --ai: var(--neo);
  --ai-2: var(--neo-2);
  --ai-soft: rgba(14,155,173,.12);
  --ai-grad: var(--neo-grad);

  /* durum */
  --danger: #d1453b;
  --danger-soft: #fcebe9;
  --warn: #c07a00;
  --warn-soft: #fbf2dd;
  --info: #3f9ad0;
  --info-soft: #e7f2fa;
  --ok: #1f9d77;

  /* tedavi durumları (diş şeması) */
  --t-planned: #d68a04;
  --t-progress: #2b8ac2;
  --t-done: #16a081;

  /* gölge & yarıçap — lacivert alt tonlu */
  --sh-sm: 0 1px 2px rgba(15,25,45,.06), 0 1px 1px rgba(15,25,45,.04);
  --sh: 0 2px 6px rgba(15,25,45,.06), 0 12px 28px rgba(15,25,45,.08);
  --sh-lg: 0 8px 18px rgba(15,25,45,.10), 0 30px 60px rgba(15,25,45,.15);
  --sh-brand: 0 8px 22px rgba(31,124,182,.30);
  --sh-ai: 0 8px 22px rgba(109,92,240,.30);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --ease: cubic-bezier(.22,.61,.36,1);

  /* iOS güvenli alan (çentik / home çubuğu) — viewport-fit=cover ile zorunlu */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);

  /* tipografi — Space Grotesk (başlık/marka) + Inter (gövde) + JetBrains Mono (veri) */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-brand: "Space Grotesk", "Inter", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1,h2,h3,h4 { margin: 0; font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em; }
/* rakamlar hizalı otursun (tablolar, KPI'lar, tutarlar) */
table, .mono, .kpi-val, .stat-value, .k-val, .dkc-val, .fin-kpi, .tnum { font-variant-numeric: tabular-nums; }
/* büyük veri okumaları JetBrains Mono ile (₺ tutar / diş no / saat / KPI) — Neo Console imzası */
.cdash-kv, .kpi-val, .fin-kpi, .k-val, .dkc-val, .stat-value, .mono { font-family: var(--font-mono); letter-spacing: -.02em; }
button, input, select, textarea { font-family: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--brand-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cdd6d2; border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b6c1bc; background-clip: content-box; }

/* ---------- Animasyonlar ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes slideIn { from { transform: translateX(34px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shimmer { 100% { background-position: -200% 0; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(109,92,240,.45); } 70% { box-shadow: 0 0 0 16px rgba(109,92,240,0); } 100% { box-shadow: 0 0 0 0 rgba(109,92,240,0); } }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 17px; border-radius: 12px;
  border: 1px solid transparent; background: var(--brand-grad); color: #fff;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  box-shadow: var(--sh-brand); transition: transform .12s var(--ease), box-shadow .2s, filter .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 10px 26px rgba(31,124,182,.35); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .55; cursor: default; box-shadow: none; transform: none; }
.btn-block { width: 100%; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); box-shadow: var(--sh-sm); }
.btn-ghost:hover { background: var(--surface-2); filter: none; box-shadow: var(--sh-sm); }
.btn-danger { background: linear-gradient(135deg,#e0584e,#c43b31); box-shadow: 0 8px 22px rgba(209,69,59,.28); }
.btn-ai { background: var(--ai-grad); box-shadow: var(--sh-ai); }
.btn-ai:hover { box-shadow: 0 10px 26px rgba(109,92,240,.4); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }

label { display: block; font-size: 12.5px; color: var(--ink-2); margin: 13px 0 6px; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line-2);
  border-radius: 12px; background: #fff; color: var(--ink); font-size: 14px;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
textarea { resize: vertical; min-height: 78px; }

.error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 10px 0 0; }
.hint { color: var(--muted); font-size: 12px; }

/* ---------- Giriş ---------- */
.auth-wrap {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: max(24px, var(--sat)) max(24px, var(--sar)) max(24px, var(--sab)) max(24px, var(--sal));
  background:
    radial-gradient(1100px 560px at 88% -8%, #d9efe7, transparent 60%),
    radial-gradient(900px 520px at -8% 108%, #d3e9f6, transparent 55%),
    linear-gradient(120deg, #eef3f4, #e8eff2);
  background-size: 200% 200%, 200% 200%, 200% 200%;
  animation: gradientShift 18s ease 3;
}
.auth-card {
  width: 100%; max-width: 392px; background: rgba(255,255,255,.96);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 1px solid rgba(255,255,255,.7); border-radius: var(--r-lg);
  padding: 30px; box-shadow: var(--sh-lg); animation: fadeUp .5s var(--ease);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand .logo-mark { width: 42px; height: 40px; flex: none; filter: drop-shadow(0 3px 8px rgba(31,124,182,.25)); }
.brand-name { font-size: 19px; font-weight: 700; font-family: var(--font-brand); letter-spacing: -.01em; line-height: 1.1; }
.brand-name .wm-a { color: var(--brand-ink); }
.brand-name .wm-b {
  background: linear-gradient(100deg, #2ba69e 0%, #39abb6 45%, #5cb4de 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-name small { display: block; font-size: 10.5px; font-weight: 700; color: var(--accent); letter-spacing: .14em; text-transform: uppercase; font-family: var(--font-body); }
.auth-card h2 { font-size: 23px; margin: 22px 0 3px; }
.auth-sub { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
.auth-switch { margin-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--brand); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.seed-note {
  margin-top: 18px; padding: 12px 14px; border-radius: 12px; line-height: 1.7;
  background: linear-gradient(135deg, var(--brand-soft), #eef0fe); color: var(--brand-ink); font-size: 12.5px;
}

/* ---------- İskelet ---------- */
.layout { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  background: linear-gradient(180deg, #ffffff, #fbfdfc);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  padding: 20px 14px; position: sticky; top: 0; height: 100vh; height: 100dvh; z-index: 20;
  overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }
.sidebar .brand { padding: 4px 8px 18px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav button {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border: none; background: transparent; color: var(--ink-2);
  font-size: 14px; font-weight: 550; border-radius: 12px; cursor: pointer;
  text-align: left; width: 100%; position: relative; transition: background .16s, color .16s;
}
.nav button .ic { width: 20px; text-align: center; font-size: 16px; opacity: .9; transition: transform .16s; }
.nav button:hover { background: var(--surface-2); color: var(--ink); }
.nav button:hover .ic { transform: scale(1.12); }
.nav button.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; }
.nav button.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand-grad); }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; padding: 4px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--brand-grad); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; box-shadow: var(--sh-brand);
}
.who-name { font-weight: 650; font-size: 13.5px; }
.who-role { color: var(--muted); font-size: 12px; }

.main { padding: 30px 36px; min-width: 0; animation: fadeUp .4s var(--ease); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h2 { font-size: 25px; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

/* ---------- Kartlar ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 16px; margin-bottom: 26px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 20px; box-shadow: var(--sh); position: relative; overflow: hidden;
  transition: transform .16s var(--ease), box-shadow .2s;
  animation: fadeUp .45s var(--ease) backwards;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }
.card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--brand-soft); opacity: .5; }
.card:nth-child(2) { animation-delay: .05s; } .card:nth-child(3) { animation-delay: .1s; } .card:nth-child(4) { animation-delay: .15s; }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; position: relative; }
.stat-value { font-size: 30px; font-weight: 700; font-family: var(--font-head); margin-top: 8px; letter-spacing: -.03em; position: relative; }
.stat-foot { color: var(--muted); font-size: 12px; margin-top: 5px; position: relative; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; animation: fadeUp .5s var(--ease); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h3 { font-size: 15.5px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { position: relative; }
.search input { padding-left: 34px; width: 250px; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ---------- Tablo ---------- */
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; padding: 12px 20px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); border-bottom: 1px solid var(--line); }
tbody td { padding: 13px 20px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.cell-name { font-weight: 650; }
.cell-sub { color: var(--muted); font-size: 12px; }
.empty { padding: 48px 18px; text-align: center; color: var(--muted); }
.empty .big { font-size: 36px; margin-bottom: 10px; opacity: .5; }

/* ---------- Rozetler ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: #eef1f0; color: var(--muted); }
.badge.admin { background: var(--brand-soft); color: var(--brand-ink); }
.badge.doctor { background: var(--info-soft); color: var(--info); }
.badge.reception { background: var(--warn-soft); color: var(--warn); }
.badge.nurse { background: #f1ecfb; color: #6b3fa0; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.ai { background: var(--ai-soft); color: var(--ai); }
.badge.ok { background: var(--brand-soft); color: var(--brand-ink); }

/* ---------- Modal / çekmece ---------- */
.overlay { position: fixed; inset: 0; background: rgba(13,24,20,.55); backdrop-filter: none; display: flex; justify-content: flex-end; z-index: 60; animation: fadeIn .18s ease; }
.overlay.center { align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.drawer { width: 540px; max-width: 100%; height: 100%; background: var(--surface); box-shadow: var(--sh-lg); display: flex; flex-direction: column; animation: slideIn .26s var(--ease); }
.modal {
  width: 460px; max-width: calc(100% - 32px); background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); padding: 24px; animation: pop .2s var(--ease);
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  display: flex; flex-direction: column;
}
.modal-body { overflow-y: auto; flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; }
.modal-head, .modal > .drawer-foot { flex: none; }
.drawer-head, .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.drawer-head { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 19px; }
.modal-head { margin-bottom: 16px; }
.modal-head h3 { font-size: 18px; }
.x { border: none; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 3px 8px; border-radius: 9px; transition: background .15s; }
.x:hover { background: var(--surface-2); color: var(--ink); }
.drawer-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 15px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- Sekmeler ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 0 -22px 18px; padding: 0 22px; }
.tabs button { border: none; background: transparent; padding: 11px 4px; margin-right: 16px; color: var(--muted); font-size: 14px; font-weight: 650; cursor: pointer; border-bottom: 2.5px solid transparent; transition: color .15s; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--brand-ink); border-bottom-color: var(--brand); }

/* ---------- Detay satırları ---------- */
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 12px 16px; align-items: center; }
.kv dt { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kv dd { margin: 0; font-size: 14px; }
.reveal-row { display: flex; align-items: center; gap: 10px; }
.kvkk-note { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; display: flex; gap: 8px; }
.ai-card { border: 1.5px dashed var(--ai); border-radius: 12px; padding: 15px; margin-top: 10px; background: linear-gradient(135deg, #fbfbff, #f6f5ff); }
.ai-card .ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 650; }
.ai-soon { color: var(--muted); font-size: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Aranabilir seçici (typeahead) */
.pick { position: relative; }
.pick-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-lg); max-height: 240px; overflow-y: auto; padding: 4px; -webkit-overflow-scrolling: touch; }
.pick-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 8px; cursor: pointer; }
.pick-opt:hover, .pick-opt.on { background: var(--brand-soft); }
.pick-opt .pick-l { font-size: 14px; font-weight: 600; color: var(--ink); }
.pick-opt .pick-s { font-size: 12px; color: var(--muted); flex: none; }
.pick-empty { padding: 12px; text-align: center; color: var(--muted); font-size: 13px; }

/* Uygulama-içi onay penceresi (native confirm yerine) */
.cf-overlay { z-index: 200; }
.cf-modal { width: 400px; max-width: calc(100% - 32px); text-align: center; }
.cf-ic { font-size: 32px; line-height: 1; margin-bottom: 10px; }
.cf-msg { font-size: 15px; color: var(--ink); line-height: 1.55; }
.cf-foot { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }
.cf-foot .btn { min-width: 116px; }

/* Barkod okutma modalı */
.bc-dir { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.bc-dir-b { flex: 1; padding: 10px; border: 1.5px solid var(--line-2); background: #fff; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); }
.bc-dir-b.on { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.bc-dir #bc-qty { width: 74px; flex: none; text-align: center; }
#bc-input { font-size: 17px; letter-spacing: .04em; }
.bc-feed { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.bc-item { padding: 9px 12px; border-radius: 9px; font-size: 13.5px; background: var(--surface-2); animation: pop .18s var(--ease); }
.bc-item.ok { background: #e8f7ef; color: #0f7a4f; }
.bc-item.out { background: #fff3e2; color: #a05a00; }
.bc-item.warn { background: var(--danger-soft); color: var(--danger); }

/* Klinik QR (check-in) kartı */
.qr-card { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.qr-img { flex: none; background: #fff; padding: 10px; border-radius: 12px; box-shadow: var(--sh-sm); line-height: 0; }
.qr-img img { display: block; width: 168px; height: 168px; image-rendering: pixelated; }
.qr-info { flex: 1; min-width: 240px; }
.qr-url { display: flex; gap: 8px; align-items: center; }
.qr-url input { flex: 1; font-family: var(--font-mono, monospace); font-size: 12.5px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--sh-lg); z-index: 90; animation: pop .2s var(--ease); }
.toast.err { background: linear-gradient(135deg,#e0584e,#c43b31); }

/* ---------- Randevu ajandası ---------- */
.appt-wrap { display: flex; flex-direction: column; }
.appt-row { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; flex-wrap: wrap; }
.appt-row:hover { background: var(--surface-2); }
.appt-row:last-child { border-bottom: none; }
.appt-time { width: 70px; flex: none; font-weight: 700; font-size: 16px; font-family: var(--font-head); }
.appt-time .dur { display: block; font-weight: 500; font-size: 11px; color: var(--muted); font-family: var(--font-body); }
.appt-main { flex: 1; min-width: 170px; }
.appt-name { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.appt-status { flex: none; }
.appt-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============================================================
   DİŞ ŞEMASI v2
   ============================================================ */
.dchart { animation: fadeUp .4s var(--ease); }
.dchart-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.mode-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 13px; padding: 4px; gap: 4px; }
.mode-seg button { border: none; background: transparent; padding: 8px 15px; font-size: 13px; font-weight: 650; color: var(--muted); cursor: pointer; border-radius: 9px; display: inline-flex; align-items: center; gap: 7px; transition: all .18s var(--ease); }
.mode-seg button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-sm); }
.mode-seg button.on[data-mode="voice"] { background: var(--ai-grad); color: #fff; box-shadow: var(--sh-ai); }

.set-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; }
.set-seg button { border: none; background: #fff; padding: 7px 13px; font-size: 12.5px; font-weight: 650; color: var(--muted); cursor: pointer; }
.set-seg button.on { background: var(--brand-grad); color: #fff; }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }

/* Sesli (AI) panel */
.voice-panel { border: 1.5px solid var(--ai); border-radius: var(--r); padding: 18px; margin-bottom: 18px; background: linear-gradient(135deg, #fbfaff, #f4f2ff); animation: pop .25s var(--ease); }
.voice-top { display: flex; align-items: center; gap: 16px; }
.mic-btn {
  width: 58px; height: 58px; border-radius: 50%; border: none; flex: none; cursor: pointer;
  background: var(--ai-grad); color: #fff; font-size: 23px; display: grid; place-items: center;
  box-shadow: var(--sh-ai); transition: transform .14s var(--ease);
}
.mic-btn:hover { transform: scale(1.06); }
.mic-btn.live { animation: ring 1.4s infinite; }
.voice-info { flex: 1; min-width: 0; }
.voice-title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.voice-hint { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.transcript { margin-top: 12px; padding: 11px 14px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; font-size: 14px; min-height: 44px; color: var(--ink); }
.transcript .ph { color: var(--muted); }
.transcript .interim { color: var(--ai); }
.wave { display: inline-flex; gap: 3px; align-items: flex-end; height: 16px; }
.wave i { width: 3px; background: #fff; border-radius: 3px; animation: wv .9s ease-in-out infinite; }
.wave i:nth-child(2){animation-delay:.15s} .wave i:nth-child(3){animation-delay:.3s} .wave i:nth-child(4){animation-delay:.45s} .wave i:nth-child(5){animation-delay:.6s}
@keyframes wv { 0%,100%{height:5px} 50%{height:16px} }

/* AI öneri kartı (onay bekler) */
.ai-suggest { margin-top: 14px; border: 1.5px solid var(--ai); background: #fff; border-radius: 14px; padding: 14px 16px; animation: pop .2s var(--ease); }
.ai-suggest .sg-head { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 12px; }
.ai-suggest .sg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ai-suggest .sg-actions { display: flex; gap: 10px; margin-top: 14px; justify-content: flex-end; }
.sg-note { font-size: 11.5px; color: var(--muted); margin-top: 10px; display: flex; gap: 6px; }

/* Odontogram */
/* (eski quad-row odontogram düzeni kaldırıldı — v4 ark düzeni aşağıda) */
.tooth {
  position: relative; border: none; background: transparent; cursor: pointer;
  padding: 3px 1px; border-radius: 11px; flex: none; display: flex; flex-direction: column;
  align-items: center; gap: 1px; transition: transform .12s var(--ease), background .15s;
}
.tooth:hover { background: rgba(31,124,182,.08); transform: translateY(-2px); }
.tooth.sel { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.tooth .tsvg { display: block; filter: drop-shadow(0 1px 1px rgba(13,30,25,.10)); transition: transform .12s var(--ease); }
.tooth:hover .tsvg { transform: scale(1.04); }
.tooth .tnum { font-size: 9.5px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.2; font-weight: 600; }
.tooth.sel .tnum { color: var(--brand-ink); }
.tooth .tcount { position: absolute; top: -2px; right: -2px; background: var(--ink); color: #fff; font-size: 9px; font-weight: 700; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 9px; display: grid; place-items: center; }

/* Diş detay */
.tooth-detail { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; animation: fadeUp .3s var(--ease); }
.td-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 12px; }
.td-head strong { font-size: 17px; font-family: var(--font-head); }
.td-list { display: flex; flex-direction: column; gap: 9px; }
.td-item { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; transition: box-shadow .15s; }
.td-item:hover { box-shadow: var(--sh-sm); }
.td-item .tdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 7px; }
.td-item strong { font-size: 13.5px; }
.td-row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.td-actions { display: flex; gap: 6px; margin-top: 9px; }
.td-add { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
.td-add .full { grid-column: 1 / -1; }

/* skeleton */
.skel { background: linear-gradient(90deg, #eef1f0 25%, #f6f8f7 37%, #eef1f0 63%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }

/* ============================================================
   NEO — global AI asistanı ("Hey Neo")
   ============================================================ */
.neo-fab { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: flex; align-items: flex-end; gap: 10px; }
/* canlı Neo maskotu — daire buton değil, gerçek karakter (gözsüz taban + SVG canlı göz) */
.neo-btn { border: none; background: none; cursor: pointer; padding: 0; position: relative; width: 76px; line-height: 0;
  filter: drop-shadow(0 10px 22px color-mix(in srgb, var(--neo) 38%, transparent)); transition: transform .16s var(--ease); }
.neo-btn:hover { transform: translateY(-3px) scale(1.05); }
.neo-btn::before { content: ""; position: absolute; left: 50%; top: 42%; width: 78px; height: 78px; transform: translate(-50%,-50%);
  border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--neo) 30%, transparent), transparent 68%); filter: blur(4px); z-index: 0; }
.neo-btn.closing { display: none; }
.neo-tip { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh); border-radius: 12px; padding: 8px 12px; font-size: 12px; font-weight: 650; color: var(--ink); animation: floaty 3s ease-in-out 3; margin-bottom: 16px; }

/* ---- paylaşılan canlı Neo figürü (FAB + panel başlık + panel hero) ---- */
.neo-fig { position: relative; display: inline-block; z-index: 2; }
.neo-fig img { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 18px color-mix(in srgb, var(--neo) 26%, transparent)); }
.neo-fig.bob { animation: neoBob 4.6s ease-in-out infinite; }
.neo-fig-sm { width: 76px; }
.neo-fig-md { width: 46px; }
.neo-fig-lg { width: 158px; }
.neo-eyes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.neo-eyes > g { display: none; }
.neo-eyes .bloom { display: block; animation: neoBloom 3s ease-in-out infinite; }
.neo-eyes[data-exp="idle"] .e-open, .neo-eyes[data-exp="listen"] .e-open { display: block; }
.neo-eyes[data-exp="happy"] .e-happy { display: block; }
.neo-eyes[data-exp="think"] .e-think { display: block; }
.neo-eyes .e-open { transform-box: fill-box; transform-origin: center; }
.neo-eyes[data-exp="idle"] .e-open { animation: neoBlink 4.6s infinite; }
.neo-eyes[data-exp="listen"] .e-open { animation: neoEyePulse 1.3s ease-in-out infinite; }
.neo-eyes .e-think .dots circle { opacity: .2; animation: neoDot 1.3s infinite; }
.neo-eyes .e-think .dots circle:nth-child(2) { animation-delay: .2s; }
.neo-eyes .e-think .dots circle:nth-child(3) { animation-delay: .4s; }
@keyframes neoBlink { 0%,88%,100% { transform: scaleY(1); } 93% { transform: scaleY(.07); } }
@keyframes neoEyePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.16); } }
@keyframes neoBloom { 0%,100% { opacity: .45; } 50% { opacity: .82; } }
@keyframes neoDot { 0%,100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes neoBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.neo-panel { position: fixed; right: 26px; bottom: 26px; width: 400px; max-width: calc(100vw - 32px); height: 600px; max-height: calc(100vh - 52px); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--sh-lg); z-index: 81; display: flex; flex-direction: column; overflow: hidden; animation: pop .22s var(--ease); transition: width .28s var(--ease), height .28s var(--ease), right .28s var(--ease), bottom .28s var(--ease); }
/* tam ekran Neo — sağ-alttan büyür, ortalanmış geniş sayfa */
.neo-panel.full { right: 50%; bottom: 50%; transform: translate(50%, 50%); width: min(940px, 96vw); height: min(780px, 94vh); max-width: 96vw; max-height: 94vh; }
.neo-panel.full .neo-body { padding: 22px min(9vw, 120px); }
.neo-panel.full .neo-foot { padding: 16px min(9vw, 120px); }
.neo-panel.full .neo-head .neo-fig-md { width: 60px; }
.neo-head { padding: 13px 16px; background: linear-gradient(150deg, #0b8ea6 0%, #2f6fe0 100%); color: #fff; display: flex; align-items: center; gap: 12px; }
.neo-ava { width: 46px; flex: none; display: grid; place-items: center; }
.neo-max { border: none; background: rgba(255,255,255,.18); color: #fff; cursor: pointer; font-size: 14px; border-radius: 8px; padding: 5px 8px; line-height: 1; transition: background .15s; }
.neo-max:hover { background: rgba(255,255,255,.3); }
.neo-head h4 { font-size: 16.5px; font-family: var(--font-head); }
.neo-head .st { font-size: 11.5px; opacity: .92; margin-top: 1px; }
.neo-wake { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #fff; margin: 0 0 0 auto; cursor: pointer; font-weight: 600; }
.neo-wake input { width: auto; }
.neo-spk { border: none; background: rgba(255,255,255,.18); color: #fff; cursor: pointer; font-size: 14px; border-radius: 8px; padding: 4px 8px; line-height: 1; transition: background .15s; }
.neo-spk:hover { background: rgba(255,255,255,.3); }
.neo-head .x { color: #fff; }
.neo-head .x:hover { background: rgba(255,255,255,.18); }

.neo-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 11px; background: var(--surface-2); }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.55; animation: fadeUp .25s var(--ease); word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--brand-grad); color: #fff; border-bottom-right-radius: 5px; box-shadow: var(--sh-sm); }
.msg.neo { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; box-shadow: var(--sh-sm); }
.msg .big-num { font-family: var(--font-head); font-size: 27px; font-weight: 700; color: var(--ai); vertical-align: -3px; margin: 0 2px; }
.neo-report { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.neo-report .ri { background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; }
.neo-report .ri b { font-family: var(--font-head); font-size: 19px; display: block; color: var(--ink); }
.neo-report .ri span { font-size: 11px; color: var(--muted); }
.neo-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.neo-chip { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; transition: all .14s; }

/* Neo tedavi onay kartı — AI önerir, hekim onaylar (sert kural #1) */
.neo-tx { border: 1.5px solid var(--ai); border-radius: 14px; background: linear-gradient(180deg, #fff, var(--ai-soft)); padding: 12px 13px; margin-top: 4px; box-shadow: 0 6px 18px rgba(109,92,240,.14); }
.neo-tx-head { display: flex; align-items: center; gap: 7px; font-size: 13.5px; margin-bottom: 9px; }
.neo-tx-ai { margin-left: auto; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; color: var(--ai); background: #fff; border: 1px solid var(--ai); padding: 2px 7px; border-radius: 999px; }
.neo-tx-body { display: grid; gap: 6px; }
.neo-tx-row { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 8px; font-size: 12.5px; }
.neo-tx-row > span { color: var(--muted); font-weight: 600; }
.neo-tx-row input, .neo-tx-row select { padding: 7px 10px; font-size: 13px; border-radius: 9px; }
.neo-tx-actions { display: flex; gap: 8px; margin-top: 11px; }
.neo-tx-note { margin-top: 9px; font-size: 10.5px; color: var(--muted); }
.neo-tx.done { opacity: .55; pointer-events: none; }
.neo-tx.done .neo-tx-actions { display: none; }
.neo-tx.cancelled { opacity: .45; pointer-events: none; text-decoration: none; }
.neo-tx.cancelled .neo-tx-actions { display: none; }
.neo-chip:hover { border-color: var(--ai); color: var(--ai); background: var(--ai-soft); }
.neo-typing { display: inline-flex; gap: 4px; padding: 3px 0; }
.neo-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: wv2 1s infinite; }
.neo-typing i:nth-child(2){animation-delay:.15s} .neo-typing i:nth-child(3){animation-delay:.3s}
@keyframes wv2 { 0%,100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.neo-foot { padding: 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; background: #fff; }
.neo-foot input { flex: 1; padding: 10px 12px; }
.neo-mic { width: 42px; height: 42px; border-radius: 12px; border: none; cursor: pointer; background: var(--ai-soft); color: var(--ai); font-size: 18px; flex: none; transition: transform .12s; }
.neo-mic:hover { transform: scale(1.05); }
.neo-mic.live { background: var(--ai-grad); color: #fff; animation: ring 1.4s infinite; }

/* ---------- Responsive ----------
   NOT: kenar çubuğu (çekmece) + neo + güvenli-alan kuralları aşağıdaki
   tek yetkili blokta (bkz. "MOBİL SAĞLAMLAŞTIRMA"). Burada yalnızca
   çakışmayan grid/padding düzeltmeleri kalır. */
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .main { padding: 20px 16px; }
  .ai-suggest .sg-grid { grid-template-columns: 1fr; }
  .quad-row { gap: 12px; }
}

/* ============================================================
   CREATIVE FX (v3) — aurora arka plan, glassmorphism, animasyon
   ============================================================ */
:root {
  --glass: rgba(255,255,255,.66);
  --glass-strong: rgba(255,255,255,.82);
  --glass-brd: rgba(255,255,255,.7);
}

/* Hareketli aurora arka plan */
body { background: #e9eef1; position: relative; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40% 42% at 12% 16%, rgba(31,124,182,.26), transparent 60%),
    radial-gradient(36% 38% at 88% 10%, rgba(85,184,147,.22), transparent 60%),
    radial-gradient(44% 46% at 80% 90%, rgba(43,166,158,.24), transparent 60%),
    radial-gradient(42% 44% at 16% 94%, rgba(92,180,222,.22), transparent 60%);
  filter: saturate(120%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(233,238,241,.55), rgba(227,233,236,.78));
}
@keyframes auroraMove {
  0%   { transform: translate3d(0,0,0) scale(1) rotate(0deg); }
  50%  { transform: translate3d(2.5%,-2%,0) scale(1.1) rotate(4deg); }
  100% { transform: translate3d(-2.5%,2.5%,0) scale(1.06) rotate(-3deg); }
}

/* Cam yüzeyler */
.auth-wrap { background: transparent !important; }
.auth-card {
  background: rgba(255,255,255,.96); backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--glass-brd);
  box-shadow: var(--sh-lg);
  animation: popIn .5s var(--ease) both;
}
.sidebar {
  background: var(--surface); backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-right: 1px solid var(--glass-brd);
}
.card, .panel {
  background: var(--surface); backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--glass-brd);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
  animation: fadeUp .45s var(--ease) both;
}
.drawer, .modal { background: rgba(255,255,255,.97); }

/* Kart hover: yükselme + üst gradient şerit */
.card { position: relative; overflow: hidden; }
.card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--brand-grad); opacity: 0; transition: opacity .22s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.card:hover::before { opacity: 1; }

/* Parlayan logo işareti */
.logo-mark { animation: logoFloat 5s ease-in-out 3; }
@keyframes logoFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* İstatistik değerleri gradient */
.stat-value { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Birincil butonlar: gradient + glow + mikro etkileşim */
.btn { transition: transform .16s var(--ease), box-shadow .16s var(--ease), filter .16s var(--ease); }
.btn:not(.btn-ghost):not(.btn-danger) { background: var(--brand-grad); border-color: transparent; box-shadow: var(--sh-brand); }
.btn:not(.btn-ghost):not(.btn-danger):hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 12px 28px rgba(31,124,182,.38); }
.btn:active { transform: translateY(0) scale(.98); }

/* Nav aktif: yumuşak gradient */
.nav button.active { background: linear-gradient(135deg, rgba(43,166,158,.15), rgba(124,108,245,.12)); color: var(--brand-ink); }
.nav button { transition: background .18s var(--ease), transform .12s var(--ease); }
.nav button:hover { transform: translateX(2px); }

/* Tablo satır hover */
tbody tr { transition: background .15s var(--ease); }
tbody tr:hover { background: rgba(31,124,182,.06); }

/* Sayfa başlığı + panel girişi */
.page-head { animation: fadeUp .4s var(--ease) both; }

/* Neo FAB: güçlü glow + nabız */
.neo-btn { box-shadow: 0 10px 30px rgba(109,92,240,.5), 0 0 0 0 rgba(124,108,245,.45); animation: neoPulse 2.6s ease-in-out 3; }
@keyframes neoPulse {
  0%   { box-shadow: 0 10px 30px rgba(109,92,240,.5), 0 0 0 0 rgba(124,108,245,.45); }
  70%  { box-shadow: 0 10px 34px rgba(109,92,240,.55), 0 0 0 16px rgba(124,108,245,0); }
  100% { box-shadow: 0 10px 30px rgba(109,92,240,.5), 0 0 0 0 rgba(124,108,245,0); }
}

/* Giriş animasyonları */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* Diş hover parıltısı (varsa güçlendir) */
.tooth { transition: transform .14s var(--ease), filter .14s var(--ease); }
.tooth:hover { transform: translateY(-2px) scale(1.04); }

@media (prefers-reduced-motion: reduce) {
  body::before, .logo, .neo-btn { animation: none; }
}

/* ============================================================
   TEDAVİ & ÖDEME (finansal) + diş şeması efektleri
   ============================================================ */
.fin-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 6px; }
.fin-card {
  background: var(--surface); backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
  animation: fadeUp .4s var(--ease) both;
}
.fin-card span { font-size: 12px; color: var(--muted); font-weight: 600; }
.fin-card b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fin-card.balance.due { border-color: rgba(209,69,59,.35); background: linear-gradient(135deg, rgba(252,235,233,.9), var(--glass)); }
.fin-card.balance.due b { color: var(--danger); }
.fin-card.balance.paid { border-color: rgba(15,157,110,.35); }
.fin-card.balance.paid b { color: var(--t-done); }

.fin-sec-title { font-size: 13px; font-weight: 700; color: var(--ink); margin: 18px 0 8px; }
.fin-tbl { width: 100%; border-collapse: collapse; }
.fin-tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.fin-tbl td { padding: 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.fin-tbl tbody tr:hover { background: rgba(31,124,182,.05); }

.pay-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.pay-form #pay-note { grid-column: 1 / -1; }
.pay-form #pay-add { grid-column: 1 / -1; }
.pay-list { display: flex; flex-direction: column; gap: 8px; }
.pay-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px;
  background: var(--surface-2);
}
.pay-row .cell-sub { grid-column: 1 / 2; }
.pay-row .pay-del { grid-row: 1 / 3; grid-column: 2; align-self: center; }

/* Diş şeması — giriş animasyonu + tedavili diş parıltısı */
.odonto .tooth { animation: toothIn .4s var(--ease) both; }
@keyframes toothIn { from { opacity: 0; transform: translateY(6px) scale(.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
.tooth.has { filter: drop-shadow(0 0 6px rgba(43,166,158,.30)); }
.tooth.has:hover { filter: drop-shadow(0 4px 10px rgba(43,166,158,.4)); }
.tooth.sel { animation: toothPulse 1.4s ease-in-out 2; }
@keyframes toothPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(43,166,158,.0); } 50% { box-shadow: 0 0 0 5px rgba(43,166,158,.18); } }

@media (max-width: 560px) { .fin-cards { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .odonto .tooth, .tooth.sel { animation: none; } }

/* ============================================================
   ODONTOGRAM v2 — gerçekçi, referans tarzı
   ============================================================ */
.odo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.odo-title { font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.odo-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Odontogram paneli — yumuşak klinik zemin */
.odonto {
  background:
    radial-gradient(120% 90% at 50% -12%, #ffffff 0%, transparent 55%),
    linear-gradient(180deg, #f6fafb 0%, #e9f0f3 100%);
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 24px 16px 22px; position: relative; box-shadow: inset 0 1px 0 rgba(255,255,255,.85), var(--sh-sm);
}
.arch-tag { display: flex; align-items: baseline; gap: 7px; color: var(--ink-2); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin: 0 4px 8px 6px; }
.arch-tag.bot { margin: 10px 4px 0 6px; }
.arch-tag small { font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.arch-side { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: .02em; }
.arch-side b { color: var(--ink-2); }
/* Ark satırı — gülüş eğrisi transformları hücre --aty/--arot değişkenlerinden gelir */
.arch-row { display: flex; justify-content: center; align-items: flex-start; gap: 1px; min-width: 740px; padding-bottom: 16px; }
.arch-row.lower { align-items: flex-end; padding: 16px 0 0; }
.arch-mid { align-self: stretch; width: 12px; flex: none; background: repeating-linear-gradient(180deg, var(--line-2) 0 6px, transparent 6px 12px) 50% 0 / 1px 100% no-repeat; }
.arch-mid-line { height: 1px; margin: 6px 36px; background: repeating-linear-gradient(90deg, var(--line-2) 0 8px, transparent 8px 16px); }

/* Diş — biraz daha büyük, gölgeli, gerçekçi */
.tooth .tsvg { filter: drop-shadow(0 2px 2px rgba(13,30,25,.14)); }
.tooth.has .tnum { color: var(--ink); font-weight: 700; }

/* Açıklama (legend) şeridi */
.odo-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin-top: 16px; padding: 12px 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2);
}
.odo-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0,0,0,.04); }
.lg-sep { width: 1px; height: 16px; background: var(--line-2); }
.lg-tooth { width: 13px; height: 16px; border-radius: 4px 4px 6px 6px; background: linear-gradient(180deg,#fff,#e9edec); border: 1.5px solid #b4beba; }
.lg-tooth.treated { border-color: var(--t-done); background: linear-gradient(180deg,#fff,#e7f1ed); box-shadow: 0 0 5px rgba(43,166,158,.4); }
.lg-badge { width: 16px; height: 16px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 9px; font-weight: 700; display: grid; place-items: center; }

@media (max-width: 560px) {
  .quad-row { gap: 14px; }
  .tooth .tsvg { width: 28px; height: 44px; }
}

/* Sonsuz animasyonları sınırla (perf + ekran yakalama; statik glow korunur) */
.neo-btn { animation: neoPulse 2.6s ease-in-out 3 both !important; }
.neo-btn::after { animation: ring 2.6s 3 both !important; }
.neo-tip { animation: floaty 3s ease-in-out 3 both !important; }
.logo { animation: logoFloat 5s ease-in-out 3 both !important; }
.tooth .tsvg { filter: drop-shadow(0 1px 1.5px rgba(13,30,25,.16)); }

/* Perf: dişlerde pahalı CSS drop-shadow filtrelerini kaldır (derinlik SVG gradyanında) */
.tooth .tsvg, .tooth.has, .tooth.has:hover, .tooth:hover .tsvg { filter: none !important; }
.tooth.has { background: rgba(43,166,158,.10); border-radius: 11px; }
.tooth.has:hover { background: rgba(43,166,158,.16); }

/* ============================================================
   ODONTOGRAM v3 — yüzey bazlı (clinio tarzı) + işlem paleti
   ============================================================ */
.odo-title small { font-family: var(--font-body); font-weight: 600; font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-left: 6px; }
.seg-group { display: inline-flex; align-items: center; gap: 8px; }
.seg-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.rec-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #fff; }
.rec-seg button { border: none; background: transparent; padding: 7px 13px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.rec-seg button.on { background: var(--brand-grad); color: #fff; }

/* işlem paleti */
.tool-palette { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }
.tool {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1.5px solid var(--line-2); background: #fff; border-radius: 10px;
  padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: border-color .14s, box-shadow .14s, transform .1s;
}
.tool:hover { transform: translateY(-1px); border-color: var(--tc); }
.tool.on { border-color: var(--tc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 18%, transparent); color: var(--ink); }
.tool .tool-sw { width: 13px; height: 13px; border-radius: 4px; background: var(--tc); flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.tool small { font-size: 9.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

/* diş hücresi (anatomik diş + dairesel yüzey haritası) */
.tcell {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 2px; border-radius: 12px; cursor: default;
  transform: translateY(var(--aty, 0)) rotate(var(--arot, 0));
  transition: background .12s, box-shadow .12s;
}
.tcell.sel { background: rgba(20,160,180,.10); box-shadow: inset 0 0 0 2px #14a0b4, 0 0 0 4px rgba(20,160,180,.14); }
.tcell .tnum { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.tcell.has .tnum { color: var(--brand-ink); }
.tcell .tcrown { position: relative; line-height: 0; cursor: pointer; display: inline-block; transition: transform .16s var(--ease), filter .16s var(--ease); }
.tcell .tcrown:hover { transform: translateY(-3px) scale(1.07); filter: drop-shadow(0 9px 15px rgba(15,25,45,.22)); }
/* premium 3D: varsayılan yumuşak zemin gölgesi (kök altı) + seçilide turkuaz glow */
.tcell .tcrown .tsvg { width: 40px; height: 76px; filter: drop-shadow(0 3px 4px rgba(30,45,70,.15)); transition: filter .16s var(--ease); }
.tcell.sel .tcrown .tsvg { filter: drop-shadow(0 4px 7px rgba(20,140,160,.4)); }
.tcell .tcount { position: absolute; top: -3px; right: -3px; background: var(--brand-ink); color: #fff; font-size: 9px; font-weight: 700; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 9px; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(15,25,45,.3); }

/* Diş adı tooltip'i — hover'da FDI no + konum + diş adı */
.tcell::after {
  content: attr(data-tip);
  position: absolute; left: 50%; translate: -50% 0; z-index: 40;
  background: var(--brand-ink); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  padding: 5px 10px; border-radius: 8px; box-shadow: 0 6px 18px rgba(15,25,45,.35);
  opacity: 0; pointer-events: none; transition: opacity .14s var(--ease), translate .14s var(--ease);
}
.tcell.tc-up::after { top: -30px; }
.tcell.tc-low::after { bottom: -30px; }
.tcell:hover::after { opacity: 1; }
.tcell.tc-up:hover::after { translate: -50% -3px; }
.tcell.tc-low:hover::after { translate: -50% 3px; }
@media (pointer: coarse) { .tcell::after { display: none; } } /* dokunmatikte tooltip yerine seçim detayı var */

.surfgrid { display: block; }
.surfgrid .sz { cursor: pointer; transition: opacity .1s, filter .1s; }
.surfgrid .sz:hover { opacity: .6; filter: brightness(.92); }

.lg-sw { width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }

/* ============================================================
   ODONTOGRAM v5 — tam sayfa şema (kron + KÖK ayrı tıklanır)
   ============================================================ */
/* Tıklanabilir bölgeler: taç ve her kök — ayrı hover geri bildirimi */
.tcrownhit { cursor: pointer; transition: filter .12s; }
.tcell .tcrown:hover .tcrownhit { filter: brightness(1.06) saturate(1.05); }
.troot { cursor: pointer; transition: filter .12s; }
.troot:hover { filter: brightness(1.04) drop-shadow(0 0 3px rgba(124,58,237,.8)); }

/* Tam ekran katman */
.overlay.chart-overlay { justify-content: stretch; align-items: stretch; padding: 0; background: rgba(13,24,20,.62); }
.chart-fs { width: 100%; height: 100%; background: var(--bg, #eef3f5); display: flex; flex-direction: column; animation: fadeIn .2s ease; }
.chart-fs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 22px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--sh-sm); z-index: 2; }
.chart-fs-title { display: flex; align-items: center; gap: 12px; }
.chart-fs-title h3 { font-family: var(--font-head); font-size: 18px; margin: 0; letter-spacing: -.01em; }
.chart-fs-title .who-role { font-size: 12px; color: var(--muted); }
.chart-back { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; font-size: 22px; line-height: 1; color: var(--ink-2); cursor: pointer; }
.chart-back:hover { background: var(--surface-2); }
.chart-fs-body { flex: 1; min-height: 0; overflow: hidden; padding: 16px 18px; display: flex; }

/* 3-BÖLGE PREMIUM ÇALIŞMA EKRANI: sol=alet paleti · merkez=diş arkı · sağ=seçili diş+özet.
   Tüm yüksekliği doldurur; sayfa kaymaz, her ray kendi içinde kayar (klinik yazılımı hissi). */
.dchart-full { flex: 1; min-height: 0; width: 100%; max-width: 1720px; margin: 0 auto; display: flex; flex-direction: column; }
.dchart-full .odo-head { flex: none; margin-bottom: 14px; }
.dchart-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 236px minmax(0, 1fr) 350px; gap: 16px; align-items: stretch; }
.dchart-rail { min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 14px; padding-right: 3px; }
.dchart-rail::-webkit-scrollbar { width: 8px; }
.dchart-rail::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
.dchart-stage { min-width: 0; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.dchart-stage .odonto { overflow-x: auto; }
.side-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--sh-sm); }
.side-h { font-family: var(--font-head); font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--brand-ink, #0c447c); margin-bottom: 12px; }

/* SOL RAY — kategorili, dikey, tam-genişlik alet listesi */
.tool-cats { display: flex; flex-direction: column; gap: 14px; }
.cat-h { display: flex; flex-direction: column; gap: 1px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 8px; }
.cat-hint { font-weight: 600; letter-spacing: 0; font-size: 10px; color: var(--muted); }
.cat-tools { display: flex; flex-direction: column; gap: 6px; }
.dchart-rail-left .tool { width: 100%; justify-content: flex-start; padding: 9px 11px; font-size: 12.5px; }
.dchart-rail-left .tool small { margin-left: auto; }

/* SAĞ RAY — TEDAVİ ÖZETİ (dikey yığın) */
.dchart-summary { }
.sum-h { font-family: var(--font-head); font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--brand-ink, #0c447c); margin-bottom: 12px; }
.sum-h small { font-family: var(--font-body); font-weight: 600; letter-spacing: 0; color: var(--muted); margin-left: 8px; }
.sum-cols { display: flex; flex-direction: column; gap: 10px; }
.sum-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.sum-col-h { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 9px; }
.sum-col-h b { margin-left: auto; background: #fff; border: 1px solid var(--line-2); border-radius: 20px; min-width: 22px; text-align: center; padding: 1px 6px; font-size: 11px; color: var(--ink-2); }
.sum-items { display: flex; flex-wrap: wrap; gap: 6px; }
.sum-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-2); background: #fff; border: 1px solid var(--line-2); border-left: 3px solid var(--c, #ccc); border-radius: 7px; padding: 3px 8px; }
.sum-chip b { color: var(--ink); font-weight: 700; }
.sum-empty { color: var(--muted); font-size: 12px; }

/* bölge rozetleri (kök / yüzey) + detay bölge etiketi */
.reg-b { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .03em; padding: 1px 4px; border-radius: 4px; }
.reg-b.root { background: #efe7fb; color: #6d28d9; }
.reg-b.surf { background: #e7f0f6; color: #1f6390; }
.td-reg { font-size: 11px; color: var(--muted); font-weight: 600; }

/* orta genişlikte rayları biraz daralt */
@media (max-width: 1200px) {
  .dchart-main { grid-template-columns: 210px minmax(0,1fr) 306px; gap: 12px; }
}
/* dar ekran: tek kolon — ark önce, sonra palet, sonra özet; sayfa kaydırılır (mobil) */
@media (max-width: 900px) {
  .chart-fs-body { overflow: auto; display: block; padding: 14px 12px 20px; }
  .dchart-full { display: block; }
  .dchart-main { display: flex; flex-direction: column; }
  .dchart-rail, .dchart-stage { overflow: visible; min-height: 0; }
  .dchart-stage { order: 1; }
  .dchart-rail-left { order: 2; }
  .dchart-rail-right { order: 3; }
  .dchart-rail-left .cat-tools { flex-direction: row; flex-wrap: wrap; }
  .dchart-rail-left .tool { width: auto; }
}
@media (max-width: 640px) {
  .odonto { padding: 18px 10px 16px; }
}

/* ============================================================
   UYGULAMA KABUĞU v4 — clineo.app (koyu yan menü + üst bar)
   ============================================================ */
.layout { grid-template-columns: 250px 1fr; }
#app-view.nav-collapsed { grid-template-columns: 0 1fr; }
#app-view.nav-collapsed .sidebar { display: none; }

/* --- Koyu yan menü (logo laciverti) --- */
.sidebar {
  background: var(--navy-grad) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  border-right: 1px solid rgba(255,255,255,.06);
  color: #cfe0f5; padding: 18px 14px; gap: 4px;
}
.sidebar .brand { padding: 6px 8px 16px; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar .brand-name .wm-a { color: #fff; }
.sidebar .brand-name .wm-b { background: linear-gradient(100deg, #55b893 0%, #3fc0c9 45%, #5cb4de 100%); -webkit-background-clip: text; background-clip: text; }
.sidebar .brand .logo-mark { filter: drop-shadow(0 3px 10px rgba(92,180,222,.35)) brightness(1.12); }
.sidebar .brand-name .dot-app, .auth-card .dot-app { color: #5cb4de; -webkit-text-fill-color: #5cb4de; }
.sidebar .brand-name small { color: rgba(255,255,255,.5); }
.nav-sec { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: rgba(255,255,255,.38); padding: 14px 12px 6px; }
.nav button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 12px; border: none; background: transparent; color: rgba(255,255,255,.78);
  font-size: 14px; font-weight: 600; border-radius: 10px; cursor: pointer;
  position: relative; transition: background .14s, color .14s;
}
.nav button .ic { width: 20px; text-align: center; font-size: 15px; opacity: .9; }
.nav button:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav button.active { background: linear-gradient(90deg, rgba(43,166,158,.22), rgba(92,180,222,.14)); color: #fff; }
.nav button.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(180deg, #55b893, #1f7cb6); }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.side-logout { width: 100%; padding: 10px 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #e6f3ee; border-radius: 10px; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: background .14s; }
.side-logout:hover { background: rgba(255,255,255,.1); }
.side-credit { font-size: 10.5px; color: rgba(255,255,255,.35); text-align: center; margin-top: 10px; }

/* --- İçerik + üst bar --- */
.content { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 62px; padding: 0 22px; background: #ffffff;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.tb-title { font-family: var(--font-head); font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--ink); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 16px; color: var(--ink-2); display: grid; place-items: center; position: relative; transition: background .14s, border-color .14s; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.icon-btn.bell .nd { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px #fff; display: none; }
.tb-search { position: relative; display: flex; align-items: center; }
.tb-search .ic { position: absolute; left: 11px; color: var(--muted); font-size: 15px; }
.tb-search input { width: 230px; padding: 9px 12px 9px 32px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; }
.tb-search input:focus { background: #fff; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border-radius: 12px; cursor: pointer; transition: background .14s; }
.user-chip:hover { background: var(--surface-2); }
.user-chip .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; font-family: var(--font-head); }
.user-chip .who-name { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.15; }
.user-chip .who-role { font-size: 11.5px; color: var(--muted); line-height: 1.15; }
.user-chip .uc-caret { color: var(--muted); font-size: 11px; }

/* aurora'yı kabuğun altında tut (içerik beyaz zaten) */
.content .main { background: transparent; }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  /* Kenar çubuğu: dışarı kayan çekmece (display:none yerine translateX → animasyonlu) */
  #app-view .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 84vw; max-width: 300px; z-index: 90;
    flex-direction: column; align-items: stretch;
    overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
    box-shadow: var(--sh-lg);
    transform: translateX(-100%); transition: transform .26s var(--ease);
    padding-top: calc(20px + var(--sat)); padding-bottom: calc(20px + var(--sab));
    padding-left: calc(14px + var(--sal));
  }
  #app-view.nav-open .sidebar { transform: translateX(0); }
  .user-chip .uc-text, .user-chip .uc-caret, .tb-search { display: none; }
  .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 89; }
}
.nav-backdrop[hidden] { display: none !important; }

/* perf: üst bar opak (capture/perf) */
.topbar { background: #ffffff !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

/* ============================================================
   HASTA KARTI v1 — clineo.app referans tasarımı
   ============================================================ */
.pcard { animation: fadeUp .35s var(--ease) both; }
.pcard-back { margin-bottom: 8px; color: var(--muted); font-size: 13px; }

/* ---------- Hero başlık ---------- */
.pcard-hero {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, #1f7cb6 0%, #17335f 58%, #0f2244 100%);
  border-radius: var(--r-lg); padding: 28px 32px; color: #fff;
  position: relative; overflow: hidden;
}
.pcard-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 30%, rgba(133,183,235,.25) 0%, transparent 55%);
  pointer-events: none;
}
.pcard-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,.18); border: 3px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; font-family: var(--font-head);
  flex-shrink: 0; position: relative; z-index: 1;
}
.pcard-info { flex: 1; min-width: 200px; position: relative; z-index: 1; }
.pcard-name { font-size: 1.5rem; font-weight: 700; margin: 0 0 4px; line-height: 1.2; }
.pcard-name .badge { background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.pcard-meta { font-size: 13px; opacity: .85; display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.pcard-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pbadge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 500;
  background: rgba(255,255,255,.22); color: #fff; backdrop-filter: none;
}
.pbadge.alert { background: rgba(211,69,69,.5); }
.pbadge.ins { background: rgba(255,255,255,.25); border: 1px solid rgba(255,255,255,.35); }

.pcard-actions {
  display: flex; flex-direction: column; gap: 8px;
  position: relative; z-index: 1; flex-shrink: 0;
}
.pcard-btn {
  padding: 8px 18px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; cursor: pointer; border: none;
  white-space: nowrap; text-align: center;
}
.pcard-btn.primary { background: #fff; color: #0a5544; }
.pcard-btn.primary:hover { background: #e3f3ee; }
.pcard-btn.outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.pcard-btn.outline:hover { background: rgba(255,255,255,.12); }
.pcard-btn.danger-o { background: transparent; color: #ffb4b4; border: 1.5px solid rgba(255,180,180,.4); font-size: 12px; }
.pcard-btn.danger-o:hover { background: rgba(211,69,69,.2); }

/* ---------- Stat kartları ---------- */
.pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.pstat {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px 20px; box-shadow: var(--sh-sm);
}
.pstat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  background: var(--brand-soft); color: var(--brand);
}
.pstat-icon.active { background: #e6f0f7; color: var(--info); }
.pstat-icon.money { background: #fef2e3; color: #c07a00; }
.pstat-icon.clock { background: #f3f0fe; color: var(--ai); }
.pstat-body { display: flex; flex-direction: column; }
.pstat-body b { font-size: 1.35rem; font-family: var(--font-head); font-weight: 700; color: var(--ink); line-height: 1.1; }
.pstat-body span { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pstat-tag { font-size: 11px; color: var(--info); font-weight: 600; margin-top: 2px; }

/* ---------- Sekmeler (hasta kartı — mevcut .tabs'i genişlet) ---------- */
.pcard .tabs { margin-bottom: 0; border-bottom: 2px solid var(--line); padding: 0; }
.pcard .tabs button {
  padding: 10px 18px; font-size: 13.5px; font-weight: 500;
  background: none; border: none; color: var(--muted);
  cursor: pointer; position: relative;
}
.pcard .tabs button.active { color: var(--brand); font-weight: 600; }
.pcard .tabs button.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2.5px; background: var(--brand); border-radius: 2px 2px 0 0;
}

/* ---------- Genel Bilgiler — alan ızgarası ---------- */
.info-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; margin-top: 16px; }
.info-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.info-head h4 { font-size: 15px; font-weight: 600; }
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.info-field {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 14px;
}
.info-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.info-field div { font-size: 14px; font-weight: 500; color: var(--ink); word-break: break-word; }
.info-field .reveal-row { display: flex; align-items: center; gap: 8px; }

.kvkk-note { margin-top: 16px; font-size: 12px; color: var(--muted); padding: 8px 12px; background: var(--surface-2); border-radius: var(--r-sm); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .info-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) {
  .pstats { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .pcard-hero { flex-direction: column; text-align: center; padding: 20px; }
  .pcard-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .pcard-meta { justify-content: center; }
  .pcard-badges { justify-content: center; }
}
@media (max-width: 500px) {
  .pstats { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
}

/* ---------- Anamnez ---------- */
.anam-alert {
  display: flex; align-items: center; gap: 14px;
  background: #fef3cd; border-left: 4px solid #f59e0b;
  border-radius: var(--r-sm); padding: 14px 18px; margin-bottom: 8px;
}
.anam-alert-num {
  width: 40px; height: 40px; border-radius: 10px;
  background: #f59e0b; color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; font-family: var(--font-head); flex-shrink: 0;
}
.anam-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.anam-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 14px;
}
.anam-label { font-size: 13.5px; font-weight: 500; }
/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; margin-left: 8px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0; background: #cdd6d2;
  border-radius: 24px; transition: .2s;
}
.slider::before {
  content: ''; position: absolute; width: 18px; height: 18px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s;
}
.toggle input:checked + .slider { background: #ef4444; }
.toggle input:checked + .slider::before { transform: translateX(20px); }
.toggle input:disabled + .slider { opacity: .5; cursor: default; }

/* İlaçlar */
.meds-wrap { display: flex; flex-direction: column; gap: 10px; }
.meds-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.med-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-soft); color: var(--brand-ink); border: 1px solid rgba(43,166,158,.25);
  border-radius: 16px; padding: 5px 12px; font-size: 13px; font-weight: 500;
}
.med-del { background: none; border: none; cursor: pointer; font-size: 14px; color: var(--muted); padding: 0 0 0 2px; }
.med-del:hover { color: var(--danger); }
.med-add { display: flex; gap: 8px; align-items: center; }
.med-add input { flex: 1; max-width: 220px; }
@media (max-width: 820px) { .anam-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .anam-grid { grid-template-columns: 1fr; } }

/* ---------- Tedavi Timeline ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: var(--brand-soft);
}
.tl-item { position: relative; margin-bottom: 16px; }
.tl-dot {
  position: absolute; left: -28px; top: 8px; width: 16px; height: 16px;
  border-radius: 50%; border: 2.5px solid var(--line-2); background: #fff; z-index: 1;
}
.tl-dot.done { border-color: var(--brand); background: var(--brand); }
.tl-date { font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.tl-card {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 14px 16px; position: relative;
}
.tl-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tl-color { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.tl-price {
  position: absolute; right: 16px; top: 14px;
  font-size: 15px; font-weight: 700; font-family: var(--font-head); color: var(--brand);
}

/* ---------- Randevu Kartları ---------- */
.rappt-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 14px 18px; margin-bottom: 10px;
}
.rappt-date {
  display: flex; flex-direction: column; align-items: center; flex-shrink: 0;
  min-width: 42px;
}
.rappt-date b { font-size: 22px; font-family: var(--font-head); font-weight: 700; line-height: 1; color: var(--ink); }
.rappt-date span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.rappt-body { flex: 1; }
.rappt-body b { font-size: 14px; }

/* ---------- Belgeler ---------- */
.docs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.doc-card {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); overflow: hidden; position: relative;
}
.doc-thumb {
  width: 100%; height: 100px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2ba69e, #1f7cb6); font-size: 32px;
}
.doc-thumb.upload-icon {
  background: none; border: 2px dashed var(--line-2); color: var(--muted); font-size: 24px;
  height: 100px;
}
.doc-info { padding: 10px 12px; }
.doc-info b { font-size: 13px; display: block; }
.doc-upload { cursor: pointer; border-style: dashed; }
.doc-upload:hover { border-color: var(--brand); }
.doc-del { position: absolute; top: 4px; right: 4px; background: rgba(255,255,255,.85) !important; border-radius: 50%; width: 24px; height: 24px; padding: 0; font-size: 14px; }
@media (max-width: 820px) { .docs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .docs-grid { grid-template-columns: 1fr; } }

/* ---------- Notlar ---------- */
.note-add { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.note-add textarea { flex: 1; min-height: 60px; resize: vertical; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px; }
.note-add .btn { align-self: flex-start; margin-top: 0; }
.notes-list { display: flex; flex-direction: column; gap: 12px; }
.note-card {
  background: var(--surface-2); border-left: 3px solid var(--brand);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 14px 16px;
}
.note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.note-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.note-body { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.note-del { margin-left: 4px; }

/* ================= FİNANS & FATURALANDIRMA ================= */
.fin-period select { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13px; background: var(--surface); }

/* Pano — KPI kartları */
.fin-dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 4px 0 16px; }
.fin-kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; box-shadow: var(--sh-sm); display: flex; flex-direction: column; gap: 6px;
  border-left: 4px solid var(--line-2);
}
.fin-kpi span { font-size: 12px; color: var(--muted); font-weight: 600; }
.fin-kpi b { font-size: 23px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fin-kpi.income { border-left-color: var(--t-done); }
.fin-kpi.income b { color: var(--t-done); }
.fin-kpi.inv { border-left-color: var(--info); }
.fin-kpi.due { border-left-color: var(--danger); }
.fin-kpi.due b { color: var(--danger); }
.fin-kpi.exp { border-left-color: var(--warn); }
.fin-kpi.net-pos { border-left-color: var(--brand); }
.fin-kpi.net-pos b { color: var(--brand-ink); }
.fin-kpi.net-neg { border-left-color: var(--danger); }
.fin-kpi.net-neg b { color: var(--danger); }

.fin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .fin-cols { grid-template-columns: 1fr; } }

/* Basit bar grafik */
.bars { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 90px; align-items: center; gap: 10px; }
.bar-lbl { font-size: 13px; color: var(--ink-2); }
.bar-track { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--t-done); border-radius: 999px; }
.bar-fill.exp { background: var(--warn); }
.bar-val { text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Yaşlandırma */
.aging-buckets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px 20px 4px; }
.aging-b { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; text-align: center; }
.aging-b span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.aging-b b { font-size: 16px; font-variant-numeric: tabular-nums; }
.aging-table { margin-top: 8px; }
.aging-table tr { cursor: pointer; }

/* Fatura & gider tabloları */
.inv-table td, .inv-table th { padding: 11px 18px; }
.inv-table b { font-variant-numeric: tabular-nums; }

/* Gider ekleme formu */
.exp-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.exp-form input, .exp-form select { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13px; background: var(--surface); }
.exp-form input[type=number] { width: 120px; }

/* Hasta kartı — fatura / taksit listeleri */
.inv-list, .pay-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.inv-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); }
.inv-row .inv-total b { font-variant-numeric: tabular-nums; }
.plan-card { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.plan-head { padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.inst-list { display: flex; flex-direction: column; }
.inst-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.inst-row:last-child { border-bottom: none; }
.inst-row.paid { opacity: .72; }
.inst-row b { font-variant-numeric: tabular-nums; }

/* Fatura / plan formu (çekmecede) */
.inv-form { display: flex; flex-direction: column; gap: 12px; }
.inv-pick { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.inv-pick-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.inv-pick-row b { font-variant-numeric: tabular-nums; }
.inv-form-row { display: flex; align-items: center; gap: 12px; }
.inv-form-row label { min-width: 120px; font-size: 13px; color: var(--ink-2); }
.inv-form-row input { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px; flex: 1; }
.inv-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 14px; }

/* ================= SAATLİK AJANDA (hekim kolonlu) ================= */
.view-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 3px; }
.view-seg button { border: none; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 8px; cursor: pointer; }
.view-seg button.on { background: var(--brand); color: #fff; }

.agenda-wrap { overflow-x: auto; padding: 4px; }
.agenda { display: grid; min-width: 520px; position: relative; }
.ag-corner { position: sticky; left: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); }
.ag-head {
  grid-row: 1; display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  background: linear-gradient(180deg, #fff 0%, var(--surface-2) 100%);
  border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); border-top: 3px solid var(--line-2);
  position: sticky; top: 0; z-index: 2;
}
.ag-ava { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 800; font-family: var(--font-head); }
.ag-h-txt { min-width: 0; display: flex; flex-direction: column; }
.ag-doc { font-size: 13.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.ag-spec { font-size: 10.5px; font-weight: 700; margin-top: 1px; letter-spacing: .02em; }
.ag-cnt { margin-left: auto; flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); font-size: 11px; font-weight: 800; }
.ag-time { grid-column: 1; font-size: 11px; color: var(--muted); padding: 2px 8px 0 0; text-align: right; font-variant-numeric: tabular-nums; position: sticky; left: 0; background: var(--surface); z-index: 1; font-weight: 600; }
.ag-cell { border-top: 1px solid var(--surface-2); border-left: 1px solid var(--line); }
.ag-cell.hour { border-top: 1px solid var(--line); }
.ag-block {
  position: relative; z-index: 1; margin: 2px 5px; border-radius: 11px; border-left: 4px solid var(--brand);
  padding: 6px 10px; cursor: pointer; overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,25,45,.08), 0 4px 12px rgba(15,25,45,.05);
  background-image: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
  transition: transform .13s var(--ease), box-shadow .16s;
}
.ag-block:hover { transform: translateY(-2px) scale(1.012); box-shadow: 0 8px 24px rgba(15,25,45,.16); z-index: 4; }
.ag-block.st-completed { opacity: .72; }
.ag-block.st-cancelled, .ag-block.st-no_show { opacity: .45; text-decoration: line-through; }
.ag-b-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 3px; }
.ag-b-time { font-size: 11.5px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.ag-b-st { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.65); box-shadow: inset 0 0 0 1px rgba(15,25,45,.08); color: var(--ink-2); white-space: nowrap; }
.ag-b-name { font-size: 14.5px; font-weight: 750; color: var(--ink); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.ag-b-reason { font-size: 12px; color: var(--ink-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Şimdi çizgisi — bugünün ajandasında geçerli saat */
.ag-now { position: absolute; left: 60px; right: 0; height: 0; border-top: 2px solid var(--accent); z-index: 3; pointer-events: none; box-shadow: 0 1px 6px rgba(43,166,158,.4); }
.ag-now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(43,166,158,.25); }
.ag-now-t { position: absolute; left: -58px; top: -9px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; }

.aq-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Dashboard yeni layout ---- */
.dash-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi-card {
  background: #fff; border-radius: 16px; padding: 18px 18px 14px;
  display: flex; align-items: flex-start; gap: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06); border: 1px solid var(--line);
  animation: fadeUp .3s var(--ease) both;
}
.kpi-card.kpi-link { cursor: pointer; transition: transform .12s, box-shadow .15s; }
.kpi-card.kpi-link:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.kpi-icon { font-size: 24px; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.kpi-val { font-size: 26px; font-weight: 600; font-family: var(--font-mono); letter-spacing: -.02em; line-height: 1; }
.kpi-label { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-top: 4px; }
.kpi-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.kpi-blue .kpi-val  { color: #1f7cb6; }
.kpi-green .kpi-val { color: #0e8a5f; }
.kpi-teal .kpi-val  { color: #0891b2; }
.kpi-purple .kpi-val{ color: #7c3aed; }
.kpi-emerald .kpi-val{color: #059669; }
.kpi-amber .kpi-val { color: #d97706; }
.kpi-red .kpi-val   { color: #dc2626; }
.kpi-gray .kpi-val  { color: var(--muted); }

.dash-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 22px; }
.dash-live, .dash-quick { min-height: 160px; }

.live-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s;
}
.live-row:last-child { border-bottom: none; }
.live-row:hover { background: var(--surface-2); border-radius: 10px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.live-info { flex: 1; min-width: 0; }
.live-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.live-meta { font-size: 12px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.live-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.empty-sm { padding: 24px 16px; color: var(--muted); font-size: 13px; text-align: center; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 0; }
.quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 10px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); font-size: 12px; font-weight: 700; color: var(--ink);
  cursor: pointer; transition: all .13s var(--ease);
}
.quick-btn:hover { border-color: var(--brand); background: rgba(24,95,165,.06); color: var(--brand); transform: translateY(-1px); }
.quick-btn > :first-child { font-size: 20px; }
.qc-blue:hover   { border-color: #1f7cb6; background: rgba(31,124,182,.07);  color: #1f7cb6; }
.qc-teal:hover   { border-color: #0891b2; background: rgba(8,145,178,.07);  color: #0891b2; }
.qc-indigo:hover { border-color: #4f46e5; background: rgba(79,70,229,.07);  color: #4f46e5; }
.qc-purple:hover { border-color: #7c3aed; background: rgba(124,58,237,.07); color: #7c3aed; }
.qc-emerald:hover{ border-color: #059669; background: rgba(5,150,105,.07);  color: #059669; }
.qc-amber:hover  { border-color: #d97706; background: rgba(217,119,6,.07);  color: #d97706; }
.qc-rose:hover   { border-color: #e11d48; background: rgba(225,29,72,.07);  color: #e11d48; }

@media (max-width: 820px) {
  .dash-row { grid-template-columns: 1fr; }
  .dash-kpi { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================= PAKETLER & FİYATLANDIRMA ================= */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-sm); }
.plan-col.featured { border: 2px solid var(--brand); box-shadow: var(--sh-brand); }
.plan-col.current { outline: 2px solid var(--accent); outline-offset: -2px; }
.plan-top { padding: 22px 22px 18px; border-bottom: 1px solid var(--line); position: relative; }
.plan-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); margin-bottom: 10px; }
.plan-tag.cur { background: var(--accent-soft); color: #04342c; }
.plan-top h3 { font-size: 21px; }
.plan-sub { color: var(--muted); font-size: 13px; margin: 4px 0 14px; min-height: 34px; }
.plan-price { font-size: 16px; font-weight: 700; color: var(--ink); }
.plan-price span { font-size: 30px; letter-spacing: -.02em; }
.plan-price small { color: var(--muted); font-weight: 600; font-size: 13px; }
.plan-cta { width: 100%; margin-top: 16px; }
.plan-feats { list-style: none; margin: 0; padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 9px; }
.plan-feats li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.plan-feats li .pf-ic { color: var(--brand); font-weight: 800; flex: none; }
.plan-feats li.soon { color: var(--muted); }
.plan-feats li.soon .pf-ic { color: var(--line-2); }
.soon-tag { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--warn); background: var(--warn-soft); padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
.plan-note { color: var(--muted); font-size: 12.5px; margin-top: 16px; }

/* ================= BİLDİRİMLER / HATIRLATMA ================= */
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chk-row { display: flex !important; align-items: center; gap: 9px; margin: 12px 0; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.chk-row input { width: 18px; height: 18px; flex: none; accent-color: var(--brand); }

/* ================= AVATAR FOTOĞRAF + PROFİL ================= */
.av-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.avatar { overflow: hidden; }
.u-row { display: inline-flex; align-items: center; gap: 10px; }
.u-ava { width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--brand-grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; font-family: var(--font-head); }
.prof-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.prof-ava { width: 72px; height: 72px; border-radius: 50%; font-size: 24px; flex: none; background: var(--brand-grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-family: var(--font-head); }
.prof-info { display: flex; flex-direction: column; gap: 3px; }
.prof-info b { font-size: 16px; }
.prof-info span { color: var(--muted); font-size: 13px; }
.prof-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ================= RÖNTGEN ================= */
.xr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; padding: 4px 0 10px; }
.xr-card { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; cursor: pointer; background: var(--surface); transition: transform .14s, box-shadow .14s; }
.xr-card:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.xr-thumb { height: 130px; background: #0d1420; display: grid; place-items: center; }
.xr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.xr-load { color: var(--muted); font-size: 13px; }
.xr-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 9px 11px 4px; }
.xr-note { padding: 0 11px 10px; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xr-drop { border: 2px dashed var(--line-2); border-radius: var(--r-sm); padding: 22px 14px; text-align: center; cursor: pointer; color: var(--ink-2); font-size: 13.5px; margin-bottom: 14px; transition: border-color .14s, background .14s; }
.xr-drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.xr-drop small { color: var(--muted); }
.xr-drop-ic { font-size: 30px; }

/* Tam ekran görüntüleyici (koyu — radyoloji okuma ortamı) */
.xrv { position: fixed; inset: 0; z-index: 300; background: #060a12; display: flex; flex-direction: column; animation: fadeIn .16s ease; }
.xrv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; padding-top: calc(12px + var(--sat, 0px)); color: #dbe6f5; flex: none; }
.xrv-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.xrv-title b { font-size: 15px; }
.xrv-title span { font-size: 12px; color: #8fa3c0; }
.xrv-top-act { display: flex; gap: 8px; flex: none; }
.xrv-stage { flex: 1; overflow: hidden; position: relative; display: grid; place-items: center; touch-action: none; cursor: grab; }
.xrv-stage:active { cursor: grabbing; }
.xrv-img { max-width: 96%; max-height: 96%; user-select: none; transition: filter .08s; will-change: transform; }
.xrv-bar { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; padding-bottom: calc(10px + var(--sab, 0px)); background: rgba(13,20,32,.92); flex: none; }
.xrv-grp { display: flex; align-items: center; gap: 6px; color: #8fa3c0; font-size: 14px; }
.xrv-btn { min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #dbe6f5; font-size: 15px; cursor: pointer; transition: background .13s; }
.xrv-btn:hover { background: rgba(255,255,255,.14); }
.xrv-btn.on { background: rgba(85,184,147,.28); border-color: #55b893; }
.xrv-x { font-size: 17px; }
.xrv-val { min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.xrv-slider input[type=range] { width: 110px; accent-color: #55b893; }
.xrv-note { padding: 8px 16px calc(10px + var(--sab, 0px)); background: rgba(13,20,32,.92); color: #b7c6dc; font-size: 12.5px; text-align: center; flex: none; }
@media (max-width: 640px) {
  .xr-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .xrv-slider input[type=range] { width: 80px; }
}

/* ================= DESTEK TALEPLERİ (ticket) ================= */
.tk-thread { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; padding: 4px 2px; }
.tk-msg { max-width: 88%; border-radius: 14px; padding: 10px 13px; font-size: 13.5px; line-height: 1.5; }
.tk-clin { align-self: flex-end; background: var(--brand-soft); border: 1px solid rgba(31,124,182,.18); border-bottom-right-radius: 5px; }
.tk-plat { align-self: flex-start; background: #f1effe; border: 1px solid rgba(108,92,231,.2); border-bottom-left-radius: 5px; }
.tk-msg-head { font-size: 11.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; display: flex; gap: 10px; justify-content: space-between; }
.tk-msg-head span { font-weight: 500; color: var(--muted); }
.tk-msg-body { white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.notif-tk { cursor: pointer; border-left: 3px solid #6c5ce7; }
.notif-tk:hover { background: var(--brand-soft); }

/* ================= YETKİ MATRİSİ (Kullanıcılar) ================= */
.perm-matrix { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; margin-top: 6px; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--surface-2); }
.perm-row:nth-child(even) { background: var(--surface); }
.perm-title { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.perm-lvl { width: auto; min-width: 150px; padding: 6px 10px; font-size: 12.5px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 600; }
.perm-soon { font-style: normal; font-weight: 600; font-size: 10.5px; color: var(--muted); }
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif-row { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; background: var(--surface-2); }
.notif-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notif-body { margin-top: 7px; font-size: 12.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; line-height: 1.5; }

/* ================= ONAM FORMLARI ================= */
.consent-add { display: flex; gap: 8px; margin-bottom: 14px; }
.consent-add select { flex: 1; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13.5px; background: var(--surface); }
.consent-list { display: flex; flex-direction: column; gap: 10px; }
.consent-row { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: var(--surface-2); }
.consent-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.consent-sig { display: block; max-height: 70px; margin-top: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.consent-sig.big { max-height: 150px; }
.consent-doc { font-size: 13.5px; line-height: 1.65; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; max-height: 240px; overflow-y: auto; }
.sign-wrap { margin: 14px 0 10px; }
#sign-pad { width: 100%; height: 180px; background: #fff; border: 2px dashed var(--line-2); border-radius: var(--r-sm); touch-action: none; cursor: crosshair; }
.sign-actions { display: flex; justify-content: space-between; gap: 10px; }

/* ================= AYARLAR / BİLGİ TABANI / EĞİTİM ================= */
.set-sec { font-size: 13.5px; font-weight: 800; color: var(--ink); margin: 26px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: baseline; gap: 8px; }
.set-sec:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.set-field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.set-field select, .set-field input { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px; background: var(--surface); }
.set-field select:disabled, .set-field input:disabled { opacity: .6; cursor: not-allowed; }
.set-field small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.wd-row { display: flex; flex-wrap: wrap; gap: 8px; }
.wd-chip { display: flex !important; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 650; cursor: pointer; background: var(--surface); }
.wd-chip input { width: 15px; height: 15px; accent-color: var(--brand); }
.wd-chip:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.inv-act { white-space: nowrap; }

.kb-item { border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 8px; background: var(--surface-2); }
.kb-item summary { padding: 12px 14px; cursor: pointer; list-style: none; }
.kb-item summary::-webkit-details-marker { display: none; }
.kb-item[open] summary { border-bottom: 1px solid var(--line); }
.kb-body { padding: 14px; font-size: 14px; line-height: 1.65; color: var(--ink-2); }

.edu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.edu-card { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.edu-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.edu-ic { font-size: 20px; }
.edu-card a { align-self: flex-start; }

/* ================= STOK / LAB / SEGMENT ================= */
.stock-low { color: var(--danger); }
.lab-list { display: flex; flex-direction: column; gap: 10px; }
.lab-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: var(--surface-2); }
.lab-side { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: none; }
.lab-side select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; background: var(--surface); }
.lab-f.on { background: var(--brand); color: #fff; }

.seg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.seg-card { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: var(--surface); box-shadow: var(--sh-sm); cursor: pointer; transition: transform .12s var(--ease), box-shadow .15s; }
.seg-card:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: var(--brand); }
.seg-count { font-size: 30px; font-weight: 800; color: var(--brand-ink); letter-spacing: -.02em; }
.seg-label { font-weight: 700; margin-top: 2px; }

/* ---------- Dijital formlar ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.form-card { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--surface); box-shadow: var(--sh-sm); display: flex; flex-direction: column; gap: 8px; }
.form-card:hover { box-shadow: var(--sh); border-color: var(--brand); }
.form-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.form-card-top h4 { margin: 0; font-size: 15.5px; }
.form-meta { font-size: 12.5px; color: var(--muted); }
.form-card .inv-act { margin-top: auto; padding-top: 4px; }
/* Form oluşturucu (modal içi alan satırları) */
.fb-fields-head { display: flex; justify-content: space-between; align-items: center; }
#fb-fields { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.fb-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg); }
.fb-row-main { display: flex; gap: 8px; align-items: center; }
.fb-row-main .fb-label { flex: 1; }
.fb-row-main .fb-type { flex: none; width: 130px; }
.fb-req { display: flex; align-items: center; gap: 4px; font-size: 12.5px; white-space: nowrap; color: var(--muted); margin: 0; }
.fb-req input { width: auto; margin: 0; }
.fb-del { flex: none; }
.fb-opts { margin-top: 8px; font-size: 13px; }
.fr-ans { padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; min-height: 18px; }
.opt { display: block; margin: 4px 0; font-weight: 400; }
.opt input { width: auto; margin-right: 6px; }

/* KPI kartı (doğrulama/itibar — fin-kpi span/b yerine k-* sınıfları) */
.fin-kpi .k-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.fin-kpi .k-val { font-size: 23px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fin-kpi .k-sub { font-size: 11.5px; color: var(--muted); }
.fin-kpi.promoter { border-left-color: var(--t-done, #16a081); }
.fin-kpi.promoter .k-val { color: var(--t-done, #16a081); }
.fin-kpi.detractor { border-left-color: var(--danger); }
.fin-kpi.detractor .k-val { color: var(--danger); }

/* Anket sonuç kartı */
.sv-ans { font-size: 13.5px; margin: 3px 0; }
.sv-q { color: var(--muted); font-weight: 600; }
/* İtibar hunisi */
.rep-funnel { display: flex; gap: 8px; margin: 14px 0 4px; flex-wrap: wrap; }
.rep-tab.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Üst bantlar (platform duyuru + impersonation) */
#app-banners { display:flex; flex-direction:column; }
.app-banner { position:relative; padding:10px 40px 10px 16px; font-size:13.5px; line-height:1.45; border-bottom:1px solid var(--line); background:var(--brand-soft); color:var(--ink); }
.app-banner.warn { background:#fff4e0; color:#7a5200; }
.app-banner.success { background:#e3f6ec; color:#0f7a4f; }
.app-banner.imp { background:#fde9c8; color:#7a4a00; font-weight:500; }
.app-banner .ab-x { position:absolute; right:10px; top:50%; transform:translateY(-50%); background:rgba(0,0,0,.08); border:0; border-radius:6px; padding:4px 10px; font-size:12px; cursor:pointer; color:inherit; font-weight:600; }
.app-banner .ab-x:hover { background:rgba(0,0,0,.16); }

/* Prim kuralları (modal) */
.cm-cfg-list { display: flex; flex-direction: column; gap: 8px; }
.cm-cfg-row { display: grid; grid-template-columns: 1.4fr 1.1fr 70px 90px; gap: 8px; align-items: center; }
.cm-cfg-name { font-weight: 600; font-size: 14px; }
.cm-cfg-row input, .cm-cfg-row select { font-size: 13px; }

/* Fırsat raporları kart toplamı */
.opp-total { font-weight: 800; color: var(--accent, #2ba69e); font-size: 16px; margin: 2px 0; }
.opp-card .seg-count { color: var(--brand-ink); }

/* PWA yükle butonu */
.pwa-install { position: fixed; left: 18px; bottom: 18px; z-index: 70; padding: 11px 16px; border-radius: 999px;
  background: var(--brand); color: #fff; border: none; font-weight: 700; font-size: 13.5px; cursor: pointer; box-shadow: var(--sh-brand); }
.pwa-install:hover { filter: brightness(1.05); }

/* ============================================================
   MOBİL SAĞLAMLAŞTIRMA (v-mobile) — iOS/Android tek yetkili blok
   Bu blok dosyanın SONUNDA → aynı özgüllükte son söz haktır.
   Kapsam: güvenli alan, dokunma hedefi, tablo/sekme kaydırma,
   iOS input zoom, z-index katmanı, form daraltma, diş şeması.
   ============================================================ */

/* --- Katman sırası (mobilde menü çekmecesi Neo'nun ÜSTÜNDE olmalı) --- */
.overlay { z-index: 100; }              /* modal/çekmece her şeyin üstünde */
.toast   { z-index: 120; bottom: calc(26px + var(--sab)); }
.neo-fab   { z-index: 60; bottom: calc(26px + var(--sab)); right: calc(26px + var(--sar)); }
.neo-panel { z-index: 61; max-height: calc(100dvh - 140px); }
.pwa-install { bottom: calc(18px + var(--sab)); left: calc(18px + var(--sal)); }

/* --- Üst bar: iPhone çentiği/Dynamic Island altına girmesin --- */
.topbar {
  padding-top: var(--sat);
  padding-left: calc(22px + var(--sal)); padding-right: calc(22px + var(--sar));
  height: calc(62px + var(--sat));
}

/* --- Momentum (ataletli) kaydırma --- */
.agenda-wrap, .drawer-body, .neo-body, .inv-pick, .consent-doc,
.modal { -webkit-overflow-scrolling: touch; }

/* --- Hamburger yalnızca mobilde --- */
#menu-toggle { display: none; }

@media (max-width: 820px) {
  /* Hamburger görünür */
  #menu-toggle { display: grid; }

  /* iOS odak-zoom'unu engelle: tüm form alanları ≥16px */
  input, select, textarea,
  .tb-search input, .fin-period select,
  .exp-form input, .exp-form select,
  .lab-side select, .cm-cfg-row input, .cm-cfg-row select,
  .set-field { font-size: 16px; }

  /* Menü açıkken Neo (çekmecenin kardeşi #neo-root) üstte yüzmesin */
  #app-view.nav-open ~ #neo-root { display: none; }
  .neo-fab   { bottom: calc(16px + var(--sab)); right: calc(16px + var(--sar)); }
  .neo-panel { right: 12px; left: 12px; width: auto; bottom: calc(84px + var(--sab));
               top: calc(var(--sat) + 12px); height: auto; }

  /* Performans/jank: tam-ekran aurora boya katmanlarını telefonda kapat */
  body::before, body::after { display: none !important; }

  /* TABLOLAR yana taşıp sayfayı kırmasın → kendi içinde kaydır */
  .panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #ptable, #fin-body, #stock-host, #utable, #vf-host, #rc-host,
  #lab-host, #bk-host, #cm-host, #ak-host, #wh-host {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  thead th, tbody td { white-space: nowrap; padding: 11px 13px; }

  /* SEKME barları kaydırılabilir (8 sekme taşmasın) — margin main padding'iyle eşleşsin (taşma yok) */
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .tabs::-webkit-scrollbar { height: 0; }

  /* Panel içi arama tam genişlik */
  .search input { width: 100%; }

  /* Diş şeması: dar ekranda taşmak yerine kaydır */
  .odonto { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* --- Dokunma hedefleri ≥44px (iOS HIG) / dokunmatik cihazlar --- */
@media (pointer: coarse) {
  .icon-btn { width: 44px; height: 44px; }
  .x { min-width: 44px; min-height: 44px; padding: 0; display: inline-grid; place-items: center; }
  .neo-mic { width: 46px; height: 46px; }
  .tabs button, .pcard .tabs button { padding-top: 14px; padding-bottom: 14px; }
  .nav button { padding-top: 13px; padding-bottom: 13px; }
  .view-seg button, .mode-seg button, .rec-seg button, .set-seg button,
  .neo-chip, .tool { min-height: 44px; }
  /* dokunmada hover-zıplamasını kapat, basılı geri-bildirim ekle */
  .card:hover, .kpi-card.kpi-link:hover, .quick-btn:hover,
  .seg-card:hover { transform: none; }
  tbody tr:active, .live-row:active, .quick-btn:active,
  .kpi-card.kpi-link:active { background: var(--surface-2); }
  .btn:active, .neo-chip:active, .tool:active { filter: brightness(.96); }
}

/* --- Çok dar ekranda çok-kolonlu form/grid'leri tek/çift kolona indir --- */
@media (max-width: 560px) {
  .form-row, .pay-form, .td-add, .cm-cfg-row, .inv-form-row,
  .ai-suggest .sg-grid { grid-template-columns: 1fr; }
  .aging-buckets { grid-template-columns: 1fr 1fr; }
  .exp-form { flex-direction: column; align-items: stretch; }
  .exp-form input, .exp-form select, .exp-form input[type=number] { width: 100%; }
}
@media (max-width: 400px) {
  .dash-kpi, .fin-cards { grid-template-columns: 1fr; }
  .kpi-val, .stat-value, .seg-count { font-size: 22px; overflow-wrap: anywhere; }
}

/* ============================================================
   PANEL PREMIUM (v-premium) — bento · glassmorphism · efektler
   ============================================================ */
.dsh { display: flex; flex-direction: column; gap: 20px; }
.dsh > * { animation: dshUp .5s var(--ease) backwards; }
.dsh-kpis { animation-delay: .06s; }
.dsh-bento { animation-delay: .12s; }
@keyframes dshUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- HERO ---------- */
.dsh-hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 26px 30px; color: #fff;
  background: linear-gradient(118deg, #12294e 0%, #1c6fa8 52%, #2ba69e 100%);
  box-shadow: 0 20px 44px -20px rgba(12,68,124,.6);
}
.dsh-hero-glow {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background:
    radial-gradient(520px 240px at 86% -30%, rgba(29,158,117,.55), transparent 60%),
    radial-gradient(440px 220px at 8% 140%, rgba(109,92,240,.5), transparent 60%);
}
.dsh-hero::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 38%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.16), transparent);
  transform: skewX(-18deg); animation: dshSheen 7s ease 1.4s infinite;
}
@keyframes dshSheen { 0% { left: -60%; } 55%, 100% { left: 135%; } }
.dsh-hero-in { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.dsh-greet { font-family: var(--font-head); font-weight: 800; font-size: 30px; letter-spacing: -.03em; line-height: 1.1; }
.dsh-grad { background: linear-gradient(90deg, #a7e8d0, #d4e8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dsh-wave { display: inline-block; transform-origin: 70% 70%; animation: dshWave 2.8s ease infinite; }
@keyframes dshWave { 0%,62%,100% { transform: rotate(0); } 10% { transform: rotate(16deg); } 22% { transform: rotate(-8deg); } 32% { transform: rotate(14deg); } 42% { transform: rotate(-4deg); } }
.dsh-hsub { margin-top: 7px; font-size: 13.5px; color: rgba(255,255,255,.82); font-weight: 500; }
.dsh-pulse { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.dsh-chip { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.92); }
.dsh-chip b { font-family: var(--font-head); font-weight: 800; color: #fff; margin-right: 3px; }
.dsh-cta {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 22px; border: none; cursor: pointer;
  background: rgba(255,255,255,.97); color: var(--brand-2); font-weight: 800; font-size: 14.5px; border-radius: 14px;
  font-family: var(--font-head); box-shadow: 0 12px 26px -10px rgba(0,0,0,.45); transition: transform .14s var(--ease), box-shadow .2s;
}
.dsh-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(0,0,0,.55); }
.dsh-cta-ic { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 800; }

/* ---------- Glass yüzey ---------- */
.dsh-glass {
  background: rgba(255,255,255,.72); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255,255,255,.68); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(13,30,25,.04), 0 24px 46px -30px rgba(12,68,124,.4);
}

/* ---------- KPI ---------- */
.dsh-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dsh-kpi {
  position: relative; overflow: hidden; padding: 18px 18px 20px; border-radius: 18px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid rgba(255,255,255,.7); box-shadow: 0 1px 2px rgba(13,30,25,.05), 0 22px 42px -32px rgba(12,68,124,.55);
  animation: dshUp .5s var(--ease) backwards; animation-delay: var(--d, 0ms);
  transition: transform .16s var(--ease), box-shadow .22s;
}
.dsh-kpi.is-link { cursor: pointer; }
.dsh-kpi:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(13,30,25,.05), 0 28px 48px -26px rgba(12,68,124,.6); }
.dsh-kpi-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; background: var(--kc-soft, var(--brand-soft)); margin-bottom: 14px; }
.dsh-kpi-val { font-family: var(--font-head); font-weight: 800; font-size: 31px; letter-spacing: -.03em; line-height: 1; color: var(--kc, var(--brand)); overflow-wrap: anywhere; }
.dsh-kpi-lbl { font-size: 13px; font-weight: 700; color: var(--ink); margin-top: 8px; }
.dsh-kpi-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.dsh-kpi-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--kc, var(--brand)), transparent); opacity: .85; }
.dkc-blue    { --kc:#1f7cb6; --kc-soft:#e7f2f8; }
.dkc-green   { --kc:#0e8a5f; --kc-soft:#e2f6ee; }
.dkc-teal    { --kc:#0891b2; --kc-soft:#e0f5fa; }
.dkc-purple  { --kc:#7c3aed; --kc-soft:#f1e9fd; }
.dkc-emerald { --kc:#059669; --kc-soft:#e2f6ef; }
.dkc-amber   { --kc:#d97706; --kc-soft:#fdf0dd; }
.dkc-red     { --kc:#dc2626; --kc-soft:#fdeaea; }
.dkc-gray    { --kc:#6b7280; --kc-soft:#eef1f4; }

/* ---------- Bento ---------- */
.dsh-bento { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; align-items: start; }
.dsh-rail { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dsh-ph { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid rgba(13,30,25,.06); }
.dsh-ph h3 { font-size: 15px; font-family: var(--font-head); display: flex; align-items: center; gap: 8px; }
.dsh-lnk { border: none; background: transparent; color: var(--brand); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.dsh-lnk:hover { text-decoration: underline; }
.dsh-agenda { overflow: hidden; min-width: 0; }
.dsh-agenda #today-appts { padding: 6px; }

/* Günün Durumu — donut */
.dsh-status-in { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.dsh-donut { width: 116px; height: 116px; flex: none; }
.dsh-donut-bg { fill: none; stroke: rgba(13,30,25,.08); stroke-width: 11; }
.dsh-donut-fg { fill: none; stroke: url(#dshG); stroke-width: 11; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 60px 60px; animation: dshDonutIn 1.1s var(--ease) both; }
@keyframes dshDonutIn { from { stroke-dashoffset: 327; } }
.dsh-donut-num { font-family: var(--font-head); font-weight: 800; font-size: 25px; fill: var(--ink); text-anchor: middle; }
.dsh-donut-cap { font-size: 8px; fill: var(--muted); text-anchor: middle; letter-spacing: .12em; }
.dsh-legend { display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.dsh-lg { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.dsh-lg i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.dsh-lg b { margin-left: auto; font-family: var(--font-head); font-weight: 800; color: var(--ink); font-size: 15px; }

/* Klinikte Şu An */
.dsh-live #live-list { padding: 6px; }
.dsh-liverow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 13px; cursor: pointer; transition: background .13s; }
.dsh-liverow:hover { background: rgba(24,95,165,.06); }
.dsh-ava { position: relative; width: 40px; height: 40px; border-radius: 13px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; font-family: var(--font-head); background: linear-gradient(135deg, #2ba69e, #1f7cb6); }
.dsh-ava.chair { background: linear-gradient(135deg, #34b3e0, #1f8bd6); }
.dsh-ava-dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--t-done); border: 2px solid #fff; }
.dsh-ava.chair .dsh-ava-dot { background: var(--t-progress); animation: dshPing 1.6s ease infinite; }
@keyframes dshPing { 0% { box-shadow: 0 0 0 0 rgba(31,139,214,.5); } 70% { box-shadow: 0 0 0 7px rgba(31,139,214,0); } 100% { box-shadow: 0 0 0 0 rgba(31,139,214,0); } }
.dsh-live-info { flex: 1; min-width: 0; }
.dsh-live-name { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsh-live-meta { font-size: 11.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsh-live-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.dsh-pill { font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.dsh-pill.p-chair { background: var(--info-soft); color: var(--info); }
.dsh-pill.p-wait { background: var(--brand-soft); color: var(--brand-ink); }
.dsh-live-t { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dsh-livedot { width: 9px; height: 9px; border-radius: 50%; background: var(--t-done); animation: dshPing 1.9s ease infinite; }
.dsh-empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 13px; }

/* Son Eklenen Hastalar */
.dsh-recent #recent-list { padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.dsh-rp { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; transition: background .13s; }
.dsh-rp:hover { background: rgba(24,95,165,.06); }
.dsh-rp-ava { width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 11px; color: #fff; font-family: var(--font-head); background: linear-gradient(135deg, #9c6ade, #6a5acd); }
.dsh-rp-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsh-rp-type { font-size: 10.5px; font-weight: 700; color: var(--muted); flex: none; }

/* Hızlı Aksiyonlar */
.dsh-qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px; }
.dsh-qbtn { display: flex; align-items: center; gap: 10px; padding: 12px 13px; border: 1px solid rgba(13,30,25,.08); border-radius: 14px; background: rgba(255,255,255,.6); cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--ink); text-align: left; transition: transform .13s var(--ease), border-color .15s, background .15s; }
.dsh-qbtn:hover { transform: translateY(-2px); border-color: var(--qc, var(--brand)); background: #fff; }
.dsh-qic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 17px; background: var(--qc-soft, var(--brand-soft)); flex: none; }
.dqc-blue { --qc:#1f7cb6; --qc-soft:#e7f2f8; } .dqc-teal { --qc:#2ba69e; --qc-soft:#e2f4f2; }
.dqc-indigo { --qc:#4f46e5; --qc-soft:#eae8fd; } .dqc-purple { --qc:#7c3aed; --qc-soft:#f1e9fd; }
.dqc-emerald { --qc:#059669; --qc-soft:#e2f6ef; } .dqc-amber { --qc:#d97706; --qc-soft:#fdf0dd; }
.dqc-rose { --qc:#e11d48; --qc-soft:#fde7ec; }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) { .dsh-bento { grid-template-columns: 1fr; } .dsh-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) {
  .dsh-glass, .dsh-kpi { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
  .dsh-hero { padding: 22px 20px; }
  .dsh-greet { font-size: 24px; }
}
@media (max-width: 460px) { .dsh-kpis { grid-template-columns: 1fr 1fr; } .dsh-greet { font-size: 21px; } .dsh-cta { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) {
  .dsh-hero::after, .dsh-wave, .dsh-livedot, .dsh-ava.chair .dsh-ava-dot { animation: none; }
  .dsh-donut-fg { animation: none; }
}

/* ============================================================
   PREMIUM SİSTEM — TÜM SAYFALAR (v-premium2)
   Ortak yapı taşlarını (panel/kart/tablo/başlık/rozet/randevu satırı)
   yükseltir → her sayfa tek tek yazılmadan premium olur.
   + Tabloların mobilde küçülme/çakışma sorununu kökten çözer.
   ============================================================ */
.page-head h2, .panel-head h3 { font-family: var(--font-head); letter-spacing: -.02em; }
.stat-value, .fin-kpi b, .fin-card b, .fin-kpi .k-val { font-family: var(--font-mono); letter-spacing: -.02em; font-weight: 600; }

/* Paneller — cam yüzey + yumuşak yükseklik (aurora üstünde premium) */
.panel {
  border-radius: 20px; border: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 1px 2px rgba(13,30,25,.04), 0 22px 44px -32px rgba(12,68,124,.35);
}
.panel-head { padding: 16px 22px; border-bottom: 1px solid rgba(13,30,25,.06); }
.card {
  border-radius: 18px; border: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 1px 2px rgba(13,30,25,.05), 0 22px 42px -32px rgba(12,68,124,.5);
}

/* Tablolar — premium başlık + satır hover */
thead th { background: linear-gradient(180deg, #f5f9f8, #edf3f1); border-bottom: 1px solid var(--line); color: var(--ink-2); }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(24,95,165,.05); }

/* Randevu satırları — premium kart görünümü */
.appt-row { margin: 6px 8px; padding: 13px 16px; border: 1px solid rgba(13,30,25,.06); border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(13,30,25,.04); transition: transform .12s var(--ease), box-shadow .15s; }
.appt-row:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(12,68,124,.28); background: #fff; }
.appt-row:last-child { border-bottom: 1px solid rgba(13,30,25,.06); }

/* Rozetler + zarif kaydırma çubuğu */
.badge { border-radius: 8px; }
.panel, .agenda-wrap, .drawer-body { scrollbar-width: thin; scrollbar-color: rgba(12,68,124,.28) transparent; }
.panel::-webkit-scrollbar, .agenda-wrap::-webkit-scrollbar, .drawer-body::-webkit-scrollbar { height: 8px; width: 8px; }
.panel::-webkit-scrollbar-thumb, .agenda-wrap::-webkit-scrollbar-thumb, .drawer-body::-webkit-scrollbar-thumb { background: rgba(12,68,124,.22); border-radius: 8px; }

/* ============================================================
   NEO CONSOLE — TEK GÖRSEL DİL (tüm sayfalar)
   Paneller/kartlar token yüzeyine oturur (temaya uyar), köşe camgöbeği
   ışıması, sayfa başlıklarına mono "kicker", tutarlı yarıçap/kenar/tipografi.
   ============================================================ */
.page-head { align-items: center; margin-bottom: 22px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.page-head > div:first-child { min-width: 0; }
.page-head h2 { font-size: 24px; font-weight: 600; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.page-head .kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; color: var(--neo); font-weight: 600; text-transform: uppercase; margin-bottom: 7px; display: flex; align-items: center; gap: 8px; }
.page-head .kicker::before { content: ""; width: 16px; height: 2px; border-radius: 2px; background: var(--neo-grad); flex: none; }

.panel {
  border-radius: 20px; border: 1px solid var(--line); background: var(--surface);
  backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: var(--sh); position: relative;
}
.card {
  border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
  backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: var(--sh);
}
/* köşe camgöbeği ışıması — konsol imzası (ölçülü) */
.panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: radial-gradient(340px 150px at 100% 0, color-mix(in srgb, var(--neo) 7%, transparent), transparent 62%);
}
.panel > * { position: relative; z-index: 1; }
.panel-head h3 { font-size: 15px; font-weight: 600; }
.panel-head .sub { color: var(--muted); font-size: 12.5px; }
.panel-head .cnt { font-family: var(--font-mono); font-size: 11px; color: var(--neo); border: 1px solid var(--line-2); padding: 2px 9px; border-radius: 999px; }

/* tablo başlıkları — token + mono kaption (konsol dili) */
thead th { background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: .03em; text-transform: uppercase; font-weight: 600; }
tbody tr:hover { background: color-mix(in srgb, var(--neo) 6%, transparent); }

/* sekmeler — aktifte camgöbeği alt çizgi */
.tabs button.active { border-bottom-color: var(--neo); }

/* ---- Neo içgörü şeridi (sayfa başında, gerçek veriden) ---- */
.neo-strip {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
  background:
    radial-gradient(300px 120px at 0% 0%, color-mix(in srgb, var(--neo) 10%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--neo); border-radius: 14px;
  padding: 11px 16px; box-shadow: var(--sh); animation: fadeUp .4s var(--ease);
}
.neo-strip .ns-neo { flex: none; line-height: 0; }
.neo-strip .ns-neo img { width: 34px; height: auto; filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--neo) 30%, transparent)); }
.neo-strip .ns-label { flex: none; font-family: var(--font-mono); font-size: 10px; line-height: 1.15; letter-spacing: .12em; color: var(--neo); text-transform: uppercase; font-weight: 600; }
.ns-items { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; flex: 1; }
.ns-item { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 13px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; font-family: var(--font-body); transition: border-color .14s, color .14s; }
.ns-item:hover { border-color: var(--neo); color: var(--neo); }
.ns-item b { font-family: var(--font-mono); color: var(--ink); font-weight: 600; }
.ns-item .ns-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--neo); flex: none; }
.ns-item .ns-go { color: var(--muted); font-family: var(--font-mono); }
.ns-item:hover .ns-go { color: var(--neo); }
.ns-item.warm { border-color: color-mix(in srgb, var(--warm) 45%, var(--line-2)); }
.ns-item.warm .ns-dot { background: var(--warm); }
.ns-item.warm b { color: var(--warm-2); }
.ns-item.warm:hover { border-color: var(--warm); color: var(--warm-2); }
@media (max-width: 640px) { .neo-strip .ns-label { display: none; } }

/* ---- MOBİL: tablolar KÜÇÜLMEZ/ÇAKIŞMAZ → doğal genişlik + kaydır ---- */
@media (max-width: 820px) {
  /* tabloyu saran her kap yatay kaydırsın */
  .panel, .inv-table, #ptable, #fin-body, #stock-host, #utable, #vf-host,
  #rc-host, #lab-host, #bk-host, #cm-host, #ak-host, #wh-host {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  /* tablo içeriğine göre genişlesin (sütunlar sıkışıp çakışmasın) */
  table { width: auto; min-width: 100%; }
  thead th, tbody td { white-space: nowrap; padding: 12px 14px; font-size: 13px; }
  /* perf: mobilde cam bulanıklığı kapat, düz beyaz */
  .panel, .card { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
}

/* ============================================================
   NEO SESLİ KÜRE (v-neo-orb) — tam ekran sesli mod
   ============================================================ */
#neo-voice {
  position: fixed; inset: 0; z-index: 400;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: max(20px, var(--sat)) 20px max(20px, var(--sab));
  background:
    radial-gradient(120% 100% at 50% 118%, rgba(31,124,182,.38), transparent 55%),
    radial-gradient(90% 70% at 50% -18%, rgba(124,108,245,.30), transparent 58%),
    rgba(9, 16, 32, .93);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: fadeIn .22s var(--ease);
}
#neo-voice.closing { opacity: 0; transition: opacity .18s; }
.nv-x {
  position: absolute; top: max(18px, var(--sat)); right: 20px; width: 46px; height: 46px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08);
  color: #fff; font-size: 17px; cursor: pointer; transition: background .15s, transform .12s;
}
.nv-x:hover { background: rgba(255,255,255,.18); transform: scale(1.06); }
.nv-center { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; max-width: 580px; width: 100%; }
.nv-brand { color: rgba(255,255,255,.9); font-family: var(--font-brand); font-size: 17px; font-weight: 700; letter-spacing: .04em; }
/* Küre: blur'lu renk blob'ları (logo paleti + AI moru) + parlak çekirdek */
.nv-orb { position: relative; width: 216px; height: 216px; }
.nv-b { position: absolute; inset: 6%; border-radius: 50%; filter: blur(24px); opacity: .9; mix-blend-mode: screen; }
.nv-b.b1 { background: radial-gradient(circle at 34% 34%, #55b893 0%, transparent 62%); animation: nvSwirl 7s linear infinite; }
.nv-b.b2 { background: radial-gradient(circle at 66% 38%, #5cb4de 0%, transparent 62%); animation: nvSwirl 9.5s linear infinite reverse; }
.nv-b.b3 { background: radial-gradient(circle at 50% 72%, #8b5cf6 0%, transparent 64%); animation: nvSwirl 12s linear infinite; }
.nv-core {
  position: absolute; inset: 17%; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%,
    rgba(255,255,255,.95) 0%, rgba(214,245,255,.6) 20%,
    rgba(92,180,222,.8) 45%, rgba(43,166,158,.88) 68%, rgba(31,124,182,.94) 100%);
  box-shadow: 0 0 70px rgba(92,180,222,.55), 0 0 130px rgba(124,108,245,.3), inset 0 0 36px rgba(255,255,255,.35);
  animation: nvBreath 3.8s ease-in-out infinite;
}
.nv-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(92,180,222,.45); opacity: 0; }
@keyframes nvSwirl { from { transform: rotate(0deg) translate(7%, 0); } to { transform: rotate(360deg) translate(7%, 0); } }
@keyframes nvBreath { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes nvPing { 0% { transform: scale(.85); opacity: .7; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes nvThink { 0%,100% { transform: scale(.93); filter: brightness(1); } 50% { transform: scale(1.03); filter: brightness(1.25); } }
@keyframes nvTalk { 0%,100% { transform: scale(1); } 30% { transform: scale(1.09); } 60% { transform: scale(.97); } 80% { transform: scale(1.06); } }
/* Durumlar */
#neo-voice.st-listen .nv-ring { animation: nvPing 2.1s ease-out infinite; }
#neo-voice.st-listen .nv-ring.r2 { animation-delay: 1.05s; }
#neo-voice.st-think .nv-b { animation-duration: 1.5s !important; }
#neo-voice.st-think .nv-core { animation: nvThink 1s ease-in-out infinite; }
#neo-voice.st-speak .nv-core { animation: nvTalk .6s ease-in-out infinite; }
#neo-voice.st-speak .nv-b { animation-duration: 3.5s !important; }
.nv-state { color: rgba(255,255,255,.75); font-size: 14px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; min-height: 20px; }
.nv-text { color: #fff; font-size: 19px; font-weight: 600; line-height: 1.55; min-height: 60px; max-height: 32vh; overflow-y: auto; padding: 0 6px; }
.nv-hint { position: absolute; bottom: max(22px, var(--sab)); left: 20px; right: 20px; text-align: center; color: rgba(255,255,255,.45); font-size: 12.5px; }
@media (max-width: 640px) { .nv-orb { width: 172px; height: 172px; } .nv-text { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { .nv-b, .nv-core, .nv-ring { animation: none !important; } }

/* --- Panel: Neo Günün Özeti şeridi (AI hissi) --- */
.dsh-ai {
  display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 12px 16px;
  border-radius: 15px; cursor: pointer; position: relative; overflow: hidden;
  background: linear-gradient(120deg, rgba(124,108,245,.10), rgba(92,180,222,.10));
  border: 1px solid rgba(124,108,245,.30);
  animation: fadeUp .45s var(--ease) both; transition: border-color .15s, transform .12s;
}
.dsh-ai:hover { border-color: var(--ai); transform: translateY(-1px); }
.dsh-ai::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 32%, rgba(255,255,255,.4) 50%, transparent 68%);
  transform: translateX(-100%); animation: nvSheen 3s ease .8s 2;
}
@keyframes nvSheen { to { transform: translateX(100%); } }
.dsh-ai-orb {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 32% 30%, #fff 0%, #5cb4de 38%, #2ba69e 72%, #1f7cb6 100%);
  box-shadow: 0 0 16px rgba(92,180,222,.65); animation: nvBreath 3.2s ease-in-out infinite;
}
.dsh-ai-txt { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.dsh-ai-txt b { color: var(--ai); font-weight: 800; }
.dsh-ai-go { margin-left: auto; flex: none; font-size: 12.5px; font-weight: 700; color: var(--ai); white-space: nowrap; }

/* ============================================================
   KOYU AI TEMASI  ·  data-theme="dark"  ·  2026-07-03
   Referans yön: koyu lacivert→siyah + camgöbeği (cyan) glow +
   glassmorphism + Neo merkezli AI. Açık tema varsayılan korunur;
   burası yalnızca token override + hardcoded beyaz yüzey düzeltmeleri.
   ============================================================ */
html[data-theme="dark"] {
  /* yüzeyler */
  --bg: #070b16;
  --bg-2: #0a1024;
  --surface: #101a33;
  --surface-2: #0b1428;
  --line: rgba(120,180,255,.12);
  --line-2: rgba(120,180,255,.22);
  /* mürekkep */
  --ink: #e9f1ff;
  --ink-2: #aebdd6;
  --muted: #7789ab;
  /* marka — cyan/mavi */
  --brand: #4fd6ff;
  --brand-2: #2b7fff;
  --brand-ink: #bfe9ff;
  --brand-soft: rgba(79,214,255,.14);
  --brand-grad: linear-gradient(135deg, #4fd6ff 0%, #2b7fff 100%);
  --navy-grad: linear-gradient(180deg, #0a1226 0%, #070b18 100%);
  --accent: #38e8c8;
  --accent-soft: rgba(56,232,200,.14);
  --sky: #5cc7ff;
  /* Neo — koyu temada parlak camgöbeği (mor klişe kaldırıldı) */
  --neo: #00e1ff;
  --neo-2: #4d8bff;
  --neo-3: #bde6ff;
  --neo-ink: #04222a;
  --neo-grad: linear-gradient(150deg, #00e1ff 0%, #4d8bff 100%);
  --warm: #ff9d6b;
  --warm-2: #ffb98e;
  --warm-soft: rgba(255,157,107,.15);
  /* AI aksanı — geriye uyum: Neo'ya işaret eder */
  --ai: var(--neo);
  --ai-2: var(--neo-2);
  --ai-soft: rgba(0,225,255,.14);
  --ai-grad: var(--neo-grad);
  /* durum — koyu zemine uygun */
  --danger: #ff6b7d; --danger-soft: rgba(255,107,125,.15);
  --warn: #ffb454;   --warn-soft: rgba(255,180,84,.15);
  --info: #5cc7ff;   --info-soft: rgba(92,199,255,.14);
  --ok: #38e8c8;
  --t-planned: #ffb454; --t-progress: #5cc7ff; --t-done: #38e8c8;
  /* gölge → cyan glow */
  --sh-sm: 0 1px 2px rgba(2,6,18,.4);
  --sh: 0 1px 0 rgba(120,180,255,.05) inset, 0 14px 34px rgba(2,6,18,.5);
  --sh-lg: 0 1px 0 rgba(120,180,255,.06) inset, 0 26px 60px rgba(2,6,18,.6);
  --sh-brand: 0 8px 26px rgba(43,127,255,.45);
  --sh-ai: 0 8px 26px rgba(139,124,240,.4);
}

/* zemin — AI ışık havuzları (html'e de koyu taban ver ki içerik uzayınca beyaz sızmasın) */
html[data-theme="dark"] { background: #070a14; }
html[data-theme="dark"] body {
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(43,127,255,.16), transparent 60%),
    radial-gradient(900px 520px at -6% 108%, rgba(56,232,200,.10), transparent 55%),
    linear-gradient(160deg, #070b16 0%, #0a1024 55%, #070a14 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--ink);
}
html[data-theme="dark"] ::selection { background: rgba(79,214,255,.28); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(120,180,255,.22); background-clip: content-box; }

/* form alanları */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: var(--surface-2); color: var(--ink); border-color: var(--line-2);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #5f7095; }
html[data-theme="dark"] .tb-search input:focus { background: var(--surface); }

/* butonlar */
html[data-theme="dark"] .btn-ghost { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
html[data-theme="dark"] .btn-ghost:hover { background: rgba(79,214,255,.09); }

/* üst bar — koyu cam */
html[data-theme="dark"] .topbar {
  background: rgba(9,15,30,.72) !important;
  backdrop-filter: blur(16px) !important; -webkit-backdrop-filter: blur(16px) !important;
  border-bottom-color: var(--line);
}
html[data-theme="dark"] .icon-btn { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
html[data-theme="dark"] .icon-btn:hover { background: rgba(79,214,255,.10); border-color: var(--line-2); }
html[data-theme="dark"] .icon-btn.bell .nd { box-shadow: 0 0 0 2px #0b1428; }
html[data-theme="dark"] .user-chip:hover { background: var(--surface-2); }

/* kenar çubuğu — daha derin + cyan aktif glow */
html[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #0a1327 0%, #070b18 100%);
  border-right: 1px solid var(--line);
}
html[data-theme="dark"] .nav button.active {
  background: linear-gradient(90deg, rgba(79,214,255,.20), rgba(43,127,255,.06));
  color: #eaf7ff; box-shadow: inset 0 0 0 1px rgba(79,214,255,.28);
}
html[data-theme="dark"] .nav button.active::before { background: linear-gradient(180deg, #4fd6ff, #2b7fff); box-shadow: 0 0 12px rgba(79,214,255,.7); }
html[data-theme="dark"] .side-logout { background: rgba(255,255,255,.04); color: #dbe8ff; border-color: var(--line); }

/* paneller / kartlar / modallar — koyu cam + ince ışıklı çerçeve */
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .drawer,
html[data-theme="dark"] .kpi-card,
html[data-theme="dark"] .dsh-kpi,
html[data-theme="dark"] .dsh-glass,
html[data-theme="dark"] .fin-kpi {
  background: rgba(16,26,51,.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(120,180,255,.06) inset, 0 18px 42px rgba(2,6,18,.55);
}
html[data-theme="dark"] .card:hover { border-color: rgba(79,214,255,.4); box-shadow: 0 0 0 1px rgba(79,214,255,.25), 0 22px 50px rgba(2,6,18,.6); }
html[data-theme="dark"] .card::after { background: rgba(79,214,255,.16); }
html[data-theme="dark"] .dsh-ava-dot { border-color: #101a33; }

/* tablolar */
html[data-theme="dark"] thead th { background: var(--surface-2) !important; color: var(--muted); border-bottom-color: var(--line); }
html[data-theme="dark"] tbody td { border-bottom-color: var(--line); }
html[data-theme="dark"] tbody tr:hover { background: rgba(79,214,255,.06); }

/* rozetler */
html[data-theme="dark"] .badge { background: rgba(120,150,200,.16); color: var(--ink-2); }
html[data-theme="dark"] .badge.nurse { background: rgba(167,139,255,.18); color: #cbb9ff; }

/* sekmeler / overlay */
html[data-theme="dark"] .tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
html[data-theme="dark"] .overlay { background: rgba(2,6,16,.66); }

/* giriş ekranı */
html[data-theme="dark"] .auth-card { background: rgba(16,26,51,.78); border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(2,6,18,.7); }
html[data-theme="dark"] .seed-note { background: var(--surface-2); color: var(--ink-2); }

/* duyuru / bakım / impersonation bantları */
html[data-theme="dark"] .app-banner { border-bottom-color: var(--line); }
html[data-theme="dark"] .app-banner.warn { background: rgba(255,180,84,.14); color: #ffcf8f; }
html[data-theme="dark"] .app-banner.success { background: rgba(56,232,200,.14); color: #7ff0d6; }
html[data-theme="dark"] .app-banner.imp { background: rgba(255,180,84,.16); color: #ffce8c; }
html[data-theme="dark"] .app-banner .ab-x { background: rgba(255,255,255,.10); }
html[data-theme="dark"] .app-banner .ab-x:hover { background: rgba(255,255,255,.18); }

/* Neo asistan — panel içi baloncuk/çip/alt-bar (hardcoded beyazlar) */
html[data-theme="dark"] .msg.neo,
html[data-theme="dark"] .neo-tip,
html[data-theme="dark"] .neo-chip,
html[data-theme="dark"] .neo-foot,
html[data-theme="dark"] .transcript,
html[data-theme="dark"] .tk-plat { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .neo-foot { border-top-color: var(--line); }
html[data-theme="dark"] .neo-chip:hover { background: rgba(79,214,255,.10); border-color: var(--line-2); }
html[data-theme="dark"] .ai-suggest,
html[data-theme="dark"] .neo-tx { background: linear-gradient(180deg, rgba(120,180,255,.05), var(--ai-soft)); }
html[data-theme="dark"] .neo-tx-ai { background: var(--surface-2); }
html[data-theme="dark"] .wave i { background: var(--brand); }

/* segment/seçim düğmeleri + küçük giriş yüzeyleri */
html[data-theme="dark"] .mode-seg button.on,
html[data-theme="dark"] .set-seg button,
html[data-theme="dark"] .rec-seg,
html[data-theme="dark"] .bc-dir-b,
html[data-theme="dark"] .perm-lvl,
html[data-theme="dark"] .qr-url input { background: var(--surface-2); color: var(--ink); }

/* hasta kartı */
html[data-theme="dark"] .pcard-btn.primary { background: var(--surface-2); color: var(--brand); }
html[data-theme="dark"] .pcard-btn.primary:hover { background: rgba(79,214,255,.12); }
html[data-theme="dark"] .pstat-icon.active { background: rgba(92,199,255,.16); }
html[data-theme="dark"] .pstat-icon.money { background: rgba(255,180,84,.16); }
html[data-theme="dark"] .pstat-icon.clock { background: rgba(167,139,255,.16); }

/* Randevu ajanda blokları — inline açık branş tonu koyuda cam olsun (branş rengi sol kenarda kalır) */
html[data-theme="dark"] .ag-block { background: rgba(16,26,51,.82) !important; box-shadow: 0 2px 10px rgba(2,6,18,.45); }
html[data-theme="dark"] .ag-block:hover { box-shadow: 0 8px 24px rgba(2,6,18,.6); }
html[data-theme="dark"] .ag-b-st { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }

/* aktif segment/sekme düğmeleri: koyuda cyan zemin + KOYU yazı (beyaz-üstü-cyan kontrast sorununu çözer) */
html[data-theme="dark"] .view-seg button.on,
html[data-theme="dark"] .set-seg button.on,
html[data-theme="dark"] .rec-seg button.on,
html[data-theme="dark"] .lab-f.on,
html[data-theme="dark"] .rep-tab.on,
html[data-theme="dark"] .mode-seg button.on {
  background: var(--brand) !important; background-image: none !important;
  color: #04121f !important; border-color: var(--brand) !important;
  box-shadow: 0 0 12px rgba(79,214,255,.3);
}
html[data-theme="dark"] .mode-seg button.on[data-mode="voice"] { background: var(--ai-grad) !important; color: #fff !important; box-shadow: var(--sh-ai); }

/* eski/tekil body açık zemin override'ı koyuda etkisizleşsin */
html[data-theme="dark"] body { background-color: transparent; }

/* tema geçiş düğmesi göstergesi */
html[data-theme="dark"] #theme-toggle { color: #ffd76b; }

/* ============================================================
   CDASH — Koyu AI Panel (referans mockup birebir) · 2026-07-03
   Token tabanlı → hem koyu (varsayılan, AI görünümü) hem aydınlıkta çalışır.
   ============================================================ */
.cdash { display: flex; flex-direction: column; gap: 18px; animation: fadeUp .4s var(--ease); }
.cdash-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.cdash-hi { font-family: var(--font-head); font-size: 25px; font-weight: 800; letter-spacing: -.025em; }
.cdash-hi .wave { display: inline-block; transform-origin: 70% 70%; animation: dshWave 2.8s ease infinite; }
.cdash-date { font-size: 13px; color: var(--muted); margin-top: 3px; }
.cdash-pulse { font-size: 12.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 8px 14px; border-radius: 20px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.cdash-pulse .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: cdBlink 1.8s infinite; }

/* ---- Neo Console (Panel merkezî asistan) ---- */
.cdash-console {
  position: relative; display: grid; grid-template-columns: 172px 1fr auto; gap: 22px; align-items: center;
  background:
    radial-gradient(520px 260px at 16% 8%, color-mix(in srgb, var(--neo) 14%, transparent), transparent 62%),
    var(--surface);
  border: 1px solid var(--line); border-radius: 22px; padding: 22px 26px; box-shadow: var(--sh); overflow: hidden;
}
.cc-neo { position: relative; display: grid; place-items: center; align-self: center; }
.cc-neo::before { content: ""; position: absolute; top: 38%; width: 152px; height: 152px; transform: translateY(-50%); border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--neo) 26%, transparent), transparent 66%); filter: blur(6px); z-index: 0; }
.cc-state { position: absolute; bottom: -4px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: var(--neo); text-transform: uppercase; z-index: 3; }
.cc-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; color: var(--neo); font-weight: 600; margin-bottom: 5px; }
.cdash-console .cdash-hi { font-size: 24px; margin-bottom: 5px; }
.cc-lead { color: var(--ink-2); font-size: 14px; line-height: 1.55; max-width: 62ch; }
.cc-lead b { color: var(--ink); font-weight: 600; }
.cc-lead .cdash-hl { color: var(--neo); font-weight: 600; }
.cc-cmd { display: flex; align-items: center; gap: 9px; margin-top: 15px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 7px 7px 7px 15px; max-width: 640px; }
.cc-cmd input { flex: 1; background: none; border: none; outline: none; color: var(--ink); font-family: var(--font-body); font-size: 14px; }
.cc-cmd input::placeholder { color: var(--muted); }
.cc-send { width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: 15px; flex: none; transition: transform .12s; }
.cc-send:hover { transform: translateY(-1px); color: var(--neo); border-color: var(--neo); }
.cc-mic { width: 42px; height: 42px; border-radius: 11px; border: none; cursor: pointer; display: grid; place-items: center; background: var(--neo-grad); color: var(--neo-ink); font-size: 17px; flex: none; }
.cc-mic:hover { filter: brightness(1.06); }
.cc-hint { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); margin-top: 8px; letter-spacing: .02em; }
.cc-hint b { color: var(--neo); }
.cc-sugg { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.cc-sugg button { font-family: var(--font-body); font-size: 12px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: all .14s; }
.cc-sugg button:hover { border-color: var(--neo); color: var(--neo); }
.cc-meta { align-self: flex-start; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.cc-pulse { display: flex; align-items: center; gap: 7px; }
.cc-pulse .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: cdBlink 1.8s infinite; }
.cc-docs, .cc-date { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
@media (max-width: 900px) {
  .cdash-console { grid-template-columns: 108px 1fr; padding: 18px; gap: 14px; }
  .cc-neo .neo-fig-lg { width: 104px; }
  .cc-meta { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
}

/* KPI */
.cdash-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.cdash-kpi { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; overflow: hidden; box-shadow: var(--sh); transition: border-color .16s, transform .16s var(--ease); }
.cdash-kpi.is-link { cursor: pointer; }
.cdash-kpi.is-link:hover { transform: translateY(-2px); border-color: rgba(79,214,255,.4); }
.cdash-kl { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.cdash-kv { font-family: var(--font-mono); font-size: 25px; font-weight: 600; margin-top: 7px; letter-spacing: -.02em; line-height: 1.05; overflow-wrap: anywhere; }
.cdash-kv.sm { font-family: var(--font-body); }
.cdash-kv .ks { font-size: 16px; color: var(--muted); font-weight: 600; }
.cdash-kv.sm { font-size: 14.5px; font-weight: 600; line-height: 1.42; margin-top: 8px; }
.cdash-kd { font-size: 11.5px; color: var(--muted); margin-top: 7px; }
.cdash-kd.up { color: var(--ok); } .cdash-kd.warn { color: var(--warn); }
.cdash-kd.link { color: var(--brand); cursor: pointer; font-weight: 700; }
.cdash-hl { color: var(--brand); font-weight: 800; }
.cdash-kpi.glow { background: linear-gradient(150deg, rgba(43,127,255,.20), rgba(56,232,200,.07)); border-color: rgba(79,214,255,.34); box-shadow: 0 0 30px rgba(43,127,255,.14); }
.cdash-spark { position: absolute; left: 0; right: 0; bottom: 0; height: 32px; background: linear-gradient(180deg, transparent, rgba(56,232,200,.14)); clip-path: polygon(0 80%,15% 60%,30% 70%,45% 40%,60% 55%,75% 25%,90% 45%,100% 30%,100% 100%,0 100%); pointer-events: none; }
.cdash-spark.warn { background: linear-gradient(180deg, transparent, rgba(255,180,84,.16)); clip-path: polygon(0 50%,20% 60%,40% 45%,60% 65%,80% 50%,100% 60%,100% 100%,0 100%); }
.cdash-ring { position: absolute; right: 12px; top: 12px; width: 46px; height: 46px; }
.cdash-ring svg { width: 46px; height: 46px; transform: rotate(-90deg); }
.cdash-ring .rbg { fill: none; stroke: rgba(120,180,255,.16); stroke-width: 3; }
.cdash-ring .rfg { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 4px var(--brand)); transition: stroke-dashoffset 1s var(--ease); }
.cdash-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--brand); }

/* grid */
.cdash-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; align-items: start; }
.cdash-rail { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cdash-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--sh); min-width: 0; }
.cdash-ph { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-head); font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.cdash-ph .chips i { font-style: normal; font-size: 11px; font-weight: 700; }
.cdash-ph .cg { color: var(--ok); margin-right: 9px; } .cdash-ph .cb { color: var(--brand); }
.cdash-ph .live { color: #ff6b8b; font-size: 11px; animation: cdBlink 1.6s infinite; }
.cdash-lnk { border: 0; background: transparent; color: var(--brand); font-weight: 700; font-size: 12.5px; cursor: pointer; }

/* ajanda — hekim kolonları */
.cdash-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.cdash-col { min-width: 0; }
.cdash-doc { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; padding-bottom: 9px; margin-bottom: 5px; border-bottom: 1px solid var(--line); }
.cdash-av { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: #04121f; flex: none; }
.cdash-av.a1 { background: linear-gradient(135deg,#4fd6ff,#2b7fff); }
.cdash-av.a2 { background: linear-gradient(135deg,#38e8c8,#12b3a6); }
.cdash-av.a3 { background: linear-gradient(135deg,#ffb454,#ff7a45); }
.cdash-av.a4 { background: linear-gradient(135deg,#b98bff,#7c5cff); }
.cdash-slot { display: flex; gap: 10px; padding: 7px 0; align-items: center; cursor: pointer; }
.cdash-slot b { font-size: 11.5px; color: var(--muted); min-width: 36px; font-variant-numeric: tabular-nums; }
.cdash-pt { font-size: 12.5px; display: flex; align-items: center; gap: 8px; background: var(--surface-2); padding: 8px 11px; border-radius: 9px; flex: 1; min-width: 0; border: 1px solid transparent; transition: border-color .13s; }
.cdash-pt span.txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdash-slot:hover .cdash-pt { border-color: var(--line-2); }
.cdash-tdot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.cdash-tdot.done { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.cdash-tdot.now { background: var(--brand); box-shadow: 0 0 9px var(--brand); animation: cdBlink 1.4s infinite; }
.cdash-slot.empty .cdash-pt { background: transparent; border: 1px dashed var(--line); }
.cdash-pt.muted { color: var(--muted); }
.cdash-empty { padding: 22px 14px; text-align: center; color: var(--muted); font-size: 13px; }

/* Röntgen · AI holografik tarama */
.cdash-scan { position: relative; height: 150px; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, rgba(43,127,255,.16), transparent 65%); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); cursor: pointer; }
.cdash-tooth { height: 132px; filter: drop-shadow(0 0 8px rgba(79,214,255,.42)); }
.cdash-lesion { fill: #ff5a7a; animation: cdLesion 1.8s infinite; }
.cdash-beam { position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--brand), transparent); box-shadow: 0 0 14px var(--brand); animation: cdScan 2.8s ease-in-out infinite; }
.cdash-finding { margin-top: 11px; font-size: 12px; color: var(--ink-2); background: var(--surface-2); padding: 9px 11px; border-radius: 9px; display: flex; align-items: center; gap: 8px; }
.cdash-finding b { color: #ff8fa3; } .cdash-finding .wd { color: var(--warn); }

/* Klinikte Şu An */
.cdash-prow { display: flex; align-items: center; gap: 11px; padding: 9px 0; cursor: pointer; }
.cdash-prow .info { flex: 1; min-width: 0; }
.cdash-prow b { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdash-prow .sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdash-livedot { width: 9px; height: 9px; border-radius: 50%; background: #ff6b8b; box-shadow: 0 0 10px #ff6b8b; animation: cdBlink 1.5s infinite; flex: none; }
.cdash-livedot.g { background: var(--ok); box-shadow: 0 0 10px var(--ok); }

@keyframes cdBlink { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes cdScan { 0% { top: 8%; } 50% { top: 88%; } 100% { top: 8%; } }
@keyframes cdLesion { 0%,100% { opacity: .4; r: 6px; } 50% { opacity: .95; r: 8px; } }

/* koyu tema: cam + glow */
html[data-theme="dark"] .cdash-kpi,
html[data-theme="dark"] .cdash-panel {
  background: rgba(16,26,51,.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(120,180,255,.06) inset, 0 18px 42px rgba(2,6,18,.5);
}
html[data-theme="dark"] .cdash-kpi.glow { background: linear-gradient(150deg, rgba(43,127,255,.22), rgba(56,232,200,.08)); }

@media (max-width: 1000px) { .cdash-grid { grid-template-columns: 1fr; } .cdash-kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cdash-kpis { grid-template-columns: 1fr; } }

/* ================= ÇOK BRANŞLI KLİNİK OS — BRANŞA ÖZEL MODÜL ================= */
.spec-dash-panel { cursor: pointer; }
.spec-dash-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 2px 2px; }
.spec-dash-chip { flex: 1 1 180px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; background: var(--surface-2); }
.spec-dash-chip b { display: block; font-size: 13px; }
.spec-dash-chip span { color: var(--muted); font-size: 12px; }

.spec-mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.spec-mod-card { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 5px; }
.spec-mod-card b { font-size: 13.5px; }
.spec-mod-card span { color: var(--muted); font-size: 12.5px; }

.spec-pt-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 16px; }
.spec-pt-item { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink, #1a2430); }
.spec-pt-item.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.spec-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-pill { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-weight: 650; cursor: pointer; color: var(--muted); }
.spec-pill.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ---- Görüntülü görüşme (component:'telehealth') — Jitsi odası kartı ---- */
.tele-box { text-align: center; padding: 26px 20px; border: 1px solid var(--line); border-radius: var(--r-md, 14px); background: var(--surface-2); margin: 4px 0 8px; }
.tele-box.live { border-color: var(--accent); background: var(--accent-soft); }
.tele-hero { font-size: 40px; line-height: 1; margin-bottom: 8px; }
.tele-title { font-size: 16px; font-weight: 750; margin-bottom: 6px; }
.tele-box .cell-sub { max-width: 460px; margin: 0 auto; }
.tele-room { display: inline-block; font-family: var(--font-mono, monospace); font-size: 12.5px; letter-spacing: .3px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; margin: 6px 0 4px; color: var(--muted); }
.tele-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px 0 10px; }

.spec-add { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; padding: 12px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); }
.spec-add input, .spec-add textarea { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; font-family: var(--font-body); }
.spec-add button { align-self: flex-end; }

.spec-rec-list { display: flex; flex-direction: column; gap: 10px; }
.spec-rec-card { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: var(--surface-2); }
.spec-rec-head { display: flex; align-items: center; gap: 10px; }
.spec-rec-head b { flex: 1; font-size: 13.5px; }
.spec-rec-note { margin-top: 6px; font-size: 13px; white-space: pre-wrap; }

/* ---- Yapılandırılmış branş formu (fields[]) — ölçüm/hedef/su-aktivite/sağlık notu vb. ---- */
.spec-field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; align-items: end; }
.spec-field { display: flex; flex-direction: column; gap: 4px; }
.spec-field label { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.spec-field input, .spec-field select, .spec-field textarea { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; font-family: var(--font-body); }
.spec-badge { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.spec-progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 6px; }
.spec-progress-bar { height: 100%; background: var(--accent); border-radius: 999px; }

/* ---- Beslenme Planı (meal_plan component) — öğün/besin builder ---- */
.meal-plan-form .meal-plan-meals { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.meal-plan-card { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; background: #fff; }
.meal-plan-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.meal-plan-card-head .mp-meal-name { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 650; }
.meal-plan-items { display: flex; flex-direction: column; gap: 6px; }
.meal-plan-item-row { display: grid; grid-template-columns: 2fr 1fr 90px auto; gap: 6px; align-items: center; }
.meal-plan-item-row input { border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font-size: 13px; }
.meal-plan-total { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.meal-plan-detail { margin-top: 8px; font-size: 12.5px; }
.meal-plan-detail summary { cursor: pointer; color: var(--accent); font-weight: 650; }
.meal-plan-view-row { margin-top: 6px; }
.meal-plan-view-row ul { margin: 4px 0 0 18px; padding: 0; }
@media (max-width: 560px) { .meal-plan-item-row { grid-template-columns: 1fr; } }

/* ---- Diyet listesi araç şeridi: şablonlar + öğün saati + gönderim aksiyonları ---- */
.mp-tpl-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mp-tpl-row select { flex: 1; min-width: 190px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: var(--font-body); background: #fff; }
.mp-tpl-namer { display: flex; gap: 8px; align-items: center; }
.mp-tpl-namer input { flex: 1; }
.meal-plan-card-head .mp-meal-time { width: 112px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 12.5px; color: var(--muted); }
.mp-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }

/* ---- Diyetisyen hesaplama araçları (diet_calc component) ---- */
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 12px 0 4px; }
.dc-card { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; background: #fff; }
.dc-card.warn { border-color: #e4b6b6; background: #fdf6f6; }
.dc-ic { font-size: 21px; line-height: 1; }
.dc-val { font-size: 17px; font-weight: 750; letter-spacing: -0.01em; }
.dc-lbl { font-size: 11.5px; color: var(--muted); font-weight: 650; }
.dc-sub { font-size: 11px; color: var(--muted); }
.dc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.diet-calc .dc-actions button { align-self: auto; }

/* ---- Jenerik trend grafiği (modül chart:{key,label,unit}) ---- */
.spec-chart { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: var(--surface-2); margin-bottom: 14px; }
.spec-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; font-size: 13px; }
.spec-chart svg { display: block; width: 100%; height: 120px; }
.spec-chart polyline { stroke: var(--brand, #185fa5); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.spec-chart circle { fill: var(--brand, #185fa5); }
.spec-chart-minmax { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---- Fotoğraf takibi (component:'photo') — önce/sonra karşılaştırma ---- */
.spec-photo-drop { margin-top: 10px; border: 1.5px dashed var(--line-2); border-radius: var(--r-sm); background: #fff; min-height: 120px; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; color: var(--muted); font-size: 13px; }
.spec-photo-drop img { max-width: 100%; max-height: 220px; object-fit: contain; }
.spec-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.spec-photo-card { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); overflow: hidden; }
.spec-photo-thumb { aspect-ratio: 1 / 1; background: #eef1f4; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.spec-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.spec-photo-meta { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.spec-photo-meta b { font-size: 13px; }
.spec-photo-meta .btn { align-self: flex-start; margin-top: 4px; }
.overlay.img-lightbox { justify-content: center; align-items: center; padding: 20px; background: rgba(8,14,24,.82); }
.overlay.img-lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: var(--sh-lg); }
.overlay.img-lightbox .lightbox-close { position: absolute; top: 18px; right: 22px; width: 38px; height: 38px; border-radius: 999px; border: none; background: rgba(255,255,255,.14); color: #fff; font-size: 18px; cursor: pointer; }
