/* ==========================================================================
   APEXSIGNAL PRO • TELEGRAM MINI APP STYLESHEET
   Cyber-Trading Obsidian Glassmorphism Theme
   ========================================================================== */

:root {
  --bg-primary: #070a13;
  --bg-secondary: #0d1424;
  --bg-card: rgba(16, 24, 40, 0.75);
  --bg-card-hover: rgba(23, 34, 56, 0.85);
  --bg-input: #0a0f1d;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 242, 254, 0.4);
  --border-glow: rgba(0, 242, 254, 0.2);

  --accent-cyan: #00f2fe;
  --accent-cyan-rgb: 0, 242, 254;
  --accent-blue: #4facfe;
  --accent-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);

  --color-buy: #00e676;
  --color-buy-bg: rgba(0, 230, 118, 0.12);
  --color-buy-border: rgba(0, 230, 118, 0.3);

  --color-sell: #ff3366;
  --color-sell-bg: rgba(255, 51, 102, 0.12);
  --color-sell-border: rgba(255, 51, 102, 0.3);

  --color-warning: #ffb703;
  --color-warning-bg: rgba(255, 183, 3, 0.12);

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-neon: 0 0 20px rgba(0, 242, 254, 0.35);
}

/* Telegram Dynamic Theme Overrides if present */
body.telegram-theme {
  --bg-primary: var(--tg-theme-bg-color, #070a13);
  --text-main: var(--tg-theme-text-color, #f8fafc);
  --text-muted: var(--tg-theme-hint-color, #64748b);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow blobs */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}
.glow-top-left {
  width: 280px;
  height: 280px;
  background: var(--accent-cyan);
  top: -60px;
  left: -80px;
}
.glow-bottom-right {
  width: 320px;
  height: 320px;
  background: #7928ca;
  bottom: -60px;
  right: -80px;
}

/* Typography utilities */
.font-mono {
  font-family: var(--font-mono);
}
.text-success { color: var(--color-buy) !important; }
.text-danger { color: var(--color-sell) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-accent { color: var(--accent-cyan) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Main Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
}

/* ==================== APP HEADER ==================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 12px 18px;
  position: sticky;
  top: 0;
  background: rgba(7, 10, 19, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 50;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 2px;
}
.live-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-buy);
  border-radius: 50%;
}
.live-dot.pulse {
  animation: pulse-glow 2s infinite ease-in-out;
}
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.6); }
  50% { transform: scale(1.2); opacity: 0.8; box-shadow: 0 0 0 5px rgba(0, 230, 118, 0); }
}
.badge-text {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-buy);
  letter-spacing: 0.5px;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}
.brand-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-toggle-btn {
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
  padding: 5px 9px;
  border-radius: var(--radius-md);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.lang-toggle-btn:hover {
  background: var(--accent-cyan);
  color: #000;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.icon-btn:hover {
  color: var(--accent-cyan);
  border-color: var(--border-active);
  transform: translateY(-1px);
}
.icon-btn.spinning .refresh-icon {
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px 4px 5px;
  border-radius: var(--radius-full);
}
.user-avatar {
  width: 24px;
  height: 24px;
  background: var(--accent-gradient);
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.user-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== TICKER STATS BANNER ==================== */
.market-ticker-banner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--bg-secondary);
  margin: 12px 16px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.ticker-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.stat-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}
.timer-highlight {
  color: var(--accent-cyan);
}
.ticker-divider {
  width: 1px;
  height: 24px;
  background: var(--border-subtle);
}

/* ==================== BTC MACRO REGIME BAR ==================== */
.btc-regime-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(255, 183, 3, 0.08) 0%, rgba(16, 24, 40, 0.6) 100%);
  border: 1px solid rgba(255, 183, 3, 0.25);
  margin: 0 16px 14px 16px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
}
.regime-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.regime-crown {
  font-size: 1.1rem;
}
.regime-text {
  display: flex;
  flex-direction: column;
}
.regime-title {
  font-size: 0.62rem;
  color: var(--color-warning);
  font-weight: 700;
  letter-spacing: 0.5px;
}
.regime-status {
  font-size: 0.75rem;
  color: #fff;
  font-weight: 600;
}
.regime-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  white-space: nowrap;
}

/* Signal Confluence Badges & Break-Even Banner */
.confluence-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.confluence-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.confluence-tag.tag-mtf {
  color: var(--accent-cyan);
  border-color: rgba(0, 242, 254, 0.3);
  background: rgba(0, 242, 254, 0.08);
}
.confluence-tag.tag-vol {
  color: var(--color-warning);
  border-color: rgba(255, 183, 3, 0.3);
  background: rgba(255, 183, 3, 0.08);
}
.confluence-tag.tag-div {
  color: #d946ef;
  border-color: rgba(217, 70, 239, 0.3);
  background: rgba(217, 70, 239, 0.08);
}

.break-even-banner {
  background: rgba(0, 242, 254, 0.06);
  border-left: 3px solid var(--accent-cyan);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.68rem;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.be-icon {
  font-size: 0.85rem;
}

/* ==================== NAVIGATION TABS ==================== */
.nav-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 0 16px;
  margin-bottom: 14px;
}
.nav-tab {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 10px 4px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-tab:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}
.nav-tab.active {
  background: linear-gradient(180deg, rgba(0, 242, 254, 0.12) 0%, rgba(16, 24, 40, 0.8) 100%);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.15);
}
.tab-icon {
  font-size: 1.15rem;
}
.tab-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.tab-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  background: var(--color-sell);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

/* ==================== MAIN CONTENT PANELS ==================== */
.tab-content-area {
  padding: 0 16px;
  flex: 1;
}
.tab-panel {
  display: none;
  animation: fadeIn 0.25s ease-out;
}
.tab-panel.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar {
  display: none;
}
.filter-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-chip.active {
  background: var(--accent-cyan);
  color: #050811;
  border-color: var(--accent-cyan);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 242, 254, 0.3);
}

/* ==================== SIGNAL CARDS ==================== */
.signals-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.signal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  cursor: pointer;
}
.signal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}
.signal-card.card-buy {
  border-left: 4px solid var(--color-buy);
}
.signal-card.card-sell {
  border-left: 4px solid var(--color-sell);
}

.signal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.pair-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.coin-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  border: 1px solid var(--border-subtle);
}
.pair-names h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.pair-names span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.signal-direction-badge {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-buy {
  background: var(--color-buy-bg);
  color: var(--color-buy);
  border: 1px solid var(--color-buy-border);
}
.badge-sell {
  background: var(--color-sell-bg);
  color: var(--color-sell);
  border: 1px solid var(--color-sell-border);
}

/* Pricing Grid */
.pricing-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-input);
  padding: 12px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}
.price-box {
  display: flex;
  flex-direction: column;
}
.price-box.box-full {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  margin-top: 4px;
}
.p-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 2px;
}
.p-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

/* Target progression badges */
.targets-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 12px;
}
.target-chip {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px;
  text-align: center;
}
.target-chip .tp-title {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
}
.target-chip .tp-price {
  font-size: 0.78rem;
  font-weight: 700;
}

/* Confluence & footer tags */
.card-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  font-size: 0.72rem;
}
.confidence-meter {
  display: flex;
  align-items: center;
  gap: 6px;
}
.meter-bar {
  width: 45px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
}
.card-action-links {
  display: flex;
  gap: 8px;
}
.card-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card-btn:hover {
  background: var(--accent-cyan);
  color: #050811;
  border-color: var(--accent-cyan);
}

/* ==================== TOP 25 SCREENER ==================== */
.screener-controls {
  margin-bottom: 12px;
}
.search-input-wrapper {
  position: relative;
  margin-bottom: 10px;
}
.search-svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.search-input-wrapper input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px 10px 36px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s;
}
.search-input-wrapper input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.15);
}

.screener-sort-chips {
  display: flex;
  gap: 8px;
}
.sort-chip {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.sort-chip.active {
  background: var(--bg-card);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.top25-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.coin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}
.coin-row:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}
.coin-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.coin-rank {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 20px;
}
.coin-avatar-mini {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}
.coin-info-text .c-symbol {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}
.coin-info-text .c-name {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.coin-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.coin-price {
  font-size: 0.92rem;
  font-weight: 700;
}
.coin-change-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
}
.pill-up {
  background: var(--color-buy-bg);
  color: var(--color-buy);
}
.pill-down {
  background: var(--color-sell-bg);
  color: var(--color-sell);
}

.rsi-pill {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==================== CALCULATOR ==================== */
.calc-card, .bot-control-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}
.badge-subtle {
  font-size: 0.68rem;
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.calc-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.form-group input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  outline: none;
}
.form-group input:focus {
  border-color: var(--accent-cyan);
}

.btn-primary-action {
  background: var(--accent-gradient);
  color: #050811;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.2s;
}
.btn-primary-action:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-neon);
}

.calc-results-box {
  margin-top: 18px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}
.result-item.highlight {
  border-top: 1px dashed var(--border-subtle);
  border-bottom: 1px dashed var(--border-subtle);
  padding: 8px 0;
}
.r-label {
  color: var(--text-secondary);
}
.r-val {
  font-weight: 700;
}

/* ==================== BOT SETTINGS & BROADCAST ==================== */
.bot-status-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}
.bot-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2) 0%, rgba(121, 40, 202, 0.2) 100%);
  border: 1px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.bot-info-meta h4 {
  font-size: 1rem;
  font-weight: 700;
}

.bot-settings-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}
.setting-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.s-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}
.s-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}
.s-input-inline {
  display: flex;
  gap: 8px;
}
.s-input-inline input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: #fff;
  font-size: 0.8rem;
  outline: none;
}
.btn-sm {
  background: var(--accent-cyan);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.s-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.broadcast-action-box {
  background: rgba(0, 242, 254, 0.05);
  border: 1px dashed var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}
.broadcast-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 6px 0 14px 0;
}
.btn-broadcast-trigger {
  background: linear-gradient(135deg, #00f2fe 0%, #00e676 100%);
  color: #050811;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 0.85rem;
  font-weight: 800;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-broadcast-trigger:hover {
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
}
.broadcast-status-msg {
  font-size: 0.78rem;
  margin-top: 10px;
  font-weight: 600;
}

/* ==================== LOADING & EMPTY STATES ==================== */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.82rem;
  gap: 12px;
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ==================== MODAL OVERLAY ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}
.modal-dialog {
  background: #0d1424;
  border-top: 1px solid var(--border-active);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px;
  animation: slideUp 0.25s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Toast */
.app-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(16, 24, 40, 0.95);
  border: 1px solid var(--accent-cyan);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 200;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}
.app-toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ==================== FEAR & GREED STRIP ==================== */
.fng-strip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin: 0 16px 14px 16px;
  padding: 8px 12px;
}
.fng-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.fng-icon {
  font-size: 0.95rem;
}
.fng-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
}
.fng-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}
.fng-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(0, 230, 118, 0.15);
  color: var(--color-buy);
}
.fng-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.fng-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff3366 0%, #ffb703 50%, #00e676 100%);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== SIGNAL STATUS PILLS ==================== */
.status-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}
.status-pill.status-active {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
}
.status-pill.status-tp1, .status-pill.status-tp2, .status-pill.status-tp3 {
  background: rgba(0, 230, 118, 0.15);
  color: var(--color-buy);
  border: 1px solid rgba(0, 230, 118, 0.4);
}
.status-pill.status-sl {
  background: rgba(255, 51, 102, 0.15);
  color: var(--color-sell);
  border: 1px solid rgba(255, 51, 102, 0.4);
}

/* ==================== PERFORMANCE LEDGER ==================== */
.stats-dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.stats-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 20px 0;
}
.metric-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.m-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.m-val {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 4px 0 2px 0;
}
.m-sub {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.trade-log-section h4 {
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.trade-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trade-log-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  border-radius: var(--radius-md);
}
.tl-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tl-pair {
  font-weight: 700;
  font-size: 0.85rem;
}
.tl-time {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.tl-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tl-pnl {
  font-size: 0.85rem;
  font-weight: 800;
}

/* ==================== TRADINGVIEW CHART MODAL ==================== */
.chart-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 150;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.chart-modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}
.chart-modal-dialog {
  background: #090e1a;
  border-top: 1px solid var(--accent-cyan);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 540px;
  height: 82vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
  animation: slideUp 0.25s ease-out;
}
.chart-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}
.c-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.c-header-left h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}
.chart-price-ticker {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-cyan);
}
.chart-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.chart-levels-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
}
.chart-levels-strip::-webkit-scrollbar {
  display: none;
}
.lvl-chip {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.chip-entry {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.4);
}
.chip-tp {
  background: rgba(0, 230, 118, 0.15);
  color: var(--color-buy);
  border: 1px solid rgba(0, 230, 118, 0.4);
}
.chip-sl {
  background: rgba(255, 51, 102, 0.15);
  color: var(--color-sell);
  border: 1px solid rgba(255, 51, 102, 0.4);
}

.chart-container-wrapper {
  flex: 1;
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 6px;
  background: #000;
}

/* ==================== BREAKING NEWS TICKER ==================== */
.news-ticker-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, rgba(255, 51, 102, 0.1) 0%, rgba(16, 24, 40, 0.7) 100%);
  border: 1px solid rgba(255, 51, 102, 0.25);
  margin: 0 16px 14px 16px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.news-ticker-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 51, 102, 0.2);
  color: var(--color-sell);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.news-ticker-content {
  flex: 1;
  font-size: 0.73rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.news-badge-impact {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}


