/* =====================================================================
   NoemaVibe Admin - tasarim sistemi
   Bootstrap 5.3 uzerine: renk/golge/radius tokenlari, acik + koyu tema.
   Tema: <html data-bs-theme="light|dark"> (theme.js yonetir)
   ===================================================================== */
:root {
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --accent: #6e57e0;
  --accent-600: #5b45cc;
  --accent-soft: #efecfd;
  --accent-ink: #4b38b0;
  --teal: #2bb5a0;

  --bg: #f5f6fa;
  --panel: #ffffff;
  --panel-2: #f8f9fc;
  --line: #e4e7ef;
  --ink: #161a2c;
  --muted: #667085;
  --ok: #12a561; --ok-soft: #e3f6ec;
  --warn: #c77700; --warn-soft: #fff3dc;
  --bad: #d92d20; --bad-soft: #fdeceb;

  --sidebar-w: 256px;
  --topbar-h: 60px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 4px 16px rgba(16, 24, 40, .08);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, .14);

  --sb-bg: #12142a;
  --sb-ink: #c9cce3;
  --sb-ink-strong: #ffffff;
  --sb-hover: rgba(255, 255, 255, .06);
  --sb-active: rgba(110, 87, 224, .28);
  --sb-line: rgba(255, 255, 255, .08);

  --bs-body-font-family: var(--font);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line);
  --bs-border-radius: var(--radius-sm);
  --bs-link-color: var(--accent-600);
  --bs-link-hover-color: var(--accent-ink);
  --bs-secondary-color: var(--muted);
  --bs-primary: var(--accent);
  --bs-primary-rgb: 110, 87, 224;
}

[data-bs-theme="dark"] {
  --accent: #8b7af0;
  --accent-600: #a093f5;
  --accent-soft: rgba(139, 122, 240, .16);
  --accent-ink: #c4bcfa;
  --teal: #4fd1bd;

  --bg: #0e1020;
  --panel: #171a2e;
  --panel-2: #1c2036;
  --line: #2a2f4a;
  --ink: #e8eaf6;
  --muted: #9aa0bf;
  --ok: #3ad08a; --ok-soft: rgba(58, 208, 138, .14);
  --warn: #f5b041; --warn-soft: rgba(245, 176, 65, .14);
  --bad: #ff7a70; --bad-soft: rgba(255, 122, 112, .14);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 4px 16px rgba(0, 0, 0, .35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .5);
  --sb-bg: #0a0b18;
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line);
  --bs-secondary-bg: var(--panel-2);
  --bs-tertiary-bg: var(--panel-2);
  color-scheme: dark;
}

* { -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: .94rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { letter-spacing: -.01em; font-weight: 650; }
a { text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
.muted { color: var(--muted) !important; }
.text-muted { color: var(--muted) !important; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- Iskelet: kenar cubugu + ust cubuk ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); height: 100vh; height: 100dvh; z-index: 1040;
  background: var(--sb-bg); color: var(--sb-ink);
  display: flex; flex-direction: column; padding: 1rem .85rem;
  transition: transform .22s ease;
}
.brand { display: flex; align-items: center; gap: .7rem; padding: .35rem .55rem 1.1rem; min-height: 56px; }
.brand-mark { display: none; width: 34px; height: 34px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.brand-word { height: 28px; width: auto; align-self: flex-start; filter: brightness(1.3) saturate(1.1); }
.brand-sub { font-size: .72rem; color: var(--sb-ink); opacity: .65; letter-spacing: .02em; }
.nav-scroll { flex: 1 1 auto; min-height: 0; flex-wrap: nowrap !important; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; margin: 0 -.35rem; padding: 0 .35rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.nav-scroll > * { flex-shrink: 0; }
.nav-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: var(--sb-ink); opacity: .55; padding: 1rem .65rem .35rem; font-weight: 600; }
.sidebar .nav-link {
  color: var(--sb-ink); padding: .5rem .7rem; border-radius: 9px; margin-bottom: 2px;
  display: flex; align-items: center; gap: .65rem; font-weight: 500; font-size: .92rem; transition: background .12s, color .12s;
}
.sidebar .nav-link:hover { background: var(--sb-hover); color: var(--sb-ink-strong); }
.sidebar .nav-link.active-route { background: var(--sb-active); color: var(--sb-ink-strong); box-shadow: inset 3px 0 0 var(--accent); }
.sidebar .nav-link.active-route svg.i { color: #b9aefc; }
.sidebar-foot { flex-shrink: 0; border-top: 1px solid var(--sb-line); padding-top: .8rem; margin-top: .6rem; }
.user-chip { display: flex; align-items: center; gap: .65rem; padding: .35rem .5rem; border-radius: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--teal)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-chip .u-name { color: var(--sb-ink-strong); font-weight: 600; font-size: .86rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .u-role { font-size: .72rem; opacity: .65; }
.sidebar .logout-btn { width: 100%; background: transparent; border: 0; color: var(--sb-ink); display: flex; align-items: center; gap: .65rem; padding: .5rem .7rem; border-radius: 9px; font-weight: 500; font-size: .9rem; }
.sidebar .logout-btn:hover { background: rgba(240, 68, 56, .16); color: #ffb4ad; }

.content-area { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 1020; height: var(--topbar-h); display: flex; align-items: center; gap: .75rem;
  padding: 0 1.5rem; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .crumb { color: var(--muted); font-size: .85rem; }
.topbar .crumb b { color: var(--ink); font-weight: 600; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; transition: background .12s, border-color .12s; }
.icon-btn:hover { background: var(--panel-2); border-color: var(--accent); }
.page { padding: 1.5rem; max-width: 1480px; width: 100%; margin: 0 auto; }
.scrim { display: none; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(8, 10, 24, .55); z-index: 1030; }
  .content-area { margin-left: 0; }
  .topbar { padding: 0 1rem; }
  .page { padding: 1rem; }
}

/* ---------- Sayfa basligi ---------- */
.page > h2:first-child, .page > .page-head h2 { font-size: 1.55rem; margin-bottom: 1.25rem !important; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h2 { margin: 0 !important; }
.page-head p { margin: .2rem 0 0; color: var(--muted); }

/* ---------- Kart, tablo, form, buton ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--ink); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); font-weight: 600; padding: .85rem 1.1rem; }
.card-body { padding: 1.1rem; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-border-color: var(--line); --bs-table-hover-bg: var(--panel-2); --bs-table-striped-bg: var(--panel-2); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .7rem .9rem; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.form-control, .form-select { background-color: var(--panel); border-color: var(--line); color: var(--ink); border-radius: var(--radius-sm); padding: .5rem .75rem; }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background-color: var(--panel); color: var(--ink); }
.form-control::placeholder { color: var(--muted); opacity: .7; }
.form-label { font-weight: 600; font-size: .82rem; color: var(--ink); margin-bottom: .3rem; }
.form-text { color: var(--muted); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.btn { border-radius: var(--radius-sm); font-weight: 600; transition: transform .06s, box-shadow .12s, background .12s; }
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-dark { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent-600); --bs-btn-hover-border-color: var(--accent-600); --bs-btn-active-bg: var(--accent-600); --bs-btn-active-border-color: var(--accent-600); --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-disabled-bg: var(--accent); --bs-btn-disabled-border-color: var(--accent); }
.btn-outline-secondary { --bs-btn-color: var(--ink); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--panel-2); --bs-btn-hover-border-color: var(--accent); --bs-btn-hover-color: var(--ink); --bs-btn-active-bg: var(--accent-soft); --bs-btn-active-border-color: var(--accent); --bs-btn-active-color: var(--ink); }
.btn-outline-danger { --bs-btn-color: var(--bad); --bs-btn-border-color: color-mix(in srgb, var(--bad) 45%, transparent); --bs-btn-hover-bg: var(--bad); --bs-btn-hover-border-color: var(--bad); --bs-btn-hover-color: #fff; }
.btn-danger { --bs-btn-bg: var(--bad); --bs-btn-border-color: var(--bad); }
.btn.is-loading { pointer-events: none; opacity: .8; }
.btn .spin { width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: sp .7s linear infinite; vertical-align: -.15em; margin-right: .4rem; }
@keyframes sp { to { transform: rotate(360deg); } }
.modal-content { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }
.modal-header, .modal-footer { border-color: var(--line); }
.nav-tabs { border-bottom-color: var(--line); }
.nav-tabs .nav-link { color: var(--muted); border: 0; border-bottom: 2px solid transparent; font-weight: 600; }
.nav-tabs .nav-link.active { color: var(--accent-600); background: transparent; border-bottom-color: var(--accent); }
.alert { border-radius: var(--radius-sm); }
.dropdown-menu { background: var(--panel); border-color: var(--line); box-shadow: var(--shadow); }
.dropdown-item { color: var(--ink); }
.dropdown-item:hover { background: var(--panel-2); }
pre, code { font-family: var(--mono); }

/* ---------- Tablo arama / bos durum ---------- */
.toolbar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.search-box { position: relative; flex: 1 1 240px; max-width: 360px; }
.search-box svg.i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search-box input { padding-left: 2.2rem; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state svg.i { width: 36px; height: 36px; opacity: .5; margin-bottom: .5rem; }
[data-filter-empty] { display: none; }
[data-filter-empty].show { display: block; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; right: 1rem; bottom: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .6rem; max-width: min(380px, calc(100vw - 2rem)); }
.toast-nv { display: flex; gap: .65rem; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; box-shadow: var(--shadow-lg); padding: .8rem .9rem; animation: tin .22s ease; color: var(--ink); }
.toast-nv.ok { border-left-color: var(--ok); } .toast-nv.err { border-left-color: var(--bad); }
.toast-nv.ok svg.i { color: var(--ok); } .toast-nv.err svg.i { color: var(--bad); }
.toast-nv .msg { flex: 1; font-size: .9rem; }
.toast-nv button { background: none; border: 0; color: var(--muted); padding: 0; line-height: 1; }
.toast-nv.out { opacity: 0; transform: translateY(6px); transition: all .2s; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.api-banner { display: flex; gap: .65rem; align-items: center; background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); border-radius: var(--radius-sm); padding: .75rem 1rem; margin-bottom: 1rem; font-weight: 500; }

/* ---------- Dashboard ---------- */
.hero { background: linear-gradient(120deg, #2a2160, #6e57e0 62%, #2bb5a0); color: #fff; border-radius: 16px; padding: 1.6rem 1.75rem; margin-bottom: 1.25rem; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -60px; top: -90px; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 65%); }
.hero h2 { color: #fff; margin: 0 0 .25rem; font-size: 1.5rem; }
.hero p { margin: 0; color: rgba(255, 255, 255, .82); max-width: 560px; }
.kpi { padding: 1.1rem 1.2rem; display: flex; gap: .9rem; align-items: center; height: 100%; }
.kpi .k-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-600); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kpi .k-ico svg.i { width: 22px; height: 22px; }
.kpi .label { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kpi .value { font-size: 1.85rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.qa { display: flex; align-items: center; gap: .85rem; padding: .95rem 1.05rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); height: 100%; transition: border-color .12s, transform .12s, box-shadow .12s; }
.qa:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.qa .q-i { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-600); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qa b { display: block; font-weight: 650; }
.qa small { color: var(--muted); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); display: inline-block; box-shadow: 0 0 0 4px var(--ok-soft); margin-right: .4rem; }
.status-dot.off { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }

/* ---------- Rozetler ---------- */
.badge-vibe { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: .76rem; font-weight: 500; }
.badge-vibe .dot { width: .65rem; height: .65rem; border-radius: 50%; display: inline-block; }
.is-active-pill { background: var(--ok-soft); color: var(--ok); padding: .12rem .6rem; border-radius: 999px; font-size: .7rem; font-weight: 700; }
.is-inactive-pill { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); padding: .12rem .6rem; border-radius: 999px; font-size: .7rem; font-weight: 600; }
.type-pill { background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: .12rem .6rem; font-size: .72rem; font-weight: 700; }
.chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .65rem; font-size: .8rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }

/* ---------- Mevcut sayfalarin bilesenleri ---------- */
.code-textarea { font-family: var(--mono); font-size: .85rem; min-height: 240px; }
.compare-col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.compare-col h6 { font-weight: 600; }
.compare-col pre { white-space: pre-wrap; word-wrap: break-word; font-size: .85rem; color: var(--ink); max-height: 480px; overflow: auto; }
.gradient-strip { height: 8px; border-radius: 999px; }
.step-badge { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: .85rem; font-weight: 700; margin-right: .5rem; }
.vibe-grid .vibe-card { display: block; cursor: pointer; padding: 1rem; border-radius: var(--radius); background: var(--panel); border: 2px solid var(--line); position: relative; transition: border-color .15s, box-shadow .15s; height: 100%; }
.vibe-grid .vibe-card:hover { border-color: var(--vibe-color, var(--accent)); }
.vibe-grid .vibe-card input[type=radio] { position: absolute; opacity: 0; }
.vibe-grid .vibe-card input[type=radio]:checked + .vibe-dot { transform: scale(1.4); }
.vibe-grid .vibe-card:has(input[type=radio]:checked) { border-color: var(--vibe-color, var(--accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--vibe-color, var(--accent)) 18%, transparent); }
.vibe-grid .vibe-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--vibe-color, #999); margin-bottom: .5rem; transition: transform .15s; }
.mhz-row { gap: 1rem; }
.mhz-row input[type=range] { flex: 1; accent-color: var(--accent); }
.provider-block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.provider-block h5 { font-weight: 650; margin: 0 0 .75rem 0; display: flex; align-items: center; gap: .5rem; }
.provider-block h5 .pill { background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font-size: .65rem; padding: .15rem .5rem; border-radius: 999px; font-weight: 600; }

.survey-card { overflow: hidden; transition: box-shadow .15s, transform .15s; }
.survey-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.survey-card.is-off .survey-cover, .survey-card.is-off .survey-title { opacity: .6; }
.survey-cover { height: 92px; position: relative; background: linear-gradient(135deg, #122b2d, #6e57e0); background-size: cover; background-position: center; }
.survey-cover .is-active-pill, .survey-cover .is-inactive-pill { position: absolute; top: .6rem; right: .6rem; }
.survey-title { font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.survey-title:hover { color: var(--accent-600); }
.survey-warn { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm); padding: .35rem .6rem; font-size: .8rem; }
.survey-metrics { display: flex; gap: 1.25rem; }
.survey-metrics div { display: flex; flex-direction: column; line-height: 1.15; }
.survey-metrics b { font-size: 1.25rem; }
.survey-metrics span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.q-card { display: flex; gap: 1rem; padding: 1rem 1.1rem; align-items: flex-start; }
.q-card.is-off { opacity: .6; }
.q-index { width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: .85rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.q-text { font-weight: 600; }
.q-actions { display: flex; gap: .4rem; flex-shrink: 0; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.q-actions form { margin: 0; }
.type-tile { display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: .8rem .9rem; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; position: relative; transition: border-color .15s, box-shadow .15s; background: var(--panel); }
.type-tile:hover { border-color: var(--accent); }
.type-tile input { position: absolute; opacity: 0; }
.type-tile:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.type-tile .t-icon { font-size: 1.3rem; color: var(--accent); line-height: 1; }
.type-tile small { color: var(--muted); line-height: 1.3; }
.rating-preview { display: flex; gap: .5rem; }
.rating-preview span { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--muted); }
.bar-row { display: grid; grid-template-columns: minmax(90px, 220px) 1fr 110px; gap: .75rem; align-items: center; margin: .35rem 0; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.bar-track { height: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--accent)); border-radius: 999px; min-width: 2px; }
.bar-val { font-size: .8rem; color: var(--muted); text-align: right; white-space: nowrap; }
.text-answers { display: flex; flex-direction: column; gap: .5rem; max-height: 360px; overflow: auto; }
.text-answer { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .75rem; }
.card.is-off { opacity: .75; }
.chip-img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; margin-right: .4rem; vertical-align: middle; }
.q-thumb { max-height: 90px; max-width: 220px; border-radius: 10px; border: 1px solid var(--line); object-fit: cover; display: block; }
.opt-row { padding: .5rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.opt-thumb { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--line); }
@media (max-width: 768px) { .q-card { flex-wrap: wrap; } .bar-row { grid-template-columns: 90px 1fr 80px; } }

/* Tablolar telefonda yatay kayar */
@media (max-width: 767.98px) { .page .table { display: block; overflow-x: auto; white-space: nowrap; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Tema dugmesi: acikta ay, koyuda gunes ikonu */
.theme-sun { display: none; }
[data-bs-theme="dark"] .theme-sun { display: block; }
[data-bs-theme="dark"] .theme-moon { display: none; }
.confirm-word { letter-spacing: .12em; font-weight: 700; text-align: center; }
.card.kpi { flex-direction: row; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table-wrap > .table { min-width: 100%; }

/* Koyu temada Bootstrap'in sabit acik renkli yardimci siniflarini tema renklerine bagla */
[data-bs-theme="dark"] .bg-light, [data-bs-theme="dark"] .bg-white, [data-bs-theme="dark"] .text-bg-light { background-color: var(--panel-2) !important; color: var(--ink) !important; }
[data-bs-theme="dark"] .text-dark:not(.bg-info):not(.bg-warning):not(.bg-success):not(.bg-primary) { color: var(--ink) !important; }
[data-bs-theme="dark"] .btn-light { --bs-btn-bg: var(--panel-2); --bs-btn-border-color: var(--line); --bs-btn-color: var(--ink); --bs-btn-hover-bg: var(--line); --bs-btn-hover-color: var(--ink); }
[data-bs-theme="dark"] .border-light { border-color: var(--line) !important; }
[data-bs-theme="dark"] .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }
.btn-light { --bs-btn-border-color: var(--line); }
.form-range { accent-color: var(--accent); }
.form-range::-webkit-slider-runnable-track { background: var(--line); }
.form-check-label { color: var(--ink); }

/* ---------- Masaustunde daraltilabilir kenar cubugu (ikon seridi) ---------- */
@media (min-width: 992px) {
  .sidebar { transition: width .2s ease; }
  .content-area { transition: margin-left .2s ease; }
  html.nav-collapsed { --sidebar-w: 76px; }
  html.nav-collapsed .sidebar { padding-left: .6rem; padding-right: .6rem; }
  html.nav-collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  html.nav-collapsed .brand-mark { display: block; }
  html.nav-collapsed .brand-text, html.nav-collapsed .lbl, html.nav-collapsed .u-meta { display: none; }
  html.nav-collapsed .nav-group { font-size: 0; height: 1px; padding: 0; margin: .7rem .5rem; background: var(--sb-line); opacity: 1; }
  html.nav-collapsed .sidebar .nav-link, html.nav-collapsed .sidebar .logout-btn { justify-content: center; padding: .65rem; }
  html.nav-collapsed .sidebar .nav-link.active-route { box-shadow: none; }
  html.nav-collapsed .user-chip { justify-content: center; padding-left: 0; padding-right: 0; }
}

/* Kisa ekranlarda menu tek ekrana sigsin */
@media (max-height: 760px) {
  .sidebar { padding-top: .6rem; padding-bottom: .6rem; }
  .brand { padding-bottom: .5rem; min-height: 0; }
  .brand-word { height: 24px; }
  .nav-group { padding: .6rem .65rem .2rem; }
  .sidebar .nav-link { padding-top: .38rem; padding-bottom: .38rem; }
  .sidebar-foot { padding-top: .4rem; margin-top: .3rem; }
}

/* Kenar cubugu alt bolumu: profil karti, cikis ve footer ayri ve hizali */
.sidebar-foot { display: flex; flex-direction: column; gap: .5rem; }
.sidebar-foot .user-chip { background: rgba(255, 255, 255, .05); border: 1px solid var(--sb-line); border-radius: 12px; padding: .6rem .65rem; }
.sidebar-foot .logout-form { margin: 0; }
.sidebar .logout-btn { padding: .55rem .65rem .55rem calc(.65rem + 8px); border-radius: 10px; }
.sidebar-copy { text-align: center; font-size: .7rem; color: var(--sb-ink); opacity: .45; padding-top: .45rem; border-top: 1px solid var(--sb-line); margin-top: .1rem; }
@media (min-width: 992px) {
  html.nav-collapsed .sidebar-foot .user-chip { background: transparent; border-color: transparent; padding: .4rem 0; }
  html.nav-collapsed .sidebar .logout-btn { padding: .65rem; }
}
