
/* ============================================================
   TaksimChat Fun — Destek widget'ı
   Tema: "Taksim akşamı" — derin indigo-mor (sistem/marka) + sıcak
   mercan (sen/senin aksiyonun) + coin-altını mikro vurgu.
   ============================================================ */
:root {
  /* TaksimChatFun kimliği — tasarım spec'i §2, değerler birebir.
     KURAL: turuncu YALNIZ primary CTA'da, kırmızımsı --star YALNIZ zorunlu
     alan yıldızında. Diğer tüm vurgular mor ailesinden. Duotone (turuncu/mavi)
     yalnız logonun içinde kalır, form gövdesine taşmaz. */
  --tc-purple: #7C3AED;
  --tc-purple-dark: #6D28D9;
  --tc-purple-light: #8B5CF6;
  --tc-orange: #F47B20;
  --tc-orange-hover: #E06A12;
  --tc-lav: #EDE7FB;
  --tc-lav-text: #4C1D95;
  --tc-title: #2E1065;

  --surface: #FFFFFF;
  --field-border: #D8D3E0;
  --field-prefix: #F7F5FC;
  --label: #2C2C2A;
  --placeholder: #B4B2A9;
  --muted: #888780;
  --hint: #5F5E5A;
  --danger: #E24B4A;
  --danger-ring: #FCEBEB;
  --star: #E8324A;

  /* Sohbetin geri kalanı da aynı kimlikten beslenir */
  --ink: var(--tc-title);
  --bg: #F6F3FB;
  --brand-1: var(--tc-purple);
  --brand-2: var(--tc-purple-light);
  --accent: var(--tc-orange);
  --accent-ink: var(--tc-orange-hover);
  --blue: #2F6FE0;
  --blue-ink: #1E4FA8;
  --blue-soft: #E9F1FE;
  --gold: #F5A524;
  --success: #16A34A;
  --success-bg: #E9F7EE;
  --line: #E7E2F0;
  --lav: var(--tc-lav);
  --shadow: 0 10px 30px rgba(46, 16, 101, .12);
  --radius: 20px;
  --display: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --body: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(1200px 480px at 50% -10%, #EEE4FA 0%, rgba(238,228,250,0) 60%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;   /* mobilde tap'te gri kutu çıkmasın */
}
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Dokunmatik: input dışı öğelerde metin seçimi/çift-dokunma yakınlaşması olmasın */
button, .chip, .cat-card, .cc-item, .persona-card { touch-action: manipulation; }
.hidden { display: none !important; }

.demo-banner {
  background: linear-gradient(90deg, var(--gold), #f6c765);
  color: #4a3600; text-align: center; font-size: 11.5px; font-weight: 700;
  letter-spacing: .05em; padding: 5px 8px; text-transform: uppercase;
}

/* ---------- login (demo kısayolu) ---------- */
.login-wrap { max-width: 760px; margin: 40px auto; padding: 0 18px; text-align: center; }
.login-wrap h1 { font-family: var(--display); font-size: 26px; letter-spacing: -.01em; margin-bottom: 8px; }
.login-wrap .sub { color: var(--muted); margin-bottom: 26px; }
.persona-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.persona-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  text-align: left; cursor: pointer; transition: box-shadow .16s, transform .16s, border-color .16s;
}
.persona-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #d9ccec; }
.persona-name { display: block; font-weight: 700; margin-bottom: 2px; }
.persona-handle { display: block; color: var(--brand-2); font-size: 13px; margin-bottom: 8px; }
.persona-scenario { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.anon-link { margin-top: 18px; font-size: 14px; }
.anon-link a { color: var(--brand-2); text-decoration: none; }
.anon-link a:hover { text-decoration: underline; }

/* ---------- admin login ---------- */
.admin-login-wrap { min-height: 82vh; display: grid; place-items: center; padding: 20px; }
.admin-login-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 32px 28px; width: 380px; max-width: 100%; text-align: center; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
}
.al-icon {
  font-size: 26px; width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 6px;
  display: grid; place-items: center; background: var(--lav);
}
.admin-login-card h1 { font-family: var(--display); font-size: 22px; }
.al-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 10px; }
.admin-login-card input {
  border: 1.5px solid #DFD6EE; border-radius: 13px; padding: 12px 14px; font-size: 16px;
  outline: none; font-family: var(--body);
}
.admin-login-card input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(139,63,217,.14); }
.al-err { color: var(--accent-ink); font-size: 12.5px; min-height: 16px; }
.admin-login-card .primary-btn { margin-top: 4px; }

/* ---------- telefon çerçevesi ---------- */
.phone-wrap { display: flex; justify-content: center; padding: 26px 10px; }
.phone {
  width: 400px; max-width: 100%; height: 80vh; min-height: 580px;
  background: var(--surface); border-radius: 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line);
}

.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; color: #fff; position: relative;
  background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
}
/* Logodaki oyun kolunun turuncu|mavi ayrımı — tek cesur hamle, ince tutuldu. */
.chat-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 42%,
                              var(--blue) 58%, var(--blue) 100%);
}
.chat-title { display: flex; align-items: center; gap: 11px; z-index: 1; }
.bot-avatar {
  font-size: 20px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.16); box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}
.bot-name { font-family: var(--display); font-weight: 600; font-size: 15.5px; letter-spacing: -.01em; }
.bot-status { font-size: 11.5px; opacity: .85; display: flex; align-items: center; gap: 5px; }
.bot-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5AE0A0; box-shadow: 0 0 0 2px rgba(90,224,160,.3); }
.header-actions { z-index: 1; }
.icon-btn {
  background: rgba(255,255,255,.15); border: 0; color: #fff; font-size: 15px;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; margin-left: 6px;
  transition: background .15s;
}
.icon-btn:hover { background: rgba(255,255,255,.28); }

.messages { flex: 1; overflow-y: auto; padding: 18px 14px; display: flex; flex-direction: column; gap: 9px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.bubble {
  max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; animation: pop .22s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.bubble.bot { background: var(--lav); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.operator { background: var(--blue-soft); color: var(--ink); align-self: flex-start; border: 1px solid #C5DBFA; border-bottom-left-radius: 6px; }
.op-tag { display: block; font-size: 10px; font-weight: 700; color: var(--blue-ink); margin-bottom: 3px; }
.mt-hint { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 12px; }
.mt-input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 16px; font-family: var(--body); color: var(--ink); background: var(--surface);
  margin-bottom: 10px; box-sizing: border-box;
}
.mt-input:focus { border-color: var(--brand-2); outline: none; box-shadow: 0 0 0 3px rgba(139,63,217,.14); }
.ob-tickets-btn {
  width: 100%; margin-top: 14px; padding: 13px; border-radius: 12px;
  border: 1.5px dashed var(--brand-2); background: var(--lav); color: var(--brand-1);
  font-family: var(--body); font-size: 14px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ob-tickets-btn:hover { background: var(--surface); border-style: solid; }
.ob-tickets-btn:active { transform: translateY(1px); }
.bubble.user {
  background: linear-gradient(135deg, var(--accent), #ff9542); color: #fff;
  align-self: flex-end; border-bottom-right-radius: 6px;
}
.bubble.typing { color: var(--brand-2); letter-spacing: 3px; background: var(--lav); }
.notice {
  align-self: center; font-size: 12px; color: #6a5a2a; background: #FCF3DA;
  border: 1px solid #F2E2AE; border-radius: 12px; padding: 7px 13px; max-width: 94%;
  text-align: center; line-height: 1.45;
}

.chips-area { padding: 8px 14px 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--surface); border: 1.5px solid #E3D8F4; color: var(--brand-1); border-radius: 20px;
  padding: 8px 15px; font-size: 13.5px; font-weight: 500; cursor: pointer; text-decoration: none;
  transition: background .14s, border-color .14s, transform .1s;
}
.chip:hover { background: var(--lav); border-color: var(--brand-2); }
.chip:active { transform: scale(.97); }
.chip-ghost { border-style: dashed; color: var(--muted); border-color: #D2C6E6; }
.chip-ghost:hover { color: var(--brand-2); border-color: var(--brand-2); }

/* Ana menü kategori kartları — kompakt ikon+etiket ızgarası */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
.cat-card {
  display: flex; align-items: center; gap: 7px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  padding: 6px 8px; cursor: pointer; font-family: var(--body); min-width: 0;
  transition: border-color .14s, box-shadow .16s, transform .1s;
}
.cat-card:hover { border-color: var(--brand-2); box-shadow: 0 4px 12px rgba(62,30,122,.12); transform: translateY(-1px); }
.cat-card:active { transform: scale(.98); }
.cat-ic {
  font-size: 14px; width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px;
  display: grid; place-items: center; line-height: 1;
  background: linear-gradient(135deg, var(--lav), #ECE2FB);
}
.cat-tx { font-size: 11.5px; font-weight: 600; color: var(--ink); line-height: 1.2; min-width: 0; }

/* Onboarding "şimdilik geç" — belirgin buton (link değil) */
.skip-btn { width: 100%; text-align: center; font-weight: 600; padding: 11px 20px; }
.date-picker { display: flex; gap: 8px; align-items: center; width: 100%; }
.date-input {
  flex: 1; border: 1.5px solid #DFD6EE; border-radius: 14px; padding: 10px 14px;
  font-size: 16px; font-family: var(--body); outline: none;
}
.date-input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(139,63,217,.14); }

.step-card {
  width: 100%; background: linear-gradient(135deg, #F7F2FF, #FBF7FF);
  border: 1px solid #E7DAF8; border-radius: 16px; padding: 14px;
}
.step-counter {
  font-size: 11.5px; color: var(--brand-2); font-weight: 700; margin-bottom: 6px;
  letter-spacing: .04em; text-transform: uppercase;
}
.step-text { font-size: 14px; margin-bottom: 12px; line-height: 1.5; }

.success-card {
  width: 100%; background: var(--success-bg); border: 1px solid #C5E9D2; border-radius: 16px;
  padding: 16px; text-align: center; display: flex; flex-direction: column; gap: 9px; align-items: center;
}
.success-icon { font-size: 30px; }
.success-title { font-family: var(--display); font-weight: 600; }
.success-body { font-size: 13.5px; color: #2f5b40; line-height: 1.5; }

/* Inline yönlendirme kartı (teknik ekibe aktar) — popup yerine */
.route-card {
  width: 100%; border-radius: 18px; padding: 18px 16px; text-align: center;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  background: linear-gradient(160deg, #F7F2FF 0%, #FDF6F4 100%);
  border: 1px solid #E7DAF8; box-shadow: 0 6px 18px rgba(74,47,176,.10);
}
.route-icon {
  font-size: 26px; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; box-shadow: 0 4px 12px rgba(74,47,176,.14);
}
.route-title { font-family: var(--display); font-weight: 600; font-size: 15.5px; }
.route-ticketno { font-weight: 800; color: var(--brand-2); font-size: 13px; letter-spacing: .04em; }
.route-body { font-size: 13px; color: var(--muted); line-height: 1.5; max-width: 300px; }
.route-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 6px; }
.route-cta {
  background: linear-gradient(135deg, var(--accent), #ff9542); color: #fff; border: 0; border-radius: 22px;
  padding: 12px 20px; font-size: 14.5px; font-weight: 700; cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 20px rgba(255,106,90,.36); transition: transform .1s, box-shadow .15s;
}
.route-cta:hover { box-shadow: 0 10px 26px rgba(255,106,90,.46); transform: translateY(-1px); }
.route-home {
  background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline;
}

.transfer-bar { padding: 6px 14px 10px; border-top: 1px solid var(--line); }
.support-link-btn {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--accent-ink); font-family: var(--body);
  font-size: 13.5px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.support-link-btn:hover { background: var(--lav); border-color: var(--accent); }
.support-link-btn:active { transform: translateY(1px); }
.secondary-btn {
  background: var(--surface); border: 1.5px solid #D2C8E4; color: var(--ink); border-radius: 20px;
  padding: 8px 15px; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-block;
  transition: border-color .14s, background .14s;
}
.secondary-btn:hover { border-color: var(--brand-2); background: var(--lav); }
.primary-btn {
  background: linear-gradient(135deg, var(--accent), #ff8367); border: 0; color: #fff; border-radius: 20px;
  padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 16px rgba(255,106,90,.32); transition: transform .1s, box-shadow .14s;
}
.primary-btn:hover { box-shadow: 0 8px 22px rgba(255,122,24,.38); }
.primary-btn:active { transform: translateY(1px); }

.composer {
  display: flex; gap: 9px; padding: 12px 14px; border-top: 1px solid var(--line); background: #FBFAFD;
}
.composer input {
  flex: 1; border: 1.5px solid #DFD6EE; border-radius: 22px; padding: 11px 16px; font-size: 16px;
  outline: none; font-family: var(--body); transition: border-color .14s, box-shadow .14s;
}
.composer input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(139,63,217,.14); }
.send-btn {
  background: linear-gradient(135deg, var(--accent), #ff9542); color: #fff; border: 0;
  width: 44px; height: 44px; border-radius: 50%; font-size: 16px; cursor: pointer; flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(255,106,90,.32);
}

/* ---------- onboarding (imza öğe: güven kartı) ---------- */
.onboard {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 22px 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.onboard-hero { text-align: center; }
.onboard-wave { font-size: 34px; }
.onboard-title {
  font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.3;
  margin-top: 6px; letter-spacing: -.01em;
}
.onboard-lock {
  display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--muted);
  background: var(--lav); border: 1px solid #E7DAF8; border-radius: 12px; padding: 10px 12px; line-height: 1.45;
}
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }

/* Telefon/e-posta modu + bayraklı ülke kodu seçici */
.contact-toggle { display: flex; gap: 6px; }
.ct-btn {
  flex: 1; padding: 9px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); font-family: var(--body); font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer;
}
.ct-btn.active { border-color: var(--brand-2); color: var(--ink); background: var(--lav); }
.phone-row { display: flex; gap: 6px; }
.cc-btn {
  display: flex; align-items: center; gap: 4px; padding: 0 10px; height: 46px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font-size: 15px; color: var(--ink); cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.cc-caret { font-size: 10px; color: var(--muted); }
.phone-row input, .ob-email {
  flex: 1; min-width: 0; height: 46px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 16px; font-family: var(--body); color: var(--ink);
  background: var(--surface); box-sizing: border-box;
}
.cc-dropdown {
  position: absolute; z-index: 60; top: 100%; left: 0; margin-top: 4px; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden;
}
.cc-dropdown > input {
  width: 100%; height: 44px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--line);
  font-size: 16px; font-family: var(--body); color: var(--ink); background: var(--surface);
  outline: none; box-sizing: border-box;
}
.cc-list { max-height: 240px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cc-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px 12px; border: 0;
  background: none; cursor: pointer; font-family: var(--body); font-size: 14px; text-align: left;
}
.cc-item:hover, .cc-item:focus { background: var(--lav); outline: none; }
.cc-flag { font-size: 18px; flex-shrink: 0; }
.cc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.cc-code { color: var(--muted); font-weight: 600; flex-shrink: 0; font-size: 13px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.field .opt { color: var(--muted); font-weight: 500; }
.field .req { color: #e5484d; font-weight: 800; margin-left: 1px; }
.req-note { font-size: 11.5px; color: var(--muted); margin: -2px 0 10px; }
.req-note .req { color: #e5484d; font-weight: 800; }
.field input {
  border: 1.5px solid #DFD6EE; border-radius: 13px; padding: 12px 14px; font-size: 16px;
  outline: none; font-family: var(--body); transition: border-color .14s, box-shadow .14s;
}
.field input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(139,63,217,.14); }
.field .hint { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.onboard-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.onboard-err { color: var(--accent-ink); font-size: 12.5px; min-height: 16px; }
.link-btn {
  background: none; border: 0; color: var(--brand-2); font-size: 13px; cursor: pointer;
  text-decoration: underline; padding: 4px;
}
.demo-help {
  border: 1px dashed #D2C8E4; border-radius: 12px; font-size: 12px; margin-top: 2px; overflow: hidden;
}
.demo-help summary { cursor: pointer; padding: 9px 12px; color: var(--muted); font-weight: 600; }
.demo-help .demo-row {
  display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line);
  cursor: pointer;
}
.demo-help .demo-row:hover { background: var(--lav); }
.demo-row .dr-name { font-weight: 600; color: var(--ink); }
.demo-row .dr-meta { color: var(--muted); font-size: 11px; text-align: right; }

/* ---------- modals ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(36,28,51,.5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px;
}
.modal-card {
  background: var(--surface); border-radius: 20px; padding: 22px; width: 440px; max-width: 100%;
  max-height: 86vh; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; box-shadow: var(--shadow);
}
.modal-card h2 { font-family: var(--display); font-size: 18px; margin-bottom: 4px; }
.modal-card label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.modal-card select, .modal-card textarea, .modal-card input[type="file"] {
  border: 1.5px solid #DFD6EE; border-radius: 12px; padding: 10px 12px; font-size: 14px; font-family: var(--body);
}
.modal-card textarea[readonly] { background: #FAF8FD; color: var(--ink); }
.attach-list { font-size: 12px; color: var(--muted); }
.device-note { font-size: 12px; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }

.ticket-card { border-bottom: 1px solid var(--line); padding: 6px 2px 12px; }
.ticket-card:last-child { border-bottom: none; }
.ticket-row {
  display: grid; grid-template-columns: 116px 1fr auto; gap: 10px; align-items: center;
  padding: 6px 0; font-size: 13.5px;
}
.tr-live {
  margin-top: 8px; width: 100%; padding: 10px; border-radius: 10px; border: none;
  background: var(--brand-1); color: #fff; font-family: var(--body);
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.tr-live:hover { filter: brightness(1.08); }
.tr-live:active { transform: translateY(1px); }
.tr-live:disabled { opacity: .6; cursor: default; }
.tr-no { font-weight: 700; color: var(--brand-2); }
.tr-status { font-size: 12px; font-weight: 700; }
.status-inceleniyor { color: #B07A00; }
.status-ek_bilgi { color: #B03A9A; }
.status-cozuldu { color: var(--success); }
.status-kapatildi { color: #6b7280; }

/* ---------- admin ---------- */
.admin-wrap { max-width: 1100px; margin: 22px auto; padding: 0 18px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.admin-header h1 { font-family: var(--display); font-size: 21px; }
.role-switch { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.role-switch select { padding: 8px 11px; border-radius: 11px; border: 1.5px solid #D2C8E4; font-family: var(--body); }
.admin-tabs { margin: 18px 0 12px; display: flex; gap: 8px; }
.admin-tabs .tab {
  background: var(--surface); border: 1.5px solid #D2C8E4; padding: 9px 20px; border-radius: 11px;
  cursor: pointer; font-size: 14px; font-weight: 500; transition: background .14s;
}
.admin-tabs .tab.active { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: #fff; border-color: transparent; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 14px; overflow: hidden; font-size: 13.5px; box-shadow: 0 4px 14px rgba(36,28,51,.06); }
.admin-table th { background: var(--lav); text-align: left; padding: 11px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.admin-table td { padding: 11px; border-top: 1px solid var(--line); vertical-align: top; }
.admin-table details pre {
  margin-top: 6px; background: #FAF8FD; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px; font-size: 12px; white-space: pre-wrap;
}
.status-badge { font-size: 12px; font-weight: 700; }
.status-select {
  font-family: var(--body); font-size: 12px; padding: 5px 8px; border-radius: 8px;
  border: 1px solid var(--line, #d9d9e3); background: var(--surface, #fff); color: inherit;
  cursor: pointer; margin-right: 6px; margin-bottom: 4px;
}
.status-select:focus { outline: none; border-color: var(--brand-2); }
.prio { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 9px; letter-spacing: .02em; }
.prio-P0 { background: #6d1a1a; color: #fff; }
.prio-P1 { background: #FBE7E7; color: #C22A2A; }
.prio-P2 { background: #FCF1DF; color: #B07A00; }
.prio-P3 { background: var(--lav); color: var(--muted); }
.unmask-box {
  margin-top: 6px; background: #FFF3EF; border: 1px solid #F6C9BB; border-radius: 9px;
  padding: 8px; font-size: 12px; white-space: pre-wrap;
}
.unmask-box.denied { background: #FBEAEA; border-color: #EEC3C3; color: #8f2f2f; }
.empty-note { color: var(--muted); padding: 16px 4px; font-size: 14px; }

/* ---------- Konuşma Geçmişi (callerid paneli) ---------- */
.callers-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.caller-row { cursor: pointer; }
.caller-row:hover { background: var(--lav); }
.verified-dot { color: var(--success); font-size: 10px; }
.topics-cell { line-height: 1.9; }
.topic-tag {
  display: inline-block; background: var(--lav); color: var(--brand-1); border-radius: 8px;
  padding: 2px 8px; font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
.caller-detail {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  max-height: 74vh; overflow-y: auto; box-shadow: 0 4px 14px rgba(36,28,51,.06);
  position: sticky; top: 12px;
}
.cd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cd-head h3 { font-family: var(--display); font-size: 16px; }
.cd-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.cd-convo { border-top: 1px solid var(--line); padding: 12px 0; }
.cd-topic { font-weight: 600; font-size: 13.5px; margin-bottom: 8px; }
.cd-meta { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.cd-thread { display: flex; flex-direction: column; gap: 5px; }
.cd-msg { font-size: 12.5px; line-height: 1.45; padding: 6px 10px; border-radius: 10px; max-width: 92%; }
.cd-user { background: #FFF0EC; align-self: flex-end; }
.cd-bot { background: var(--lav); align-self: flex-start; }
.cd-tickets { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 720px) { .callers-layout { grid-template-columns: 1fr; } }

/* ---------- dashboard ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 4px 14px rgba(36,28,51,.05);
}
.tile-val { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--brand-1); line-height: 1; }
.tile-lbl { font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 7px; }
.tile-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.tile-accent { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); border-color: transparent; }
.tile-accent .tile-val, .tile-accent .tile-lbl { color: #fff; }
.tile-accent .tile-sub { color: rgba(255,255,255,.8); }

.admin-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.role-box { display: flex; flex-direction: column; gap: 3px; }
.role-box label { font-size: 12px; color: var(--muted); }
.role-hint { font-size: 11px; color: var(--muted); max-width: 240px; line-height: 1.35; }
.chart-desc { font-size: 11.5px; color: var(--muted); margin: -6px 0 12px; line-height: 1.4; }
.chart-wide { grid-column: 1 / -1; }
.recent-row {
  display: grid; grid-template-columns: 100px 42px 1fr 130px 120px; gap: 10px; align-items: center;
  padding: 9px 2px; border-top: 1px solid var(--line); font-size: 13px;
}
.recent-no { font-weight: 700; color: var(--brand-2); }
.recent-cat { color: var(--ink); }
.recent-date { color: var(--muted); font-size: 12px; text-align: right; }
.role-legend { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.role-legend summary { cursor: pointer; padding: 12px 16px; font-weight: 600; color: var(--ink); }
.legend-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.legend-name { font-weight: 700; color: var(--brand-1); }
.legend-desc { color: var(--muted); line-height: 1.45; }
@media (max-width: 640px) {
  .recent-row { grid-template-columns: 1fr auto; }
  .recent-cat, .recent-date { display: none; }
  .legend-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- admin paneli mobil (≤768px) ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 768px) {
  .admin-wrap { margin: 14px auto; padding: 0 12px; }
  /* Sekme çubuğu: sığmıyorsa yatay kaydırılsın (sayfa gövdesi kaymaz). */
  .admin-tabs { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap;
                -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .admin-tabs .tab { flex: 0 0 auto; padding: 10px 16px; }
  /* Grafikler tek kolon. */
  .chart-grid { grid-template-columns: 1fr; }
  /* Geniş tablolar kendi kabında yatay kayar; sütunlar sıkışıp okunmaz olmaz. */
  .table-wrap .admin-table { min-width: 560px; }
  .callers-toolbar input { flex: 1 1 auto; min-width: 0; }
}
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.chart-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  box-shadow: 0 4px 14px rgba(36,28,51,.05);
}
.chart-card h3 { font-family: var(--display); font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--ink); }
.hbar-row { display: grid; grid-template-columns: 130px 1fr 34px; align-items: center; gap: 10px; margin-bottom: 8px; }
.hbar-lbl { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { background: var(--lav); border-radius: 6px; height: 12px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 6px; transition: width .4s ease; }
.hbar-val { font-size: 12.5px; font-weight: 700; color: var(--ink); text-align: right; }
.cx-axis { stroke: var(--line); stroke-width: 1.5; }
.cx-lbl { fill: var(--muted); font-size: 10px; }

/* ---------- toolbar / pager ---------- */
.callers-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.callers-toolbar input {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13.5px;
  font-family: var(--body); background: var(--surface); color: var(--ink);
}
.callers-toolbar input:focus { border-color: var(--brand-2); outline: none; }
.toolbar-count { font-size: 12.5px; color: var(--muted); margin-left: auto; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.secondary-btn:disabled { opacity: .4; cursor: default; }
.icon-toggle {
  background: var(--lav); border: 1px solid var(--line); border-radius: 10px; width: 36px; height: 36px;
  font-size: 15px; cursor: pointer;
}

/* ---------- toast ---------- */
.toast-wrap { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast {
  background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 13.5px;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: none; }
.toast.ok { background: var(--success); }
.toast.err { background: #C22A2A; }

/* ---------- focus erişilebilirlik ---------- */
:focus-visible { outline: 3px solid rgba(154,60,196,.45); outline-offset: 2px; border-radius: 6px; }

/* ---------- dark mode (admin) ---------- */
:root[data-theme="dark"] {
  --ink: #ECE8F3; --muted: #A79FB8; --bg: #17131F; --surface: #211B2C;
  --lav: #2A2138; --line: #342A46;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}
:root[data-theme="dark"] body {
  background: var(--bg);
}
:root[data-theme="dark"] .admin-table { box-shadow: 0 4px 14px rgba(0,0,0,.25); }
:root[data-theme="dark"] .admin-table details pre { background: #1B1526; }
:root[data-theme="dark"] .prio-P3 { color: var(--muted); }
:root[data-theme="dark"] .cd-user { background: #3a2530; }
:root[data-theme="dark"] .unmask-box { background: #33232b; border-color: #5a3a42; color: #f3d9d0; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Tablet: ortada, biraz daha geniş kullanışlı pencere */
@media (min-width: 601px) and (max-width: 1024px) {
  .phone { width: 460px; height: 88vh; }
  .phone-wrap { padding: 20px 10px; }
}
/* Telefonlar (tüm boyutlar): app-benzeri SABİT çerçeve. Sayfanın kendisi kaymaz;
   yalnızca içerik (.messages / .onboard) scroll eder. Bu, "alta kaydırınca boşluk/
   kayma" sorununu çözer (body 100vh vs phone 100dvh farkından kaynaklanıyordu). */
@media (max-width: 600px) {
  html, body {
    height: 100vh; height: 100dvh; min-height: 0;
    overflow: hidden; overscroll-behavior: none;
  }
  .phone-wrap { padding: 0; height: 100vh; height: 100dvh; }
  .phone {
    width: 100%; max-width: 100%; height: 100vh; height: 100dvh;
    min-height: 0; border-radius: 0; border: 0;
  }
  /* Çentik/kavisli köşe (safe-area): başlık üstten, kompozitör/bar alttan güvenli iç boşluk */
  .chat-header { padding-top: calc(14px + env(safe-area-inset-top)); }
  .composer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .transfer-bar { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .messages { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .onboard { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  /* Dokunma hedefleri ≥44px + biraz daha ferah tipografi */
  .icon-btn { width: 40px; height: 40px; font-size: 17px; }
  .chip { padding: 11px 16px; font-size: 14px; }
  .bubble { max-width: 88%; font-size: 15px; }
  .cat-card { padding: 13px 10px; }
  .cat-tx { font-size: 12.5px; }
  .send-btn { width: 46px; height: 46px; }
  .cc-item { padding: 13px 12px; }      /* ülke listesinde rahat dokunma */
  .cc-list { max-height: 44vh; }        /* ülke listesi mobilde ekranı taşmasın */
  .cc-dropdown { max-height: 60vh; overflow: hidden; display: flex; flex-direction: column; }
}
/* Çok dar telefonlar (≤360px): taşmayı önle, boşlukları kıs */
@media (max-width: 360px) {
  .messages { padding-top: 12px; padding-bottom: 12px; }
  .onboard { padding-top: 16px; gap: 12px; }
  .onboard-wave { font-size: 28px; }
  .onboard-title { font-size: 17.5px; }
  .chip { padding: 10px 13px; }
  .cat-grid { gap: 5px; }
}


/* ── Başlık düğmeleri: ikincil olan sessizleşsin ─────────────────
   İki isimsiz koyu daire yan yana duruyordu; çıkış müşteri için
   ikincil bir eylem, öne çıkmamalı. */
.icon-btn-quiet { background: rgba(255, 255, 255, .08); opacity: .75; }
.icon-btn-quiet:hover { background: rgba(255, 255, 255, .2); opacity: 1; }

/* Gizlilik satırı: tek kilit ikonu, hizalı */
.onboard-lock { display: flex; align-items: flex-start; gap: 7px; line-height: 1.45; }

/* ═══════════════════════════════════════════════════════════════
   CANLI DESTEK GİRİŞ EKRANI — tasarım spec'i §3, §5, §7-§10
   Tipografi: yalnız 400/500 ağırlık, her yerde cümle düzeni.
   ═══════════════════════════════════════════════════════════════ */

/* ── Dış kart (§5) ───────────────────────────────────────────── */
.phone { border-radius: 20px; }

/* ── Header (§5.1) ───────────────────────────────────────────── */
.chat-header {
  background: var(--tc-purple);
  padding: 15px 18px;
  gap: 13px;
}
.chat-header::after { content: none; }
.tc-logo { display: block; flex-shrink: 0; border-radius: 50%; }
.chat-title { gap: 13px; }
.chat-title-tx { min-width: 0; }
.bot-name { font-size: 16px; font-weight: 500; color: #fff; letter-spacing: 0; }
.bot-status { font-size: 13px; color: #E9DEFB; opacity: 1; gap: 7px; font-weight: 400; }
.bot-status::before { width: 8px; height: 8px; background: #3DDC97; box-shadow: none; }

.header-actions { display: flex; align-items: center; gap: 6px; }
.lang-pill {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--tc-lav); color: var(--tc-lav-text);
  border-radius: 999px; padding: 5px 9px; line-height: 1;
  font-size: 12px; font-weight: 500;
}
.lang-pill svg { flex: none; opacity: .8; }

.icon-btn {
  width: 30px; height: 30px; margin-left: 0; position: relative;
  background: var(--tc-purple-light); display: grid; place-items: center;
}
.icon-btn:hover { background: var(--tc-purple-dark); }
.icon-btn-quiet { background: rgba(255, 255, 255, .16); opacity: .85; }
.icon-btn-quiet:hover { background: rgba(255, 255, 255, .28); opacity: 1; }
/* §9: görsel çap 30px, dokunma hedefi 40px */
.icon-btn::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 40px; height: 40px; transform: translate(-50%, -50%);
}
/* Küçült/kapat yalnız uygulama içinde (WebView köprüsü varsa) görünür */
.wc-only { display: none; }
.wc-on .wc-only { display: grid; }

/* ── Gövde (§5.2) ────────────────────────────────────────────── */
.onboard { padding: 22px 20px 20px; gap: 0; }
.ob-head { display: flex; align-items: center; gap: 10px; }
.ob-head-ic {
  width: 36px; height: 36px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--tc-lav); color: var(--tc-purple-dark);
}
.onboard-title {
  font-size: 19px; font-weight: 500; color: var(--tc-title);
  margin: 0; letter-spacing: 0; line-height: 1.3;
}
.ob-sub { margin: 6px 0 0 46px; font-size: 13px; color: var(--hint); line-height: 1.45; }

.onboard-lock {
  display: flex; align-items: flex-start; gap: 9px;
  background: var(--tc-lav); border-radius: 12px; padding: 11px 13px;
  margin-top: 16px; font-size: 13px; line-height: 1.45;
  color: var(--tc-lav-text); border: 0;
}
.onboard-lock svg { flex: none; margin-top: 1px; color: var(--tc-purple-dark); }

.req-note { margin-top: 14px; font-size: 12px; color: var(--muted); }
.req { color: var(--star); }

/* ── Alanlar (§5.2, §8) ──────────────────────────────────────── */
.field { margin-top: 14px; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--label); }
.field .opt { color: var(--muted); font-weight: 400; }

.input-row {
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--field-border); border-radius: 12px;
  transition: border-color .14s, box-shadow .14s;
}
.input-row .in-ic { flex: none; color: #9A96A8; transition: color .14s; }
.input-row input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; background: none; outline: none; padding: 0;
  font-family: var(--body); font-size: 14px; color: var(--label);
}
.input-row input::placeholder { color: var(--placeholder); }
.input-row:focus-within {
  border: 1.5px solid var(--tc-purple);
  box-shadow: 0 0 0 3px var(--tc-lav);
}
.input-row:focus-within .in-ic { color: var(--tc-purple-dark); }

.field.has-error .input-row { border: 1.5px solid var(--danger); }
.field.has-error .input-row:focus-within { box-shadow: 0 0 0 3px var(--danger-ring); }
.field-err { font-size: 13px; color: var(--danger); line-height: 1.4; }
.field-err:empty { display: none; }
.hint { font-size: 12px; color: var(--hint); line-height: 1.45; }

/* ── Telefon ülke seçici (§7) ────────────────────────────────── */
.phone-row { display: flex; gap: 8px; align-items: stretch; }
.cc-btn {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  height: 44px; padding: 0 11px;
  background: var(--field-prefix);
  border: 1px solid var(--field-border); border-radius: 12px;
  font-family: var(--body); font-size: 14px; color: var(--label);
  cursor: pointer; transition: border-color .14s, box-shadow .14s;
}
.cc-btn:hover { border-color: var(--tc-purple); }
.cc-btn:focus-visible {
  border: 1.5px solid var(--tc-purple); box-shadow: 0 0 0 3px var(--tc-lav); outline: none;
}
#ccFlag { font-weight: 500; }
#ccDial { color: var(--muted); }
.cc-btn svg { opacity: .65; }
.phone-input { flex: 1; min-width: 0; }

.cc-dropdown {
  position: absolute; z-index: 30; margin-top: 4px;
  background: var(--surface); border: 1px solid var(--field-border);
  border-radius: 12px; box-shadow: var(--shadow);
  padding: 5px; min-width: 190px; max-height: 240px; overflow-y: auto;
}
.cc-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; cursor: pointer; text-align: left;
  font-family: var(--body); font-size: 14px; color: var(--label);
}
.cc-item:hover, .cc-item:focus-visible { background: var(--tc-lav); outline: none; }
.cc-item[aria-selected="true"] { background: var(--tc-lav); color: var(--tc-lav-text); }
.cc-item .cc-flag { font-weight: 500; min-width: 26px; }
.cc-item .cc-code { margin-left: auto; color: var(--muted); font-weight: 400; }

/* ── Primary CTA (§5.2) — turuncu YALNIZ burada ──────────────── */
.primary-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 48px; margin-top: 18px;
  background: var(--tc-orange); color: #fff;
  border: 0; border-radius: 12px;
  font-family: var(--body); font-size: 15px; font-weight: 500;
  cursor: pointer; box-shadow: none;
  transition: background .14s, transform .08s;
}
.primary-btn:hover { background: var(--tc-orange-hover); box-shadow: none; }
.primary-btn:active { background: var(--tc-orange-hover); transform: scale(.99); }
.primary-btn:disabled { opacity: .72; cursor: default; transform: none; }
.primary-btn .btn-ar { flex: none; }

.btn-spinner {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn-spinner { animation-duration: 2.4s; } }

.ob-eta { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.ob-tickets-btn {
  margin-top: 16px; border: 1px solid var(--field-border); border-style: solid;
  background: var(--surface); color: var(--tc-purple-dark);
  font-weight: 500; border-radius: 12px;
}
.ob-tickets-btn:hover { background: var(--tc-lav); border-color: var(--tc-purple); }
.onboard-err { color: var(--danger); font-size: 13px; margin-top: 12px; }
.onboard-err:empty { display: none; }

/* ── Responsive (§9) ─────────────────────────────────────────── */
@media (max-width: 420px) {
  .input-row input, .cc-btn { font-size: 16px; }   /* iOS zoom engeli */
}
@media (max-width: 360px) {
  .lang-pill { display: none; }
  .onboard { padding: 18px 15px 18px; }
}

/* ── Ülke seçici: tam liste + arama (bayraklı) ───────────────── */
.cc-dropdown { width: 272px; max-width: calc(100vw - 40px); padding: 8px; }
#ccSearch {
  width: 100%; height: 38px; padding: 0 11px; margin-bottom: 6px;
  border: 1px solid var(--field-border); border-radius: 10px;
  font-family: var(--body); font-size: 14px; color: var(--label);
  background: var(--surface); outline: none;
}
#ccSearch:focus { border: 1.5px solid var(--tc-purple); box-shadow: 0 0 0 3px var(--tc-lav); }
#ccSearch::placeholder { color: var(--placeholder); }
.cc-list { max-height: 210px; overflow-y: auto; }
.cc-item .cc-flag { font-size: 17px; min-width: 22px; line-height: 1; }
.cc-item .cc-name {
  flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.cc-none { font-size: 13px; color: var(--muted); padding: 8px 4px; }

/* ---------- medya (görsel/video) ---------- */
.attach-btn {
  background: var(--lav, #eef); border: 1px solid var(--line, #ddd); color: var(--ink, #333);
  width: 44px; height: 44px; border-radius: 50%; font-size: 18px; cursor: pointer; flex-shrink: 0;
}
.attach-btn:hover { background: var(--surface, #fff); }
.attach-btn:disabled { opacity: .5; cursor: default; }
.bubble-media { padding: 4px !important; background: transparent !important; }
.chat-media { display: block; max-width: 220px; max-height: 260px; border-radius: 12px; cursor: pointer; }

/* ---------- admin medya galerisi ---------- */
.media-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.media-toolbar input, .media-toolbar select { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; background: var(--surface); color: var(--ink); }
.media-date { margin-bottom: 22px; }
.media-date-h { font-family: var(--display); font-size: 15px; margin: 0 0 10px; color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.media-caller { margin: 0 0 14px; }
.media-caller-h { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.media-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.media-thumb { position: relative; width: 120px; height: 120px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--lav); display: block; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-badge { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; border-radius: 6px; padding: 1px 5px; font-size: 12px; }

/* ---------- medya lightbox (panel-içi büyütme) ---------- */
.media-lightbox {
  position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.82); padding: 24px; cursor: zoom-out;
}
.media-lightbox.open { display: flex; }
.media-lb-media { max-width: 94vw; max-height: 90vh; border-radius: 10px; cursor: default; box-shadow: 0 12px 48px rgba(0,0,0,.5); }
.media-lb-close {
  position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 20px; cursor: pointer;
}
.media-lb-close:hover { background: rgba(255,255,255,.3); }

/* ---------- 3-yönlü app geçiş şeridi (admin başlığı) ---------- */
.app-switch { display: inline-flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.app-switch-cur, .app-switch-link {
  font-size: 12px; padding: 4px 11px; border-radius: 999px; white-space: nowrap; line-height: 1.5;
}
.app-switch-cur { background: var(--app-accent, #2f6fed); color: #fff; font-weight: 600; }
.app-switch-link { color: inherit; text-decoration: none; border: 1px solid var(--line, rgba(0,0,0,.15)); opacity: .78; transition: opacity .15s, background .15s; }
.app-switch-link:hover { opacity: 1; background: var(--lav, rgba(0,0,0,.05)); }
