/* ====================================================================
   AIZUEX Design System — Premium Dark Theme v2
   Adds CSS variables and component upgrades on top of style.css
   ==================================================================== */

/* ── Google Font: Inter (premium, modern, readable) ──────────────── */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

/* ── 1. Design Tokens ─────────────────────────────────────────────── */
:root {
  /* Brand – Vivid Teal-Green (premium, non-blue) */
  --primary:          #00d9a8;
  --primary-hover:    #00c49a;
  --primary-dark:     #00a882;
  --primary-glow:     rgba(0, 217, 168, 0.14);
  --primary-border:   rgba(0, 217, 168, 0.28);

  /* Status */
  --success:          #22d97b;
  --success-bg:       rgba(34, 217, 123, 0.10);
  --danger:           #ff4d6a;
  --danger-bg:        rgba(255, 77, 106, 0.10);
  --warning:          #f5a623;
  --warning-bg:       rgba(245, 166, 35, 0.10);
  --info:             #00d9a8;

  /* Backgrounds – True Neutral Dark (no blue tint) */
  --bg-page:          #09090b;
  --bg-card:          #111116;
  --bg-card-alt:      #18181e;
  --bg-elevated:      #202028;
  --bg-hover:         rgba(255,255,255,0.05);
  --bg-input:         #0e0e14;
  --bg-overlay:       rgba(0,0,0,0.82);

  /* Text – Maximum Readability */
  --text-primary:     #e8ecf1;
  --text-secondary:   #8896a8;
  --text-muted:       #4d5a6b;
  --text-heading:     #ffffff;

  /* Borders */
  --border:           rgba(255,255,255,0.07);
  --border-light:     rgba(255,255,255,0.12);
  --border-focus:     rgba(0,217,168,0.45);

  /* Shadows – Deeper for premium feel */
  --shadow-xs:        0 1px 3px rgba(0,0,0,0.45);
  --shadow-sm:        0 2px 14px rgba(0,0,0,0.60);
  --shadow-md:        0 4px 28px rgba(0,0,0,0.65);
  --shadow-lg:        0 8px 48px rgba(0,0,0,0.75);
  --shadow-primary:   0 4px 20px rgba(0,217,168,0.20);
  --shadow-glow:      0 0 32px rgba(0,217,168,0.10);

  /* Radius */
  --radius-xs:        4px;
  --radius-sm:        8px;
  --radius-md:        12px;
  --radius-lg:        16px;
  --radius-xl:        24px;
  --radius-pill:      100px;

  /* Transitions */
  --ease:             cubic-bezier(0.4, 0, 0.2, 1);
  --transition:       0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:  0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Spacing scale */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Z-index */
  --z-dropdown:  1000;
  --z-sticky:    1020;
  --z-fixed:     1030;
  --z-modal:     1050;
  --z-tooltip:   1070;
}

/* Light theme overrides */
.theme-light {
  --bg-page:      #f0f2f5;
  --bg-card:      #ffffff;
  --bg-card-alt:  #f8f9fa;
  --bg-elevated:  #edf0f4;
  --bg-hover:     rgba(0,0,0,0.04);
  --bg-input:     #ffffff;

  --text-primary:   #1a1f2e;
  --text-secondary: #5a6478;
  --text-muted:     #8b9ab1;
  --text-heading:   #0a0c10;

  --border:         rgba(0,0,0,0.08);
  --border-light:   rgba(0,0,0,0.14);

  --shadow-xs:  0 1px 4px rgba(0,0,0,0.08);
  --shadow-sm:  0 2px 10px rgba(0,0,0,0.1);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.15);
}

/* ── 2. Body & Base ───────────────────────────────────────────────── */
body {
  background: var(--bg-page) !important;
  color: var(--text-primary) !important;
  font-family: "Inter", "Lato", sans-serif !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.theme-light body { background: var(--bg-page) !important; }

/* ── 3. Typography ────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.aw-h1, .aw-h2, .aw-h3, .aw-h4, .aw-h5, .aw-h6 {
  font-family: "Inter", "Lato", sans-serif !important;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

h1, .aw-h1 { font-weight: 800; letter-spacing: -0.04em; }
h2, .aw-h2 { font-weight: 800; letter-spacing: -0.03em; }
h3, .aw-h3 { font-weight: 700; }
h4, .aw-h4 { font-weight: 700; }
h5, .aw-h5 { font-weight: 600; }
h6, .aw-h6 { font-weight: 600; }

p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }

.text-muted     { color: var(--text-muted)     !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-white     { color: #ffffff               !important; }

/* Numbers & mono values look sharper with tabular nums */
.mono, [class*="price"], [class*="amount"], [class*="balance"],
[class*="vol"], [class*="qty"] {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ── 4. Card System ───────────────────────────────────────────────── */
.ds-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.ds-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.ds-card-elevated {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Override existing form-field-wrapper */
.form-field-wrapper,
.create-item-wrapper {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
}

/* ── 5. Button System ─────────────────────────────────────────────── */
.btn {
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--transition) !important;
  border-radius: var(--radius-sm) !important;
  font-size: 14px;
}

/* Primary gradient button */
.btn-gradient,
.btn-primary,
.custom-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
  border: none !important;
  color: #052e22 !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 12px rgba(0,217,168,0.28) !important;
  position: relative;
  overflow: hidden;
}

.btn-gradient:hover,
.btn-primary:hover,
.custom-btn:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%) !important;
  box-shadow: 0 4px 22px rgba(0,217,168,0.40) !important;
  transform: translateY(-1px);
  color: #052e22 !important;
}

.btn-gradient:active,
.btn-primary:active,
.custom-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,217,168,0.22) !important;
}

/* Outline button */
.btn-outline,
.btn-outline-primary {
  background: transparent !important;
  border: 1px solid var(--primary-border) !important;
  color: var(--primary) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.btn-outline:hover,
.btn-outline-primary:hover {
  background: var(--primary-glow) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  box-shadow: 0 2px 12px rgba(0,217,168,0.18) !important;
  transform: translateY(-1px);
}

/* Success button */
.btn-success {
  background: linear-gradient(135deg, #00c087 0%, #00a070 100%) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 2px 12px rgba(0,192,135,0.3) !important;
}
.btn-success:hover {
  background: linear-gradient(135deg, #00d494 0%, #00b07c 100%) !important;
  box-shadow: 0 4px 20px rgba(0,192,135,0.45) !important;
  transform: translateY(-1px);
}

/* Danger button */
.btn-danger {
  background: linear-gradient(135deg, #f6465d 0%, #d63848 100%) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 2px 12px rgba(246,70,93,0.3) !important;
}
.btn-danger:hover {
  background: linear-gradient(135deg, #ff5570 0%, #e64050 100%) !important;
  box-shadow: 0 4px 20px rgba(246,70,93,0.45) !important;
  transform: translateY(-1px);
}

/* Muted/ghost button */
.btn-muted {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-secondary) !important;
}
.btn-muted:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
}

/* Small pill badge button */
.btn-badge {
  padding: 4px 12px;
  border-radius: var(--radius-pill) !important;
  font-size: 12px;
  font-weight: 600;
}

/* ── 6. Form Controls ─────────────────────────────────────────────── */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  transition: border-color var(--transition), box-shadow var(--transition) !important;
  font-size: 14px;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--border-focus) !important;
  box-shadow: 0 0 0 3px rgba(0,217,168,0.10) !important;
  background: var(--bg-input) !important;
  outline: none !important;
  color: var(--text-primary) !important;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--text-muted) !important;
}

.form-label, label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

/* Input group */
.input-group-text {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-secondary) !important;
}

/* ── 7. Table System ──────────────────────────────────────────────── */
.table {
  --bs-table-bg: transparent !important;
  --bs-table-striped-bg: var(--bg-hover) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
  font-size: 13px;
}

.table thead th {
  background: var(--bg-elevated) !important;
  color: var(--text-secondary) !important;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-light) !important;
  padding: 10px 14px;
  white-space: nowrap;
}

.table tbody td {
  border-bottom: 1px solid var(--border) !important;
  padding: 10px 14px;
  color: var(--text-primary) !important;
  vertical-align: middle;
}

.table tbody tr:hover td {
  background: var(--bg-hover) !important;
}

.table-dark {
  --bs-table-bg: var(--bg-card) !important;
  --bs-table-striped-bg: var(--bg-card-alt) !important;
  color: var(--text-primary) !important;
}

/* DataTable overrides */
.rdt_Table { background: var(--bg-card) !important; }
.rdt_TableHead .rdt_TableHeadRow {
  background: var(--bg-elevated) !important;
  border-bottom: 1px solid var(--border-light) !important;
}
.rdt_TableCol {
  color: var(--text-secondary) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.rdt_TableRow {
  background: var(--bg-card) !important;
  border-bottom: 1px solid var(--border) !important;
  transition: background var(--transition);
}
.rdt_TableRow:hover { background: var(--bg-hover) !important; }
.rdt_TableCell { color: var(--text-primary) !important; font-size: 13px !important; }
.rdt_Pagination {
  background: var(--bg-card) !important;
  color: var(--text-secondary) !important;
  border-top: 1px solid var(--border) !important;
}
.rdt_Pagination button { color: var(--text-secondary) !important; }
.rdt_Pagination button:hover { background: var(--bg-hover) !important; }

/* ── 8. Badge System ──────────────────────────────────────────────── */
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.03em;
}

.badge-primary,
.bg-primary { background: var(--primary-glow) !important; color: var(--primary) !important; }

.badge-success,
.bg-success { background: var(--success-bg) !important; color: var(--success) !important; }

.badge-danger,
.bg-danger { background: var(--danger-bg) !important; color: var(--danger) !important; }

.badge-warning,
.bg-warning { background: var(--warning-bg) !important; color: var(--warning) !important; }

/* ── 9. Header / Nav ──────────────────────────────────────────────── */
.ib-header {
  background: color-mix(in srgb, var(--bg-card) 88%, transparent) !important;
  border-bottom: 1px solid var(--border) !important;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 1px 18px rgba(0,0,0,0.28) !important;
  transition: background var(--transition-slow), box-shadow var(--transition-slow);
}

.ib-header.header-sticky {
  position: sticky !important;
  top: 0;
  z-index: var(--z-sticky);
}

.ib-header .header-inner {
  min-height: 64px;
  gap: 16px;
}

.ib-header .logo-wrapper img {
  height: 32px;
  width: auto;
}

.mainmenu-wrapper {
  min-width: 0;
}

.mainmenu-nav .mainmenu {
  display: flex !important;
  align-items: center;
  flex-wrap: nowrap !important;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mainmenu-nav .mainmenu li {
  margin: 0 !important;
}

/* Nav links */
.mainmenu > li > a,
.mainmenu > li > .nav-parent {
  display: inline-flex !important;
  align-items: center;
  color: var(--text-secondary) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
  padding: 7px 12px !important;
  border-radius: var(--radius-pill);
  transition: color var(--transition), background var(--transition) !important;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1.2;
  background: transparent;
}

.mainmenu > li > a i,
.mainmenu > li > .nav-parent i {
  font-size: 14px;
  opacity: 0.75;
  transition: transform 0.2s var(--ease);
}

li.custom_dropdown:hover > .nav-parent i {
  transform: rotate(180deg);
  opacity: 1;
}

.mainmenu > li > a:hover,
.mainmenu > li > .nav-parent:hover,
.mainmenu > li:hover > a,
.mainmenu > li:hover > .nav-parent,
.mainmenu > li.is-active > a,
.mainmenu > li.is-active > .nav-parent,
.mainmenu > li > a.active {
  color: var(--text-heading) !important;
  background: var(--bg-hover) !important;
}

.mainmenu > li > a.active,
.mainmenu > li.is-active > a,
.mainmenu > li.is-active > .nav-parent {
  color: var(--primary) !important;
  background: var(--primary-glow) !important;
}

/* Trade product chips inside dropdown */
.nav-trade-submenu {
  min-width: 280px !important;
  padding: 8px !important;
}

.nav-trade-submenu li a {
  display: block !important;
  margin-left: 0 !important;
  padding: 8px !important;
  opacity: 1 !important;
}

.nav-trade-submenu li a:hover {
  margin-left: 0 !important;
  background: var(--bg-hover) !important;
  color: inherit !important;
}

.nav-trade-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-trade-ico {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(0, 217, 168, 0.12) !important;
  color: var(--primary) !important;
  position: static !important;
  left: auto !important;
  opacity: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0 !important;
  font-weight: 400 !important;
}

.mainmenu-nav .mainmenu li .submenu.nav-trade-submenu li a .nav-trade-ico svg,
.nav-trade-submenu .nav-trade-ico svg,
.nav-trade-submenu a svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: static !important;
  left: auto !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

.nav-trade-item.mining .nav-trade-ico {
  color: #fff !important;
  background: linear-gradient(145deg, #f97316 0%, #eab308 100%) !important;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.nav-trade-item.spot .nav-trade-ico {
  color: #fff !important;
  background: linear-gradient(145deg, #0ea5e9 0%, #22c55e 100%) !important;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

.nav-trade-item.aizu .nav-trade-ico {
  color: #fff !important;
  background: linear-gradient(145deg, #8b5cf6 0%, #6366f1 55%, #f59e0b 100%) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.nav-trade-submenu .nav-trade-ico svg {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

.nav-trade-item > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nav-trade-item > div > span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.2;
}

.nav-trade-item small {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.3;
}

.popup-mobile-menu .mainmenu li a.nav-mining-link {
  color: #a8adff !important;
}

.popup-mobile-menu .inner {
  background: var(--bg-card) !important;
  border-left: 1px solid var(--border);
}

/* ── Mobile drawer: must NOT inherit desktop horizontal mainmenu flex ── */
.popup-mobile-menu ul.mainmenu,
.popup-mobile-menu .mainmenu {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  align-content: flex-start !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 12px 16px 24px !important;
  list-style: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.popup-mobile-menu .mainmenu > li {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  float: none !important;
  position: relative !important;
  border-bottom: 1px solid var(--border-light, rgba(255, 255, 255, 0.06));
}

.popup-mobile-menu .mainmenu > li:last-child {
  border-bottom: none;
}

.popup-mobile-menu .mainmenu > li > a,
.popup-mobile-menu .mainmenu > li > .nav-parent,
.popup-mobile-menu .mainmenu > li .accordion-button {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 14px 4px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  white-space: normal !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  color: var(--text-secondary, #ddd) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.popup-mobile-menu .mainmenu > li > a:hover,
.popup-mobile-menu .mainmenu > li > a.active,
.popup-mobile-menu .mainmenu > li .accordion-button:not(.collapsed) {
  color: var(--primary, #0cbddc) !important;
  background: transparent !important;
}

.popup-mobile-menu .mainmenu .accordion-item {
  background: transparent !important;
  border: none !important;
}

.popup-mobile-menu .mainmenu .accordion-header {
  margin: 0 !important;
}

.popup-mobile-menu .mainmenu .accordion-button::after {
  margin-left: auto;
  flex-shrink: 0;
}

.popup-mobile-menu .mainmenu .accordion-collapse {
  width: 100% !important;
}

.popup-mobile-menu .mainmenu .submenu {
  position: static !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 8px !important;
  padding: 4px 0 8px 12px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.popup-mobile-menu .mainmenu .submenu li {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
}

.popup-mobile-menu .mainmenu .submenu li a {
  display: block !important;
  width: 100% !important;
  padding: 10px 4px !important;
  font-size: 14px !important;
  color: var(--text-secondary, #b6c2d2) !important;
  font-weight: 500 !important;
  white-space: normal !important;
  border-radius: 8px !important;
}

.popup-mobile-menu .mainmenu .submenu li a:hover,
.popup-mobile-menu .mainmenu .submenu li a.active {
  color: var(--primary, #00d9a8) !important;
  background: var(--bg-hover, rgba(0, 217, 168, 0.08)) !important;
  margin-left: 0 !important;
}

.popup-mobile-menu .mainmenu .nav-trade-item {
  gap: 10px;
}

.popup-mobile-menu .mainmenu .submenu li a .nav-trade-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100%;
}

.popup-mobile-menu .mainmenu .nav-trade-ico,
.popup-mobile-menu .mainmenu .submenu li a .nav-trade-ico {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-flex !important;
  position: static !important;
  left: auto !important;
}

.popup-mobile-menu .mainmenu .submenu li a .nav-trade-ico svg,
.popup-mobile-menu .mainmenu li a .nav-trade-ico svg {
  width: 18px !important;
  height: 18px !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  position: static !important;
  left: auto !important;
}

@media (max-width: 1199px) {
  .mainmenu-nav .mainmenu {
    overflow: visible;
  }
}

/* Dropdown menus */
.submenu {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 8px !important;
  min-width: 220px;
}

.submenu li a {
  border-radius: var(--radius-sm) !important;
  padding: 10px 14px !important;
  color: var(--text-secondary) !important;
  transition: all var(--transition) !important;
}

.submenu li a:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}

.submenu li a span { color: var(--text-primary); font-size: 14px; font-weight: 500; }
.submenu li a small { color: var(--text-muted); font-size: 12px; margin-top: 2px; display: block; }

/* User avatar dropdown */
.avatar-info img {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  object-fit: cover;
  transition: border-color var(--transition);
}
.avatar-info:hover img { border-color: var(--primary); }
.avatar-info.is-open img { border-color: var(--primary); }

.header-right-inner > li.avatar-info.is-open .submenu {
  opacity: 1;
  visibility: visible;
  top: calc(100% + 10px) !important;
}

/* Notification icon */
.btn-icon {
  width: 38px;
  height: 38px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm) !important;
  background: var(--bg-elevated) !important;
  transition: all var(--transition);
}
.btn-icon:hover {
  background: var(--primary-glow) !important;
  color: var(--primary) !important;
}

/* ── 10. Sidebar / Account Page ───────────────────────────────────── */
.acc_tabs .nav-link {
  color: var(--text-secondary) !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px 16px !important;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition) !important;
  border: none !important;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.acc_tabs .nav-link:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}

.acc_tabs .nav-link.active {
  background: var(--primary-glow) !important;
  color: var(--primary) !important;
  font-weight: 600;
}

.bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  transition: all var(--transition);
}

.acc_tabs .nav-link.active .bullet {
  width: 8px;
  height: 8px;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

/* ── 11. Trade Page Cards ─────────────────────────────────────────── */
.trade_card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-xs) !important;
}

.trade_card:hover { border-color: var(--border-light) !important; }

/* Custom tabs in trade */
.custom-tabs .nav-link,
.custom-tabs a {
  color: var(--text-secondary) !important;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px !important;
  border-radius: var(--radius-sm) !important;
  border: none !important;
  transition: all var(--transition) !important;
}

.custom-tabs .nav-link:hover,
.custom-tabs a:hover { color: var(--text-primary) !important; }

.custom-tabs .nav-link.active,
.custom-tabs a.active {
  color: var(--primary) !important;
  background: var(--primary-glow) !important;
  font-weight: 600;
}

/* Order book rows */
.markets_row__xELC_:hover {
  background: var(--bg-hover) !important;
  cursor: pointer;
}

.active_pair {
  background: var(--primary-glow) !important;
  border-left: 2px solid var(--primary) !important;
}

/* ── 12. Login / Auth Pages ───────────────────────────────────────── */
.login_sec,
.login-bg {
  background: var(--bg-page) !important;
  min-height: 100vh;
}

.login_form,
.login-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-lg) !important;
}

.ticket-header .nav-link,
.login-pills .nav-link {
  color: var(--text-secondary) !important;
  border-radius: var(--radius-md) !important;
  padding: 10px 24px !important;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition) !important;
}

.ticket-header .nav-link:hover {
  color: var(--text-primary) !important;
  background: var(--bg-hover) !important;
}

.ticket-header .nav-link.active {
  color: var(--primary) !important;
  background: var(--primary-glow) !important;
}

/* ── 13. Landing Page ─────────────────────────────────────────────── */
/* NOTE: .hero-section background intentionally NOT overridden here.
   The original style.css + body .bg-1.theme-dark already provides
   the correct black theme. Overriding it breaks the video visual. */
.banner-area,
.hero-wrapper {
  background: var(--bg-page);
}

/* Feature cards on landing */
.features-section .feature-card,
.service-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  transition: all var(--transition-slow) !important;
  position: relative;
  overflow: hidden;
}

.features-section .feature-card:hover,
.service-card:hover {
  border-color: var(--primary-border) !important;
  box-shadow: var(--shadow-glow) !important;
  transform: translateY(-4px);
}

/* Market ticker strip */
.market-ticker {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

/* ── 14. Fund / Wallet Page ───────────────────────────────────────── */
.fund_card,
.wallet-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
}

.wallet-balance {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.portfolio-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.03em;
}

/* ── 15. Stats / Info Cards ───────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--primary-glow);
  color: var(--primary);
}

.stat-card .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}

.stat-card .stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── 16. Progress Bars ────────────────────────────────────────────── */
.progress {
  background: var(--bg-elevated) !important;
  border-radius: var(--radius-pill) !important;
  height: 6px !important;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
  border-radius: var(--radius-pill) !important;
}

/* ── 17. Modal / Overlay ──────────────────────────────────────────── */
.modal-content {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-lg) !important;
  color: var(--text-primary) !important;
}

.modal-header {
  border-bottom: 1px solid var(--border) !important;
  padding: 20px 24px !important;
}

.modal-title {
  color: var(--text-heading) !important;
  font-weight: 700;
}

.modal-body { padding: 24px !important; }

.modal-footer {
  border-top: 1px solid var(--border) !important;
  padding: 16px 24px !important;
}

.btn-close {
  filter: invert(0.7) !important;
  opacity: 0.8 !important;
}

.modal-backdrop {
  background: var(--bg-overlay) !important;
  backdrop-filter: blur(4px);
}

/* ── 18. Breadcrumb ───────────────────────────────────────────────── */
.breadcrumb-item a { color: var(--primary) !important; }
.breadcrumb-item.active { color: var(--text-muted) !important; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted) !important; }

.inner-page-banner {
  background: linear-gradient(180deg, rgba(12,189,220,0.05) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  padding: 14px 0 16px;
}

.inner-page-banner .title {
  color: var(--text-heading) !important;
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 800;
  margin-bottom: 0;
  line-height: 1.2;
}

.inner-page-banner .inner {
  text-align: left;
}

/* ── 19. Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── 20. Toast / Alert Overrides ──────────────────────────────────── */
.Toastify__toast {
  border-radius: var(--radius-md) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: var(--shadow-md) !important;
}

.Toastify__toast--success {
  background: var(--bg-card) !important;
  color: var(--success) !important;
  border-left: 3px solid var(--success) !important;
}

.Toastify__toast--error {
  background: var(--bg-card) !important;
  color: var(--danger) !important;
  border-left: 3px solid var(--danger) !important;
}

.Toastify__toast--info {
  background: var(--bg-card) !important;
  color: var(--primary) !important;
  border-left: 3px solid var(--primary) !important;
}

/* ── 21. KYC / Status Badges ──────────────────────────────────────── */
.kyc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}

.kyc-badge.verified {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(0,192,135,0.2);
}

.kyc-badge.pending {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(240,185,11,0.2);
}

.kyc-badge.unverified {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(246,70,93,0.2);
}

/* ── 22. Utility Classes ──────────────────────────────────────────── */
.glass-card {
  background: rgba(17,19,24,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #4dd8ef 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.primary-glow { box-shadow: var(--shadow-primary) !important; }

.text-buy  { color: var(--success) !important; }
.text-sell { color: var(--danger)  !important; }

.bg-buy  { background: var(--success-bg) !important; color: var(--success) !important; }
.bg-sell { background: var(--danger-bg)  !important; color: var(--danger)  !important; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.cursor-pointer { cursor: pointer; }
.user-select-none { user-select: none; }

/* Price change indicators */
.price-up   { color: var(--success) !important; }
.price-down { color: var(--danger)  !important; }

.price-up-bg   { background: var(--success-bg); color: var(--success); }
.price-down-bg { background: var(--danger-bg);  color: var(--danger); }

/* Loading skeleton */
@keyframes skeleton-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg,
    var(--bg-elevated) 25%,
    var(--bg-card-alt) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── 23. Number Badges / Status Indicators ────────────────────────── */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.online  { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.offline { background: var(--text-muted); }
.status-dot.pending { background: var(--warning); box-shadow: 0 0 8px var(--warning); }

/* ── 24. Footer ───────────────────────────────────────────────────── */
footer,
.footer-area {
  background: var(--bg-card) !important;
  border-top: 1px solid var(--border) !important;
}

.footer-widget-title {
  color: var(--text-heading) !important;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-widget ul li a {
  color: var(--text-secondary) !important;
  font-size: 13px;
  transition: color var(--transition) !important;
}

.footer-widget ul li a:hover { color: var(--primary) !important; }

/* ── 25. Announcement Bar ─────────────────────────────────────────── */
.announcement_bar {
  background: linear-gradient(135deg, rgba(0,217,168,0.10) 0%, rgba(0,217,168,0.04) 100%) !important;
  border-bottom: 1px solid var(--primary-border) !important;
}

/* ── 26. Responsive Fixes ─────────────────────────────────────────── */
@media (max-width: 991px) {
  .inner-page-banner .title { font-size: 26px; }
  .portfolio-value { font-size: 26px; }
  .stat-card .stat-value { font-size: 20px; }

  .header-right-inner > li:hover .submenu,
  .header-right-inner > li:focus .submenu {
    opacity: 0;
    visibility: hidden;
    top: 100% !important;
  }

  .header-right-inner > li.avatar-info.is-open .submenu {
    opacity: 1;
    visibility: visible;
    top: calc(100% + 10px) !important;
  }
}

@media (max-width: 575px) {
  .modal-content { border-radius: var(--radius-lg) !important; }
  .stat-card .stat-value { font-size: 18px; }
  .ds-card { border-radius: var(--radius-md) !important; }
  .btn { font-size: 13px; }
}

/* ── 27. Light Theme Adjustments ─────────────────────────────────── */
.theme-light .ib-header {
  background: rgba(255,255,255,0.95) !important;
  border-bottom: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 1px 20px rgba(0,0,0,0.08) !important;
}

.theme-light .mainmenu > li > a,
.theme-light .mainmenu > li > .nav-parent { color: #444 !important; }
.theme-light .mainmenu > li > a:hover,
.theme-light .mainmenu > li > .nav-parent:hover { color: var(--primary) !important; }
.theme-light .mainmenu > li > a.active,
.theme-light .mainmenu > li.is-active > .nav-parent {
  color: var(--primary) !important;
  background: var(--primary-glow) !important;
}

.theme-light .submenu {
  background: #fff !important;
  border: 1px solid rgba(0,0,0,0.1) !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15) !important;
}

.theme-light .submenu li a { color: #555 !important; }
.theme-light .submenu li a:hover { background: rgba(0,0,0,0.04) !important; color: #333 !important; }

.theme-light .trade_card { background: #fff !important; border-color: rgba(0,0,0,0.08) !important; }
.theme-light .form-control,
.theme-light input[type="text"],
.theme-light input[type="password"],
.theme-light input[type="email"],
.theme-light input[type="number"] {
  background: #fff !important;
  border-color: rgba(0,0,0,0.14) !important;
  color: #1a1f2e !important;
}

.theme-light label { color: #444 !important; }

.theme-light .acc_tabs .nav-link { color: #666 !important; }
.theme-light .acc_tabs .nav-link:hover { background: rgba(0,0,0,0.04) !important; color: #333 !important; }
.theme-light .acc_tabs .nav-link.active { background: var(--primary-glow) !important; color: var(--primary) !important; }

/* ── 28. Animation Utilities ──────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(0,217,168,0.30); }
  50%       { box-shadow: 0 0 22px rgba(0,217,168,0.60); }
}

.animate-fadeInUp {
  animation: fadeInUp 0.4s var(--ease) both;
}

.animate-fadeIn {
  animation: fadeIn 0.3s var(--ease) both;
}

.pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }

/* Stagger delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ── 29. QBS / Swap Page ──────────────────────────────────────────── */
.qbs-card,
.swap-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 28px;
}

/* ── 30. Staking / Launchpad ──────────────────────────────────────── */
.staking-card,
.launchpad-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-slow);
  overflow: hidden;
}

.staking-card:hover,
.launchpad-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.launchpad-progress {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  overflow: hidden;
}

.launchpad-progress-bar {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  transition: width 1s var(--ease);
}

/* ── 31. P2P Trading ──────────────────────────────────────────────── */
.p2p-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.p2p-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

.p2p-filters {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 16px;
}

/* ── 32. Profile / Settings ───────────────────────────────────────── */
.setting-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}

.setting-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ── 33. Empty State ──────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 12px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.empty-state-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 280px;
}

/* ── 34. Loading Wave (existing upgrade) ──────────────────────────── */
.loading-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px;
}

.loading-bar {
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: var(--radius-pill);
  animation: wave 1.2s ease-in-out infinite;
  opacity: 0.8;
}

.loading-bar:nth-child(1) { animation-delay: 0s; }
.loading-bar:nth-child(2) { animation-delay: 0.15s; }
.loading-bar:nth-child(3) { animation-delay: 0.3s; }
.loading-bar:nth-child(4) { animation-delay: 0.45s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.4; }
  50%       { transform: scaleY(1.4); opacity: 1; }
}

/* ── 35. Inner Section Banner Override ───────────────────────────── */
.inner-page-banner {
  background: linear-gradient(135deg,
    rgba(12,189,220,0.06) 0%,
    var(--bg-card) 60%
  ) !important;
  border-bottom: 1px solid var(--border) !important;
}

/* ── 36. Aizu Trade Page (new) ────────────────────────────────────── */
.at-page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100vh - 72px);
  background: var(--bg-page);
}

.at-pair-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 32px;
  overflow-x: auto;
}

.at-pair-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-heading);
  white-space: nowrap;
}

.at-pair-price {
  font-size: 24px;
  font-weight: 700;
  white-space: nowrap;
}

.at-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
}

.at-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.at-stat-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.at-main-grid {
  display: grid;
  grid-template-columns: 1fr 280px 300px;
  gap: 4px;
  padding: 4px;
  background: var(--bg-page);
  min-height: 0;
}

.at-chart-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.at-orderbook-panel,
.at-buysell-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.at-panel-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.at-panel-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

/* Order book rows */
.at-ob-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 3px 14px;
  font-size: 12px;
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
}

.at-ob-row:hover { background: var(--bg-hover); }

.at-ob-row .at-ob-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  opacity: 0.12;
  pointer-events: none;
  transition: width 0.3s var(--ease);
}

.at-ob-row.buy .at-ob-bar  { background: var(--success); }
.at-ob-row.sell .at-ob-bar { background: var(--danger); }

.at-ob-price.buy  { color: var(--success); font-weight: 600; }
.at-ob-price.sell { color: var(--danger);  font-weight: 600; }

.at-ob-head {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 6px 14px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.at-ob-spread {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buy/Sell panel */
.at-order-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.at-order-tab {
  flex: 1;
  padding: 6px 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.at-order-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.at-order-tab.buy.active  { background: var(--success-bg); color: var(--success); }
.at-order-tab.sell.active { background: var(--danger-bg);  color: var(--danger); }

.at-order-type-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 14px 0;
}

.at-order-type-tab {
  padding: 4px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.at-order-type-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.at-order-type-tab.active { color: var(--primary); background: var(--primary-glow); }

.at-order-form {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.at-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.at-balance-value { color: var(--text-primary); font-weight: 600; }

.at-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.at-input-wrapper input {
  width: 100%;
  padding: 9px 60px 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  transition: border-color var(--transition);
}

.at-input-wrapper input:focus {
  border-color: var(--border-focus);
  outline: none;
  box-shadow: 0 0 0 3px rgba(12,189,220,0.1);
}

.at-input-unit {
  position: absolute;
  right: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

.at-percent-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.at-percent-btn {
  padding: 4px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.at-percent-btn:hover {
  background: var(--primary-glow);
  border-color: var(--primary-border);
  color: var(--primary);
}

.at-submit-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.at-submit-btn.buy {
  background: linear-gradient(135deg, #00c087 0%, #00a070 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,192,135,0.35);
}

.at-submit-btn.buy:hover {
  background: linear-gradient(135deg, #00d494 0%, #00b07c 100%);
  box-shadow: 0 4px 20px rgba(0,192,135,0.5);
  transform: translateY(-1px);
}

.at-submit-btn.sell {
  background: linear-gradient(135deg, #f6465d 0%, #d63848 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(246,70,93,0.35);
}

.at-submit-btn.sell:hover {
  background: linear-gradient(135deg, #ff5570 0%, #e64050 100%);
  box-shadow: 0 4px 20px rgba(246,70,93,0.5);
  transform: translateY(-1px);
}

.at-submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.at-fee-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 0;
}

/* Bottom panel */
.at-bottom-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 4px;
}

/* Recent trades column */
.at-recent-trade-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 4px 14px;
  font-size: 12px;
  cursor: default;
  transition: background var(--transition);
}

.at-recent-trade-row:hover { background: var(--bg-hover); }

/* Responsive */
@media (max-width: 1199px) {
  .at-main-grid {
    grid-template-columns: 1fr 260px;
    grid-template-rows: auto auto;
  }
  .at-buysell-panel {
    grid-column: 1 / 3;
  }
}

@media (max-width: 767px) {
  .at-main-grid {
    grid-template-columns: 1fr;
  }
  .at-pair-header { gap: 16px; }
}

/* ════════════════════════════════════════════════════════════════════
   LEGACY COLOR SWEEP
   Override every hard-coded #0cbddc from style.css.
   These rules MUST stay at the bottom so they win specificity wars.
   ════════════════════════════════════════════════════════════════════ */

/* ── Links & Text ── */
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }

/* Active nav/mobile */
.popup-mobile-menu .mainmenu li a.active,
.mainmenu > li > a.active,
.mainmenu > li.is-active > a { color: var(--primary) !important; }

/* ── Footer widget h4 underline ── */
.footer-widget h4::after {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
}

/* ── Footer link hover ── */
.footer-widget ul li a:hover,
.footer-widget ol li a:hover { color: var(--primary) !important; }

/* ── Form controls: focus ring & border ── */
.form-control:focus,
input:focus, textarea:focus, select:focus {
  border-color: var(--border-focus) !important;
}

/* ── Tabs / Pills: active state ── */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link,
.acc_tabs .nav-link.active,
.nav-tabs .nav-link.active {
  background: var(--primary-glow) !important;
  color: var(--primary) !important;
  border-color: var(--primary-border) !important;
}

/* ── Range / Progress sliders ── */
input[type="range"]::-webkit-slider-thumb { background: var(--primary) !important; }
input[type="range"]::-moz-range-thumb     { background: var(--primary) !important; }
.progress-bar,
.progress-fill { background: var(--primary) !important; }

/* ── Checkboxes & radio ── */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

/* ── Borders used as accent ── */
.border-primary,
[class*="border-primary"] { border-color: var(--primary-border) !important; }

/* ── Inline color utility overrides ── */
.text-primary,
[class*="text-primary"]   { color: var(--primary) !important; }

/* ── Background accents ── */
.bg-primary,
[class*="bg-primary"] {
  background: var(--primary-glow) !important;
  color: var(--primary) !important;
}

/* ── Spinner / loader ── */
.spinner-border-primary,
.spinner-grow-primary { color: var(--primary) !important; }

/* ── SVG strokes/fills ── */
svg [class*="primary"] { stroke: var(--primary); }

/* ── Box shadow accents ── */
.shadow-primary { box-shadow: var(--shadow-primary) !important; }

/* ── Breadcrumb active ── */
.breadcrumb-item.active { color: var(--primary) !important; }

/* ── Pagination ── */
.page-item.active .page-link {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #052e22 !important;
  font-weight: 700;
}
.page-link:hover { color: var(--primary) !important; }
.page-link { color: var(--text-secondary) !important; }

/* ── Tooltip ── */
.tooltip-inner { background: var(--bg-elevated); color: var(--text-primary); }

/* ── Trade BuySell buy button base ── */
.buy-btn,
.btn-buy {
  background: linear-gradient(135deg, var(--success) 0%, #18b85a 100%) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 12px rgba(34,217,123,0.28) !important;
}
.sell-btn,
.btn-sell {
  background: linear-gradient(135deg, var(--danger) 0%, #e0345e 100%) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 12px rgba(255,77,106,0.28) !important;
}

/* ── Premium card hover effect ── */
.ds-card:hover,
.trade_card:hover,
.p2p-card:hover {
  border-color: rgba(0,217,168,0.18) !important;
  box-shadow: 0 4px 28px rgba(0,0,0,0.65), 0 0 0 1px rgba(0,217,168,0.08) !important;
}

/* ── Section headings get a subtle gradient treatment ── */
.section-title,
.page-title,
.inner-page-banner .title {
  background: linear-gradient(135deg, #ffffff 0%, #c8f5ec 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Premium subtle page texture ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0,217,168,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 80%, rgba(0,180,140,0.04) 0%, transparent 60%);
}
