/* Quality Life Panel — kurumsal turkuaz tasarım */
:root {
  --primary: #0A7C78;
  --primary-dark: #075E5B;
  --accent: #14B8A6;
  --tint: #E6F4F3;
  --tint-2: #F0F9F8;
  --text: #0F172A;
  --text-2: #475569;
  --text-3: #64748B;
  --line: #E3EAEA;
  --line-2: #EEF3F3;
  --bg: #F4F7F7;
  --card: #FFFFFF;
  --ok: #15803D;   --ok-bg: #E8F6EC;
  --warn: #B45309; --warn-bg: #FEF3E2;
  --err: #B91C1C;  --err-bg: #FDECEC;
  --info: #1D4ED8; --info-bg: #EAF0FD;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 1px rgba(15, 23, 42, .03);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.ic { flex-shrink: 0; display: block; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Yerleşim ---------- */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  width: 248px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--line);
  padding: 22px 14px; display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--text); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; letter-spacing: .5px; }
.brand-name { font-size: 15px; font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--text-2); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 12px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: var(--radius-sm); color: #334155; font-size: 14px; font-weight: 500; }
.nav a:hover { background: var(--tint-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--tint); color: var(--primary-dark); font-weight: 600; }
.nav a span.grow { flex: 1; }
.nav-badge { font-size: 12px; font-weight: 700; color: #fff; background: var(--primary); padding: 2px 8px; border-radius: 999px; }
.nav-badge.err { background: var(--err); }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--text); }
.me:hover { background: var(--tint-2); color: var(--text); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--tint); color: var(--primary-dark); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.me-name { font-size: 14px; font-weight: 600; line-height: 1.2; }
.me-role { font-size: 12px; color: var(--text-2); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app.nav-collapsed .sidebar { display: none; }
.nav-toggle { position: fixed; top: 18px; left: 202px; z-index: 60; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); color: var(--text-2); cursor: pointer; }
.nav-toggle:hover { color: var(--text); background: var(--tint-2); }
.app.nav-collapsed .nav-toggle { left: 14px; }
@media (max-width: 900px) { .nav-toggle { display: none !important; } }
.content.content-wide { max-width: 1900px; }
.topbar { display: none; }
.content { width: 100%; max-width: 1400px; margin: 0 auto; padding: 28px 32px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-2); margin-top: 4px; font-size: 14px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.bottomnav { display: none; }

/* ---------- Kartlar ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head .sub { font-size: 13px; color: var(--text-2); }
.card-body { padding: 20px; }
.card + .card, .stack > * + * { margin-top: 16px; }
.grid > * { margin-top: 0 !important; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat { padding: 18px 20px; }
.stat-label { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.stat-value { font-size: 28px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; }
.stat-note { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s; -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--tint-2); color: var(--text); border-color: #CFE3E1; }
.btn-soft { background: var(--tint); color: var(--primary-dark); }
.btn-soft:hover { background: #D5EDEB; color: var(--primary-dark); }
.btn-danger { background: var(--card); color: var(--err); border-color: #F3C9C9; }
.btn-danger:hover { background: var(--err-bg); color: var(--err); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--text-2); background: transparent; border: 0; cursor: pointer; }
.icon-btn:hover { background: var(--tint-2); color: var(--text); }

/* ---------- Formlar ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--text); }
.hint { font-size: 12.5px; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #D5DFDF; border-radius: var(--radius-sm);
  background: #fff; color: var(--text); font: inherit; font-size: 16px; /* iOS yakınlaştırmasın */
  transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20, 184, 166, .18); }
.input-group { position: relative; }
.input-group .input { padding-right: 48px; }
.input-group .icon-btn { position: absolute; right: 0; top: 0; }

.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 4px 0; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary); flex-shrink: 0; }
.check .t { font-size: 14px; font-weight: 500; }
.check .d { font-size: 12.5px; color: var(--text-2); }

.switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; min-height: 44px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 46px; height: 28px; border-radius: 999px; background: #CBD5D5; position: relative; transition: background .2s; flex-shrink: 0; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

.radio-cards { display: grid; gap: 10px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: #fff; }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--tint-2); box-shadow: 0 0 0 1px var(--primary) inset; }
.radio-card input { margin-top: 3px; accent-color: var(--primary); width: 18px; height: 18px; flex-shrink: 0; }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }
.divider { height: 1px; background: var(--line-2); margin: 4px 0; border: 0; }

/* ---------- Etiketler ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-err { background: var(--err-bg); color: var(--err); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-mute { background: #EEF2F2; color: var(--text-2); }
.pill-brand { background: var(--tint); color: var(--primary-dark); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

/* ---------- Bildirim kutuları ---------- */
.flash-wrap { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid; }
.flash-ok { background: var(--ok-bg); color: #14532D; border-color: #C6E8D0; }
.flash-err { background: var(--err-bg); color: #7F1D1D; border-color: #F5C9C9; }
.flash-info { background: var(--info-bg); color: #1E3A8A; border-color: #C9D7F7; }
.flash .ic { margin-top: 1px; }
.note { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--tint-2); border: 1px solid #D5EDEB; font-size: 13.5px; color: #134E4A; display: flex; gap: 10px; }
.note-warn { background: var(--warn-bg); border-color: #F7DDB5; color: #78350F; }

/* ---------- Sekmeler ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 46px; color: var(--text-2); font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--primary-dark); border-color: var(--primary); font-weight: 600; }

/* ---------- Listeler / tablolar ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line-2); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; font-size: 14.5px; }
.list .meta { font-size: 13px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.list .actions { display: flex; gap: 6px; align-items: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; padding: 10px 20px; border-bottom: 1px solid var(--line); background: #FAFCFC; }
.table td { padding: 12px 20px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.checklist li:first-child { border-top: 0; }
.checklist .box { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #CBD5D5; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.checklist li.done .box { background: var(--primary); border-color: var(--primary); color: #fff; }
.checklist li.done .t { color: var(--text-3); text-decoration: line-through; }
.checklist .t { flex: 1; font-size: 14.5px; }

.empty { text-align: center; padding: 44px 20px; color: var(--text-2); }
.empty .ic-wrap { width: 56px; height: 56px; border-radius: 16px; background: var(--tint); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.empty h2 { color: var(--text); margin-bottom: 6px; }

/* ---------- Giriş / kurulum ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px calc(24px + var(--safe-b)); background: radial-gradient(1200px 600px at 50% -10%, #DDF1EF 0%, var(--bg) 60%); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card.wide { max-width: 720px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 22px; text-align: center; }
.auth-brand .brand-mark { width: 52px; height: 52px; border-radius: 14px; font-size: 17px; }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--text-3); margin-top: 18px; }
.req { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.req li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; }
.req .ok { color: var(--ok); } .req .bad { color: var(--err); } .req .opt { color: var(--warn); }
pre.code { background: #0F172A; color: #E2E8F0; padding: 14px; border-radius: var(--radius-sm); overflow-x: auto; font-size: 12.5px; line-height: 1.5; }

/* ---------- Mobil menü sayfası ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-radius: 20px 20px 0 0; padding: 8px 12px calc(16px + var(--safe-b)); transform: translateY(105%); transition: transform .25s ease; z-index: 61; box-shadow: var(--shadow-lg); max-height: 85vh; overflow-y: auto; }
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: #D5DFDF; margin: 6px auto 12px; }
body.sheet-open .sheet { transform: translateY(0); }
body.sheet-open .sheet-backdrop { opacity: 1; pointer-events: auto; }
.sheet .nav a { height: 50px; font-size: 15.5px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; opacity: 0; transition: all .2s; z-index: 80; max-width: calc(100vw - 32px); box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Gelen kutusu ---------- */
.inbox-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.segmented { display: flex; gap: 4px; background: #EAF0F0; padding: 4px; border-radius: 12px; flex: 1; min-width: 0; max-width: 520px; }
.segmented a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border-radius: 9px; color: var(--text-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; padding: 0 8px; }
.segmented a[aria-current="page"] { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.segmented .n { font-size: 12px; color: var(--text-3); font-weight: 600; }
.store-filter .select { min-height: 44px; width: auto; min-width: 180px; }

.qlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.qcard { display: flex; flex-direction: column; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, .05); transition: border-color .15s, box-shadow .15s, opacity .3s; }
/* Canlı gelen yeni soru: kısa süre vurgulanır */
.qcard.is-new { animation: qnew 2.6s ease-out 1; }
@keyframes qnew { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 15%, 60% { box-shadow: 0 0 0 3px var(--accent); } }
.qcard:hover { color: var(--text); border-color: #CDE7E5; box-shadow: 0 4px 14px rgba(15, 23, 42, .07); }
.qcard.is-done { opacity: .45; }
.qcard-top { display: flex; gap: 12px; align-items: flex-start; }
.qthumb { width: 52px; height: 52px; flex-shrink: 0; border-radius: 12px; background: var(--tint); color: var(--primary); display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line-2); }
.qthumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.qthumb.lg { width: 72px; height: 72px; }
.qhead { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.qproduct { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Soru kartı ürün adı: 2 satıra kadar akar (tek satıra sıkıştırılmaz) */
.qproduct .p-name, .qproduct .p-name > .p-txt { display: inline; white-space: normal; overflow: visible; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips .pill { height: 22px; font-size: 11.5px; padding: 0 8px; }
.qcustomer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #F6F9F9; min-height: 44px; }
.qcustomer .who { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; min-width: 0; }
.qtext { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.qtext.big { font-size: 16px; background: #F8FAFA; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; }
.qdraft { border: 1px solid #CDE7E5; background: #F3FAF9; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.qdraft.is-sent { background: #F6F9F9; border-color: var(--line); }
.qdraft-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.qdraft-head .lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--primary-dark); }
.qdraft-text { font-size: 14px; line-height: 1.55; color: #1E293B; overflow-wrap: anywhere; }
.qdraft-text.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.qdetail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: "top top" "main side"; gap: 16px; align-items: start; padding-bottom: 80px; }
.qtop { grid-area: top; }
.qdetail-main { grid-area: main; }
.qdetail-extra { grid-area: extra; }
.qdetail-extra > * + * { margin-top: 16px; }
.qdetail-side { grid-area: side; position: sticky; top: 20px; }
.qtop .chips { margin-top: 2px; }
.qtop .qtext.big { font-size: 17px; }
.ctx { overflow: hidden; }
.ctx-tabs { display: flex; gap: 4px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); }
.ctx-tabs button { flex: 1; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-3); padding: 10px 6px; border-radius: 10px 10px 0 0; cursor: pointer; min-height: 44px; }
.ctx-tabs button.on { color: var(--primary-dark); background: var(--tint); }
.ctx-count { font-size: 11px; background: var(--line); border-radius: 999px; padding: 1px 6px; margin-left: 2px; }
.ctx-pane { display: none; padding: 14px 16px; }
.ctx-pane.on { display: block; }
.ctx-pane .textarea { margin-top: 4px; }
.ctx-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #EEF4F3; font-size: 13.5px; }
.ctx-row:last-of-type { border-bottom: 0; }
.fold summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 20px; font-weight: 600; font-size: 14.5px; min-height: 48px; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform .15s; }
.fold[open] summary::after { transform: rotate(-135deg); }
.ev-box { display: flex; flex-direction: column; gap: 8px; }
.ev-box[hidden], [hidden] { display: none !important; }
.textarea.answer { min-height: 200px; font-size: 15.5px; }
.action-bar { position: fixed; z-index: 45; right: 0; bottom: 0; left: 248px; display: flex; justify-content: flex-end; gap: 10px; padding: 12px 32px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.action-bar .btn { min-width: 160px; height: 48px; font-size: 15px; }

@media (max-width: 900px) {
  .qlist { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .segmented { max-width: none; flex-basis: 100%; }
  .segmented a { font-size: 12.5px; padding: 0 4px; gap: 4px; }
  .toast { bottom: calc(140px + var(--safe-b)); }
  .store-filter { flex-basis: 100%; }
  .store-filter .select { width: 100%; }
  .qdetail { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main" "side"; padding-bottom: 150px; }
  .qdetail-side { position: static; }
  .fold summary { padding: 14px 16px; }
  .action-bar { left: 0; bottom: calc(62px + var(--safe-b)); padding: 10px 14px; justify-content: stretch; }
  .action-bar .btn { flex: 1; min-width: 0; }
  .action-bar .btn-primary { flex: 1.3; }
}

/* ---------- Müşteriler & siparişler ---------- */
.searchbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.searchbar .select { min-height: 44px; }
.ogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.ocard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 3px rgba(15, 23, 42, .04); }
.ocard.is-defective { border-color: #F3C9C9; }
.ocard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.onum { font-weight: 700; font-size: 14.5px; }
.ocust { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); background: #F6F9F9; padding: 6px 10px; border-radius: 10px; align-self: flex-start; }
.olines { display: flex; flex-direction: column; }
.oline { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.oline:first-child { border-top: 0; }
.ofoot { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--text-2); }
.ofoot > span { display: inline-flex; align-items: center; gap: 5px; }
.oreason { display: flex; align-items: center; gap: 6px; font-size: 13.5px; flex-wrap: wrap; }
.oreason.bad { color: var(--err); }
.linkbtn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 12.5px; color: var(--primary); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.linkbtn.is-loading { opacity: .5; pointer-events: none; }
.plink { color: var(--text); border-bottom: 1px dotted #94A3B8; }
.plink:hover { color: var(--primary); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
.kv { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kv .k { font-weight: 600; font-size: 13px; min-width: 90px; }
.kv .v { flex: 1; min-width: 0; overflow-wrap: anywhere; background: var(--tint-2); padding: 8px 10px; border-radius: 8px; }
.store-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.store-box-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.progress { height: 8px; background: #E3EAEA; border-radius: 8px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .4s; }
.wh-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-top: 6px; flex-wrap: wrap; }
.wh-item.own { border-color: #9FD8D3; background: var(--tint-2); }
.fold-inline summary { cursor: pointer; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 36px; }
.profile-head { display: flex; gap: 14px; align-items: center; }
.mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.mini-stats > div { background: #F6F9F9; border-radius: 12px; padding: 10px; text-align: center; display: flex; flex-direction: column; }
.mini-stats b { font-size: 20px; }
.mini-stats span { font-size: 12px; color: var(--text-2); }
.hist { display: flex; flex-direction: column; gap: 8px; }
.hist-sec { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin-top: 6px; }
a.qcustomer { color: var(--text); }
a.qcustomer:hover { background: var(--tint); color: var(--text); }
@media (max-width: 900px) {
  .ogrid { grid-template-columns: minmax(0, 1fr); }
  .searchbar .btn { flex: 1; }
  .searchbar .select { flex: 1; }
}

/* ---------- Ürün eğitimi ---------- */
.tbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: rgba(244, 247, 247, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); margin: -28px -32px 18px; padding: 14px 32px; border-bottom: 1px solid var(--line); }
.tbar-title { flex: 1; min-width: 200px; }
.tbar-title h1 { font-size: 18px; }
.tbar-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dirty { font-size: 12.5px; font-weight: 600; color: var(--warn); background: var(--warn-bg); padding: 4px 10px; border-radius: 999px; }
.tgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.tgroup { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 18px 0 10px; }
.tgroup:first-child { margin-top: 0; }
.tfield { background: var(--card); border: 1px solid var(--line); border-left: 4px solid #CBD5D5; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.tfield.st-ONAYLI { border-left-color: var(--ok); }
.tfield.st-TASLAK { border-left-color: #F59E0B; }
.tfield.req-missing { box-shadow: inset 0 0 0 1px #F3C9C9; }
.tfield.is-ai { background: #F7FBFB; }
.tfield-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tfield-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.req { color: var(--err); font-weight: 800; }
.seg2 { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg2 button { border: 0; background: #fff; padding: 0 12px; min-height: 34px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.seg2 button[aria-pressed="true"][data-v="TASLAK"] { background: #FEF3C7; color: #92400E; }
.seg2 button[aria-pressed="true"][data-v="ONAYLI"] { background: var(--ok-bg); color: var(--ok); }
.seg2 button:disabled { cursor: default; }
.tfield .textarea { min-height: 80px; font-size: 15px; background: #FCFDFD; }
.tfoot { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }
.treal summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 13px; min-height: 32px; display: flex; align-items: center; }
.treal-q { background: #F8FAFA; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; margin-top: 6px; font-size: 13px; }
.treal-a { color: #166534; margin-top: 4px; }
.tside { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 14px; }
.tside .card + .card { margin-top: 0; }
.meter-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.progress.warn > div { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.tconf { border-top: 1px solid var(--line-2); padding-top: 10px; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.diff-old, .diff-new { font-size: 13px; padding: 10px 12px; border-radius: 10px; max-height: 320px; overflow: auto; }
.diff-old { background: var(--err-bg); }
.diff-new { background: var(--ok-bg); }

/* ---------- Arşiv ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .select, .filters .input[type="date"] { width: auto; }
.star { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: #CBD5D5; font-size: 20px; cursor: pointer; flex-shrink: 0; line-height: 1; }
.star.on { color: #F59E0B; border-color: #FCD34D; background: #FFFBEB; }
.qa-q { background: #F8FAFA; border-left: 3px solid #CBD5D5; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.qa-a { background: var(--ok-bg); color: #14532D; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; }
.test-out { background: var(--tint-2); border: 1px solid #CDE7E5; border-radius: 12px; padding: 10px; }
.test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.test-col { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }

.chart { width: 100%; height: auto; display: block; }
.chart .bar-q { fill: #CDE7E5; }
.chart .bar-a { fill: var(--primary); }
.chart-label { font-size: 18px; fill: var(--text-3); font-family: var(--font); }
ol.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }

/* ---------- Diyalog ---------- */
dialog.sheet-dialog { border: 0; padding: 0; border-radius: 18px; width: min(720px, calc(100vw - 32px)); max-height: 85vh; box-shadow: var(--shadow-lg); background: var(--card); color: var(--text); }
dialog.sheet-dialog::backdrop { background: rgba(15, 23, 42, .4); }
dialog.sheet-dialog .card-body { max-height: 60vh; overflow-y: auto; }

@media (max-width: 1100px) {
  .tgrid { grid-template-columns: minmax(0, 1fr); }
  .tside { position: static; }
}
@media (max-width: 900px) {
  .tbar { margin: -16px -16px 14px; padding: 10px 16px; top: calc(53px + var(--safe-t)); }
  .tbar-title h1 { font-size: 16px; }
  .filters > * { flex: 1 1 140px; }
  .filters .select, .filters .input[type="date"] { width: 100%; }
}

/* ---------- Telefon ---------- */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40;
    padding: calc(10px + var(--safe-t)) 16px 10px; background: rgba(244, 247, 247, .88);
    backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(227, 234, 234, .8);
  }
  .topbar .t { flex: 1; font-size: 17px; font-weight: 700; min-width: 0; }
  .topbar .avatar { width: 32px; height: 32px; font-size: 12px; }
  .content { padding: 16px 16px calc(96px + var(--safe-b)); }
  .page-head { margin-bottom: 16px; }
  .page-head h1 { display: none; }
  .page-head.show-title h1 { display: block; font-size: 22px; }
  .grid-2, .grid-3, .form-row { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-pad, .card-body { padding: 16px; }
  .card-head { padding: 14px 16px; }
  .list > li { padding: 14px 16px; align-items: flex-start; }
  .stat { padding: 14px 16px; }
  .stat-value { font-size: 24px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .table-wrap.stack-sm table, .table-wrap.stack-sm tbody, .table-wrap.stack-sm tr, .table-wrap.stack-sm td { display: block; width: 100%; }
  .table-wrap.stack-sm thead { display: none; }
  .table-wrap.stack-sm tr { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
  .table-wrap.stack-sm td { border: 0; padding: 2px 0; }

  .bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b));
  }
  .bottomnav a, .bottomnav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 50px; justify-content: center;
    color: var(--text-3); font: inherit; font-size: 11px; font-weight: 600; background: none; border: 0; position: relative; -webkit-tap-highlight-color: transparent;
  }
  .bottomnav a[aria-current="page"] { color: var(--primary); }
  .bottomnav .badge { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--err); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
}
@media (min-width: 901px) { .only-mobile { display: none !important; } }
@media (max-width: 900px) { .only-desktop { display: none !important; } }


/* Gruplu menü: başlık tıklanınca / üzerine gelince alt menü açılır */
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-btn { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 12px; margin-top: 8px; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; border-radius: var(--radius-sm); text-align: left; }
.nav-group-btn:hover { background: var(--tint-2); color: var(--text); }
.nav-group-btn .chev { display: inline-block; transition: transform .2s ease; font-size: 14px; }
.nav-group-btn[aria-expanded="true"] .chev { transform: rotate(90deg); }
.nav-sub { display: flex; flex-direction: column; gap: 2px; padding-left: 10px; }
.nav-sub[hidden] { display: none; }
.nav-sub a { height: 38px; font-size: 14px; }
.sheet .nav-group-btn { height: 40px; font-size: 12px; }
.sheet .nav-sub a { height: 46px; font-size: 15px; }
/* Ürün adı: küçük resim + tek satır (taşan kısım "…") */
.p-name { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0; vertical-align: middle; }
.p-name > .plink, .p-name > .p-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-thumb { width: 30px; height: 30px; flex: 0 0 30px; object-fit: contain; background: #fff; border: 1px solid var(--line, #e2e8f0); border-radius: 6px; }
.p-thumb-empty { display: inline-block; background: #F1F5F9; }
/* Ürün adı: imleç el işareti çıkmaz (satır içi bağlantı yine açılır) */
.p-name .plink { cursor: default; }
.p-name, .p-name * { cursor: default !important; }

/* Kısaltılan metin (ürün adı): tek satır, taşan kısım "…", tam ad ipucu kutusunda */
.p-txt { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }

/* Çok satırlı kısaltılan ürün adı (2 satır) */
.p-txt-multi { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
