/* Dark Binance-style theme */
:root{--bg:#0b0e11;--panel:#111418;--panel-2:#0d1117;--text:#e6e8ea;--muted:#9aa4b2;--accent:#1f6feb;--green:#0ecb81;--red:#f6465d;--gold:#c8a03a}
*{box-sizing:border-box}html,body{height:100%}body{margin:0;font-family:Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}
a{color:var(--accent);text-decoration:none}
.container{max-width:1200px;margin:0 auto;padding:16px}
.card{background:var(--panel);border:1px solid #1e2329;border-radius:10px}
.btn{display:inline-flex;align-items:center;justify-content:center;border:none;border-radius:8px;padding:10px 14px;font-weight:600;cursor:pointer;background:#1b222c;color:#e6e8ea}
.btn:hover{opacity:.9}
.btn-primary{
  background: linear-gradient(135deg, #2a66ff 0%, #1a4dcc 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(42,102,255,0.25);
}
.btn-primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42,102,255,0.35);
}
.btn-success{background:var(--green);color:#06161c}
.btn-danger{background:var(--red)}
.input,select{width:100%;padding:10px 12px;background:#0d1117;color:#e6e8ea;border:1px solid #1e2329;border-radius:8px}
.row{display:flex;gap:16px}
.col{flex:1}
.header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #1e2329}
.header .brand{font-weight:800;letter-spacing:.5px;color:#e6e8ea}
.header .brand span{color:var(--gold)}
/* Login */
.login-wrap{max-width:420px;margin:10vh auto;padding:24px}
.login-title{font-size:22px;font-weight:800;margin-bottom:12px}
.login-sub{color:var(--muted);font-size:14px;margin-bottom:16px}
.form-group{margin-bottom:12px}
/* Dashboard layout */
.layout{display:grid;grid-template-columns:260px 1fr 420px;grid-template-rows:auto 1fr 240px;gap:12px;height:calc(100vh - 64px);padding:12px}
.sidebar{grid-row:1/4}
.chart{grid-column:2/3;grid-row:1/3}
.trading-panel{grid-column:3/4;grid-row:1/3;padding:0;overflow:auto}
.bottom{grid-column:2/4}
.table{width:100%;border-collapse:collapse}
.table th,.table td{border-bottom:1px solid #1e2329;padding:8px;text-align:left}
.badge{padding:2px 8px;border-radius:999px;font-size:12px}
.badge.buy{background:rgba(14,203,129,.15);color:var(--green)}
.badge.sell{background:rgba(246,70,93,.15);color:var(--red)}
/* Trading Interface Styles */
.trading-tabs {
  display: flex;
  border-bottom: 1px solid #1e2329;
  padding: 12px 16px 0;
}
.tab-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.tab-btn:hover {
  color: var(--text);
}

.trading-controls {
  padding: 12px 16px;
  border-bottom: 1px solid #1e2329;
}
.controls-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.recurring-toggle, .currency-select {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.toggle-checkbox {
  width: 14px;
  height: 14px;
  margin-right: 6px;
}
.toggle-label {
  cursor: pointer;
}

.trade-cards-container {
  display: flex;
  gap: 1px;
  background: #1e2329;
}
.trade-card {
  flex: 1;
  background: var(--panel);
  padding: 16px;
}

.order-type-tabs {
  display: flex;
  gap: 1px;
  margin-bottom: 16px;
}
.order-tab {
  flex: 1;
  background: #0d1117;
  border: 1px solid #1e2329;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.order-tab:first-child {
  border-radius: 6px 0 0 6px;
}
.order-tab:last-child {
  border-radius: 0 6px 6px 0;
}
.order-tab.active {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--accent);
}
.info-icon {
  font-size: 10px;
  opacity: 0.6;
}

.trade-inputs {
  margin-bottom: 16px;
}
.input-group {
  margin-bottom: 12px;
}
.trade-input {
  width: 100%;
  background: #0d1117;
  border: 1px solid #1e2329;
  border-radius: 6px;
  padding: 12px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s;
}
.trade-input:focus {
  outline: none;
  border-color: var(--accent);
}
.trade-input::placeholder {
  color: var(--muted);
  font-size: 13px;
}
.total-input {
  background: #0b0e11;
  cursor: not-allowed;
}

.tp-sl-option {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--muted);
}

.trade-info {
  margin-bottom: 16px;
}
.info-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.info-item span:last-child {
  color: var(--text);
  font-weight: 500;
}

.trade-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.buy-btn {
  background: var(--green);
  color: #06161c;
}
.buy-btn:hover:not(:disabled) {
  background: #0cb574;
}
.sell-btn {
  background: var(--red);
  color: white;
}
.sell-btn:hover:not(:disabled) {
  background: #f03a56;
}
.trade-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.order-message {
  padding: 12px 16px;
  font-size: 12px;
  text-align: center;
  min-height: 20px;
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  gap: 20px;
}
.nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s;
  font-weight: 500;
}
.nav-link.active {
  color: var(--gold);
  background: rgba(200, 160, 58, 0.1);
}
.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* Overview Page Styles */
.overview-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.summary-card {
  background: var(--panel);
  border: 1px solid #1e2329;
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-header h3 {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.card-icon {
  font-size: 20px;
  opacity: 0.7;
}

.card-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.card-change {
  font-size: 12px;
  color: var(--muted);
}

.positive {
  color: var(--green) !important;
}

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

.info-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}

.account-info {
  padding: 20px;
}

.account-info h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  color: var(--text);
}

.info-grid {
  display: grid;
  gap: 16px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #1e2329;
}

.info-label {
  color: var(--muted);
  font-size: 14px;
}

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

.recent-trades {
  padding: 20px;
}

.recent-trades h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  color: var(--text);
}

.no-data {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.no-data-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.no-data p {
  margin: 8px 0;
}

.no-data-sub {
  font-size: 14px;
  opacity: 0.7;
}

.trades-table {
  overflow-x: auto;
}

.view-all {
  text-align: center;
  margin-top: 16px;
}

.status {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status.open {
  background: rgba(31, 111, 235, 0.15);
  color: var(--accent);
}

.status.closed {
  background: rgba(154, 164, 178, 0.15);
  color: var(--muted);
}

/* Market Page Styles */
.market-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px;
}
/* Market Overview (3-column grid) */
.mo-top { 
  display:flex; 
  align-items:center; 
  justify-content:space-between; 
  padding:20px 24px; 
  margin-bottom:20px; 
  background: linear-gradient(135deg, rgba(15,20,34,0.95) 0%, rgba(10,14,19,0.95) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.mo-top h2 { 
  margin:0; 
  font-size:24px; 
  font-weight: 700;
  background: linear-gradient(135deg, #EAECEF 0%, #9DB0C9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mo-sub { 
  color: var(--muted); 
  margin:6px 0 0 0; 
  font-size:13px; 
  font-weight: 500;
}
.mo-search { display:flex; gap:8px; }
.mo-search input { 
  background:rgba(13,17,23,0.8); 
  border:1px solid rgba(255,255,255,0.1); 
  border-radius:8px; 
  color:var(--text); 
  padding:10px 14px; 
  height:40px; 
  width: 280px;
  transition: all 0.2s ease;
  font-size: 14px;
}
.mo-search input:focus {
  outline: none;
  border-color: rgba(42,102,255,0.5);
  box-shadow: 0 0 0 3px rgba(42,102,255,0.1);
  background: rgba(13,17,23,0.95);
}
.mo-search input::placeholder {
  color: #76808F;
}
.mo-grid { 
  display:grid; 
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
  gap:16px; 
  margin-bottom:20px; 
  align-items: stretch; 
}
.mo-card { 
  padding:0; 
  overflow:hidden; 
  display:flex; 
  flex-direction:column; 
  background: linear-gradient(180deg, rgba(15,20,34,0.95) 0%, rgba(10,14,19,0.95) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: all 0.3s ease;
}
.mo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  border-color: rgba(255,255,255,0.12);
}
.mo-card-head { 
  display:flex; 
  align-items:center; 
  justify-content:space-between; 
  padding:16px 18px; 
  border-bottom:1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
}
.mo-card-head h3 {
  font-size: 16px;
  font-weight: 700;
  color: #EAECEF;
  margin: 0;
  letter-spacing: 0.3px;
}
.mo-status { color: var(--muted); font-size:11px; font-weight: 500; }
.mo-list { flex:1; max-height: none; overflow:visible; background: rgba(0,0,0,0.1); }
/* Crypto table rows (existing) */
.mo-row { 
  display:grid; 
  grid-template-columns: 28px 1.2fr 0.6fr 0.6fr; 
  align-items:center; 
  gap:10px; 
  padding:10px 14px; 
  border-bottom:1px solid rgba(255,255,255,0.05); 
  font-size: 0.92rem; 
  transition: all 0.2s ease;
  cursor: pointer;
}
.mo-row:hover { 
  background: rgba(255,255,255,0.06); 
  transform: translateX(2px);
}
.mo-row:last-child {
  border-bottom: none;
}
.mo-row.stock-row { grid-template-columns: 1.5fr 0.7fr 0.7fr; }
.mo-logo { width:22px; height:22px; border-radius:50%; background:#1e2329; display:flex; align-items:center; justify-content:center; font-size:11px; }
.mo-logo img { width:100%; height:100%; object-fit:cover; border-radius:inherit; }

/* Stock logo specific styling */
.stock-logo-container img {
  border-radius: 6px !important;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}

.coin-logo img {
  border-radius: 50%;
  object-fit: cover;
}
.mo-name { display:flex; flex-direction:column; }
.mo-name strong { 
  font-weight: 600; 
  color: #EAECEF; 
  font-size: 13px; 
  margin-bottom: 3px; 
  letter-spacing: 0.2px;
}
.mo-name .sym { 
  color: #9DB0C9; 
  font-size:11px; 
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mo-price { 
  text-align:right; 
  font-family: var(--mono); 
  font-weight: 600;
  color: #EAECEF;
  font-size: 13px;
}
.mo-chg { 
  text-align:right; 
  font-family: var(--mono); 
  font-weight: 600;
  font-size: 12px;
}
.mo-chg.up { color: #0ecb81; }
.mo-chg.down { color: #f6465d; }
@media(max-width: 1100px){ .mo-grid { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); } }
@media(max-width: 720px){ 
  .mo-grid { grid-template-columns: 1fr; }
  .mo-logo { width:20px; height:20px; }
  .mo-logo img { width:20px; height:20px; }
  .mo-row { grid-template-columns: 26px 1.3fr 0.8fr 0.7fr; gap:6px; padding:6px 8px; font-size:0.85rem; }
}

/* Commodities card standardized rows */
.market-card .asset-row {
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 10px; border-bottom:1px solid rgba(255,255,255,0.05);
  min-height:44px; transition: background .15s ease;
}
.market-card .asset-row:hover { background: rgba(255,255,255,0.04); }
.market-card .asset-row .left { display:flex; align-items:center; gap:8px; min-width:0; }
.market-card .asset-row img { width:24px; height:24px; border-radius:6px; object-fit:cover; }
.market-card .asset-row .name { font-weight:600; color:#fff; font-size:14px; line-height:1.1; }
.market-card .asset-row .symbol { font-size:12px; color:#888; }
.market-card .asset-row .right { display:flex; flex-direction:column; align-items:flex-end; text-align:right; white-space:nowrap; }
.market-card .asset-row .price { font-weight:600; font-size:14px; }
.market-card .asset-row .change { font-size:12px; margin-left:6px; }
.market-card .asset-row .change.up { color:#00c853; }
.market-card .asset-row .change.down { color:#d50000; }

/* Placeholder rows for balance */
.market-card .asset-row.placeholder { opacity:.25; }
.market-card .card-title { margin-bottom:8px; }

.market-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.market-tabs {
  display: flex;
  gap: 0;
}

.market-tab {
  background: transparent;
  border: none;
  padding: 8px 16px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  font-weight: 500;
}

.market-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.market-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Modern minimal filter bar */
.market-filter-bar { margin-bottom: 20px; }
.mfb-card {
  background: linear-gradient(180deg, rgba(15,20,34,0.95) 0%, rgba(10,14,19,0.95) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  padding: 14px 16px;
  transition: all 0.3s ease;
}
.mfb-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.12);
}
.mfb-inline { display:flex; align-items:center; gap:12px; justify-content:space-between; flex-wrap: wrap; }
.mfb-search2 { display:flex; align-items:center; gap:8px; position:relative; flex:1 1 420px; }
.mfb-icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); color: var(--muted); font-size:14px }
.mfb-input2 {
  width:100%; height:40px; padding:10px 14px 10px 38px; background:rgba(11,14,17,0.8); color:var(--text);
  border:1px solid rgba(255,255,255,0.1); border-radius:10px; transition: all .2s ease;
  font-size: 14px;
}
.mfb-input2::placeholder{ color: #76808F }
.mfb-input2:focus{ 
  outline:none; 
  border-color: rgba(42,102,255,0.5); 
  box-shadow:0 0 0 3px rgba(42,102,255,0.15);
  background: rgba(11,14,17,0.95);
}
.mfb-search-btn{ 
  height:40px; 
  padding:0 18px; 
  border:none; 
  border-radius:8px; 
  background: linear-gradient(135deg, #2a66ff 0%, #1a4dcc 100%); 
  color:#fff; 
  font-weight:600; 
  cursor:pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(42,102,255,0.25);
}
.mfb-search-btn:hover{ 
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42,102,255,0.35);
}
.mfb-multi{ position:relative; }
.mfb-multi-btn{ 
  height:40px; 
  padding:0 14px; 
  background:rgba(13,17,23,0.8); 
  color:var(--text); 
  border:1px solid rgba(255,255,255,0.1); 
  border-radius:10px; 
  cursor:pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}
.mfb-multi-btn:hover{ 
  border-color:rgba(255,255,255,0.2);
  background:rgba(13,17,23,0.95);
}
.mfb-dropdown{ position:absolute; top:calc(100% + 6px); right:0; min-width:220px; background:#0e1319; color:var(--text); border:1px solid #1e2329; border-radius:12px; box-shadow:0 10px 28px rgba(0,0,0,.35); padding:8px; display:none; z-index:20 }
.mfb-dropdown.open{ display:block }
.mfb-option{ display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:8px; cursor:pointer }
.mfb-option:hover{ background: rgba(255,255,255,0.03) }
.mfb-option input{ accent-color: var(--accent) }
.mfb-dropdown-actions{ display:flex; justify-content:flex-end; padding-top:6px }
.mfb-small{ height:30px; padding:0 10px; border:1px solid #2a3340; border-radius:8px; background:#141a22; color:var(--text); cursor:pointer }
.mfb-small:hover{ border-color:#3a4452 }
.mfb-secondary{ 
  height:40px; 
  padding:0 14px; 
  border:1px solid rgba(255,255,255,0.1); 
  border-radius:8px; 
  background:rgba(20,26,34,0.8); 
  color:var(--text); 
  cursor:pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}
.mfb-secondary:hover{ 
  border-color:rgba(255,255,255,0.2);
  background:rgba(20,26,34,0.95);
}
@media (max-width: 820px){
  .mfb-inline{ flex-direction: column; align-items: stretch }
  .mfb-search2{ width:100% }
  .mfb-multi, .mfb-secondary{ width:100% }
  .mfb-multi-btn, .mfb-secondary{ width:100% }
}

.filter-bar {
  margin-bottom: 16px;
}

.filter-buttons {
  display: flex;
  gap: 1px;
  background: #1e2329;
  border-radius: 6px;
  padding: 4px;
}

.filter-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  font-size: 14px;
}

.filter-btn.active {
  background: var(--panel);
  color: var(--text);
}

.market-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.market-header h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  color: var(--text);
}

.market-description {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 600px;
  margin: 0;
}

.more-link {
  color: var(--gold);
  text-decoration: none;
}

.time-selector select {
  background: var(--panel);
  border: 1px solid #1e2329;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
}

/* Market Table Container */
.market-table-container {
  padding: 0;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15,20,34,0.95) 0%, rgba(10,14,19,0.95) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Market Table Base Styles */
.market-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
  line-height: 1.4;
}

/* Table Cell Base Styles */
.market-table th,
.market-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
  height: 56px;
  box-sizing: border-box;
}

/* Table Header Styles */
.market-table th {
  background: rgba(0,0,0,0.3);
  padding: 16px;
  color: #9DB0C9;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: none;
  border-bottom: 2px solid rgba(255,255,255,0.1);
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* Table Header Hover */
.market-table th:hover {
  background: rgba(255,255,255,0.05);
  color: #EAECEF;
}

.sort-icon {
  margin-left: 4px;
  font-size: 10px;
}

/* Table Row Styles */
.market-row {
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(30, 35, 41, 0.8);
}

/* Table Row Hover */
.market-row:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Table Data Cell Styles */
.market-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-weight: 500;
  transition: background 0.2s ease;
}
.market-table tbody tr:hover td {
  background: rgba(255,255,255,0.03);
}

/* Column-specific alignment */
.market-table td:nth-child(1) { text-align: center; } /* Rank */
.market-table td:nth-child(3), 
.market-table td:nth-child(4), 
.market-table td:nth-child(5), 
.market-table td:nth-child(6) { text-align: right; } /* Price, Change, Volume, Market Cap */
.market-table td:nth-child(7) { text-align: center; } /* Actions */

/* Number formatting */
.price, .change, .volume, .market-cap {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* Remove old column width styles - now handled by colgroup in HTML */

/* Coin/Asset Container */
.coin-container {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

/* Logo Container */
.coin-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--panel-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.crypto-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.2s;
}

.crypto-logo-img:hover {
  transform: scale(1.1);
}

.crypto-logo-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Coin Details */
.coin-details {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* Symbol and Name Styling */
.coin-symbol {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coin-name {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.favorite-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.favorite-btn:hover,
.favorite-btn.active {
  opacity: 1;
}

/* Action Buttons Container */
.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Action Button Styling */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  cursor: pointer;
  opacity: 0.8;
  transition: all 0.2s ease;
  border-radius: 6px;
  color: var(--muted);
}

.action-btn:hover {
  opacity: 1;
  background: rgba(0, 183, 255, 0.1);
  border-color: rgba(0, 183, 255, 0.3);
  color: #00b7ff;
  transform: translateY(-1px);
}

.flash-green {
  animation: flashGreen 1s ease-out;
}

.flash-red {
  animation: flashRed 1s ease-out;
}

@keyframes flashGreen {
  0% { background-color: rgba(14, 203, 129, 0.3); }
  100% { background-color: transparent; }
}

@keyframes flashRed {
  0% { background-color: rgba(246, 70, 93, 0.3); }
  100% { background-color: transparent; }
}

.support-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
  z-index: 1000;
}

.support-button:hover {
  transform: scale(1.1);
}

.support-icon {
  font-size: 20px;
  color: #0b0e11;
}

/* Performance Optimization Styles */
.performance-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  color: #9DB0C9;
  font-size: 13px;
  font-weight: 500;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.05);
}
.performance-stats .load-time {
  color: #76808F;
  font-weight: 600;
}

.advanced-controls {
  margin-bottom: 20px;
  padding: 20px;
}

.controls-form {
  width: 100%;
}

.control-group {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 10px 12px;
  background: #0d1117;
  border: 1px solid #1e2329;
  border-radius: 6px;
  color: var(--text);
}

.search-btn {
  background: var(--accent);
  border: none;
  padding: 10px 12px;
  border-radius: 6px;
  color: white;
  cursor: pointer;
}

.filter-select, .sort-select, .order-select {
  padding: 10px 12px;
  background: #0d1117;
  border: 1px solid #1e2329;
  border-radius: 6px;
  color: var(--text);
  min-width: 120px;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
}

.table-header h3 {
  margin: 0;
  color: #EAECEF;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.view-options select {
  background: var(--panel-2);
  border: 1px solid #1e2329;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
}

/* Table Wrapper with Modern Scrollbar */
.table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 70vh;
  position: relative;
  scroll-behavior: smooth;
}

/* Modern Custom Scrollbar */
.table-wrapper::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #2c2c2c;
  border-radius: 4px;
  margin: 2px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #00b7ff, #00aaff);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #00c7ff, #00baff);
  box-shadow: 0 2px 4px rgba(0, 183, 255, 0.3);
}

.table-wrapper::-webkit-scrollbar-thumb:active {
  background: linear-gradient(45deg, #0097df, #008adf);
}

.table-wrapper::-webkit-scrollbar-corner {
  background: #2c2c2c;
}

/* Firefox Scrollbar */
.table-wrapper {
  scrollbar-width: thin;
  scrollbar-color: #00b7ff #2c2c2c;
}

/* Smooth scrolling for all tables */
.market-table-container {
  scroll-behavior: smooth;
}

/* Hover effect for scrollbar visibility */
.table-wrapper:hover::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #00b7ff, #00aaff);
}

.table-wrapper:not(:hover)::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, rgba(0, 183, 255, 0.6), rgba(0, 170, 255, 0.6));
}

/* Color and Status Styles */
.positive {
  color: var(--green) !important;
  font-weight: 600;
}

.negative {
  color: var(--red) !important;
  font-weight: 600;
}

/* Loading and Error States */
.loading-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--muted);
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 183, 255, 0.3);
  border-top: 3px solid #00b7ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

.error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .market-table {
    font-size: 13px;
  }
  
  .market-table th,
  .market-table td {
    padding: 12px 14px;
    height: 52px;
  }
}

@media (max-width: 768px) {
  .market-table {
    font-size: 12px;
  }
  
  .market-table th,
  .market-table td {
    padding: 10px 12px;
    height: 48px;
  }
  
  .table-wrapper {
    max-height: 60vh;
  }
  
  /* Touch-friendly scrollbar for mobile */
  .table-wrapper::-webkit-scrollbar {
    width: 12px;
    height: 12px;
  }
  
  .table-wrapper::-webkit-scrollbar-track {
    background: #2c2c2c;
    border-radius: 6px;
  }
  
  .table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #00b7ff, #00aaff);
    border-radius: 6px;
    min-height: 40px;
  }
}

.rank {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-align: center;
  width: 60px;
}

.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid #1e2329;
  background: var(--panel-2);
}

.pagination-info {
  color: var(--muted);
  font-size: 14px;
}

.pagination-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.page-btn {
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid #1e2329;
  border-radius: 4px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  min-width: 40px;
  text-align: center;
}

.page-btn:hover {
  background: var(--panel-2);
  color: var(--gold);
}

.page-btn.active {
  background: var(--gold);
  color: #0b0e11;
  font-weight: 600;
}

.performance-monitor {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: var(--panel);
  border: 1px solid #1e2329;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  z-index: 999;
  opacity: 0.8;
}

#loadTimeValue {
  color: var(--gold);
  font-weight: 600;
}

@media(max-width:1100px){
  .layout{grid-template-columns:1fr;grid-template-rows:auto 360px auto auto}
  .sidebar,.trading-panel{grid-column:1;grid-row:auto}
  .chart{grid-column:1}
  .bottom{grid-column:1}
  .trade-cards-container{flex-direction:column}
  
  .nav-menu {flex-wrap: wrap; gap: 10px;}
  .summary-cards {grid-template-columns: 1fr;}
  .info-section {grid-template-columns: 1fr; gap: 20px;}
  .market-header {flex-direction: column; align-items: flex-start; gap: 16px;}
  .market-nav {flex-direction: column; align-items: flex-start; gap: 16px;}
  .search-box input {width: 150px;}
  .filter-buttons {flex-wrap: wrap;}
}

