/* =====================================================================
   Hemen Havale — Admin design system (v16, full rebuild).
   Modern "violet + zinc" fintech theme on top of Bootstrap 5.3.
   Soft & airy: 14px radii, soft shadows, generous spacing, 14px base.

   EVERYTHING is driven by the tokens in :root / [data-bs-theme="dark"].
   Bootstrap's own --bs-* variables are remapped to our tokens so its
   components (DataTables, form-control, pagination) follow the theme in
   both light and dark — no more colour clashes. Views must NOT hardcode
   colours; use the semantic utility classes near the bottom instead.
   ===================================================================== */

/* ---- tokens : LIGHT (default) --------------------------------------- */
:root {
  --app-bg: #f5f5f8;
  --surface: #ffffff;
  --surface-2: #f7f7fb;
  --surface-3: #f0f0f5;
  --topbar-bg: rgba(255, 255, 255, 0.82);
  --ink: #1b1b21;
  --ink-soft: #3f3f46;
  --muted: #71717a;
  --line: #e7e7ee;
  --line-strong: #d6d6df;
  --soft: #fff7ed;

  --brand: #ea580c;          /* orange-600 (Hemen Havale) */
  --brand-2: #f97316;        /* orange-500 */
  --brand-ink: #ffffff;
  --brand-soft: #ffedd5;     /* orange-100 */
  --brand-shadow: rgba(234, 88, 12, 0.30);

  /* deposit = green, withdraw = red (transaction semantics, never themed away) */
  --ok:   #16a34a; --ok-soft:   #dcfce7; --ok-ink:   #15803d;
  --warn: #d97706; --warn-soft: #fef3c7; --warn-ink: #b45309;
  --orange: #ea580c; --orange-soft: #ffe4c4; --orange-ink: #c2410c;
  --err:  #dc2626; --err-soft:  #fee2e2; --err-ink:  #b91c1c;
  --info: #2563eb; --info-soft: #dbeafe; --info-ink: #1d4ed8;
  /* "İşlemde" (claimed/in-progress) = cyan, distinct from brand & warn */
  --lock: #0891b2; --lock-soft: #cffafe; --lock-ink: #0e7490;

  /* left rail (light) */
  --side-bg: #ffffff;
  --side-ink: #52525b;
  --side-ink-strong: #18181b;
  --side-hover: #f3f1fd;
  --side-line: #ededf2;
  --side-active: var(--brand);
  --side-active-ink: #ffffff;

  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.05);
  --shadow: 0 6px 22px rgba(24, 24, 27, 0.08);
  --shadow-lg: 0 24px 60px rgba(24, 24, 27, 0.18);
  --ring: 0 0 0 3px var(--brand-soft);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;

  /* Bootstrap bridge — make BS components inherit our palette */
  --bs-body-bg: var(--app-bg);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line);
  --bs-border-color-translucent: var(--line);
  --bs-secondary-bg: var(--surface-2);
  --bs-tertiary-bg: var(--surface-2);
  --bs-secondary-color: var(--muted);
  --bs-tertiary-color: var(--muted);
  --bs-emphasis-color: var(--ink);
  --bs-heading-color: var(--ink);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: var(--brand-2);
  --bs-primary: var(--brand);
  --bs-primary-rgb: 234, 88, 12;
  --bs-link-color-rgb: 234, 88, 12;
}

/* ---- tokens : DARK -------------------------------------------------- */
[data-bs-theme="dark"] {
  --app-bg: #0b0b0f;
  --surface: #17171c;
  --surface-2: #1e1e25;
  --surface-3: #26262f;
  --topbar-bg: rgba(20, 20, 26, 0.80);
  --ink: #f4f4f5;
  --ink-soft: #d4d4d8;
  --muted: #a1a1aa;
  --line: #2a2a33;
  --line-strong: #3a3a45;
  --soft: #2a1a10;

  --brand: #f97316;          /* orange-500 */
  --brand-2: #fb923c;        /* orange-400 */
  --brand-ink: #ffffff;
  --brand-soft: #3a1f0d;
  --brand-shadow: rgba(0, 0, 0, 0.55);

  --ok:   #22c55e; --ok-soft:   #0f2a1c; --ok-ink:   #4ade80;
  --warn: #f59e0b; --warn-soft: #2e2410; --warn-ink: #fbbf24;
  --orange: #fb923c; --orange-soft: #33200f; --orange-ink: #fdba74;
  --err:  #ef4444; --err-soft:  #2e1718; --err-ink:  #f87171;
  --info: #3b82f6; --info-soft: #15233f; --info-ink: #93c5fd;
  --lock: #22d3ee; --lock-soft: #0c2a30; --lock-ink: #67e8f9;

  --side-bg: #121217;
  --side-ink: #a1a1aa;
  --side-ink-strong: #ffffff;
  --side-hover: rgba(255, 255, 255, 0.05);
  --side-line: rgba(255, 255, 255, 0.07);
  --side-active: var(--brand);
  --side-active-ink: #ffffff;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
  --ring: 0 0 0 3px rgba(249, 115, 22, 0.35);

  --bs-body-bg: var(--app-bg);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line);
  --bs-border-color-translucent: var(--line);
  --bs-secondary-bg: var(--surface-2);
  --bs-tertiary-bg: var(--surface-2);
  --bs-secondary-color: var(--muted);
  --bs-tertiary-color: var(--muted);
  --bs-emphasis-color: var(--ink);
  --bs-heading-color: var(--ink);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: var(--brand-2);
  --bs-primary: var(--brand);
  --bs-primary-rgb: 249, 115, 22;
  --bs-link-color-rgb: 249, 115, 22;
}

/* ---- base ----------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--app-bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }
h1, h2, h3, h4 { color: var(--ink); }
::selection { background: var(--brand); color: #fff; }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }

/* ---- shell ---------------------------------------------------------- */
.shell { display: flex; min-height: 100vh; }

.side {
  width: 256px; flex: 0 0 256px;
  background: var(--side-bg);
  color: var(--side-ink);
  border-right: 1px solid var(--side-line);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 1045;
  transition: transform 0.25s ease;
}
.side .logo {
  display: flex; align-items: center; justify-content: center;
  padding: 18px 18px; border-bottom: 1px solid var(--side-line);
}
.side .logo .logo-img {
  width: 100%; max-width: 182px; height: auto; display: block;
  box-sizing: border-box;
}
.side nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.side .nav-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted); padding: 16px 12px 7px;
}
.side a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin-bottom: 2px; border-radius: var(--radius-sm);
  color: var(--side-ink); text-decoration: none; font-size: 13.5px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.side a i { font-size: 17px; width: 20px; text-align: center; opacity: 0.9; }
.side a:hover { background: var(--side-hover); color: var(--side-ink-strong); }
.side a.active {
  background: var(--side-active);
  color: var(--side-active-ink);
  box-shadow: 0 6px 16px var(--brand-shadow);
  font-weight: 600;
}
.side a.active i { opacity: 1; }
.side a.nav-danger { color: var(--err); }
.side a.nav-danger:hover { background: var(--err-soft); color: var(--err-ink); }

.side .who {
  padding: 14px 16px; border-top: 1px solid var(--side-line);
  display: flex; align-items: center; gap: 11px;
}
.side .who .avatar {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
  box-shadow: 0 4px 10px var(--brand-shadow);
}
.side .who .meta { min-width: 0; flex: 1; }
.side .who .meta b { display: block; font-size: 13px; color: var(--side-ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .who .meta span { font-size: 11.5px; color: var(--muted); }
.side .who form { margin: 0; }
.side .who button {
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--side-line);
  width: 36px; height: 36px; border-radius: var(--radius-sm); cursor: pointer; font-size: 15px;
  display: grid; place-items: center; transition: 0.15s;
}
.side .who button:hover { background: var(--err); color: #fff; border-color: transparent; }

.main { flex: 1; min-width: 0; margin-left: 256px; display: flex; flex-direction: column; transition: margin-left 0.25s ease; }

/* Masaüstü kenar çubuğu daraltma: sidebar sola kayar, içerik tam genişlik olur. */
.top .side-toggle { display: inline-flex; }
body.side-collapsed .side { transform: translateX(-100%); }
body.side-collapsed .main { margin-left: 0; }
@media (max-width: 991.98px) { .top .side-toggle { display: none; } }

/* ---- topbar --------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 1030;
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px; height: 62px;
  background: var(--topbar-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .burger { display: none; background: transparent; border: 0; color: var(--ink); font-size: 22px; cursor: pointer; padding: 4px; }
.top .crumbs { display: flex; flex-direction: column; min-width: 0; }
.top .crumbs .page-title { font-weight: 700; font-size: 16px; color: var(--ink); line-height: 1.2; }
.top .crumbs .path { font-size: 11.5px; color: var(--muted); }
.top .spacer { flex: 1; }
/* topbar tool button — also used standalone (e.g. login theme toggle), so the
   base style is unscoped and works anywhere it appears. */
.tool {
  width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer;
  display: grid; place-items: center; font-size: 17px; transition: 0.15s;
}
.tool:hover { background: var(--soft); border-color: var(--brand); color: var(--brand); }

/* ---- content wrap (full width) ------------------------------------- */
.wrap { padding: 26px 30px 48px; width: 100%; max-width: none; }

/* ---- flash ---------------------------------------------------------- */
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px;
  border: 1px solid transparent; border-left-width: 4px; box-shadow: var(--shadow-sm);
  animation: lp-slide 0.3s ease;
}
.flash::before { font-family: "bootstrap-icons"; font-size: 18px; }
.flash.success { background: var(--ok-soft); color: var(--ok-ink); border-color: var(--ok); }
.flash.success::before { content: "\f26b"; }
.flash.error { background: var(--err-soft); color: var(--err-ink); border-color: var(--err); }
.flash.error::before { content: "\f33a"; }
.flash.info { background: var(--info-soft); color: var(--info-ink); border-color: var(--info); }
.flash.info::before { content: "\f431"; }
@keyframes lp-slide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---- toasts (AJAX onay/red geri bildirimi) ------------------------- */
#lpToasts {
  position: fixed; right: 18px; bottom: 18px; z-index: 4000;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.lp-toast {
  min-width: 220px; max-width: 380px; padding: 12px 16px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: #fff; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px); transition: opacity .25s ease, transform .25s ease;
}
.lp-toast.show { opacity: 1; transform: translateY(0); }
.lp-toast.ok  { background: var(--ok); }
.lp-toast.err { background: var(--err); }

/* ---- KPI cards ------------------------------------------------------ */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-sm); transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s;
  position: relative; overflow: hidden;
}
.kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand);
}
.kpi:hover { box-shadow: var(--shadow); border-color: var(--line-strong); transform: translateY(-1px); }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi .value { font-size: 27px; font-weight: 800; margin-top: 6px; letter-spacing: -0.6px; }
.kpi .sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.kpi.accent {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent;
  box-shadow: var(--shadow);
}
.kpi.accent::before { background: rgba(255, 255, 255, 0.5); }
.kpi.accent .label, .kpi.accent .sub { color: rgba(255, 255, 255, 0.88); }

/* ---- panels --------------------------------------------------------- */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.panel h3 { margin: 0 0 16px; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel.danger  { border-color: var(--err); background: var(--err-soft); }
.panel.danger h3 { color: var(--err-ink); }
.panel.success { border-color: var(--ok); background: var(--ok-soft); }
.panel.success h3 { color: var(--ok-ink); }

/* ---- presence (kullanıcı aktifliği) --------------------------------- */
.status-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle; background: var(--muted);
}
.status-dot.on {
  background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft);
  animation: lp-pulse 2s ease-in-out infinite;
}
.status-dot.off { background: #94a3b8; opacity: .6; }
@keyframes lp-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--ok-soft); }
  50%      { box-shadow: 0 0 0 4px var(--ok-soft); }
}

/* ---- tables --------------------------------------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: var(--surface); }
table {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border-radius: var(--radius); overflow: hidden;
}
.table-wrap > table { border: 0; box-shadow: none; }
th, td { text-align: left; padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--ink); }
th {
  background: var(--surface-2); color: var(--muted); font-weight: 700;
  text-transform: uppercase; font-size: 11px; letter-spacing: 0.04em;
}
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.wrap-cell, th.wrap-cell { white-space: normal; }
.subrow { background: var(--surface-2); }

a.link { color: var(--brand); text-decoration: none; font-weight: 600; }
a.link:hover { color: var(--brand-2); text-decoration: underline; }

/* ---- badges --------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-approved { background: var(--ok-soft); color: var(--ok-ink); }
.b-rejected { background: var(--err-soft); color: var(--err-ink); }
.b-pending, .b-waiting_provider { background: var(--warn-soft); color: var(--warn-ink); }
.b-waiting_payment, .b-requested { background: var(--info-soft); color: var(--info-ink); }
.b-locked { background: var(--lock-soft); color: var(--lock-ink); }
/* VIP çekim rozeti (altın) — ::before noktasını gizle, ikon kullan */
.vip-badge { background: #7a5a00; color: #ffd75e; border-color: #ffd75e55; margin-left: 6px; }
.vip-badge::before { display: none; }

/* ---- buttons -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: 9px 15px;
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: filter 0.15s, transform 0.05s, box-shadow 0.15s, background 0.15s, border-color 0.15s; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-ok { background: var(--ok); color: #fff; box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25); }
.btn-ok:hover { filter: brightness(1.06); }
.btn-err { background: var(--err); color: #fff; box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25); }
.btn-err:hover { filter: brightness(1.06); }
.btn-brand { background: var(--brand); color: var(--brand-ink); box-shadow: 0 2px 8px var(--brand-shadow); }
.btn-brand:hover { background: var(--brand-2); }
.btn-muted { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-muted:hover { background: var(--soft); border-color: var(--line-strong); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: var(--radius-xs); }

/* ---- filters (segmented pills) ------------------------------------- */
.filters { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.filters a {
  font-size: 13px; padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 500;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: 0.15s;
}
.filters a:hover { border-color: var(--brand); color: var(--brand); }
.filters a.on {
  background: var(--brand); color: #fff; border-color: var(--brand);
  box-shadow: 0 2px 8px var(--brand-shadow);
}
.filters .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

/* ---- pager (compact, windowed page numbers) ------------------------- */
.lp-pager { display: flex; align-items: center; gap: 4px; margin-top: 16px; flex-wrap: wrap; }
.lp-pager-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 8px; font-size: 12.5px; font-weight: 500;
  border-radius: var(--radius-xs); background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; transition: 0.15s;
}
.lp-pager-btn:hover { border-color: var(--brand); color: var(--brand); }
.lp-pager-btn.on { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 2px 8px var(--brand-shadow); }
.lp-pager-btn.disabled { opacity: 0.4; pointer-events: none; }
.lp-pager-ellipsis { padding: 0 4px; color: var(--muted); font-size: 12.5px; }
.lp-pager-info { margin-left: 8px; font-size: 12.5px; color: var(--muted); }

/* ---- definition list ------------------------------------------------ */
.dl { display: grid; grid-template-columns: 200px 1fr; gap: 10px 18px; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ---- forms ---------------------------------------------------------- */
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.field > label, .field-label { font-weight: 600; color: var(--ink); }

/* Global form-control styling: EVERY text-like input, select and textarea is
   themed by default — whether or not it sits in a .field wrapper or carries a
   Bootstrap class. This guarantees no bare <input>/<select> ever renders with
   the unstyled browser default anywhere in the panel (tables, modals, inline
   forms, the credentials panel, etc.). Button-type inputs and checkbox/radio/
   file are handled separately below so they are never given the text-box look. */
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=search], input[type=tel], input[type=url], input[type=date],
input[type=datetime-local], input[type=time], input[type=month], input[type=week],
input:not([type]), select, textarea,
.field input, .field select, .field textarea,
input.form-control, select.form-select, textarea.form-control {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit; line-height: 1.4;
  background: var(--surface); color: var(--ink); max-width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus,
input[type=number]:focus, input[type=search]:focus, input[type=tel]:focus,
input[type=url]:focus, input[type=date]:focus, input[type=datetime-local]:focus,
input[type=time]:focus, input[type=month]:focus, input[type=week]:focus,
input:not([type]):focus, select:focus, textarea:focus,
.field input:focus, .field select:focus, .field textarea:focus,
input.form-control:focus, select.form-select:focus, textarea.form-control:focus {
  outline: 0; border-color: var(--brand); box-shadow: var(--ring);
}
input:disabled, select:disabled, textarea:disabled,
.field input:disabled, input.form-control:disabled {
  background: var(--surface-2); color: var(--muted); cursor: not-allowed;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }

/* checkboxes & radios — themed accent + comfortable hit area */
input[type=checkbox], input[type=radio] {
  width: 16px; height: 16px; accent-color: var(--brand);
  cursor: pointer; vertical-align: middle; margin: 0;
}
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible {
  outline: 0; box-shadow: var(--ring); border-radius: 4px;
}

/* file inputs (e.g. dekont / receipt upload) — themed pick button */
input[type=file] {
  font-family: inherit; font-size: 13px; color: var(--ink); max-width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); padding: 5px 8px; cursor: pointer;
}
input[type=file]:focus { outline: 0; border-color: var(--brand); box-shadow: var(--ring); }
input[type=file]::file-selector-button {
  margin-right: 10px; padding: 7px 12px; border-radius: var(--radius-xs);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; transition: 0.15s;
}
input[type=file]::file-selector-button:hover { background: var(--soft); border-color: var(--brand); color: var(--brand); }

/* ---- misc ----------------------------------------------------------- */
.muted { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
code, pre { color: var(--ink); }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }
.copy-btn { cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: var(--radius-xs); padding: 4px 9px; font-size: 12px; transition: 0.15s; }
.copy-btn:hover { color: var(--brand); border-color: var(--brand); background: var(--soft); }
.copy-btn.copied { color: var(--ok-ink); border-color: var(--ok); background: var(--ok-soft); }

/* semantic text + tone helpers (replace any hardcoded inline colours) */
.t-ok    { color: var(--ok-ink) !important; }
.t-err   { color: var(--err-ink) !important; }
.t-info  { color: var(--info-ink) !important; }
.t-warn  { color: var(--warn-ink) !important; }
.t-brand { color: var(--brand) !important; }
.t-muted { color: var(--muted) !important; }
.ta-r { text-align: right; }
.ta-c { text-align: center; }

/* stat tile (icmal/summary) — tone via modifier class */
.stat { border-radius: var(--radius); padding: 14px 16px; border: 1px solid transparent; }
.stat .stat-label { font-size: 12px; opacity: 0.9; }
.stat .stat-value { font-size: 20px; font-weight: 800; margin-top: 4px; letter-spacing: -0.4px; }
.stat-ok    { background: var(--ok-soft);   color: var(--ok-ink);   border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.stat-err   { background: var(--err-soft);  color: var(--err-ink);  border-color: color-mix(in srgb, var(--err) 28%, transparent); }
.stat-info  { background: var(--info-soft); color: var(--info-ink); border-color: color-mix(in srgb, var(--info) 28%, transparent); }
.stat-warn  { background: var(--warn-soft); color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.stat-brand { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 28%, transparent); }

/* pill (inline totals) */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.pill.ok   { background: var(--ok-soft);   color: var(--ok-ink);   border-color: transparent; }
.pill.err  { background: var(--err-soft);  color: var(--err-ink);  border-color: transparent; }
.pill.info { background: var(--info-soft); color: var(--info-ink); border-color: transparent; }

/* note / callout */
.note { background: var(--info-soft); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent);
  color: var(--info-ink); border-radius: var(--radius); padding: 12px 14px; font-size: 13px; }
.note.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn-ink); }
.note.err  { background: var(--err-soft);  border-color: color-mix(in srgb, var(--err) 30%, transparent);  color: var(--err-ink); }

/* brand gradient hero (treasury balances) */
.hero-card { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.hero-card .hero-label { font-size: 13px; opacity: 0.88; }
.hero-card .hero-value { font-size: 28px; font-weight: 800; margin-top: 6px; letter-spacing: -0.5px; }

/* preformatted code block (monitor payloads) */
.codeblock { margin: 0; white-space: pre-wrap; word-break: break-all; font-size: 12px;
  max-height: 260px; overflow: auto; background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }

/* ---- responsive ----------------------------------------------------- */
.side-backdrop { display: none; position: fixed; inset: 0; background: rgba(2, 6, 23, 0.5); z-index: 1040; opacity: 0; transition: opacity 0.25s; }

@media (max-width: 991.98px) {
  .side { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.side-open .side { transform: none; }
  body.side-open .side-backdrop { display: block; opacity: 1; }
  .main { margin-left: 0; }
  .top .burger { display: block; }
  .wrap { padding: 18px; }
  .dl { grid-template-columns: 1fr; gap: 4px 0; }
  .dl dt { margin-top: 8px; }
}
@media (max-width: 575.98px) {
  .top { padding: 0 14px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi .value { font-size: 22px; }
}

/* =====================================================================
   DataTables (2.x + Bootstrap 5) — themed to match the panel system.
   admin.js adds .dt-host to the .table-wrap around each table.dt.
   ===================================================================== */
.table-wrap.dt-host { overflow: visible; border: 0; box-shadow: none; border-radius: 0; background: transparent; }

.dt-container {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 14px 16px;
}
.dt-container .dt-layout-row { align-items: center; margin: 0; }
.dt-container .dt-layout-row:first-child { margin-bottom: 12px; }
.dt-container .dt-layout-row:last-child { margin-top: 12px; }

.dt-container div.dt-search { text-align: right; }
.dt-container .dt-search label, .dt-container .dt-length label {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; margin: 0;
}
.dt-container .dt-search input {
  min-width: 220px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: 13.5px; font-family: inherit;
}
.dt-container .dt-search input:focus { outline: 0; border-color: var(--brand); box-shadow: var(--ring); }
.dt-container select.dt-input {
  padding: 8px 30px 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: 13px; font-family: inherit;
}

.dt-container table.dataTable { width: 100% !important; border-collapse: collapse; margin: 0; }
.dt-container table.dataTable thead th {
  background: var(--surface-2); color: var(--muted); cursor: pointer; border-bottom: 1px solid var(--line);
}
.dt-container table.dataTable tbody td { border-bottom: 1px solid var(--line); color: var(--ink); }
.dt-container table.dataTable tbody tr { background: var(--surface); }
.dt-container table.dataTable tbody tr:hover td { background: var(--surface-2); }
table.dataTable thead th.dt-ordering-asc, table.dataTable thead th.dt-ordering-desc { color: var(--brand); }

.dt-container .dt-info { color: var(--muted); font-size: 12.5px; padding-top: 0; }
.dt-container .dt-paging .pagination { margin: 0; justify-content: flex-end; gap: 4px; }
.dt-container .dt-paging .page-link {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius-sm); padding: 7px 12px; font-size: 13px; font-weight: 600;
}
.dt-container .dt-paging .page-item.active .page-link {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 2px 6px var(--brand-shadow);
}
.dt-container .dt-paging .page-item.disabled .page-link { opacity: 0.45; }
.dt-container .dt-paging .page-link:hover { border-color: var(--brand); color: var(--brand); }
.dt-container .dt-paging .page-item.active .page-link:hover { color: #fff; }

@media (max-width: 575.98px) {
  .dt-container .dt-search input { min-width: 0; width: 100%; }
  .dt-container div.dt-search { text-align: left; }
}

/* =====================================================================
   Operations panel — KPI badges, transaction queue, live updates,
   dashboard analytics.
   ===================================================================== */

/* ---- dashboard KPI row --------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.kpis .kpi { padding: 18px 20px; }
.kpi .kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi .ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 19px; color: #fff; flex: 0 0 auto;
}
.kpi .ico.green  { background: var(--ok); }
.kpi .ico.red    { background: var(--err); }
.kpi .ico.blue   { background: var(--brand); }
.kpi .ico.orange { background: var(--warn); }
.kpi .value.neg  { color: var(--err); }
.kpi .foot { margin-top: 10px; }
.chg { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.chg.up   { color: var(--ok); }
.chg.down { color: var(--err); }
.chg.flat { color: var(--muted); font-weight: 500; }

/* dashboard KPI accent bars by metric type + lively averages */
.kpi.dep::before     { background: var(--ok); }
.kpi.wd::before      { background: var(--err); }
.kpi.avg-dep::before { background: linear-gradient(180deg, var(--ok), var(--brand)); }
.kpi.avg-wd::before  { background: linear-gradient(180deg, var(--err), var(--brand)); }
.kpi.pending::before { background: var(--warn); }
.kpi.avg-dep, .kpi.avg-wd { background: linear-gradient(180deg, var(--surface), var(--soft)); }

/* coloured duration chip (provider performance times) */
.time-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; }
.time-badge.ok   { background: var(--ok-soft);   color: var(--ok-ink); }
.time-badge.warn { background: var(--warn-soft); color: var(--warn-ink); }
.time-badge.err  { background: var(--err-soft);  color: var(--err-ink); }

/* ---- two-column panel grid ----------------------------------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; margin-top: 18px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b.ok { color: var(--ok-ink); }
.count-pill { background: var(--err); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.alert-row { display: flex; align-items: center; gap: 9px; padding: 11px 13px; margin-bottom: 8px;
  background: var(--err-soft); color: var(--err-ink); border-radius: var(--radius-sm);
  border: 1px solid transparent; border-left: 3px solid var(--err); font-size: 13.5px; }
.alert-row:last-child { margin-bottom: 0; }

/* ---- 7-day trend (pure CSS bars) ----------------------------------- */
.trend { display: flex; align-items: flex-end; gap: 12px; height: 170px; padding: 8px 4px 0; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.trend-col .bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 5px; }
.trend-col .bar { width: 42%; max-width: 26px; border-radius: 6px 6px 0 0; transition: height .3s; }
.trend-col .bar.dep { background: var(--ok); }
.trend-col .bar.wd  { background: var(--err); }
.trend-col .lbl { margin-top: 7px; font-size: 11.5px; color: var(--muted); }
.legend { margin-left: auto; display: inline-flex; gap: 14px; font-size: 12px; font-weight: 500; }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.legend .lg::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.legend .lg.dep::before { background: var(--ok); }
.legend .lg.wd::before  { background: var(--err); }

/* ---- provider performance summary ---------------------------------- */
.perf-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.perf-summary > div { background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.perf-summary > div span { font-size: 12px; color: var(--muted); }
.perf-summary > div b { font-size: 18px; font-weight: 800; letter-spacing: -0.4px; }

/* ---- transaction queue table --------------------------------------- */
.tx-table td { white-space: nowrap; vertical-align: top; }
.tip { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; }
.tip-deposit  { background: var(--ok-soft);  color: var(--ok-ink); }
.tip-withdraw { background: var(--err-soft); color: var(--err-ink); }
.tip-transfer { background: var(--info-soft); color: var(--info-ink); }
.amount-deposit b  { color: var(--ok-ink); }
.amount-withdraw b { color: var(--err-ink); }

.acct { white-space: normal; min-width: 190px; line-height: 1.5; }
.acct b { display: block; font-size: 12.5px; }
.acct .muted { font-size: 11.5px; }
.acct code { display: block; font-size: 11.5px; color: var(--ink); background: transparent; padding: 0; }
.acct .hedef { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
/* Havale çekiminde hedef IBAN'ın bankası (IbanBank ile IBAN'dan çözülür). */
.acct .hedef-banka { display: block; font-size: 11.5px; color: var(--ink-soft); font-weight: 600; }
.acct .hedef-banka i { color: var(--muted); font-weight: 400; }
.usr { white-space: normal; min-width: 150px; line-height: 1.5; }
.usr b { display: block; font-size: 12.5px; }
.usr .muted { display: block; font-size: 11.5px; }
.usr .pid { font-size: 11px; }
.lockby { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--lock-ink);
  margin-top: 4px; }

.acts { white-space: normal; min-width: 150px; }
.acts .inl { display: inline-block; margin: 0 4px 4px 0; }
.acts .btn { margin: 0 4px 4px 0; }
.acts .link.sm { font-size: 12px; display: inline-flex; align-items: center; gap: 4px; margin-left: 2px; }

/* live indicator + new-row highlight */
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  color: var(--ok-ink); }
.live-dot i { animation: lp-pulse 1.6s ease-in-out infinite; }
@keyframes lp-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes lp-rowflash { from { background: var(--brand-soft); } to { background: transparent; } }
tr.row-flash td { animation: lp-rowflash 2s ease-out; }

/* Bekleyen (final olmayan) işlemler yaşlandıkça kademeli renklenir: 3 dk sarı,
   5 dk turuncu, 10 dk kırmızı. td'ye uygulanır ki hover (tr) arka planını örtüp
   renk kalıcı görünsün; sol şerit tonun koyu karşılığı. */
tr.tr-late-1 > td { background: var(--warn-soft); }
tr.tr-late-1 > td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
tr.tr-late-2 > td { background: var(--orange-soft); }
tr.tr-late-2 > td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
tr.tr-late-3 > td { background: var(--err-soft); }
tr.tr-late-3 > td:first-child { box-shadow: inset 3px 0 0 var(--err); }

.lock-note { display: flex; align-items: center; gap: 9px; padding: 12px 14px;
  background: var(--info-soft); color: var(--info-ink); border-radius: var(--radius-sm);
  border-left: 3px solid var(--info); font-size: 13.5px; }

/* ---- modal --------------------------------------------------------- */
/* NB: no backdrop-filter here — blurring the full page (esp. the large live
   tx table) forces an expensive GPU repaint on every open/close and on each
   background update, which janks badly when popups are opened back-to-back. */
.lp-modal { position: fixed; inset: 0; z-index: 1100; background: rgba(15, 12, 28, 0.62);
  display: grid; place-items: center; padding: 20px; }
body.lp-modal-open { overflow: hidden; }
.lp-modal[hidden] { display: none; }
.lp-modal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 22px 24px; width: 100%; max-width: 440px; animation: lp-pop .18s ease; }
.lp-modal-card h3 { margin: 0 0 14px; font-size: 16px; }
@keyframes lp-pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

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

/* ---- transaction detail preview modal (eye icon) ------------------- */
.lp-modal-card.txd-card { max-width: 460px; padding: 0; max-height: calc(100vh - 64px); overflow-y: auto; }
.txd-loading { padding: 64px 24px; text-align: center; color: var(--muted); font-size: 14px; }
.spin { display: inline-block; animation: lp-spin 0.9s linear infinite; }
@keyframes lp-spin { to { transform: rotate(360deg); } }

.txd { padding: 20px 22px 18px; }
.txd .txd-lbl { display: block; font-size: 10.5px; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }

.txd-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.txd-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 19px; flex: 0 0 auto; }
.txd-ico-deposit  { background: var(--ok-soft);  color: var(--ok-ink); }
.txd-ico-withdraw { background: var(--err-soft); color: var(--err-ink); }
.txd-ico-transfer { background: var(--info-soft); color: var(--info-ink); }
.txd-head-t { flex: 1; min-width: 0; }
.txd-head-t h3 { margin: 0; font-size: 16px; font-weight: 800; }
.txd-ref { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.txd-x { width: 32px; height: 32px; border-radius: var(--radius-xs); border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); cursor: pointer; display: grid; place-items: center;
  font-size: 13px; transition: 0.15s; }
.txd-x:hover { background: var(--err-soft); color: var(--err); border-color: var(--err); }

/* action toolbar under the header — two rows: primary (Onayla/Reddet, large,
   side-by-side) then secondary (Tutarı Düzelt / Kilidi Bırak / Yönlendir, aligned) */
.txd-actions { display: flex; flex-direction: column; gap: 8px;
  margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.txd-actions .inl { margin: 0; }
.txd-act-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.txd-act-primary > .inl { flex: 1 1 0; min-width: 0; }
.txd-act-primary > .btn { flex: 1 1 0; min-width: 0; }
.txd-act-primary .btn { width: 100%; padding: 12px 16px; font-size: 15px; font-weight: 700; }
.txd-act-secondary > .inl { display: inline-flex; }
.txd-act-claim { display: flex; }
.txd-act-claim .btn { width: 100%; padding: 12px 16px; font-size: 15px; }

.txd-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 2px 16px; }
.txd-top .badge { margin-top: 2px; }
.txd-amt-wrap { text-align: right; }
.txd-amt { font-size: 34px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.05; }
.txd-amt .txd-cur { font-size: 15px; font-weight: 600; color: var(--muted); }
.txd-locker { display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
  color: var(--lock-ink); margin-left: 8px; }

.txd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.txd-cell { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.txd-cell > i { font-size: 15px; color: var(--muted); margin-top: 1px; flex: 0 0 auto; }
.txd-cell b { font-size: 13.5px; font-weight: 700; display: block; word-break: break-word; }
.txd-sub { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }

.txd-bank { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 14px; }
.txd-bank-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 10px; font-weight: 700; font-size: 13.5px; }
.txd-bank-head > span { display: inline-flex; align-items: center; gap: 7px; }
.txd-bank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.txd-bank-grid b { font-size: 13px; word-break: break-word; }
.txd-bank-no { grid-column: 1 / -1; }
.txd-bank-no code { display: block; font-size: 13px; color: var(--ink); background: transparent; padding: 0; word-break: break-all; }

.txd-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 14px;
  border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn-ink);
  border: 1px solid transparent; border-left: 3px solid var(--warn); }
.txd-note > i { font-size: 15px; margin-top: 1px; }
.txd-note b { font-size: 13.5px; color: var(--ink); display: block; }
.txd-note .txd-lbl { color: inherit; opacity: 0.75; }
.txd-note-err { background: var(--err-soft); color: var(--err-ink); border-left-color: var(--err); }

.txd-refbox { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px;
  border-radius: var(--radius-sm); background: var(--surface-2); border: 1px dashed var(--line);
  font-size: 13px; color: var(--muted); }
.txd-refbox > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.txd-refcode { flex: 1; color: var(--brand); font-weight: 700; word-break: break-all; background: transparent; padding: 0; }

.txd-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.txd-foot-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.txd-foot-actions .inl { display: inline-block; margin: 0; }
.txd-locknote { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 479.98px) {
  .txd-grid, .txd-bank-grid { grid-template-columns: 1fr; }
  .txd-top { flex-direction: column; }
  .txd-amt-wrap { text-align: left; }
}

/* ---- dekont / dispute block (in detail modal) ---------------------- */
.txd-disp { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 14px; }
.txd-disp-head { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.txd-disp-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.txd-rcpts { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.txd-rcpt { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line);
  border-radius: var(--radius-xs); background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--ink); }
.txd-rcpt:hover { border-color: var(--brand); color: var(--brand); }
.txd-rcpt .muted { font-weight: 500; margin-left: auto; }
.txd-disp-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.txd-disp-actions .inl { display: inline-block; margin: 0; }
.txd-upload { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.txd-upload input[type=file] { font-size: 12px; max-width: 210px; }
.txd-resolve { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.txd-resolve input[type=text] { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-xs);
  background: var(--surface); color: var(--ink); font-size: 12.5px; min-width: 200px; }
/* bank-withdraw approve: dekont file input lives inside the Onayla form */
.txd-approve { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.txd-approve-file { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius-xs); padding: 5px 9px; }
.txd-approve-file input[type=file] { font-size: 11px; max-width: 160px; }

/* ---- sidebar: collapsible groups + count badges -------------------- */
.side .nav-group { margin-bottom: 2px; }
.side .nav-head {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border: 0; background: transparent; cursor: pointer;
  color: var(--side-ink); font: inherit; font-size: 13.5px; font-weight: 500;
  border-radius: var(--radius-sm); text-align: left;
}
.side .nav-head:hover { background: var(--side-hover); color: var(--side-ink-strong); }
.side .nav-head i.bi:first-child { font-size: 17px; width: 20px; text-align: center; opacity: .9; }
.side .nav-head span { flex: 1; }
.side .nav-head .caret { font-size: 12px; transition: transform .2s; opacity: .6; }
.side .nav-group.open .nav-head .caret { transform: rotate(180deg); }
.side .nav-sub { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.side .nav-group.open .nav-sub { max-height: 360px; }
.side .nav-sub a {
  padding: 8px 12px 8px 43px; font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.nav-count {
  margin-left: auto; background: var(--err); color: #fff; font-size: 10.5px; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-count.sm { background: var(--brand); }
.nav-count.zero { display: none; }
.side .nav-sub a.active { background: var(--side-active); color: var(--side-active-ink); font-weight: 600; }
.side .nav-sub a.active .nav-count { background: rgba(255,255,255,.3); }

/* ---- bank accounts page -------------------------------------------- */
.ba-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ba-tools { display: flex; align-items: center; gap: 14px; }
.ba-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.ba-filters .form-control { min-width: 200px; flex: 1; }
.ck { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.ba-table td { vertical-align: top; }
.ba-table .usage { min-width: 150px; }
.ba-table .usage .bar { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin: 3px 0; }
.ba-table .usage .bar span { display: block; height: 100%; background: var(--brand); }
.ba-table .dn { color: var(--ok-ink); font-weight: 600; }
.ba-table .up { color: var(--err-ink); font-weight: 600; }
.ba-table tr.is-deleted { opacity: .55; }
.btn-link { background: none; border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; padding: 0; color: var(--brand); }
.btn-link.warn { color: var(--warn-ink); }
.btn-link.ok { color: var(--ok-ink); }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 15px; padding: 2px 5px; text-decoration: none; }
.icon-btn:hover { color: var(--brand); }
.icon-btn.danger:hover { color: var(--err); }

/* ---- role picker (radio cards on user edit) ------------------------ */
.role-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.role-card {
  position: relative; display: block; cursor: pointer; user-select: none;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); padding: 12px 14px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.role-card:hover { border-color: var(--brand); }
.role-card input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.role-card .role-card-body { display: block; pointer-events: none; }
.role-card b { display: block; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.role-card .muted { font-size: 12px; line-height: 1.35; }
.role-card.on { border-color: var(--brand); background: var(--soft); box-shadow: var(--ring); }
.role-card.on b { color: var(--brand); }
.role-card.disabled { opacity: .6; cursor: not-allowed; }
.role-card.disabled input { cursor: not-allowed; }

/* ---- generic form grid (edit screens) ------------------------------ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ---- top-bar crypto ticker (Binance) + saha kasa — desktop only ------- */
.crypto-ticker { display: none; gap: 7px; align-items: center; margin-right: 8px; }
/* "canlı" pulse dot */
.crypto-ticker .crx-live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  flex: 0 0 auto; box-shadow: 0 0 0 0 var(--ok); animation: crxlive 1.8s ease-in-out infinite; }
@keyframes crxlive { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); } 70% { box-shadow: 0 0 0 5px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.crypto-ticker .crx { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font-size: 11.5px; padding: 2px 9px 2px 2px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); color: var(--ink); }
.crypto-ticker .crx-ic { width: 17px; height: 17px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.crypto-ticker .crx b { color: var(--c); font-weight: 700; font-size: 10.5px; letter-spacing: .03em; }
.crypto-ticker .crx-v { font-weight: 600; font-variant-numeric: tabular-nums; }
.crypto-ticker .crx-ar { font-size: 9px; }
.crypto-ticker .crx-up   .crx-v, .crypto-ticker .crx-up   .crx-ar { color: var(--ok); }
.crypto-ticker .crx-down .crx-v, .crypto-ticker .crx-down .crx-ar { color: var(--err); }
.crypto-ticker .crx-up, .crypto-ticker .crx-down { animation: crxpulse .8s ease; }
@keyframes crxpulse { 0%, 100% { transform: scale(1); } 35% { transform: scale(1.09); } }
.saha-kasa { display: none; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--ok-ink); background: var(--ok-soft); padding: 5px 13px; border-radius: 999px;
  margin-right: 8px; white-space: nowrap; }
.saha-kasa b { font-weight: 800; }
@media (min-width: 1100px) { .saha-kasa { display: flex; } }
/* Kripto ticker yalnız geniş ekranda (≥1400px) — laptop/tablette merkez alanı
   topbar kasa pencerelerine (5 site + 2 saha) bırakır ki tamamı görünsün. */
@media (min-width: 1400px) { .crypto-ticker { display: flex; } }

/* ---- topbar site-kasa pencereleri (süper admin) --------------------- */
/* .hk-bar hep merkez flex alanını kaplar (dar ekranda boş spacer görevi görür);
   pencereler yalnız geniş ekranda görünür. */
.hk-wrap { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
/* safe center: sığınca ortalar, TAŞINCA sola hizalar → en sol/en sağ kutu kırpılmaz. */
.hk-bar { display: flex; flex: 1; gap: 6px; align-items: center; justify-content: safe center;
  min-width: 0; overflow-x: auto; overflow-y: hidden; padding: 0 4px; scrollbar-width: thin; }
.hk-bar::-webkit-scrollbar { height: 6px; }
.hk-bar::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 3px; opacity: .6; }
.hk-bar::-webkit-scrollbar-track { background: transparent; }
/* kaydırma ipucu: kenarda soluk geçiş + yanıp sönen ok (kaydırılabilirken görünür). */
.hk-hint { position: absolute; top: 0; bottom: 0; width: 30px; display: none; align-items: center;
  z-index: 2; pointer-events: none; color: var(--brand); font-size: 16px; }
.hk-hint-l { left: 0; justify-content: flex-start; padding-left: 1px; background: linear-gradient(to right, var(--topbar-bg), transparent); }
.hk-hint-r { right: 0; justify-content: flex-end;  padding-right: 1px; background: linear-gradient(to left, var(--topbar-bg), transparent); }
.hk-hint i { animation: hkswipe 1.3s ease-in-out infinite; }
@keyframes hkswipe { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
.hk-wrap.can-r .hk-hint-r { display: flex; }
.hk-wrap.can-l .hk-hint-l { display: flex; }
.hk-slot { display: none; flex: 0 0 auto; flex-direction: column; gap: 1px; min-width: 74px; max-width: 128px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 3px 7px; }
.hk-slot .hk-pick { width: 100%; max-width: 100%; border: 0; background: transparent; cursor: pointer;
  color: var(--muted); font-size: 10px; font-weight: 600; padding: 0; outline: none;
  text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.hk-slot .hk-pick option { color: var(--ink); background: var(--surface); }
.hk-slot .hk-val { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--muted); line-height: 1.1; white-space: nowrap; }
.hk-slot .hk-val.pos { color: var(--ok); }
.hk-slot .hk-val.neg { color: var(--err); }
.hk-slot.hk-saha { border-color: var(--brand); }
.hk-sep { display: none; }
/* Tablet ve üstü: tüm kutular görünür (telefonda gizli). */
@media (min-width: 768px) {
  .hk-slot { display: flex; }
  .hk-sep { display: block; width: 1px; align-self: stretch; margin: 4px 2px; background: var(--line); flex: 0 0 auto; }
}

/* Çekim ÖDEME HESABI seçimi (onay formu içinde) — Hesap Hareketleri raporunu besler */
.payout-pick { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.payout-pick select { width: 100%; font-size: 14px; font-weight: 600; color: var(--ink, inherit); }
.txd-act-primary > .inl.has-payout { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; }
form.has-payout { display: flex; flex-direction: column; gap: 8px; min-width: 280px; }

/* IBAN — KAMERA/OCR OKUNUR (kullanıcı kararı 2026-11-17): banka uygulamalarının
   kamerayla IBAN okuması için sade grotesk (0/O, 1/I ayrışık; çizgili sıfır YOK),
   kalın, büyük, eşit genişlikte rakam, siyah-üstüne-beyaz (koyu temada da). */
.txd-bank-no code,
.acct .hedef code {
  font-family: Arial, "Helvetica Neue", Helvetica, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1, "zero" 0, "liga" 0;
  font-weight: 700; letter-spacing: .08em; word-spacing: .35em;
  color: #000; background: #fff; border: 1px solid #d4d4d8; border-radius: 6px;
  -webkit-font-smoothing: antialiased; word-break: normal; overflow-wrap: anywhere;
}
.txd-bank-no code { display: inline-block; font-size: 21px; line-height: 1.35; padding: 8px 12px; }
.acct .hedef code { display: inline-block; font-size: 13.5px; line-height: 1.4; padding: 2px 6px; margin-top: 2px; }

/* Hemen Havale: koyu temada beyaz yazılı logo varyantı */
[data-bs-theme="dark"] img.logo-img { content: url("lp-logo-dark.png"); }
