/* ======================================
   FONTS
   ====================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ======================================
   CSS VARIABLES
   ====================================== */
:root {
  --color-primary: #7b58ce;
  --color-primary-hover: #6a48c0;
  --color-primary-light: rgba(123, 88, 206, 0.10);
  --color-primary-accent: #9747FF;

  --color-green: #2FBD6A;
  --color-green-bg: rgba(47, 189, 106, 0.12);
  --color-yellow: #F1AE01;
  --color-yellow-bg: rgba(241, 174, 1, 0.12);
  --color-red: #E53E3E;
  --color-red-bg: rgba(229, 62, 62, 0.12);

  --color-text: #1a1a2e;
  --color-text-muted: #6b7280;
  --color-border: #e8e8f0;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.13);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Outfit', sans-serif;

  --mobile-bottom-nav-height: 64px;

  /* Surfaces (theme-aware) */
  --surface: #ffffff;
  --surface-2: #f5f4fb;
  --bg-gradient: linear-gradient(135deg, #f0eeff 0%, #faf8ff 45%, #eef4ff 100%);
  --glass: rgba(255, 255, 255, 0.82);
  --glass-strong: rgba(255, 255, 255, 0.88);
}

/* ======================================
   DARK THEME
   ====================================== */
:root[data-theme="dark"] {
  --color-primary-light: rgba(151, 71, 255, 0.20);

  --color-text: #e8e8f2;
  --color-text-muted: #9aa0b4;
  --color-border: #2c2c40;

  --surface: #191926;
  --surface-2: #23233a;
  --bg-gradient: linear-gradient(135deg, #0e0e17 0%, #14141f 45%, #0f0f1a 100%);
  --glass: rgba(28, 28, 44, 0.82);
  --glass-strong: rgba(22, 22, 36, 0.90);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.40);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}

/* ======================================
   BASE
   ====================================== */
body {
  min-width: 100%;
  min-height: 100%;
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--bg-gradient);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1.05rem !important; }
h6 { font-size: 0.95rem; }

a { color: var(--color-primary); }
a:hover { color: var(--color-primary-hover); }

/* ======================================
   LAYOUT
   ====================================== */
.main_wrap {
  max-width: 1440px !important;
  margin: 15px auto;
  padding: 10px;
}

.v_center {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
}

.block_center {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 70px);
  height: auto;
}

.chng {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.profile_grid {
  display: flex;
}

.column_2 {
  flex: 50%;
}

/* ======================================
   DESKTOP SIDEBAR
   ====================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 24px);
  position: sticky;
  top: 12px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255,255,255,0.7);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(123,88,206,0.10), 0 2px 8px rgba(0,0,0,0.06);
  padding: 20px 12px 16px;
  overflow: hidden;
}

/* Logo */
.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 20px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 16px;
}
.sidebar__logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px;
  box-shadow: 0 4px 12px rgba(123,88,206,.35);
  flex-shrink: 0;
}
.sidebar__logo-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav */
.sidebar__nav { flex: 1; overflow-y: auto; scrollbar-width: none; }
.sidebar__nav::-webkit-scrollbar { display: none; }

.sidebar__section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--color-text-muted);
  padding: 0 10px;
  margin-bottom: 4px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.18s ease;
  margin-bottom: 2px;
  position: relative;
}
.sidebar__link:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.sidebar__link.active {
  background: linear-gradient(135deg, rgba(123,88,206,.15), rgba(151,71,255,.08));
  color: var(--color-primary);
  font-weight: 600;
}
.sidebar__link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-primary-accent));
  border-radius: 0 3px 3px 0;
}

.sidebar__icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
  background: transparent;
  transition: background .18s;
  flex-shrink: 0;
  font-size: 13px;
}
.sidebar__link:hover .sidebar__icon,
.sidebar__link.active .sidebar__icon {
  background: rgba(123,88,206,.12);
  color: var(--color-primary);
}

/* Footer */
.sidebar__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  margin-top: 8px;
}
.sidebar__user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  text-decoration: none !important;
}
.sidebar__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-accent));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar__user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__user-email {
  font-size: 10px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__logout {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border: none;
  background: none;
  color: var(--color-text-muted);
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  transition: background .18s, color .18s;
}
.sidebar__logout:hover { background: var(--color-red-bg); color: var(--color-red); }

/* ======================================
   MOBILE BOTTOM NAVIGATION
   ====================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(123,88,206,.12);
  box-shadow: 0 -8px 32px rgba(123,88,206,.10);
  height: var(--mobile-bottom-nav-height);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  text-decoration: none !important;
  font-size: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  gap: 3px;
  transition: color 0.2s ease;
  padding: 6px 4px 8px;
  position: relative;
}

.mobile-nav-pill {
  position: absolute;
  top: 6px;
  width: 36px; height: 4px;
  border-radius: 99px;
  background: var(--color-primary);
  opacity: 0;
  transform: scaleX(0);
  transition: opacity .2s, transform .2s;
}

.mobile-nav-item i {
  font-size: 20px;
  color: inherit;
  transition: transform 0.2s ease;
}

.mobile-nav-item span {
  font-size: 10px;
  letter-spacing: 0.02em;
}

.mobile-nav-item.active {
  color: var(--color-primary);
}
.mobile-nav-item.active .mobile-nav-pill {
  opacity: 1;
  transform: scaleX(1);
}
.mobile-nav-item.active i {
  transform: translateY(1px);
}

.mobile-nav-item:hover {
  color: var(--color-primary);
  text-decoration: none !important;
}

/* ======================================
   WINDOW / CARD
   ====================================== */
.window_info {
  background-color: var(--surface);
  color: var(--color-text);
  margin: 10px auto;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.window_headlines {
  padding-left: 15px;
}

/* ======================================
   WALLET CARDS
   ====================================== */
.balance_btc_user {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1.587 / 1;
  border-radius: var(--radius-lg);
  padding: 20px;
  color: white;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0 auto;
  overflow: hidden;
}

.violet_card {
  background: linear-gradient(135deg, #1e0b40 0%, #4c1d95 42%, #6d28d9 78%, #7c3aed 100%);
}
.violet_card::before {
  content: '';
  position: absolute;
  top: -70px; right: -50px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,0.09);
  pointer-events: none;
}
.violet_card::after {
  content: '';
  position: absolute;
  bottom: -90px; left: -40px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  pointer-events: none;
}

.black_card {
  min-height: 12rem;
  background: linear-gradient(135deg, #050d1a 0%, #0d2241 45%, #163354 75%, #1a4068 100%);
}
.black_card::before {
  content: '';
  position: absolute;
  top: -60px; right: -40px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(99,179,237,0.08);
  pointer-events: none;
}
.black_card::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -30px;
  width: 270px; height: 270px;
  border-radius: 50%;
  background: rgba(56,139,196,0.06);
  pointer-events: none;
}

.balance_usd_user {
  display: flex;
  justify-content: space-between;
}

.balance_btc_user_balance {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.total_balance_p {
  font-family: var(--font-heading);
  font-size: 1.3em;
  margin-bottom: 40px;
  text-align: right;
  line-height: 1.5;
}

.total_balance_p span {
  font-size: 1.4em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card_number_block {
  width: 100%;
  font-family: 'Space Grotesk', monospace;
  letter-spacing: 0.06em;
  font-size: 13px;
  opacity: 0.9;
}

/* ======================================
   BUTTONS
   ====================================== */
.btn {
  border: 1.5px solid transparent;
  padding: 11px 36px !important;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  border-radius: var(--radius-sm);
  margin: 8px auto;
  width: 100%;
  cursor: pointer;
}

.grey_btn {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.grey_btn:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: white;
  box-shadow: 0 4px 16px rgba(123, 88, 206, 0.35);
  transform: translateY(-1px);
}

.white_btn {
  background-color: white;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.white_btn:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn:hover {
  background-color: var(--color-primary-hover);
  color: white;
}

.btn[disabled] {
  display: none;
}

.fix_btn {
  max-width: 140px;
}

.login_form_button .btn {
  margin: 10px auto;
  width: 100%;
  border: none;
}

/* ======================================
   FORMS & INPUTS
   ====================================== */
input, .popup input {
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, .popup input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

form input, form select, .popup input {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
}

.login_first_form #email,
.login_first_form #password {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin: 8px auto;
  border: 1.5px solid var(--color-border);
  font-size: 14px;
  font-family: var(--font-body);
}

.login_first_form #email:focus,
.login_first_form #password:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
  outline: none;
}

.reg_first_form #name,
.reg_first_form #last_name,
.reg_first_form #phone_number,
.reg_first_form #email,
.reg_first_form #password,
.reg_first_form #password-confirm {
  width: 100%;
}

.reg_first_form input {
  box-sizing: border-box;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin: 8px auto;
  border: 1.5px solid var(--color-border);
  font-size: 14px;
  font-family: var(--font-body);
}

.dec_first_form label, .dec_first_form input {
  font-weight: 400;
}

.dec_first_form input {
  box-sizing: border-box;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1.5px solid var(--color-border);
}

.dec_first_form {
  padding: 0;
}

.dec_column {
  display: flex;
  align-items: flex-end;
}

input[type="file"] {
  display: none !important;
}

.custom-file-upload {
  border: 1.5px solid var(--color-border);
  display: inline-block;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  transition: border-color 0.2s ease;
}

.custom-file-upload:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.mob_padd input {
  color: var(--color-text);
}

.col-md-2.mob_padd {
  padding: 0;
}

/* ======================================
   AUTH PAGES
   ====================================== */
.login_first_form {
  background: var(--surface);
  margin: 0 auto;
  padding: 40px 36px;
  border-radius: var(--radius-lg);
  font-weight: 400;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.6);
  min-width: 340px;
}

.reg_first_form {
  background: var(--surface);
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 36px;
  border-radius: var(--radius-lg);
  font-weight: 400;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-lg);
}

.login_page {
  display: flex;
  align-items: center;
  flex-direction: column;
  min-height: calc(100vh - 70px);
  text-align: center;
  justify-content: center;
}

.main_screen {
  width: 100%;
  color: whitesmoke;
}

.main_screen p {
  max-width: 420px;
  margin: 0 auto;
  padding: 20px;
}

.login_form_span_grey {
  color: var(--color-text-muted);
  font-size: 13px;
}

.login_form_2colums {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin: 8px 0;
}

.login_form_2colums a, .v_center a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.login_form_2colums a:hover, .v_center a:hover {
  text-decoration: underline;
}

.forgot_pass {
  flex-direction: column;
}

.log_first_block {
  display: flex;
  justify-content: space-between;
  width: 50%;
}

/* ======================================
   LANDING PAGE / HERO
   ====================================== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4%;
  margin-top: 40px;
}

.logo_block {
  display: flex;
  align-items: center;
}

.logo_img {
  max-width: 65px;
  padding: 5px;
  width: 35px;
  height: 35px;
}

.main_menu_login {
  margin: 0 5px;
  padding: 0 10px;
  color: black;
  text-decoration: underline;
}

.guest_block {
  position: fixed;
  height: 60vh;
  background: url(/bg_image.svg);
  background-size: cover;
  width: 96%;
  border-radius: var(--radius-md);
  top: 30%;
  z-index: -1;
  margin: 35px auto;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ======================================
   STATUS BADGES & COLORS
   ====================================== */
.verifi_status {
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  height: 100%;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-family: var(--font-heading);
}

.green-text  { background: var(--color-green-bg);  color: var(--color-green); }
.yellow-text { background: var(--color-yellow-bg); color: var(--color-yellow); }
.red-text    { background: var(--color-red-bg);    color: var(--color-red); }

.green-text-status  { color: var(--color-green); }
.yellow-text-status { color: var(--color-yellow); }
.red-text-status    { color: var(--color-red); }
.blue-text-status   { color: #2142c4; }

.yellow-text-status::after {
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f110";
  margin-left: 5px;
  animation: rotating 2s linear infinite;
}

i, .violet {
  color: var(--color-primary);
}

i.fa-solid.fa-shield {
  color: inherit;
}

/* ======================================
   TABLES
   ====================================== */
table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 13px;
}

thead th:nth-child(1) {
  width: 7%;
}

th {
  padding: 11px 16px !important;
  text-align: left;
  overflow: hidden;
  white-space: nowrap !important;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  background-color: var(--surface-2);
  border-bottom: 1px solid var(--color-border);
}

td {
  padding: 12px 16px !important;
  text-align: left;
  overflow: hidden;
  white-space: nowrap !important;
  color: var(--color-text);
  font-size: 13px;
}

tbody tr {
  border-bottom: 1px solid #f2f2f8;
  transition: background-color 0.15s ease;
}

tbody tr:hover {
  background-color: var(--surface-2);
}

tbody tr:last-child {
  border-bottom: none;
}

td a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
}

td a:hover {
  text-decoration: underline;
}

/* ======================================
   TABS
   ====================================== */
.nav-tabs {
  border-bottom: 2px solid var(--color-border) !important;
  display: flex;
  justify-content: flex-start;
  gap: 4px;
  margin-bottom: 16px;
}

.nav-tabs > li > a {
  background-color: transparent;
  border: none !important;
  color: var(--color-text-muted) !important;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-heading);
  padding: 8px 16px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color 0.2s ease;
}

.nav-tabs > li > a:hover {
  color: var(--color-primary) !important;
  background-color: var(--color-primary-light);
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:focus,
.nav-tabs > li.active > a:hover {
  background-color: transparent !important;
  border: none !important;
  border-bottom: 2px solid var(--color-primary) !important;
  color: var(--color-primary) !important;
  margin-bottom: -2px;
}

.tab-content form, .transction_cr form {
  display: flex;
  flex-direction: column;
}

.tab-content form label, .tab-content form button,
.transction_cr form label, .transction_cr form button {
  font-weight: 400;
}

.tab-content, .transction_cr {
  font-weight: 400;
}

/* ======================================
   POPUPS & MODALS
   ====================================== */
.popup_open {
  display: none;
  padding: 24px;
  background-color: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
  border-radius: var(--radius-md);
}

.popup {
  display: none;
  padding: 24px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  z-index: 1000;
}

.popup h4, .popup label {
  font-weight: 500;
  font-family: var(--font-heading);
}

.popup input {
  width: 100%;
}

/* ======================================
   COPY / WALLET
   ====================================== */
#copySuccessMessage {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 999;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-family: var(--font-heading);
}

.wallet_copy_deposit {
  display: flex;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* ======================================
   VARIOUS COMPONENTS
   ====================================== */
.header_betwen {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

button {
  background: none;
  outline: none;
  border: none;
  cursor: pointer;
}

.useBalanceButton {
  color: var(--color-primary);
  font-weight: 500;
}

.edit_string {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  margin-top: 10px;
  padding: 10px;
}

.edit_string p {
  margin: 0;
  width: 100%;
}

.foto_string {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  padding: 10px;
}

.foto_string a {
  width: 100%;
}

.foto_string i {
  color: var(--color-red) !important;
}

input#searchInput {
  max-width: 250px;
  width: 100%;
}

.actions_table_btn {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.label_black {
  color: var(--color-text) !important;
}

.policy_agreement1 {
  color: var(--color-primary);
}

.terms_policy span, .terms_policy a {
  color: var(--color-text-muted) !important;
  font-weight: 400;
  font-size: 13px;
  padding-left: 15px;
}

span.invalid-feedback {
  color: var(--color-red);
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

.text-error { color: var(--color-red); }

/* ======================================
   ADMIN FORMS
   ====================================== */
.user_edit_form1 label {
  margin: 5px 10px 5px 0;
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 13px;
}

.user_edit_form1 input, .user_edit_form1 select, .user_edit_form label {
  box-sizing: border-box;
  margin: 5px auto !important;
  border: none;
  padding: 4px 6px;
}

.user_edit_form1 input:focus-visible {
  border-bottom: 1px dotted var(--color-primary);
  outline: none;
  margin-left: 10px !important;
  margin-right: 10px !important;
}

.user_edit_form1 input {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.user_edit_form input, .user_edit_form select {
  width: 100%;
  box-sizing: border-box;
  margin: 5px auto;
  padding: 4px 6px;
}

.user_edit_form label {
  display: inline-block;
  font-size: 13px;
  color: var(--color-text-muted);
}

.user_edit_form span {
  margin: 5px auto;
  max-width: 16em;
  width: 100%;
}

.btnform {
  text-align: center;
}

/* ======================================
   SWITCH TOGGLE
   ====================================== */
.remember_me_block {
  display: flex;
  align-items: center;
}

.remember_me_block p {
  margin: 10px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.switch {
  position: relative;
  display: inline-block;
}

.switch-input {
  display: none;
}

.switch-label {
  display: block;
  width: 34px;
  height: 18px;
  clip: rect(0 0 0 0);
  color: transparent;
  user-select: none;
}

.switch-label::before,
.switch-label::after {
  content: "";
  display: block;
  position: absolute;
  cursor: pointer;
}

.switch-label::before {
  width: 100%;
  height: 100%;
  background-color: #d1d5db;
  border-radius: 9999em;
  transition: background-color 0.25s ease;
}

.switch-label::after {
  top: 3px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: left 0.25s ease;
}

.switch-input:checked + .switch-label::before {
  background-color: var(--color-primary);
}

.switch-input:checked + .switch-label::after {
  left: 20px;
}

/* ======================================
   TOOLTIP
   ====================================== */
.item {
  display: block;
  position: relative;
}

.item:after {
  content: attr(data-title);
  position: absolute;
  top: -100px;
  left: 40px;
  width: 300px;
  background: var(--color-primary-accent);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  opacity: 0;
  transform: translateY(-20px);
  transition: 0.25s ease;
  color: #fff;
  box-shadow: 0 8px 24px rgba(151, 71, 255, 0.28);
  pointer-events: none;
  font-size: 13px;
  font-family: var(--font-body);
}

.item:hover:after {
  opacity: 1;
  transform: translateY(0);
}

/* ======================================
   FLOATING ACTION BUTTON
   ====================================== */
.main-button1 {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 54px;
  height: 54px;
  background-color: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  text-align: center;
  line-height: 54px;
  cursor: pointer;
  font-size: 1.35em;
  animation: scaling 3s infinite;
  box-shadow: 0 4px 18px rgba(123, 88, 206, 0.45);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
}

.main-button1 i {
  color: #fff;
  font-size: 20px;
}

.expanded-menu {
  display: none;
  position: fixed;
  bottom: 70px;
  right: 20px;
}

.expanded-button {
  width: 40px;
  height: 40px;
  font-size: 2em;
  background-color: var(--surface);
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  margin-bottom: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* ======================================
   PHONE INPUT
   ====================================== */
.iti--separate-dial-code .iti__selected-flag {
  border-radius: 7px 0 0 7px;
}

/* ======================================
   CHAT
   ====================================== */

/* Layout wrapper */
.chat-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px;
}

/* Admin: sidebar + main side by side */
.chat-layout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

/* Sidebar (admin conversations list) */
.chat-sidebar-wrap {
  width: 280px;
  flex-shrink: 0;
}

.chat-sidebar {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 130px);
}

.chat-sidebar__head {
  padding: 13px 16px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-sidebar__head i {
  color: var(--color-primary);
  font-size: 13px;
}

/* Conversation list */
.conv-list {
  list-style: none;
  padding: 6px;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0; /* important: allows flex child to scroll */
}

.conv-scroll {
  max-height: 460px;
  overflow-y: auto;
}

.conv-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
  margin-bottom: 2px;
}

.conv-item:hover {
  background: var(--color-primary-light);
}

.conv-item:last-child { margin-bottom: 0; }

.conv-item .fw-semibold {
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--color-text);
}

/* ID badge */
.id-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.4;
}

/* Unread dot */
.unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-red);
  flex-shrink: 0;
}

/* Main chat column */
.chat-main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  height: calc(100vh - 130px);
}

/* Chat header bar */
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  background: var(--surface);
  flex-shrink: 0;
}

.chat-header__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.chat-header__avatar i { color: var(--color-primary); }

.chat-header__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
}

.chat-header__sub {
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

.chat-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-green);
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(47,189,106,0.2);
}

.chat-online-dot--offline {
  background: var(--color-text-muted);
  box-shadow: none;
}

.conv-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-green);
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(47,189,106,0.2);
}

.msg-time {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  line-height: 1;
  opacity: .65;
}
.msg-line.me .msg-time { text-align: right; color: rgba(255,255,255,.8); }
.msg-line.peer .msg-time { text-align: left; color: var(--color-text-muted); }

.msg-receipt {
  display: block;
  font-size: 10px;
  text-align: right;
  margin-top: 3px;
  color: rgba(255,255,255,0.55);
  line-height: 1;
}

.msg-receipt.read {
  color: #a8edbb;
}

/* Messages area */
#messages {
  flex: 1;
  min-height: 0; /* critical: lets flex child shrink and scroll */
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  padding: 18px 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Message bubbles */
.msg-line {
  max-width: 72%;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
}

.msg-line.peer {
  align-self: flex-start;
  background: var(--color-green-bg);
  color: var(--color-text);
  border-radius: 4px 16px 16px 16px;
  border: none;
  border-left: 3px solid var(--color-green);
  box-shadow: var(--shadow-sm);
}

.msg-line.me {
  align-self: flex-end;
  background: var(--color-primary);
  color: #fff;
  border-radius: 16px 4px 16px 16px;
  text-align: left;
}

/* Sent but not yet acknowledged by the server (delivery pending / retrying) */
.msg-line.msg-pending { opacity: .55; }

.msg-who {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.msg-line.peer .msg-who {
  color: var(--color-green);
}

.msg-line.me .msg-who {
  color: rgba(255, 255, 255, 0.7);
}

/* Message text — preserve newlines */
.msg-text {
  white-space: pre-wrap;
  word-break: break-word;
  display: inline;
}

/* Empty / loading message */
.chat-empty-msg {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
  margin: auto;
  padding: 24px;
}

/* Input bar */
.chat-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--color-border);
  background: var(--surface);
  flex-shrink: 0;
}

.chat-input-field {
  flex: 1;
  border: 1.5px solid var(--color-border);
  border-radius: 24px;
  padding: 11px 18px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: var(--surface-2);
  min-height: 44px;
  resize: none;
  overflow-y: auto;
  line-height: 1.45;
}

.chat-input-field:focus {
  border-color: var(--color-primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.chat-send-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-primary);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(123, 88, 206, 0.35);
}

.chat-send-btn i { color: #fff; }

.chat-send-btn:hover {
  background: var(--color-primary-hover);
  transform: scale(1.06);
  box-shadow: 0 5px 16px rgba(123, 88, 206, 0.45);
}

.chat-send-btn:active { transform: scale(0.96); }

/* Attach image button */
.chat-attach-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-light);
  border: 1.5px solid rgba(123,88,206,.2);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s, transform .15s;
}
.chat-attach-btn:hover { background: rgba(123,88,206,.18); transform: scale(1.06); }

/* Camera button: desktop hidden, mobile visible */
.chat-camera-btn { display: none; }
@media (max-width: 767px) {
  .chat-camera-btn { display: flex; }
}

/* Image preview above input */
.chat-img-preview {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 0;
  background: var(--surface);
}
.chat-img-preview img {
  max-height: 72px;
  max-width: 180px;
  border-radius: 8px;
  object-fit: cover;
  border: 1.5px solid var(--color-border);
}
.chat-img-preview__info {
  flex: 1;
  font-size: 12px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-img-preview__cancel {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-red-bg);
  border: none;
  color: var(--color-red);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  transition: opacity .2s;
}
.chat-img-preview__cancel:hover { opacity: .75; }

/* Image inside a message bubble */
.msg-img {
  display: block;
  max-width: 260px;
  max-height: 200px;
  border-radius: 10px;
  margin: 2px 0 4px;
  cursor: zoom-in;
  object-fit: cover;
}

/* Document attachment chip inside a message bubble */
.msg-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  margin: 2px 0 4px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,.05);
  border: 1px solid var(--color-border);
  color: inherit;
  text-decoration: none;
  font-size: 13px;
}
.msg-file:hover { background: rgba(0,0,0,.09); }
.msg-file i { font-size: 18px; flex-shrink: 0; }
.msg-file__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Document preview chip in the input bar */
.chat-doc-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(0,0,0,.05);
  border: 1.5px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-muted);
}
.chat-doc-preview i { font-size: 18px; flex-shrink: 0; }
.chat-doc-preview span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Fullscreen image lightbox */
.chat-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
  padding: 20px;
}
.chat-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
}

/* Message edit button (admin only, own messages) */
.msg-line.me .msg-edit-btn {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,.18);
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 5px;
  opacity: .55;
  vertical-align: middle;
  line-height: 1;
  transition: opacity .15s, background .15s;
  margin-left: 4px;
}
.msg-line.me:hover .msg-edit-btn,
.msg-line.me .msg-edit-btn:hover { opacity: 1; background: rgba(255,255,255,.3); }

.msg-line.peer .msg-edit-btn {
  background: rgba(123,88,206,.1);
  color: var(--color-primary);
}
.msg-line.peer:hover .msg-edit-btn,
.msg-line.peer .msg-edit-btn:hover { opacity: 1; background: rgba(123,88,206,.2); }

/* Delete button — shown on both own and peer messages for admin */
.msg-del-btn {
  display: inline-flex;
  align-items: center;
  background: rgba(220,38,38,.15);
  border: none;
  cursor: pointer;
  color: #dc2626;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 5px;
  opacity: .25;
  vertical-align: middle;
  line-height: 1;
  transition: opacity .15s, background .15s;
  margin-left: 4px;
}
.msg-line.me .msg-del-btn { background: rgba(255,255,255,.18); color: #fff; }
.msg-line:hover .msg-del-btn,
.msg-del-btn:hover { opacity: 1; }
.msg-line.me .msg-del-btn:hover { background: rgba(255,80,80,.4); }
.msg-line.peer .msg-del-btn:hover { background: rgba(220,38,38,.2); }
.msg-edited-label {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-left: 3px;
  font-style: italic;
}
.msg-line.editing {
  max-width: 96% !important;
  width: 96%;
  align-self: stretch !important;
}

.msg-inline-edit {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 3px;
  width: 100%;
}
.msg-inline-edit textarea {
  flex: 1;
  min-width: 0;
  padding: 5px 10px;
  border: 1.5px solid var(--color-primary);
  border-radius: 7px;
  font-size: 13px;
  outline: none;
  background: var(--surface);
  resize: none;
  overflow-y: auto;
  min-height: 80px;
  max-height: 320px;
  line-height: 1.4;
  font-family: inherit;
  color: var(--color-text);
}
.msg-inline-edit .btn-edit-save,
.msg-inline-edit .btn-edit-cancel {
  border: none;
  cursor: pointer;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  transition: opacity .15s;
}
.msg-inline-edit .btn-edit-save   { background: #16a34a; color: #fff; }
.msg-inline-edit .btn-edit-cancel { background: #dc2626; color: #fff; }
.msg-inline-edit .btn-edit-save:hover,
.msg-inline-edit .btn-edit-cancel:hover { opacity: .8; }

/* Legacy input-group support */
.chat-input-row { margin-top: 12px; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Mobile chat — full-screen fixed layout */
@media only screen and (max-width: 768px) {

  /* Stop body from scrolling on chat page */
  body.on-chat-page {
    overflow: hidden;
    padding-bottom: 0 !important;
  }

  /* Remove main_wrap padding so chat fills edge-to-edge */
  body.on-chat-page .main_wrap {
    padding: 0 !important;
    margin: 0 !important;
  }

  .chat-shell {
    padding: 0;
  }

  .chat-layout {
    flex-direction: column;
    gap: 0;
  }

  /* ── Admin sidebar: fixed strip at top ── */
  body.on-chat-page .chat-sidebar-wrap {
    width: 100%;
  }

  body.on-chat-page .chat-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 172px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    z-index: 30;
    margin: 0;
  }

  /* ── Main chat panel: fixed, fills remaining screen ── */
  body.on-chat-page .chat-main-wrap {
    position: fixed;
    top: 0;           /* user: starts at very top */
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-bottom-nav-height) + 62px); /* above nav + input */
    height: auto !important;
    border-radius: 0;
    margin: 0;
    z-index: 20;
  }

  /* Admin: push chat panel below the fixed sidebar */
  body.on-chat-page .chat-shell--admin .chat-main-wrap {
    top: 172px;
  }

  /* Messages fill the panel minus header, scrollable */
  body.on-chat-page #messages {
    padding: 12px 12px 16px;
  }

  /* Input bar: fixed just above bottom nav */
  .chat-input-bar {
    position: fixed;
    bottom: var(--mobile-bottom-nav-height);
    left: 0;
    right: 0;
    z-index: 99;
    padding: 10px 12px;
    background: var(--surface);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  }

  .msg-line {
    max-width: 88%;
    font-size: 14px;
  }
}

/* ======================================
   TRANSACTION LIST
   ====================================== */

.tx-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tx-page-header h2,
.tx-page-header h5 {
  margin: 0;
}

.tx-count {
  font-size: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--surface-2);
  padding: 3px 10px;
  border-radius: 999px;
}

/* List container */
.tx-list {
  display: flex;
  flex-direction: column;
}

/* Single row */
.tx-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 6px;
  border-bottom: 1px solid #f0f0f6;
  transition: background 0.15s ease;
  border-radius: var(--radius-sm);
}

.tx-item:last-child {
  border-bottom: none;
}

.tx-item:hover {
  background: var(--surface-2);
}

/* Circular icon */
.tx-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}

.tx-icon--deposit {
  background: var(--color-green-bg);
  color: var(--color-green);
}

.tx-icon--withdrawal {
  background: var(--color-red-bg);
  color: var(--color-red);
}

.tx-icon--transfer {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Type + date */
.tx-info {
  min-width: 100px;
  flex-shrink: 0;
}

.tx-type {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
}

.tx-date {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Hash/address meta */
.tx-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.tx-meta-label {
  font-size: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  display: block;
}

.tx-meta-value {
  font-family: 'Space Grotesk', monospace;
  font-size: 12px;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  margin-top: 1px;
}

/* Balance column */
.tx-balance-col {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-width: 80px;
}

/* Amount + status */
.tx-right {
  text-align: right;
  flex-shrink: 0;
  min-width: 110px;
}

.tx-amount {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}

.tx-amount--positive { color: var(--color-green); }
.tx-amount--negative { color: var(--color-red); }
.tx-amount--neutral  { color: var(--color-primary); }

/* Status badge pill */
.tx-status-badge {
  display: inline-block;
  font-size: 11px;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  margin-top: 5px;
}

.tx-badge--green {
  background: var(--color-green-bg);
  color: var(--color-green);
}

.tx-badge--yellow {
  background: var(--color-yellow-bg);
  color: var(--color-yellow);
}

.tx-badge--red {
  background: var(--color-red-bg);
  color: var(--color-red);
}

/* View all link */
.tx-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  padding: 11px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tx-view-all:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}

.tx-view-all i {
  font-size: 12px;
  color: inherit;
  transition: transform 0.2s ease;
}

.tx-view-all:hover i {
  transform: translateX(3px);
}

/* Empty state */
.tx-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--color-text-muted);
}

.tx-empty i {
  font-size: 42px;
  margin-bottom: 12px;
  color: #d1d5db;
}

.tx-empty p {
  margin: 0;
  font-size: 15px;
}

/* ======================================
   SCAN CRYPTO LOG
   ====================================== */
.scan_log {
  font-family: 'Space Grotesk', monospace;
  font-size: 13px;
  color: var(--color-text);
}

/* ======================================
   RADIO CUSTOM
   ====================================== */
input[type='radio']:checked:after {
  background-color: #ffa500 !important;
}

/* ======================================
   ANIMATIONS
   ====================================== */
@keyframes scaling {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes rotating {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ======================================
   DESKTOP — min-width 769px
   ====================================== */
@media only screen and (min-width: 769px) {
  .mobile-bottom-nav {
    display: none !important;
  }

  .card_number_block {
    margin-top: 50px;
  }
}

/* ======================================
   TABLET — max-width 992px
   ====================================== */
@media only screen and (max-width: 992px) {
  .main_wrap {
    padding: 8px;
  }
}

/* ======================================
   MOBILE — max-width 768px
   ====================================== */
@media only screen and (max-width: 768px) {

  /* Show bottom nav */
  .mobile-bottom-nav {
    display: flex !important;
  }

  /* Hide desktop sidebar entirely */
  .desktop-sidebar {
    display: none !important;
  }

  /* Content takes full width */
  main.col-md-10.container-fluid.mob_padd {
    width: 100% !important;
    padding: 0 !important;
    float: none !important;
  }

  /* Body padding so content isn't behind bottom nav */
  body {
    padding-bottom: calc(var(--mobile-bottom-nav-height) + 60px);
    font-size: 15px;
  }

  /* Main wrap */
  .main_wrap {
    margin: 0;
    padding: 0;
  }

  /* Cards — edge to edge with subtle gap */
  .window_info {
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 8px;
    box-shadow: var(--shadow-sm);
  }

  /* Page heading spacing */
  .window_info h2,
  .window_info h5 {
    margin-top: 0;
    margin-bottom: 12px;
  }

  /* --- WALLET CARD --- */
  .balance_btc_user {
    max-width: 100%;
    border-radius: var(--radius-md);
    padding: 16px;
  }

  .total_balance_p {
    font-size: 1.1em;
    margin-bottom: 24px;
  }

  /* --- TABLES AS MOBILE CARDS --- */
  .window_info table {
    font-size: 14px;
  }

  .window_info th {
    display: none;
  }

  .window_info tbody tr {
    display: block;
    margin: 0 0 10px 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
    padding: 4px 0;
  }

  .window_info tbody tr:last-child {
    margin-bottom: 0;
  }

  .window_info td {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 14px !important;
    white-space: normal !important;
    border-bottom: 1px solid #f4f4f4;
    font-size: 13px;
    word-break: break-word;
  }

  .window_info td:last-child {
    border-bottom: none;
  }

  .title_cell_td {
    display: inline-block !important;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 70px;
    margin-right: 8px;
    font-family: var(--font-heading);
  }

  .copy_table_td {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .copy_button {
    cursor: pointer;
  }

  /* --- FORMS --- */
  /* Prevent iOS input zoom — minimum 16px */
  input, select, textarea {
    font-size: 16px !important;
  }

  form input, form select, .popup input {
    font-size: 16px !important;
    padding: 13px 14px;
    min-height: 48px;
  }

  .btn {
    min-height: 50px;
    font-size: 15px !important;
    padding: 12px 24px !important;
    border-radius: var(--radius-sm);
  }

  .fix_btn {
    max-width: 230px;
  }

  .log_first_block {
    flex-direction: column;
  }

  .dec_column {
    flex-direction: column;
  }

  /* --- TABS --- */
  .nav-tabs {
    justify-content: stretch;
  }

  .nav-tabs > li {
    flex: 1;
    text-align: center;
  }

  .nav-tabs > li > a {
    padding: 10px 6px !important;
    font-size: 13px;
    text-align: center;
    display: block;
  }

  /* --- PROFILE --- */
  .profile_grid {
    flex-direction: column;
  }

  .column_2 {
    flex: 100%;
  }

  .edit_string {
    padding: 12px 6px;
  }

  .edit_string label {
    min-width: 90px;
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 600;
  }

  /* --- AUTH PAGES --- */
  .login_first_form {
    min-width: unset;
    width: calc(100% - 32px);
    padding: 28px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin: 0 16px;
  }

  .reg_first_form {
    padding: 24px 16px;
    border-radius: var(--radius-lg);
    margin: 0 8px;
  }

  .login_first_form #email,
  .login_first_form #password {
    font-size: 16px !important;
    padding: 14px 16px;
    min-height: 50px;
  }

  .reg_first_form input {
    font-size: 16px !important;
    min-height: 50px;
  }

  .block_center {
    min-height: 100vh;
    padding: 16px 0;
    align-items: flex-start;
    padding-top: 60px;
  }

  /* --- POPUPS --- */
  .popup, .popup_open {
    color: var(--color-text);
    display: none;
    padding: 24px 20px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    width: calc(100% - 32px);
    max-width: 340px;
    text-align: center;
    z-index: 1001;
  }

  /* --- CHAT --- */
  .chat-shell {
    padding-left: 0;
    padding-right: 0;
  }

  .chat-card {
    box-shadow: none;
    border-radius: var(--radius-md);
  }

  .conv-scroll {
    max-height: 240px;
  }

  .conv-item {
    padding: 10px 8px;
  }

  .msg-line {
    max-width: 100%;
    font-size: 14px;
    padding: 10px 12px;
  }

  .msg-line.me, .msg-line.peer {
    margin-left: 0;
    margin-right: 0;
    text-align: left;
  }

  #messages {
    height: 340px;
    padding: 12px;
  }

  .id-pill {
    margin-top: 4px;
  }

  .chat-card .d-flex {
    gap: 6px;
    flex-wrap: wrap;
  }

  .mob_padd {
    padding: 0 !important;
  }

  a.navbar-brand {
    margin-top: 0;
    margin-bottom: 0;
  }

  /* --- HEADER BETWEEN (status + badge) --- */
  .header_betwen h2 {
    font-size: 1.3rem;
  }

  /* --- SCANNER PAGE --- */
  .container.mt-5 {
    margin-top: 8px !important;
    padding: 0 8px;
  }
}

/* ======================================
   FLOATING CHAT BUTTON — MOBILE
   ====================================== */
@media only screen and (max-width: 768px) {
  .main-button1 {
    bottom: calc(var(--mobile-bottom-nav-height) + 14px);
    right: 16px;
    width: 50px;
    height: 50px;
    line-height: 50px;
  }
}

/* ======================================
   TRANSACTION LIST — MOBILE
   ====================================== */
@media only screen and (max-width: 768px) {
  .tx-item {
    padding: 12px 4px;
    gap: 10px;
  }

  /* Hide hash/balance columns on mobile — too cramped */
  .tx-meta,
  .tx-balance-col {
    display: none;
  }

  .tx-icon {
    width: 40px;
    height: 40px;
    font-size: 14px;
    flex-shrink: 0;
  }

  .tx-info {
    flex: 1;
    min-width: 0;
  }

  .tx-type {
    font-size: 14px;
  }

  .tx-right {
    min-width: 90px;
  }

  .tx-amount {
    font-size: 14px;
  }

  .tx-status-badge {
    font-size: 10px;
    padding: 2px 7px;
  }

  .tx-view-all {
    margin-top: 12px;
  }
}

/* ======================================
   SMALL PHONES — max-width 480px
   ====================================== */
@media only screen and (max-width: 480px) {
  .main_screen h1, .main_screen p {
    text-shadow: 1px 1px 1px #000, -1px -1px 1px #000;
  }

  .total_balance_p {
    margin-bottom: 20px;
    font-size: 1em;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }

  .window_info {
    margin: 6px;
    padding: 14px 12px;
  }

  .balance_btc_user {
    padding: 14px;
  }
}

/* ======================================
   VERY SMALL — max-width 320px
   ====================================== */
@media only screen and (max-width: 320px) {
  .main_screen h1, .main_screen p {
    text-shadow: 1px 1px 1px #000, -1px -1px 1px #000;
  }

  .header {
    margin-top: 20px;
  }

  .total_balance_p {
    margin-bottom: 0;
  }

  .mobile-nav-item span {
    display: none;
  }

  .mobile-nav-item i {
    font-size: 20px;
  }
}

/* ======================================
   LANDING PAGE (redesign) + AUTH PAGES
   ====================================== */
.landing-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-gradient);
  overflow-x: hidden;
  position: relative;
}

/* Soft decorative background blobs (fill empty side space) */
.landing-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  pointer-events: none;
}

.landing-blob--1 {
  width: 460px;
  height: 460px;
  top: 120px;
  left: -160px;
  background: radial-gradient(circle, rgba(151, 71, 255, 0.28), transparent 70%);
}

.landing-blob--2 {
  width: 520px;
  height: 520px;
  top: 320px;
  right: -180px;
  background: radial-gradient(circle, rgba(123, 88, 206, 0.24), transparent 70%);
}

/* --- Top navigation --- */
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 24px;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.landing-nav__logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--color-primary);
}

.landing-nav__links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-nav__link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  color: var(--color-primary);
  padding: 10px 20px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.landing-nav__link:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.landing-nav__link--cta {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-accent));
  color: #fff;
}

.landing-nav__link--cta:hover {
  background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary-accent));
  color: #fff;
  box-shadow: 0 6px 16px rgba(123, 88, 206, 0.32);
  transform: translateY(-1px);
}

/* --- Layout wrap --- */
.landing-wrap {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 24px 40px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.hero-stage {
  position: relative;
}

/* --- Hero (matches purple wave screenshot) --- */
.hero {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #7b58ce url('/bg_image.svg') center/cover no-repeat;
  background-blend-mode: normal;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px;
  box-shadow: 0 24px 60px rgba(123, 88, 206, 0.30);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(93, 63, 173, 0.10), rgba(93, 63, 173, 0.35));
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero__title {
  font-family: var(--font-heading);
  font-weight: 800;
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  text-shadow: 0 2px 12px rgba(40, 20, 90, 0.25);
}

.hero__subtitle {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.55;
  margin: 0 auto 40px;
  max-width: 640px;
}

.hero__actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__btn {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 18px 56px;
  border-radius: 16px;
  transition: all 0.2s ease;
  min-width: 200px;
  text-align: center;
}

.hero__btn--light {
  background: var(--surface);
  color: var(--color-primary);
  box-shadow: 0 10px 30px rgba(40, 20, 90, 0.22);
}

.hero__btn--light:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(40, 20, 90, 0.30);
  color: var(--color-primary-hover);
}

.hero__btn--ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.hero__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
  color: #fff;
}

/* --- Features --- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}

.feature-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 30px 26px;
  box-shadow: 0 8px 28px rgba(123, 88, 206, 0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(123, 88, 206, 0.18);
}

.feature-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: var(--color-primary-light);
  margin-bottom: 18px;
}

.feature-card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin: 0 0 8px;
  color: var(--color-text);
}

.feature-card__text {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

.landing-footer {
  text-align: center;
  padding: 24px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* ======================================
   AUTH PAGES (login / register)
   ====================================== */
.auth-body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg-gradient);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 42% 58%;
}

/* Left branded panel */
.auth-aside {
  position: relative;
  background: #7b58ce url('/bg_image.svg') center/cover no-repeat;
  color: #fff;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(93, 63, 173, 0.15), rgba(70, 40, 140, 0.45));
}

.auth-aside__logo,
.auth-aside__copy,
.auth-aside__mark {
  position: relative;
  z-index: 1;
}

.auth-aside__logo img {
  height: 44px;
  width: auto;
  display: block;
}

.auth-aside__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  color: #fff;
  margin: 0 0 18px;
}

.auth-aside__text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 420px;
  margin: 0;
}

.auth-aside__mark {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.8;
  font-size: 0.95rem;
}

/* Right form area */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  box-sizing: border-box;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-card--wide {
  max-width: 620px;
}

.auth-card__head {
  margin-bottom: 26px;
}

.auth-card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  margin: 0 0 6px;
  color: var(--color-text);
}

.auth-card__subtitle {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-field label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text);
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.auth-input.is-invalid {
  border-color: var(--color-red);
}

.auth-hint {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.auth-error {
  font-size: 0.8rem;
  color: var(--color-red);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  cursor: pointer;
}

.auth-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.auth-consents {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}

.auth-link {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-submit {
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  padding: 15px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-accent));
  transition: all 0.2s ease;
  margin-top: 4px;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(123, 88, 206, 0.38);
}

.auth-switch {
  text-align: center;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  margin: 6px 0 0;
}

.auth-switch a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-note {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0 0 6px;
}

.auth-alert {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 4px;
}

.auth-alert--success {
  background: var(--color-green-bg);
  color: var(--color-green);
  border: 1.5px solid rgba(47, 189, 106, 0.3);
}

.auth-alert--error {
  background: var(--color-red-bg);
  color: var(--color-red);
  border: 1.5px solid rgba(229, 62, 62, 0.3);
}

/* --- Responsive: landing + auth --- */
@media only screen and (max-width: 900px) {
  .features {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    padding: 32px 24px;
    min-height: 240px;
  }

  .auth-aside__text {
    font-size: 0.98rem;
  }
}

@media only screen and (max-width: 600px) {
  .hero {
    padding: 64px 20px;
    border-radius: 22px;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__btn {
    width: 100%;
    box-sizing: border-box;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-main {
    padding: 32px 20px;
  }

  .landing-nav {
    padding: 16px;
  }
}

/* ======================================
   LANDING — FLOATING CARDS (desktop)
   ====================================== */
.float-card {
  position: absolute;
  background: var(--glass-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(70, 40, 140, 0.18);
  padding: 18px 20px;
  z-index: 3;
  display: none;
  animation: floatCard 5s ease-in-out infinite;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.float-card__label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.float-card__value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--color-text);
  margin: 4px 0 6px;
  letter-spacing: -0.01em;
}

.float-card__trend {
  font-size: 0.82rem;
  font-weight: 600;
}

.float-card__trend--up { color: var(--color-green); }

.float-card__bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 40px;
  margin-top: 12px;
}

.float-card__bars span {
  flex: 1;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--color-primary-accent), var(--color-primary));
  opacity: 0.85;
}

.float-card__coin {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text);
}

.float-card__coin-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(135deg, #f7931a, #ffb347);
}

.float-card__avatars {
  display: flex;
}

.float-card__avatars span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.float-card__avatars span:first-child { margin-left: 0; }
.float-card__avatars span:nth-child(2) { background: linear-gradient(135deg, #34c3ff, #6a8bff); }
.float-card__avatars span:nth-child(3) { background: linear-gradient(135deg, #2fbd6a, #7be0a3); }

.float-card__users-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  max-width: 150px;
  margin-top: 10px;
  line-height: 1.4;
}

/* Live dot on the trades card */
.float-live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-green);
  margin-right: 3px;
  vertical-align: middle;
  animation: floatLivePulse 1.6s ease-in-out infinite;
}
@keyframes floatLivePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47,189,106,.5); }
  50%      { box-shadow: 0 0 0 5px rgba(47,189,106,0); }
}

/* Right-side watchlist stack */
.float-watchlist {
  position: absolute;
  top: 50%;
  right: -40px;
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  gap: 10px;
  z-index: 3;
}

.tick-card {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 216px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 15px;
  box-shadow: 0 14px 36px rgba(70, 40, 140, 0.16);
  padding: 11px 13px;
}

.tick-badge {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
  color: #fff; flex-shrink: 0;
}
.tick-badge--btc  { background: linear-gradient(135deg,#f7931a,#ffb347); }
.tick-badge--gold { background: linear-gradient(135deg,#f7b500,#e59400); font-size: 13px; }
.tick-badge--oil  { background: linear-gradient(135deg,#3a3a4d,#15151f); font-size: 15px; }
.tick-badge--usd  { background: linear-gradient(135deg,#2fbd6a,#1f9e57); }
.tick-badge--usdt { background: linear-gradient(135deg,#26a17b,#4fd1a5); }

.tick-info { flex: 1; min-width: 0; }
.tick-name { font-family: var(--font-heading); font-weight: 700; font-size: 13.5px; color: var(--color-text); line-height: 1.1; }
.tick-sub  { font-size: 10px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .3px; margin-top: 2px; }
.tick-right { text-align: right; }
.tick-price { font-family: var(--font-heading); font-weight: 800; font-size: 14px; color: var(--color-text); letter-spacing: -.01em; }
.tick-chg   { font-size: 11px; font-weight: 700; margin-top: 1px; }
.tick-chg--up   { color: var(--color-green); }
.tick-chg--down { color: var(--color-red); }
.tick-chg--flat { color: var(--color-text-muted); }
:root[data-theme="dark"] .tick-card { background: var(--glass-strong); border-color: rgba(255,255,255,0.08); }

/* Positions */
.float-card--trades {
  top: 16%;
  left: -40px;
  width: 220px;
  animation-delay: 0s;
}

.float-card--users {
  bottom: 10%;
  left: -30px;
  width: 210px;
  animation-delay: 2.2s;
}

/* Show only when there is gutter room */
@media only screen and (min-width: 1280px) {
  .float-card { display: block; }
  .float-watchlist { display: flex; }
}

@media only screen and (min-width: 1500px) {
  .float-card--trades { left: -130px; }
  .float-card--users  { left: -110px; }
  .float-watchlist    { right: -120px; }
}

@media only screen and (min-width: 1750px) {
  .float-card--trades { left: -200px; }
  .float-card--users  { left: -180px; }
  .float-watchlist    { right: -190px; }
}

/* ======================================
   DARK THEME — refinements
   ====================================== */
:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .feature-card,
:root[data-theme="dark"] .float-card,
:root[data-theme="dark"] .mobile-bottom-nav {
  border-color: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #6b7080;
}

:root[data-theme="dark"] .table > thead > tr > th,
:root[data-theme="dark"] .table > tbody > tr > td {
  border-color: var(--color-border);
  color: var(--color-text);
}

/* Bootstrap alerts stay readable but themed */
:root[data-theme="dark"] .alert-success { background: var(--color-green-bg); color: var(--color-green); border-color: rgba(47,189,106,.3); }
:root[data-theme="dark"] .alert-danger  { background: var(--color-red-bg);   color: var(--color-red);   border-color: rgba(229,62,62,.3); }

/* Dark scrollbar */
:root[data-theme="dark"] ::-webkit-scrollbar { width: 12px; height: 12px; }
:root[data-theme="dark"] ::-webkit-scrollbar-track { background: var(--surface); }
:root[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #33334d; border-radius: 6px; border: 3px solid var(--surface); }

/* ======================================
   THEME TOGGLE BUTTON
   ====================================== */
.theme-toggle {
  position: fixed;
  bottom: 22px;
  left: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: var(--surface);
  color: var(--color-text);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px) rotate(-10deg);
  box-shadow: var(--shadow-lg);
}

.theme-toggle__sun  { display: none; }
.theme-toggle__moon { display: inline; }
:root[data-theme="dark"] .theme-toggle__sun  { display: inline; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }

/* Keep clear of the mobile bottom nav inside the app */
@media only screen and (max-width: 992px) {
  .theme-toggle--app { bottom: calc(var(--mobile-bottom-nav-height) + 16px); }
}

/* ======================================
   LANDING — STATS / TRUSTED / TESTIMONIALS / CTA
   ====================================== */
.section-head { text-align: center; max-width: 620px; margin: 0 auto 34px; }
.section-head__eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--color-primary); background: var(--color-primary-light);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
.section-head__title {
  font-family: var(--font-heading); font-weight: 800;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem); color: var(--color-text);
  margin: 0 0 10px; letter-spacing: -.02em;
}
.section-head__sub { color: var(--color-text-muted); font-size: 1.02rem; line-height: 1.6; margin: 0; }

/* Stats band */
.stats-band {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  padding: 34px; border-radius: 24px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-accent));
  box-shadow: 0 20px 50px rgba(123, 88, 206, .28);
}
.stat-item { text-align: center; color: #fff; }
.stat-item__value { font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1; }
.stat-item__label { margin-top: 8px; font-size: .9rem; color: rgba(255, 255, 255, .85); }

/* Trusted by */
.trusted { margin-top: 48px; text-align: center; }
.trusted__label { font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--color-text-muted); margin: 0 0 18px; }
.trusted__logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 40px; }
.trusted__logo { font-family: var(--font-heading); font-weight: 800; font-size: 1.15rem; color: var(--color-text); opacity: .45; letter-spacing: -.01em; transition: opacity .2s; }
.trusted__logo:hover { opacity: .8; }

/* Testimonials */
.testimonials { margin-top: 64px; }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testi-card {
  background: var(--surface); border: 1.5px solid var(--color-border); border-radius: 20px;
  padding: 26px 24px; box-shadow: 0 8px 28px rgba(123, 88, 206, .08);
  display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.testi-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(123, 88, 206, .16); }
.testi-stars { color: #f5a623; font-size: .95rem; letter-spacing: 2px; margin-bottom: 14px; }
.testi-quote { color: var(--color-text); font-size: 1rem; line-height: 1.65; margin: 0 0 22px; flex: 1; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-family: var(--font-heading); font-size: .95rem; flex-shrink: 0; }
.testi-name { font-weight: 700; color: var(--color-text); font-size: .95rem; }
.testi-role { color: var(--color-text-muted); font-size: .82rem; margin-top: 2px; }

/* Final CTA */
.cta-band {
  margin-top: 64px; text-align: center; padding: 56px 32px; border-radius: 28px;
  background: #7b58ce url('/bg_image.svg') center/cover no-repeat;
  position: relative; overflow: hidden; box-shadow: 0 24px 60px rgba(123, 88, 206, .30);
}
.cta-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(93, 63, 173, .15), rgba(93, 63, 173, .4)); }
.cta-band__title, .cta-band__sub, .cta-band__actions { position: relative; z-index: 1; }
.cta-band__title { font-family: var(--font-heading); font-weight: 800; color: #fff; font-size: clamp(1.7rem, 3.5vw, 2.6rem); margin: 0 0 14px; letter-spacing: -.02em; }
.cta-band__sub { color: rgba(255, 255, 255, .9); font-size: 1.05rem; max-width: 520px; margin: 0 auto 30px; line-height: 1.55; }
.cta-band__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

@media only screen and (max-width: 900px) {
  .stats-band { grid-template-columns: 1fr 1fr; gap: 24px 18px; }
  .testi-grid { grid-template-columns: 1fr; }
}
@media only screen and (max-width: 600px) {
  .stats-band { padding: 26px 18px; }
  .cta-band { padding: 44px 22px; }
  .cta-band__actions { flex-direction: column; }
  .cta-band__actions .hero__btn { width: 100%; box-sizing: border-box; }
}

/* ======================================
   DARK THEME — chat
   ====================================== */
/* Message area background (was a hardcoded light gradient) */
:root[data-theme="dark"] #messages {
  background: linear-gradient(180deg, #15151f 0%, #101019 100%);
}

/* Incoming (client) bubbles: elevated dark surface with a green accent */
:root[data-theme="dark"] .msg-line.peer {
  background: #212736;
  color: #e8e8f4;
  border-left-color: var(--color-green);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
:root[data-theme="dark"] .msg-line.peer .msg-who  { color: #5fe093; }
:root[data-theme="dark"] .msg-line.peer .msg-time { color: rgba(255, 255, 255, 0.5); }

/* Outgoing (support / you) bubbles: purple */
:root[data-theme="dark"] .msg-line.me {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  color: #fff;
  box-shadow: 0 2px 12px rgba(123, 88, 206, 0.35);
}
:root[data-theme="dark"] .msg-line.me .msg-time { color: rgba(255, 255, 255, 0.8); }

/* Peer edit/delete controls readable on the dark bubble */
:root[data-theme="dark"] .msg-line.peer .msg-edit-btn,
:root[data-theme="dark"] .msg-line.peer .msg-del-btn { color: #cfcfe0; }
:root[data-theme="dark"] .msg-line.peer .msg-edit-btn:hover { background: rgba(123, 88, 206, 0.3); }

/* File attachments visible on dark bubbles */
:root[data-theme="dark"] .msg-file { background: rgba(255, 255, 255, 0.08); }
:root[data-theme="dark"] .msg-file:hover { background: rgba(255, 255, 255, 0.14); }
