/* ==========================================================================
   DESIGN SYSTEM & CSS VARIABLES
   ========================================================================== */
:root {
  /* Color Palette - Premium Dark Theme */
  --bg-primary: #070a13;
  --bg-secondary: #0c1122;
  --bg-tertiary: #12182e;
  
  --panel-bg: rgba(13, 20, 42, 0.65);
  --panel-bg-hover: rgba(18, 27, 56, 0.8);
  --panel-border: rgba(255, 255, 255, 0.06);
  --panel-border-hover: rgba(0, 243, 255, 0.25);
  
  --text-primary: #cbd5e1;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Accent Colors (Neon Vibe) */
  --neon-cyan: #00f3ff;
  --neon-blue: #3b82f6;
  --neon-purple: #8b5cf6;
  --neon-emerald: #10b981;  /* Positive / Bullish */
  --neon-rose: #f43f5e;     /* Negative / Bearish */
  --neon-gold: #fbbf24;     /* Neutral / Warning */
  
  /* Glowing Effects */
  --glow-cyan: 0 0 15px rgba(0, 243, 255, 0.35);
  --glow-emerald: 0 0 12px rgba(16, 185, 129, 0.3);
  --glow-rose: 0 0 12px rgba(244, 63, 94, 0.3);
  --glow-purple: 0 0 15px rgba(139, 92, 246, 0.3);
  
  /* Fonts */
  --font-display: 'Outfit', 'Inter', sans-serif;
  --font-sans: 'Inter', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s ease;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(0, 243, 255, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(7, 10, 19, 1) 0%, rgba(12, 17, 34, 0.9) 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font-family: inherit;
  background: none;
  border: none;
  outline: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon-cyan);
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Prevents flex children from breaking layouts */
  padding-left: 260px; /* Width of the sidebar */
  transition: padding-left var(--transition-normal);
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar {
  width: 260px;
  background: rgba(8, 12, 25, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--panel-border);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 90;
  padding: 1.5rem 0;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.sidebar-backdrop {
  display: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.5rem 2rem 1.5rem;
}

.brand-logo {
  font-size: 1.75rem;
}

.brand-name h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-name h2 span {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0.75rem;
  flex: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  position: relative;
}

.menu-item i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.menu-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.menu-item.active {
  color: var(--neon-cyan);
  background: rgba(0, 243, 255, 0.06);
  border: 1px solid rgba(0, 243, 255, 0.15);
}

.menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 4px;
  background: var(--neon-cyan);
  border-radius: 0 4px 4px 0;
  box-shadow: var(--glow-cyan);
}

.sidebar-footer {
  padding: 0 1.5rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--neon-emerald);
  border-radius: 50%;
  box-shadow: var(--glow-emerald);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 12px rgba(16, 185, 129, 0.6); }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* ==========================================================================
   APP HEADER
   ========================================================================== */
.app-header {
  border-bottom: 1px solid var(--panel-border);
  background: rgba(7, 10, 19, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Marquee Ticker */
.ticker-wrapper {
  background: rgba(0, 243, 255, 0.01);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding: 0.4rem 1rem;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.ticker-content {
  display: inline-flex;
  gap: 3rem;
  animation: marquee 45s linear infinite;
}

.ticker-content:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.ticker-item.loading {
  color: var(--text-muted);
}

.ticker-item .ticker-name {
  color: var(--text-secondary);
}

.ticker-item .ticker-price {
  font-family: var(--font-sans);
}

.ticker-item .ticker-change {
  font-size: 0.7rem;
}

/* Fixed Ticker Row */
.fixed-ticker-wrapper {
  background: rgba(13, 20, 42, 0.4);
  border-bottom: 1px solid var(--panel-border);
  padding: 0.6rem 2rem;
}

.fixed-ticker-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .fixed-ticker-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .fixed-ticker-content {
    grid-template-columns: 1fr;
  }
}

.fixed-ticker-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.fixed-ticker-card:hover {
  background: rgba(0, 243, 255, 0.04);
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}

.fixed-ticker-card-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.fixed-ticker-icon {
  font-size: 1.1rem;
}

.fixed-ticker-symbol {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.fixed-ticker-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
}

.fixed-ticker-price {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
}

.fixed-ticker-change {
  font-size: 0.75rem;
  font-weight: 600;
}

.fixed-ticker-loading {
  grid-column: span 4;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
}

/* Header Main Row */
.header-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 2rem;
  gap: 2rem;
}

/* Search Bar */
.search-container {
  flex: 1;
  max-width: 550px;
  position: relative;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(18, 24, 46, 0.6);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0 0.85rem;
  height: 42px;
  transition: var(--transition-fast);
}

.search-input-wrapper:focus-within {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.15);
  background: rgba(18, 24, 46, 0.9);
}

.search-icon {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-right: 0.75rem;
}

#global-search {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 400;
  width: 100%;
}

#global-search::placeholder {
  color: var(--text-muted);
}

.clear-search-btn {
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.25rem;
  display: none;
}

.clear-search-btn:hover {
  color: var(--text-primary);
}

/* Search Results Autocomplete Dropdown */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  max-height: 380px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}

.search-results-dropdown.active {
  display: block;
}

.search-group-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neon-cyan);
  padding: 0.75rem 1rem 0.4rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(0, 243, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.search-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.search-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.search-item-symbol {
  font-weight: 600;
  font-size: 0.85rem;
}

.search-item-name {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.8rem;
}

.search-item-price {
  font-weight: 600;
}

.search-item-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.no-results-msg {
  padding: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-item-custom-hint {
  font-size: 0.75rem;
  color: var(--neon-cyan);
  padding: 0.75rem;
  text-align: center;
  background: rgba(0, 243, 255, 0.04);
  cursor: pointer;
}

/* Header Metadata block */
.header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.refresh-btn {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.refresh-btn:hover {
  color: var(--neon-cyan);
  background: rgba(0, 243, 255, 0.05);
  border-color: var(--neon-cyan);
}

.refresh-btn.spinning i {
  animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   MAIN WRAPPER & CORE ELEMENTS
   ========================================================================== */
.app-main {
  flex: 1;
  padding: 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Page Loader */
.page-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 350px;
  gap: 1rem;
}

.spinner {
  width: 45px;
  height: 45px;
  border: 4px solid var(--bg-tertiary);
  border-top-color: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: var(--glow-cyan);
  animation: spin 0.85s linear infinite;
}

.page-loader p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Custom CSS badge utilities */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-bullish {
  background: rgba(16, 185, 129, 0.1);
  color: var(--neon-emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-bearish {
  background: rgba(244, 63, 94, 0.1);
  color: var(--neon-rose);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.badge-neutral {
  background: rgba(251, 191, 36, 0.1);
  color: var(--neon-gold);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.badge-cyan {
  background: rgba(0, 243, 255, 0.08);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 243, 255, 0.2);
}

/* Neon Text Helpers */
.neon-text {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

.emerald-text {
  color: var(--neon-emerald);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.rose-text {
  color: var(--neon-rose);
  text-shadow: 0 0 10px rgba(244, 63, 94, 0.2);
}

/* Glassmorphic Panel Core */
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.panel:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   DASHBOARD VIEW
   ========================================================================== */
.view-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.view-title-info h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.view-title-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Overview Cards */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.overview-card {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.overview-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.overview-icon-box.blue {
  background: rgba(59, 130, 246, 0.1);
  color: var(--neon-blue);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.overview-icon-box.purple {
  background: rgba(139, 92, 246, 0.1);
  color: var(--neon-purple);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.overview-icon-box.cyan {
  background: rgba(0, 243, 255, 0.1);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 243, 255, 0.2);
}

.overview-icon-box.gold {
  background: rgba(251, 191, 36, 0.1);
  color: var(--neon-gold);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

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

.overview-card-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.overview-card-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.overview-card-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Dashboard Alerts Grid */
.alerts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

/* For smaller screens, fall back to single column */
@media (max-width: 992px) {
  .alerts-grid {
    grid-template-columns: 1fr;
  }
}

.alert-panel {
  display: flex;
  flex-direction: column;
  height: 380px;
  overflow: hidden;
}

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

.alert-panel-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-panel-title i {
  font-size: 1.15rem;
}

.alert-panel-title h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.alert-panel-body {
  flex: 1;
  overflow-y: auto;
}

.alert-list {
  display: flex;
  flex-direction: column;
}

.alert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  transition: var(--transition-fast);
  cursor: pointer;
}

.alert-item:hover {
  background: rgba(255, 255, 255, 0.02);
  transform: translateX(3px);
}

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

.alert-item-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.alert-asset-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  border: 1px solid var(--panel-border);
}

.alert-asset-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.alert-asset-symbol {
  font-weight: 600;
  font-size: 0.85rem;
}

.alert-asset-name {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.alert-item-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.alert-item-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}

.alert-item-price {
  font-weight: 600;
  font-size: 0.85rem;
}

.alert-item-change {
  font-size: 0.75rem;
}

.alert-item-badge-box {
  width: 95px;
  display: flex;
  justify-content: flex-end;
}

.alert-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
}

.alert-empty-state i {
  font-size: 2.25rem;
  opacity: 0.4;
}

.alert-empty-state p {
  font-size: 0.85rem;
}

/* ==========================================================================
   MARKET VIEW & TABLES
   ========================================================================== */
.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.filter-btn.active {
  background: rgba(0, 243, 255, 0.08);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.05);
}

.search-filter-box {
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 0 0.75rem;
  height: 36px;
  width: 250px;
}

.search-filter-box input {
  color: var(--text-primary);
  font-size: 0.85rem;
  width: 100%;
}

.search-filter-box input::placeholder {
  color: var(--text-muted);
}

.table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.market-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.market-table th, .market-table td {
  padding: 0.65rem 0.6rem;
  border-bottom: 1px solid var(--panel-border);
  white-space: nowrap;
}

.market-table th {
  background: rgba(18, 24, 46, 0.4);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-fast);
}

.market-table th:hover {
  background: rgba(18, 24, 46, 0.7);
  color: var(--text-primary);
}

.market-table th i {
  margin-left: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.market-table th.active-sort {
  color: var(--neon-cyan);
}

.market-table th.active-sort i {
  color: var(--neon-cyan);
}

/* Portföy Gösterge Paneli: Uyumsuzluk sütununu içeriğe göre dar ve simetrik tut. */
.market-table th.portfolio-rating-div-column,
.market-table td.portfolio-rating-div-column {
  width: 1%;
  box-sizing: border-box;
  padding-inline: 0.25rem !important;
  text-align: center !important;
  vertical-align: middle;
}

.market-table th.portfolio-rating-div-column {
  position: relative;
}

.market-table th.portfolio-rating-div-column > i {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  margin-left: 0;
  transform: translateY(-50%);
}

.market-table td.portfolio-rating-div-column > .badge {
  justify-content: center;
}

.market-table tbody tr {
  cursor: pointer;
  transition: var(--transition-fast);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.market-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

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

.table-cell-asset {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.table-asset-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.table-asset-symbol {
  font-weight: 600;
  color: var(--text-primary);
}

.table-asset-name {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.table-cell-number {
  font-family: var(--font-sans);
  font-weight: 500;
}

.table-cell-badge {
  font-weight: 600;
}

/* ==========================================================================
   DETAILED VIEW
   ========================================================================== */
.back-btn-row {
  margin-bottom: 1.5rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  transition: var(--transition-fast);
}

.back-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
}

.detail-header-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.detail-title-block {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.detail-logo-box {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  border: 1px solid var(--panel-border);
}

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

.detail-info h1 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
}

.detail-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.detail-info-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.detail-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.detail-price {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.detail-change {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Detail Main Grid layout */
.detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: start;
}

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

/* Portfolio Page Grid layout */
.portfolio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.5rem;
  width: 100%;
  align-items: start;
}

@media (max-width: 1200px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* SVG Speedometer Gauge */
.gauge-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

.gauge-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gauge-container {
  position: relative;
  width: 220px;
  height: 130px;
  margin-bottom: 1rem;
}

.gauge-svg {
  width: 100%;
  height: 100%;
}

.gauge-track {
  fill: none;
  stroke: var(--bg-tertiary);
  stroke-width: 14;
  stroke-linecap: round;
}

.gauge-zones path {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
}

.gauge-zone-strong-sell { stroke: var(--neon-rose); opacity: 0.35; }
.gauge-zone-sell { stroke: var(--neon-rose); opacity: 0.65; }
.gauge-zone-neutral { stroke: var(--neon-gold); }
.gauge-zone-buy { stroke: var(--neon-emerald); opacity: 0.65; }
.gauge-zone-strong-buy { stroke: var(--neon-emerald); opacity: 0.35; }

.gauge-needle {
  fill: var(--text-primary);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
  transform-origin: 110px 110px;
  transition: transform 1.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.gauge-center-dot {
  fill: var(--bg-primary);
  stroke: var(--text-primary);
  stroke-width: 3;
}

.gauge-rating-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

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

/* Indicators Detail Table & List */
.indicators-detail-panel {
  display: flex;
  flex-direction: column;
}

.indicators-panel-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--panel-border);
}

.indicators-panel-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.indicators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
}

.indicator-stat-card {
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.indicator-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.indicator-stat-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.indicator-stat-value {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
}

.indicator-stat-details {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  padding-top: 0.5rem;
}

/* Fibonacci Support / Resistance Levels styling */
.fib-levels-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fib-level-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.01);
}

.fib-level-row.active-level {
  background: rgba(139, 92, 246, 0.08);
  border: 1px dashed rgba(139, 92, 246, 0.3);
  color: var(--text-primary);
  font-weight: 600;
}

.fib-level-row .fib-ratio {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-secondary);
}

.fib-level-row.active-level .fib-ratio {
  color: var(--neon-purple);
  text-shadow: var(--glow-purple);
}

.fib-level-row .fib-val {
  font-family: var(--font-sans);
}

/* ==========================================================================
   SPLIT ALERT PANELS (BULLISH & BEARISH COLUMNS)
   ========================================================================== */
.alerts-grid {
  grid-template-columns: 1fr !important; /* Force full width for split panels */
}

.alert-panel {
  height: auto !important;
  min-height: 600px;
}

.alert-split-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  height: 520px;
}

@media (max-width: 900px) {
  .alert-split-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  .alert-panel {
    min-height: auto;
  }
}

.alert-split-column {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  overflow: hidden;
}

.alert-split-header {
  padding: 0.75rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-split-header.bullish-text {
  color: var(--neon-emerald);
  background: rgba(16, 185, 129, 0.03);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.alert-split-header.bearish-text {
  color: var(--neon-rose);
  background: rgba(244, 63, 94, 0.03);
  text-shadow: 0 0 10px rgba(244, 63, 94, 0.1);
}

.alert-split-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

/* Timeframe Selector Styles */
.timeframe-select-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  margin-right: 0.5rem;
}

.timeframe-select-wrapper i {
  color: var(--neon-cyan);
  font-size: 0.85rem;
}

.timeframe-select-wrapper select {
  background: #0d142a;
  border: 1px solid var(--panel-border);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.timeframe-select-wrapper select option {
  background-color: #0d142a !important;
  color: #ffffff !important;
}

/* Detail page timeframe buttons */
.detail-timeframe-selector {
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 0.25rem;
  margin-left: auto;
}

.timeframe-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.timeframe-tab-btn.active {
  background: var(--neon-cyan);
  color: var(--bg-dark) !important;
  font-weight: 700;
  box-shadow: var(--glow-cyan);
}

/* ==========================================================================
   AUTHENTICATION, SETTINGS & PORTFOLIO UI EXTENSIONS
   ========================================================================== */
.menu-section-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
  font-weight: 700;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 6, 12, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  width: 90%;
  max-width: 440px;
  border-radius: 12px;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 2rem;
  position: relative;
}
.modal-overlay.active .modal-content {
  transform: scale(1);
}
.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}
.modal-close-btn:hover {
  color: var(--neon-rose);
}
.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--panel-border-hover);
  background: rgba(12, 17, 34, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--glow-cyan);
  z-index: 10000;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--text-primary);
  transform: translateY(1rem);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast-notification.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control {
  background: rgba(7, 10, 19, 0.6) !important;
  border: 1px solid var(--panel-border) !important;
  border-radius: 6px !important;
  padding: 0.75rem 1rem !important;
  color: var(--text-primary) !important;
  font-size: 0.9rem !important;
  transition: all 0.2s ease !important;
}
.form-control:focus {
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 8px rgba(0, 243, 255, 0.2) !important;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--panel-border);
  margin-bottom: 2rem;
  gap: 1.5rem;
}
.auth-tab {
  padding-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}
.auth-tab.active {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}
.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
  border-radius: 2px;
}

.add-portfolio-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(0, 243, 255, 0.08);
  border: 1px solid rgba(0, 243, 255, 0.15);
  color: var(--neon-cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  margin-left: 0.6rem;
  vertical-align: middle;
}
.add-portfolio-btn:hover {
  background: var(--neon-cyan);
  color: #070a13;
  box-shadow: var(--glow-cyan);
  border-color: var(--neon-cyan);
}
.add-portfolio-btn.in-portfolio {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.2);
  color: var(--neon-rose);
}
.add-portfolio-btn.in-portfolio:hover {
  background: var(--neon-rose);
  color: #070a13;
  box-shadow: var(--glow-rose);
  border-color: var(--neon-rose);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
@media (min-width: 1024px) {
  .settings-grid {
    grid-template-columns: 1.6fr 1fr;
  }
}

.portfolio-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.pie-chart-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0;
}

/* Premium Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-display);
}

.btn-primary {
  background: rgba(0, 243, 255, 0.08);
  border: 1px solid rgba(0, 243, 255, 0.25);
  color: var(--neon-cyan);
  text-shadow: 0 0 5px rgba(0, 243, 255, 0.3);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.05);
}

.btn-primary:hover {
  background: var(--neon-cyan);
  color: #070a13;
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
  text-shadow: none;
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* Custom Switch Toggle Slider */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255,255,255,0.1);
  transition: .3s;
  border-radius: 20px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}
input:checked + .slider:before {
  transform: translateX(20px);
  background-color: #070a13;
}
*:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
}

/* Zincirüstü sayfasında metin ve sayısal değerler iki görsel kademe
   büyütülür. Genişlik telafisi yatay taşmayı önler ve diğer modülleri etkilemez. */
.onchain-module {
  --onchain-type-scale: 1.125;
  zoom: var(--onchain-type-scale);
  width: 100%;
}

@media (max-width: 768px) {
  /* Mobile Layout Reset */
  .main-container {
    padding-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* Mobile Drawer Sidebar */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 285px !important;
    max-width: 82vw !important;
    z-index: 1000 !important;
    box-shadow: 15px 0 40px rgba(0, 0, 0, 0.95) !important;
    transform: translateX(-105%) !important;
    -webkit-transform: translateX(-105%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s !important;
    -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s !important;
    background: rgba(8, 12, 25, 0.98) !important;
    visibility: hidden;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .sidebar.open {
    transform: translateX(0) !important;
    -webkit-transform: translateX(0) !important;
    visibility: visible !important;
  }

  /* Sidebar Backdrop */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 990;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .sidebar-backdrop.active {
    display: block !important;
    opacity: 1 !important;
  }

  /* Sidebar Close Button on Mobile */
  .sidebar-close-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
  }

  /* Mobile Hamburger Button */
  .mobile-menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.25);
    color: var(--neon-cyan);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition-fast);
  }

  .mobile-menu-toggle:active {
    transform: scale(0.95);
    background: rgba(0, 243, 255, 0.18);
  }

  /* Header & Action Row Responsive Layout */
  .header-action-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    padding: 0.5rem 0.75rem !important;
    align-items: center !important;
  }

  .search-container {
    flex: 1 1 calc(100% - 50px) !important;
    min-width: 0 !important;
  }

  .header-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.4rem !important;
    padding-top: 0.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .timeframe-select-wrapper {
    flex: 1 !important;
  }

  .timeframe-select-wrapper select {
    width: 100% !important;
    font-size: 0.8rem !important;
    padding: 0.35rem 0.5rem 0.35rem 1.75rem !important;
  }

  #last-update-time {
    font-size: 0.70rem !important;
    white-space: nowrap !important;
  }

  /* Fixed Tickers Horizontal Swipeable Carousel */
  .fixed-ticker-wrapper {
    padding: 0.35rem 0.5rem !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .fixed-ticker-wrapper::-webkit-scrollbar {
    display: none !important;
  }

  .fixed-ticker-content {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.45rem !important;
    width: max-content !important;
  }

  .fixed-ticker-card {
    flex: 0 0 auto !important;
    min-width: 140px !important;
    padding: 0.35rem 0.6rem !important;
    font-size: 0.78rem !important;
  }

  .fixed-ticker-card .fixed-ticker-price {
    font-size: 0.82rem !important;
  }

  /* Main Container & Modules on Mobile */
  .app-main {
    padding: 0.6rem 0.4rem !important;
  }

  .onchain-module {
    zoom: 1.0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  /* Tables horizontal scroll safety */
  .table-responsive, .portfolio-table-wrapper, .table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .ticker-wrapper {
    padding: 0.25rem 0.5rem !important;
  }
  .app-main {
    padding: 0.5rem 0.35rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
/* Read-only asset chart: scoped to avoid changing existing trade/account modals. */
.asset-chart-actions { display: inline-flex; align-items: center; gap: .35rem; }
.asset-chart-trigger, .asset-detail-trigger { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; text-align: inherit; }
.asset-chart-icon { color: var(--neon-cyan); padding: .25rem; font-size: .8rem; flex-shrink: 0; }
.futures-detail-row { cursor: pointer; }
.asset-detail-trigger:hover { color: var(--neon-cyan); }
.asset-detail-trigger:focus-visible { outline: 2px solid var(--neon-cyan); outline-offset: 4px; border-radius: 3px; }
.asset-chart-trigger:hover, .asset-chart-trigger:focus-visible { color: var(--neon-cyan); }
.asset-chart-trigger:focus-visible { outline: 2px solid var(--neon-cyan); outline-offset: 4px; border-radius: 3px; }
.asset-chart-glyph { font-size: .72em; color: var(--neon-cyan); opacity: .7; }
.back-btn-row > .asset-chart-trigger { margin-left: auto; font-size: .85rem; color: var(--neon-cyan); }
.asset-chart-overlay { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 2vh 2vw; background: rgba(4,6,12,.88); backdrop-filter: blur(6px); }
.asset-chart-panel { width: min(1500px, 100%); height: 94vh; height: 94dvh; display: flex; flex-direction: column; overflow: hidden; background: #0b1220; color: #cdd6f4; border: 1px solid #24344b; border-radius: 14px; box-shadow: 0 20px 80px #0008; }
.asset-chart-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; }
.asset-chart-header h2 { font-size: 1rem; margin: 0; }
.asset-chart-symbol { color: #22d3ee; font: .8rem monospace; margin: .25rem 0 0; overflow-wrap: anywhere; }
.asset-chart-close, .asset-chart-toolbar button { border: 1px solid #293b50; color: #cdd6f4; background: #111c2d; border-radius: 6px; padding: .4rem .7rem; cursor: pointer; }
.asset-chart-close { font-size: 1.1rem; min-width: 40px; min-height: 40px; }
.asset-chart-window-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.asset-chart-fullscreen { min-height: 40px; padding: .4rem .7rem; border: 1px solid #0891b2; border-radius: 6px; background: #083344; color: #67e8f9; cursor: pointer; }
.asset-chart-fullscreen:disabled { opacity: .5; cursor: wait; }
.asset-chart-overlay[data-expanded="true"], .asset-chart-overlay:fullscreen { padding: 0; width: 100%; height: 100%; }
.asset-chart-overlay[data-expanded="true"] .asset-chart-panel, .asset-chart-overlay:fullscreen .asset-chart-panel { width: 100%; max-width: none; height: 100vh; height: 100dvh; border-radius: 0; }
.asset-chart-fullscreen:focus-visible { outline: 2px solid #67e8f9; outline-offset: 3px; }
.chart-trade-panel .chart-close-note { display: block; padding: .5rem; border-left: 3px solid #fbbf24; border-radius: 4px; background: #302815; color: #fde68a; line-height: 1.5; }
.chart-trade-panel .chart-close-note[hidden] { display: none; }
.asset-chart-toolbar { display: flex; gap: .4rem; flex-wrap: wrap; padding: 0 1rem .7rem; }
.asset-chart-toolbar button[aria-pressed="true"] { color: #22d3ee; border-color: #0891b2; background: #062b36; }
.asset-chart-body { flex: 1; min-height: 120px; border-block: 1px solid #24344b; overflow: hidden; }
.asset-chart-body iframe { width: 100%; height: 100%; border: 0; display: block; }
.asset-chart-footer { padding: .55rem 1rem; font-size: .75rem; color: #94a3b8; }
.asset-chart-status { margin: 0 0 .3rem; }
.asset-chart-links { display: flex; gap: 1rem; margin-bottom: .3rem; flex-wrap: wrap; }
.asset-chart-links a { color: #22d3ee; text-decoration: underline; }
.asset-chart-modes { display: flex; gap: .4rem; padding: 0 1rem .7rem; }
.asset-chart-markets:not([hidden]) { display: flex; gap: .4rem; padding: 0 1rem .7rem; }
.asset-chart-markets button { border: 1px solid #293b50; color: #cdd6f4; background: #111c2d; border-radius: 6px; padding: .4rem .7rem; cursor: pointer; }
.asset-chart-markets button[aria-pressed="true"] { color: #fbbf24; border-color: #b78917; background: #302509; }
.asset-chart-modes button, .account-chart-refresh { border: 1px solid #293b50; color: #cdd6f4; background: #111c2d; border-radius: 6px; padding: .4rem .7rem; cursor: pointer; }
.asset-chart-modes button[aria-pressed="true"] { color: #22d3ee; border-color: #0891b2; background: #062b36; }
.account-chart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; height: 100%; }
.account-chart-canvas { min-width: 0; min-height: 0; height: 100%; position: relative; }
.account-chart-levels { overflow: auto; border-left: 1px solid #24344b; padding: .7rem; font-size: .75rem; overflow-wrap: anywhere; }
.account-chart-message { white-space: pre-line; color: #cdd6f4; }
.account-chart-list { list-style: none; margin: .5rem 0; padding: 0; }
.account-chart-list li { padding: .4rem 0; border-bottom: 1px solid #24344b; }
.account-chart-insights { padding: .6rem 0; }
.chart-trade-panel { margin: .7rem 0; padding: .6rem; border: 1px solid #b78917; border-radius: 6px; }
.chart-trade-panel[hidden], .chart-trade-feedback[hidden], .chart-trade-feedback button[hidden] { display: none; }
.chart-trade-feedback { font-size: .75rem; overflow-wrap: anywhere; }
.chart-trade-feedback button { background: #111c2d; color: #22d3ee; border: 1px solid #293b50; border-radius: 5px; padding: .4rem; cursor: pointer; }
.chart-entry-badge { position: absolute; z-index: 5; right: 0; transform: translateY(-50%); display: flex; align-items: center; height: 22px; max-width: calc(100% - 8px); background: #fbbf24; color: #111827; border-radius: 3px 0 0 3px; font: 12px/1.2 Arial, sans-serif; box-sizing: border-box; pointer-events: auto; }
.chart-entry-badge[hidden] { display: none; }
.chart-entry-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px; }
.chart-entry-price { flex-shrink: 0; padding: 0 5px; font-variant-numeric: tabular-nums; border-left: 1px solid #11182733; }
.chart-entry-close { flex: 0 0 24px; align-self: stretch; min-width: 24px; padding: 0; border: 0; border-left: 1px solid #11182744; border-radius: 0; background: #b91c1c; color: #fff; font: bold 18px/1 Arial, sans-serif; cursor: pointer; }
.chart-entry-close:hover:not(:disabled), .chart-entry-close:focus-visible { background: #ef4444; outline: 2px solid #fff; outline-offset: -2px; }
.chart-entry-close:disabled { opacity: .5; cursor: not-allowed; }
.chart-trade-panel h3 { color: #fbbf24; margin: 0 0 .4rem; font-size: .85rem; }
.chart-trade-panel label { display: grid; gap: .25rem; margin: .6rem 0; }
.chart-trade-panel input, .chart-trade-panel select, .chart-trade-panel button { width: 100%; min-width: 0; box-sizing: border-box; background: #111c2d; color: #cdd6f4; border: 1px solid #293b50; border-radius: 4px; padding: .45rem; }
.chart-trade-panel button { margin-top: .4rem; cursor: pointer; }
.chart-trade-panel button:disabled { opacity: .5; cursor: not-allowed; }
.chart-trade-panel button[aria-pressed="true"] { border-color: #38bdf8; color: #38bdf8; }
.chart-trade-panel button[hidden] { display: none; }
.chart-trade-summary { white-space: pre-line; color: #fbbf24; }
.chart-trade-panel label[hidden], .chart-trade-panel small[hidden] { display: none; }
.chart-context-menu { position: absolute; z-index: 30; width: 260px; max-width: 95%; max-height: 90%; overflow: auto; padding: .5rem; border: 1px solid #38bdf8; border-radius: 6px; background: #101b2c; color: #cdd6f4; box-shadow: 0 5px 25px #0009; }
.chart-context-menu[hidden] { display: none; }
.chart-context-menu strong { display: block; font-size: .8rem; padding: .3rem; }
.chart-context-menu button { display: block; width: 100%; text-align: left; background: #111c2d; border: 1px solid #293b50; border-radius: 4px; color: #22d3ee; padding: .4rem; margin-top: .2rem; cursor: pointer; }
.chart-context-menu button:disabled { opacity: .4; cursor: not-allowed; }
.chart-action-host { position: relative; padding-right: 65px !important; }
.chart-action-host .chart-position-close { position: absolute; right: 0; top: .35rem; width: auto; min-height: 27px; padding: .25rem .45rem; border: 1px solid #fb446a; border-radius: 5px; background: #7f1d2d; color: #fff; font-size: .7rem; cursor: pointer; }
.chart-action-host .chart-position-close:disabled { opacity: .4; cursor: not-allowed; }
.chart-action-host.chart-editable-order { padding-right: 70px !important; }
.chart-action-host .chart-order-edit { position: absolute; right: 0; top: 2.4rem; padding: .25rem .4rem; border: 1px solid #0891b2; border-radius: 5px; background: #083344; color: #67e8f9; font-size: .7rem; cursor: pointer; }
.chart-action-host .chart-order-edit:disabled { opacity: .4; cursor: not-allowed; }
.chart-action-host.chart-editable-order { min-height: 68px; }
.account-chart-orders-heading { color: #22d3ee; font-size: .85rem; margin-block: .8rem .4rem; }
.portfolio-open-orders { padding: 1.15rem; margin-block: 1rem; }
.portfolio-orders-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.portfolio-orders-heading h3 { margin: 0 0 .25rem; color: #e2e8f0; font-size: 1.15rem; }
.portfolio-orders-heading small { color: #94a3b8; font-size: .75rem; }
.portfolio-orders-heading button { padding: .5rem .85rem; background: #083344; color: #67e8f9; border: 1px solid #0891b2; border-radius: 7px; cursor: pointer; }
.portfolio-orders-heading button:disabled { opacity: .5; cursor: wait; }
.portfolio-orders-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
.portfolio-orders-counter { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem 1rem; border: 1px solid; border-radius: 9px; }
.portfolio-orders-counter span { font-size: .78rem; }
.portfolio-orders-counter strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.portfolio-open-orders .portfolio-order-tone-neutral { color: #cbd5e1; background: #172237; border-color: #34445e; }
.portfolio-open-orders .portfolio-order-tone-buy { color: #6ee7b7; background: #06352d; border-color: #17644f; }
.portfolio-open-orders .portfolio-order-tone-sell { color: #fda4af; background: #3e1725; border-color: #7c3047; }
.portfolio-open-orders .portfolio-order-tone-limit { color: #67e8f9; background: #083344; border-color: #155e75; }
.portfolio-open-orders .portfolio-order-tone-stop { color: #c4b5fd; background: #2e2049; border-color: #64508c; }
.portfolio-open-orders .portfolio-order-tone-profit { color: #fcd34d; background: #382e12; border-color: #806321; }
.portfolio-open-orders .portfolio-order-tone-trigger { color: #c4b5fd; background: #292040; border-color: #594777; }
.portfolio-open-orders .portfolio-orders-status { color: #cbd5e1; background: #152136; border-left: 3px solid #64748b; border-radius: 5px; padding: .6rem .8rem; font-size: .78rem; line-height: 1.6; margin: .85rem 0; }
.portfolio-open-orders .portfolio-orders-status-ok { border-color: #34d399; }
.portfolio-open-orders .portfolio-orders-status-warning { color: #fde68a; background: #302815; border-color: #fbbf24; }
.portfolio-open-orders .portfolio-orders-status-error { color: #fecdd3; background: #361a28; border-color: #fb7185; }
.portfolio-orders-help { color: #94a3b8; font-size: .78rem; line-height: 1.6; }
.portfolio-orders-help summary { color: #7dd3fc; cursor: pointer; width: fit-content; }
.portfolio-orders-help p { max-width: 1000px; margin: .5rem 0; }
.portfolio-orders-scroll { overflow: auto; margin-top: .85rem; border: 1px solid #27364b; border-radius: 9px; }
.portfolio-orders-scroll table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.portfolio-orders-scroll th, .portfolio-orders-scroll td { text-align: left; padding: .9rem .8rem; border-bottom: 1px solid #24344b; vertical-align: middle; }
.portfolio-orders-scroll th { white-space: nowrap; color: #a6b8d1; background: #152137; font-size: .7rem; letter-spacing: .04em; }
.portfolio-orders-scroll tbody tr { background: #0c1525; }
.portfolio-orders-scroll tbody tr:nth-child(even) { background: #101b2d; }
.portfolio-orders-scroll tbody tr:hover { background: #18263a; }
.portfolio-orders-scroll tbody tr:last-child td { border-bottom: 0; }
.portfolio-orders-scroll .portfolio-order-row-buy td:first-child { box-shadow: inset 3px 0 #34d399; }
.portfolio-orders-scroll .portfolio-order-row-sell td:first-child { box-shadow: inset 3px 0 #fb7185; }
.portfolio-orders-scroll td:first-child > strong { color: #f1f5f9; font-size: .9rem; white-space: nowrap; }
.portfolio-order-badges { display: flex; flex-wrap: wrap; gap: .35rem; min-width: 180px; }
.portfolio-order-badge { display: inline-block; padding: .2rem .45rem; border: 1px solid; border-radius: 5px; font-size: .7rem; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.portfolio-order-secondary { display: block; margin-top: .3rem; color: #9aaac1; font-size: .7rem; overflow-wrap: anywhere; }
.portfolio-order-price { font-variant-numeric: tabular-nums; min-width: 95px; }
.portfolio-order-price > strong { color: #67e8f9; white-space: nowrap; }
.portfolio-order-price.portfolio-order-trigger > strong { color: #c4b5fd; }
.portfolio-order-quantity { display: flex; justify-content: space-between; gap: 1rem; min-width: 145px; line-height: 1.8; font-variant-numeric: tabular-nums; }
.portfolio-order-quantity span { color: #9aaac1; font-size: .72rem; }
.portfolio-order-quantity strong { color: #e2e8f0; white-space: nowrap; }
.portfolio-order-quantity-remaining strong { color: #67e8f9; }
.portfolio-orders-scroll td.portfolio-orders-placeholder { text-align: center; color: #94a3b8; padding: 2rem; line-height: 1.6; }
/* Scope overrides to this inventory: chart-sidebar action layout must not change. */
.portfolio-open-orders td.portfolio-order-actions.chart-action-host { min-width: 150px; padding: .65rem .8rem !important; height: auto; min-height: 0; box-sizing: border-box; white-space: nowrap; }
.portfolio-open-orders .portfolio-order-actions .chart-order-edit,
.portfolio-open-orders .portfolio-order-actions .chart-position-close { position: static; display: inline-block; min-height: 32px; margin: .2rem .3rem .2rem 0; padding: .4rem .55rem; font-size: .75rem; border-radius: 6px; }
.portfolio-open-orders .portfolio-order-actions .chart-order-edit:not(:disabled):hover { background: #155e75; }
.portfolio-open-orders .portfolio-order-actions .chart-position-close:not(:disabled):hover { background: #9f1239; }
.portfolio-open-orders button:focus-visible, .portfolio-orders-help summary:focus-visible, .portfolio-orders-scroll:focus-visible { outline: 2px solid #67e8f9; outline-offset: 3px; }
@media (max-width: 640px) {
  .portfolio-open-orders { padding: .75rem; }
  .portfolio-orders-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .portfolio-orders-counter { padding: .65rem; }
  .portfolio-orders-scroll th, .portfolio-orders-scroll td { padding: .7rem .6rem; }
}
.chart-context-menu.chart-quick-overlay { position: fixed; inset: 0; z-index: 10050; width: auto; max-width: none; max-height: none; padding: 1rem; border: 0; border-radius: 0; display: flex; align-items: center; justify-content: center; background: #020617bb; overflow: auto; box-sizing: border-box; }
.chart-context-menu.chart-quick-overlay[hidden] { display: none; }
.chart-quick-card { position: relative; width: min(440px, 100%); max-height: 86vh; overflow: auto; background: #0b1220; border: 1px solid #334155; border-radius: 12px; padding: 1rem; box-sizing: border-box; box-shadow: 0 15px 60px #000a; }
.chart-quick-card > h3 { margin: 0 2rem .6rem 0; color: #22d3ee; font-size: 1rem; }
.chart-quick-card > .chart-quick-dismiss { position: absolute; right: .6rem; top: .3rem; width: 30px; text-align: center; font-size: 1.3rem; padding: .15rem; }
.chart-trade-quick { margin: 0; padding: 0; border: 0; font-size: .8rem; }
.chart-trade-quick > h3, .chart-trade-quick > small:first-of-type { display: none; }
.chart-trade-quick label { margin: .45rem 0; }
.chart-trade-quick .chart-trade-summary { padding: .5rem; background: #111c2d; border-radius: 5px; font-size: .75rem; line-height: 1.4; }
.chart-trade-quick button { text-align: center; }
.chart-trade-quick button:not([hidden]):not(:disabled) { border-color: #0891b2; }
.account-chart-indicator-menu { margin: .6rem 0; padding: .5rem; border: 1px solid #24344b; border-radius: 6px; }
.account-chart-indicator-menu summary { color: #22d3ee; cursor: pointer; font-weight: 700; }
.account-chart-closed-control { display: flex; align-items: center; gap: .4rem; margin-block: .6rem; }
.account-chart-indicator-row { display: grid; grid-template-columns: 18px 60px minmax(50px, 1fr) 35px; gap: .35rem; align-items: center; margin-block: .5rem; }
.account-chart-indicator-row select, .account-chart-indicator-row input[type="number"], .account-chart-indicator-menu button { background: #111c2d; color: #cdd6f4; border: 1px solid #293b50; border-radius: 4px; padding: .25rem; min-width: 0; }
.account-chart-indicator-row input[type="color"] { width: 35px; height: 28px; padding: 1px; border: 1px solid #293b50; background: #111c2d; cursor: pointer; }
.account-chart-indicator-row input[aria-invalid="true"] { border-color: #fb446a; }
.account-chart-indicator-value { grid-column: 2 / -1; font-variant-numeric: tabular-nums; }
.account-chart-indicator-status { color: #94a3b8; font-size: .7rem; }
.account-chart-position { margin: .7rem 0; padding-block: .4rem; border-block: 1px solid #24344b; }
.account-chart-position h3 { margin: 0 0 .4rem; color: #fbbf24; font-size: .8rem; }
.account-chart-position h3.chart-action-host { min-height: 27px; display: flex; align-items: center; }
.account-chart-position h3.chart-action-host .chart-position-close { top: 0; }
.account-chart-stream { font-size: .75rem; color: #22d3ee; margin: .4rem 0; }
.account-chart-stream:empty { display: none; }
.account-chart-performance:empty { display: none; }
.account-chart-performance { border-block: 1px solid #24344b; padding-block: .6rem; margin-block: .6rem; }
.account-chart-performance h3 { color: #22d3ee; font-size: .85rem; margin: 0 0 .4rem; }
.account-chart-performance > small:first-of-type { color: #fbbf24; }
.account-chart-performance details { margin-top: .7rem; }
.account-chart-performance summary { cursor: pointer; color: #22d3ee; }
.account-chart-performance input { max-width: 100%; min-width: 0; background: #111c2d; color: #cdd6f4; border: 1px solid #293b50; border-radius: 4px; padding: .3rem; margin-block: .3rem; }
.account-chart-performance button { display: block; width: 100%; box-sizing: border-box; margin-block: .5rem; padding: .55rem .65rem; border: 1px solid #0891b2; border-radius: 6px; background: #083344; color: #67e8f9; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; white-space: normal; }
.account-chart-performance button:hover:not(:disabled) { background: #164e63; }
.account-chart-performance button:focus-visible { outline: 2px solid #22d3ee; outline-offset: 2px; }
.account-chart-performance button:disabled { opacity: .6; cursor: wait; }
.account-chart-performance details small { display: block; margin-block: .5rem; line-height: 1.4; }
.account-chart-performance details details { padding: .5rem; border: 1px solid #293b50; border-radius: 6px; }
.account-chart-performance details details input { width: 100%; box-sizing: border-box; }
.coin-performance-dates { display: flex; flex-wrap: wrap; gap: .5rem; }
.coin-performance-dates label { flex: 1 1 8rem; min-width: 0; font-size: .75rem; }
.coin-performance-dates label span { display: block; }
.coin-performance-dates input { width: 100%; box-sizing: border-box; }
.coin-performance-archive-state { margin-block: .6rem; font-size: .75rem; }
.coin-performance-archive-state p { margin-top: .3rem; color: #cdd6f4; line-height: 1.4; overflow-wrap: anywhere; }
.account-chart-performance .account-chart-metric { font-size: .75rem; flex-wrap: wrap; }
.account-chart-performance .account-chart-metric strong { overflow-wrap: anywhere; max-width: 100%; }
.account-chart-metric { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; margin: .4rem 0; }
.account-chart-metric span { color: #94a3b8; min-width: 0; }
.account-chart-metric strong { text-align: right; font-variant-numeric: tabular-nums; }
.account-chart-metric .positive { color: #10b981; }
.account-chart-metric .negative { color: #fb446a; }
.account-chart-levels small, .account-chart-levels a { display: block; margin-top: .5rem; color: #94a3b8; }
@media (max-width: 700px) { .account-chart-layout { grid-template-columns: 1fr; grid-template-rows: minmax(120px, 1fr) minmax(140px, 36%); } .account-chart-levels { border-left: 0; border-top: 1px solid #24344b; } }
@media (max-width: 600px) { .asset-chart-overlay { padding: 1vh 1vw; } .asset-chart-panel { height: 98vh; height: 98dvh; border-radius: 8px; } .asset-chart-header, .asset-chart-footer { padding: .6rem; } .asset-chart-toolbar { padding: 0 .6rem .5rem; gap: .25rem; } .asset-chart-toolbar button { padding: .4rem .5rem; } }

/* Chart quantity and collateral preview: shared desktop/mobile UI. */
.chart-trade-estimate { white-space: pre-line; padding: .65rem; margin: .55rem 0; border: 1px solid #334155; border-radius: 6px; background: #111c2d; color: #cdd6f4; font-size: .78rem; line-height: 1.65; overflow-wrap: anywhere; }
.chart-trade-estimate[hidden] { display: none; }
.chart-trade-estimate.is-profit { border-color: #047857; }
.chart-trade-estimate.is-loss { border-color: #be123c; }
.chart-trade-estimate.chart-trade-estimate-cards { white-space: normal; padding: .75rem; background: #0b1424; border-color: #2b405c; }
.chart-trade-estimate-cards .chart-estimate-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.chart-trade-estimate-cards strong { padding: 0; margin: 0; font-variant-numeric: tabular-nums; }
.chart-trade-estimate-cards .chart-estimate-heading > strong { color: #e2e8f0; font-size: .85rem; }
.chart-trade-estimate-cards .chart-estimate-side { padding: .15rem .45rem; border: 1px solid #475569; border-radius: 5px; font-weight: 700; font-size: .7rem; }
.chart-trade-estimate-cards .chart-estimate-side.is-long { color: #6ee7b7; border-color: #17644f; background: #06352d; }
.chart-trade-estimate-cards .chart-estimate-side.is-short { color: #fda4af; border-color: #7c3047; background: #3e1725; }
.chart-trade-estimate-cards .chart-estimate-caption { display: block; margin: .25rem 0 .6rem; color: #9aaac1; font-size: .68rem; }
.chart-trade-estimate-cards .chart-estimate-selection { padding: .2rem 0 .5rem; border-bottom: 1px solid #27364b; }
.chart-trade-estimate-cards .chart-estimate-row { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .2rem 0; }
.chart-trade-estimate-cards .chart-estimate-row > span { color: #a8b8ce; font-size: .72rem; }
.chart-trade-estimate-cards .chart-estimate-row > strong { color: #e2e8f0; text-align: right; font-size: .78rem; flex-shrink: 0; max-width: 55%; overflow-wrap: anywhere; }
.chart-trade-estimate-cards .chart-estimate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .7rem 0; }
.chart-trade-estimate-cards .chart-estimate-card { border: 1px solid #334155; border-left-width: 3px; border-radius: 7px; padding: .6rem; min-width: 0; background: #172237; }
.chart-trade-estimate-cards .chart-estimate-card > span { display: block; font-size: .72rem; color: #d5deeb; }
.chart-trade-estimate-cards .chart-estimate-card > strong { display: block; margin: .25rem 0; font-size: 1.05rem; line-height: 1.35; overflow-wrap: anywhere; }
.chart-trade-estimate-cards .chart-estimate-card > small { display: block; color: #a8b8ce; font-size: .65rem; line-height: 1.45; }
.chart-trade-estimate-cards .chart-estimate-tone-profit { border-color: #17644f; background: #0a2925; }
.chart-trade-estimate-cards .chart-estimate-tone-profit > strong { color: #6ee7b7; }
.chart-trade-estimate-cards .chart-estimate-tone-loss { border-color: #7c3047; background: #301a27; }
.chart-trade-estimate-cards .chart-estimate-tone-loss > strong { color: #fda4af; }
.chart-trade-estimate-cards .chart-estimate-tone-neutral > strong { color: #cbd5e1; }
.chart-trade-estimate-cards .chart-estimate-tone-margin { border-color: #806321; background: #292413; }
.chart-trade-estimate-cards .chart-estimate-tone-margin > strong { color: #fcd34d; }
.chart-trade-estimate-cards .chart-estimate-tone-notional { border-color: #155e75; background: #102938; }
.chart-trade-estimate-cards .chart-estimate-tone-notional > strong { color: #67e8f9; }
.chart-trade-estimate-cards .chart-estimate-account { border-top: 1px solid #27364b; padding-top: .5rem; }
.chart-trade-estimate-cards .chart-estimate-account > summary { color: #7dd3fc; cursor: pointer; font-size: .73rem; margin-bottom: .35rem; }
.chart-trade-estimate-cards .chart-estimate-disclaimer { display: block; color: #a8b8ce; font-size: .67rem; line-height: 1.5; margin-top: .6rem; }
.chart-trade-panel .chart-trade-summary-close { color: #fde68a; border-left: 2px solid #806321; padding-left: .5rem; font-size: .73rem; line-height: 1.6; }
.chart-trade-panel .chart-close-all { width: auto; margin: 0 0 .3rem; padding: .3rem .6rem; font-size: .75rem; }
.open-position-count { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; padding: .15rem .45rem; border: 1px solid #0891b2; border-radius: 5px; background: #083344; color: #67e8f9; font: 700 .9rem monospace; }
@media (max-width: 480px) { .chart-quick-card { padding: .7rem; } .chart-trade-estimate { font-size: .74rem; } }

/* Mobile preparation: same features and canonical trade controller. */
.chart-touch-launcher { width: 100%; min-height: 44px; margin: .5rem 0; padding: .65rem; border: 1px solid #0891b2; border-radius: 7px; background: #083344; color: #67e8f9; font: inherit; cursor: pointer; }
.chart-touch-launcher:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 768px) {
  .app-header { padding-top: env(safe-area-inset-top, 0px); }
  .sidebar { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .app-main { padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px)) !important; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .portfolio-summary-grid { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
  .modal-content { box-sizing: border-box; max-width: calc(100vw - 1rem); max-height: 90vh; max-height: 90dvh; overflow-y: auto; }
  .asset-chart-overlay { padding-top: max(.25rem, env(safe-area-inset-top, 0px)); padding-bottom: max(.25rem, env(safe-area-inset-bottom, 0px)); padding-left: max(.25rem, env(safe-area-inset-left, 0px)); padding-right: max(.25rem, env(safe-area-inset-right, 0px)); }
  .asset-chart-panel { max-height: 100%; min-height: 0; }
  .asset-chart-header { gap: .4rem; flex-wrap: wrap; }
  .asset-chart-toolbar { flex-wrap: wrap; }
  .chart-quick-overlay { padding-top: max(.5rem, env(safe-area-inset-top, 0px)); padding-bottom: max(.5rem, env(safe-area-inset-bottom, 0px)); }
  .chart-quick-card { box-sizing: border-box; width: 100%; min-width: 0; max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; }
  .asset-chart-toolbar button, .asset-chart-close, .asset-chart-fullscreen, .chart-trade-panel button, .chart-quick-dismiss, .account-chart-refresh, .menu-item, .portfolio-open-orders .portfolio-order-actions button { min-height: 44px; }
  .mobile-menu-toggle, .sidebar-close-btn, .refresh-btn, .asset-chart-trigger, .add-portfolio-btn { min-width: 44px !important; min-height: 44px !important; }
  .chart-trade-panel input, .chart-trade-panel select, .form-control, #global-search, .timeframe-select-wrapper select { font-size: 16px !important; min-height: 44px; }
  .chart-quick-card button { white-space: normal; overflow-wrap: anywhere; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .account-chart-layout { grid-template-columns: minmax(0, 1fr) minmax(180px, 34%); grid-template-rows: minmax(0, 1fr); }
  .account-chart-levels { border-top: 0; border-left: 1px solid #24344b; }
}
