/* LUMVEX Trader Panel — premium UI */

:root {
  --navy: #0A1628;
  --navy-deep: #060E18;
  --blue: #0A1628;
  --blue-dark: #060E18;
  --blue-mid: #1565A8;
  --blue-soft: #EAF3FB;
  --blue-pill: #3D9BE9;
  --teal: #0E7C86;
  --accent: #1A73C7;
  --accent-bright: #4BB0FF;
  --bg: #F3F6FA;
  --card: rgba(255, 255, 255, 0.98);
  --text: #0A1628;
  --muted: #5B6B7C;
  --border: #D5DEE8;
  --green: #0F7A45;
  --green-bg: #E7F7EF;
  --green-badge: #16A34A;
  --red: #C0272C;
  --red-soft: #FDECEC;
  --orange: #C2410C;
  --orange-bg: #FFF4EB;
  --grey-badge: #E5E7EB;
  --shadow: 0 4px 16px rgba(10, 22, 40, 0.06), 0 1px 2px rgba(10, 22, 40, 0.04);
  --radius: 10px;
  --topbar-h: 44px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Lucide */
svg.lucide, i[data-lucide] svg, .luc svg {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  vertical-align: middle;
}

/* Calm professional workspace background */
.bg-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 70% at 0% 0%, rgba(75, 176, 255, 0.14), transparent 52%),
    radial-gradient(ellipse 80% 60% at 100% 10%, rgba(21, 101, 168, 0.10), transparent 48%),
    radial-gradient(ellipse 90% 50% at 50% 100%, rgba(10, 22, 40, 0.06), transparent 55%),
    linear-gradient(180deg, #F7F9FC 0%, #EEF3F8 48%, #E8EEF5 100%);
}
.bg-atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 40%, rgba(255,255,255,0.45) 50%, transparent 60%);
  opacity: 0.5;
}
.bg-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image: radial-gradient(circle at 1px 1px, rgba(10, 22, 40, 0.045) 1px, transparent 0);
  background-size: 28px 28px;
}

body.is-login .bg-atmosphere {
  background:
    radial-gradient(ellipse 90% 70% at 20% 20%, rgba(75, 176, 255, 0.22), transparent 50%),
    radial-gradient(ellipse 80% 60% at 85% 75%, rgba(21, 101, 168, 0.35), transparent 55%),
    linear-gradient(155deg, #060E18 0%, #0A1628 42%, #12304A 72%, #0A1628 100%);
}
body.is-login .bg-atmosphere::before {
  opacity: 0.25;
  background: linear-gradient(120deg, transparent 35%, rgba(75, 176, 255, 0.08) 50%, transparent 65%);
}
body.is-login .bg-atmosphere::after {
  opacity: 0.22;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 32px 32px;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* Select with chevron arrow */
.select-shell {
  position: relative;
  width: 100%;
}
.select-shell select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px !important;
  cursor: pointer;
  background: #fff;
}
.select-shell select::-ms-expand { display: none; }
.select-arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--blue-mid);
  pointer-events: none;
  display: grid;
  place-items: center;
  z-index: 2;
}
.select-arrow svg,
.select-arrow .lx-ico {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}
.field-select .select-shell select {
  border: 1.5px solid #b0bec5;
  border-radius: 8px;
  padding: 14px 42px 14px 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  outline: none;
}
.field-select .select-shell select:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(21, 101, 168, 0.12);
}
.filter-row .select-shell select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 36px 10px 10px;
  font-size: 13px;
  font-weight: 500;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ── Top bar (compact) ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  background: linear-gradient(100deg, #060E18 0%, #0A1628 40%, #12304A 100%);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  box-shadow: 0 2px 12px rgba(6, 14, 24, 0.28);
  border-bottom: 1px solid rgba(75, 176, 255, 0.12);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 0;
  flex-shrink: 0;
}
.topbar-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.topbar-name {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1.6px;
}
@media (max-width: 420px) {
  .topbar-name { display: none; }
  .live-clock span { font-size: 10px; }
}
@media (max-width: 360px) {
  .username { max-width: 72px; }
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.icon-btn:hover { background: rgba(255,255,255,.12); }
.icon-btn .lx-ico {
  width: 18px;
  height: 18px;
  display: block;
}

/* Burger — clean Lucide menu, compact */
.menu-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
}
.menu-btn:hover {
  background: rgba(75, 176, 255, 0.18);
  border-color: rgba(75, 176, 255, 0.35);
}
.menu-btn .menu-burger-ico,
.menu-btn .lx-ico {
  width: 18px;
  height: 18px;
}

/* home icon removed */

.live-clock {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(75, 176, 255, 0.10);
  border: 1px solid rgba(75, 176, 255, 0.18);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2px;
  flex: 0 1 auto;
  color: #EAF3FB;
}
.clock-ico { font-size: 11px; opacity: .95; }

.user-chip {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 3px 8px 3px 4px;
  max-width: 46vw;
}
.user-avatar {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4BB0FF, #1565A8);
  color: #fff;
  flex-shrink: 0;
}
.user-avatar .lx-ico {
  width: 12px;
  height: 12px;
  stroke-width: 2;
}
.user-chevron {
  width: 12px;
  height: 12px;
  opacity: 0.7;
  flex-shrink: 0;
}
.sun-ico { display: none; }
.username {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.15px;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(78vw, 280px);
  background: #fff;
  z-index: 60;
  transform: translateX(-100%);
  transition: transform .22s ease;
  box-shadow: 4px 0 24px rgba(0,0,0,.12);
  display: flex;
  flex-direction: column;
}
.sidebar.open { transform: translateX(0); }

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #F5F8FB, #fff);
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
}
.brand-text {
  color: var(--blue);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.6px;
}
.brand {
  color: var(--blue-mid);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .2px;
}
.collapse-btn {
  color: var(--blue-mid);
  border: 1px solid var(--border);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
}
.collapse-btn .lx-ico {
  width: 14px;
  height: 14px;
  color: var(--blue-mid);
}

.sidebar-nav { padding: 8px 6px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #2F3B4A;
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, color .15s, box-shadow .15s;
}
.nav-item:hover { background: #F3F7FB; color: var(--navy); }
.nav-item.active {
  background: linear-gradient(90deg, var(--blue-soft), #F7FBFF);
  color: var(--navy);
  font-weight: 700;
  box-shadow: inset 2px 0 0 var(--blue-mid);
}

.nav-ico {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 7px;
  background: #F0F5FA;
  color: var(--blue-mid);
  border: 1px solid rgba(21, 101, 168, 0.08);
}
.nav-ico .lx-ico {
  width: 15px;
  height: 15px;
  display: block;
}
.nav-item:hover .nav-ico {
  background: #E3F0FA;
  color: #0F568F;
}
.nav-item.active .nav-ico {
  background: linear-gradient(145deg, #1565A8, #0A1628);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(21, 101, 168, 0.28);
}
.nav-item-danger {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  padding-top: 16px;
}
.nav-item-danger .nav-ico {
  background: #FDECEC;
  color: var(--red);
  border-color: rgba(192, 39, 44, 0.12);
}
.nav-item-danger:hover .nav-ico {
  background: #FACDCD;
  color: #9B1C1F;
}
.nav-item-danger .nav-label { color: var(--red); font-weight: 600; }
.nav-label { line-height: 1.2; }

/* Base SVG icons */
.lx-ico {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
  vertical-align: middle;
  display: inline-block;
}
.live-clock .lx-ico {
  width: 15px;
  height: 15px;
  opacity: 0.95;
}

.title-ico {
  width: 1.1em;
  height: 1.1em;
  margin-right: 6px;
  color: var(--blue-mid);
  vertical-align: -0.15em;
}
.tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tools a,
.tools button {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  color: var(--blue-mid);
  font-size: 14px;
  border: 1px solid transparent;
  background: transparent;
}
.tools a:hover,
.tools button:hover {
  background: var(--blue-soft);
  border-color: rgba(21, 101, 168, 0.15);
}
.icon-action {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  color: var(--blue-mid);
  font-size: 14px;
  background: transparent;
  border: none;
}
.icon-action:hover { background: var(--blue-soft); }
.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.modal-head h2 { margin-bottom: 2px; font-size: 15px; }
.modal-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--blue-soft), #fff);
  border: 1px solid rgba(21, 101, 168, 0.15);
  color: var(--blue-mid);
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}
.modal-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 50;
}
.sidebar-backdrop.show { display: block; }

/* ── Main ── */
.main {
  flex: 1;
  padding: 10px 12px 28px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.page-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.2px;
  color: #111;
}
.page-sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
  line-height: 1.35;
}
.page-head { margin-bottom: 2px; }
.page-head-left { gap: 4px !important; }

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ── Cards ── */
.card {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 12px;
  margin-top: 8px;
}
.card-sm { padding: 10px; }
.card-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.card-muted { color: var(--muted); font-size: 11px; }

/* Period tabs */
.period-tabs {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.period-tabs a,
.period-tabs button {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #455a64;
  background: #fff;
  border: 1px solid var(--border);
}
.period-tabs a.active,
.period-tabs button.active {
  background: var(--blue-mid);
  color: #fff;
  border-color: var(--blue-mid);
}

/* Balance */
.balance-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.balance-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.wallet-ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-mid);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.wallet-ico svg { width: 20px; height: 20px; }
.balance-label { font-size: 13px; color: var(--muted); }
.balance-value {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1.15;
}
.balance-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}
.rate-chip {
  background: #fff3e0;
  color: #e65100;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rate-chip svg { width: 13px; height: 13px; }
.sec-shield {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #e3f2fd;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #1565c0;
}
.shield-ico { color: #e53935; font-size: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  transition: .15s;
}
.btn-outline {
  border: 1.5px solid var(--blue-mid);
  color: var(--blue-mid);
  background: #fff;
}
.btn-outline:hover { background: var(--blue-soft); }
.btn-primary {
  background: linear-gradient(135deg, #4BB0FF 0%, #1565A8 52%, #0A1628 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(21, 101, 168, 0.28);
}
.btn-primary:hover {
  filter: brightness(1.06);
}
.btn-login {
  margin-top: 6px;
  padding: 11px 14px;
  font-size: 14px;
  letter-spacing: 0.2px;
}
.btn-primary:disabled,
.btn-disabled {
  background: #cfd8dc;
  color: #78909c;
  cursor: not-allowed;
  border: none;
}
.btn-text {
  color: var(--blue-mid);
  font-weight: 600;
  padding: 7px 10px;
}
.btn-block { width: 100%; }
.btn-sm { padding: 5px 9px; font-size: 11px; }
.btn-ghost {
  background: #eceff1;
  color: #546e7a;
}

/* Metric stack */
.metric-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.metric-ico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.metric-ico svg { width: 14px; height: 14px; }
.metric-ico.green { background: #e8f5e9; color: #2e7d32; }
.metric-ico.blue { background: #e3f2fd; color: #1565c0; }
.metric-ico.red { background: #ffebee; color: #c62828; }
.metric-label { font-size: 11px; color: var(--muted); font-weight: 500; }
.metric-value { font-size: 18px; font-weight: 800; }
.metric-foot { font-size: 10px; color: var(--muted); }
.metric-card.payin { border-left: 2px solid #43a047; }
.metric-card.payout { border-left: 2px solid #e53935; }
.metric-value.green { color: #2e7d32; }
.metric-value.red { color: #c62828; }
.rate-bad { color: #c62828; font-weight: 600; }

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 13px;
  color: #455a64;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; margin-right: 6px; vertical-align: middle;
}
.dot.green { background: #43a047; }
.dot.orange { background: #fb8c00; }
.dot.red { background: #e53935; }
.dot.grey { background: #9e9e9e; }

/* Fake empty chart */
.chart-box {
  height: 160px;
  border: 1px dashed #d0d5dd;
  border-radius: 8px;
  position: relative;
  margin-bottom: 10px;
  background:
    linear-gradient(to top, transparent 0, transparent calc(25% - 1px), #eee 25%, transparent calc(25% + 1px)),
    linear-gradient(to top, transparent 0, transparent calc(50% - 1px), #eee 50%, transparent calc(50% + 1px)),
    linear-gradient(to top, transparent 0, transparent calc(75% - 1px), #eee 75%, transparent calc(75% + 1px));
}
.chart-y {
  position: absolute;
  left: 6px; top: 0; bottom: 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  font-size: 10px; color: #9e9e9e;
}
.chart-x {
  position: absolute;
  left: 24px; right: 8px; bottom: 4px;
  display: flex; justify-content: space-between;
  font-size: 10px; color: #9e9e9e;
}
.legend {
  display: flex; gap: 16px; font-size: 12px; color: var(--muted);
}
.leg-sq {
  width: 10px; height: 10px; display: inline-block;
  margin-right: 4px; vertical-align: middle; border-radius: 2px;
}
.leg-sq.g { background: #43a047; }
.leg-sq.r { background: #e53935; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 13px;
}
table.data th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data td {
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
  vertical-align: middle;
}
table.data tr:last-child td { border-bottom: none; }
.amt-blue { color: var(--blue-mid); font-weight: 700; }
.amt-red { color: #c62828; font-weight: 700; }

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: none;
  line-height: 1.3;
}
.badge.confirmed,
.badge.Completed { background: var(--green-badge); color: #fff; }
.badge.expired { background: var(--grey-badge); color: #424242; }
.badge.Draft { background: var(--orange); color: #fff; }
.badge.Pending { background: #fb8c00; color: #fff; }
.badge.unchecked {
  background: #fff;
  border: 1px solid #9e9e9e;
  color: #333;
}
.badge.Active { background: transparent; border: 1.5px solid #43a047; color: #2e7d32; }
.badge.IMPS { background: #0E7C86; color: #fff; }
.badge.Approved { background: var(--green-badge); color: #fff; }

.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eceff1;
  color: #455a64;
  font-size: 12px;
  font-weight: 700;
  margin-left: 6px;
}

/* Empty active payout */
.empty-box {
  background: linear-gradient(180deg, #fafbfc, #f3f5f7);
  border-radius: 10px;
  padding: 28px 16px;
  text-align: center;
}
.empty-box p {
  color: #607d8b;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 14px;
}
.empty-foot {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.tools-payout {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.tool-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  color: var(--blue-mid);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.tool-btn:hover {
  background: var(--blue-soft);
}
.tool-btn.is-on {
  background: var(--blue-soft);
  color: var(--navy);
  box-shadow: inset 0 0 0 1px rgba(21, 101, 168, 0.2);
}
.tool-btn .lx-ico {
  width: 15px;
  height: 15px;
}

.payout-filter-bar {
  display: none;
  background: #F7F9FC;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
}
.payout-filter-bar.open { display: block; }
.payout-filter-bar .search-row {
  margin-bottom: 6px;
  padding: 6px 8px;
}
.payout-filter-bar .filter-row {
  grid-template-columns: 1.2fr auto;
  align-items: center;
  margin-bottom: 0;
  gap: 6px;
}
.payout-filter-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.payout-filter-bar .select-shell select {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 28px 6px 8px;
  font-size: 11px;
  width: 100%;
  background: #fff;
  appearance: none;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

/* Application cards — compact mobile density */
.app-tabs {
  display: flex;
  gap: 5px;
  margin: 8px 0 6px;
  overflow-x: auto;
  padding-bottom: 1px;
  -webkit-overflow-scrolling: touch;
}
.app-tabs a {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  color: #546e7a;
  white-space: nowrap;
  line-height: 1.3;
}
.app-tabs a.active-blue {
  background: var(--blue-mid);
  color: #fff;
  border-color: var(--blue-mid);
}
.app-tabs a.active-orange {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

.tx-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 7px 10px 7px 10px;
  margin-bottom: 6px;
  border-left: 2px solid #43a047;
  position: relative;
  min-height: 0;
}
.tx-card.expired { border-left-color: #e53935; }
.tx-card.confirmed { border-left-color: #43a047; }
.tx-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}
.tx-id { font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: 0.1px; }
.tx-time { font-size: 10px; color: var(--muted); line-height: 1.25; }
.tx-amt {
  font-size: 15px;
  font-weight: 800;
  color: var(--blue-mid);
  line-height: 1.15;
  margin-top: 2px;
}
.tx-usdt { font-size: 10px; color: var(--muted); line-height: 1.25; }
.tx-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #374151;
  line-height: 1.25;
  max-width: 78%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-upi {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
  max-width: 78%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.retry-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px;
  background: #ef6c00;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  padding: 0;
}
.retry-btn .lx-ico,
.retry-btn svg {
  width: 14px;
  height: 14px;
}
.retry-form {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
}

/* Deposit payment page */
.pay-page { max-width: 480px; margin: 0 auto; }
.pay-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.pay-id {
  display: inline-block;
  background: #eceff1;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.badges { display: flex; gap: 8px; margin: 8px 0 16px; flex-wrap: wrap; }

.timer-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  background: #fff;
  margin-bottom: 16px;
}
.timer-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.timer-value {
  font-size: 32px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

.qr-wrap {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.qr-wrap img {
  width: min(220px, 70vw);
  height: auto;
  image-rendering: pixelated;
}
.wallet-label {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}
.wallet-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.wallet-addr {
  font-size: 13px;
  font-weight: 700;
  word-break: break-all;
  max-width: 100%;
}
.copy-btn {
  color: var(--blue-mid);
  font-size: 16px;
  padding: 4px;
}

.hash-field {
  margin-top: 16px;
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.hash-field label {
  display: block;
  font-size: 12px;
  color: var(--blue-mid);
  font-weight: 600;
  margin-bottom: 6px;
}
.hash-field input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  outline: none;
}
.hash-field input:focus { border-color: var(--blue-mid); }
.hash-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.pay-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  gap: 10px;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }

.modal-gate {
  max-width: 420px;
  text-align: center;
  padding: 22px 20px 18px;
}
.modal-gate .gate-ico {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #E8F4FF, #F0F7FC);
  color: var(--blue-mid, #1565A8);
  border: 1px solid rgba(21, 101, 168, 0.12);
}
.modal-gate h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--navy, #0A1628);
}
.gate-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted, #5B6B7C);
}
.gate-body strong { color: var(--navy, #0A1628); font-weight: 700; }
.gate-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 4px;
}
.gate-steps span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: #3D5A73;
  background: #F0F5FA;
  border: 1px solid var(--border, #D5DEE8);
  border-radius: 999px;
  padding: 5px 9px;
}
.gate-actions {
  margin-top: 16px;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.modal {
  background: #fff;
  border-radius: 12px;
  width: min(420px, 100%);
  padding: 20px 18px 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
  max-height: 90vh;
  overflow-y: auto;
}
.modal h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
}
.field {
  margin-bottom: 16px;
  position: relative;
}
.field label {
  position: absolute;
  top: -8px;
  left: 10px;
  background: #fff;
  padding: 0 4px;
  font-size: 12px;
  color: var(--blue-mid);
  font-weight: 600;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.field-label-ico {
  width: 12px;
  height: 12px;
}
.timer-info {
  width: 14px;
  height: 14px;
  color: var(--muted);
  vertical-align: -0.15em;
  margin-left: 2px;
}
.search-ico {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}
.field select,
.field input {
  width: 100%;
  border: 1.5px solid #b0bec5;
  border-radius: 8px;
  padding: 14px 12px;
  font-size: 15px;
  outline: none;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  color: var(--text);
  font-weight: 500;
}
.field select:focus,
.field input:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(21, 101, 168, 0.12);
}
.field select {
  cursor: pointer;
  padding-right: 36px;
  background-image: none;
}
.field .suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}
.field.has-suffix input { padding-right: 56px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* Add New Requisite modal — original panel layout, compact */
.modal.modal-req {
  width: min(400px, 100%);
  padding: 14px 14px 12px;
  border-radius: 10px;
  max-height: min(92vh, 640px);
}
.modal-title-solo {
  font-size: 15px !important;
  font-weight: 800;
  margin-bottom: 10px !important;
  color: var(--navy);
  letter-spacing: -0.2px;
}
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #E8F1FB;
  border: 1px solid rgba(21, 101, 168, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.info-banner p {
  font-size: 11px;
  line-height: 1.4;
  color: #2F4F6F;
  margin: 0;
}
.info-banner-ico {
  color: var(--blue-mid);
  flex-shrink: 0;
  margin-top: 1px;
  display: grid;
  place-items: center;
}
.info-banner-note {
  margin-top: 2px;
  margin-bottom: 10px;
}
.info-banner strong { color: var(--navy); font-weight: 700; }

.seg-toggle {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 0;
  background: #F0F3F7;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 12px;
}
.seg-btn {
  border: none;
  background: transparent;
  border-radius: 6px;
  padding: 7px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #5B6B7C;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: 0.12s ease;
}
.seg-btn.active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(10, 22, 40, 0.08);
}
.seg-btn:hover:not(.active) { color: var(--navy); }

.field.field-stack {
  margin-bottom: 10px;
  position: relative;
}
.field.field-stack label {
  position: static;
  display: block;
  background: none;
  padding: 0;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #3D4F63;
  left: auto;
  top: auto;
}
.field.field-stack input {
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 7px;
  border: 1px solid #C5D0DB;
  font-weight: 500;
}
.field.field-stack input:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 2px rgba(21, 101, 168, 0.12);
}
.field-hint {
  margin: 3px 0 0;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.35;
}
.field-hint-warn {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  color: #6B4A12;
  background: #FFF7E6;
  border: 1px solid rgba(196, 140, 40, 0.35);
  line-height: 1.4;
}
.req-star { color: #C0272C; font-weight: 700; }
.is-hidden { display: none !important; }

.modal-req .modal-actions {
  margin-top: 4px;
  padding-top: 2px;
}
.modal-req .btn-primary {
  padding: 7px 12px;
  font-size: 12px;
}
.modal-req .btn-text {
  font-size: 12px;
  padding: 7px 10px;
}

/* Requisites — dense / genuine panel density */
.stat-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 6px;
  margin-top: 8px;
}
.stat-card {
  border-radius: 8px;
  padding: 7px 6px;
  text-align: center;
  box-shadow: var(--shadow);
  background: #fff;
}
.stat-card .label {
  font-size: 9px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 3px;
  letter-spacing: 0.1px;
  line-height: 1.2;
}
.stat-card .val {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
}
.stat-card.active-g {
  background: #43a047;
  color: #fff;
}
.stat-card.active-g .label { color: rgba(255,255,255,.85); }
.stat-card.limit-b {
  background: linear-gradient(135deg, #1565A8, #0A1628);
  color: #fff;
}
.stat-card.limit-b .label { color: rgba(255,255,255,.9); }
.stat-card .val.sm { font-size: 12px; }

.filter-box {
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  margin-top: 8px;
  box-shadow: var(--shadow);
}
.search-row {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 8px;
  margin-bottom: 6px;
}
.search-row input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 12px;
  background: transparent;
}
.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 6px;
}
.filter-row select {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 28px 6px 8px;
  font-size: 11px;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  cursor: pointer;
}
.filter-actions { margin-top: 2px; }

.req-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: 8px;
  border-left: 2px solid #43a047;
  padding: 8px 10px;
}
.req-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.req-head .actions { margin-left: auto; display: flex; gap: 4px; color: var(--blue-mid); }
.req-name {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1.3;
}
.req-upi {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.req-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 7px;
}
.req-stat {
  background: #f7f8fa;
  border-radius: 6px;
  padding: 6px 7px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.3;
}
.req-stat strong {
  display: block;
  color: var(--text);
  font-size: 11px;
  margin-top: 2px;
}
.req-stat .g { color: #2e7d32; }
.empty-inline { text-align: center; padding: 14px 8px; font-size: 12px; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1b5e20;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  min-width: min(300px, 92vw);
  font-size: 12px;
}
.toast-error { background: #b71c1c; }
.toast-check {
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: grid; place-items: center; font-size: 11px; flex-shrink: 0;
}
.toast-x {
  margin-left: auto;
  color: #fff;
  font-size: 14px;
  opacity: .85;
}

.section-ico {
  display: inline-flex;
  align-items: center;
  color: var(--blue-mid);
  margin-right: 6px;
  font-size: 16px;
  vertical-align: -0.15em;
}

.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-14 { margin-top: 14px; }
.mb-0 { margin-bottom: 0; }

/* Live chart bars */
.chart-box.chart-live { display: flex; flex-direction: column; padding: 8px 8px 22px 28px; }
.chart-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 6px;
  min-height: 110px;
  padding: 0 4px;
}
.chart-col { flex: 1; display: flex; justify-content: center; height: 100%; }
.bar-pair {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100%;
  width: 70%;
  max-width: 36px;
}
.bar {
  flex: 1;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  transition: height .3s;
}
.bar.payin { background: #43a047; }
.bar.payout { background: #e53935; }

.status-bars {
  display: flex;
  height: 14px;
  border-radius: 8px;
  overflow: hidden;
  gap: 2px;
  background: #f5f5f5;
}
.sbar { min-width: 2px; }
.sbar.conf { background: #43a047; }
.sbar.pend { background: #fb8c00; }
.sbar.decl { background: #e53935; }
.sbar.exp { background: #9e9e9e; }

.active-payout {
  background: linear-gradient(180deg, #f7fafc, #eef2f6);
  border-radius: 10px;
  padding: 16px;
}

/* Login */
.main-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  max-width: none;
  padding: 28px 18px;
  background: transparent;
}
.login-wrap {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login-hero-brand {
  text-align: center;
  color: #f4faf9;
}
.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  margin-bottom: 12px;
}
.login-word {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 6px;
  line-height: 1.1;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}
.login-tag {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: rgba(244, 250, 249, 0.78);
}
.login-card {
  margin-top: 0;
  padding: 28px 22px 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 20px 50px rgba(8, 30, 36, 0.28);
}
.login-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.3px;
}
.login-hint {
  font-size: 12px;
  text-align: center;
}
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: #8A97A6;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #D5DEE8, transparent);
}
.login-divider span { flex-shrink: 0; }
.login-no-account {
  margin: 0 0 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #3D4F61;
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid #DADCE0;
  background: #fff;
  color: #3C4043;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1px;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12), 0 1px 3px rgba(60, 64, 67, 0.08);
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.btn-google:hover {
  background: #F8F9FA;
  border-color: #C6C9CE;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.16), 0 2px 6px rgba(60, 64, 67, 0.1);
  color: #202124;
}
.btn-google:active {
  background: #F1F3F4;
  box-shadow: none;
}
.btn-google-ico {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.btn-google-ico.big {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #E8EAED;
  box-shadow: 0 2px 8px rgba(60, 64, 67, 0.08);
}
.btn-google-label { line-height: 1; }
.login-google-note {
  margin: 8px 0 0;
  text-align: center;
  font-size: 11px;
  color: #8A97A6;
}
.google-setup-card { text-align: center; }
.google-setup-card .page-sub { margin-top: 6px; }
.google-setup-steps {
  text-align: left;
  margin: 16px 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #F5F8FB;
  border: 1px solid #E2EAF1;
  font-size: 12.5px;
  color: #3D4F61;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.google-setup-steps code {
  font-size: 11px;
  background: #fff;
  border: 1px solid #D5DEE8;
  border-radius: 4px;
  padding: 1px 5px;
}
.login-brand {
  color: var(--blue-mid);
  font-weight: 800;
  font-size: 28px;
  margin-bottom: 8px;
}

.stat-card.limit-b {
  background: linear-gradient(135deg, #1565A8, #0A1628);
  color: #fff;
}

.tx-card,
.req-card,
.metric-card,
.filter-box {
  backdrop-filter: blur(8px);
}

@media (min-width: 768px) {
  .main { padding: 20px 24px 48px; }
  .stat-cards { grid-template-columns: 1fr 1fr 1.4fr; }
}

/* ── Professional Support Chat (trader) ── */
.support-page { margin-top: 2px; }
.support-shell { max-width: 640px; margin: 0 auto; }
.support-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.support-hero-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #4BB0FF, #0A1628);
  box-shadow: 0 4px 14px rgba(21, 101, 168, 0.28);
  flex-shrink: 0;
}
.support-hero-text { flex: 1; min-width: 0; }
.support-hero-text h1 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0;
}
.support-hero-text p {
  font-size: 11px;
  color: var(--muted);
  margin: 2px 0 0;
  line-height: 1.35;
}
.support-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #EEF2F6;
  color: #5B6B7C;
  flex-shrink: 0;
}
.support-status-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.support-status-pill.is-open {
  background: #E7F7EF;
  color: #0F7A45;
}
.support-status-pill.is-closed {
  background: #FDECEC;
  color: #C0272C;
}

.support-panel {
  background: var(--card);
  border: 1px solid rgba(213, 222, 232, 0.9);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.support-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #F7FAFC, #fff);
}
.support-panel-head strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}
.support-panel-sub {
  font-size: 10px;
  color: var(--muted);
}

.support-thread.chat-thread,
.chat-thread.support-thread {
  max-height: min(50vh, 380px);
  min-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(75, 176, 255, 0.08), transparent 50%),
    #F2F6FA;
  border: none;
  border-radius: 0;
}

.chat-empty {
  text-align: center;
  color: var(--muted);
  padding: 36px 16px;
  margin: auto 0;
}
.chat-empty-ico {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--blue-mid);
}
.chat-empty h3 {
  font-size: 14px;
  color: var(--navy);
  margin: 0 0 4px;
}
.chat-empty p {
  font-size: 11px;
  line-height: 1.4;
  max-width: 260px;
  margin: 0 auto;
}

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  max-width: 92%;
}
.chat-row.is-me { align-self: flex-end; flex-direction: row-reverse; }
.chat-row.is-them { align-self: flex-start; }
.chat-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
  background: #EAF3FB;
  color: var(--blue-mid);
  border: 1px solid rgba(21, 101, 168, 0.12);
}
.chat-row.is-me .chat-avatar {
  background: linear-gradient(135deg, #4BB0FF, #0A1628);
  color: #fff;
  border: none;
}
.chat-bubble {
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.45;
  max-width: 100%;
}
.chat-row.is-me .chat-bubble {
  background: linear-gradient(145deg, #1A73C7 0%, #0A1628 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(10, 22, 40, 0.18);
}
.chat-row.is-them .chat-bubble {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(10, 22, 40, 0.04);
}
.chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  opacity: 0.72;
  margin-bottom: 3px;
  font-weight: 600;
}
.chat-body { white-space: pre-wrap; word-break: break-word; }

.support-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--muted);
  background: #FAFBFC;
  border-top: 1px solid var(--border);
}
.telegram-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  background: linear-gradient(100deg, #E8F4FF, #F0F7FC);
  border-top: 1px solid rgba(21, 101, 168, 0.12);
  border-bottom: 1px solid rgba(21, 101, 168, 0.08);
}
.telegram-cta-ico {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--blue-mid);
  border: 1px solid rgba(21, 101, 168, 0.15);
  flex-shrink: 0;
}
.telegram-cta-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 11px;
  color: #3D5A73;
  flex: 1;
  min-width: 0;
}
.telegram-cta-text strong { font-size: 12px; color: var(--navy); }
.telegram-btn { flex-shrink: 0; white-space: nowrap; }

.support-compose {
  margin: 0;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.compose-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}
.compose-box textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
  font-size: 12.5px;
  resize: vertical;
  min-height: 48px;
  max-height: 120px;
  outline: none;
  background: #F7F9FC;
}
.compose-box textarea:focus {
  border-color: var(--blue-mid);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(21, 101, 168, 0.1);
}
.compose-send {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
}
@media (max-width: 420px) {
  .telegram-cta { flex-wrap: wrap; }
  .telegram-btn { width: 100%; justify-content: center; }
}
