/* =============================================================
   VESTAPRIME CUSTOMER PANEL — DESIGN SYSTEM
   Premium light theme with optional dark mode
   ============================================================= */

/* ---------- 0. FONTS (SF Pro Display) ---------- */
@font-face {
  font-family: 'SF Pro Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/SF-Pro-Display-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'SF Pro Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/SF-Pro-Display-Medium.otf') format('opentype');
}
@font-face {
  font-family: 'SF Pro Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/SF-Pro-Display-Medium.otf') format('opentype');
}
@font-face {
  font-family: 'SF Pro Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/SF-Pro-Display-Bold.otf') format('opentype');
}
@font-face {
  font-family: 'SF Pro Display';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/SF-Pro-Display-Bold.otf') format('opentype');
}
@font-face {
  font-family: 'SF Pro Display';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/SF-Pro-Display-SemiBoldItalic.otf') format('opentype');
}
@font-face {
  font-family: 'SF Pro Display';
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/SF-Pro-Display-HeavyItalic.otf') format('opentype');
}

/* ---------- 1. TOKENS ---------- */
:root {
  /* Surfaces */
  --bg-app: #FAFAF7;
  --bg-surface: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --bg-subtle: #F5F4EF;
  --bg-hover: #F0EEE8;

  /* Text */
  --text-primary: #0E0F11;
  --text-secondary: #5B5F66;
  --text-tertiary: #9CA0A6;
  --text-on-accent: #FFFFFF;

  /* Borders */
  --border: #ECEAE4;
  --border-strong: #DAD7CF;
  --divider: #F1EFE9;

  /* Brand */
  --accent: #E87722;
  --accent-hover: #C45A0F;
  --accent-soft: #FFF1E5;
  --accent-ring: rgba(232,119,34,.18);
  --accent-grad: linear-gradient(135deg, #FF9148 0%, #E87722 45%, #C45A0F 100%);

  /* Status */
  --success: #2E7D5E;
  --success-soft: #E8F2EC;
  --warning: #B7791F;
  --warning-soft: #FFF6E5;
  --danger: #C0392B;
  --danger-soft: #FCEEEB;
  --info: #1F6FB8;
  --info-soft: #E8F0F8;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15,17,22,.04);
  --shadow-sm: 0 4px 12px rgba(15,17,22,.05);
  --shadow-md: 0 8px 24px rgba(15,17,22,.06);
  --shadow-lg: 0 16px 40px rgba(15,17,22,.08);
  --shadow-accent: 0 8px 20px rgba(232,119,34,.22);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Spacing */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px;
  --s-9: 56px; --s-10: 72px;

  /* Layout */
  --sidebar-w: 264px;
  --topbar-h: 72px;
  --content-max: 1440px;
  --page-pad: 32px;

  /* Topbar surface (translucent) */
  --topbar-bg: rgba(255,255,255,.78);
  --topbar-border: rgba(15,17,22,.06);

  /* Fonts */
  --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  --font-body: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  --font-mono: 'SF Mono', ui-monospace, 'SF Pro Display', Menlo, Monaco, Consolas, monospace;
}

[data-theme="dark"] {
  --bg-app: #0B0C0E;
  --bg-surface: #131418;
  --bg-elevated: #1A1C21;
  --bg-sidebar: #0F1013;
  --bg-subtle: #1A1C21;
  --bg-hover: #20232A;

  --text-primary: #F4F5F7;
  --text-secondary: #A1A5AD;
  --text-tertiary: #6B7079;
  --text-on-accent: #0E0F11;

  --border: #23262D;
  --border-strong: #2E323A;
  --divider: #1E2026;

  --accent: #FF9148;
  --accent-hover: #FFAE5C;
  --accent-soft: rgba(255,145,72,.14);
  --accent-ring: rgba(255,145,72,.28);
  --accent-grad: linear-gradient(135deg, #FFAE5C 0%, #FF9148 45%, #E87722 100%);

  --success-soft: rgba(46,125,94,.18);
  --warning-soft: rgba(183,121,31,.18);
  --danger-soft: rgba(192,57,43,.18);
  --info-soft: rgba(31,111,184,.18);

  --shadow-xs: 0 1px 2px rgba(0,0,0,.3);
  --shadow-sm: 0 4px 12px rgba(0,0,0,.35);
  --shadow-md: 0 8px 24px rgba(0,0,0,.45);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.55);
  --shadow-accent: 0 8px 20px rgba(232,119,34,.32);

  --topbar-bg: rgba(15,16,19,.78);
  --topbar-border: rgba(255,255,255,.06);
}

/* ---------- 2. RESET ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; overflow-x: hidden; max-width: 100vw; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-app);
  transition: background-color .25s ease, color .25s ease;
  overflow-x: hidden;
  max-width: 100vw;
}
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5,h6 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; color: var(--text-primary); }
p { margin: 0; }
::selection { background: var(--accent-soft); color: var(--accent-hover); }

/* Scrollbar (subtle) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 2px solid var(--bg-app); }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ---------- 3. LAYOUT ---------- */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
.app-main { display: flex; flex-direction: column; min-width: 0; }
.page {
  flex: 1;
  padding: var(--page-pad);
  max-width: 100%;
}
.page-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}

/* ---------- 4. SIDEBAR ---------- */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.sidebar-brand {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--s-4);
  border-bottom: 1px solid var(--border);
}
.sidebar-brand img { height: 56px; width: auto; max-width: 100%; }
.sidebar-brand .logo-dark { display: none; }
[data-theme="dark"] .sidebar-brand .logo-light { display: none; }
[data-theme="dark"] .sidebar-brand .logo-dark { display: block; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-5) var(--s-4) var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  padding: 0 var(--s-3);
  margin-bottom: var(--s-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 10px var(--s-3);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}
.nav-item .nav-ic {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.nav-item.is-active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-item .nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.4;
  min-width: 22px;
  text-align: center;
}

.sidebar-foot {
  border-top: 1px solid var(--border);
  padding: var(--s-4);
}

/* MetaTrader credentials mini-card (in sidebar) */
.mt-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-3);
  margin-bottom: var(--s-3);
}
.mt-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--s-3);
}
.mt-card-head .mt-ic {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}
.mt-card-head .mt-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}
.mt-card-head .mt-ind {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--success);
}
.mt-card-head .mt-ind::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: var(--r-pill);
  background: var(--success);
  box-shadow: 0 0 0 2px var(--success-soft);
}
.mt-card-head .mt-ind.off { color: var(--text-tertiary); }
.mt-card-head .mt-ind.off::before { background: var(--text-tertiary); box-shadow: none; }
.mt-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: var(--s-2);
}
.mt-field label {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: .02em;
}
.mt-field input {
  width: 100%;
  padding: 7px 10px;
  font-size: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: .02em;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.mt-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.mt-field input::placeholder { color: var(--text-tertiary); font-family: var(--font-body); }
.mt-pw-wrap { position: relative; }
.mt-pw-wrap input { padding-right: 30px; }
.mt-pw-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 11px;
  border-radius: 4px;
  transition: color .15s ease, background-color .15s ease;
}
.mt-pw-toggle:hover { color: var(--text-primary); background: var(--bg-hover); }
.mt-save {
  width: 100%;
  margin-top: var(--s-2);
  padding: 7px 8px;
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-grad);
  color: #fff;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: filter .15s ease;
}
.mt-save:hover { filter: brightness(1.05); }
.mt-save i { font-size: 10px; }
.user-card {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 10px;
  border-radius: var(--r-md);
  background: var(--bg-subtle);
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  background: var(--accent-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}
.user-card .u-name { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.user-card .u-role { font-size: 11px; color: var(--text-tertiary); }
.logout-btn {
  margin-top: var(--s-3);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 10px var(--s-3);
  border-radius: var(--r-md);
  color: var(--danger);
  font-weight: 600;
  font-size: 13px;
  transition: background-color .15s ease;
}
.logout-btn:hover { background: var(--danger-soft); }

/* ---------- 5. TOPBAR ---------- */
.topbar {
  height: var(--topbar-h);
  background: var(--topbar-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--topbar-border);
  display: flex;
  align-items: center;
  padding: 0 var(--page-pad);
  gap: var(--s-5);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: var(--s-4); min-width: 0; }
.hamburger {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: background-color .15s ease;
}
.hamburger:hover { background: var(--bg-hover); }
.page-titles { min-width: 0; }
.page-titles h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-titles .breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.page-titles .breadcrumb i { font-size: 10px; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); }
.topbar-search {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  width: 300px;
  padding: 9px var(--s-4);
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  color: var(--text-secondary);
  transition: border-color .15s ease, background-color .15s ease;
}
.topbar-search:focus-within {
  background: var(--bg-surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.topbar-search i { font-size: 13px; color: var(--text-tertiary); }
.topbar-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; min-width: 0; }
.topbar-search input::placeholder { color: var(--text-tertiary); }
.topbar-search .kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  letter-spacing: .04em;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  position: relative;
  transition: background-color .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.icon-btn .dot {
  position: absolute;
  top: 9px; right: 11px;
  width: 8px; height: 8px;
  border-radius: var(--r-pill);
  background: var(--accent);
  border: 2px solid var(--bg-app);
}
.theme-toggle .fa-sun { display: none; }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
[data-theme="dark"] .theme-toggle .fa-sun { display: inline; }

.user-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 4px 4px 4px var(--s-3);
  border-radius: var(--r-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  transition: background-color .15s ease;
}
.user-avatar-btn:hover { background: var(--bg-hover); }
.user-avatar-btn .avatar { width: 30px; height: 30px; font-size: 12px; }

/* ---------- 6. PAGE HEADER ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; }
.page-head .titles h2 { font-size: 26px; font-weight: 700; letter-spacing: -.015em; }
.page-head .titles p { color: var(--text-secondary); margin-top: 4px; font-size: 14px; }
.page-head .actions { display: flex; gap: var(--s-3); }

/* ---------- 7. CARD ---------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  padding: var(--s-6);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); margin-bottom: var(--s-5);
}
.card-head .c-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.card-head .c-action a {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .15s ease;
}
.card-head .c-action a:hover { color: var(--accent-hover); }

/* ---------- 8. STAT CARDS ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
.stat {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.stat::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
}
.stat.is-success::after { background: var(--success); }
.stat.is-info::after { background: var(--info); }
.stat.is-accent::after { background: var(--accent); }
.stat.is-danger::after { background: var(--danger); }

.stat-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-5);
}
.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: .02em;
}
.stat-ic {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.stat.is-success .stat-ic { background: var(--success-soft); color: var(--success); }
.stat.is-info .stat-ic { background: var(--info-soft); color: var(--info); }
.stat.is-accent .stat-ic { background: var(--accent-soft); color: var(--accent); }
.stat.is-danger .stat-ic { background: var(--danger-soft); color: var(--danger); }

.stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.stat-value .cur { font-size: 16px; font-weight: 600; color: var(--text-tertiary); margin-right: 4px; vertical-align: 2px; }
.stat-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  margin-top: var(--s-2);
}
.stat-delta.neg { color: var(--danger); }
.stat-bar {
  margin-top: var(--s-4);
  height: 4px;
  background: var(--bg-subtle);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.stat-bar > span {
  display: block; height: 100%;
  background: var(--accent-grad);
  border-radius: var(--r-pill);
}
.stat.is-success .stat-bar > span { background: linear-gradient(90deg, #3DA47A, #2E7D5E); }
.stat.is-info .stat-bar > span { background: linear-gradient(90deg, #4892D0, #1F6FB8); }
.stat.is-danger .stat-bar > span { background: linear-gradient(90deg, #D86658, #C0392B); }

/* ---------- 8B. RICH STAT CARDS (dashboard hero) ---------- */
.stat-rich {
  padding: var(--s-6) var(--s-6) var(--s-5);
  min-height: 148px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat-rich:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Renkli ince üst şerit yerine yumuşak köşe parıltısı */
.stat-rich::after { display: none; }
.stat-rich::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60%;
  height: 100%;
  pointer-events: none;
  opacity: .9;
  background: radial-gradient(120% 130% at 100% 0%, var(--glow, rgba(232,119,34,.16)) 0%, transparent 62%);
}
.stat-rich.is-info    { --glow: rgba(31,111,184,.16); }
.stat-rich.is-accent  { --glow: rgba(232,119,34,.18); }
.stat-rich.is-success { --glow: rgba(46,125,94,.16); }
.stat-rich.is-danger  { --glow: rgba(192,57,43,.16); }

/* Köşedeki dev arka plan ikonu (watermark) */
.stat-rich .stat-bg {
  position: absolute;
  right: -10px;
  bottom: -18px;
  font-size: 104px;
  line-height: 1;
  opacity: .07;
  transform: rotate(-12deg);
  pointer-events: none;
  z-index: 0;
  transition: transform .25s ease, opacity .25s ease;
}
.stat-rich:hover .stat-bg { transform: rotate(-6deg) scale(1.06); opacity: .1; }
.stat-rich.is-info    .stat-bg { color: var(--info); }
.stat-rich.is-accent  .stat-bg { color: var(--accent); }
.stat-rich.is-success .stat-bg { color: var(--success); }
.stat-rich.is-danger  .stat-bg { color: var(--danger); }
[data-theme="dark"] .stat-rich .stat-bg { opacity: .12; }
[data-theme="dark"] .stat-rich:hover .stat-bg { opacity: .16; }

/* Ön plan içerik arka plan ikonunun üstünde kalsın */
.stat-rich .stat-head,
.stat-rich .stat-value,
.stat-rich .stat-delta { position: relative; z-index: 1; }

/* Daha büyük, gradyanlı ikon çipi */
.stat-rich .stat-ic {
  width: 52px; height: 52px;
  border-radius: 15px;
  font-size: 22px;
  box-shadow: var(--shadow-xs);
}
.stat-rich.is-info    .stat-ic { background: var(--info-soft);    color: var(--info); }
.stat-rich.is-accent  .stat-ic { background: var(--accent-soft);  color: var(--accent); }
.stat-rich.is-success .stat-ic { background: var(--success-soft); color: var(--success); }
.stat-rich.is-danger  .stat-ic { background: var(--danger-soft);  color: var(--danger); }

.stat-rich .stat-value { font-size: 34px; margin-top: var(--s-1); }
.stat-rich .stat-label { font-size: 13.5px; color: var(--text-secondary); }

@media (max-width: 560px) {
  .stat-rich .stat-bg { font-size: 84px; }
  .stat-rich .stat-value { font-size: 30px; }
}

/* ---------- 9. BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--r-md);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
  letter-spacing: -.005em;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.btn-primary {
  color: #fff;
  background: var(--accent-grad);
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(232,119,34,.28); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.btn-ghost {
  color: var(--text-secondary);
  background: transparent;
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-danger {
  color: #fff;
  background: var(--danger);
}
.btn-danger:hover { background: #A52E22; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.icon-action {
  width: 32px; height: 32px;
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: background-color .15s ease, color .15s ease;
}
.icon-action:hover { background: var(--bg-hover); color: var(--text-primary); }
.icon-action.is-danger:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------- 10. FORMS ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-5);
}
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: var(--s-3);
  margin-top: var(--s-2);
  flex-wrap: wrap;
}
.form-actions.left { justify-content: flex-start; }
.form-actions.between { justify-content: space-between; }
.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-label .req { color: var(--accent); }
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.form-textarea { resize: vertical; min-height: 130px; line-height: 1.55; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-tertiary); }
.form-input:hover, .form-select:hover, .form-textarea:hover { border-color: var(--border-strong); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: 0;
  background: var(--bg-surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.form-input[readonly], .form-textarea[readonly] {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  cursor: default;
}
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%235B5F66' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
[data-theme="dark"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23A1A5AD' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.input-group {
  display: flex;
  align-items: stretch;
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.input-group:focus-within {
  background: var(--bg-surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.input-group .form-input {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding-right: 0;
}
.input-group .ig-addon {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  border-left: 1px solid var(--border);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox .box {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}
.checkbox input:checked + .box {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox .box::after {
  content: '';
  width: 10px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
  transition: opacity .15s ease;
}
.checkbox input:checked + .box::after { opacity: 1; }

/* ---------- 11. TABLES ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 calc(var(--s-6) * -1) calc(var(--s-6) * -1); padding: 0 var(--s-6) var(--s-6); }
.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.tbl thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-tertiary);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  white-space: nowrap;
}
.tbl thead th:first-child { border-top-left-radius: var(--r-md); }
.tbl thead th:last-child { border-top-right-radius: var(--r-md); text-align: right; }
.tbl tbody td {
  padding: var(--s-4);
  border-bottom: 1px solid var(--divider);
  vertical-align: middle;
  color: var(--text-primary);
}
.tbl tbody td:last-child { text-align: right; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color .15s ease; }
.tbl tbody tr:hover { background: var(--bg-subtle); }

.cell-tx { display: inline-flex; align-items: center; gap: var(--s-3); font-weight: 500; }
.cell-tx-ic {
  width: 34px; height: 34px;
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.cell-tx-ic.up { background: var(--danger-soft); color: var(--danger); }
.cell-tx-ic.down { background: var(--success-soft); color: var(--success); }
.cell-tx-ic.card { background: var(--info-soft); color: var(--info); }
.cell-mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: -.01em; color: var(--text-secondary); }
.cell-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.cell-actions { display: inline-flex; gap: 4px; justify-content: flex-end; }

/* ---------- 12. BADGES ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--r-pill);
  letter-spacing: -.005em;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: var(--r-pill);
}
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.success::before { background: var(--success); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.warning::before { background: var(--warning); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.danger::before { background: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.info::before { background: var(--info); }
.badge.neutral { background: var(--bg-subtle); color: var(--text-secondary); }
.badge.neutral::before { background: var(--text-tertiary); }

/* ---------- 13. QUICK ACTIONS / NOTIFICATIONS ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}
.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: var(--bg-subtle);
  border: 1px solid transparent;
  text-align: left;
  transition: all .15s ease;
}
.quick-tile:hover {
  background: var(--bg-surface);
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.quick-tile .qt-ic {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.quick-tile.is-success .qt-ic { background: var(--success-soft); color: var(--success); }
.quick-tile.is-danger .qt-ic { background: var(--danger-soft); color: var(--danger); }
.quick-tile.is-info .qt-ic { background: var(--info-soft); color: var(--info); }
.quick-tile.is-accent .qt-ic { background: var(--accent-soft); color: var(--accent); }
.quick-tile .qt-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.quick-tile .qt-sub { font-size: 12px; color: var(--text-tertiary); }

.notif-list { display: flex; flex-direction: column; gap: var(--s-2); }
.notif {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  transition: background-color .15s ease;
}
.notif:hover { background: var(--bg-subtle); }
.notif-ic {
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.notif.is-success .notif-ic { background: var(--success-soft); color: var(--success); }
.notif.is-warning .notif-ic { background: var(--warning-soft); color: var(--warning); }
.notif.is-info .notif-ic { background: var(--info-soft); color: var(--info); }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.notif-time { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

/* ---------- 14. ALERTS / CALLOUTS ---------- */
.callout {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: var(--warning-soft);
  border: 1px solid rgba(183,121,31,.18);
}
.callout.success { background: var(--success-soft); border-color: rgba(46,125,94,.2); }
.callout.danger { background: var(--danger-soft); border-color: rgba(192,57,43,.18); }
.callout.info { background: var(--info-soft); border-color: rgba(31,111,184,.18); }
.callout-ic {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  background: rgba(183,121,31,.18);
  color: var(--warning);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.callout.success .callout-ic { background: rgba(46,125,94,.2); color: var(--success); }
.callout.danger .callout-ic { background: rgba(192,57,43,.2); color: var(--danger); }
.callout.info .callout-ic { background: rgba(31,111,184,.2); color: var(--info); }
.callout-body p { font-size: 14px; color: var(--text-primary); line-height: 1.55; }
.callout-body strong { font-weight: 700; }

/* ---------- 15. CRYPTO ADDRESS BOX (Para Yatırma) ---------- */
.crypto-box {
  display: none;
  margin-top: var(--s-5);
  padding: var(--s-5);
  border-radius: var(--r-md);
  background: var(--accent-soft);
  border: 1px dashed rgba(232,119,34,.35);
  animation: fadeIn .25s ease-out;
}
.crypto-box.is-visible { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.crypto-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-pill);
}
.crypto-row {
  margin-top: var(--s-3);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
}
.crypto-row .addr {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  word-break: break-all;
  color: var(--text-primary);
}

/* ---------- 16. UPLOAD ZONE (KYC, Dekont) ---------- */
.upload {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-6);
  min-height: 160px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--bg-subtle);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.upload:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.upload input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.upload-ic {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.upload-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.upload-hint { font-size: 12px; color: var(--text-tertiary); }
.upload.has-file { border-color: var(--success); background: var(--success-soft); border-style: solid; }
.upload.has-file .upload-ic { background: var(--success); color: #fff; border-color: var(--success); }

/* ---------- 17. KYC STATUS ROW ---------- */
.kyc-status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-5);
}
.kyc-status {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
}
.kyc-status-ic {
  width: 48px; height: 48px;
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.kyc-status.ok .kyc-status-ic { background: var(--success-soft); color: var(--success); }
.kyc-status.pending .kyc-status-ic { background: var(--warning-soft); color: var(--warning); }
.kyc-status .ks-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.kyc-status .ks-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ---------- 18. MESSAGES PAGE ---------- */
.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-subtle);
  border-radius: var(--r-md);
}
.tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--r-sm);
  display: inline-flex; align-items: center; gap: var(--s-2);
  transition: all .15s ease;
}
.tab:hover { color: var(--text-primary); }
.tab.is-active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}
.tab-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--bg-hover);
  color: var(--text-secondary);
}
.tab.is-active .tab-count { background: var(--accent-soft); color: var(--accent); }

.msg-list { display: flex; flex-direction: column; }
.msg-item {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-3);
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  transition: background-color .15s ease;
}
.msg-item:last-child { border-bottom: 0; }
.msg-item:hover { background: var(--bg-subtle); }
.msg-ic {
  width: 40px; height: 40px;
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.msg-item.success .msg-ic { background: var(--success-soft); color: var(--success); }
.msg-item.warning .msg-ic { background: var(--warning-soft); color: var(--warning); }
.msg-item.info .msg-ic { background: var(--info-soft); color: var(--info); }
.msg-body { flex: 1; min-width: 0; }
.msg-title-row { display: flex; align-items: center; gap: var(--s-2); margin-bottom: 2px; }
.msg-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.msg-unread-dot { width: 7px; height: 7px; border-radius: var(--r-pill); background: var(--accent); }
.msg-preview { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-date { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; }

.msg-detail { display: none; }
.msg-detail.is-active { display: block; }
.msg-detail-head { display: flex; align-items: flex-start; gap: var(--s-4); margin-bottom: var(--s-5); }
.msg-detail-back {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}
.msg-detail-back:hover { background: var(--bg-hover); color: var(--text-primary); }
.msg-detail-meta { flex: 1; }
.msg-detail-meta h3 { font-size: 18px; font-weight: 700; }
.msg-detail-meta .date { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
.msg-detail-body { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.msg-detail-body p { margin-bottom: var(--s-3); }
.msg-detail-body strong { color: var(--text-primary); }

/* ---------- 19. CREDIT CARD MOCKUP ---------- */
.cc-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-7);
  align-items: start;
}
.cc-card {
  position: relative;
  aspect-ratio: 1.586 / 1;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255,145,72,.35) 0%, transparent 55%),
    radial-gradient(120% 90% at 100% 100%, rgba(50,90,200,.35) 0%, transparent 55%),
    linear-gradient(135deg, #1A1C24 0%, #0E0F11 100%);
  color: #fff;
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 50px rgba(15,17,22,.25);
  overflow: hidden;
}
.cc-card::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 80%;
  height: 160%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.08) 0%, transparent 60%);
  transform: rotate(-20deg);
  pointer-events: none;
}
.cc-top { display: flex; align-items: center; justify-content: space-between; }
.cc-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .1em;
}
.cc-brand .accent { color: var(--accent); }
.cc-chip {
  width: 44px; height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #E2C887 0%, #A88857 100%);
  position: relative;
}
.cc-chip::before, .cc-chip::after {
  content: '';
  position: absolute;
  background: rgba(0,0,0,.25);
}
.cc-chip::before { top: 8px; left: 4px; right: 4px; height: 1px; }
.cc-chip::after { top: 16px; left: 4px; right: 4px; height: 1px; }
.cc-number {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .12em;
  white-space: nowrap;
}
.cc-bottom { display: flex; justify-content: space-between; gap: var(--s-4); }
.cc-bottom .lbl {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .7;
}
.cc-bottom .val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cc-methods {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  margin-top: var(--s-5);
  color: var(--text-tertiary);
  font-size: 28px;
}
.cc-methods i { transition: color .15s ease; }
.cc-methods i:hover { color: var(--text-secondary); }
.cc-form-actions { display: flex; justify-content: flex-end; margin-top: var(--s-6); }

/* ---------- 20. TOAST ---------- */
#toast-stack {
  position: fixed;
  bottom: var(--s-5);
  right: var(--s-5);
  display: flex;
  flex-direction: column-reverse;
  gap: var(--s-3);
  z-index: 100;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 360px;
  padding: var(--s-3) var(--s-4) var(--s-3) var(--s-5);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  position: relative;
  overflow: hidden;
  animation: toastIn .25s ease-out;
}
.toast.fade-out { animation: toastOut .25s ease-in forwards; }
.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
}
.toast.success::before { background: var(--success); }
.toast.error::before, .toast.danger::before { background: var(--danger); }
.toast.warning::before { background: var(--warning); }
.toast.info::before { background: var(--info); }
.toast-ic {
  width: 28px; height: 28px;
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
  background: var(--accent-soft);
  color: var(--accent);
}
.toast.success .toast-ic { background: var(--success-soft); color: var(--success); }
.toast.error .toast-ic, .toast.danger .toast-ic { background: var(--danger-soft); color: var(--danger); }
.toast.warning .toast-ic { background: var(--warning-soft); color: var(--warning); }
.toast.info .toast-ic { background: var(--info-soft); color: var(--info); }
.toast-body { flex: 1; font-size: 13px; color: var(--text-primary); line-height: 1.5; }
.toast-close {
  width: 24px; height: 24px;
  border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
  margin-left: var(--s-2);
}
.toast-close:hover { background: var(--bg-hover); color: var(--text-primary); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(16px); }
}

/* ---------- 21. MODAL ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,17,22,.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: var(--s-5);
}
.modal-backdrop.is-open { display: flex; animation: backdropIn .2s ease-out; }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--s-6);
  animation: modalIn .25s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.modal-ic {
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: var(--danger-soft);
  color: var(--danger);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.modal h3 { font-size: 18px; font-weight: 700; }
.modal-body { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: var(--s-5); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--s-3); }

/* ---------- 21B. PROFILE PAGE ---------- */
.profile-hero {
  position: relative;
  border-radius: var(--r-lg);
  padding: var(--s-7);
  overflow: hidden;
  background:
    radial-gradient(80% 100% at 0% 0%, rgba(255,145,72,.16) 0%, transparent 60%),
    radial-gradient(80% 100% at 100% 100%, rgba(31,111,184,.10) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-app) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  gap: var(--s-6);
  flex-wrap: wrap;
}
.profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15,17,22,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,17,22,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 80%);
  pointer-events: none;
}
[data-theme="dark"] .profile-hero::before {
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
}
.profile-avatar-wrap {
  position: relative;
  z-index: 1;
}
.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: var(--r-pill);
  background: var(--accent-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 12px 28px rgba(232,119,34,.32), 0 0 0 6px var(--bg-surface);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.profile-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.profile-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 38px; height: 38px;
  border-radius: var(--r-pill);
  background: var(--bg-surface);
  border: 2px solid var(--bg-app);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, color .15s ease;
}
.profile-avatar-edit:hover { transform: scale(1.08); color: var(--accent-hover); }
.profile-avatar-edit input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.profile-meta { position: relative; z-index: 1; flex: 1; min-width: 220px; }
.profile-meta h2 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.profile-meta .role-row {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}
.profile-meta .role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 11px;
  border-radius: var(--r-pill);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.profile-meta .meta-info {
  display: flex; gap: var(--s-5); flex-wrap: wrap;
  margin-top: var(--s-4);
  font-size: 13px;
  color: var(--text-secondary);
}
.profile-meta .meta-info i { color: var(--accent); margin-right: 6px; }

.profile-quick-stats {
  position: relative; z-index: 1;
  display: flex; gap: var(--s-5);
  padding-left: var(--s-5);
  border-left: 1px solid var(--border);
}
.profile-quick-stats .qstat .qn { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.profile-quick-stats .qstat .ql { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }

/* ---------- 21C. PASSWORD STRENGTH ---------- */
.pw-strength {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-tertiary);
}
.pw-strength-bar {
  flex: 1;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--bg-subtle);
  overflow: hidden;
}
.pw-strength-bar > span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: var(--r-pill);
  background: var(--danger);
  transition: width .2s ease, background-color .2s ease;
}
.pw-strength.is-1 .pw-strength-bar > span { width: 25%; background: var(--danger); }
.pw-strength.is-2 .pw-strength-bar > span { width: 50%; background: var(--warning); }
.pw-strength.is-3 .pw-strength-bar > span { width: 75%; background: #5C9D7E; }
.pw-strength.is-4 .pw-strength-bar > span { width: 100%; background: var(--success); }
.pw-strength-label strong { color: var(--text-primary); font-weight: 600; }

/* ---------- 21D. SETTINGS LIST / TOGGLE SWITCH ---------- */
.settings-list { display: flex; flex-direction: column; gap: var(--s-2); }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: var(--bg-subtle);
  transition: background-color .15s ease;
}
.settings-row:hover { background: var(--bg-hover); }
.settings-info { display: flex; align-items: center; gap: var(--s-4); }
.settings-ic {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.settings-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.settings-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border-strong);
  border-radius: var(--r-pill);
  transition: background-color .2s ease;
}
.slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: var(--r-pill);
  box-shadow: 0 2px 4px rgba(15,17,22,.15);
  transition: transform .2s ease;
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 3px var(--accent-ring); }

/* ---------- 22. CONTACT INFO ROW ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.contact-card .ic {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.contact-card .ic.accent { background: var(--accent-soft); color: var(--accent); }
.contact-card .ic.info { background: var(--info-soft); color: var(--info); }
.contact-card .ic.success { background: var(--success-soft); color: var(--success); }
.contact-card .lbl { font-size: 12px; color: var(--text-tertiary); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.contact-card .val { font-size: 15px; font-weight: 600; color: var(--text-primary); }

/* ---------- 23. SIDEBAR OVERLAY (MOBILE) ---------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,17,22,.4);
  backdrop-filter: blur(2px);
  z-index: 35;
}
.sidebar-overlay.is-open { display: block; }

/* ---------- 24. HELPERS ---------- */
.row { display: flex; align-items: center; gap: var(--s-4); }
.col { display: flex; flex-direction: column; gap: var(--s-4); }
.gap-3 { gap: var(--s-3); }
.gap-5 { gap: var(--s-5); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.grid-8-4 { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s-5); }
.muted { color: var(--text-secondary); }
.subtle { color: var(--text-tertiary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent); }
.text-right { text-align: right; }
.bank-ic {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.bank-ic.akbank { background: linear-gradient(135deg, #E94B3C 0%, #B6342A 100%); }
.bank-ic.garanti { background: linear-gradient(135deg, #00A859 0%, #007A3F 100%); }
.crypto-ic {
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
  color: #fff;
}
.crypto-ic.usdt { background: linear-gradient(135deg, #26A17B 0%, #1E8260 100%); }
.crypto-ic.btc  { background: linear-gradient(135deg, #F7931A 0%, #C16A0A 100%); }
.crypto-ic.eth  { background: linear-gradient(135deg, #627EEA 0%, #3955B3 100%); }
.crypto-ic.xrp  { background: linear-gradient(135deg, #23292F 0%, #000 100%); }

/* ---------- 25. RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .grid-8-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cc-wrap { grid-template-columns: 1fr; }
  .topbar-search { width: 220px; }
}
@media (max-width: 880px) {
  .stats-grid { grid-template-columns: 1fr; }
  .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .kyc-status-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root {
    --page-pad: 20px;
  }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .sidebar.is-open { transform: translateX(0); }
  .hamburger { display: inline-flex; }
  .topbar-search { display: none; }
  .page-titles h1 { font-size: 18px; }
  .page-head .titles h2 { font-size: 22px; }
  .stat-value { font-size: 26px; }
}


/* =============================================================
   KYC PAGE — PREMIUM COMPONENTS
   ============================================================= */

/* ---------- KYC HERO (dark gradient + progress ring + level badge) ---------- */
.kyc-hero {
  position: relative;
  background: linear-gradient(135deg, #1F1409 0%, #2A1C0E 50%, #3D2616 100%);
  color: #F5E6D3;
  border-radius: 28px;
  padding: var(--s-7);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-6);
  align-items: center;
  overflow: hidden;
}
.kyc-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 70%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(255,145,72,.28) 0%, transparent 65%);
  pointer-events: none;
}
.kyc-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.04) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
  opacity: .8;
}
.kyc-hero-body { position: relative; z-index: 1; }
.kyc-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #FFAE5C;
}
.kyc-hero h2 {
  margin-top: var(--s-3);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.025em;
  color: #fff;
  line-height: 1.1;
}
.kyc-hero p {
  margin-top: var(--s-3);
  font-size: 14px;
  color: rgba(245,230,211,.78);
  max-width: 480px;
  line-height: 1.6;
}
.kyc-hero-benefits {
  margin-top: var(--s-5);
  display: flex;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.kyc-hero-benefits .b {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(245,230,211,.85);
}
.kyc-hero-benefits .b i { color: #FFAE5C; font-size: 12px; }

/* Progress ring */
.kyc-progress-ring {
  position: relative;
  z-index: 1;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kyc-progress-ring svg { transform: rotate(-90deg); }
.kyc-progress-ring circle.bg { stroke: rgba(255,255,255,.12); }
.kyc-progress-ring circle.fg {
  stroke: url(#ringGrad);
  stroke-linecap: round;
  transition: stroke-dashoffset .6s ease;
}
.kyc-progress-ring .ring-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.kyc-progress-ring .ring-percent {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
  line-height: 1;
}
.kyc-progress-ring .ring-label {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(245,230,211,.7);
}
.kyc-progress-ring .ring-badge {
  margin-top: var(--s-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #C0C0C0, #888);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.kyc-progress-ring .ring-badge.bronze { background: linear-gradient(135deg, #CD7F32, #8B4513); }
.kyc-progress-ring .ring-badge.silver { background: linear-gradient(135deg, #E5E5E5, #8C8C8C); color: #2A2A2A; }
.kyc-progress-ring .ring-badge.gold { background: linear-gradient(135deg, #FFD700, #B8860B); color: #2A2A2A; }
.kyc-progress-ring .ring-badge.platinum { background: linear-gradient(135deg, #E5E4E2, #A8A8A8); color: #2A2A2A; }

/* ---------- TIER CARDS (Bronz / Gümüş / Altın / Platin) ---------- */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}
.tier-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: var(--s-5);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tier-card.is-current {
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(232,119,34,.18), 0 0 0 1px var(--accent);
}
.tier-card.is-current::after {
  content: 'Mevcut Seviye';
  position: absolute;
  top: 12px; right: 12px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tier-card.is-locked { opacity: .65; }
.tier-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--tier-c1, transparent), transparent 60%);
  opacity: .08;
  pointer-events: none;
}
.tier-card.bronze   { --tier-c1: #CD7F32; }
.tier-card.silver   { --tier-c1: #B0B0B0; }
.tier-card.gold     { --tier-c1: #FFD700; }
.tier-card.platinum { --tier-c1: #E5E4E2; }

.tier-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  margin-bottom: var(--s-3);
  box-shadow: 0 6px 16px rgba(15,17,22,.15);
}
.tier-card.bronze .tier-icon   { background: linear-gradient(135deg, #D48E4D 0%, #8B4513 100%); }
.tier-card.silver .tier-icon   { background: linear-gradient(135deg, #DDD 0%, #888 100%); color: #2A2A2A; }
.tier-card.gold .tier-icon     { background: linear-gradient(135deg, #FFD75A 0%, #B8860B 100%); color: #2A2A2A; }
.tier-card.platinum .tier-icon { background: linear-gradient(135deg, #F0EFED 0%, #9C9C9C 100%); color: #2A2A2A; }

.tier-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.tier-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}
.tier-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--s-3);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.tier-status.ok { background: var(--success-soft); color: var(--success); }
.tier-status.pending { background: var(--warning-soft); color: var(--warning); }
.tier-status.locked { background: var(--bg-subtle); color: var(--text-tertiary); }
.tier-status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 999px;
  background: currentColor;
}
.tier-perks {
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tier-perk {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.tier-perk i {
  color: var(--success);
  font-size: 10px;
  margin-top: 4px;
  flex-shrink: 0;
}
.tier-card.is-locked .tier-perk i { color: var(--text-tertiary); }

/* ---------- PREMIUM UPLOAD ZONES (KYC) ---------- */
.kyc-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
}
.kyc-upload-grid.cols-1 { grid-template-columns: 1fr; }
.kyc-dz {
  position: relative;
  border: 2px dashed var(--border-strong);
  border-radius: 22px;
  padding: var(--s-6);
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg-surface) 100%);
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  overflow: hidden;
}
.kyc-dz:hover {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg-surface) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.kyc-dz input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Document illustration (ID card / house) */
.kyc-dz-illust {
  width: 110px;
  height: 70px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFAE5C 0%, #E87722 50%, #C45A0F 100%);
  position: relative;
  box-shadow: 0 10px 24px rgba(232,119,34,.28);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.kyc-dz-illust::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 25%, rgba(255,255,255,.25) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(0,0,0,.18) 0%, transparent 55%);
}
.kyc-dz-illust i {
  font-size: 28px;
  color: #fff;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}
.kyc-dz-illust.house { background: linear-gradient(135deg, #5C9D7E 0%, #2E7D5E 50%, #1A5C44 100%); box-shadow: 0 10px 24px rgba(46,125,94,.28); }
.kyc-dz-illust.back { background: linear-gradient(135deg, #4892D0 0%, #1F6FB8 50%, #134F87 100%); box-shadow: 0 10px 24px rgba(31,111,184,.28); }

.kyc-dz-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.kyc-dz-hint { font-size: 12px; color: var(--text-secondary); }
.kyc-dz-formats {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 600;
}
.kyc-dz-formats span {
  padding: 2px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* Uploaded state */
.kyc-dz.has-file {
  border-style: solid;
  border-color: var(--success);
  background: linear-gradient(180deg, var(--success-soft) 0%, var(--bg-surface) 100%);
  cursor: default;
}
.kyc-dz.has-file .kyc-dz-illust {
  background: linear-gradient(135deg, #5C9D7E 0%, #2E7D5E 100%);
  box-shadow: 0 10px 24px rgba(46,125,94,.32);
}
.kyc-dz.has-file .kyc-dz-illust i::before { content: '\f00c'; /* check */ }
.kyc-dz-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 100%;
}
.kyc-dz-meta i.del {
  color: var(--danger);
  cursor: pointer;
  margin-left: auto;
}

/* ---------- KYC TIMELINE (stepper) ---------- */
.kyc-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--bg-subtle);
  border-radius: 22px;
  padding: var(--s-5);
  position: relative;
}
.tl-step {
  position: relative;
  text-align: center;
  padding: 0 var(--s-2);
}
.tl-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 24px;
  left: calc(50% + 28px);
  right: calc(-50% + 28px);
  height: 2px;
  background: var(--border-strong);
}
.tl-step.is-done:not(:last-child)::after,
.tl-step.is-active:not(:last-child)::after {
  background: var(--accent);
}
.tl-step-ic {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: var(--s-2);
  position: relative;
  z-index: 1;
  transition: all .2s ease;
}
.tl-step.is-done .tl-step-ic {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(232,119,34,.35);
}
.tl-step.is-active .tl-step-ic {
  background: var(--bg-surface);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-ring);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 6px var(--accent-ring); }
  50% { box-shadow: 0 0 0 10px rgba(232,119,34,.08); }
}
.tl-step-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.tl-step-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.tl-step.is-done .tl-step-title { color: var(--text-primary); }
.tl-step.is-active .tl-step-title { color: var(--accent); }

/* ---------- KYC FAQ ---------- */
.kyc-faq {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.faq-item {
  background: var(--bg-subtle);
  border-radius: 14px;
  overflow: hidden;
  transition: background-color .15s ease;
}
.faq-item.is-open { background: var(--accent-soft); }
.faq-q {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  background: none;
  border: 0;
  width: 100%;
  text-align: left;
}
.faq-q .faq-q-ic {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.faq-item.is-open .faq-q .faq-q-ic { transform: rotate(180deg); background: var(--accent); color: #fff; }
.faq-q span { flex: 1; }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding: 0 var(--s-4);
}
.faq-item.is-open .faq-a {
  max-height: 200px;
  padding: 0 var(--s-4) var(--s-4) calc(var(--s-4) + 36px);
}

/* ---------- KYC RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .kyc-timeline { grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
  .tl-step:not(:last-child)::after { display: none; }
}
@media (max-width: 760px) {
  .kyc-hero {
    grid-template-columns: 1fr;
    padding: var(--s-5);
    gap: var(--s-5);
    text-align: center;
  }
  .kyc-hero h2 { font-size: 24px; }
  .kyc-hero-benefits { justify-content: center; }
  .kyc-progress-ring { margin: 0 auto; width: 160px; height: 160px; }
  .kyc-progress-ring .ring-percent { font-size: 30px; }
  .tier-grid { grid-template-columns: 1fr; }
  .kyc-upload-grid { grid-template-columns: 1fr; }
  .kyc-timeline { grid-template-columns: 1fr; padding: var(--s-4); }
  .tl-step { display: flex; align-items: center; text-align: left; gap: var(--s-3); padding: 0; }
  .tl-step-ic { margin-bottom: 0; flex-shrink: 0; }
}

/* =============================================================
   ===== IB PANEL ADDITIONS =====
   Vestaprime IB (Introducing Broker) panel components.
   Light theme primary; all colors read from CSS tokens so dark
   mode works automatically.
   ============================================================= */

/* ---------- IB.BRAND  SIDEBAR LOCKUP (Vestaprime + IB PANEL) ---------- */
.brand-ib {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.brand-ib .brand-mark {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-ib .brand-mark svg { width: 22px; height: 22px; }
/* Gerçek Vestaprime kalkan markası (PNG) — temaya göre değişir */
.brand-ib .brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-ib .brand-mark .mark-dark { display: none; }
[data-theme="dark"] .brand-ib .brand-mark .mark-light { display: none; }
[data-theme="dark"] .brand-ib .brand-mark .mark-dark { display: block; }
.brand-ib .brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-ib .brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--text-primary);
}
.brand-ib .brand-name .pr { color: var(--accent); }
.brand-ib .brand-tag {
  margin-top: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* ---------- IB.0  4-UP STAT GRID (responsive) ---------- */
.stats-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .stats-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .stats-grid.cols-4 { grid-template-columns: 1fr; } }

/* ---------- IB.1  SUCCESS (GREEN) BUTTON ---------- */
.btn-success {
  color: #fff;
  background: var(--success);
  box-shadow: 0 8px 20px rgba(46,125,94,.18);
}
.btn-success:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-success:active { transform: translateY(0); }
[data-theme="dark"] .btn-success { color: #fff; }

/* ---------- IB.2  FILTER BAR (date range + action) ---------- */
.filter-bar {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--s-5);
  align-items: end;
}
.filter-bar .form-field { gap: 6px; }
.filter-bar .filter-action {
  display: flex;
  align-items: flex-end;
  height: 100%;
}
.filter-bar .filter-action .btn { min-width: 160px; height: 46px; }
.filter-bar input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
}
.filter-bar input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .55;
  filter: var(--cal-filter, none);
}
[data-theme="dark"] .filter-bar input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1) opacity(.6); }

/* ---------- IB.3  DATA-TABLE TOOLBAR ---------- */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
}
.table-tools { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.table-length {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 13px;
  color: var(--text-secondary);
}
.table-length .form-select {
  width: auto;
  min-width: 72px;
  padding: 7px 30px 7px 12px;
  font-size: 13px;
}
.btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.btn-tool:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.btn-tool i { font-size: 12px; }
.table-search {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 13px;
  color: var(--text-secondary);
}
.table-search .form-input {
  width: 220px;
  padding: 9px 12px;
  font-size: 13px;
}

/* ---------- IB.4  SORTABLE HEADERS ---------- */
.tbl thead th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.tbl thead th.sortable .sort-ic {
  margin-left: 6px;
  font-size: 10px;
  color: var(--text-tertiary);
  opacity: .7;
  transition: color .15s ease, opacity .15s ease;
}
.tbl thead th.sortable:hover { color: var(--text-secondary); }
.tbl thead th.sortable:hover .sort-ic { color: var(--accent); opacity: 1; }
.tbl thead th.sortable.sort-asc .sort-ic,
.tbl thead th.sortable.sort-desc .sort-ic { color: var(--accent); opacity: 1; }
/* IB tables keep all cells left-aligned (override .tbl last-child right align) */
.tbl.tbl-ib thead th:last-child,
.tbl.tbl-ib tbody td:last-child { text-align: left; }
.tbl.tbl-ib .cell-actions { justify-content: flex-start; }
.tbl tbody tr.is-empty td {
  text-align: center;
  color: var(--text-tertiary);
  padding: var(--s-7) var(--s-4);
  font-size: 14px;
}

/* ---------- IB.5  PAGINATION ---------- */
.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-top: var(--s-5);
}
.pager-info { font-size: 13px; color: var(--text-secondary); }
.pager { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pager-btn:hover:not(:disabled):not(.is-active) { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-strong); }
.pager-btn.is-active {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.pager-btn:disabled { opacity: .45; cursor: default; }

/* ---------- IB.6  PROFILE INFO GRID ---------- */
.ib-profile-hero {
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.ib-profile-hero .avatar {
  width: 72px; height: 72px;
  font-size: 26px;
  border-radius: var(--r-lg);
}
.ib-profile-hero .iph-name { font-size: 22px; font-weight: 700; letter-spacing: -.015em; }
.ib-profile-hero .iph-mail { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
.ib-profile-hero .iph-date { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
.info-item { display: flex; flex-direction: column; gap: 6px; }
.info-item .info-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.info-item .info-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}
.info-item .info-value.link { color: var(--info); }

/* ---------- IB.7  APP FOOTER ---------- */
.app-foot {
  text-align: center;
  padding: var(--s-6) var(--page-pad);
  font-size: 13px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.app-foot i { color: var(--accent); margin: 0 2px; }
.app-foot strong { color: var(--text-secondary); font-weight: 600; }

/* ---------- IB.8  SIDEBAR MOBILE OFF-CANVAS ---------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,17,22,.42);
  backdrop-filter: blur(2px);
  z-index: 35;
}
.sidebar-overlay.is-open { display: block; }

@media (max-width: 1000px) {
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 280px;
    max-width: 86vw;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: translateX(0); }
  .topbar .hamburger { display: inline-flex; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar .filter-action .btn { width: 100%; }
  .table-toolbar { gap: var(--s-3); }
  .table-search .form-input { width: 100%; }
  .table-search { width: 100%; }
  .info-grid { grid-template-columns: 1fr; }
  .ib-profile-hero { flex-direction: column; align-items: flex-start; text-align: left; }
}
