/* ============================================================
   BTLB SMM Panel — Design System
   ============================================================ */
:root {
  --bg:        #0A0F1E;
  --bg-2:      #0D1117;
  --card:      #111827;
  --card-2:    #161F31;
  --line:      rgba(255,255,255,0.07);
  --line-2:    rgba(255,255,255,0.12);
  --accent:    #3B82F6;
  --accent-2:  #60A5FA;
  --accent-dk: #1D4ED8;
  --text:      #E5E9F0;
  --text-dim:  #94A3B8;
  --text-mut:  #5B6678;

  --green:  #22C55E;
  --yellow: #EAB308;
  --blue:   #3B82F6;
  --red:    #EF4444;
  --orange: #F97316;
  --violet: #8B5CF6;

  --radius:   16px;
  --radius-sm:10px;
  --shadow:   0 10px 30px -12px rgba(0,0,0,0.6);
  --shadow-lg:0 24px 60px -20px rgba(0,0,0,0.7);
  --sidebar-w: 264px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11','ss01';
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.16); background-clip: padding-box; }

/* ===================== Brand ===================== */
.brand-mark {
  width: 38px; height: 38px; flex: none;
  border-radius: 11px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 19px; color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--violet) 120%);
  box-shadow: 0 8px 20px -6px rgba(59,130,246,.6), inset 0 1px 0 rgba(255,255,255,.25);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.brand-sub { font-size: 10px; font-weight: 600; letter-spacing: .22em; color: var(--text-mut); }

/* ===================== LOGIN ===================== */
.login-body { display: grid; place-items: center; overflow: hidden; position: relative; }
.login-aurora {
  position: fixed; inset: -20% -10% auto -10%; height: 70vh; z-index: 0;
  background:
    radial-gradient(40% 60% at 20% 30%, rgba(59,130,246,.30), transparent 70%),
    radial-gradient(40% 60% at 80% 20%, rgba(139,92,246,.22), transparent 70%);
  filter: blur(20px);
  animation: drift 18s var(--ease) infinite alternate;
}
@keyframes drift { to { transform: translate3d(0, 40px, 0) scale(1.08); } }
.login-grid {
  position: fixed; inset: 0; z-index: 0; opacity: .4;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
}
.login-shell { position: relative; z-index: 1; width: min(92vw, 420px); }
.login-card {
  background: linear-gradient(180deg, rgba(22,31,49,.9), rgba(17,24,39,.92));
  border: 1px solid var(--line-2);
  border-radius: 22px;
  padding: 38px 34px 26px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.login-desc { color: var(--text-dim); font-size: 14px; margin-top: 6px; margin-bottom: 26px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--text-dim); letter-spacing: .01em; }
.field input {
  width: 100%; height: 46px; padding: 0 14px;
  background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder { color: var(--text-mut); }
.field input:focus {
  outline: none; border-color: var(--accent);
  background: #0b1322;
  box-shadow: 0 0 0 4px rgba(59,130,246,.16);
}
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 64px; }
.pwd-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; color: var(--text-dim);
  font-size: 12px; font-weight: 600; padding: 6px 8px; border-radius: 8px;
}
.pwd-toggle:hover { color: var(--text); background: rgba(255,255,255,.05); }
.login-error {
  color: #fca5a5; font-size: 13px; font-weight: 500;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25);
  border-radius: 10px; padding: 0 12px; max-height: 0; overflow: hidden;
  opacity: 0; transition: all .2s var(--ease);
}
.login-error.show { max-height: 60px; opacity: 1; padding: 11px 12px; }
.login-foot { text-align: center; color: var(--text-mut); font-size: 11.5px; margin-top: 22px; letter-spacing: .03em; }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; color: var(--text);
  transition: transform .12s var(--ease), background .15s, box-shadow .15s, border-color .15s, opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff; box-shadow: 0 10px 24px -10px rgba(59,130,246,.7), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { box-shadow: 0 14px 30px -10px rgba(59,130,246,.85); filter: brightness(1.05); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: var(--line-2); color: var(--text-dim); }
.btn-ghost:hover { background: rgba(255,255,255,.08); color: var(--text); }
.btn-outline { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-2); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.loading .btn-label { opacity: .5; }

/* Spinner */
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  animation: spin .7s linear infinite; display: inline-block;
}
.spinner-lg { width: 30px; height: 30px; border-width: 3px; border-color: rgba(255,255,255,.12); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== App shell ===================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 22px 16px;
  position: sticky; top: 0; height: 100vh;
  z-index: 40;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-section { font-size: 10px; font-weight: 700; letter-spacing: .18em; color: var(--text-mut); padding: 14px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 11px;
  color: var(--text-dim); font-size: 14px; font-weight: 500;
  position: relative; transition: background .15s, color .15s;
}
.nav-item svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(59,130,246,.18), rgba(59,130,246,.04));
  color: #fff;
}
.nav-item.active::before {
  content: ''; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 4px 4px 0; background: var(--accent);
}
.sidebar-foot { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 11px; padding: 4px; }
.user-avatar {
  width: 36px; height: 36px; flex: none; border-radius: 10px;
  display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--accent));
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-name { font-weight: 600; font-size: 14px; }
.user-role { font-size: 11px; color: var(--text-mut); text-transform: uppercase; letter-spacing: .08em; }
.logout-btn { justify-content: center; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 28px; min-height: 76px;
  background: rgba(10,15,30,.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-title h1 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.topbar-title p { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.balance-pill {
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 7px 16px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(34,197,94,.03));
  border: 1px solid rgba(34,197,94,.25);
}
.bp-label { font-size: 10px; font-weight: 600; letter-spacing: .1em; color: var(--green); text-transform: uppercase; }
.bp-value { font-size: 16px; font-weight: 700; color: #fff; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: grid; place-items: center; color: var(--text-dim);
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2);
  transition: background .15s, color .15s, transform .3s;
}
.icon-btn:hover { background: rgba(255,255,255,.08); color: var(--text); }
.icon-btn.spinning svg { animation: spin .7s linear infinite; }
.menu-btn { display: none; }

/* Live IST clock */
.ist-clock {
  display: flex; align-items: baseline; gap: 6px;
  padding: 7px 14px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2);
  font-variant-numeric: tabular-nums;
}
.ic-time { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.ic-zone { font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--text-mut); }

/* Home auto-refresh bar */
.refresh-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; margin-bottom: 18px;
  border-radius: 12px; font-size: 13px; color: var(--text-dim);
  background: rgba(34,197,94,.06); border: 1px solid rgba(34,197,94,.2);
}
.refresh-bar .rb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34,197,94,.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.refresh-bar .rb-timer { color: var(--text-mut); }
.refresh-bar .rb-timer b { color: var(--green); font-variant-numeric: tabular-nums; }

.content { padding: 28px; flex: 1; }
.page-loader { display: grid; place-items: center; min-height: 50vh; }

/* ===================== Cards / grids ===================== */
.section { animation: fadeUp .3s var(--ease); }
@keyframes fadeUp { from { transform: translateY(8px); } to { transform: none; } }
.grid { display: grid; gap: 18px; }
.grid-stats { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 700; }
.card-sub { font-size: 12.5px; color: var(--text-dim); }

/* Stat card */
.stat {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  transition: transform .18s var(--ease), border-color .18s;
}
.stat:hover { transform: translateY(-3px); border-color: var(--line-2); }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-label { font-size: 12.5px; color: var(--text-dim); font-weight: 500; }
.stat-icon {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(59,130,246,.14); color: var(--accent-2);
}
.stat-icon svg { width: 19px; height: 19px; }
.stat-icon.green { background: rgba(34,197,94,.14); color: var(--green); }
.stat-icon.violet { background: rgba(139,92,246,.14); color: var(--violet); }
.stat-icon.orange { background: rgba(249,115,22,.14); color: var(--orange); }
.stat-icon.red { background: rgba(239,68,68,.14); color: var(--red); }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.stat-meta { font-size: 12px; color: var(--text-mut); margin-top: 8px; }
.stat-meta b { color: var(--green); font-weight: 600; }
.stat::after {
  content: ''; position: absolute; right: -30px; bottom: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,.10), transparent 70%);
}

/* ===================== Tables ===================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
thead th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-mut); padding: 13px 16px; background: var(--bg-2);
  border-bottom: 1px solid var(--line); position: sticky; top: 0;
}
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--text-dim); vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(255,255,255,.025); }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-strong { color: var(--text); font-weight: 600; }
.cell-link { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent-2); }
.cell-mut { color: var(--text-mut); font-size: 12px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-pending  { color: var(--yellow); background: rgba(234,179,8,.12); border-color: rgba(234,179,8,.25); }
.badge-progress { color: var(--blue);   background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.25); }
.badge-completed{ color: var(--green);  background: rgba(34,197,94,.12);  border-color: rgba(34,197,94,.25); }
.badge-failed   { color: var(--red);    background: rgba(239,68,68,.12);  border-color: rgba(239,68,68,.25); }
.badge-partial  { color: var(--orange); background: rgba(249,115,22,.12); border-color: rgba(249,115,22,.25); }
.badge-cancelled{ color: var(--text-mut); background: rgba(148,163,184,.1); border-color: rgba(148,163,184,.2); }

/* Panel source chips */
.panel-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 8px; font-size: 11.5px; font-weight: 600;
  background: rgba(255,255,255,.05); border: 1px solid var(--line-2);
}
.panel-chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.panel-smmturk .dot { background: #f43f5e; }
.panel-resellerprovider .dot { background: #8b5cf6; }
.panel-upsmm .dot { background: #14b8a6; }

/* Progress bar */
.pbar { width: 90px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.pbar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ===================== Forms ===================== */
.form-grid { display: grid; gap: 16px; }
.input, select, textarea {
  width: 100%; height: 46px; padding: 0 14px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  color: var(--text); font-size: 14.5px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(59,130,246,.16); }
.input-sm { height: 36px; font-size: 13px; }
label.field-block { display: flex; flex-direction: column; gap: 7px; }
label.field-block > span { font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.hint { font-size: 12px; color: var(--text-mut); }

/* Cost calculator panel */
.calc {
  border-radius: var(--radius); border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(59,130,246,.08), rgba(59,130,246,.02));
  padding: 20px;
}
.calc-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 14px; }
.calc-row + .calc-row { border-top: 1px solid var(--line); }
.calc-row .k { color: var(--text-dim); }
.calc-row .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.calc-total .v { font-size: 22px; color: #fff; }
.warn-box {
  display: none; margin-top: 12px; padding: 11px 14px; border-radius: 10px; font-size: 13px; font-weight: 500;
  color: #fca5a5; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25);
}
.warn-box.show { display: block; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { display: none; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.12); transition: .2s; }
.switch .track::before { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s var(--ease); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::before { transform: translateX(18px); }

/* Inline editable price */
.price-edit { display: flex; align-items: center; gap: 6px; }
.price-edit input { width: 92px; height: 32px; font-size: 13px; }

/* ===================== Toolbar / filters ===================== */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.toolbar .grow { flex: 1; }
.toolbar select, .toolbar .input { height: 38px; width: auto; min-width: 140px; }

/* ===================== Toasts ===================== */
.toast-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 12px;
  min-width: 280px; max-width: 380px; padding: 14px 16px;
  background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow-lg); color: var(--text); font-size: 14px;
  animation: toastIn .3s var(--ease) both;
}
.toast.out { animation: toastOut .25s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }
.toast .t-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.toast.success .t-ico { background: rgba(34,197,94,.16); color: var(--green); }
.toast.error .t-ico { background: rgba(239,68,68,.16); color: var(--red); }
.toast.info .t-ico { background: rgba(59,130,246,.16); color: var(--accent-2); }
.toast .t-body { line-height: 1.35; }
.toast .t-title { font-weight: 600; }
.toast .t-msg { font-size: 12.5px; color: var(--text-dim); }

/* Empty state */
.empty { text-align: center; padding: 56px 20px; color: var(--text-mut); }
.empty svg { width: 46px; height: 46px; opacity: .4; margin-bottom: 14px; }
.empty p { font-size: 14px; }

/* Chart card */
.chart-box { position: relative; height: 320px; }
.chart-box.sm { height: 280px; }

/* Misc */
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.mini-spin { width: 14px; height: 14px; border-width: 2px; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.show { opacity: 1; pointer-events: auto; }

/* Panel balance cards */
.panel-bal {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 16px;
}
.pb-head { margin-bottom: 12px; }
.pb-amount { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }

/* Segmented control */
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 11px; }
.seg-btn { height: 32px; padding: 0 14px; border: none; border-radius: 8px; background: transparent; color: var(--text-dim); font-size: 13px; font-weight: 600; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--accent); color: #fff; }

/* P&L breakdown */
.pl { display: flex; flex-direction: column; }
.pl-row { display: flex; align-items: baseline; justify-content: space-between; padding: 13px 0; gap: 16px; }
.pl-row + .pl-row { border-top: 1px solid var(--line); }
.pl-k { color: var(--text-dim); font-size: 14px; }
.pl-v { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.pl-v.pos { color: var(--green); }
.pl-v.neg { color: var(--orange); }
.pl-total { margin-top: 4px; border-top: 2px solid var(--line-2) !important; padding-top: 16px; }
.pl-total .pl-k { color: var(--text); font-weight: 700; font-size: 15px; }
.pl-total .pl-v { font-size: 22px; }
.margin-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); margin-top: 12px; overflow: hidden; }
.margin-track > i { display: block; height: 100%; border-radius: 999px; }
.gauge { width: 76px; height: 76px; border-radius: 50%; flex: none; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--gcol) calc(var(--pct) * 1%), rgba(255,255,255,.08) 0); }
.gauge::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--card-2); }
.gauge > span { position: relative; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }

/* Profit split card */
.split-card { background: linear-gradient(180deg, rgba(139,92,246,.07), rgba(17,24,39,.4)),var(--card); }
.split-block { display: flex; align-items: center; gap: 14px; }
.split-pct { width: 64px; height: 64px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 19px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--violet), var(--accent)); box-shadow: 0 8px 20px -8px rgba(139,92,246,.6); }
.split-pct.alt { background: linear-gradient(135deg, var(--green), #16a34a); box-shadow: 0 8px 20px -8px rgba(34,197,94,.6); }
.split-meta { min-width: 0; }
.split-name { font-size: 14px; color: var(--text-dim); font-weight: 500; }
.split-amt { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.split-bar { height: 8px; border-radius: 999px; background: rgba(34,197,94,.18); margin-top: 16px; overflow: hidden; }
.split-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--violet), var(--accent)); }

/* ===================== Responsive ===================== */
@media (max-width: 1100px) {
  #fundsGrid, #newOrderGrid { grid-template-columns: 1fr !important; }
}
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; width: 272px;
    transform: translateX(-100%); transition: transform .25s var(--ease);
  }
  .sidebar.open { transform: none; }
  .menu-btn { display: grid; }
  .content { padding: 18px; }
  .topbar { padding: 14px 18px; }
  .analytics-2col, .section .grid[style*="1fr 1fr"] { grid-template-columns: 1fr !important; }
  .section .grid[style*="1.3fr 1fr"] { grid-template-columns: 1fr !important; }
}
@media (max-width: 680px) {
  .topbar { gap: 10px; min-height: 64px; }
  .topbar-title h1 { font-size: 18px; }
  .topbar-title p { display: none; }
  .ist-clock { padding: 6px 10px; }
  .ic-time { font-size: 13px; }
  .grid-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 16px; }
  .stat-value { font-size: 22px; }
  .stat-icon { width: 34px; height: 34px; }
  .card-pad { padding: 16px; }
  .toolbar select, .toolbar .input { min-width: 0; flex: 1 1 130px; }
  table { font-size: 13px; }
  thead th, tbody td { padding: 11px 12px; }
  .refresh-bar { font-size: 12px; padding: 9px 12px; }
}
@media (max-width: 480px) {
  .balance-pill { display: none; }
  .grid-stats { grid-template-columns: 1fr; }
  .content { padding: 14px; }
  .login-card { padding: 30px 22px 22px; }
  .login-title { font-size: 23px; }
  /* tap targets */
  .nav-item { padding: 13px 12px; }
  .btn { height: 44px; }
  .icon-btn { width: 42px; height: 42px; }
}
