/* ==========================================================================
   MyPayFrame Panel - Metronic v9 (Tailwind demo1 / public-profile) teması
   Renk tokenları, ölçüler ve bileşen görünümleri referans siteden alındı.
   Açık (varsayılan) ve Koyu tema: <html data-theme="light|dark">
   ========================================================================== */

/* ---------- Tokenlar: AÇIK ---------- */
:root {
  --background: #ffffff;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-foreground: #ffffff;
  --primary-soft: #eff6ff;
  --primary-soft-fg: #1d4ed8;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --accent: #f4f4f5;
  --accent-foreground: #18181b;
  --destructive: #dc2626;
  --destructive-hover: #b91c1c;
  --destructive-soft: #fef2f2;
  --destructive-fg: #b91c1c;
  --success: #22c55e;
  --success-soft: #f0fdf4;
  --success-fg: #15803d;
  --warning: #facc15;
  --warning-soft: #fefce8;
  --warning-fg: #a16207;
  --info: #8b5cf6;
  --info-soft: #f5f3ff;
  --info-fg: #6d28d9;
  --mono: #09090b;
  --mono-foreground: #ffffff;
  --border: #ececef;
  --input: #e4e4e7;
  --ring: #a1a1aa;
  --focus-ring: rgba(59, 130, 246, .25);
  --overlay: rgba(9, 9, 11, .35);
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, .05);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, .18);
  --radius: 8px;
  --radius-card: 12px;
  --ctl-h: 36px; /* tüm kontrol yüksekliği: input, select, buton */
  --sidebar-w: 280px;
  --header-h: 60px;
  --nav-h: 64px;
  --toast-bg: #09090b;
  --toast-fg: #ffffff;
  --logo-bg: #3b82f6;
  color-scheme: light;
}

/* ---------- Tokenlar: KOYU ---------- */
[data-theme="dark"] {
  --background: #09090b;
  --foreground: #fafafa;
  --card: #09090b;
  --card-foreground: #fafafa;
  --primary: #2563eb;
  --primary-hover: #3b82f6;
  --primary-foreground: #ffffff;
  --primary-soft: rgba(37, 99, 235, .16);
  --primary-soft-fg: #60a5fa;
  --secondary: #27272a;
  --secondary-foreground: #fafafa;
  --muted: #18181b;
  --muted-foreground: #a1a1aa;
  --accent: #18181b;
  --accent-foreground: #fafafa;
  --destructive: #dc2626;
  --destructive-hover: #ef4444;
  --destructive-soft: rgba(220, 38, 38, .16);
  --destructive-fg: #f87171;
  --success-soft: rgba(34, 197, 94, .16);
  --success-fg: #4ade80;
  --warning-soft: rgba(250, 204, 21, .14);
  --warning-fg: #facc15;
  --info-soft: rgba(139, 92, 246, .18);
  --info-fg: #a78bfa;
  --mono: #d4d4d8;
  --mono-foreground: #09090b;
  --border: #27272a;
  --input: #27272a;
  --ring: #52525b;
  --focus-ring: rgba(37, 99, 235, .35);
  --overlay: rgba(0, 0, 0, .6);
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, .4);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, .7);
  --toast-bg: #fafafa;
  --toast-fg: #09090b;
  --logo-bg: #2563eb;
  color-scheme: dark;
}

/* ---------- Temel ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--background); }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--foreground);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { color: var(--foreground); font-weight: 600; }
h3 { font-size: 14px; }
small { font-size: .85em; }
svg { flex: 0 0 auto; }
.hidden { display: none !important; }
::selection { background: var(--primary-soft); }

/* ==========================================================================
   FORM KONTROLLERİ (input, select, textarea, date, checkbox, radio, file)
   ========================================================================== */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
select,
textarea {
  display: block; width: 100%; min-width: 0;
  height: var(--ctl-h); padding: 0 12px;
  background-color: var(--background);
  color: var(--foreground);
  border: 1px solid var(--input);
  border-radius: 6px;
  box-shadow: var(--shadow-xs);
  font: inherit; font-size: 13px; line-height: 1.25;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
  -webkit-appearance: none; appearance: none;
}
textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted-foreground); opacity: 1; }
input:hover:not(:disabled):not([readonly]), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--ring); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
input[readonly] { background-color: var(--muted); cursor: default; }
input:disabled, select:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; background-color: var(--muted); }

/* Select: özel ok işareti */
select {
  padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
select option { background: var(--background); color: var(--foreground); }
select:-moz-focusring { color: transparent; text-shadow: 0 0 0 var(--foreground); }

/* Tarih ve saat: ızgara hücresinde kırpılmadan, takvim ikonu görünür */
.field, .field-row > * { min-width: 0; }
input[type="date"] {
  width: 100%; min-width: 0; padding-left: 10px; padding-right: 6px;
  font-size: 13px; font-variant-numeric: tabular-nums; line-height: 1;
}
input[type="date"]::-webkit-date-and-time-value { text-align: left; min-width: 0; }
input[type="date"]::-webkit-calendar-picker-indicator {
  margin-left: 4px; width: 16px; height: 16px; padding: 0; opacity: .7; flex: 0 0 auto;
}

/* Tarih ve saat */
input[type="date"], input[type="datetime-local"], input[type="time"], input[type="month"] {
  padding-right: 10px; cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: .6; cursor: pointer; padding: 4px; border-radius: 4px;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; background: var(--muted); }
input[type="date"]::-webkit-datetime-edit { padding: 0; }

/* Sayı (spin düğmeleri gizli, sade görünüm) */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Arama */
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
input[type="search"] { padding-left: 36px; background-repeat: no-repeat; background-position: 12px center; }

/* Checkbox */
input[type="checkbox"] {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; margin: 0; flex: 0 0 auto;
  border: 1px solid var(--input); border-radius: 4px;
  background-color: var(--background); cursor: pointer;
  display: inline-grid; place-content: center;
  transition: background-color .15s, border-color .15s;
}
input[type="checkbox"]:checked {
  background-color: var(--primary); border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  background-size: 11px; background-position: center; background-repeat: no-repeat;
}
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
input[type="checkbox"]:disabled { opacity: .5; cursor: not-allowed; }

/* Radio */
input[type="radio"] {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; margin: 0; flex: 0 0 auto;
  border: 1px solid var(--input); border-radius: 50%;
  background-color: var(--background); cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
input[type="radio"]:checked {
  border-color: var(--primary);
  background: radial-gradient(circle, var(--primary-foreground) 0 3px, transparent 3.5px) var(--primary);
}

/* Dosya */
input[type="file"] {
  display: block; width: 100%; font-size: 13px; color: var(--muted-foreground); cursor: pointer;
}
input[type="file"]::file-selector-button {
  height: 32px; margin-right: 12px; padding: 0 12px;
  border: 1px solid var(--input); border-radius: 6px;
  background: var(--background); color: var(--foreground); font: inherit; font-weight: 500; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--accent); }

/* Etiket ve alan yapısı */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label, .field > span.lbl { font-size: 13px; font-weight: 500; color: var(--foreground); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; }
.field-hint { font-size: 12px; color: var(--muted-foreground); }
.form-error {
  color: var(--destructive-fg); font-size: 13px; background: var(--destructive-soft);
  padding: 9px 12px; border-radius: 6px; margin: 2px 0 10px; border: 1px solid transparent;
}

/* Radyo ve onay kutusu satırları (pencerelerde) */
.radio {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 8px;
  background: var(--background); border: 1px solid var(--input);
  margin-bottom: 8px; cursor: pointer; color: var(--foreground); font-weight: 500;
  transition: border-color .15s, background-color .15s;
}
.radio:hover { border-color: var(--ring); }
.radio:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-foreground); margin-top: 4px; cursor: pointer; }

/* ==========================================================================
   BUTONLAR
   ========================================================================== */
.btn {
  height: var(--ctl-h); padding: 0 14px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap;
  border: 1px solid transparent; box-shadow: var(--shadow-xs);
  transition: background-color .15s, color .15s, border-color .15s, transform .08s, opacity .15s;
}
.btn svg, .btn .ico { width: 16px; height: 16px; flex: 0 0 auto; }
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.btn.primary { background: var(--primary); color: var(--primary-foreground); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.ok { background: var(--success); color: #fff; }
.btn.ok:hover { background: #16a34a; }
.btn.warn { background: var(--warning); color: #09090b; }
.btn.warn:hover { background: #eab308; }
.btn.danger { background: var(--destructive-soft); color: var(--destructive-fg); }
.btn.danger:hover { background: var(--destructive); color: #fff; }
.btn.ghost { background: var(--background); color: var(--secondary-foreground); border-color: var(--input); }
.btn.ghost:hover { background: var(--accent); color: var(--accent-foreground); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.btn-small {
  height: var(--ctl-h); padding: 0 14px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12.5px; font-weight: 500; line-height: 1; white-space: nowrap;
  background: var(--primary); color: var(--primary-foreground); border: 1px solid transparent;
  box-shadow: var(--shadow-xs); transition: background-color .15s, color .15s;
}
.btn-small svg, .btn-small .ico { width: 14px; height: 14px; flex: 0 0 auto; }
.btn-small:hover { background: var(--primary-hover); }
.btn-small:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.btn-small.ghost { background: var(--background); color: var(--secondary-foreground); border-color: var(--input); }
.btn-small.ghost:hover { background: var(--accent); }
.btn-small.ok { background: var(--success); color: #fff; }
.btn-small.ok:hover { background: #16a34a; }
.btn-small.danger { background: var(--destructive-soft); color: var(--destructive-fg); }
.btn-small.danger:hover { background: var(--destructive); color: #fff; }
.btn-small.icon-only { width: var(--ctl-h); padding: 0; }
.btn-small.fold-btn { height: 28px; padding: 0 10px; font-size: 12px; }

.icon-btn {
  width: var(--ctl-h); height: var(--ctl-h); border-radius: 6px;
  background: var(--background); color: var(--secondary-foreground);
  border: 1px solid var(--input); box-shadow: var(--shadow-xs);
  display: grid; place-items: center; transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--accent); color: var(--accent-foreground); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions.two, .actions.four { grid-template-columns: 1fr 1fr; }
.actions.three { grid-template-columns: 1fr 1fr 1fr; }
.actions.one { grid-template-columns: 1fr; }
.actions .btn { padding: 0 10px; font-size: 13px; }
.actions .btn svg, .actions .btn .ico { width: 15px; height: 15px; }

/* ==========================================================================
   KABUK: sidebar, header, içerik
   ========================================================================== */
.app { position: relative; height: 100%; display: flex; flex-direction: column; background: var(--background); }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  background: var(--background); border-bottom: 1px solid var(--border);
}
.page-head { min-width: 0; }
.crumbs { display: none; font-size: 13px; color: var(--muted-foreground); align-items: center; }
.crumbs span { margin: 0 6px; }
.crumbs b { color: var(--secondary-foreground); font-weight: 500; }
.topbar-title { font-size: 16px; font-weight: 600; color: var(--foreground); line-height: 1.25; }
.topbar-sub { font-size: 12.5px; color: var(--muted-foreground); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.user-chip { display: flex; align-items: center; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-soft-fg);
  display: grid; place-items: center; font-weight: 600; font-size: 14px;
  border: 1px solid var(--border);
}

.content {
  flex: 1; overflow-y: auto;
  padding: 14px 14px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}
.view { display: flex; flex-direction: column; gap: 14px; width: 100%; }

/* Alt menü (mobil) */
.bottom-nav {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 15;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--background); border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(5, 1fr);
  box-shadow: var(--shadow-xs);
}
.brand, .nav-label { display: none; }
/* Mobil alt menüde açılır grup yok: grup öğeleri doğrudan grid hücresi olur */
.nav-group { display: contents; }
.nav-sub { display: none; }
/* Açılır ok yalnızca masaüstü sidebar'da görünür; mobilde simgeyi yukarı itmemesi için gizlenir */
.nav-caret { display: none; }
.nav-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted-foreground); font-size: 11px; font-weight: 500;
  transition: color .15s, background-color .15s;
}
.nav-item.active { color: var(--primary); font-weight: 600; }
.nav-ico {
  width: 36px; height: 26px; border-radius: 6px;
  display: grid; place-items: center; transition: background-color .15s;
}
.nav-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active .nav-ico { background: var(--primary-soft); }
.nav-item.active::before {
  content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 2px;
  border-radius: 0 0 2px 2px; background: var(--primary);
}
.nav-dot {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: var(--destructive); color: #fff;
  font-size: 10px; font-style: normal; font-weight: 600;
  display: grid; place-items: center;
}
.nav-dot:empty, .nav-dot[data-zero="1"] { display: none; }

/* ==========================================================================
   KART (Metronic kt-card)
   ========================================================================== */
.card {
  position: relative; min-width: 0;
  background: var(--card); color: var(--card-foreground);
  border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card-name { font-weight: 600; font-size: 14px; color: var(--foreground); }
.card-meta { font-size: 12.5px; color: var(--muted-foreground); margin-top: 2px; }
.card-meta.mono { font-size: 12px; }
.card-title-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.amount { font-size: 15px; font-weight: 600; color: var(--foreground); white-space: nowrap; }
.amount small { font-size: 11.5px; color: var(--muted-foreground); font-weight: 500; margin-left: 2px; }

.ico-tile {
  width: 36px; height: 36px; border-radius: 8px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-soft-fg);
}
.ico-tile .ico { width: 17px; height: 17px; }
.ico-tile.in { background: var(--success-soft); color: var(--success-fg); }
.ico-tile.out { background: var(--primary-soft); color: var(--primary-soft-fg); }
.ico-tile.fast { background: var(--warning-soft); color: var(--warning-fg); }
.ico-tile.havale { background: var(--secondary); color: var(--muted-foreground); }
.ico-tile.rep-red { background: var(--destructive-soft); color: var(--destructive-fg); }
.ico-tile.rep-yellow { background: var(--warning-soft); color: var(--warning-fg); }

/* Rozet (Metronic kt-badge) */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
  background: var(--secondary); color: var(--secondary-foreground);
}
.badge.ok { background: var(--success-soft); color: var(--success-fg); }
.badge.warn { background: var(--warning-soft); color: var(--warning-fg); }
.badge.danger { background: var(--destructive-soft); color: var(--destructive-fg); }
.badge.info { background: var(--primary-soft); color: var(--primary-soft-fg); }
.badge .ico, .badge svg { width: 12px; height: 12px; flex: 0 0 auto; }

/* Yatırım kartı: kompakt */
.card.card-dep { padding: 14px 16px; gap: 10px; }
.card.card-dup { border-color: var(--warning); box-shadow: 0 0 0 1px var(--warning) inset; }
/* Destek talepleri (ticket) */
.tk-head { margin-top: 10px; }
.tk-titlebox { display: flex; flex-direction: column; min-width: 0; }
.tk-title { overflow-wrap: anywhere; }
.tk-card.is-closed .tk-title { color: var(--muted-foreground); }
.tk-body { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; }
.tk-thread { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.tk-msg { background: var(--muted); border-radius: 8px; padding: 8px 10px; }
.tk-msg-meta { font-size: 11.5px; color: var(--muted-foreground); margin-bottom: 2px; }
.tk-msg-text { font-size: 13px; color: var(--foreground); white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-nomsg { font-size: 12.5px; color: var(--muted-foreground); padding: 4px 0; }
.tk-msg.is-system { background: transparent; border: 1px dashed var(--border); }
.tk-msg.is-system .tk-msg-text { color: var(--muted-foreground); font-style: italic; }
.tk-reply { display: flex; gap: 8px; align-items: flex-end; }
.tk-reply .tk-input { flex: 1; min-width: 0; min-height: 60px; }
.tk-reply .btn { height: var(--ctl-h); }
.tk-foot { display: flex; justify-content: flex-end; }
.tk-note { font-size: 13px; color: var(--foreground); background: var(--muted); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Kart genişletme (chevron) ve detay bölümü */
.dep-expand { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 8px; }
.dep-expand svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.card-dep.is-open .dep-expand svg { transform: rotate(180deg); }
.dep-more { display: flex; flex-direction: column; border-top: 1px solid var(--border); padding-top: 6px; }
.dep-more .dep-line:last-child { border-bottom: 0; }
.amt-edit { width: 26px; height: 26px; border-radius: 6px; margin-left: 2px; }
.amt-edit svg { width: 13px; height: 13px; }
.dep-amt { gap: 6px; }
.badge-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.card-dep .card-title-row { gap: 10px; }
.card-dep .ico-tile { width: 32px; height: 32px; border-radius: 7px; }
.card-dep .ico-tile .ico { width: 15px; height: 15px; }
.card-dep .card-name { font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; }
.card-dep .badge { height: 20px; padding: 0 7px; font-size: 11px; }
.card-dep .actions { gap: 8px; }
.card-dep .actions .btn { font-size: 12.5px; }
.card-dep .actions .btn svg, .card-dep .actions .btn .ico { width: 13px; height: 13px; }
.card-dep .actions.three .btn { font-size: 12px; padding: 0 6px; gap: 4px; }

.dep-compact { display: flex; flex-direction: column; }
.dep-line {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 12.5px; padding: 7px 0; border-bottom: 1px dashed var(--border);
}
.dep-line:last-child { border-bottom: 0; }
.dep-line > span:first-child { color: var(--muted-foreground); flex: 0 0 auto; }
.dep-line b { font-weight: 500; color: var(--foreground); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.dep-line .mono { text-align: right; font-size: 12px; word-break: break-all; }
.dep-timer { display: inline-flex; align-items: center; gap: 8px; }
.dep-timer b { font-size: 12px; font-weight: 600; }
.dep-bar { width: 84px; height: 4px; border-radius: 4px; background: var(--secondary); overflow: hidden; }
.dep-bar i { display: block; height: 100%; border-radius: 4px; background: var(--success); transition: width .6s linear; }
.dep-bar.warn i { background: var(--warning); }
.dep-bar.danger i { background: var(--destructive); }
.dep-expired { color: var(--destructive-fg); font-weight: 600; }
.dep-iban { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.dep-amt { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; color: var(--foreground); }

.timer-bar { height: 4px; background: var(--secondary); border-radius: 4px; overflow: hidden; }
.timer-bar > span { display: block; height: 100%; background: var(--success); transition: width .6s linear; }
.timer-bar.warn > span { background: var(--warning); }
.timer-bar.danger > span { background: var(--destructive); }

/* İş kuyruğu satırları */
.job-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; }
.job-row + .job-row { border-top: 1px solid var(--border); }
.job-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.job-error { font-size: 12px; color: var(--destructive-fg); }
.bank-name { font-size: 13px; font-weight: 600; color: var(--foreground); }
.bank-count { font-size: 12px; color: var(--muted-foreground); font-weight: 500; margin-left: 4px; }

/* Hesap satırları (banka listesi) */
.bank-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.bank-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; background: var(--card); }
.bank-row + .bank-row { border-top: 1px solid var(--border); }
.bank-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bank-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* Açılır hesap kartı (FAST / HAVALE) */
.acc-fold { padding: 0; overflow: hidden; }
.fold-head { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fold-head::-webkit-details-marker { display: none; }
.fold-head:hover { background: var(--accent); }
.fold-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fold-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 0 auto; }
.fold-head::after {
  content: ''; width: 7px; height: 7px; margin: 8px 4px 0 0; flex: 0 0 auto;
  border-right: 1.5px solid var(--muted-foreground); border-bottom: 1.5px solid var(--muted-foreground);
  transform: rotate(45deg); transition: transform .2s;
}
.acc-fold[open] .fold-head::after { transform: rotate(-135deg); margin-top: 12px; }
.fold-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--border); }

/* Liste ve boş durum */
.list { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.list > * { width: 100%; }
.empty { text-align: center; color: var(--muted-foreground); padding: 32px 0; font-size: 13px; }
.loading { text-align: center; color: var(--muted-foreground); padding: 32px 0; font-size: 13px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 13px; }
.kv dt { color: var(--muted-foreground); }
.kv dd { text-align: right; color: var(--foreground); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv dd.mono { white-space: normal; word-break: break-all; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .2px; }
.id-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--foreground);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle;
}
.copy-btn {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 6px;
  vertical-align: middle; border-radius: 6px; background: var(--background); color: var(--muted-foreground);
  border: 1px solid var(--input); transition: background-color .15s, color .15s;
}
.copy-btn:hover { background: var(--accent); color: var(--foreground); }
.copy-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rc-link { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-size: 12.5px; font-weight: 500; text-decoration: none; }
.rc-link:hover { text-decoration: underline; }

/* Arama satırı: ID alanı daraltılmış, Sorgula ve Filtre aynı satırda, aynı yükseklikte */
.search-bar { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; width: 100%; margin: 0; }
.search-input { flex: 1 1 auto; width: auto; min-width: 0; }
.search-bar .btn-small, .search-bar .flt-btn { flex: 0 0 auto; }
.search-bar > input, .search-bar > .btn-small, .search-bar > .flt-btn {
  height: var(--ctl-h); min-height: var(--ctl-h); max-height: var(--ctl-h); line-height: 1;
}
.search-bar .toolbar-info { margin-left: auto; white-space: nowrap; }
.auto-toggle {
  height: var(--ctl-h); display: inline-flex; align-items: center; gap: 8px; padding: 0 4px;
  font-size: 13px; font-weight: 500; color: var(--foreground); white-space: nowrap; cursor: pointer; user-select: none;
}
.lookup-head-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* Sekmeler (Bekleyenler / Reddedilenler): belirgin dolgulu segment kontrolü */
/* Sekmeler: sayı odaklı. Her sekmede büyük sayı ve üstte etiket; aktif sekme koyu zeminde ters renkli. */
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px;
  width: 100%; padding: 0; background: transparent; border: 0;
}
.seg-btn {
  position: relative; min-width: 0; min-height: 84px; padding: 12px 14px 14px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 8px;
  text-align: left; background: var(--muted); color: var(--muted-foreground);
  border: 0; box-shadow: none;
  transition: background-color .18s, color .18s, transform .08s;
  -webkit-tap-highlight-color: transparent; overflow: hidden;
}
.seg-btn:hover { background: var(--accent); color: var(--foreground); }
.seg-btn:active { transform: scale(.985); }
.seg-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
/* İkon sağ üstte, küçük ve silik */
.seg-ico { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; display: block; color: currentColor; opacity: .55; }
.seg-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.seg-txt { font-size: 12.5px; font-weight: 500; line-height: 1.2; color: inherit; min-width: 0; overflow-wrap: anywhere; padding-right: 22px; }
/* Sayı: büyük ve kalın, etiketin altında */
.seg-btn i {
  font-style: normal; font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -.5px;
  color: var(--foreground); font-variant-numeric: tabular-nums;
}
.seg-btn.active {
  background: var(--foreground); color: var(--background);
}
.seg-btn.active:hover { background: var(--foreground); color: var(--background); }
.seg-btn.active .seg-ico { opacity: .8; }
.seg-btn.active i { color: var(--background); }
.seg-btn.active::after {
  content: ''; position: absolute; left: 14px; bottom: 10px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
}

@media (max-width: 991.98px) {
  .seg { gap: 6px; }
  .seg-btn { min-height: 74px; padding: 10px 10px 12px; border-radius: 12px; }
  .seg-ico { top: 10px; right: 10px; }
  .seg-txt { font-size: 11.5px; padding-right: 18px; }
  .seg-btn i { font-size: 22px; }
  .seg-btn.active::after { left: 10px; bottom: 8px; }
}

/* Filtre çubuğu */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.flt-btn { padding: 0 12px; font-size: 13px; }
.flt-btn .ico, .flt-btn svg { width: 15px; height: 15px; }
.flt-btn.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.flt-count {
  min-width: 19px; height: 19px; padding: 0 6px; border-radius: 5px;
  background: var(--primary); color: var(--primary-foreground); font-size: 11px; font-weight: 600;
  display: inline-grid; place-items: center;
}
.toolbar-info { font-size: 12.5px; color: var(--muted-foreground); }

/* Chip (hızlı cevap) */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; height: 30px; padding: 0 12px; border-radius: 6px;
  background: var(--background); border: 1px solid var(--input); font-size: 12.5px; color: var(--secondary-foreground);
  transition: background-color .15s, color .15s, border-color .15s;
}
.chip:hover { background: var(--accent); }
.chip.active, .chip.quick-reply.active { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.quick-chips { flex-wrap: wrap; overflow: visible; }

/* ==========================================================================
   BAKİYE / İSTATİSTİK
   ========================================================================== */
.balance-card {
  border-radius: var(--radius-card); padding: 20px;
  background: var(--primary); color: var(--primary-foreground);
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow-md);
}
.balance-card .stat-label { color: rgba(255, 255, 255, .82); font-size: 12.5px; }
.balance-value { font-size: 26px; font-weight: 600; letter-spacing: -.3px; color: #fff; }
.balance-value small { font-size: 13px; font-weight: 500; opacity: .85; margin-left: 2px; }
.balance-meta { font-size: 12px; color: rgba(255, 255, 255, .82); }
.balance-card.balance-mini {
  flex-direction: column; align-items: stretch; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: 8px; box-shadow: var(--shadow-xs);
}
.bm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.balance-card.balance-mini .stat-label { font-size: 12.5px; }
.balance-card.balance-mini .balance-value { font-size: 17px; font-weight: 600; white-space: nowrap; }

.summary-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-xs);
}
.stat-label { font-size: 12.5px; color: var(--muted-foreground); }
.stat-value { font-size: 20px; font-weight: 600; color: var(--foreground); }
.stat-value.ok { color: var(--success-fg); }
.stat-sub { font-size: 12px; color: var(--muted-foreground); }

.subpage-bar { display: flex; align-items: center; gap: 12px; }
.subpage-bar .btn { height: 32px; padding: 0 10px; }
.subpage-title { font-size: 15px; font-weight: 600; color: var(--foreground); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; }
.section-head h3 { font-size: 14px; }

/* ==========================================================================
   AYARLAR MENÜSÜ
   ========================================================================== */
.menu { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-xs); }
.menu-item {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; color: var(--foreground);
  transition: background-color .15s;
}
.menu-item:hover { background: var(--accent); }
.menu-item:last-child { border-bottom: 0; }
.menu-item.danger { color: var(--destructive-fg); }
.chev { color: var(--muted-foreground); font-size: 18px; line-height: 1; }
.mi-left { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 13px; }
.mi-ico {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary-soft); display: grid; place-items: center; color: var(--primary-soft-fg);
}
.menu-item.danger .mi-ico { color: var(--destructive-fg); background: var(--destructive-soft); }
.mi-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   RAPOR
   ========================================================================== */
.report-bar { display: flex; align-items: center; gap: 10px; }
.report-bar input[type="date"] { flex: 1; height: 36px; }
.report-bar .btn-small { height: 36px; padding: 0 14px; }
.report-card { gap: 14px; }
.rep-head { display: flex; justify-content: space-between; align-items: center; }
.rep-title { font-size: 14px; font-weight: 600; color: var(--foreground); }
.rep-date { font-size: 12px; font-weight: 500; color: var(--primary-soft-fg); background: var(--primary-soft); padding: 4px 9px; border-radius: 6px; }
.rep-list { display: flex; flex-direction: column; }
.rep-row { display: flex; flex-direction: column; gap: 9px; padding: 13px 0; }
.rep-row + .rep-row { border-top: 1px solid var(--border); }
.rep-row-top { display: flex; align-items: center; gap: 12px; }
.rep-row-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rep-row-label { font-size: 13px; font-weight: 600; color: var(--foreground); }
.rep-row-count { font-size: 12px; color: var(--muted-foreground); }
.rep-row-amt { font-size: 14px; font-weight: 600; color: var(--foreground); white-space: nowrap; }
.rep-row-amt small { font-size: 11px; color: var(--muted-foreground); font-weight: 500; }
.rep-bar { height: 6px; background: var(--secondary); border-radius: 4px; overflow: hidden; }
.rep-bar span { display: block; height: 100%; border-radius: 4px; transition: width .4s ease; }
.rep-bar .in { background: var(--success); }
.rep-bar .out { background: var(--destructive); }
.rep-bar .cancel { background: var(--warning); }
.rep-foot { padding: 14px 16px; border-radius: 8px; display: flex; flex-direction: column; gap: 8px; background: var(--success-soft); }
.rep-foot-main { display: flex; justify-content: space-between; align-items: center; }
.rep-foot-label { font-size: 12.5px; color: var(--secondary-foreground); font-weight: 500; }
.rep-foot-value { font-size: 19px; font-weight: 600; color: var(--success-fg); }
.rep-foot-sub { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted-foreground); }
.rep-foot-sub span:last-child { color: var(--foreground); font-weight: 500; }

/* ==========================================================================
   PENCERE (modal / sheet)
   ========================================================================== */
.sheet-backdrop {
  position: absolute; inset: 0; z-index: 20;
  background: var(--overlay); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .15s ease;
}
.sheet {
  width: 100%; max-height: 92%; overflow-y: auto;
  background: var(--card); color: var(--card-foreground);
  border: 1px solid var(--border); border-radius: 12px 12px 0 0;
  padding: 8px 0 0;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-md);
  animation: slide .2s ease;
}
.sheet-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--input); align-self: center; margin-bottom: 6px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.sheet-head h3 { font-size: 15px; font-weight: 600; }
.sheet-close { width: 30px; height: 30px; border-radius: 6px; }
.sheet-close svg { width: 15px; height: 15px; }
.sheet-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; }
.sheet-text { color: var(--muted-foreground); font-size: 13px; margin-bottom: 4px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid var(--border); }
.sheet-actions .btn { height: 36px; }
.detail-kv { font-size: 13px; }
.detail-kv dd { white-space: normal; }
.detail-kv dd.mono { word-break: break-all; }
.detail-actions { margin-top: 8px; }

/* Dosya bırakma alanı */
.file-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer;
  padding: 24px 16px; border-radius: 8px; text-align: center;
  background: var(--muted); border: 1px dashed var(--ring);
  transition: background-color .15s, border-color .15s;
}
.file-drop:hover { background: var(--primary-soft); border-color: var(--primary); }
.file-drop-ico {
  width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-soft-fg); margin-bottom: 4px;
}
.file-drop-title { font-size: 13px; font-weight: 600; color: var(--foreground); word-break: break-all; }
.file-drop-sub { font-size: 12px; color: var(--muted-foreground); }

/* Banka seçici (açılır panel) */
.bank-pick { position: relative; }
.bank-pick-btn {
  width: 100%; height: 36px; padding: 0 12px; border-radius: 6px;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--background); border: 1px solid var(--input); color: var(--foreground); font-weight: 500; text-align: left;
  box-shadow: var(--shadow-xs);
}
.bank-pick-btn:hover { border-color: var(--ring); }
.bank-pick-btn span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-pick-chev { color: var(--muted-foreground); display: inline-flex; flex: 0 0 auto; margin-left: 8px; }
.bank-pick-panel {
  margin-top: 6px; padding: 8px; border-radius: 8px; background: var(--card); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-md);
}
.bank-search-wrap { position: relative; }
.bank-search-wrap svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; fill: none; stroke: var(--muted-foreground); stroke-width: 2.2; stroke-linecap: round; pointer-events: none;
}
.bank-search { height: 34px; padding-left: 32px; }
.bank-pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; }
.bank-opt { text-align: left; padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--secondary-foreground); }
.bank-opt:hover { background: var(--accent); }
.bank-opt.active { background: var(--primary-soft); color: var(--primary-soft-fg); font-weight: 600; }
.bank-opt.hidden { display: none; }

/* Arama/filtre penceresi: iki sütunlu alanlar */
.sheet-body .field { margin-bottom: 0; }

/* ==========================================================================
   GİRİŞ EKRANI
   ========================================================================== */
.app.locked .topbar, .app.locked .content, .app.locked .bottom-nav { display: none; }
.login { flex: 1; display: none; align-items: center; justify-content: center; padding: 24px; background: var(--muted); }
.app.locked .login { display: flex; }
.login-card {
  width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 32px 30px;
  box-shadow: var(--shadow-md);
}
.login-logo {
  width: 48px; height: 48px; border-radius: 10px; margin-bottom: 8px;
  background: var(--logo-bg); display: grid; place-items: center;
}
.login-logo svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login h1 { font-size: 20px; font-weight: 600; }
.login-sub { color: var(--muted-foreground); font-size: 13px; margin-bottom: 10px; }
.login form { display: flex; flex-direction: column; gap: 4px; }
.login .btn.primary { height: 40px; margin-top: 6px; }
.login .field { margin-bottom: 14px; }

.loading-inline { color: var(--muted-foreground); }

/* ==========================================================================
   AYARLAR: anahtar (switch), kural kartları
   ========================================================================== */
input[type="checkbox"].switch {
  -webkit-appearance: none; appearance: none;
  width: 36px; height: 20px; min-height: 20px; max-height: 20px; margin: 0; padding: 0; flex: 0 0 auto;
  border: 0; border-radius: 999px; box-shadow: none;
  background-color: var(--input);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='%23ffffff'/%3E%3C/svg%3E");
  background-size: 16px 16px; background-repeat: no-repeat; background-position: left 2px center;
  cursor: pointer; transition: background-color .2s, background-position .2s;
}
input[type="checkbox"].switch:checked { background-color: var(--primary); background-position: right 2px center; }
input[type="checkbox"].switch:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
input[type="checkbox"].switch:disabled { opacity: .5; cursor: not-allowed; }
.switch-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 0; border-bottom: 1px dashed var(--border); cursor: pointer;
}
.switch-row:last-of-type { border-bottom: 0; }
.switch-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch-text b { font-weight: 500; color: var(--foreground); }
.switch-text small { color: var(--muted-foreground); font-size: 12px; }
.ar-grid { display: grid; grid-template-columns: 1fr; gap: 14px; width: 100%; }

/* Ayarlar: dikey sekmeler + panel */
.settings-layout { display: flex; flex-direction: column; gap: 14px; width: 100%; min-width: 0; }
.vtabs { display: flex; flex-direction: column; gap: 4px; }
.vtab {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px;
  padding: 10px 12px; border-radius: 8px; text-align: left; color: var(--muted-foreground);
  font-size: 13.5px; font-weight: 500; transition: background-color .15s, color .15s;
}
.vtab:hover { background: var(--accent); color: var(--foreground); }
.vtab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.vtab-ico {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--secondary); color: var(--muted-foreground); flex: 0 0 auto;
}
.vtab-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vtab-txt { min-width: 0; }
.vtab.active { background: var(--primary-soft); color: var(--primary-soft-fg); font-weight: 600; }
.vtab.active .vtab-ico { background: var(--primary); color: #fff; }
.vtab.active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary);
}
.settings-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; width: 100%; }

/* Kullanıcı kartları (yönetici) */
.user-card.is-inactive { opacity: .72; }
.user-card .user-active { border-bottom: 0; padding: 2px 0; }
.user-card .field-row { margin-bottom: 0; }

/* ==========================================================================
   YÖNETİM PANELİ (/admin): ayrı giriş ve kullanıcı yönetimi sayfası
   ========================================================================== */
.admin-body { height: auto; min-height: 100%; overflow: auto; background: var(--muted); }
.admin-app { position: relative; min-height: 100vh; }
.admin-app > .sheet-backdrop { position: fixed; }
.admin-app > .toast { position: fixed; }
.admin-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.admin-login .login-card { position: relative; }
.admin-home { display: block; margin-top: 14px; text-align: center; font-size: 13px; color: var(--primary); font-weight: 500; }
.admin-main { max-width: 980px; margin: 0 auto; padding: 24px 18px 48px; display: flex; flex-direction: column; gap: 16px; }
.admin-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; box-shadow: var(--shadow-xs);
}
.admin-title h1 { font-size: 18px; font-weight: 600; margin-top: 2px; }
.admin-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-actions .btn { height: 36px; }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-main .list { gap: 12px; }

/* Dekont / görsel görüntüleyici (uygulama içinde) */
button.rc-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.doc-frame { width: 100%; height: 68vh; border: 1px solid var(--border); border-radius: 8px; background: var(--muted); }
.doc-img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 8px; }

/* Rapor: son işlem bağlantıları (alt sayfaya gider) */
.rec-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rec-link {
  flex-direction: row; align-items: center; justify-content: space-between; width: 100%;
  padding: 18px 16px; text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.rec-link:hover { border-color: var(--primary); background: var(--primary-soft); }
.rec-link .chev { font-size: 22px; color: var(--muted-foreground); line-height: 1; }

/* Sağ üst hesap menüsü (avatar açılır menüsü) */
.user-wrap { position: relative; }
.user-chip { display: inline-flex; border-radius: 50%; cursor: pointer; }
.user-chip:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  width: 260px; max-width: calc(100vw - 24px);
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-md); overflow: hidden;
}
.user-menu .menu-item { border-bottom: 1px solid var(--border); padding: 11px 14px; }
.user-menu .menu-item:last-child { border-bottom: 0; }
.user-menu .badge { flex: 0 0 auto; }

/* Yönetim: grup kartları, grup içi üyeler */
.group-card { gap: 16px; }
.group-section { display: flex; flex-direction: column; gap: 10px; }
.group-section .section-head { margin-top: 0; }
.group-section h3 { font-size: 14px; }
.member-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.member-row { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--card); }
.member-row + .member-row { border-top: 1px solid var(--border); }
.member-row.is-inactive { opacity: .72; }
.member-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.member-row .field-row { margin-bottom: 0; }
.member-row .user-active { border-bottom: 0; padding: 2px 0; }
.group-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 14px; }

/* Şifre alanı + "Oto oluştur" düğmesi */
.pw-row { display: flex; align-items: center; gap: 8px; }
.pw-row input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .3px; }
.pw-row .btn-small { flex: 0 0 auto; height: var(--ctl-h); white-space: nowrap; }

/* Salt okunur rol: işlem düğmeleri ve işlem alanları gizlenir (görüntüleme kalır) */
body[data-role="viewer"] [data-act]:not([data-act$="expand"]) { display: none !important; }
body[data-role="viewer"] .tk-reply,
body[data-role="viewer"] #depAutoLabel,
body[data-role="viewer"] #withdrawBtn,
body[data-role="viewer"] #quickWithdrawBtn,
body[data-role="viewer"] #addAccountBtn { display: none !important; }
@media (min-width: 992px) {
  .settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
  .vtabs { position: sticky; top: 16px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); box-shadow: var(--shadow-xs); }
}
.rule-card { transition: opacity .2s; }
.rule-card.off { opacity: .6; }
.rule-card .card-head { align-items: center; }
.job-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: 0 0 auto; }

/* Bildirim */
.toast {
  position: absolute; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 12px);
  transform: translateX(-50%);
  background: var(--toast-bg); color: var(--toast-fg);
  padding: 10px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 500; box-shadow: var(--shadow-md);
  z-index: 30; white-space: normal; text-align: center; line-height: 1.4;
  width: max-content; max-width: calc(100% - 32px); animation: fade .2s ease;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide { from { transform: translateY(20px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ==========================================================================
   MOBİL DAHA DOKUNMATİK ÖLÇÜLER (< 992px)
   ========================================================================== */
@media (max-width: 991.98px) {
  :root { --ctl-h: 40px; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]), select { font-size: 14px; }
  .btn, .btn-small { font-size: 13.5px; }
  .search-input { flex: 1 1 160px; width: auto; }
  .search-bar .toolbar-info { width: 100%; margin-left: 0; }
  .card-dep .actions .btn { font-size: 13px; }
}

/* ==========================================================================
   MASAÜSTÜ (992px ve üzeri): sol sidebar (280px) + 60px header
   ========================================================================== */
@media (min-width: 992px) {
  .app {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    grid-template-rows: var(--header-h) minmax(0, 1fr);
  }
  .app > .login { grid-column: 1 / -1; grid-row: 1 / -1; }

  /* Sidebar */
  .bottom-nav {
    position: static; grid-column: 1; grid-row: 1 / -1;
    height: auto; padding: 0; box-shadow: none;
    display: flex; flex-direction: column; gap: 2px;
    background: var(--background); border-top: 0; border-right: 1px solid var(--border);
    overflow-y: auto;
  }
  .brand {
    display: flex; align-items: center; gap: 10px;
    height: var(--header-h); padding: 0 20px; border-bottom: 1px solid var(--border); flex: 0 0 auto;
  }
  .brand-logo {
    width: 32px; height: 32px; border-radius: 8px; background: var(--logo-bg);
    display: grid; place-items: center;
  }
  .brand-logo svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .brand-name { font-size: 15px; font-weight: 600; color: var(--foreground); }
  .nav-label {
    display: block; padding: 18px 22px 6px; font-size: 11.5px; font-weight: 500;
    color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .4px;
  }
  .bottom-nav > .nav-item, .nav-group > .nav-item {
    flex-direction: row; justify-content: flex-start; gap: 10px;
    position: relative; margin: 0 12px; padding: 0 10px; height: 36px; border-radius: 8px;
    font-size: 13px; font-weight: 500; color: var(--foreground); width: calc(100% - 24px);
  }
  .bottom-nav > .nav-item:hover, .nav-group > .nav-item:hover { background: var(--accent); }
  .bottom-nav > .nav-item.active, .nav-group > .nav-item.active { background: var(--accent); color: var(--primary); font-weight: 600; }
  .bottom-nav > .nav-item::before, .nav-group > .nav-item::before { display: none; }

  /* Ayarlar açılır menüsü (sidebar) */
  .nav-group { display: flex; flex-direction: column; gap: 2px; }
  .nav-group > .nav-item .nav-caret {
    display: inline-grid; place-items: center; margin-left: auto; width: 16px; height: 16px; color: var(--muted-foreground);
  }
  .nav-caret svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
  .nav-group.open > .nav-item .nav-caret svg { transform: rotate(180deg); }
  .nav-sub { display: none; flex-direction: column; gap: 2px; margin: 0 12px; padding: 2px 0 4px 34px; }
  .nav-group.open > .nav-sub { display: flex; }
  .nav-sub-item {
    height: 32px; padding: 0 10px; border-radius: 8px; text-align: left;
    font-size: 13px; font-weight: 500; color: var(--muted-foreground); transition: background-color .15s, color .15s;
  }
  .nav-sub-item:hover { background: var(--accent); color: var(--foreground); }
  .nav-sub-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
  /* Sayfa içi dikey sekmeler masaüstünde sidebar'a taşındı */
  .vtabs { display: none; }
  .settings-layout { display: block; }
  .nav-item .nav-ico { width: auto; height: auto; background: none !important; }
  .nav-item .nav-ico svg { width: 17px; height: 17px; }
  .nav-dot { position: static; margin-left: auto; min-width: 20px; height: 20px; border-radius: 5px; font-size: 11px; }
  .nav-text { flex: 1; text-align: left; }

  /* Header */
  .topbar {
    grid-column: 2; grid-row: 1; min-width: 0;
    padding: 0 28px; height: var(--header-h); border-bottom: 1px solid var(--border);
  }
  .crumbs { display: flex; margin-bottom: 1px; }
  .topbar-title { font-size: 17px; }
  .topbar-sub { font-size: 12.5px; }

  /* İçerik */
  .content { grid-column: 2; grid-row: 2; min-width: 0; padding: 24px 28px 40px; }
  .view { gap: 18px; }
  .summary-row { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .ar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 20px 22px; }
  .card.card-dep { padding: 16px 18px; }

  /* Pencere: ortada */
  .sheet-backdrop { align-items: center; padding: 20px; }
  .sheet { max-width: 480px; max-height: 88%; border-radius: 12px; }
  .sheet-handle { display: none; }
  .toast { top: 18px; left: auto; right: 28px; transform: none; }
}
