/* Braiins Sans Font Declarations */
@font-face {
  font-family: 'Braiins Sans';
  src: url('/fonts/BraiinsSans-Regular.woff2') format('woff2'),
       url('/fonts/BraiinsSans-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Braiins Sans';
  src: url('/fonts/BraiinsSans-SemiBold.woff2') format('woff2'),
       url('/fonts/BraiinsSans-SemiBold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Braiins Sans';
  src: url('/fonts/BraiinsSans-Bold.woff2') format('woff2'),
       url('/fonts/BraiinsSans-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Carbon Design System Integration - Official Braiins Colors */
:root {
  /* Carbon theme override with authentic Braiins colors */
  --cds-background: #262626;
  --cds-layer: #161616;
  --cds-layer-accent: #393939;
  --cds-field: #393939;
  --cds-border-subtle: #262626;
  --cds-border-strong: #393939;
  --cds-text-primary: #F4F4F4;
  --cds-text-secondary: #A8A8A8;
  --cds-text-placeholder: #6f6f6f;
  --cds-button-primary: #6B50FF;      /* Braiins Violet 60 */
  --cds-button-primary-hover: #5940e6;
  --cds-focus: #6B50FF;
  --cds-interactive: #6B50FF;         /* Braiins Violet 60 */
  --cds-support-success: #13a454;     /* Official Braiins success color */
  --cds-support-error: #d9222c;       /* Official Braiins danger color */
  --cds-support-warning: #f59e0b;
}

/* Official Braiins Design System Color Variables */
:root {
  /* Background Colors */
  --bg-primary: #262626;          /* Main background */
  --bg-secondary: #161616;        /* Panels and header */
  --bg-tertiary: #393939;         /* Lighter panels */
  --bg-panel: #525252;            /* List backgrounds */
  
  /* Text Colors */
  --text-primary: #F4F4F4;        /* Primary text */
  --text-secondary: #A8A8A8;      /* Secondary text */
  --text-muted: #b9b9b9;          /* Muted text */
  
  /* Official Braiins Brand Colors */
  --braiins-violet: #6B50FF;      /* Violet 60 - Primary brand */
  --braiins-purple: #A72DEA;      /* Purple 60 */
  --braiins-red: #F95355;         /* Red 50 */
  --braiins-blue: #2460FF;        /* Blue 60 */
  --braiins-teal: #56D8E0;        /* Teal 30 */
  --braiins-black: #000000;       /* Black */
  
  /* Functional Colors */
  --accent-primary: #6B50FF;       /* Braiins Violet 60 */
  --accent-secondary: #A72DEA;     /* Braiins Purple 60 */
  --accent-interactive: #2460FF;   /* Braiins Blue 60 */
  --accent-active: #6B50FF;
  --success: #22c55e;             /* Improved success color for better contrast */
  --danger: #ef4444;              /* Improved danger color for better contrast */
  --warning: #f59e0b;
  
  /* Border Colors */
  --border: #262626;
  --border-light: #393939;
  --border-active: #6B50FF;       /* Braiins Violet for active states */
  
  /* Component Colors */
  --card-bg: #161616;
  --hover-bg: #393939;
  --list-bg: #393939;
  --list-item-bg: #525252;
  
  /* Legacy support */
  --accent-orange: #6B50FF;       /* Replaced with Braiins Violet */
  --accent-violet: #6B50FF;       /* Official Braiins Violet */
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Braiins Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 14px;
}

.app {
  min-height: 100vh;
  background: var(--bg-primary);
}

/* Header */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0;
  height: 50px;
  display: flex;
  align-items: center;
  width: 100%;
}

.header-content {
  max-width: none;
  margin: 0;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  width: 100%;
  height: 50px;
  position: relative;
}

/* Header Left Section - Logo and Navigation Tabs */
.header-left {
  display: flex;
  align-items: center;
  height: 50px;
  gap: 1.5rem;
  flex-shrink: 0;
}

.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-logo svg {
  display: block;
}

.header-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}

.header-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 1.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.header-tab:hover {
  color: var(--text-primary);
}

.header-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--braiins-violet);
}

/* Auth Section */
.auth-section {
  display: flex;
  align-items: stretch;
  gap: 0;
  height: 50px;
}

/* Ensure tooltips in auth section align properly */
.auth-section cds-tooltip {
  display: flex;
  align-items: center;
}

.auth-section .token-input-section {
  display: flex;
  align-items: center;
  padding-right: 0.5rem;
}

/* Header info items (Hashprice, BTC price, Balance, Account) - unified styling */
.header-prices {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-right: 1.5rem;
}

/* Ensure tooltips in header-prices align properly */
.header-prices cds-tooltip {
  display: flex;
  align-items: center;
}

.header-price-item,
.header-balance,
.header-account {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
}

/* Unified icon styling - all icons 16x16 */
.header-price-icon,
.header-balance .wallet-icon,
.user-icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  opacity: 0.7;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Unified value styling */
.header-price-value,
.header-balance .balance-value,
.account-label {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  font-family: inherit !important;
  color: var(--text-secondary) !important;
  line-height: 1 !important;
}

/* Spacing adjustments */
.header-balance {
  padding: 0 1rem;
}

.header-account {
  cursor: default;
}

.header-account .user-icon {
  margin-left: 1rem;
}

.header-account .account-label {
  padding-left: 0.5rem;
  padding-right: 1.5rem;
}

.logout-icon {
  margin: 0;
}

.login-icon {
  display: none;
  margin: 0;
}

.login-text {
  margin-left: 0;
}

/* Full-height Login/Logout buttons */
.auth-section cds-button {
  height: 50px !important;
  min-height: 50px !important;
}

.auth-section cds-button::part(button) {
  height: 50px !important;
  min-height: 50px !important;
  border-radius: 0 !important;
  padding: 0 1.5rem !important;
}

#login-btn,
#logout-btn,
#signup-btn {
  font-weight: bold !important;
  margin: 0 !important;
}

#login-btn::part(button),
#logout-btn::part(button),
#signup-btn::part(button) {
  font-weight: bold !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

#signup-btn {
  --cds-button-primary: var(--braiins-violet) !important;
  --cds-button-primary-hover: #5940e6 !important;
}

#signup-btn::part(button) {
  background: var(--braiins-violet) !important;
  border-color: var(--braiins-violet) !important;
}

#signup-btn:hover::part(button) {
  background: #5940e6 !important;
}

#login-btn,
#signup-btn {
  width: 100px !important;
  min-width: 100px !important;
}

#login-btn::part(button),
#signup-btn::part(button) {
  width: 100% !important;
  padding: 0 1rem !important;
}

#login-btn::part(button) {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

#login-btn:hover::part(button) {
  background: var(--hover-bg) !important;
}

#logout-btn::part(button) {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
  color: var(--text-secondary) !important;
  padding: 0 1rem !important;
}

#logout-btn:hover::part(button) {
  background: var(--hover-bg) !important;
}

/* Hamburger Menu Button - hidden by default on desktop */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Menu Overlay - hidden by default */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

/* Mobile Menu Panel - hidden by default */
.mobile-menu {
  display: none;
  position: fixed;
  top: 50px;
  left: 0;
  width: 280px;
  max-width: 80vw;
  height: calc(100vh - 50px);
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 1rem 0;
}

.mobile-menu.active {
  transform: translateX(0);
}

/* Mobile Navigation Items */
.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 0 1rem;
  margin-bottom: 1.5rem;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}

.mobile-nav-item:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.mobile-nav-item.active {
  color: var(--braiins-violet);
  background: rgba(109, 74, 255, 0.1);
}

/* Mobile Unit Switch */
.mobile-unit-switch {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.mobile-unit-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.mobile-unit-switch .unit-switch {
  width: 100%;
}

/* Mobile Auth Section */
.mobile-auth {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.mobile-auth-logged-out {
  display: none; /* Hidden by default, shown via JS at small screens */
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.mobile-auth-logged-out.visible {
  display: flex;
}

.mobile-auth-logged-out .token-input-custom {
  width: 100% !important;
  height: 40px;
}

.mobile-token-input {
  width: 100%;
  height: 40px;
  padding: 0 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.mobile-token-input:focus {
  outline: none;
  border-color: var(--braiins-violet);
}

.mobile-token-input::placeholder {
  color: var(--text-secondary);
}

.mobile-auth-buttons {
  display: flex;
  gap: 0.5rem;
}

.mobile-signup-btn,
.mobile-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mobile-signup-btn {
  background: var(--braiins-violet);
  color: #fff;
}

.mobile-signup-btn:hover {
  background: #5940e6;
}

.mobile-login-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.mobile-login-btn:hover {
  background: var(--hover-bg);
}

.mobile-auth-logged-in {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-account-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: 4px;
}

.mobile-balance {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.mobile-logout-btn {
  width: 100%;
}

/* Mobile Auth Info (balance, account, logout at smaller screens) */
.mobile-auth-info {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-auth-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: default;
}

.mobile-auth-item.mobile-logout-btn {
  cursor: pointer;
  border-radius: 4px;
  padding: 0.5rem 0;
  transition: color 0.15s ease;
}

.mobile-auth-item.mobile-logout-btn:hover {
  color: var(--text-primary);
}

.mobile-auth-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.mobile-auth-value {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Mobile Auth Buttons */
.btn-login,
.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-login {
  background: var(--braiins-violet);
  color: white;
}

.btn-login:hover {
  background: #5940e6;
}

.btn-logout {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-logout:hover {
  background: var(--hover-bg);
}

/* Logo Section */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: -2rem;
  padding-left: 0;
}

.logo-image {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.logo-text h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.logo-text .subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 0.125rem;
}

/* Header Middle Section */
.header-middle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  height: 50px;
  flex: 1;
  min-width: 0;
}

/* Header Right Section */
.header-right {
  display: flex;
  align-items: stretch;
  gap: 0;
  height: 50px;
  margin-right: -2rem;
  flex-shrink: 0;
}

/* Available Hashrate */
.available-hashrate {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.hashrate-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.hashrate-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

/* BTC Price */
.btc-price {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.price-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.price-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Token Input Section - Force no gaps */
.token-input-section {
  display: flex !important;
  align-items: stretch !important;
  height: 50px !important;
  gap: 0 !important;
  margin-left: auto !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

/* Custom Token Input - Full Control */
.token-input-section .token-input-custom {
  width: 192px !important;
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  margin: 0 !important;
  padding: 0 1rem !important;
  border-radius: 0 !important;
  border: 1px solid var(--border) !important;
  border-right: none !important;
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  font-size: 14px !important;
  line-height: 48px !important;
  box-sizing: border-box !important;
  float: left !important;
  margin-right: -1px !important;
  outline: none !important;
  font-family: inherit !important;
}

.token-input-section .token-input-custom:focus {
  border-color: var(--accent-orange) !important;
  box-shadow: 0 0 0 2px rgba(255, 144, 43, 0.2) !important;
}

.token-input-section .token-input-custom::placeholder {
  color: var(--text-secondary) !important;
  line-height: 48px !important;
}

.token-input-section .token-input-custom.error {
  border-color: #da1e28 !important;
}

.token-error {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  color: #da1e28;
  font-size: 12px;
  margin-top: 4px;
  white-space: nowrap;
}

.token-error.visible {
  display: block;
}

.token-input-section {
  position: relative;
}

/* Carbon Design Component Basic Styling */
.header-right cds-button {
  margin: 0 0.25rem;
}

.header-right #login-btn,
.header-right #logout-btn {
  margin: 0 !important;
}

/* Hide login section on signup/verification pages */
body.hide-login #auth-logged-out {
  display: none !important;
}

/* BUY HASHRATE NOW Button Styling */
.buy-hashrate-btn {
  font-weight: bold !important;
  font-size: 1.125rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.5rem 4rem !important;
  text-align: center !important;
  min-width: 280px !important;
  width: 280px !important;
  white-space: nowrap !important;
}

.buy-hashrate-btn::part(button) {
  font-weight: bold !important;
  font-size: 1.125rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
  min-width: 280px !important;
  padding: 1.5rem 4rem !important;
  white-space: nowrap !important;
}

.buy-hashrate-btn,
.buy-hashrate-btn *,
.buy-hashrate-btn::part(button),
.buy-hashrate-btn span {
  text-align: center !important;
  justify-content: center !important;
  align-items: center !important;
  white-space: nowrap !important;
}

.token-input-section cds-button {
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  width: 130px !important;
  min-width: 130px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  border-radius: 0 !important;
  white-space: nowrap !important;
  border: 1px solid transparent !important;
  float: left !important;
  flex-shrink: 0 !important;
  font-size: 14px !important;
  line-height: normal !important;
  margin-left: -1px !important;
}

.token-input-section cds-button:first-of-type {
  margin-left: -1px !important;
}

.token-input-section cds-button:last-of-type {
  margin-left: -2px !important;
}

.token-input-section cds-button[kind="secondary"] {
  background: #393939 !important;
  color: white !important;
  border: none !important;
}

.token-input-section cds-button[kind="secondary"]:hover,
.token-input-section cds-button[kind="secondary"]:hover::part(button) {
  background: #525252 !important;
  color: white !important;
}

.token-input-section cds-button[kind="primary"] {
  background: var(--braiins-violet) !important;
  color: white !important;
  border: none !important;
}

.token-input-section cds-button[kind="primary"]:hover,
.token-input-section cds-button[kind="primary"]:hover::part(button) {
  background: #5940e6 !important;
  color: white !important;
}

.token-input-section cds-button::part(button) {
  height: 50px !important;
  width: 100% !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  border-radius: 0 !important;
  border: 1px solid transparent !important;
  margin: 0 !important;
}

.token-input-section cds-button[kind="secondary"]::part(button) {
  background: #393939 !important;
  color: white !important;
}

.token-input-section cds-button[kind="primary"]::part(button) {
  background: var(--braiins-violet) !important;
  color: white !important;
}

.nav_call-button cds-button {
  text-transform: uppercase !important;
  font-weight: bold !important;
  height: 50px !important;
  min-height: 50px !important;
  width: 200px !important;
  min-width: 200px !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 1.5rem !important;
  margin: 0 !important;
  color: white !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 0.2s ease !important;
  white-space: nowrap !important;
}

.nav_call-button cds-button::part(button) {
  height: 50px !important;
  width: 100% !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: white !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  text-transform: uppercase !important;
}

.nav_call-button cds-button:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.nav_call-button cds-button:hover::part(button) {
  background: transparent !important;
}



/* Currency Toggle */
/* 3-Option Unit Switch */
.unit-switch {
  position: relative;
  height: 28px;
  width: 240px;
  background: #393939;
  border-radius: 28px;
  display: flex;
  align-items: center;
}

.unit-switch .switch-input {
  display: none;
}

.unit-switch .switch-label {
  position: relative;
  z-index: 2;
  flex: 1;
  line-height: 28px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  cursor: pointer;
  transition: color 0.15s ease-out;
}

.unit-switch .switch-input:checked + .switch-label {
  color: #fff;
}

.unit-switch .switch-selector {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 80px;
  height: 28px;
  border-radius: 28px;
  background-color: var(--braiins-violet);
  transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* Position selector based on checked input */
.unit-switch .switch-input:checked + .switch-label-btc ~ .switch-selector {
  transform: translateX(0%);
}

.unit-switch .switch-input:checked + .switch-label-sats ~ .switch-selector {
  transform: translateX(100%);
}

.unit-switch .switch-input:checked + .switch-label-usd ~ .switch-selector {
  transform: translateX(200%);
}

/* Bid/Ask Price Formatting */
.price-common {
  font-size: 0.75em !important;
  opacity: 0.7 !important;
}

.price-different {
  font-size: 1em !important;
  font-weight: bold !important;
}

/* Temporarily hide market metric icons */
.metric-icon {
  display: none !important;
}

/* Edit Order Button Styles */
.edit-order-btn {
  background: transparent;
  border: none;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.edit-order-btn.enabled {
  color: var(--accent-orange);
}

.edit-order-btn.enabled:hover {
  background: rgba(255, 133, 27, 0.1);
  color: var(--accent-orange);
}

.edit-order-btn.disabled {
  color: #666;
  cursor: not-allowed;
  opacity: 0.5;
}

/* Cancel Order Button Styles */
.cancel-order-btn {
  background: transparent;
  border: none;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cancel-order-btn.enabled {
  color: var(--accent-orange);
}

.cancel-order-btn.enabled:hover {
  background: rgba(255, 133, 27, 0.1);
  color: var(--accent-orange);
}

.cancel-order-btn.disabled {
  color: #666;
  cursor: not-allowed;
  opacity: 0.5;
}

/* Duplicate Order Button Styles */
.duplicate-order-btn {
  background: transparent;
  border: none;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.duplicate-order-btn.enabled {
  color: var(--accent-orange);
}

.duplicate-order-btn.enabled:hover {
  background: rgba(255, 133, 27, 0.1);
  color: var(--accent-orange);
}

.duplicate-order-btn.disabled {
  color: #666;
  cursor: not-allowed;
  opacity: 0.5;
}

.actions-cell {
  text-align: center;
  width: 110px; /* Width to accommodate edit, cancel, and duplicate buttons */
  white-space: nowrap; /* Prevent wrapping to new line */
}

/* Account Button Set Styling */
.account-button-set {
  display: flex;
  align-items: center;
  height: 50px;
  margin-left: 0.5rem;
}

.account-button-set cds-button-set {
  height: 50px !important;
}

.account-button-set cds-button,
.market-button-set cds-button {
  width: auto !important;
  min-width: auto !important;
  padding: 0 2rem !important;
}

.account-button-set cds-button-set cds-button {
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  width: 130px !important;
  min-width: 130px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  border-radius: 0 !important;
  white-space: nowrap !important;
  font-size: 14px !important;
  line-height: normal !important;
}

.account-button-set cds-button-set cds-button[kind="secondary"] {
  background: #393939 !important;
  color: white !important;
  border: none !important;
}

.account-button-set cds-button-set cds-button[kind="secondary"]:hover,
.account-button-set cds-button-set cds-button[kind="secondary"]:hover::part(button) {
  background: #525252 !important;
  color: white !important;
}

.account-button-set cds-button-set cds-button[kind="primary"] {
  background: var(--braiins-violet) !important;
  color: white !important;
  border: none !important;
}

.account-button-set cds-button-set cds-button[kind="primary"]:hover,
.account-button-set cds-button-set cds-button[kind="primary"]:hover::part(button) {
  background: #5940e6 !important;
  color: white !important;
}

.account-button-set cds-button-set cds-button::part(button) {
  height: 50px !important;
  width: 100% !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  border-radius: 0 !important;
  border: 1px solid transparent !important;
  margin: 0 !important;
}

.account-button-set cds-button-set cds-button[kind="secondary"]::part(button) {
  background: #393939 !important;
  color: white !important;
}

.account-button-set cds-button-set cds-button[kind="primary"]::part(button) {
  background: var(--braiins-violet) !important;
  color: white !important;
}

/* Market Button Set Styling (same as account but different class) */
.market-button-set {
  display: flex;
  align-items: center;
  height: 50px;
  margin-left: 0.5rem;
}

.market-button-set cds-button-set {
  height: 50px !important;
}

.market-button-set cds-button-set cds-button {
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  width: 130px !important;
  min-width: 130px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  border-radius: 0 !important;
  white-space: nowrap !important;
  font-size: 14px !important;
  line-height: normal !important;
}

.market-button-set cds-button-set cds-button[kind="secondary"] {
  background: #393939 !important;
  color: white !important;
  border: none !important;
}

.market-button-set cds-button-set cds-button[kind="secondary"]:hover,
.market-button-set cds-button-set cds-button[kind="secondary"]:hover::part(button) {
  background: #525252 !important;
  color: white !important;
}

.market-button-set cds-button-set cds-button[kind="primary"] {
  background: var(--braiins-violet) !important;
  color: white !important;
  border: none !important;
}

.market-button-set cds-button-set cds-button[kind="primary"]:hover,
.market-button-set cds-button-set cds-button[kind="primary"]:hover::part(button) {
  background: #5940e6 !important;
  color: white !important;
}

.market-button-set cds-button-set cds-button::part(button) {
  height: 50px !important;
  width: 100% !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  border-radius: 0 !important;
  border: 1px solid transparent !important;
  margin: 0 !important;
}

.market-button-set cds-button-set cds-button[kind="secondary"]::part(button) {
  background: #393939 !important;
  color: white !important;
}

.market-button-set cds-button-set cds-button[kind="primary"]::part(button) {
  background: var(--braiins-violet) !important;
  color: white !important;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-primary);
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-orange);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}


.header-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 50px;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-orange);
  margin-bottom: 0.25rem;
}

.logo .subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.header-stats {
  display: flex;
  gap: 2rem;
  height: 50px;
  align-items: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Dashboard Grid */
.dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  grid-template-areas:
    "top-row"
    "orderbook-full"
    "price-chart"
    "market-depth"
    "recent-trades";
}

.top-row { grid-area: top-row; }
.orderbook-full { grid-area: orderbook-full; }
.recent-trades { grid-area: recent-trades; }
.price-chart { grid-area: price-chart; }
.market-depth { grid-area: market-depth; }

/* Top Row: Market Status + Info/Luck Panel side by side */
.top-row {
  display: flex;
  gap: 1.5rem;
}

.top-row .market-status {
  flex: 1;
  min-width: 0;
}

.top-row .market-info,
.top-row .try-your-luck {
  flex: 0 0 450px;
  min-width: 0;
}

/* Cards without header */
.card.no-header {
  padding-top: 1rem;
}

/* Full width order book */
.orderbook-full {
  width: 100%;
}

/* Legacy support */
.orderbook-main {
  min-width: 0;
}

.market-info {
  min-width: 0;
}

/* Market Info Panel Styling */
.market-info-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-text {
  display: flex;
  align-items: flex-start;
}

.info-text p {
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0;
  color: var(--text-secondary);
  text-align: left;
}

.info-cta {
  display: flex;
  justify-content: center;
}


/* Card Styles */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: 0 4px 20px rgba(254, 132, 49, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.card-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-header h3 .beta-tag {
  font-size: 0.6rem;
  font-weight: 600;
  color: #4589ff;
  margin-left: 0.25rem;
  vertical-align: super;
  letter-spacing: 0.05em;
}

.card-header h3 .subheader {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 1rem;
}

.card-header h3 .subheader .market-guide-link {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-header h3 .subheader .market-guide-link:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

.card-header.no-border {
  border-bottom: none;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
}

/* Market Subheader (below card header) */
.market-subheader {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.market-subheader .market-guide-link {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.market-subheader .market-guide-link:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* Live Indicator */
.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 500;
}

.pulse {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Market down state */
.live-indicator.market-down {
  color: var(--error);
}

.live-indicator.market-down .pulse {
  background: var(--error);
  animation: none;
}

/* Market Down Warning Panel */
.market-down-warning {
  margin-bottom: 20px;
}

.market-down-warning cds-inline-notification {
  max-inline-size: 100%;
  --cds-support-warning: #eb6307;
  --cds-background-inverse: #161616;
  --cds-text-inverse: #f4f4f4;
  --cds-icon-inverse: #eb6307;
  --cds-notification-background-warning: #161616;
  background-color: #161616;
}

.market-down-warning cds-inline-notification::part(container) {
  background-color: #161616;
  border-left-color: #eb6307;
}

.market-down-warning cds-inline-notification::part(title),
.market-down-warning cds-inline-notification::part(subtitle) {
  color: #f4f4f4;
}

.market-down-warning cds-inline-notification svg {
  fill: #eb6307;
}

.market-down-warning .notification-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
  color: #f4f4f4;
}

.market-down-warning .notification-subtitle {
  color: #c6c6c6;
  line-height: 1.5;
}

.market-down-warning .notification-subtitle a {
  color: #6B50FF;
  text-decoration: none;
}

.market-down-warning .notification-subtitle a:hover {
  text-decoration: underline;
}

/* Bottom Info Panels */
.info-panels-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.info-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-panel h3 {
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.info-panel p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}

.info-panel a {
  text-decoration: none;
  align-self: flex-start;
  margin-top: 8px;
}

@media (max-width: 900px) {
  .info-panels-row {
    grid-template-columns: 1fr;
  }
}

/* Market Status */
.market-metrics {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.market-metrics.single-row {
  display: block;
}

.market-metrics.single-row .metrics-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  width: 100%;
}

.market-metrics.single-row .metric {
  min-width: 0;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.metric {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}

.metric-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.metric-content {
  flex: 1;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Bid and Ask colors - Enhanced contrast for dark background */
.bid-metric .metric-value {
  color: var(--success);
  font-weight: 600;
  text-shadow: 0 0 1px rgba(34, 197, 94, 0.3);
}

.ask-metric .metric-value {
  color: var(--danger);
  font-weight: 600;
  text-shadow: 0 0 1px rgba(239, 68, 68, 0.3);
}

.metric-change {
  font-size: 0.875rem;
  font-weight: 500;
}

.metric-change.positive { color: var(--success); }
.metric-change.negative { color: var(--danger); }

.separator {
  color: var(--text-muted);
  margin: 0 0.25rem;
}

.high { color: var(--success); }
.low { color: var(--danger); }

/* Order Book */
.order-book-content {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
}

.order-book.full-width {
  width: 100%;
}

.order-book-content.side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50/50 split */
  gap: 1.5rem;
}

.order-book-section {
  min-width: 0;
}

.order-book-section .section-header {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.order-book-section h4 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.last-price-header {
  text-align: center;
}

.last-price-header .current-price {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 1.1rem;
  font-weight: bold;
  color: #f59e0b;
}

/* Market Pair Enhancement */
.market-pair {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-weight: bold;
  color: var(--braiins-violet);
}

.order-book-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  padding: 0.5rem 0;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.order-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  padding: 0.4rem 0;
  transition: background 0.2s ease;
}

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

/* Orderbook containers with scroll for many orders */
.asks,
.bids {
  max-height: 400px;
  overflow-y: auto;
}

/* Enhanced contrast for order book rows */
.asks .order-row {
  color: var(--danger);
  font-weight: 500;
}
.bids .order-row {
  color: var(--success);
  font-weight: 500;
}

/* Unmatched orders (no hashrate matched) */
.order-row.unmatched {
  opacity: 0.4;
  color: var(--text-muted) !important;
}

.spread-row {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
  margin: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.current-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--braiins-violet);
}

.spread {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Recent Trades */
.trades-content {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
}

.trades-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  padding: 0.5rem 0;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.trades-list {
  max-height: 300px;
  overflow-y: auto;
}

.trade-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  padding: 0.4rem 0;
  transition: background 0.2s ease;
}

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

.trade-row.buy { border-left: 3px solid var(--success); padding-left: 0.5rem; }
.trade-row.sell { border-left: 3px solid var(--danger); padding-left: 0.5rem; }

/* Enhanced contrast for trade prices */
.trade-time { color: var(--text-muted); font-size: 0.75rem; }
.trade-price.buy { 
  color: var(--success); 
  font-weight: 600;
}
.trade-price.sell { 
  color: var(--danger); 
  font-weight: 600;
}

/* Chart Controls */
.chart-controls {
  display: flex;
  gap: 0.5rem;
}

.chart-period {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.chart-period:hover {
  border-color: var(--braiins-violet);
  color: var(--text-primary);
  background: rgba(107, 80, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(107, 80, 255, 0.2);
}

.chart-period.active {
  background: var(--braiins-violet);
  border-color: var(--braiins-violet);
  color: white;
  font-weight: 600;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(107, 80, 255, 0.3);
}

/* Chart Container */
.chart-container, .depth-chart-container {
  background: var(--bg-secondary);
  border-radius: 4px;
  padding: 1rem;
  margin-top: 1rem;
}

#price-chart, #depth-chart {
  width: 100%;
  height: auto;
}

/* Market Depth */
.market-depth-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.depth-chart-container {
  position: relative;
  height: 300px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  overflow: hidden;
}

#depth-chart {
  width: 100%;
  height: 100%;
  display: block;
}

.depth-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 2px;
}

.bids-color {
  background-color: var(--success);
}

.asks-color {
  background-color: var(--danger);
}

.depth-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Hashrate Statistics */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.stat-box:hover {
  border-color: var(--accent-violet);
  box-shadow: 0 2px 10px rgba(107, 80, 255, 0.1);
}

.stat-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-violet));
  border-radius: 50%;
}

.stat-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.stat-number {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* Buttons */
.btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn.primary {
  background: var(--accent-orange);
  border: 1px solid var(--accent-orange);
  color: white;
}

.btn.primary:hover {
  background: #e57429;
  border-color: #e57429;
}

.btn.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn.secondary:hover {
  border-color: var(--accent-orange);
  color: var(--text-primary);
}

.btn.large {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}



/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* User View Styles */
.user-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.auth-section {
  margin-bottom: 2rem;
}

.auth-form {
  padding: 1rem 0;
}

.auth-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.token-input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

#api-token {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

#api-token:focus {
  outline: none;
  border-color: var(--accent-orange);
}

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

.auth-status.connected {
  color: var(--success);
}

.auth-status.error {
  color: var(--danger);
}

.account-stats {
  display: flex;
  gap: 2rem;
  padding: 1rem 0;
}

/* Onboarding Styles */
.onboarding-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

.onboarding-hero {
  margin-bottom: 4rem;
}

.onboarding-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-orange);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.step-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.step-card:hover {
  border-color: var(--accent-orange);
  transform: translateY(-2px);
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--accent-orange);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.step-card h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.step-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.step-card a {
  color: var(--accent-orange);
  text-decoration: none;
}

.step-card a:hover {
  text-decoration: underline;
}

.signup-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3rem;
  max-width: 600px;
  margin: 0 auto;
}

.signup-section h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.signup-section p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

/* Responsive Design */

/* 1500px breakpoint - hide prices only */
@media (max-width: 1500px) {
  /* Hide hashprice and BTC price */
  .header-prices {
    display: none !important;
  }

  /* Reduce header padding */
  .header-content {
    padding: 0 1rem;
  }

  /* Reduce dashboard padding */
  .dashboard {
    padding: 1.5rem;
  }

  /* Adjust card padding */
  .card {
    padding: 1rem;
  }

  .card-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
  }
}

/* 1250px breakpoint - show hamburger with currency switch, hide currency from header */
@media (max-width: 1250px) {
  /* Hide currency switch from header completely */
  .header-middle {
    display: none !important;
  }

  /* Only left and right, space between them */
  .header-content {
    justify-content: space-between;
    gap: 0;
  }

  /* Show hamburger menu button */
  .hamburger-btn {
    display: flex;
  }

  /* Show mobile menu and overlay when active */
  .mobile-menu {
    display: block;
  }

  .mobile-menu-overlay {
    display: none;
  }

  .mobile-menu-overlay.active {
    display: block;
  }
}

/* 1060px breakpoint - hide nav tabs from header */
@media (max-width: 1060px) {
  /* Hide desktop navigation tabs */
  .header-tabs {
    display: none !important;
  }

  /* Shrink left side to fit content only (hamburger + logo) */
  .header-left {
    flex: 0 0 auto;
    gap: 0.5rem;
  }

  /* Reduce header content gap */
  .header-content {
    gap: 1rem;
  }

  /* Shrink token input (logged out) */
  .token-input-section .token-input-custom {
    width: 150px !important;
  }

  /* Reduce logged-in auth section spacing */
  .header-balance {
    padding: 0 0.5rem;
  }

  .header-account .user-icon {
    margin-left: 0.5rem;
  }

  .header-account .account-label {
    padding-right: 0.75rem;
  }
}

/* 800px breakpoint - further reduce spacing */
@media (max-width: 800px) {
  .header-content {
    padding: 0 0.5rem;
    gap: 0.5rem;
  }

  .header-right {
    margin-right: 0;
  }

  /* Further shrink token input (logged out) */
  .token-input-section .token-input-custom {
    width: 120px !important;
  }
}

/* 660px breakpoint - hide balance from header, show in hamburger, icon-only login */
@media (max-width: 660px) {
  /* Hide balance from header */
  .header-balance {
    display: none !important;
  }

  /* Show balance in mobile menu when logged in */
  #mobile-balance-section.visible {
    display: flex !important;
  }

  /* Icon-only login button */
  .login-icon {
    display: block !important;
  }

  .login-text {
    display: none !important;
  }

  #login-btn::part(button) {
    padding: 0 1rem !important;
  }
}

/* 500px breakpoint - hide account/logout from header, show in hamburger */
@media (max-width: 500px) {
  /* Hide account info and logout from header */
  .header-account {
    display: none !important;
  }

  #auth-logged-in #logout-btn {
    display: none !important;
  }

  /* Hide logged out auth section from header (token input + login/signup buttons) */
  #auth-logged-out {
    display: none !important;
  }

  /* Show account and logout in mobile menu when logged in */
  #mobile-account-section.visible {
    display: flex !important;
  }

  #mobile-logout-btn.visible {
    display: flex !important;
  }

  /* Show signup/login in mobile menu when logged out */
  #mobile-auth-logged-out.visible {
    display: flex !important;
  }
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-areas:
      "top-row"
      "orderbook-full"
      "price-chart"
      "market-depth"
      "recent-trades";
  }

  .top-row {
    flex-direction: column;
  }

  .top-row .market-info,
  .top-row .try-your-luck {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .dashboard {
    padding: 1rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "top-row"
      "orderbook-full"
      "price-chart"
      "market-depth"
      "recent-trades";
  }

  .top-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .market-metrics {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .market-metrics.single-row .metrics-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .order-book-content.side-by-side {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Account Dashboard Styles */
.account-dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.balance-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.balance-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--border);
}

.balance-item:last-child {
  border-bottom: none;
  font-weight: 600;
}

.balance-item-full {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.375rem;
}

.balance-item-full .balance-value {
  width: 100%;
  max-width: none !important;
  word-break: normal;
  overflow-wrap: anywhere;
  font-size: 0.8125rem;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

.balance-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.balance-value {
  color: var(--text-primary);
  font-weight: 500;
  font-family: 'Monaco', 'Consolas', monospace;
}

.balance-value.primary {
  color: var(--accent-orange);
  font-size: 1.125rem;
}

/* Deposit Info Section */
.deposit-info-section {
  display: none; /* Hidden by default, shown via JS when balance is 0 */
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.deposit-header {
  margin-bottom: 1.5rem;
}

.deposit-header h4 {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.deposit-message {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

.deposit-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.qr-code-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.qr-code {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: 4px;
}

.deposit-address-container {
  width: 100%;
}

.deposit-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.address-display {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.deposit-address-input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-family: 'Monaco', 'Consolas', monospace;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s ease;
}

.deposit-address-input:focus {
  border-color: var(--accent-purple);
}

.copy-address-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 40px;
}

.copy-address-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

.copy-address-btn:active {
  transform: scale(0.98);
}

.copy-address-btn svg {
  width: 16px;
  height: 16px;
}

/* Responsive deposit info */
@media (max-width: 768px) {
  .address-display {
    flex-direction: column;
  }

  .copy-address-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Account Dashboard Grid Layout */
.account-dashboard .dashboard-grid {
  display: grid !important;
  grid-template-columns: 7fr 3fr;
  gap: 1.5rem !important;
  align-items: start;
}

/* Override Carbon Design System grid spacing */
.account-dashboard cds-grid {
  gap: 1.5rem !important;
}

.account-dashboard cds-column {
  gap: 1.5rem !important;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.account-balance {
  grid-area: balance;
}

.recent-activity {
  grid-area: activity;
}

.account-status {
  grid-area: account-status;
}

.current-bids {
  grid-area: current-bids;
}

.bid-history {
  grid-area: bid-history;
}

.recent-activity h4 {
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.activity-row:last-child {
  border-bottom: none;
}

.activity-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.activity-type {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  width: fit-content;
}

.activity-type.deposit {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.activity-type.withdrawal {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.activity-amount {
  font-family: 'Monaco', 'Consolas', monospace;
  font-weight: 500;
  font-size: 0.875rem;
}

.activity-amount.positive {
  color: var(--success);
}

.activity-amount.negative {
  color: #ef4444;
}

.activity-date {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

/* Recent Transactions Styles */
.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.transaction-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.transaction-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.transaction-type {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.transaction-type.placement {
  color: var(--danger);
}

.transaction-type.cancellation {
  color: var(--success);
}

/* Order ID styling in transaction type */
.transaction-type {
  position: relative;
}

.transaction-datetime {
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-family: 'Monaco', 'Consolas', monospace;
}

.transaction-datetime-neutral {
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-count-muted {
  color: var(--text-secondary);
  font-weight: 400;
}

.transaction-amount {
  font-family: 'Monaco', 'Consolas', monospace;
  font-weight: 500;
  font-size: 0.875rem;
  text-align: right;
}

.transaction-amount.placement {
  color: var(--danger);
}

.transaction-amount.cancellation {
  color: var(--success);
}

/* Transaction Type Toggle */
.transaction-type-toggle {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background-color: var(--card-bg);
}

.toggle-option {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
}

.toggle-option:hover {
  color: var(--text-primary);
}

.toggle-option.active {
  color: var(--accent-orange);
  background: rgba(254, 132, 49, 0.1);
}

/* On-chain transaction types */
.transaction-type.deposit {
  color: var(--success);
}

.transaction-type.withdrawal {
  color: var(--danger);
}

.transaction-amount.deposit {
  color: var(--success);
}

.transaction-amount.withdrawal {
  color: var(--danger);
}

/* Market settlement transaction types */
.transaction-type.revenue {
  color: var(--success);
}

.transaction-type.cost {
  color: var(--danger);
}

.transaction-amount.revenue {
  color: var(--success);
}

.transaction-amount.cost {
  color: var(--danger);
}

/* On-chain transaction styles */
.onchain-transactions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.onchain-transaction {
  background: var(--bg-secondary);
  border-radius: 4px;
  padding: 0.75rem;
  border: 1px solid var(--border);
}

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

.onchain-main {
  margin-bottom: 0.5rem;
}

.onchain-detail {
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.15rem 0;
}

.transaction-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  min-width: 40px;
}

.mempool-link {
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.8rem;
  color: var(--link-color, #6b50ff);
  text-decoration: none;
}

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

/* Collapsible Account Info Styles */
.account-info.collapsible .card-header.clickable {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.account-info.collapsible .card-header.clickable:hover {
  background: var(--hover-bg);
  border-radius: 4px;
  margin: -0.5rem;
  padding: 0.5rem;
}

.collapse-icon {
  font-size: 0.875rem;
  transition: transform 0.3s ease;
  color: var(--text-secondary);
}

.account-info.expanded .collapse-icon {
  transform: rotate(180deg);
}

.info-content {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.info-content.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

.info-content:not(.collapsed) {
  max-height: 400px;
  opacity: 1;
  padding-top: 1rem;
}

/* info-item styles removed - now using balance-item classes for consistency */

/* Special styling for BTC address in Account Info */
.balance-value.btc-address {
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.75rem;
  white-space: nowrap;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.balance-value.btc-address .copy-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  margin-left: 4px;
}

.balance-value.btc-address #btc-address {
  margin-left: 4px;
}

.balance-value.btc-address .copy-btn:hover {
  color: var(--text-primary);
}

.balance-value.btc-address .qr-toggle-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.balance-value.btc-address .qr-toggle-btn:hover {
  color: var(--accent-purple);
}

.balance-value.btc-address .qr-toggle-btn.active {
  color: var(--accent-purple);
}

.balance-value.btc-address .deposit-info-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-left: 4px;
}

.balance-value.btc-address .deposit-info-btn:hover {
  opacity: 0.8;
}

/* Reveal address button */
.reveal-address-btn {
  background: none;
  border: 1px solid var(--braiins-violet);
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  color: var(--braiins-violet);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.reveal-address-btn:hover {
  background: var(--braiins-violet);
  color: white;
}

.reveal-address-btn svg {
  flex-shrink: 0;
}

/* Deposit disclaimer modal */
.deposit-disclaimer-content {
  line-height: 1.6;
}

.deposit-disclaimer-content p {
  margin: 0 0 12px 0;
  color: var(--text-secondary);
}

.deposit-disclaimer-content p:last-child {
  margin-bottom: 0;
}

.deposit-disclaimer-warning {
  background: rgba(218, 30, 40, 0.1);
  border-left: 3px solid #da1e28;
  padding: 12px 16px;
  margin-top: 16px !important;
  border-radius: 0 4px 4px 0;
}

.deposit-disclaimer-warning strong {
  color: #da1e28;
}

.deposit-qr-container {
  padding: 1rem;
  display: flex;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 6px;
  margin: 0.5rem 0;
}

.deposit-qr-container .inline-qr-code {
  width: 150px;
  height: 150px;
  border-radius: 4px;
}

/* Progress Gauge */
.progress-gauge {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-block;
}

.progress-gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-gauge .progress-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 3;
}

.progress-gauge .progress-fill {
  fill: none;
  stroke: var(--accent-orange);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 0.3s ease;
}

.progress-gauge .progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  line-height: 1;
}

/* Info icon with tooltip for progress */
.info-icon-wrapper {
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
  cursor: help;
  position: relative;
}

.info-icon-wrapper .info-icon {
  display: block;
  color: var(--text-secondary);
}

.info-icon-wrapper:hover .info-icon {
  color: var(--text-primary);
}

.info-icon-wrapper::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 8px;
  padding: 8px 12px;
  background: #000;
  color: #fff;
  font-size: 0.75rem;
  white-space: normal;
  max-width: 200px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.info-icon-wrapper:hover::after {
  opacity: 1;
}

/* Mobile tooltip positioning */
@media (max-width: 768px) {
  .info-icon-wrapper::after {
    right: auto;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-right: 0;
    margin-top: 8px;
    max-width: 180px;
  }
}

@media (max-width: 1100px) {
  /* Prevent page-level horizontal scroll */
  html, body, .app, .main-content {
    overflow-x: hidden;
  }

  .account-dashboard {
    padding: 1rem 0;
  }

  /* Remove horizontal padding from cards with tables */
  .account-dashboard .card.current-bids,
  .account-dashboard .card.bid-history {
    padding-left: 0;
    padding-right: 0;
    border-left: none;
    border-right: none;
    border-radius: 0;
  }

  .account-dashboard .card.current-bids .card-header,
  .account-dashboard .card.bid-history .card-header {
    padding: 0 1rem;
  }

  .account-dashboard .card.current-bids .bids-list,
  .account-dashboard .card.bid-history .history-list {
    padding: 0 0.5rem;
  }

  .account-dashboard .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "account-status"
      "balance"
      "activity"
      "current-bids"
      "bid-history";
  }

  /* Reset Carbon grid margins/padding */
  .account-dashboard cds-grid {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  .account-dashboard cds-column {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  /* Deposit address: Row 1 = label + icons, Row 2 = address */
  .balance-item:has(.btc-address) {
    flex-wrap: wrap;
    align-items: center;
  }

  .balance-item:has(.btc-address) .balance-label {
    flex: 1;
  }

  #deposit-address-revealed {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
  }

  /* Icons stay together with small gap */
  #deposit-address-revealed .qr-toggle-btn {
    flex-shrink: 0;
    margin-right: 8px;
  }

  #deposit-address-revealed .copy-btn {
    flex-shrink: 0;
  }

  /* Address on its own line below */
  #deposit-address-revealed #btc-address {
    flex-basis: 100%;
    word-break: break-all;
    margin: 0.5rem 0 0 0;
    text-align: left;
  }

  /* Hide Try Your Luck and Price Chart on mobile */
  .try-your-luck,
  .price-chart {
    display: none !important;
  }

  /* Bids table - horizontal scroll on mobile */
  .bids-list, .history-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: calc(100vw - 0.5rem);
  }

  .bids-table {
    min-width: 600px;
  }

  /* Hide Created column on mobile */
  .bids-table th:nth-child(6),
  .bids-table td:nth-child(6) {
    display: none;
  }

  /* Order detail modal - History table scroll */
  .history-panel {
    max-width: calc(100vw - 2rem);
    padding: 1rem;
  }

  .history-panel .cds--data-table {
    min-width: 500px;
  }

  /* Order detail modal - Target URL and Pool Username on separate rows */
  .panel-row:has(.panel-value.mono) {
    flex-wrap: wrap;
  }

  .panel-row:has(.panel-value.mono) .panel-label {
    flex: 1;
    min-width: 100%;
    margin-bottom: 0.25rem;
  }

  .panel-row:has(.panel-value.mono) .panel-value {
    flex-basis: 100%;
    word-break: break-all;
    text-align: left;
  }

  /* Market page - Last price wrap on mobile */
  .last-price-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }

  /* Hide "sats" suffix in last price on mobile */
  .sats-suffix {
    display: none;
  }

  /* Hide solo icon and speed units in orderbook on mobile */
  .solo-icon,
  .speed-unit {
    display: none;
  }

  /* Orderbook scroll on mobile - scroll only the list, header stays fixed */
  #bids-list,
  #asks-list {
    overflow-x: auto !important;
    overflow-y: auto;
    max-height: 25rem;
    -webkit-overflow-scrolling: touch;
  }

  /* Use fixed column widths on mobile to prevent content cutoff */
  .bids-section .order-book-header,
  .bids-section .order-row {
    grid-template-columns: 70px 60px 70px 120px;
    min-width: 360px;
  }

  .asks-section .order-book-header,
  .asks-section .order-row {
    grid-template-columns: 70px 60px 60px 80px;
    min-width: 310px;
  }

  /* Allow header text to wrap on mobile */
  .order-book-header span {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 0.7rem;
  }
}

/* Bid Lists */
.bids-list, .history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Bids Table */
.bids-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.bids-table th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Table header unit styling - regular weight, forced new line */
.th-unit {
  display: block;
  font-weight: 400;
  font-size: 0.65rem;
  text-transform: none;
  letter-spacing: normal;
  opacity: 0.8;
  margin-top: 0.125rem;
}

.bids-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.bids-table tbody tr:hover {
  background: var(--bg-secondary);
}

.bids-table tbody tr:last-child td {
  border-bottom: none;
}

.bids-table td:nth-child(2) {
  font-family: 'Monaco', 'Consolas', monospace;
  font-weight: 500;
}

.bids-table td:nth-child(3),
.bids-table td:nth-child(4),
.bids-table td:nth-child(5) {
  font-family: 'Monaco', 'Consolas', monospace;
}

/* Created column - smaller text to fit on one line */
.bids-table td:nth-child(6) {
  font-size: 0.75rem;
  white-space: nowrap;
}

/* ETA column styling */
.eta-cell {
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Status semaphore indicators */
.status-semaphore {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 auto;
  cursor: pointer;
}

.status-semaphore.active {
  background-color: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.status-semaphore.paused {
  background-color: #6b7280;
  box-shadow: 0 0 8px rgba(107, 114, 128, 0.3);
}

.status-semaphore.cancelling {
  background-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

/* Signup Styles */
.signup-container, .confirmation-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.signup-card, .confirmation-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.signup-card .card-header, .confirmation-card .card-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
}

.signup-card h2, .confirmation-card h2 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-size: 1.75rem;
  font-weight: 700;
}

.signup-card .subtitle, .confirmation-card .subtitle {
  color: var(--text-secondary);
  margin: 0;
  font-size: 1rem;
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Onboarding Process Steps */
.onboarding-info {
  padding: 2rem;
  border-bottom: 1px solid var(--border);
}

.onboarding-info h3 {
  margin: 0 0 1.5rem 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent-orange);
  color: white;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.step-content strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.step-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Form Styles */
.signup-form {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 2px rgba(255, 136, 0, 0.1);
}

.form-group input.error {
  border-color: #ef4444;
}

.form-hint {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.field-error {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.field-success {
  color: var(--cds-support-success);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.field-loading {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.field-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid var(--text-secondary);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.form-group input.success {
  border-color: var(--cds-support-success);
  box-shadow: 0 0 0 2px rgba(19, 164, 84, 0.1);
}

.form-group input.loading {
  border-color: var(--text-secondary);
}

/* Verified channel styling */
.verification-channel.verified {
  background: rgba(19, 164, 84, 0.05);
  border-left: 4px solid var(--cds-support-success);
  border-radius: 0 8px 8px 0;
}

.verification-channel.verified .verification-icon {
  color: var(--cds-support-success);
}

.status-verified {
  color: var(--cds-support-success) !important;
  font-weight: 500;
}

/* Verification check styling */
.verification-check {
  margin-left: 0.5rem;
  color: var(--cds-support-success);
  font-size: 1.2em;
  font-weight: bold;
}

/* Make confirmation sections more compact to fit on one screen */
.confirmation-details {
  padding: 1.5rem;
}

.detail-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.detail-section h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.info-grid {
  gap: 0.75rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.info-item .info-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.info-item .info-value {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.verification-section {
  margin: 1rem 0 !important;
}

.verification-channel {
  margin-bottom: 0.75rem !important;
  padding: 0.75rem !important;
}

.next-steps {
  margin: 1rem 0 !important;
}

.steps-list .step-item {
  margin-bottom: 0.75rem !important;
  padding: 0.75rem !important;
}

.form-actions {
  margin-top: 1.5rem;
}

.signup-submit-btn {
  width: 100%;
  padding: 0.875rem;
  font-size: 1rem;
  font-weight: 600;
}

.signup-submit-btn:disabled {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-color: var(--border);
  cursor: not-allowed;
  opacity: 0.7;
}

/* Signup Disabled Banner */
.signup-disabled-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  min-height: 300px;
}

.signup-disabled-banner .disabled-content {
  text-align: center;
  max-width: 400px;
}

.signup-disabled-banner .disabled-icon {
  margin-bottom: 1.5rem;
}

.signup-disabled-banner .disabled-title {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.signup-disabled-banner .disabled-message {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
}

.signup-disabled-banner .btn-back-home {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--braiins-violet);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.signup-disabled-banner .btn-back-home:hover {
  background: #5940e6;
}

.detail-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.detail-section h3 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
}

.info-grid {
  display: grid;
  gap: 1rem;
}

/* Duplicate info-item styles removed - using balance-item classes instead */

/* Address and Token Containers */
.address-container, .token-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.btc-address, .token-value {
  flex: 1;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
  color: var(--text-primary);
  word-break: break-all;
  background: none;
  border: none;
  padding: 0;
}

.copy-btn {
  padding: 0.375rem 0.75rem;
  background: var(--accent-orange);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: #e67300;
}

.copy-btn.copied {
  background: var(--success);
}

.address-hint {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

/* Token Grid */
.tokens-grid {
  display: grid;
  gap: 1rem;
}

.token-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.token-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}

.token-label {
  font-weight: 600;
  color: var(--text-primary);
}

.token-type {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.token-type.owner {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.token-type.readonly {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.token-container {
  margin: 0.75rem;
}

/* Next Steps */
.next-steps h3 {
  margin: 0 0 1.5rem 0;
}

.steps-list {
  display: grid;
  gap: 1rem;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.step-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.step-text strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.step-text p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.confirmation-actions {
  margin-top: 1.5rem;
  text-align: center;
}

.confirmation-actions .btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .signup-container, .confirmation-container {
    padding: 1rem;
  }
  
  .process-steps {
    gap: 1rem;
  }
  
  .step-number {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  
  .address-container, .token-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .copy-btn {
    align-self: flex-end;
    width: fit-content;
  }
}

.bid-row, .history-row {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  gap: 0.375rem;
}

/* Remove the old expanded class since we're using grid areas now */

.history-line-1 {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.history-line-2 {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.history-price {
  color: var(--text-primary);
  font-weight: 500;
  font-family: 'Monaco', 'Consolas', monospace;
  min-width: 140px;
}

.history-amount {
  color: var(--text-secondary);
  font-size: 0.875rem;
  min-width: 100px;
}

.history-date {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-left: auto;
}

.bid-id {
  color: var(--text-secondary);
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.75rem;
}

/* Remove old styles that are no longer needed */
.bid-info, .history-info,
.bid-status, .history-status {
  display: none;
}

.status {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status.active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.status.filled {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.status.cancelled {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.status.confirmed {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.status.pending {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.status.completed {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.status.paused {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  position: relative;
  cursor: help;
}

.status.paused:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  margin-bottom: 5px;
}

.status.paused:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1f2937;
  z-index: 1000;
}

.bid-date, .history-date, .transaction-date {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.speed-limit, .bid-memo {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-style: italic;
  display: block;
  margin-top: 0.25rem;
}

.bid-memo {
  color: var(--accent-orange);
  font-weight: 500;
}

/* Fees */
.fees-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fee-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--border);
}

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

.fee-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.fee-value {
  color: var(--text-primary);
  font-weight: 500;
  font-family: 'Monaco', 'Consolas', monospace;
}

/* Transactions */
.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.transaction-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.transaction-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.transaction-type {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  display: inline-block;
  width: fit-content;
}

.transaction-type.deposit {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.transaction-type.trade {
  background: rgba(254, 132, 49, 0.1);
  color: var(--accent-orange);
}

.transaction-type.withdrawal {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.transaction-amount {
  font-family: 'Monaco', 'Consolas', monospace;
  font-weight: 500;
}

.transaction-amount.positive {
  color: var(--success);
}

.transaction-amount.negative {
  color: #ef4444;
}

.transaction-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

/* Account Status */
.status-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--border);
}

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

.status-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.status-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* Helper styles */
.no-data, .token-required {
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  padding: 2rem 0;
}

.transaction-description {
  color: var(--text-secondary);
  font-size: 0.75rem;
  display: block;
  margin-top: 0.25rem;
}

.show-more {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-align: center;
  margin-top: 1rem;
  padding: 0.5rem;
  border-top: 1px solid var(--border);
}

.settlement-count {
  color: var(--accent-orange);
  font-size: 0.75rem;
  font-weight: 500;
  display: block;
  margin-top: 0.25rem;
}

.fulfillment-percentage {
  font-size: 0.75rem;
  font-weight: 500;
  display: block;
  margin-top: 0.25rem;
}

.fulfillment-percentage.fulfilled-complete {
  color: var(--success);
}

.fulfillment-percentage.fulfilled-partial {
  color: var(--accent-orange);
}

.fulfillment-percentage.fulfilled-low {
  color: #ef4444;
}

.shares-info {
  color: var(--text-secondary);
  font-size: 0.7rem;
  display: block;
  margin-top: 0.25rem;
  font-family: 'Monaco', 'Consolas', monospace;
}

.show-more-section {
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.show-more-btn {
  background: var(--card-bg);
  border: 1px solid var(--accent-orange);
  color: var(--accent-orange);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.show-more-btn:hover {
  background: var(--accent-orange);
  color: white;
}

/* Popup Styles */
.bids-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.bids-popup {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow: hidden;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.popup-header h3 {
  color: var(--text-primary);
  margin: 0;
}

.popup-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-radius: 4px;
}

.popup-content {
  max-height: 60vh;
  overflow-y: auto;
  padding: 1rem;
}

.popup-bid-row {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.popup-bid-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.bid-summary {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto auto auto;
  gap: 1rem;
  align-items: center;
  font-size: 0.875rem;
}

.bid-index {
  color: var(--text-secondary);
  font-weight: 500;
}

.bid-id {
  color: var(--text-secondary);
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.75rem;
}

@media (max-width: 768px) {
  .bid-summary {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  
  .bid-summary span {
    display: block;
  }
}

/* Modal Styles - Figma Design */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: var(--card-bg);
  margin: 2rem auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 95%;
  max-width: 900px;
  max-height: calc(100vh - 4rem);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.3s ease-out;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--card-bg);
}

.modal-header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 400;
}

/* Carbon Design System Modal Header Styling */
cds-modal-header {
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid var(--border) !important;
}

cds-modal-heading {
  font-size: 1.125rem !important;
  font-weight: 500 !important;
  color: var(--cds-text-primary) !important;
  margin: 0 !important;
}

.close-modal {
  color: #888;
  font-size: 24px;
  font-weight: normal;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-modal:hover,
.close-modal:focus {
  color: #ffffff;
}

.modal-body {
  padding: 0;
  max-height: none;
  overflow-y: auto;
  background-color: var(--card-bg);
}

/* Order Detail Layout */
.order-detail-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Progress Section */
.progress-section {
  padding: 2rem;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 2rem;
}

.progress-gauge-large {
  position: relative;
  width: 120px;
  height: 120px;
}

.gauge-svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke: var(--braiins-violet);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.3s ease;
}

.gauge-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.gauge-percentage {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.gauge-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.speed-chart-container {
  width: 100%;
  background-color: var(--card-bg);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.chart-period-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0 1rem;
}

.chart-period-btn {
  padding: 0.25rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.chart-period-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.chart-period-btn.active {
  background: #6B50FF;
  border-color: #6B50FF;
  color: white;
}

.speed-chart-svg {
  width: 100%;
  height: auto;
  background-color: var(--card-bg);
  cursor: crosshair;
  display: block;
}

.speed-chart-tooltip {
  position: absolute;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-primary);
  pointer-events: none;
  z-index: 1001;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Panel Sections */
.status-panel,
.financial-panel {
  padding: 1.5rem 2rem;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.financial-panel {
  border-bottom: none;
}

.hashrate-panel,
.financials-panel {
  padding: 1.5rem 2rem;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.financials-panel {
  border-bottom: none;
}

.panel-section-title {
  font-family: 'Braiins Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.panel-value.important {
  color: var(--cds-interactive);
  font-weight: 600;
}

.panel-row.breakdown .panel-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.panel-row.breakdown .panel-value {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.panel-row.breakdown .panel-label::before {
  content: "– ";
  margin-right: 0.25rem;
}

.panel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bg-tertiary);
}

.panel-row:last-child {
  border-bottom: none;
}

.panel-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.panel-value {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}

.panel-value.accent {
  color: var(--braiins-violet);
}

.panel-value.mono {
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.8rem;
}

.panel-value.status-active,
.panel-value.status-running {
  color: #10b981;
}

.panel-value.status-pending {
  color: #f59e0b;
}

.panel-value.status-completed {
  color: #6b7280;
}

.panel-value.status-cancelled {
  color: #ef4444;
}

.clickable-order-id {
  color: var(--accent-orange);
  cursor: pointer;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.clickable-order-id:hover {
  color: #ff8c00;
}

@media (max-width: 768px) {
  .modal-content {
    margin: 1rem auto;
    width: 98%;
    max-height: calc(100vh - 2rem);
  }
  
  .progress-section,
  .status-panel,
  .financial-panel {
    padding: 1rem 1.5rem;
  }
  
  .progress-gauge-large {
    width: 100px;
    height: 100px;
  }
  
  .gauge-svg {
    width: 100px;
    height: 100px;
  }
  
  .gauge-percentage {
    font-size: 1.5rem;
  }
  
  .panel-row {
    padding: 0.375rem 0;
  }
  
  .panel-label,
  .panel-value {
    font-size: 0.8rem;
  }
}

/* Carbon Component Integration Styles */
body {
  background-color: var(--bg-primary);
}

.app {
  background: var(--bg-primary);
}

/* Header integration with Carbon */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--cds-border-subtle);
}

/* Token input section styling */
.token-input-section {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

.token-input-section cds-text-input {
  min-width: 300px;
}

/* New Rectangular Currency Toggle */
.currency-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.currency-toggle {
  display: flex;
  background: #393939;
  border-radius: 0;
  border: 1px solid var(--border);
  overflow: hidden;
}

.currency-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: #393939;
  color: #A8A8A8;
  border: none;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 50px;
}

.currency-option.active {
  background: var(--braiins-violet);
  color: white;
}

.currency-option:hover {
  background: #525252;
  color: white;
}

.currency-option.active:hover {
  background: #5940e6;
  color: white;
}

/* Old Currency toggle integration */
.old-currency-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.currency-label {
  color: var(--cds-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.currency-label.active {
  color: var(--cds-text-primary);
}

/* Card styling to work with Carbon */
.card {
  background: var(--card-bg);
  border: 1px solid var(--cds-border-subtle);
  border-radius: 4px;
}

/* Carbon grid adjustments */
cds-grid {
  margin: 0;
  padding: 0;
}

cds-column {
  padding: 0;
}

/* Ensure Carbon components use Braiins Sans */
cds-button,
cds-text-input,
cds-toggle,
cds-modal {
  font-family: 'Braiins Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Table Header Styling */
table thead,
table th,
.table-header,
.bids-table thead,
.bids-table th {
  background: var(--braiins-black) !important;
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

table thead tr,
.bids-table thead tr {
  background: var(--braiins-black);
}

/* Table Body and Row Styling */
table tbody tr,
table td,
.bids-table tbody tr,
.bids-table td {
  padding: 0.375rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

table tbody tr:hover,
.bids-table tbody tr:hover {
  background: var(--hover-bg);
}

/* Override Carbon button colors for official Braiins theme */
cds-button[kind="primary"] {
  --cds-button-primary: var(--braiins-violet);
  --cds-button-primary-hover: #5940e6;
}

cds-button[kind="secondary"] {
  --cds-button-secondary: transparent;
  --cds-button-secondary-hover: var(--hover-bg);
  color: var(--braiins-violet);
  border-color: var(--braiins-violet);
}

/* Apply Braiins colors to interactive elements */
.clickable-order-id {
  color: var(--braiins-violet);
  cursor: pointer;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.clickable-order-id:hover {
  color: var(--braiins-purple);
}

/* Braiins Navigation (Exact from braiins.com) */
.nav_wrapper {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: #131313;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  height: 50px;
  overflow: hidden;
}

.navbar {
  background: transparent;
}

.w-nav {
  position: relative;
  background: #131313;
  z-index: 1000;
}

.nav_wrap {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0 0 0 2rem;
  height: 50px;
}

.nav_brand-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100%;
  justify-content: center;
}

.nav_brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  height: 25px;
}

.img-brand {
  width: 100px;
  height: 16px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.nav_brand .img-brand svg {
  width: 100px !important;
  height: 16px !important;
  max-width: 100px !important;
  max-height: 16px !important;
}

.nav_brand-wrap .w-embed svg {
  width: 101px !important;
  height: 16px !important;
}

/* Nuclear option - force all navigation SVGs to be small */
.navbar svg {
  max-width: 101px !important;
  max-height: 16px !important;
}

/* Braiins Navigation Layout */
.braiins-nav {
  background: #131313;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.braiins-nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: none;
  padding: 0 2rem;
  height: 50px;
}

.braiins-nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.braiins-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.braiins-logo-img {
  height: 16px;
  width: auto;
  max-width: 101px;
  object-fit: contain;
}

.braiins-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.braiins-nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Schedule a call button styling */
.braiins-cta-button {
  background: #6B50FF;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.braiins-cta-button:hover {
  background: #5A3FE6;
  color: white;
  text-decoration: none;
}

.w-embed {
  position: relative;
  display: flex;
  align-items: center;
}

.w-embed svg {
  width: 100%;
  height: 100%;
}

.nav_menu-items {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-start;
  margin-left: 2rem;
}

.nav_menu-items_inner {
  display: flex;
  align-items: center;
}

.nav_menu-link-wrap {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav_menu-dropdown {
  position: relative;
  display: inline-block;
}

.nav_menu-dropdown-toggle {
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.375rem 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav_menu-dropdown-toggle:hover {
  color: #6b50ff;
}

.nav_menu-dropdown-icon {
  margin-left: 0.5rem;
  display: flex;
  align-items: center;
}

.icon-embed-xxsmall {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav_link {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.375rem 0;
  transition: color 0.2s ease;
}

.nav_link:hover {
  color: #6b50ff;
}

/* Dropdown List */
.w-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: #131313;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

/* Exact Braiins Dropdown Structure */
.nav_menu-dropdown-list {
  position: fixed;
  top: 50px;
  left: 0;
  width: 100vw;
  background: #131313;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 999;
}

.nav_menu-dropdown-list_inner {
  padding: 1rem 0;
  transform: translate3d(0px, 0rem, 0px) scale3d(1, 1, 1) rotateX(0deg) rotateY(0deg) rotateZ(0deg) skew(0deg, 0deg);
  transform-style: preserve-3d;
  width: 100%;
}

.nav_menu-dropdown-grid-links {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 0;
  width: 100%;
  padding: 0 2rem;
  margin: 0;
}

.nav_menu-dropdown-link {
  display: flex;
  align-items: flex-start;
  padding: 0.75rem;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav_menu-dropdown-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav_menu-dropdown-link-icon {
  width: 48px;
  height: 48px;
  margin-right: 1rem;
  border-radius: 8px;
  flex-shrink: 0;
}

.nav_menu-dropdown-link_inner {
  flex: 1;
}

.text-weight-semibold {
  font-weight: 600;
}

.nav_menu-current-wrap {
  margin-bottom: 0.5rem;
}

.text-size-regular {
  font-size: 1rem;
  color: #f4f4f4;
  margin-bottom: 0.25rem;
}

.text-color-gray_20 {
  color: #a8a8a8;
}

.text-size-small {
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.4;
}

.nav_menu-current-line {
  display: none;
}

/* Show dropdown when open */
.nav_menu-dropdown-list.w--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.w-dropdown-list.w--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav_menu-price-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.nav_menu-price-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav_menu-price-label {
  color: #a8a8a8;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.nav_menu-price-value {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inconsolata', monospace;
  white-space: nowrap;
}

.nav_menu-price-direction-wrap {
  display: flex;
  align-items: center;
}

.nav_menu-price-direction {
  font-size: 12px;
  font-weight: 500;
  font-family: 'Inconsolata', monospace;
  color: #22c55e;
}

.nav_menu-price-direction.negative {
  color: #ef4444;
}

/* Price direction arrows */
.nav_menu-price-direction-wrap {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav_menu-price-direction-wrap [data-stats="arrow-up"],
.nav_menu-price-direction-wrap [data-stats="arrow-down"] {
  display: none;
}

.nav_menu-price-direction-wrap.positive [data-stats="arrow-up"] {
  display: flex;
}

.nav_menu-price-direction-wrap.negative [data-stats="arrow-down"] {
  display: flex;
}

.icon-embed-xxxsmall {
  width: 10px;
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-size-tiny {
  font-size: 10px;
  font-weight: 500;
  font-family: 'Inconsolata', monospace;
}

.text-color-gray_40 {
  color: #a8a8a8;
}

.price-change.positive {
  color: #22c55e;
}

.price-change.negative {
  color: #ef4444;
}

.price-change::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 0.25rem;
  border-style: solid;
}

.nav_button-wrap {
  display: flex;
  align-items: stretch;
  height: 100%;
  margin-left: 1.5rem;
}

.nav_call-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.schedule_button-wrap {
  display: flex;
  align-items: center;
}

.button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.button.is-small {
  padding: 0.5rem 1rem;
  font-size: 13px;
}

.button.is-navbar {
  padding: 0.5rem 1rem;
}

.button.is-dark {
  background: #6b50ff;
  color: #fff;
  border: 1px solid #6b50ff;
}

.button.is-dark:hover {
  background: #5a42d4;
  border-color: #5a42d4;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 80, 255, 0.3);
}


.w-inline-block {
  display: inline-flex;
  max-width: 100%;
}

/* Additional styles for the dropdown content */
.icon-embed-small {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav_menu-dropdown-grid-links.is-company {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  align-items: flex-start;
  padding: 0 1rem;
  width: 100%;
  gap: 1rem;
}

/* Company grid positioning */
.nav_menu-dropdown-grid-links.is-company .nav_menu-dropdown-link:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.nav_menu-dropdown-grid-links.is-company .nav_menu-dropdown-link:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.nav_menu-dropdown-grid-links.is-company .nav_menu-dropdown-link:nth-child(3) {
  grid-column: 1;
  grid-row: 2;
}

.nav_menu-dropdown-grid-links.is-company .nav_menu-dropdown-link {
  width: 100%;
}

.nav_menu-dropdown-link-box {
  position: relative;
  padding: 0 0 0 1rem;
  grid-column: 3;
  grid-row: 1 / 3;
  width: 100%;
}

.nav_menu-dropdown-link-box::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.nav_menu-dropdown-link-box_inner {
  margin-bottom: 0.5rem;
}

.nav_menu-dropdown_contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav_menu-dropdown-list_item {
  list-style: none;
}

.nav_menu-dropdown-item_link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.nav_menu-dropdown-item_link:hover {
  color: #6b50ff;
}

/* Social Media Styles */
.nav_menu-social_wrap {
  margin-top: 0.75rem;
}

.social_list {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social_item {
  list-style: none;
}

.social_link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.social_link:hover {
  color: #6b50ff;
  background: rgba(255, 255, 255, 0.05);
}

.icon-embed-xsmall {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .braiins-nav-content {
    padding: 0 1rem;
  }
  
  .braiins-menu {
    gap: 1.5rem;
  }
  
  .braiins-price-widget {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .braiins-nav-content {
    height: auto;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  
  .braiins-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .braiins-nav-right {
    gap: 1rem;
  }
  
  .braiins-price-widget {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Market Depth Tooltip */
.depth-tooltip {
  position: fixed;
  background: rgba(31, 41, 55, 0.95);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.depth-tooltip.visible {
  opacity: 1;
}

.depth-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(31, 41, 55, 0.95);
}

/* Orderbook Hover Tooltip */
.orderbook-tooltip {
  position: absolute;
  background: rgba(31, 41, 55, 0.95);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(75, 85, 99, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  white-space: nowrap;
  pointer-events: none;
}

/* Enhanced hover effect for order rows */
.order-row:hover {
  background: var(--hover-bg) !important;
  cursor: pointer;
  transform: translateX(2px);
  transition: all 0.2s ease;
  border-left: 3px solid #fe8431;
  padding-left: 8px;
}

.order-row.unmatched:hover {
  background: rgba(75, 85, 99, 0.2) !important;
  border-left-color: #6b7280;
}

/* Verification Section Styles */
.verification-section {
  padding: 2rem;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  margin: 2rem 0;
}

.verification-content {
  text-align: center;
}

.verification-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.verification-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.status-inactive {
  color: #f59e0b !important;
  font-weight: 600;
}

/* API Error Styles */
.api-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 14px;
  text-align: center;
}

/* Form Error Styles */
.field-error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
}

.form-group input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

/* Info icon for table headers */
.info-icon {
  display: inline-block;
  font-size: 12px;
  color: inherit;
  cursor: help;
  margin-left: 4px;
  opacity: 0.7;
  font-style: normal;
  text-transform: none;
}

.info-icon:hover {
  opacity: 1;
}

/* Bid History Filters */
.bid-history-filters {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.filter-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.filter-btn.active {
  background: #6b50ff;
  border-color: #6b50ff;
  color: white;
}

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

/* Status badges with background colors */
.status {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
}

.status-created {
  background: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
}

.status-fulfilled {
  background: rgba(33, 150, 243, 0.2);
  color: #2196f3;
}

.status-canceled {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.status-pending_cancel {
  background: rgba(255, 152, 0, 0.2);
  color: #ff9800;
}

.status-unspecified {
  background: #6b7280;
  color: white;
}

.status-default {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

/* Dual Verification Styles */
.verification-channel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.verification-channel.verified {
  border-color: var(--accent-green);
  background: rgba(34, 197, 94, 0.1);
}

.channel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.channel-info h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.verification-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.verification-status.status-verified {
  background: var(--accent-green);
  color: white;
}

.verification-status.status-pending {
  background: var(--accent-orange);
  color: white;
}

.status-message {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-weight: 500;
}

.status-message.success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}

.status-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid #ef4444;
}

.status-active {
  color: var(--accent-green) !important;
  font-weight: 600;
}

.status-inactive {
  color: var(--accent-orange) !important;
  font-weight: 600;
}

/* Step items state management */
.step-item.completed .step-icon {
  background: var(--accent-green);
  color: white;
}

.step-item.active .step-icon {
  background: var(--accent-orange);
  color: white;
  border: 2px solid var(--accent-orange);
}

.step-item.completed .step-text strong {
  color: var(--accent-green);
}

.step-item.active .step-text strong {
  color: var(--accent-orange);
}

/* Ensure signup page MARKET VIEW button uses Braiins violet */
.header-right .account-button-set cds-button[kind="primary"] {
  --cds-button-primary: var(--braiins-violet) !important;
  --cds-button-primary-hover: #5940e6 !important;
  --cds-button-primary-active: #4f35d6 !important;
  background: var(--braiins-violet) !important;
  color: white !important;
  border: none !important;
}

.header-right .account-button-set cds-button[kind="primary"]::part(button) {
  background: var(--braiins-violet) !important;
  background-color: var(--braiins-violet) !important;
  color: white !important;
  border: none !important;
  border-color: var(--braiins-violet) !important;
}

.header-right .account-button-set cds-button[kind="primary"]:hover {
  --cds-button-primary: #5940e6 !important;
  background: #5940e6 !important;
  color: white !important;
}

.header-right .account-button-set cds-button[kind="primary"]:hover::part(button) {
  background: #5940e6 !important;
  background-color: #5940e6 !important;
  color: white !important;
}

/* Market View Button Styling for Signup Page */
.header-right .market-view-btn {
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  width: 130px !important;
  min-width: 130px !important;
  background: var(--braiins-violet) !important;
  color: white !important;
  border: none !important;
  font-weight: bold !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

.header-right .market-view-btn::part(button) {
  height: 50px !important;
  width: 100% !important;
  background: var(--braiins-violet) !important;
  color: white !important;
  border: none !important;
  font-weight: bold !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.header-right .market-view-btn:hover {
  background: #5940e6 !important;
}

.header-right .market-view-btn:hover::part(button) {
  background: #5940e6 !important;
}

/* Full height market view button for signup confirmation */
.header-right .market-view-btn.full-height {
  height: 100% !important;
  min-height: 60px !important;
  width: 130px !important;
  min-width: 130px !important;
  background: var(--braiins-violet) !important;
  color: white !important;
  border: none !important;
  font-weight: bold !important;
  font-size: 14px !important;
}

.header-right .market-view-btn.full-height::part(button) {
  height: 100% !important;
  width: 100% !important;
  background: var(--braiins-violet) !important;
  color: white !important;
  border: none !important;
  font-weight: bold !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

.header-right .market-view-btn.full-height:hover {
  background: #5940e6 !important;
}

.header-right .market-view-btn.full-height:hover::part(button) {
  background: #5940e6 !important;
}

/* Carbon Tabs - Braiins Violet Styling */
cds-tabs cds-tab[aria-selected="true"] {
  --cds-tab-selected-color: var(--braiins-violet) !important;
  --cds-tab-selected-border-color: var(--braiins-violet) !important;
  color: var(--braiins-violet) !important;
}

cds-tabs cds-tab[aria-selected="true"]::part(button) {
  color: var(--braiins-violet) !important;
  border-bottom-color: var(--braiins-violet) !important;
}

cds-tabs::part(divider) {
  border-bottom-color: var(--border) !important;
}

/* Carbon Data Table and Progress Indicator Styles */
.progress-indicator-container {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 80px;
  justify-content: center;
}

.progress-indicator-container cds-progress-bar {
  flex: 1;
  min-width: 60px;
  max-width: 80px;
}

.progress-indicator-container cds-progress-bar::part(progress-bar) {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border) !important;
}

.progress-indicator-container cds-progress-bar::part(progress-bar-fill) {
  background: var(--braiins-violet) !important;
}

.progress-indicator-container cds-progress-indicator {
  max-width: 60px;
  min-height: 20px;
}

.progress-indicator-container .progress-percentage {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 30px;
  text-align: right;
}

.progress-indicator-container .no-progress {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Carbon Table Styling Overrides */
cds-data-table {
  --cds-layer: var(--bg-secondary);
  --cds-layer-accent: var(--bg-primary);
  --cds-text-primary: var(--text-primary);
  --cds-text-secondary: var(--text-secondary);
  --cds-border-subtle: var(--border);
}

cds-table-header-cell {
  color: var(--text-primary) !important;
  font-weight: 600 !important;
  background: var(--bg-primary) !important;
}

cds-table-cell {
  color: var(--text-primary) !important;
  background: var(--bg-secondary) !important;
}

cds-table-row:hover cds-table-cell {
  background: var(--hover-bg) !important;
}

/* Market Transactions Table - Headless */
#market-transactions-list cds-table {
  border-top: none !important;
}

#market-transactions-list cds-table-cell:first-child {
  text-align: left !important;
}

#market-transactions-list cds-table-cell:last-child {
  text-align: right !important;
}

/* Locks Transactions Table - Headless */
#locks-transactions-list cds-table {
  border-top: none !important;
}

#locks-transactions-list cds-table-cell:first-child {
  text-align: left !important;
}

#locks-transactions-list cds-table-cell:last-child {
  text-align: right !important;
}

.locks-transaction-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.locks-order-id {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 400;
}

/* On-chain Transactions Table - Headless */
#onchain-transactions-list cds-table {
  border-top: none !important;
}

#onchain-transactions-list cds-table-cell:first-child {
  text-align: left !important;
}

#onchain-transactions-list cds-table-cell:last-child {
  text-align: right !important;
}

.onchain-transaction-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.onchain-tx-hash {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 400;
  font-family: 'Monaco', 'Consolas', monospace;
}

/* Progress Indicator Row Styling */
.progress-row {
  background: var(--bg-secondary) !important;
  border-top: 1px solid var(--border);
}

.progress-cell {
  padding: 8px 16px !important;
  background: var(--bg-secondary) !important;
}

.row-progress-indicator {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.row-progress-indicator cds-progress-indicator {
  flex: 1;
  max-width: 300px;
}

/* Carbon Progress Indicator Dark Theme */
cds-progress-indicator {
  --cds-text-primary: var(--text-primary);
  --cds-text-secondary: var(--text-secondary);
  --cds-border-subtle: var(--border);
  --cds-layer: var(--bg-secondary);
}

cds-progress-indicator-step[state="complete"]::part(step) {
  background: var(--accent-green) !important;
  border-color: var(--accent-green) !important;
}

cds-progress-indicator-step[state="current"]::part(step) {
  background: var(--braiins-violet) !important;
  border-color: var(--braiins-violet) !important;
}

cds-progress-indicator-step[state="incomplete"]::part(step) {
  background: var(--bg-primary) !important;
  border-color: var(--border) !important;
}

/* Current Bids Header with Create Button */
.current-bids .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.current-bids .card-header h3 {
  margin: 0;
}

#create-bid-btn {
  --cds-button-primary: var(--braiins-violet);
  --cds-button-primary-hover: #5940e6;
  font-weight: 600;
  width: auto !important;
  min-width: 80px !important;
}

#create-bid-btn::part(button) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

/* Additional fallback for Carbon button text centering */
#create-bid-btn .cds--btn__text,
#create-bid-btn::part(text) {
  width: 100% !important;
  text-align: center !important;
  display: block !important;
}

#create-bid-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Try Your Luck Panel */
.try-your-luck .card-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  border-bottom: none;
  margin-bottom: 8px;
  padding-bottom: 0;
}

.try-your-luck .card-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.luck-tiles {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0;
}

/* 2-column layout for luck tiles on Market page */
.luck-tiles.luck-tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.luck-tiles.luck-tiles-grid .luck-tile {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.luck-tiles.luck-tiles-grid .luck-tile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.luck-tiles.luck-tiles-grid .luck-tile-amount {
  font-size: 1rem;
  font-weight: 600;
}

.luck-tiles.luck-tiles-grid .luck-tile-usd {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.luck-tiles.luck-tiles-grid .luck-tile-stat-value {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.luck-tiles.luck-tiles-grid .luck-tile-chance-value {
  font-size: 0.8rem;
  color: var(--primary);
}

.luck-tiles.luck-tiles-grid .luck-tile-btn {
  width: 100%;
  padding: 4px 8px;
  font-size: 0.8rem;
}

.luck-tile {
  flex: 1;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.luck-tile:hover {
  border-color: var(--braiins-violet);
  background: rgba(107, 80, 255, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107, 80, 255, 0.15);
}

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

.luck-tile-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--braiins-violet);
}

.luck-tile-usd {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.luck-tile-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.luck-tile-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.luck-tile-stat-label {
  color: var(--text-secondary);
}

.luck-tile-stat-value {
  color: var(--text-primary);
  font-weight: 500;
}

.luck-tile-chance {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.luck-tile-chance-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.luck-tile-chance-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.luck-tile-chance-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #22c55e;
}

.luck-tile-chance-odds {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Disabled luck tile */
.luck-tile-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.luck-tile-disabled:hover {
  border-color: var(--border);
  background: var(--bg-primary);
  transform: none;
  box-shadow: none;
}

/* Allow slider to work in disabled custom tile for exploration */
.luck-tile-custom.luck-tile-disabled {
  pointer-events: auto;
  cursor: default;
}

.luck-tile-custom.luck-tile-disabled .luck-tile-slider {
  pointer-events: auto;
  cursor: pointer;
}

.luck-tile-btn {
  margin-top: 12px;
  padding: 8px 16px;
  background: var(--braiins-violet);
  border: none;
  border-radius: 4px;
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, opacity 0.2s;
}

.luck-tile-btn:hover:not([disabled]) {
  background: var(--braiins-violet-dark, #5a3fd6);
}

.luck-tile-btn[disabled] {
  background: var(--bg-tertiary, #333);
  color: var(--text-secondary, #888);
  cursor: not-allowed;
  opacity: 0.7;
}

/* Custom luck tile with slider */
.luck-tile-custom {
  border: 1px dashed var(--braiins-violet);
  background: rgba(107, 80, 255, 0.03);
}

.luck-tile-custom:hover {
  border-style: solid;
  background: rgba(107, 80, 255, 0.08);
}

.luck-tile-slider {
  margin: 12px 0;
  padding: 8px 4px;
}

/* Native range slider styling */
.luck-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #6f6f6f;
  outline: none;
  cursor: pointer;
}

/* Webkit (Chrome, Safari, Edge) thumb */
.luck-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--braiins-violet);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.luck-slider::-webkit-slider-thumb:hover {
  background: #8b70ff;
  transform: scale(1.1);
}

/* Firefox thumb */
.luck-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--braiins-violet);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.luck-slider::-moz-range-thumb:hover {
  background: #8b70ff;
}

/* Firefox track */
.luck-slider::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: #6f6f6f;
}

/* Luck tile confirmation modal */
.luck-confirmation-content {
  padding: 4px 0;
}

.luck-confirmation-intro {
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.luck-confirmation-details {
  background: var(--bg-secondary);
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 6px;
}

.luck-confirmation-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}

.luck-confirmation-row:last-child {
  border-bottom: none;
}

.luck-confirmation-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.luck-confirmation-value {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

.luck-confirmation-value.luck-username {
  font-family: monospace;
  font-size: 0.75rem;
  word-break: break-all;
  text-align: right;
  max-width: 60%;
}

.luck-confirmation-note {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-style: italic;
  margin-top: 8px;
}

/* Luck tile BTC address input section */
.luck-address-section {
  background: var(--bg-secondary);
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 6px;
}

.luck-address-field {
  margin-bottom: 4px;
}

.luck-worker-field {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.luck-username-preview {
  padding-top: 4px;
}

.luck-field-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.32px;
  margin-bottom: 6px;
}

.luck-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.luck-input:focus {
  border-color: var(--interactive);
}

.luck-input::placeholder {
  color: var(--text-tertiary);
}

.luck-input-valid {
  border-color: var(--support-success, #24a148);
}

.luck-input-error {
  border-color: var(--support-error, #da1e28);
}

.luck-field-error {
  display: block;
  color: var(--support-error, #da1e28);
  font-size: 0.75rem;
  margin-top: 4px;
  min-height: 16px;
}

.luck-field-hint {
  display: block;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  margin-top: 4px;
}

.luck-worker-value {
  display: block;
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.875rem;
  margin-bottom: 2px;
}

.luck-username {
  display: block;
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.8125rem;
  word-break: break-all;
  padding: 8px;
  background: var(--bg-primary);
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ==========================================
   LUCK PAGE - Try Your Luck Standalone Page
   ========================================== */

#luck-page-content > .market-down-warning {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 2rem 0 2rem;
}

#luck-page-content > .market-down-warning + .luck-page {
  padding-top: 0;
}

.luck-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.luck-explanation {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.luck-explanation h2 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin: 0 0 16px 0;
  font-weight: 600;
}

.luck-explanation-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 20px 0;
}

.luck-explanation-content a {
  color: var(--braiins-violet);
  text-decoration: none;
}

.luck-explanation-content a:hover {
  text-decoration: underline;
}

.luck-explanation-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.luck-step {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.luck-step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--braiins-violet);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 50%;
}

.luck-step-content h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.luck-step-content p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.5;
}

.luck-disclaimer {
  background: rgba(217, 34, 44, 0.1);
  border: 1px solid rgba(217, 34, 44, 0.3);
  border-radius: 6px;
  padding: 16px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.luck-disclaimer strong {
  color: #ff6b6b;
}

.luck-tiles-section {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 24px;
  border: 1px solid var(--border);
}

.luck-tiles-section h2 {
  color: var(--text-primary);
  font-size: 1.25rem;
  margin: 0 0 20px 0;
  font-weight: 600;
}

.luck-tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Responsive adjustments for luck page */
@media (max-width: 992px) {
  .luck-tiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .luck-page {
    padding: 16px;
  }

  .luck-explanation,
  .luck-tiles-section {
    padding: 16px;
  }

  .luck-explanation-steps {
    grid-template-columns: 1fr;
  }

  .luck-tiles-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Market Parameters Row & Link */
.card.market-status.compact {
  display: flex;
  flex-direction: column;
  padding-bottom: 0.75rem;
}

.market-params-row {
  padding: 0;
  margin-top: auto;
  padding-top: 12px;
  text-align: right;
}

.market-params-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.market-params-link:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

.market-params-link .info-icon {
  opacity: 0.8;
}

/* Market Parameters Modal */
.modal-content-wide {
  max-width: 900px;
  width: 95%;
}

.market-params-content {
  max-height: 70vh;
  overflow-y: auto;
}

.params-group {
  margin-bottom: 24px;
}

.params-group h4 {
  color: var(--braiins-violet);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.params-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.params-table th,
.params-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.params-table th {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-secondary);
}

.params-table .param-name {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
}

.params-table .param-value {
  color: var(--braiins-violet);
  font-family: monospace;
  font-weight: 500;
}

.params-table .param-desc {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.params-table tbody tr:hover {
  background: var(--bg-secondary);
}

@media (max-width: 768px) {
  .modal-content-wide {
    max-width: 100%;
    width: 100%;
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
    height: 100vh;
  }

  /* Align wide modals to top on mobile */
  .modal-overlay:has(.modal-content-wide).visible {
    align-items: flex-start;
  }

  .params-table .param-desc {
    display: none;
  }

  .params-table th:last-child {
    display: none;
  }
}

/* Create Bid Modal Form Styling */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group.speed-limit-row {
  grid-column: 1 / 2;
}

.form-group.empty-slot {
  grid-column: 2 / 3;
  visibility: hidden;
}

/* Compact Carbon form components in modals */
cds-modal .form-grid cds-text-input,
cds-modal .form-grid cds-textarea,
cds-modal .form-grid cds-combo-box {
  --cds-spacing-03: 4px;
  --cds-spacing-05: 8px;
}

/* Reduce label margin */
cds-modal .form-grid .cds--label,
cds-modal .form-grid [slot="label-text"] {
  margin-bottom: 2px !important;
}

/* Reduce helper text margin */
cds-modal .form-grid .cds--form__helper-text,
cds-modal .form-grid [slot="helper-text"],
cds-modal .form-grid .price-helper,
cds-modal .form-grid .budget-helper {
  margin-top: 2px !important;
  font-size: 0.7rem !important;
}

/* Compact textarea */
cds-modal .form-grid cds-textarea textarea {
  min-height: 50px !important;
}

/* Custom form field labels */
.form-field-label {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.32px;
  line-height: 1.33333;
  margin-bottom: 8px;
  display: block;
}


/* Carbon Modal Dark Theme */
cds-modal {
  --cds-layer: var(--bg-secondary);
  --cds-layer-accent: var(--bg-primary);
  --cds-text-primary: var(--text-primary);
  --cds-text-secondary: var(--text-secondary);
  --cds-border-subtle: var(--border);
}

/* Modal close button styling - make it visible */
cds-modal-close-button {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 10 !important;
  display: block !important;
}

cds-modal-close-button button,
cds-modal-close-button::part(button) {
  color: white !important;
  background: transparent !important;
  border: none !important;
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
}

cds-modal-close-button svg,
cds-modal-close-button button svg,
cds-modal-close-button::part(close-icon) {
  width: 14px !important;
  height: 14px !important;
  fill: white !important;
}

cds-modal-close-button button:hover,
cds-modal-close-button::part(button):hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 4px !important;
}

cds-modal-header {
  position: relative !important;
  background-color: var(--card-bg, #262626) !important;
}

cds-modal-body {
  padding: 16px !important;
  overflow-y: auto !important;
  flex: 1 1 auto !important;
  max-height: 100% !important;
}

/* Carbon Form Components Dark Theme */
cds-text-input,
cds-textarea,
cds-dropdown,
cds-combo-box {
  --cds-field: var(--bg-primary);
  --cds-field-hover: var(--hover-bg);
  --cds-text-primary: var(--text-primary);
  --cds-text-secondary: var(--text-secondary);
  --cds-border-subtle: var(--border);
  --cds-layer: var(--bg-secondary);
  --cds-layer-accent: var(--bg-primary);
  --cds-layer-hover: #3a3a3a;
  --cds-background-hover: #3a3a3a;
  --cds-icon-primary: var(--text-secondary);
  --cds-icon-secondary: var(--text-secondary);
}

/* Fix combo-box and dropdown arrow icon color */
cds-combo-box svg,
cds-dropdown svg,
cds-combo-box .cds--list-box__menu-icon svg,
cds-dropdown .cds--list-box__menu-icon svg {
  fill: var(--text-secondary) !important;
}

/* Fix combo-box dropdown menu hover states */
cds-combo-box::part(menu),
cds-combo-box .cds--list-box__menu,
cds-dropdown::part(menu),
cds-dropdown .cds--list-box__menu {
  background: var(--bg-secondary) !important;
}

cds-combo-box::part(menu-item),
cds-combo-box .cds--list-box__menu-item,
cds-dropdown::part(menu-item),
cds-dropdown .cds--list-box__menu-item {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

cds-combo-box::part(menu-item):hover,
cds-combo-box .cds--list-box__menu-item:hover,
cds-dropdown::part(menu-item):hover,
cds-dropdown .cds--list-box__menu-item:hover {
  background: #3a3a3a !important;
  color: var(--text-primary) !important;
}

/* Modal buttons inside body (no footer) */
.modal-buttons {
  display: flex !important;
  visibility: visible !important;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.modal-buttons cds-button {
  display: inline-flex !important;
  visibility: visible !important;
  min-width: 100px;
  height: 40px;
}

.modal-buttons cds-button::part(button) {
  height: 40px;
  padding: 0 16px;
}

.modal-buttons cds-button[kind="primary"] {
  --cds-button-primary: var(--braiins-violet);
  --cds-button-primary-hover: #5940e6;
}

.modal-buttons cds-button[kind="secondary"] {
  --cds-button-secondary: transparent;
  border: 1px solid var(--border);
}

/* Legacy modal footer (for other modals) */
cds-modal-footer {
  padding: 0 !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
}

cds-modal-footer-button {
  height: 48px !important;
  max-height: 48px !important;
}

cds-modal-footer-button::part(button) {
  height: 48px !important;
  max-height: 48px !important;
}

cds-modal-footer-button[kind="primary"] {
  --cds-button-primary: var(--braiins-violet);
  --cds-button-primary-hover: #5940e6;
}

/* Toast notifications */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Confirmation Modal Styles */
.confirmation-content {
  padding: 1rem 0;
}

.confirmation-header {
  text-align: center;
  margin-bottom: 2rem;
}

.confirmation-header h3 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-size: 1.5rem;
}

.confirmation-header p {
  margin: 0;
  color: var(--text-secondary);
}

.order-summary {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.order-summary h4 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.summary-item .label {
  color: var(--text-secondary);
  font-weight: 500;
}

.summary-item .value {
  color: var(--text-primary);
  font-weight: 600;
  word-break: break-all;
}

.confirmation-status {
  text-align: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.confirmation-status cds-loading {
  margin-bottom: 1rem;
}

.confirmation-status p {
  margin: 0.5rem 0;
  color: var(--text-secondary);
}

.confirmation-status p:first-of-type {
  font-size: 1.1rem;
  color: var(--text-primary);
}

/* Copyable values and token display */
.copyable-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.copy-btn, .show-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 36px;
  justify-content: center;
}

.copy-btn:hover, .show-btn:hover {
  background: var(--accent-orange);
  color: white;
  border-color: var(--accent-orange);
}

.copy-icon, .show-icon {
  font-size: 0.875rem;
}

.masked-token {
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
  word-break: break-all;
  background: var(--bg-secondary);
  padding: 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex: 1;
  min-width: 300px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.masked-token:hover {
  background: var(--bg-primary);
  border-color: var(--accent-orange);
}

/* Full width styling for token items */
.info-item.full-width {
  grid-column: 1 / -1;
}

.info-item.full-width .copyable-value {
  width: 100%;
  max-width: none;
}

.info-item.full-width .masked-token {
  min-width: unset;
  width: 100%;
}

/* BTC Address styling */
#btc-address {
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: none;
  padding: 0;
  border-radius: 0;
  border: none;
}

/* Info item adjustments for copyable values */
.info-item .copyable-value {
  margin-top: 0.5rem;
}

.info-item .info-label {
  display: block;
  margin-bottom: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .copyable-value {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-btn, .show-btn {
    align-self: flex-start;
  }

  .masked-token, #btc-address {
    min-width: unset;
  }
}

/* Account status styling */
.status-pending {
  color: var(--accent-orange) !important;
  font-weight: 500;
}

.status-active {
  color: var(--success) !important;
  font-weight: 500;
}

/* More link styling */
.more-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  margin-left: 0.25rem;
  transition: color 0.2s ease;
}

.more-link:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* Market Info Modal styling */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.visible {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-content {
  background-color: #161616;
  border-radius: 8px;
  max-width: 800px;
  width: 90%;
  max-height: 95vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-primary);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-primary);
  background-color: var(--card-bg, #262626);
  border-radius: 8px 8px 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-family: 'Braiins Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background-color: var(--background-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.modal-content-text {
  color: var(--text-primary);
  line-height: 1.6;
}

.modal-content-text p {
  margin-bottom: 1rem;
}

.modal-content-text .modal-intro {
  margin-bottom: 1.5rem;
}

.modal-content-text h3 {
  color: var(--text-primary);
  font-family: 'Braiins Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.modal-content-text h3:first-child,
.modal-content-text .modal-intro + h3 {
  margin-top: 0;
}

/* Workflow Steps */
.workflow-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.workflow-step .step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent-primary);
  color: var(--text-primary);
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.875rem;
}

.workflow-step .step-title {
  color: var(--text-primary);
  font-size: 0.875rem;
  text-align: center;
  font-weight: 500;
}

.workflow-arrow {
  color: var(--text-secondary);
  font-size: 1.5rem;
  padding: 0 0.5rem;
}

.modal-content-text h4 {
  color: var(--accent-primary);
  font-family: 'Braiins Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.modal-content-text ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.modal-content-text li {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.modal-content-text a {
  color: var(--braiins-violet);
}

.modal-content-text a:hover {
  color: #5940e6;
}

/* Market description specific styling */
.market-description h3:first-child {
  margin-top: 0;
}

.market-description li strong {
  color: var(--text-primary);
}

.market-description {
  max-height: none;
  overflow-y: auto;
  padding-right: 1rem;
}

.market-description::-webkit-scrollbar {
  width: 6px;
}

.market-description::-webkit-scrollbar-track {
  background: var(--background-secondary);
  border-radius: 3px;
}

.market-description::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.market-description::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

.market-description a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.market-description a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* Modal responsive design */
@media (max-width: 768px) {
  .modal-overlay.visible {
    align-items: flex-start;
    padding: 0;
  }

  .modal-content {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }

  .modal-header {
    padding: 1rem;
    border-radius: 0;
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-header h2 {
    font-size: 1.125rem;
  }
}

/* Floating Feedback Widget */
#feedback-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1001;
}

#feedback-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  color: white;
  user-select: none;
}

#feedback-icon:hover {
  background: var(--accent-secondary);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.feedback-form-container {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  background: var(--background-primary);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s ease;
  overflow: hidden;
}

.feedback-form-container.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.feedback-form {
  padding: 0;
}

.feedback-header {
  background: var(--accent-primary);
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-primary);
}

.feedback-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  font-family: 'Braiins Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.feedback-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.feedback-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

#feedback-form-element {
  padding: 1.5rem;
}

.feedback-form .form-group {
  margin-bottom: 1rem;
}

.feedback-form .form-group:last-of-type {
  margin-bottom: 1.5rem;
}

.feedback-form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

.feedback-form .form-group input,
.feedback-form .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  background: var(--background-secondary);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  box-sizing: border-box;
}

.feedback-form .form-group input:focus,
.feedback-form .form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(254, 132, 49, 0.2);
}

.feedback-form .form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.btn-secondary,
.btn-primary {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.btn-secondary {
  background: var(--background-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}

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

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

.btn-primary:hover {
  background: var(--accent-secondary);
}

.btn-primary:disabled {
  background: var(--background-disabled);
  color: var(--text-disabled);
  cursor: not-allowed;
}

/* Responsive design for feedback widget */
@media (max-width: 768px) {
  .feedback-form-container {
    width: 320px;
    right: -10px;
  }

  #feedback-widget {
    bottom: 15px;
    right: 15px;
  }

  #feedback-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .feedback-form-container {
    width: 280px;
    right: -20px;
  }

  .feedback-header,
  #feedback-form-element {
    padding: 1rem;
  }
}

/* Order Book Column Layout - Separate for Bids and Asks */
/* Bids Section - 4 columns including ETA */
.bids-section .order-book-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr minmax(130px, 1fr); /* Last column min 130px for ETA + icons */
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.bids-section .order-book-header span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bids-section .order-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr minmax(130px, 1fr); /* Last column min 130px for ETA + icons */
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem;
  min-height: 40px;
}

/* Asks Section - 4 columns */
.asks-section .order-book-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr; /* 4 columns for Asks */
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.asks-section .order-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr; /* 4 columns for Asks */
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem;
  min-height: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.2s;
}

/* Common order row styles */
.order-row:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.order-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ETA column styling - only for bids section */
.bids-section .order-row span:last-child {
  text-align: left;
  font-size: 0.9em;
  font-weight: 500;
}

.order-row.unmatched {
  opacity: 0.6;
}

/* User order rows in orderbook */
.order-row.user-order {
  background: rgba(107, 80, 255, 0.15);
}

.order-row.user-order:hover {
  background: rgba(107, 80, 255, 0.25);
}

/* Sub-row styling - indented with icon */
.order-row.user-order-subrow {
  font-size: 0.85em;
  padding-left: 1.5rem;
}

.order-row.user-order-subrow.subrow-inactive span {
  color: var(--text-secondary) !important;
}

.order-row.user-order-subrow.subrow-active span {
  color: var(--success) !important;
}

.order-row.user-order-subrow .subrow-indicator {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  opacity: 0.6;
}

.order-row.user-order-subrow .subrow-indicator svg {
  transform: rotate(90deg);
}

/* Solo mining icon (PNG) */
.solo-icon {
  height: 12px;
  width: auto;
  vertical-align: middle;
  margin-left: 4px;
  cursor: help;
}

/* Allow parent span to show solo icon */
.order-row span:has(.solo-icon) {
  overflow: visible;
}

/* Solo line container for icon and bestshare */
.solo-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

/* Solo icon for bids table on Account/Orders page */
.solo-icon-table {
  height: 12px;
  width: auto;
  cursor: help;
}

/* Solo bestshare display next to icon */
.solo-bestshare {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ETA cell with action icons */
.order-row .eta-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Order action icons container */
.order-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

/* Action button styling */
.order-action-btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: color 0.15s, background 0.15s;
}

.order-action-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.order-action-btn.order-action-cancel:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.order-action-btn.order-action-create:hover {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
}

.order-action-btn.disabled,
.order-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Move order summary table */
.move-summary-table {
  margin-bottom: 12px;
}

.move-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.move-summary-label {
  color: var(--text-secondary);
}

.move-summary-value {
  font-family: monospace;
  font-weight: 600;
}

.move-summary-row.current-price {
  background: rgba(107, 80, 255, 0.15);
  margin: 0 -8px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

/* Move order options container */
#move-order-options {
  background: #2a2a2a;
  padding: 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Move order options table */
.move-options-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

/* Move order option buttons (table rows) */
.move-option-btn {
  background: var(--primary);
  color: white;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border-radius: 4px;
}

.move-option-btn td {
  padding: 12px;
}

.move-option-btn td:first-child {
  border-radius: 4px 0 0 4px;
}

.move-option-btn td:last-child {
  border-radius: 0 4px 4px 0;
}

.move-btn-label {
  font-weight: 600;
  text-align: left;
}

.move-btn-arrow {
  text-align: center;
  opacity: 0.8;
  width: 40px;
}

.move-btn-price {
  font-family: monospace;
  font-weight: 600;
  text-align: right;
}

.move-option-btn:hover {
  background: var(--primary-hover, #5a40e6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.move-option-btn:active {
  transform: scale(0.98);
}

.move-option-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Up/Down option colors */
.move-option-up .move-btn-arrow {
  color: #22c55e;
}

.move-option-down .move-btn-arrow {
  color: #ef4444;
}

.move-disclaimer {
  margin: 12px 0 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Pool icons in combobox */
.pool-icon {
  height: 16px;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
}

/* Yellow separator line for hash value/price in orderbook */
.orderbook-price-separator {
  height: 2px;
  background: #f59e0b;
  margin: 0.25rem 0;
  width: 100%;
  position: relative;
}

.orderbook-price-separator::before {
  content: attr(data-label);
  position: absolute;
  right: 0;
  top: -8px;
  font-size: 0.65rem;
  color: #f59e0b;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: var(--card-bg);
  padding: 0 0.25rem;
}

/* Scrollable bids and asks lists - show max 10 orders */
#bids-list {
  max-height: 25rem;
  overflow-y: auto;
  overflow-x: hidden;
}

#asks-list {
  max-height: 25rem;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom scrollbar styling for orderbook */
#bids-list::-webkit-scrollbar,
#asks-list::-webkit-scrollbar {
  width: 10px;
}

#bids-list::-webkit-scrollbar-track,
#asks-list::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-left: 1px solid var(--border-color);
}

#bids-list::-webkit-scrollbar-thumb,
#asks-list::-webkit-scrollbar-thumb {
  background: #505050;
  border-radius: 5px;
}

#bids-list::-webkit-scrollbar-thumb:hover,
#asks-list::-webkit-scrollbar-thumb:hover {
  background: #707070;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .order-book-header {
    grid-template-columns: 1.2fr 1fr 1fr 70px; /* Slightly smaller ETA on mobile */
    gap: 0.25rem;
    font-size: 0.85rem;
  }

  .order-row {
    grid-template-columns: 1.2fr 1fr 1fr 70px; /* Slightly smaller ETA on mobile */
    gap: 0.25rem;
    font-size: 0.85rem;
  }

  .order-row span:last-child {
    font-size: 0.8em;
  }
}

/* History Table Styles */
.history-panel {
  padding: 1.5rem 2rem;
  background-color: var(--card-bg);
  overflow-x: auto;
}

/* Carbon Data Table Overrides for History */
.history-panel .cds--data-table {
  background-color: transparent;
}

.history-panel .cds--data-table thead {
  background-color: var(--bg-secondary);
}

.history-panel .cds--data-table th,
.history-panel .cds--data-table td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

/* Unchanged cell styling - greyed out */
.history-panel .cds--data-table td.unchanged {
  color: var(--text-secondary);
  opacity: 0.5;
}

.history-panel .cds--data-table td.unchanged .status-badge {
  opacity: 0.6;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-badge.active {
  background-color: rgba(0, 200, 83, 0.2);
  color: #00c853;
}

.status-badge.paused {
  background-color: rgba(255, 152, 0, 0.2);
  color: #ff9800;
}

.status-badge.resumed {
  background-color: rgba(33, 150, 243, 0.2);
  color: #2196f3;
}

.status-badge.created {
  background-color: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
}

.status-badge.cancelled,
.status-badge.canceled {
  background-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.status-badge.pending_cancel {
  background-color: rgba(255, 152, 0, 0.2);
  color: #ff9800;
}

.status-badge.fulfilled {
  background-color: rgba(33, 150, 243, 0.2);
  color: #2196f3;
}

.history-table small {
  color: var(--text-secondary);
  font-size: 0.85em;
}

/* Remark tooltip in status history */
.remark-tooltip {
  display: inline-flex;
  vertical-align: middle;
}

.remark-tooltip .remark-icon {
  display: inline-flex;
  align-items: center;
}

/* Brighter tooltip background for better contrast */
.remark-tooltip cds-tooltip-content {
  --cds-background-inverse: #4a4a4a;
}

/* Load More Button */
.load-more-section {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  padding: 1rem 0;
}

.load-more-btn {
  padding: 0.75rem 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.load-more-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

.load-more-btn:active {
  transform: translateY(1px);
}

/* No More Bids Message */
.no-more-section {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  padding: 1rem 0;
}

.no-more-message {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-style: italic;
}

/* ==================== Footer Styles ==================== */
.bos_footer {
  background-color: #161616;
  color: #F4F4F4;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  border-top: 1px solid #262626;
}

.content-wrapper.footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.footer-wrapper-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-heading {
  color: #F4F4F4;
  font-family: 'Braiins Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.footer-link {
  color: #A8A8A8;
  font-family: 'Braiins Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1.6;
}

.footer-link:hover {
  color: #6B50FF;
  text-decoration: none;
}

.footer-link:focus {
  outline: 2px solid #6B50FF;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Ensure footer stays at bottom for short pages */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container {
  flex: 1;
}

/* Footer Branding Section */
.footer-branding {
  grid-column: span 1;
}

.footer_logo {
  display: inline-block;
  margin-bottom: 1rem;
}

.braiins-logo {
  width: 71px;
  height: 11px;
  color: #F4F4F4;
}

.braiins-about {
  color: #A8A8A8;
  font-family: 'Braiins Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.braiins-about strong {
  color: #F4F4F4;
}

.footer-social {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  transition: opacity 0.2s ease;
  opacity: 0.6;
}

.social-link:hover {
  opacity: 1;
}

.social-link img {
  width: 100%;
  height: auto;
  filter: invert(1) grayscale(1) brightness(0.8);
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-branding {
    grid-column: 3;
  }
}
