﻿/* SanoGide — uygulama arayüzü */
:root {
  --ink: #13232B;
  --muted: #5A6B71;
  --line: #DCE4E2;
  --bg: #F3F6F5;
  --surface: #FFFFFF;
  --accent: #0C6B66;
  --accent-ink: #FFFFFF;
  --accent-soft: #E0F0EE;
  --side: #10292C;
  --side-ink: #CFE3E0;
  --ok: #1F7A4D; --ok-bg: #E2F3EA;
  --warn: #8A5A00; --warn-bg: #FBEFD6;
  --bad: #A33A22; --bad-bg: #FBE6E0;
  --info: #2C5A8C; --info-bg: #E3EDF8;
  --radius: 8px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: Consolas, "Cascadia Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--accent); }
h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 10px; }
h3 { font-size: 14px; margin: 0 0 8px; }
code { font-family: var(--mono); font-size: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Kabuk */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
/* Giriş ekranındaki tanıtım panelinin arka planı: koyu teal, köşelerde ışık, altta silik halka (taşma yok, menü kaydırılabilir kalır) */
.side {
  background:
    radial-gradient(circle at -10% 108%, transparent 120px, rgba(255,255,255,.04) 121px, rgba(255,255,255,.04) 166px, transparent 167px),
    radial-gradient(140% 55% at 0% 0%, #13706A 0%, transparent 62%),
    radial-gradient(120% 45% at 100% 100%, #0F4F5C 0%, transparent 60%),
    #0B2B2A;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; margin-bottom: 22px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.brand-mark svg { display: block; }
.side nav { display: grid; gap: 2px; }
.side nav a { color: var(--side-ink); text-decoration: none; padding: 8px 10px; border-radius: 6px; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.side-foot { margin-top: auto; display: grid; gap: 8px; font-size: 12.5px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }
.side-foot .who { display: grid; }
.side-foot .who strong { color: #fff; font-size: 13.5px; }
.side-foot .clinic { opacity: .75; }
.content { padding: 0 28px 40px; min-width: 0; }
.devbar { margin: 0 -28px 18px; padding: 6px 28px; background: var(--warn-bg); color: var(--warn); font-size: 12px; border-bottom: 1px solid #F0DDB0; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .content { padding: 0 16px 30px; }
  .devbar { margin: 0 -16px 14px; padding: 6px 16px; }
}

/* Başlık satırı */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head .sub { color: var(--muted); font-size: 13px; }

/* Bildirim */
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; font-weight: 500; }
.flash.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #BFE3CF; }
.flash.err { background: var(--bad-bg); color: var(--bad); border: 1px solid #F1C3B6; }

/* Kart, ızgara */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stack { display: grid; gap: 14px; align-content: start; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 2px; }
.kpi span { color: var(--muted); font-size: 12.5px; }
.kpi b { font-size: 22px; font-variant-numeric: tabular-nums; }
.kpi.alert { border-color: #F1C3B6; background: #FFF8F6; }
.kpi.alert b { color: var(--bad); }

/* Tablo */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 9px 10px; border-bottom: 1px solid #EEF2F1; vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tr.voided td { color: #9AA6A9; text-decoration: line-through; }
table.t tr.voided td.keep { text-decoration: none; }
.empty { color: var(--muted); padding: 14px 0; }

/* Durum etiketi */
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: #EEF2F1; color: var(--muted); }
.pill.scheduled { background: var(--info-bg); color: var(--info); }
.pill.confirmed { background: var(--accent-soft); color: var(--accent); }
.pill.checked_in, .pill.in_progress { background: var(--warn-bg); color: var(--warn); }
.pill.completed, .pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.no_show, .pill.cancelled, .pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.alert { background: var(--bad); color: #fff; }

/* Form */
form.inline { display: inline; }
.field { display: grid; gap: 4px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid #C9D4D1; border-radius: 6px; padding: 7px 9px; width: 100%; min-width: 0; }
textarea { min-height: 70px; resize: vertical; }
input[type=checkbox] { width: auto; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 12px; }
.form-grid .wide { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Düğme */
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; border-radius: 6px; padding: 7px 14px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost.light { color: var(--side-ink); border-color: rgba(255,255,255,.25); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.ghost.danger { background: transparent; color: var(--bad); }
.btn.small { padding: 3px 9px; font-size: 12.5px; }

/* Sekmeler */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs a { padding: 8px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Hasta başlığı */
.patient-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 14px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13px; }
dl.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }

/* Takvim */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .cal-layout { grid-template-columns: minmax(0, 1fr); } }
.cal-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cal-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.cal { display: grid; min-width: 640px; position: relative; }
.cal-head { position: sticky; top: 0; background: #FAFCFB; border-bottom: 1px solid var(--line); padding: 8px; font-weight: 600; font-size: 13px; z-index: 2; }
.cal-head small { display: block; color: var(--muted); font-weight: 400; }
.cal-times { border-right: 1px solid var(--line); }
.cal-time { height: 22px; font-size: 11px; color: var(--muted); text-align: right; padding-right: 6px; font-variant-numeric: tabular-nums; }
.cal-col { position: relative; border-right: 1px solid #EEF2F1; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 87px, #E6ECEA 87px, #E6ECEA 88px); }
.cal-col:last-child { border-right: 0; }
.appt { position: absolute; left: 4px; right: 4px; border-radius: 6px; padding: 3px 7px; font-size: 12px; line-height: 1.3; overflow: hidden; color: var(--ink); text-decoration: none; border-left: 4px solid var(--c, var(--accent)); background: #F2F8F7; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.appt:hover { z-index: 3; box-shadow: 0 3px 10px rgba(0,0,0,.14); }
.appt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt.cancelled, .appt.no_show { opacity: .5; background: repeating-linear-gradient(45deg, #fff, #fff 5px, #F6F0EE 5px, #F6F0EE 10px); }
.appt.completed { background: #EAF6EF; }
.appt.overbook { outline: 2px dashed var(--warn); }
.appt.selected { outline: 2px solid var(--accent); z-index: 4; }
.now-line { position: absolute; left: 0; right: 0; border-top: 2px solid var(--bad); z-index: 3; pointer-events: none; }

/* Talepler panosu */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.lane { background: #E9EFEE; border-radius: var(--radius); padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 120px; }
.lane h3 { display: flex; justify-content: space-between; font-size: 13px; margin: 0 0 2px; }
.lane.won { background: #E2F3EA; }
.lane.lost { background: #F6E8E4; }
.lead { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; display: grid; gap: 4px; font-size: 12.5px; }
.lead.sla-late { border-color: var(--bad); box-shadow: inset 3px 0 0 var(--bad); }
.lead strong { font-size: 13.5px; }
.lead .muted { color: var(--muted); }

/* Giriş */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, #10292C 0%, #0C6B66 100%); }
.auth { width: min(560px, 100%); background: var(--surface); border-radius: 12px; padding: 26px; display: grid; gap: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.auth .brand { color: var(--ink); margin: 0; }
/* Giriş ekranları (firma): solda tanıtım, sağda form; dar ekranda tek sütun */
.auth-split { width: min(980px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: 18px; overflow: hidden;
              box-shadow: 0 30px 80px rgba(3, 20, 22, .45); background: var(--surface); }
.auth-split.wide { width: min(1080px, 100%); grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.auth-split .auth { width: 100%; box-shadow: none; border-radius: 0; padding: 40px 44px; align-content: center; gap: 18px; }
.auth-hero { position: relative; color: #E4F2EF; padding: 36px 38px; display: flex; flex-direction: column; gap: 28px; overflow: hidden;
             background: radial-gradient(120% 80% at 0% 0%, #13706A 0%, transparent 60%), radial-gradient(90% 70% at 100% 100%, #0F4F5C 0%, transparent 60%), #0B2B2A; }
.auth-hero::after { content: ""; position: absolute; right: -90px; top: 38%; width: 320px; height: 320px; border-radius: 50%;
                    border: 46px solid rgba(255,255,255,.04); pointer-events: none; }
.auth-hero .brand { margin: 0; color: #fff; }
.auth-hero-body { flex: 1; display: grid; align-content: center; gap: 22px; position: relative; z-index: 1; }
.auth-hero h2 { font-size: 27px; line-height: 1.25; margin: 0; color: #fff; letter-spacing: -.015em; font-weight: 700; }
.auth-hero ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; font-size: 14.5px; }
.auth-hero li { display: flex; gap: 12px; align-items: center; }
.hero-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.08);
            border: 1px solid rgba(255,255,255,.12); color: #8FE0D3; }
.auth-hero-foot { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: #A9C9C4; position: relative; z-index: 1; }
.auth-brand-sm { display: none !important; }
.auth-head { display: grid; gap: 6px; }
.auth-head h1 { font-size: 26px; letter-spacing: -.02em; }
.auth-head p { margin: 0; }
.auth-tenant { justify-self: start; font-size: 12px; font-weight: 700; letter-spacing: .03em; color: var(--accent); background: var(--accent-soft);
               border-radius: 999px; padding: 3px 10px; }
.auth-form { gap: 14px; }
.auth-form .field label { font-weight: 600; }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon > svg { position: absolute; left: 12px; color: #8A9A9E; pointer-events: none; }
.input-icon input { width: 100%; padding: 11px 12px 11px 40px; font-size: 15px; border-radius: 9px; }
.input-icon input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(12,107,102,.15); outline: none; }
.pw-toggle { position: absolute; right: 6px; border: 0; background: transparent; color: var(--accent); font: 600 12.5px var(--font); padding: 6px 8px; cursor: pointer; border-radius: 6px; }
.pw-toggle:hover { background: var(--accent-soft); }
.input-icon input[type="password"], .input-icon input[data-caps-warn] { padding-right: 70px; }
.caps-warn { color: var(--warn); font-weight: 600; }
.auth-submit { justify-content: center; padding: 12px 16px; font-size: 15px; border-radius: 9px; box-shadow: 0 8px 20px rgba(12,107,102,.25); }
.auth-submit:hover { filter: brightness(1.08); }
.auth-note { margin: 0; line-height: 1.6; }
.auth-split .dev-login { margin-top: 4px; }
@media (max-width: 820px) {
  .auth-split, .auth-split.wide { grid-template-columns: 1fr; border-radius: 14px; }
  .auth-hero { display: none; }
  .auth-brand-sm { display: flex !important; }
  .auth-split .auth { padding: 26px 22px; }
}

/* İki adımlı doğrulama kurulumu */
.tfa-setup { display: grid; gap: 4px; }
.tfa-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.tfa-steps > li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.tfa-steps p { margin: 2px 0 0; }
.tfa-num { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.tfa-qr { margin-top: 10px; width: 190px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.tfa-qr svg { display: block; width: 100%; height: auto; }
.tfa-manual { margin-top: 10px; }
.tfa-manual > summary { font-size: 13px; }
.tfa-code { max-width: 190px; padding: 9px 10px; border-radius: 9px; }
.tfa-shield { color: var(--accent); }
.auth-head .tfa-shield { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); display: grid; place-items: center; }
.tfa-intro { display: flex; gap: 14px; align-items: flex-start; }

/* Kullanıcı hareketleri: solda kişiler, sağda seçilen kişinin akışı */
.act-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 12px; }
.act-toolbar .seg-tabs { margin: 0; }
.act-dates { display: flex; gap: 6px; align-items: center; }
.act-dates input { padding: 4px 8px; font-size: 13px; }
.act-alerts { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; background: var(--bad-bg); border: 1px solid #F1C3B6;
              border-radius: var(--radius); padding: 8px 12px; margin-bottom: 12px; font-size: 13px; color: var(--bad); }
.act-alert { background: #fff; border: 1px solid #F1C3B6; border-radius: 999px; padding: 2px 10px; color: var(--ink); text-decoration: none; }
.act-alert:hover { border-color: var(--bad); }
.act-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 14px; align-items: start; }
.act-people { padding: 10px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.act-filter { width: 100%; margin-bottom: 8px; }
.act-people ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.act-person { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.act-person:hover { background: #F3F7F6; }
.act-person.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.act-person .who { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.act-person .who b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-person .who small { color: var(--muted); font-size: 12px; }
.act-badges { display: flex; gap: 3px; flex: none; }
.act-badges .pill { font-size: 11px; padding: 1px 6px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; position: relative; flex: none; }
.avatar.all { background: #EEF2F1; color: var(--muted); }
.online-dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #22A06B; border: 2px solid #fff; }
.act-person-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.act-person-head .grow { flex: 1; min-width: 220px; display: grid; gap: 4px; }
.act-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.act-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.act-stats .warn b { color: var(--warn); } .act-stats .bad b { color: var(--bad); }
.act-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.act-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.act-search input { width: 280px; max-width: 100%; }
.act-feed { list-style: none; margin: 0; padding: 0; }
.act-day { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px 0 4px; }
.act-row { display: grid; grid-template-columns: 26px 44px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 6px 4px; border-bottom: 1px solid #EEF2F1; font-size: 13.5px; }
.act-row:hover { background: #FAFCFB; }
.act-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: #EEF2F1; color: var(--muted); align-self: center; }
.act-row.tone-ok .act-ico { background: var(--ok-bg); color: var(--ok); }
.act-row.tone-alert .act-ico { background: var(--warn-bg); color: var(--warn); }
.act-row.tone-bad .act-ico { background: var(--bad-bg); color: var(--bad); }
.act-row.tone-bad { background: #FFFAF8; }
.act-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.act-text { overflow-wrap: anywhere; }
.act-who { font-weight: 600; margin-right: 4px; color: var(--ink); }
.act-ip { color: var(--muted); font-size: 11.5px; text-decoration: none; }
.act-ip:hover { color: var(--accent); }
.act-more { padding-top: 12px; text-align: center; }
.act-empty { padding: 24px 0; text-align: center; }
.act-foot { margin: 14px 0 0; }
@media (max-width: 900px) { .act-layout { grid-template-columns: 1fr; } .act-people { position: static; max-height: 300px; } }

/* Kullanıcı hareketleri (eski tablo yardımcıları) */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filter-bar .field { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
a.chip { text-decoration: none; }
.activity-detail { overflow-wrap: anywhere; max-width: 560px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
a.pill { text-decoration: none; }

.pick { display: grid; gap: 8px; }
.pick a, .pick button { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; width: 100%; }
.pick a:hover, .pick button:hover { border-color: var(--accent); background: #F7FBFA; }
.pick small { color: var(--muted); }
.note { background: var(--warn-bg); color: var(--warn); padding: 10px 12px; border-radius: 8px; font-size: 12.5px; }

.muted { color: var(--muted); }
.right { text-align: right; }
.mt { margin-top: 14px; }
.big { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bal-pos { color: var(--bad); }
.bal-neg { color: var(--ok); }
.lockicon { color: var(--muted); font-size: 12px; }
details > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .btn, .appt { transition: filter .15s, box-shadow .15s; } }

/* ---------- Ortak yardımcılar ---------- */
.mono { font-family: var(--mono); font-size: 12.5px; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.small-note { font-size: 12.5px; }
.danger-text { color: var(--bad); font-weight: 600; }
.grid.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .grid.split { grid-template-columns: minmax(0, 1fr); } }
.btn.on { background: var(--accent-soft); }
textarea[rows] { min-height: 0; }
tfoot td { border-bottom: 0 !important; padding-top: 6px !important; padding-bottom: 6px !important; }

/* Arama çubuğu */
.search-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 6px; }
.field.grow { flex: 1 1 280px; }
.search-bar + .small-note { margin: 0 0 12px; }

/* Form bölümleri */
.form-page { max-width: 980px; }
fieldset.fs { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
fieldset.fs + fieldset.fs { border-top: 1px solid var(--line); padding-top: 14px; }
fieldset.fs legend { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0; margin-bottom: 8px; }

/* Bölümlü seçim (radyo) */
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid #C9D4D1; border-radius: 6px; overflow: hidden; background: #fff; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border-right: 1px solid #E1E8E6; }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--accent); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }

/* KVKK onay listesi */
.consent-list { display: grid; gap: 8px; }
.consent-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }

/* Hasta kartı başlığı */
.patient-head.card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start; }
@media (max-width: 760px) { .patient-head.card { grid-template-columns: auto minmax(0, 1fr); } .ph-side { grid-column: 1 / -1; } }
.ph-main { display: grid; gap: 6px; min-width: 0; }
.ph-main h1 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badges:empty { display: none; }
.ph-side { display: grid; gap: 10px; justify-items: end; }
@media (max-width: 760px) { .ph-side { justify-items: start; } }
.ph-balance { display: grid; text-align: right; }
.ph-balance span { color: var(--muted); font-size: 12px; }
.ph-balance b { font-size: 22px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .ph-balance { text-align: left; } }

/* Zaman tüneli */
.activity-form { display: grid; gap: 10px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.activity-form .call-only { display: none; }
.activity-form.is-call .call-only { display: grid; }
ol.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
ol.timeline li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid #EEF2F1; }
ol.timeline li:last-child { border-bottom: 0; }
.tl-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.tl-title { font-weight: 600; }
.tl-detail { color: var(--ink); font-size: 13px; margin-top: 2px; }
.tl-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
ol.timeline li.voided .tl-title, ol.timeline li.cancelled .tl-title, ol.timeline li.no_show .tl-title { color: #8C989B; }
ol.timeline li.voided .tl-icon, ol.timeline li.no_show .tl-icon { background: var(--bad-bg); color: var(--bad); }
ol.timeline.compact li { padding: 7px 0; }

/* Klinik notlar */
.note-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: grid; gap: 8px; background: #fff; scroll-margin-top: 16px; }
.note-card.locked { background: #FAFCFB; }
.note-card header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.note-body { font-size: 14px; line-height: 1.55; }
.note-card:target { outline: 2px solid var(--accent); }

/* Tedavi planı */
.plan { scroll-margin-top: 16px; }
.plan-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pill.plan-draft { background: #EEF2F1; color: var(--muted); }
.pill.plan-presented { background: var(--info-bg); color: var(--info); }
.pill.plan-accepted, .pill.plan-in_progress { background: var(--accent-soft); color: var(--accent); }
.pill.plan-completed { background: var(--ok-bg); color: var(--ok); }
.pill.plan-rejected, .pill.plan-cancelled, .pill.plan-expired { background: var(--bad-bg); color: var(--bad); }
.item-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 12px; background: #F7FAF9; border: 1px dashed #C9D4D1; border-radius: 8px; }
.item-form .field { flex: 0 1 110px; }
.item-form .field.grow { flex: 1 1 260px; }

/* Hesap */
.row-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
details > form.pop { position: absolute; right: 0; z-index: 5; width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.14); text-align: left; }
td details, .row-actions details { position: relative; display: inline-block; }
.void-note { color: var(--bad); font-size: 12px; text-decoration: none; margin-top: 2px; }
table.t tr.voided td .void-note { text-decoration: none; }

/* KVKK */
.danger-zone { border-color: #F1C3B6; background: #FFFBFA; }
.danger-zone h2 { color: var(--bad); }
.danger-zone ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }

/* Talepler */
.lead-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
@media (max-width: 1200px) { .lead-layout { grid-template-columns: minmax(0, 1fr); } }
.lead-layout.solo { grid-template-columns: minmax(0, 1fr); }   /* talep seçili değilken pano tam genişlik */

/* Açılır pencere (yeni kayıt formları): ✕, Esc veya dışarı tıklama ile kapanır */
dialog.modal { border: 0; border-radius: 12px; padding: 0; width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow: auto;
               color: var(--ink); background: var(--surface); box-shadow: 0 18px 48px rgba(16, 41, 44, .28); }
dialog.modal::backdrop { background: rgba(16, 41, 44, .45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line);
              position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 16px 18px 18px; }
.icon-btn { background: none; border: 0; font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted); padding: 6px 9px; border-radius: 6px; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
a.lead { color: var(--ink); text-decoration: none; }
a.lead:hover { border-color: var(--accent); }
a.lead.selected { outline: 2px solid var(--accent); }
.lead-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; }
h3.mt { margin-top: 18px; }

/* Kasa */
.register.open { border-color: #BFE3CF; }
dl.cash-sum { display: grid; gap: 4px; margin: 10px 0 0; }
dl.cash-sum > div { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed #E6ECEA; }
dl.cash-sum dt { color: var(--muted); }
dl.cash-sum dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
dl.cash-sum .total { border-bottom: 0; padding-top: 8px; }
dl.cash-sum .total dd { font-size: 20px; }
.devbar.testbar { background: #E3EDF8; color: var(--info); border-bottom-color: #C3D6EE; }
.content > :first-child:not(.devbar) { margin-top: 20px; }

/* Giriş / hesap güvenliği */
.code-input { font: 600 22px/1.2 var(--mono); letter-spacing: .3em; text-align: center; }
.secret-key { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #F3F7F6; border: 1px dashed #B9CBC7; border-radius: 8px; padding: 10px 12px; margin: 6px 0; }
.secret-key code { font-size: 14px; word-break: break-all; flex: 1 1 260px; }
ol.steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; }
.invite-box { border-color: var(--accent); background: #F4FAF9; }
.row-menu { position: relative; display: inline-block; text-align: left; }
.row-menu > .pop { position: absolute; right: 0; z-index: 6; width: 290px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.row-menu .pop .btn { width: 100%; justify-content: flex-start; }
.row-menu .pop form.actions .btn { width: auto; }
.dev-login { border-top: 1px solid var(--line); padding-top: 12px; }
.dev-login > summary { font-size: 13px; color: var(--muted); }
tr.warn-row td { background: #FFF8F6; }
.side-link { color: var(--side-ink); text-decoration: none; font-size: 12.5px; }
.side-link:hover, .side-link.active { color: #fff; text-decoration: underline; }

/* ---------- Ayarlar, entegrasyonlar, mesajlar ---------- */
.mb { margin-bottom: 12px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); vertical-align: middle; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; }
.pick a.selected { border-color: var(--accent); background: var(--accent-soft); }
.pick-static { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); }
tr.selected-row td { background: var(--accent-soft); }
.code-block { background: #0F2326; color: #D7ECE8; padding: 12px; border-radius: 8px; font: 12px/1.5 var(--mono); white-space: pre-wrap; overflow-x: auto; }
.integ-kind .pick small { text-align: right; }
section.card.muted h2 { color: var(--muted); }

/* ---------- Hastaya açık sayfalar ---------- */
.public-card { width: min(620px, 100%); }
.public-foot { border-top: 1px solid var(--line); padding-top: 10px; margin: 0; }
.pay-frame { width: 100%; min-height: 640px; border: 1px solid var(--line); border-radius: 8px; }
.invoice h3 { margin-bottom: 4px; }
@media print {
  .auth-shell { background: #fff; padding: 0; display: block; }
  .auth { box-shadow: none; width: 100%; padding: 0; }
  .no-print, .public-foot, .side, .devbar { display: none !important; }
}

/* ---------- SanoGide yönetim paneli (klinik ekranlarından ayrı renk) ---------- */
/* Yönetim paneli CRM ile aynı görünümde; ayırt etmek için logonun yanında altın "YÖNETİM" rozeti */
body.yonetim .brand-sub { opacity: 1; color: #0B2B2A; background: linear-gradient(135deg, #F0D9A6, #D4AF6A); padding: 2px 7px; border-radius: 999px; font-weight: 700; letter-spacing: .08em; }
body.yonetim .auth-shell { background: radial-gradient(120% 80% at 0% 0%, #13706A 0%, transparent 60%), radial-gradient(90% 70% at 100% 100%, #0F4F5C 0%, transparent 60%), #0B2B2A; }
/* Yönetim: paket kartları */
.adm-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.adm-plan { border-radius: 16px; }
.adm-plan.featured { border-color: #D4AF6A; box-shadow: 0 20px 50px -26px rgba(11,43,42,.45); }
.adm-plan.inactive { opacity: .6; }
.adm-plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.adm-plan-head h2 { margin: 0; font-size: 22px; }
.adm-plan-count { display: grid; text-align: right; line-height: 1.1; } .adm-plan-count b { font-size: 24px; } .adm-plan-count span { font-size: 12px; color: var(--muted); }
.adm-feats { display: grid; gap: 2px; }
.brand-sub { font-weight: 500; font-size: 11px; opacity: .75; letter-spacing: .04em; text-transform: uppercase; margin-left: 4px; }

/* ---------- Faz 2: talep sıcaklığı, uyarılar, arama listesi, sürükle-bırak ---------- */
.heat { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.heat.hot { background: #FDE4DC; color: #9A2E14; } .heat.warm { background: #FBEFD6; color: #7A5000; } .heat.cold { background: #E3EDF8; color: #2C5A8C; }
.heat-tabs small { font-weight: 500; opacity: .75; margin-left: 2px; }
.count-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: #fff; color: var(--accent); font-size: 11px; font-weight: 700; margin-left: 4px; }
.lead-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.lead-heat { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lead.heat-hot { border-left: 3px solid #E0603A; } .lead.heat-warm { border-left: 3px solid #E0A100; } .lead.heat-cold { border-left: 3px solid #8EB2D8; }
.lead[draggable="true"] { cursor: grab; }
.lead.dragging { opacity: .45; }
.lane.drop { outline: 2px dashed var(--accent); outline-offset: -4px; background: var(--accent-soft); }
.heat-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 6px; background: #FAFCFB; }
.heat-box.heat-hot { background: #FFF6F2; border-color: #F5CDBF; } .heat-box.heat-cold { background: #F5F9FD; }
.heat-head { display: flex; align-items: center; gap: 8px; }
.heat-reasons { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.alert-line { font-size: 12.5px; font-weight: 600; }
.alert-line.sev-3 { color: var(--bad); } .alert-line.sev-2 { color: var(--warn); } .alert-line.sev-1 { color: var(--info); }
.heat-form { flex-wrap: wrap; gap: 6px; align-items: center; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }

/* Ekran güvenliği: filigran (tıklamayı engellemez) ve "kayda alındı" bildirimi */
.watermark { position: fixed; inset: 0; z-index: 9000; pointer-events: none; opacity: .07; background-repeat: repeat; }
@media print { .watermark { opacity: .12; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.sec-toast { position: fixed; right: 16px; bottom: 16px; z-index: 9100; background: #0b2b2a; color: #fff; padding: 10px 14px;
             border-radius: 8px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.inline-form select { padding: 2px 6px; min-height: 0; width: auto; }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
/* ---------- Ayarlar: simgeli sekmeler (satıra sarar, yatay kaydırma yok) ---------- */
.set-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.set-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 8px; border-radius: 10px; border: 1px solid var(--line);
             background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13px; transition: border-color .12s, background .12s; }
.set-nav a:hover { border-color: var(--accent); }
.set-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #EEF3F2; color: var(--accent); }
.set-nav a.on { color: #fff; border-color: transparent;
                background: radial-gradient(120% 120% at 0% 0%, #13706A 0%, transparent 70%), #0B2B2A; box-shadow: 0 6px 16px rgba(11,43,42,.25); }
.set-nav a.on .set-ico { background: rgba(255,255,255,.12); color: #8FE0D3; }

/* ---------- Paketler (Lite / Enterprise) ---------- */
.nav-locked{opacity:.55}
.nav-locked i{font-style:normal;font-size:.75em;margin-left:4px}
.plan-badge{display:inline-flex;margin-top:8px;font-size:11.5px;font-weight:600;padding:3px 10px;border-radius:999px;background:rgba(255,255,255,.08);color:#CFE3E0;border:1px solid rgba(255,255,255,.15);text-decoration:none}
.plan-badge:hover{border-color:#D4AF6A;color:#F0D9A6}
.plan-badge.ent{background:linear-gradient(135deg,rgba(212,175,106,.25),rgba(212,175,106,.08));color:#F0D9A6;border-color:rgba(212,175,106,.45)}
.plan-locked{position:relative;overflow:hidden}
.plan-locked > *:not(.plan-lock){filter:blur(1.2px);opacity:.38;pointer-events:none;user-select:none}
.plan-lock{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;padding:20px;background:rgba(250,252,251,.55)}
.plan-lock-ico{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;color:#fff;background:radial-gradient(120% 120% at 0% 0%,#13706A 0%,transparent 70%),#0B2B2A}
.seg-tabs a.locked{opacity:.6}
.locked-group{opacity:.7;border-style:dashed}
.plan-wanted{display:flex;gap:14px;align-items:center;padding:14px 16px;border-radius:12px;background:var(--warn-bg);border:1px solid #F1D9A6;margin-bottom:16px}
.plan-now{display:grid;grid-template-columns:1fr minmax(260px,.8fr);gap:20px;align-items:center;padding:22px 24px;border-radius:16px;color:#fff;margin-bottom:18px;
  background:radial-gradient(120% 140% at 0% 0%,#13706A,transparent 60%),#0B2B2A}
.eyebrow-sm{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:#8FE0D3;font-weight:600}
.plan-now-name{font-size:30px;font-weight:700;letter-spacing:-.02em;margin:2px 0}
.plan-now .muted{color:#A9C9C4}
.plan-usage-top{font-size:14px;margin-bottom:8px}.plan-usage-top b{font-size:22px}
.usage-bar{height:8px;border-radius:999px;background:rgba(255,255,255,.15);overflow:hidden}
.usage-bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#0F6B65,#2FB3A5)}
.usage-bar.warn i{background:linear-gradient(90deg,#B8904A,#F0D9A6)}.usage-bar.full i{background:#E0603A}
.plan-compare{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;align-items:start}
.plan-col{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:24px}
.plan-col.featured{border-color:#D4AF6A;box-shadow:0 20px 50px -24px rgba(11,43,42,.45)}
.plan-col.current{outline:2px solid var(--accent);outline-offset:-2px}
.plan-tag{position:absolute;top:-11px;left:20px;font-size:11px;font-weight:700;padding:3px 10px;border-radius:999px;background:var(--accent);color:#fff}
.plan-tag.gold{background:linear-gradient(135deg,#F0D9A6,#D4AF6A);color:#0B2B2A}
.plan-col h2{font-size:24px;margin:4px 0 2px}
.plan-for{color:var(--muted);margin:0 0 14px;font-size:13px}
.plan-price b{font-size:32px;letter-spacing:-.02em}.plan-price span{color:var(--muted);margin-left:4px}
.plan-feats{list-style:none;margin:16px 0 0;padding:0;display:grid;gap:8px;font-size:13.5px}
.plan-feats li{display:flex;gap:9px;align-items:flex-start}
.plan-feats li::before{content:"";flex:none;width:18px;height:18px;margin-top:1px;border-radius:50%}
.plan-feats li.ok::before{background:var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/11px no-repeat}
.plan-feats li.no{color:#9AA6A3}
.plan-feats li.no::before{background:#EEF2F1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239AA6A3' stroke-width='2.6'%3E%3Cpath d='M7 12h10'/%3E%3C/svg%3E") center/11px no-repeat}
.plan-feats li.wanted{font-weight:700;color:var(--ink);background:var(--warn-bg);border-radius:8px;padding:4px 6px;margin:-4px -6px}
.plan-contact{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-between;align-items:center}
@media (max-width:700px){.plan-now{grid-template-columns:1fr}}

/* ---------- Roller ---------- */
.role-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.role-card { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 12px 14px; border-radius: 12px; border: 1px solid var(--line);
             background: var(--surface); color: var(--ink); text-decoration: none; font: inherit; text-align: left; cursor: pointer; overflow: hidden;
             transition: border-color .12s, box-shadow .12s, transform .12s; }
.role-card:hover { border-color: var(--tone); box-shadow: 0 6px 18px rgba(0,0,0,.06); transform: translateY(-1px); }
.role-card.on { border-color: var(--tone); box-shadow: 0 0 0 2px var(--tone-soft), 0 8px 20px rgba(0,0,0,.06); }
.role-card.locked { cursor: default; background: linear-gradient(135deg, #FFFBEF, #fff 60%); }
.role-card.locked:hover { transform: none; box-shadow: none; }
.role-card.add { border-style: dashed; color: var(--accent); background: #FAFCFB; --tone: var(--accent); }
.role-card.add .role-ava { background: var(--accent-soft); color: var(--accent); font-size: 20px; }
.role-ava { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 13px;
            background: var(--tone-soft); color: var(--tone); }
.role-ava.big { width: 52px; height: 52px; border-radius: 14px; font-size: 17px; }
.role-txt { display: grid; min-width: 0; line-height: 1.3; flex: 1; }
.role-txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-txt small { color: var(--muted); font-size: 12px; }
.role-lock { color: #B08A1E; }
.role-meter { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #EEF2F1; }
.role-meter::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p); background: var(--tone); opacity: .7; }
.tone-gold { --tone: #B08A1E; --tone-soft: #FBF1D3; } .tone-teal { --tone: #0C6B66; --tone-soft: #DDF0EE; }
.tone-blue { --tone: #2C5A8C; --tone-soft: #E3EDF8; } .tone-green { --tone: #1F7A4D; --tone-soft: #E2F3EA; }
.tone-purple { --tone: #6B4BA8; --tone-soft: #EEE8F8; } .tone-orange { --tone: #B4561D; --tone-soft: #FCEBDD; }
.tone-rose { --tone: #A8365C; --tone-soft: #F9E4EB; }
.role-head { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.role-head .grow { flex: 1; min-width: 220px; margin: 0; }
.role-users { display: grid; text-align: right; line-height: 1.2; }
.role-users b { font-size: 22px; } .role-users span { font-size: 12px; color: var(--muted); }
.role-editor h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.scope-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.scope-card { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.scope-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.scope-card b { display: block; font-size: 13.5px; } .scope-card small { color: var(--muted); font-size: 12px; }
.scope-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #EEF3F2; color: var(--muted); }
.scope-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.scope-card:has(input:checked) .scope-ico { background: var(--accent); color: #fff; }
.scope-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.perm-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; align-items: start; }
.perm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.perm-card > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; color: var(--ink); font-weight: 400; }
.perm-card > summary::-webkit-details-marker { display: none; }
.perm-card[open] > summary { border-bottom: 1px solid #EEF2F1; }
.perm-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #fff;
            background: radial-gradient(120% 120% at 0% 0%, #13706A 0%, transparent 70%), #0B2B2A; }
.perm-title { display: grid; flex: 1; line-height: 1.3; } .perm-title small { color: var(--muted); font-size: 12px; }
.perm-all { font-size: 12px; text-decoration: none; font-weight: 600; }
.perm-list { list-style: none; margin: 0; padding: 4px 6px 8px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.switch-row:hover { background: #F5F9F8; }
.perm-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sens { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--bad); background: var(--bad-bg); border-radius: 999px; padding: 1px 7px 1px 5px; }
/* Açma / kapama anahtarı (checkbox) */
input.switch { appearance: none; -webkit-appearance: none; flex: none; width: 36px; height: 20px; border-radius: 999px; background: #CBD5D3; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
input.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
input.switch:checked { background: linear-gradient(90deg, #0F6B65, #2FB3A5); }
input.switch:checked::after { transform: translateX(16px); }
input.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 14px;
            background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -6px 20px rgba(0,0,0,.05); }
.role-editor.dirty .save-bar { border-color: #E0A100; background: rgba(255,250,235,.95); }
.role-editor.dirty [data-dirty-note] { color: var(--warn); font-weight: 600; }

/* Panel: dikkat bekleyenler */
.alerts-card { padding-bottom: 10px; min-width: 0; }
.stack:has(> .alerts-card) { min-width: 0; }   /* ızgara sütunu içerikle genişlemesin (yatay kaydırma olmasın) */
.alerts-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.alerts-head h2 { margin: 0 0 2px; }
.count-chip { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.alert-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 -2px 4px; padding: 0 2px; }
.alert-tabs button { border: 0; background: none; font: 600 12.5px var(--font); color: var(--muted); padding: 6px 8px 8px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.alert-tabs button span { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: #EEF2F1; font-size: 11px; margin-left: 3px; }
.alert-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.alert-tabs button.on span { background: var(--accent-soft); color: var(--accent); }
.alert-feed { list-style: none; margin: 0; padding: 0; }
.alert-item { display: flex; align-items: center; gap: 8px; border-radius: 10px; padding: 0 6px 0 0; transition: background .12s; }
.alert-item[hidden] { display: none; }
.alert-item:not([hidden]) ~ .alert-item:not([hidden]) { border-top: 1px solid #EEF2F1; }
.alert-item:hover { background: #F5F9F8; }
.alert-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 6px; color: var(--ink); text-decoration: none; }
.alert-name small { font-weight: 500; color: var(--muted); font-size: 12px; }
.alert-src { color: #9AA8AB; margin-left: 4px; }
.lead-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; color: var(--accent);
               background: var(--accent-soft); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ring, #C9D7D4); }
.lead-avatar.heat-hot { --ring: #F08A5D; background: #FFF1EA; color: #B4461D; }
.lead-avatar.heat-warm { --ring: #F2C14E; background: #FFF8E3; color: #8A5A00; }
.lead-avatar.heat-cold { --ring: #9DBEE0; background: #EEF4FB; color: #2C5A8C; }
.alert-body { display: grid; min-width: 0; line-height: 1.3; }
.alert-name { font-weight: 650; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-what { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.alert-item.sev-3 .alert-what { color: var(--bad); } .alert-item.sev-2 .alert-what { color: var(--warn); }
.alert-dot { width: 7px; height: 7px; border-radius: 50%; background: #8EB2D8; flex: none; }
.alert-item.sev-3 .alert-dot { background: var(--bad); box-shadow: 0 0 0 3px rgba(163,58,34,.15); }
.alert-item.sev-2 .alert-dot { background: #E0A100; box-shadow: 0 0 0 3px rgba(224,161,0,.15); }
.wait-badge { font: 700 12px var(--font); font-variant-numeric: tabular-nums; padding: 3px 8px; border-radius: 999px; min-width: 44px; text-align: center; }
.wait-badge.bad { background: var(--bad-bg); color: var(--bad); }
.wait-badge.warn { background: var(--warn-bg); color: var(--warn); }
.wait-badge.info { background: var(--info-bg); color: var(--info); }
.alert-side { display: flex; align-items: center; gap: 6px; flex: none; }
.mini-avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; background: #EEF2F1; color: var(--muted); }
.alert-item { position: relative; }
/* Hızlı işlemler satırın sağında, üzerine gelince açılır (görünmezken yer kaplamaz) */
.alert-actions { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: flex; gap: 4px; padding: 4px 4px 4px 18px;
                 background: linear-gradient(90deg, rgba(245,249,248,0), #F5F9F8 18px); opacity: 0; pointer-events: none; transition: opacity .12s; }
.alert-actions:empty { display: none; }
.alert-item:hover .alert-actions, .alert-item:focus-within .alert-actions { opacity: 1; pointer-events: auto; }
.alert-actions .icon-btn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--accent); background: #fff; border: 1px solid var(--line); text-decoration: none; }
.alert-actions .icon-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.alerts-all { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.alerts-all:hover { text-decoration: underline; }
.alerts-empty { display: flex; align-items: center; gap: 10px; color: var(--ok); background: var(--ok-bg); border-radius: 10px; padding: 14px; font-weight: 600; }
@media (hover: none) { .alert-actions { position: static; transform: none; background: none; padding: 0; opacity: 1; pointer-events: auto; } }
@media (max-width: 560px) { .alert-src { display: none; } }

.alert-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 2px; }
.alert-list li { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid #EEF2F1; font-size: 13px; }
.alert-list li.sev-3 { box-shadow: inset 3px 0 0 var(--bad); } .alert-list li.sev-2 { box-shadow: inset 3px 0 0 #E0A100; } .alert-list li.sev-1 { box-shadow: inset 3px 0 0 #8EB2D8; }
.alert-list .grow { flex: 1; color: var(--muted); }
.call-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.call-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; border-left: 4px solid var(--line); }
.call-item.heat-hot { border-left-color: #E0603A; } .call-item.heat-warm { border-left-color: #E0A100; } .call-item.heat-cold { border-left-color: #8EB2D8; }
.call-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.call-name { font-weight: 700; font-size: 15px; color: var(--ink); }
.call-reason { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.call-reason.pri-high { background: var(--bad-bg); color: var(--bad); } .call-reason.pri-mid { background: var(--warn-bg); color: var(--warn); } .call-reason.pri-low { background: #EEF2F1; color: var(--muted); }
.call-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.call-form { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding-top: 8px; border-top: 1px dashed var(--line); }
.call-form select, .call-form input[type=datetime-local] { width: auto; }
.call-form input[name=body] { flex: 1; min-width: 160px; }
@media (max-width: 700px) { .call-item { grid-template-columns: 1fr; } .call-actions { justify-content: flex-start; } }
.lang-form { display: grid; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--line); }
/* Kullanıcı düzenleme ve işten ayrılma (Kullanıcılar → İşlemler) */
.user-edit, .user-leave { display: grid; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.user-leave { border-bottom: 0; }
/* Sağlayıcının resmi simgesi (Paraşüt, Uyumsoft): diğer simgelerle aynı köşe yuvarlaklığı */
.ch-logo { border-radius: 27%; object-fit: contain; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.ch-logo[src*="iletimerkezi"], .ch-logo[src*="mutlucell"] { padding: 14%; box-sizing: border-box; }   /* zeminsiz simgeler */
.ch-logo[src*="iletimerkezi"] { background: #12161b; }   /* beyaz simge: firmanın tema rengi zemininde */
/* Kullanıcı işlemleri / davet: ortada açılan pencere, eşit iki sütunlu bölümler */
dialog.wide-modal.user-modal { width: min(680px, calc(100vw - 32px)); text-align: left; }
.user-modal .modal-head h2 { font-size: 18px; }
.user-modal-body { display: grid; gap: 14px; }
.um-section { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; margin: 0; }
.um-section h3 { margin: 0; font-size: 14px; display: flex; gap: 8px; align-items: baseline; }
.um-section h3 small { font-weight: 400; font-size: 12px; }
.um-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; }
.um-grid .field { margin: 0; }
.um-grid input, .um-grid select, .um-inline select { width: 100%; }
.um-wide { grid-column: 1 / -1; }
.um-inline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.um-btn { width: 100%; justify-content: center; }
.um-note { display: flex; align-items: center; justify-content: center; min-height: 32px; border: 1px dashed var(--line); border-radius: 8px; }
.um-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.um-actions .small-note { margin-right: auto; }
.um-danger { border-color: rgba(192, 57, 43, .35); background: rgba(192, 57, 43, .03); }
.um-danger p { margin: 0; }
@media (max-width: 600px) { .um-grid { grid-template-columns: 1fr; } }
/* Çağrılar (santral) */
.kpis.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi.kpi-alert { border-color: rgba(192, 57, 43, .45); }
.kpi.kpi-alert b { color: #B03A2E; }
.flash.warn { background: #FFF6E0; border: 1px solid #F0D58A; color: #6B5310; }
.calls-tools { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.call-dir { width: 34px; text-align: center; font-weight: 700; color: #0C6B66; }
.call-dir.out { color: #2C5A8C; }
.call-dir.missed { color: #B03A2E; }
td.call-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }   /* Çağrılar tablosu; Aranacaklar'daki .call-actions ayrı */
form.inline { display: inline; margin: 0; }
.icon-btn.dialing { color: #fff; background: #0C6B66; animation: call-ring 1.2s ease-in-out infinite; }
@media (max-width: 900px) { .kpis.kpis-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Gelen arama penceresi: ekranın üst ortasında, dikkat çeken kart */
.call-pop { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 1000; width: min(420px, calc(100vw - 32px));
  background: var(--surface); border-radius: 14px; box-shadow: 0 18px 48px rgba(16, 41, 44, .35); border: 1px solid var(--line);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; padding: 16px 18px; align-items: center; animation: call-in .25s ease-out; }
.call-pop .cp-ico { grid-row: span 3; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 24px;
  background: #0C6B66; color: #fff; animation: call-ring 1.2s ease-in-out infinite; }
.call-pop.answered .cp-ico { animation: none; background: #1F7A4D; }
.call-pop .cp-title { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6B7C80; }
.call-pop .cp-name { font-size: 18px; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-pop .cp-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.call-pop .cp-actions .btn { justify-content: center; }
@keyframes call-in { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes call-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(12, 107, 102, .5); } 50% { box-shadow: 0 0 0 10px rgba(12, 107, 102, 0); } }
@media (prefers-reduced-motion: reduce) { .call-pop, .call-pop .cp-ico { animation: none; } }
/* Kullanıcılar: kalabalık ekipte sıkı liste (arama, filtre, sayfalama) */
.kpis.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.users-card { padding-top: 14px; }
.users-tools { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 10px; }
.users-tools input, .users-tools select { width: 100%; }
.users-table td { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
.users-table .user-name { display: grid; line-height: 1.25; min-width: 0; }
.users-table .user-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.users-table .pill { font-size: 11px; }
.users-empty { padding: 18px; text-align: center; }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pager button { min-width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; font-size: 13px; }
.pager button.on { background: var(--brand, #0E5A55); color: #fff; border-color: transparent; }
@media (max-width: 700px) { .users-tools { grid-template-columns: 1fr 1fr; } .users-tools input { grid-column: 1 / -1; } .kpis.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
.user-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-width: 300px; }
.user-edit-grid input, .user-leave select { width: 100%; }.lang-checks { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.lang-checks label { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; white-space: nowrap; }
.lang-checks input { width: auto; }
.period-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.period-bar .seg-tabs { margin: 0 6px 0 0; }
.period-bar input[type=date] { width: auto; }
.seg-tabs.small a { padding: 4px 10px; font-size: 12.5px; }
.report-table tfoot td { border-top: 2px solid var(--line); background: #FAFCFB; }
.report-table td.num { font-variant-numeric: tabular-nums; }
.report-table td.keep, .report-table th { white-space: nowrap; }
.spend-form { flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 10px; }
.spend-form input[type=month] { width: auto; }
.heat-history ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.heat-history li { display: flex; align-items: center; gap: 8px; }
.rules-table td { padding: 4px 6px; }
.rules-table tr.rules-sep td { border-top: 2px solid var(--line); padding-top: 8px; }
.routing-form { display: grid; gap: 8px; max-width: 760px; }
.routing-form .actions { align-items: center; gap: 6px; }
span.label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }

/* ---------- Entegrasyonlar: simgeli kutucuklar ---------- */
.integ-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.integ-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.integ-group h3 { font-size: 13px; margin: 0 0 8px; }
.integ-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.integ-tile { display: grid; justify-items: center; gap: 4px; width: 74px; padding: 8px 4px 6px; border: 1px solid transparent; border-radius: 10px;
  text-decoration: none; color: var(--ink); text-align: center; }
.integ-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.integ-tile.none { opacity: .55; } .integ-tile.none:hover { opacity: 1; }
.integ-tile.off { border-color: var(--line); border-style: dashed; }
.integ-ico { position: relative; line-height: 0; }
.integ-ico .dot { position: absolute; right: -3px; top: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); border: 2px solid #fff; }
.integ-tile.warn .dot { background: #E0A100; }
.integ-name { font-size: 11px; line-height: 1.25; color: var(--muted); max-width: 70px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.integ-tile.on .integ-name, .integ-tile.warn .integ-name { color: var(--ink); font-weight: 600; }
.integ-title { display: flex; align-items: center; gap: 10px; }
.integ-title h2 { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Dashboard ve grafikler (tek seri: --viz-1; metin hiçbir zaman seri renginde değil) ---------- */
:root { --viz-1: #0C6B66; --viz-grid: #E4EAE8; --viz-base: #C3CCCA; --viz-muted: #7A898D; --up: #1F7A4D; --down: #A33A22; }
.dash { margin: 6px 0 18px; }
.dash-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.dash-head h2 { margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 2px; }
.stat span { color: var(--muted); font-size: 12.5px; }
.stat b { font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.delta { font-size: 12px; font-weight: 600; }
.delta.up { color: var(--up); } .delta.down { color: var(--down); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-card h3 { margin-bottom: 6px; }
.viz { max-width: 100%; height: auto; display: block; overflow: visible; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-grid.base { stroke: var(--viz-base); }
/* Cam çubuklar: koyu (taban) → teal → açık uç; üstte beyaz parlama (Charts.Glass) */
:root { --glass-1: #0B2B2A; --glass-2: #0F6B65; --glass-3: #2FB3A5; }
.viz-bar { fill: var(--viz-1); }
.viz-sheen { pointer-events: none; }
.viz-hit { fill: transparent; cursor: default; }
.viz-hit:hover { fill: rgba(12, 107, 102, .06); }
.viz-tick { fill: var(--viz-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-label { fill: var(--muted); font-size: 12.5px; }
.viz-val { fill: var(--ink); font-size: 12px; font-weight: 600; }
.viz-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: #fff; font-size: 12.5px; padding: 6px 9px; border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18); max-width: 280px; }
.table-view { margin-top: 6px; font-size: 12.5px; }
.table-view summary { color: var(--muted); cursor: pointer; }
.leader-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.leader-list li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid #EEF2F1; }
.leader-list .rank { width: 26px; text-align: center; font-size: 16px; }
.leader-list .grow { flex: 1; display: grid; min-width: 0; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }

/* ---------- Performans ---------- */
.seg-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.seg-tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13px; }
.seg-tabs a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.trophy-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.trophy { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.trophy.gold { background: linear-gradient(135deg, #FFF8E1, #FFFFFF); border-color: #F0DDA0; }
.trophy.silver { background: linear-gradient(135deg, #EEF4F8, #FFFFFF); border-color: #D3DFE8; }
.trophy.live { background: linear-gradient(135deg, #E9F5F3, #FFFFFF); border-color: #CBE5E1; }
.trophy-icon { font-size: 34px; line-height: 1; }
.trophy-kicker { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.trophy-name { font-size: 19px; font-weight: 700; }
.trophy-stats { color: var(--muted); font-size: 12.5px; }
.my-perf { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.my-perf .grow { flex: 1; min-width: 200px; }
.my-perf h2 { margin-bottom: 2px; }
.my-rank { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.my-rank b { font-size: 22px; line-height: 1; } .my-rank span { font-size: 11px; }
.my-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.my-stats div { display: grid; } .my-stats span { color: var(--muted); font-size: 12px; } .my-stats b { font-size: 18px; }
a.link-card { color: inherit; text-decoration: none; } a.link-card:hover { border-color: var(--accent); }
.perf-grid { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.perf-table .rank { font-size: 16px; text-align: center; width: 36px; }
.perf-table tr.me-row td { background: var(--accent-soft); }
.nowrap { white-space: nowrap; }
.pts-cell { min-width: 150px; }
.pts-cell b { display: inline-block; width: 38px; font-variant-numeric: tabular-nums; }
.pts-track { display: inline-block; vertical-align: middle; width: calc(100% - 44px); min-width: 90px; height: 8px; }
.pts-bar { display: block; height: 8px; border-radius: 0 4px 4px 0;
           background: linear-gradient(180deg, rgba(255,255,255,.38) 0%, rgba(255,255,255,.08) 45%, rgba(255,255,255,0) 55%),
                       linear-gradient(90deg, var(--glass-1) 0%, var(--glass-2) 55%, var(--glass-3) 100%); }
.badge-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.badge-list li { display: flex; align-items: center; gap: 10px; }
.badge-icon { font-size: 22px; width: 32px; text-align: center; }
.badge-list div { flex: 1; } .badge-val { font-weight: 600; font-size: 13px; }
.score-rules { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 3px; font-size: 13px; }
@media (max-width: 1100px) { .perf-grid { grid-template-columns: 1fr; } }

/* ---------- Sohbetler (WhatsApp, Instagram, Messenger, Telegram, Viber tek ekranda) ---------- */
.side nav a .nav-badge { float: right; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #E5484D; color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 20px; }
.chat-shell { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - 150px); min-height: 520px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 12px; }
.chat-list { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; }
.chat-tabs { display: flex; border-bottom: 1px solid var(--line); }
.chat-tabs a { flex: 1; text-align: center; padding: 10px 4px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; }
.chat-tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.chat-filter { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); }
.chat-filter select, .chat-filter input { width: 100%; padding: 6px 8px; font-size: 13px; }
.conv-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.conv-list .empty { padding: 20px; text-align: center; }
.conv { display: flex; gap: 10px; padding: 10px 12px; text-decoration: none; color: var(--ink); border-bottom: 1px solid #EEF2F1; }
.conv:hover { background: #F7FAF9; }
.conv.on { background: var(--accent-soft); }
.conv-main { display: grid; min-width: 0; flex: 1; gap: 1px; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; }
.conv-top strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-top small { color: var(--muted); flex: none; }
.conv.unread .conv-top strong, .conv.unread .conv-last { font-weight: 700; color: var(--ink); }
.conv-last { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-meta { color: var(--muted); font-size: 11.5px; display: flex; align-items: center; gap: 6px; }
.conv-meta .badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; text-align: center; line-height: 20px; }
.avatar { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #DDE7E5; color: var(--ink); font-weight: 700; font-size: 13px; }
.ch-icon { display: inline-block; vertical-align: middle; flex: none; }
.avatar .ch-badge { position: absolute; right: -4px; bottom: -4px; line-height: 0; background: #fff; border-radius: 50%; padding: 1px; }
.conv-meta .ch-icon, .chat-head-meta .ch-icon { margin-top: -2px; }
.chat-channels { display: flex; gap: 4px; padding: 8px 8px 0; flex-wrap: wrap; }
.icon-chip { display: inline-grid; place-items: center; min-width: 34px; height: 32px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; cursor: pointer; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600; }
.icon-chip:hover { border-color: var(--accent); }
.icon-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sim-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chat-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #EFF3F2; }
.chat-empty { margin: auto; text-align: center; max-width: 360px; padding: 20px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chat-head .grow { flex: 1; min-width: 0; }
.chat-thread { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.day-sep { text-align: center; margin: 8px 0; }
.day-sep span { background: #fff; color: var(--muted); font-size: 11.5px; padding: 2px 10px; border-radius: 999px; }
.bubble { max-width: min(560px, 75%); padding: 7px 10px 4px; border-radius: 10px; box-shadow: 0 1px 1px rgba(0,0,0,.06); font-size: 14px; }
.bubble.in { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.bubble.out { align-self: flex-end; background: #D7F2E6; border-top-right-radius: 2px; }
.bubble.failed { background: var(--bad-bg); }
.bubble-meta { display: flex; justify-content: flex-end; gap: 6px; color: var(--muted); font-size: 11px; margin-top: 2px; }
.tick.read { color: #2C8CD9; font-weight: 700; }
.chat-compose { background: var(--surface); border-top: 1px solid var(--line); padding: 10px 14px; }
.compose-form { display: flex; gap: 8px; align-items: flex-end; }
.compose-form textarea { flex: 1; resize: vertical; min-height: 42px; max-height: 200px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; }
.warn-text { color: var(--warn); font-weight: 600; margin: 0 0 6px; }
.mt-s { margin-top: 6px; }
@media (max-width: 860px) {
  .chat-shell { grid-template-columns: 1fr; height: auto; }
  .chat-shell.has-sel .chat-list { display: none; }
  .chat-shell:not(.has-sel) .chat-pane { display: none; }
  .chat-thread { max-height: 60vh; }
}

/* Yönetim — şirketler / faturalandırma */
.co-table td small { display: block; font-size: 11.5px; }
.co-name { font-weight: 650; color: var(--ink, inherit); text-decoration: none; }
.row-link { cursor: pointer; }
.row-link:hover td { background: rgba(19,112,106,.04); }
.plan-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; background: #E7F3F1; color: #13706A; }
.plan-chip.ent { background: linear-gradient(135deg, #F0D9A6, #D4AF6A); color: #0B2B2A; }
.meter-cell { min-width: 120px; }
.meter { display: block; height: 6px; border-radius: 999px; background: #EDF1F0; margin-top: 5px; overflow: hidden; }
.meter b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #13706A, #2BA597); }
.meter.warn b { background: linear-gradient(90deg, #D4AF6A, #E3A13B); }
.meter.full b { background: linear-gradient(90deg, #E0735A, #C9472B); }
dialog.wide-modal { width: min(760px, calc(100vw - 32px)); }
.bill-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.bill-head h2 { margin-bottom: 2px; }
.bill-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 14px 0; }
.bill-meter { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 3px; background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(244,248,247,.9)); }
.bill-meter > span { color: var(--muted); font-size: 12.5px; }
.bill-meter > b { font-size: 20px; font-variant-numeric: tabular-nums; }
.bill-meter > b small { font-size: 12px; color: var(--muted); font-weight: 500; }
.bill-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.bill-form { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; align-content: start; }
.bill-form h3, .bill-card > h3 { margin: 0; font-size: 14px; }
.bill-form.quote { background: #FBF8F1; border-color: #EBDDBE; }
.bill-form.quote tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
.linkish { background: none; border: 0; padding: 0; color: var(--brand, #13706A); cursor: pointer; font: inherit; text-decoration: underline; }
.tabs-inline { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tabs-inline .chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: inherit; font-size: 13px; }
.tabs-inline .chip.on { background: #0B2B2A; color: #fff; border-color: #0B2B2A; }
.inline-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mini-input { max-width: 130px; padding: 5px 8px; font-size: 12.5px; }
.prov-group { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; }
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.prov-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.prov-card:hover { border-color: var(--accent); box-shadow: 0 8px 20px -14px rgba(11,43,42,.35); }
.prov-card.off { opacity: .55; filter: grayscale(.6); } .prov-card.off:hover { opacity: .9; filter: none; }
.prov-card svg { flex: none; border-radius: 8px; }
.prov-text { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.prov-text b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prov-text small { font-size: 11px; }
.tgl { width: 38px; height: 22px; border-radius: 999px; border: 0; background: #CBD5D3; position: relative; cursor: pointer; padding: 0; transition: background .2s; flex: none; }
.tgl i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .2s; }
.tgl.on { background: linear-gradient(135deg, #13706A, #2BA597); } .tgl.on i { left: 19px; }
.co-table td:first-child { min-width: 200px; } .co-table td { white-space: nowrap; } .co-table td:first-child { white-space: normal; }
td.mono { white-space: nowrap; }
.bill-form.demo { background: #F2F8F7; border-color: #CFE5E1; }
.demo-left { font-size: 13px; } .demo-left b { font-size: 26px; color: #13706A; margin-right: 4px; } .demo-left.warn b { color: var(--bad); }
.demo-left small { display: block; }
.auto-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tabs-inline.big .chip { padding: 8px 16px; font-size: 14px; font-weight: 600; }
.bars12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; height: 200px; align-items: end; margin-top: 10px; }
.b12 { display: grid; grid-template-rows: 1fr auto; height: 100%; text-align: center; }
.b12-cols { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; }
.b12-cols i { width: 40%; min-height: 2px; border-radius: 4px 4px 0 0; display: block; }
.b12 small { font-size: 11px; color: var(--muted); margin-top: 4px; }
i.billed { background: linear-gradient(180deg, #2BA597, #13706A); } i.paid { background: linear-gradient(180deg, #F0D9A6, #D4AF6A); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin: 10px 0; font-size: 13.5px; }
.hbar .meter { grid-column: 1 / -1; margin-top: 2px; }
.switch-line { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.switch-line span { display: grid; gap: 2px; } .switch-line small { font-size: 12px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 13.5px; }
.checklist li::before { content: "✕"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; margin-right: 8px; font-size: 11px; background: #FDECE8; color: #C9472B; }
.checklist li.yes::before { content: "✓"; background: #E7F3F1; color: #13706A; }
.run-log { white-space: pre-wrap; font-size: 12px; background: #F5F8F7; padding: 8px; border-radius: 8px; margin: 6px 0 0; }
.row-menu { position: relative; } .row-menu summary { list-style: none; } .row-menu summary::-webkit-details-marker { display: none; }
.row-menu-body { position: absolute; right: 0; top: 110%; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-width: 230px;
  box-shadow: 0 18px 40px -20px rgba(11,43,42,.45); display: grid; gap: 8px; }
.stack-tight { display: grid; gap: 4px; justify-items: start; }
.section-title { font-size: 15px; margin: 18px 0 10px; }
.own-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.own-card { display: grid; gap: 10px; align-content: start; border-top: 3px solid #13706A; }
.own-card.empty-own { border-top-color: #D4AF6A; }
.own-head { display: flex; gap: 12px; align-items: flex-start; } .own-head h3 { margin: 0 0 2px; font-size: 15px; } .own-head svg { flex: none; border-radius: 9px; }
.own-dot { width: 34px; height: 34px; border-radius: 9px; border: 2px dashed #D4AF6A; flex: none; }
.own-status { display: grid; gap: 3px; font-size: 13.5px; } .own-status small { font-size: 12px; }
.meter.thin { height: 4px; margin-top: 4px; }
.log-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .log-layout { grid-template-columns: 1fr; } }
.log-side { display: grid; gap: 2px; padding: 10px; position: sticky; top: 12px; max-height: calc(100vh - 40px); overflow: auto; }
.log-co { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit; font-size: 13.5px; }
.log-co span { display: grid; } .log-co small { font-size: 11.5px; }
.log-co b { font-size: 12px; background: #EDF1F0; border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.log-co:hover { background: #F3F7F6; } .log-co.on { background: #0B2B2A; color: #fff; } .log-co.on small { color: #B9CFCB; } .log-co.on b { background: #D4AF6A; color: #0B2B2A; }
.log-sep { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 10px 4px; }
.log-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.log-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0 10px; } .log-filter .tabs-inline { margin: 0; } .log-filter input.grow { flex: 1; min-width: 200px; }
.log-day { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 16px 0 6px; }
.log-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.log-list li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: start; padding: 9px 8px; border-radius: 10px; }
.log-list li:hover { background: #F6F9F8; }
.log-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; background: #EDF1F0; }
.g-sirket .log-icon { background: #E7F3F1; color: #13706A; } .g-paket .log-icon { background: #FBF3E2; color: #9A7322; }
.g-fatura .log-icon { background: #EAF0FB; color: #2F5BA8; } .g-destek .log-icon { background: #F1EAFB; color: #6A3FB0; }
.g-guvenlik .log-icon { background: #F3F3F3; color: #555; }
.log-body { font-size: 13.5px; min-width: 0; } .log-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.log-tenant { font-size: 12px; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #EDF1F0; text-decoration: none; color: inherit; }
.log-meta { text-align: right; display: grid; font-size: 13px; } .log-meta small { font-size: 11.5px; }

/* Ekip ve destek sohbeti (şirket) / Destek (yönetim) */
.chat-shell { display: grid; grid-template-columns: 300px 1fr; height: calc(100vh - 110px); min-height: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.chat-shell.admin { height: calc(100vh - 260px); }
@media (max-width: 860px) { .chat-shell { grid-template-columns: 1fr; height: auto; } .chat-side { max-height: 260px; } }
.chat-side { border-right: 1px solid var(--line); overflow: auto; padding: 8px; background: linear-gradient(180deg, #F7FAF9, #F2F6F5); }
.chat-side-sec { display: flex; justify-content: space-between; align-items: center; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 10px 6px; font-weight: 700; }
.chat-new { text-decoration: none; font-size: 16px; color: #13706A; line-height: 1; }
.chat-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: inherit; }
.chat-item:hover { background: rgba(19,112,106,.06); } .chat-item.on { background: #fff; box-shadow: 0 6px 18px -12px rgba(11,43,42,.35); }
.chat-item.unread b { font-weight: 800; }
.chat-av { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: #DCEAE7; color: #13706A; position: relative; }
.chat-av.hash { border-radius: 10px; background: #0B2B2A; color: #D4AF6A; font-size: 16px; }
.chat-av.ms { border-radius: 10px; background: linear-gradient(135deg, #F0D9A6, #D4AF6A); color: #0B2B2A; }
.chat-av.online::after { content: ""; position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; border-radius: 50%; background: #2BB673; border: 2px solid #F4F8F7; }
.chat-meta { flex: 1; min-width: 0; display: grid; } .chat-meta b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-meta small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-prev { font-style: italic; }
.chat-badge { min-width: 20px; height: 20px; border-radius: 999px; background: #E5484D; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.chat-badge[hidden] { display: none; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-head h2 { margin: 0; font-size: 16px; }
.chat-log { flex: 1; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px;
  background: radial-gradient(120% 60% at 100% 0%, rgba(212,175,106,.08), transparent 60%), #FBFCFC; }
.chat-empty { color: var(--muted); text-align: center; margin: auto; font-size: 13.5px; }
.bubble { max-width: min(560px, 78%); align-self: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 8px 12px; box-shadow: 0 4px 12px -10px rgba(11,43,42,.4); }
.bubble.mine { align-self: flex-end; background: linear-gradient(135deg, #13706A, #1C8A7F); color: #fff; border-color: transparent; border-radius: 16px 16px 4px 16px; }
.bubble.staff:not(.mine) { background: #FBF6EA; border-color: #EBDDBE; }
.b-author { font-size: 11.5px; font-weight: 700; opacity: .75; margin-bottom: 2px; }
.b-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.b-time { font-size: 10.5px; opacity: .6; text-align: right; margin-top: 2px; }
.ms-tag { font-size: 10px; padding: 1px 6px; border-radius: 999px; background: #D4AF6A; color: #0B2B2A; margin-left: 4px; }
form.chat-compose { display: flex; gap: 10px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--line); background: #fff; }
form.chat-compose textarea { flex: 1; resize: none; border-radius: 14px; padding: 10px 14px; max-height: 160px; }
.chat-newform { padding: 18px; display: grid; gap: 12px; max-width: 620px; }
.chat-filter { display: grid; gap: 6px; padding: 4px 4px 8px; } .chat-filter .tabs-inline { margin: 0; }
.quick-replies { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.quick-replies .chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.chat-new { font-size: 11.5px; text-transform: none; letter-spacing: 0; font-weight: 700; } .chat-closed summary { padding: 4px 10px; cursor: pointer; }

/* Entegrasyon ayar formu: etiket / kutu / açıklama satırları bütün sütunlarda aynı hizada (simetrik) */
.integ-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; row-gap: 14px; }
@media (min-width: 1280px) { .integ-form { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .integ-form { grid-template-columns: 1fr; } }
.integ-form .field { display: grid; grid-template-rows: subgrid; grid-row: span 3; gap: 6px; align-content: start; margin: 0; }
.integ-form .field[hidden] { display: none; }
.integ-form .field > label:first-child { align-self: end; line-height: 1.3; }
.integ-form .field input:not([type=checkbox]):not([type=radio]), .integ-form .field select { width: 100%; height: 40px; box-sizing: border-box; }
.integ-form .field .hint { align-self: start; min-height: 0; }
.integ-form .integ-bool { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; }
.integ-board { align-items: stretch; } .integ-board .integ-group { height: 100%; box-sizing: border-box; }
.integ-tiles { display: grid; grid-template-columns: repeat(auto-fill, 74px); gap: 8px; }
.notify-toggle { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; } .notify-toggle.off { opacity: .6; }
.av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: #DCEAE7; display: block; }
.av-sm { width: 26px; height: 26px; } .av-lg { width: 44px; height: 44px; } .av-xl { width: 88px; height: 88px; box-shadow: 0 10px 26px -14px rgba(11,43,42,.55); border: 3px solid #fff; }
.profile-head { display: flex; align-items: center; gap: 18px; }
.avatar-edit { position: relative; }
.avatar-pick { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: #0B2B2A; color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 14px; border: 2px solid #fff; }
.who-row { display: flex; align-items: center; gap: 10px; } .who-row .av { width: 36px; height: 36px; border: 2px solid rgba(255,255,255,.25); }
.chat-av img, img.chat-av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.bubble-row { display: flex; gap: 8px; align-items: flex-end; } .bubble-row.mine { flex-direction: row-reverse; align-self: flex-end; }
.bubble-row .av { width: 28px; height: 28px; margin-bottom: 2px; } .bubble-row .bubble { align-self: auto; }
.side-foot .side-link .nav-badge { margin-left: 6px; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #E5484D; color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; display: inline-block; text-align: center; }
.side-foot .side-link .nav-badge[hidden] { display: none; }
a.who-row { text-decoration: none; color: inherit; } .who-row > span { display: grid; }
.chat-search { margin: 4px 4px 8px; width: calc(100% - 8px); box-sizing: border-box; border-radius: 10px; }
.chat-head-who { display: flex; align-items: center; gap: 10px; }
.ticket-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
@media (max-width: 960px) { .ticket-layout { grid-template-columns: 1fr; } }
.ticket-thread { display: flex; flex-direction: column; padding: 0; overflow: hidden; height: calc(100vh - 220px); min-height: 460px; }
.ticket-info .kv { grid-template-columns: 110px 1fr; }
.ticket-table tr.unread td { background: #FFF9EE; } .ticket-prev { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.chat-badge.inline { display: inline-grid; margin-left: 6px; vertical-align: middle; }
.integ-form .wide-all { grid-column: 1 / -1; }
.integ-form .field.wide-all { grid-row: span 3; }
.empty-state { text-align: center; padding: 40px 16px; display: grid; gap: 8px; justify-items: center; } .es-icon { font-size: 34px; }
.ticket-new { max-width: 900px; }
.agent-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.agent { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; position: relative; }
.agent span { display: grid; line-height: 1.15; } .agent b { font-size: 12.5px; } .agent small { font-size: 11px; color: var(--muted); }
.agent.online .av { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2BB673; }
.assign-form { display: flex; align-items: center; gap: 6px; } .assign-form select { height: 32px; font-size: 12.5px; }
.user-cell { display: flex; align-items: center; gap: 10px; } .avatar-edit.small .avatar-pick { width: 20px; height: 20px; font-size: 10px; border-width: 1px; } .avatar-edit.small { cursor: pointer; }
.phone-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; } .phone-inline details summary { list-style: none; cursor: pointer; } .phone-inline details summary::-webkit-details-marker { display: none; }
.support-form { display: grid; gap: 4px; } .support-form .mini-input { max-width: 190px; }
.support-form { min-width: 200px; } .support-form .check span { white-space: nowrap; }
.plan-badge { flex-direction: column; align-items: flex-start; gap: 1px; border-radius: 12px; } .plan-badge small { font-size: 10.5px; font-weight: 500; opacity: .85; } .plan-badge.soon small { color: #FFB4A3; opacity: 1; font-weight: 700; }

/* Simetrik form: 4 eşit sütun; etiket / kutu / açıklama satırları her sütunda aynı hizada */
.sym-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 14px; row-gap: 12px; }
@media (max-width: 720px) { .sym-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sym-form .span-4, .sym-form .span-2 { grid-column: 1 / -1; } }
.sym-form .field { display: grid; grid-template-rows: subgrid; grid-row: span 3; gap: 6px; margin: 0; }
.sym-form .field > label { align-self: end; font-size: 13px; }
.sym-form .field input, .sym-form .field select { width: 100%; height: 40px; box-sizing: border-box; }
.sym-form .field .hint { font-size: 11.5px; min-height: 14px; }
.sym-form .span-2 { grid-column: span 2; } .sym-form .span-4 { grid-column: 1 / -1; }
.sym-sec { grid-column: 1 / -1; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  padding-top: 8px; border-top: 1px solid var(--line); margin-top: 2px; }
.sym-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.sym-modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sym-check { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13.5px; box-sizing: border-box; }
.sym-check:has(input:checked) { border-color: #13706A; background: #F2F8F7; }
.sym-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
dialog.wide-modal { width: min(820px, calc(100vw - 32px)); }

/* Giriş: dönen amblem, kurumsal slogan, belirgin firma adı */
.hero-center { justify-items: center; text-align: center; }
/* Filigran: yalnız ince kontur, yatay, panelin ortasında; yukarıdan aşağı solarak kaybolur */
.hero-watermark { position: absolute; left: 50%; top: 24%; transform: translate(-50%, -50%); z-index: 0; pointer-events: none; user-select: none;
  font-size: 84px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(240,217,166,.16);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, transparent 100%); }
.auth-hero:has(.hero-watermark)::after { display: none; }
/* Marka: simge ile yazı aynı yükseklikte, dikey ortalı */
.hero-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; font-size: 22px; line-height: 1; font-weight: 700; letter-spacing: -.01em; }
.hero-brand > :first-child { width: 40px; height: 40px; flex: none; }
.hero-quote { margin: 0; max-width: 360px; min-height: 140px; display: grid; gap: 16px; justify-items: center; align-content: center; transition: opacity .45s ease, transform .45s ease; }
.hero-quote.fade { opacity: 0; transform: translateY(6px); }
.hero-quote p { margin: 0; font-size: 26px; line-height: 1.3; font-weight: 600; color: #fff; letter-spacing: -.01em; }
.hero-quote footer { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #D4AF6A; }
.hero-quote footer::before { content: "— "; }
.auth-hero-foot { flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.hero-secure { display: inline-flex; gap: 8px; align-items: center; }
.hero-sub { margin: 0; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: #D4AF6A; }
.auth-firm { display: grid; justify-items: center; text-align: center; gap: 6px; margin-bottom: 4px; }
.auth-firm-label { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.auth-firm h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -.02em; color: #0B2B2A; }
.auth-firm-line { width: 48px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #13706A, #D4AF6A); margin-top: 4px; }

/* Talep ayrıntısı ortada açılır pencere */
.lead-overlay-bg { position: fixed; inset: 0; background: rgba(11,43,42,.45); backdrop-filter: blur(3px); z-index: 60; animation: lo-fade .18s ease; }
.lead-overlay { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); overflow: auto; padding: 18px; background: var(--bg, #F4F6F5); border-radius: 18px;
  box-shadow: 0 30px 80px -30px rgba(11,43,42,.6); animation: lo-pop .2s ease; }
.lead-overlay-x { position: sticky; top: 0; float: right; z-index: 2; margin: -6px -6px 0 0; background: #fff; border-radius: 50%; width: 34px; height: 34px;
  display: grid; place-items: center; text-decoration: none; color: inherit; box-shadow: 0 4px 12px -6px rgba(0,0,0,.3); }
@keyframes lo-fade { from { opacity: 0; } }
@keyframes lo-pop { from { opacity: 0; transform: translate(-50%, -47%) scale(.98); } }
body:has(.lead-overlay) { overflow: hidden; }

/* Faz 4 — turizm operasyonu */
.ops-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ops-nav a { padding: 8px 14px; border-radius: 10px; text-decoration: none; color: inherit; font-size: 13.5px; font-weight: 600; }
.ops-nav a:hover { background: #F2F7F6; } .ops-nav a.on { background: #0B2B2A; color: #fff; }
.kind-tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (max-width: 900px) { .kind-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kind-tile { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; color: inherit; }
.kind-tile span { font-size: 22px; } .kind-tile b { font-size: 20px; } .kind-tile small { font-size: 11.5px; color: var(--muted); }
.kind-tile.on { border-color: #13706A; box-shadow: 0 0 0 2px rgba(19,112,106,.18); background: #F2F8F7; }
.ops-split { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.ops-split.has-sel { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); }
@media (max-width: 1000px) { .ops-split.has-sel { grid-template-columns: 1fr; } }
.sym-form.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sym-form.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sym-form.two .span-2, .sym-form.two .span-4, .sym-form.three .span-4 { grid-column: 1 / -1; }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.week-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; } .week-head h2 { margin: 0; font-size: 16px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 900px) { .week-grid { grid-template-columns: 1fr; } }
.week-day { border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 150px; display: grid; align-content: start; gap: 6px; background: #FBFCFC; }
.week-day.today { border-color: #13706A; box-shadow: 0 0 0 2px rgba(19,112,106,.15); background: #fff; }
.wd-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); text-transform: capitalize; } .wd-head span { font-weight: 700; color: var(--ink, #0B2B2A); font-size: 15px; }
.wd-ev { display: grid; gap: 1px; padding: 6px 8px; border-radius: 9px; text-decoration: none; color: inherit; font-size: 12px; border-left: 3px solid #13706A; background: #EEF6F4; }
.wd-ev b { font-size: 12.5px; } .wd-ev small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-time { font-size: 11px; font-weight: 700; }
.ev-arrival { border-left-color: #2F5BA8; background: #EEF3FB; } .ev-operation { border-left-color: #C9472B; background: #FDF0EC; }
.ev-departure { border-left-color: #6A3FB0; background: #F4EFFB; } .ev-checkin, .ev-checkout { border-left-color: #D4AF6A; background: #FBF6EA; }
.wd-empty { color: #C5CFCD; font-size: 12px; text-align: center; padding-top: 18px; }
.journey { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; position: relative; }
@media (max-width: 800px) { .journey { grid-template-columns: 1fr 1fr; } }
.j-step { display: grid; justify-items: center; text-align: center; gap: 3px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 13px; }
.j-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: #EEF3F2; }
.j-step.done { border-color: #13706A; } .j-step.done .j-ico { background: linear-gradient(135deg, #13706A, #2BA597); }
.j-step.empty { opacity: .6; } .j-step small { font-size: 11.5px; }
.status-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.status-steps .chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; }
.status-steps .chip.on { background: #0B2B2A; color: #fff; border-color: #0B2B2A; } .danger-chip { color: var(--bad); }
.notify-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.notify-btn { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; }
.notify-btn span { font-size: 22px; } .notify-btn small { font-size: 11px; color: var(--muted); text-align: center; }
.notify-btn:hover:not(:disabled) { border-color: #13706A; background: #F2F8F7; } .notify-btn:disabled { opacity: .45; cursor: not-allowed; }
.msg-preview { white-space: pre-wrap; font: inherit; font-size: 12.5px; background: #F5F8F7; padding: 10px; border-radius: 10px; margin: 0; }
.offer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .offer-layout { grid-template-columns: 1fr; } }
.offer-sum { display: grid; gap: 8px; position: sticky; top: 12px; }
.os-row { display: flex; justify-content: space-between; font-size: 14px; } .os-row.total { font-size: 18px; padding-top: 6px; border-top: 2px solid #0B2B2A; }
.os-row.pos b { color: #13706A; } .os-row.neg b { color: var(--bad); } .os-sep { border-top: 1px dashed var(--line); }
.kind-dot { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #EEF3F2; margin-right: 4px; }
.k-treatment { background: #FDF0EC; color: #A93B22; } .k-hotel { background: #FBF6EA; color: #8A6A1E; } .k-transfer { background: #EEF3FB; color: #2F5BA8; } .k-translator { background: #F4EFFB; color: #6A3FB0; }
.pub-offer { display: grid; gap: 14px; }
.po-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; } .po-head h1 { margin: 2px 0; font-size: 24px; }
.po-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #9A7322; font-weight: 700; }
.po-total { display: grid; justify-items: end; text-align: right; } .po-total b { font-size: 26px; color: #0B2B2A; }
.po-kind { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.po-grand td { font-size: 17px; font-weight: 700; border-top: 2px solid #0B2B2A; }
.po-notes { background: #F5F8F7; border-radius: 12px; padding: 12px; font-size: 13.5px; white-space: pre-wrap; }
.po-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.public-card:has(.pub-offer) { max-width: 760px; width: 100%; }
@media print { .po-actions, .public-foot { display: none; } }
.profit-hero p { margin: 0; font-size: 17px; line-height: 1.6; } .profit-hero b.pos { color: #13706A; }
.month-label { font-weight: 700; min-width: 130px; text-align: center; text-transform: capitalize; }
.kpis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }

/* Menü grupları (açılır / kapanır) */
.nav-groups { display: grid; gap: 2px; }
.nav-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 9px 12px; margin-top: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(228,242,239,.6); border-radius: 8px; user-select: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "›"; margin-left: auto; font-size: 15px; transition: transform .18s; }
.nav-group[open] summary::after { transform: rotate(90deg); }
.nav-group summary:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-group > a { padding-left: 22px !important; }
.nav-group[open] > a { animation: nav-in .16s ease; }
.nav-group summary .nav-badge.sum { margin-left: 4px; }
.nav-group[open] summary .nav-badge.sum { display: none; }
@keyframes nav-in { from { opacity: 0; transform: translateY(-3px); } }
.nav-group summary .nav-badge { min-width: 18px; padding: 0 5px; border-radius: 999px; background: #E5484D; color: #fff; font-size: 10px; line-height: 18px; text-align: center; letter-spacing: 0; }
.nav-group summary .nav-badge[hidden] { display: none; }
.nav-group > a { display: block; margin: 1px 0; } .nav-group { display: block; }
.ai-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.ai-bar .chip { border: 1px solid #E3D3B0; background: #FBF6EA; color: #6E5418; border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.ai-bar .chip:hover:not(:disabled) { background: #F4E7C8; } .ai-bar .chip:disabled { opacity: .5; cursor: wait; }
.ai-bar.locked .chip { opacity: .55; } .ai-label { font-size: 12px; font-weight: 700; color: #9A7322; }
.ai-result { position: relative; background: #FBF6EA; border: 1px solid #EBDDBE; border-radius: 12px; padding: 10px 36px 10px 12px; margin-bottom: 8px; font-size: 13.5px; }
.ai-result .icon-btn { position: absolute; right: 6px; top: 6px; }
.flow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .flow-grid { grid-template-columns: 1fr; } }
.flow-card { display: grid; gap: 10px; border-top: 3px solid var(--line); } .flow-card.on { border-top-color: #13706A; }
.flow-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; } .flow-head h3 { margin: 0; }
.switch-line.compact { padding: 6px 10px; flex: none; } .flow-card textarea { width: 100%; box-sizing: border-box; }
.sym-form.two .field.span-4 { grid-column: 1 / -1; }

/* Danışan sohbeti cevap alanı: üstte iki eşit araç bloğu (hazır cevap | yapay zekâ), altta tam genişlik yazı kutusu */
footer.chat-compose { display: grid; gap: 10px; padding: 12px 16px; }
.compose-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .compose-tools { grid-template-columns: 1fr; } }
.tool-box { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: grid; gap: 6px; align-content: start; background: #FBFCFC; min-width: 0; }
.tool-box > .tool-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.tool-box .quick, .tool-box .ai-bar { margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.tool-box .chip { white-space: nowrap; flex: none; }
.tool-box.ai { background: #FDFAF2; border-color: #EEE2C6; }
footer.chat-compose .compose-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: stretch; }
footer.chat-compose .compose-form textarea { min-height: 52px; resize: vertical; border-radius: 12px; }
footer.chat-compose .compose-form .btn { min-width: 110px; }
.compose-foot { display: flex; justify-content: flex-end; }

/* Kenar menü altı: simetrik paket rozeti, Ticket | Çıkış eşit */
.side-foot .plan-badge { display: grid; justify-items: center; text-align: center; width: 100%; box-sizing: border-box; padding: 7px 10px; gap: 1px; }
.side-foot .plan-badge span { font-size: 12px; letter-spacing: .04em; }
.side-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .side-links .side-link { text-align: center; }
.side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.side-actions form, .side-actions .btn { width: 100%; } .side-actions form .btn { width: 100%; }
.side-actions .btn { justify-content: center; text-align: center; box-sizing: border-box; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.ticket-btn { background: rgba(212,175,106,.18) !important; color: #F0D9A6 !important; border: 1px solid rgba(212,175,106,.45) !important; }
.ticket-btn .nav-badge { min-width: 16px; padding: 0 5px; border-radius: 999px; background: #E5484D; color: #fff; font-size: 10px; line-height: 16px; }
.ticket-btn .nav-badge[hidden] { display: none; }
.app-install { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; margin-bottom: 14px; } .app-install img { width: 56px; height: 56px; border-radius: 14px; } .app-install h3 { margin: 0 0 2px; } .app-install p { margin: 0; } @media (max-width: 700px) { .app-install { grid-template-columns: 56px 1fr; } .app-install .btn { grid-column: 1 / -1; } }
.wa-numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.wa-num { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; background: #fff; }
.wa-num.on { border-color: #13706A; box-shadow: 0 0 0 2px rgba(19,112,106,.18); background: #F2F8F7; } .wa-num.off { opacity: .6; }
.wa-num small { font-size: 11.5px; color: var(--muted); } .wa-num.add { border-style: dashed; justify-items: center; text-align: center; align-content: center; color: #13706A; }
.wa-tags { display: flex; flex-wrap: wrap; gap: 4px; } .wa-tags .pill { font-size: 10.5px; padding: 1px 7px; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.agent-pick { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13px; }
.agent-pick:has(input:checked) { border-color: #13706A; background: #F2F8F7; }
.via-chip { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: #E7F3EE; color: #1F7A4D; font-size: 11px; font-weight: 600; } .chat-filter select { margin-top: 6px; width: 100%; }

/* Ekip sohbeti grupları */
.chat-side-top { display: flex; align-items: center; gap: 6px; margin: 4px 4px 8px; }
.chat-side-top .chat-search { margin: 0; flex: 1; width: auto; }
.chat-side-top .btn { white-space: nowrap; }
.member-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 320px; overflow-y: auto; padding: 2px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.member-row:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.member-row span { display: flex; flex-direction: column; min-width: 0; }
.member-row b, .member-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .member-pick { grid-template-columns: 1fr; } }

.kpis.kpis-2 { grid-template-columns: 1fr 1fr; }
.kpis.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .kpis.kpis-4 { grid-template-columns: 1fr 1fr; } }

/* Yönetim → E-postalar: şablon listesi + önizleme */
.mail-preview { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.mail-list { display: grid; gap: 6px; }
.mail-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; }
.mail-item small { color: var(--muted); font-size: 12px; }
.mail-item.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.mail-head { display: grid; gap: 4px; margin-bottom: 12px; font-size: 14px; }
.mail-frame { width: 100%; height: 980px; border: 1px solid var(--line); border-radius: 10px; background: #EEF2F1; }
@media (max-width: 900px) { .mail-preview { grid-template-columns: 1fr; } }

/* Ekip sohbeti: resim, geri alınan mesaj, mesaj işlemleri */
.b-img { display: block; margin: 4px 0; border-radius: 10px; overflow: hidden; max-width: 320px; }
.b-img img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: cover; }
.b-deleted { font-style: italic; opacity: .75; }
.b-time { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.b-more { border: 0; background: transparent; color: inherit; opacity: .55; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.b-more:hover, .b-more:focus-visible { opacity: 1; }
.attach-btn { font-size: 18px; padding: 8px 12px; cursor: pointer; }
.attach-btn.busy { opacity: .5; pointer-events: none; }
.msg-modal { max-width: 440px; }
.msg-actions { display: grid; gap: 10px; }
.msg-actions .btn { width: 100%; justify-content: center; }

/* Bakım modu kartı (Yönetim → Genel bakış) ve sürüm etiketi */
.maint-card { margin-bottom: 16px; }
.maint-card.on { border-color: var(--bad); background: var(--bad-bg); }
.maint-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.maint-head h2 { margin: 0 0 4px; }
.maint-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.maint-form .grow { flex: 1; min-width: 260px; }
.app-version { display: block; margin-top: 8px; font-size: 11px; opacity: .6; color: inherit; text-decoration: none; }
.changelog { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }

/* Yönetim → firma durumu: 4 eşit bölme, seçili durum kendi renginde */
.status-box { margin-top: 18px; border: 1px solid var(--line, #E1E8E6); border-radius: 12px; padding: 14px 16px; background: #fff; }
.status-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.status-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.st-btn { font: inherit; font-size: 14px; font-weight: 600; padding: 9px 10px; border-radius: 8px; cursor: pointer; background: #fff; border: 1px solid #C9D4D1; color: #3D5452; transition: background .15s, border-color .15s; }
.st-btn:hover:not(:disabled) { border-color: #0C6B66; color: #0C6B66; }
.st-btn.st-suspended:hover:not(:disabled), .st-btn.st-cancelled:hover:not(:disabled) { border-color: #B3412E; color: #B3412E; }
.st-btn:disabled { cursor: default; }
.st-btn.on.st-active { background: #0C6B66; border-color: #0C6B66; color: #fff; }
.st-btn.on.st-trial { background: #E7F4F1; border-color: #5FD3B8; color: #0C6B66; }
.st-btn.on.st-suspended { background: #FDF0E6; border-color: #E0A15C; color: #9A5A12; }
.st-btn.on.st-cancelled { background: #FBECEA; border-color: #D98477; color: #B3412E; }
.section-gap, .bill-card > h3.section-gap { margin-top: 28px; }
@media (max-width: 560px) { .status-seg { grid-template-columns: repeat(2, 1fr); } }

/* Danışan belgeleri (Belgeler sekmesi): 3 sütunlu kart ızgarası */
.doc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.doc-head h2 { margin: 0; }
.doc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .doc-grid { grid-template-columns: minmax(0, 1fr); } }
.doc-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: grid; grid-template-rows: 160px auto; background: #fff; }
.doc-thumb { display: grid; place-items: center; background: #F3F6F5; overflow: hidden; }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-pdf { font-weight: 800; font-size: 22px; color: #B3412E; border: 2px solid #E8B8AF; border-radius: 8px; padding: 10px 14px; background: #fff; }
.doc-body { padding: 10px 12px; display: grid; gap: 6px; }
.doc-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* Hasta portalı (/portal/{kod}) */
.portal-contact { display: flex; gap: 8px; flex-wrap: wrap; }
.portal-sec { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 10px; }
.portal-sec h2 { margin: 0; font-size: 17px; }
.portal-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.portal-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: start; background: #F5F8F7; border-radius: 10px; padding: 8px 10px; }
.portal-steps li > span { font-size: 18px; line-height: 1.3; }
.portal-steps small { display: block; color: var(--muted); }
.portal-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }   /* 2 kartta iki eşit, 3 kartta üç eşit sütun */
@media (max-width: 600px) { .portal-cards { grid-template-columns: minmax(0, 1fr); } }
.portal-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; }
.portal-card small { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.portal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.portal-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.portal-due { margin-left: 8px; color: #B3412E; }
