/* SweetexAI Modern Interface — dark-first, responsive and motion-aware. */
:root {
  --bg: #06080d;
  --surface: #0d121b;
  --surface-2: #121925;
  --card: rgba(15, 21, 31, .86);
  --card-solid: #0f151f;
  --border: rgba(157, 178, 209, .14);
  --border-strong: rgba(131, 219, 255, .28);
  --primary: #63ddff;
  --primary-hover: #35c9f2;
  --active: #5188ff;
  --accent: #8d83ff;
  --emerald: #2dd4a8;
  --text: #f4f8ff;
  --muted: #8e9aaf;
  --subtle: #647087;
  --up: #2dd4a8;
  --success: #21c790;
  --down: #ff6577;
  --danger: #ed4e63;
  --warning: #f6c85f;
  --purple: #8d83ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
  --soft-shadow: 0 14px 35px rgba(0, 0, 0, .2);
  --focus: 0 0 0 4px rgba(99, 221, 255, .13);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

html { background: var(--bg); scroll-behavior: smooth; }
body {
  color: var(--text);
  background:
    radial-gradient(circle at 8% -10%, rgba(81, 136, 255, .14), transparent 32rem),
    radial-gradient(circle at 102% 10%, rgba(45, 212, 168, .08), transparent 28rem),
    var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body::selection { color: #031118; background: #83e8ff; }
a { color: var(--primary); transition: color .2s ease, opacity .2s ease; }
a:hover { color: #a9edff; }

/* Ambient depth */
.app-body::before,
.auth-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(147, 175, 215, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 175, 215, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

/* Brand and shared controls */
.brand { gap: 12px; font-size: 19px; letter-spacing: -.55px; }
.brand-logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(99, 221, 255, .28);
  border-radius: 13px;
  background: #101824;
  box-shadow: 0 10px 28px rgba(54, 190, 231, .12);
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.eyebrow { color: #728098; letter-spacing: 1.55px; }
.status-badge {
  border: 1px solid currentColor;
  padding: 6px 10px;
  background: transparent;
  opacity: .9;
}
.status-live { color: #5de0b8; background: rgba(45, 212, 168, .07); border-color: rgba(45, 212, 168, .24); }
.status-analyzing { color: #8de7ff; background: rgba(99, 221, 255, .07); border-color: rgba(99, 221, 255, .22); }
.status-offline { color: #ff8795; background: rgba(255, 101, 119, .07); border-color: rgba(255, 101, 119, .22); }

.btn {
  min-height: 44px;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 13px;
  letter-spacing: -.1px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.16), transparent 65%);
  transform: translateX(-120%);
  transition: transform .55s ease;
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.985); }
.btn-primary {
  color: #031117;
  background: linear-gradient(135deg, #8beaff, #4ed6fb 52%, #77a0ff);
  border-color: rgba(171, 238, 255, .38);
  box-shadow: 0 13px 30px rgba(54, 190, 231, .17);
}
.btn-primary:hover { color: #020b10; background: linear-gradient(135deg, #a4eeff, #61dcff 52%, #8aabff); box-shadow: 0 17px 38px rgba(54, 190, 231, .24); }
.btn-secondary { color: #d9e4f4; background: #141c28; border-color: var(--border); }
.btn-secondary:hover { background: #1a2432; border-color: rgba(99, 221, 255, .24); }
.btn-success { color: #03120e; background: #38d9ae; }
.btn-danger { background: #ef5b70; }
.btn-warning { color: #171004; background: #f6c85f; }
.icon-btn {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(18, 25, 37, .82);
  color: #b9c6d9;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.icon-btn:hover { color: var(--primary); border-color: rgba(99, 221, 255, .32); background: #151f2c; transform: translateY(-1px); }

input, select, textarea { accent-color: var(--primary); }
.form-stack input,
.search-form input,
.inline-form input,
.inline-form select,
.live-field select,
.future-field input,
.future-field select,
.checker-field input,
.checker-field textarea,
.mm-field input,
.mm-field select {
  color: var(--text);
  border-color: var(--border);
  border-radius: 13px;
  background: rgba(6, 10, 16, .72);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.form-stack input:hover,
.live-field select:hover,
.future-field input:hover,
.future-field select:hover,
.checker-field textarea:hover,
.mm-field input:hover,
.mm-field select:hover { border-color: rgba(152, 173, 205, .28); }
.form-stack input:focus,
.search-form input:focus,
.inline-form input:focus,
.inline-form select:focus,
.live-field select:focus,
.future-field input:focus,
.future-field select:focus,
.checker-field input:focus,
.checker-field textarea:focus,
.mm-field input:focus,
.mm-field select:focus {
  border-color: rgba(99, 221, 255, .65);
  background: rgba(8, 13, 20, .94);
  box-shadow: var(--focus);
}

/* Authentication */
.auth-shell { background: transparent; }
.auth-visual {
  border-right: 1px solid var(--border);
  background:
    radial-gradient(circle at 18% 20%, rgba(99, 221, 255, .12), transparent 20rem),
    radial-gradient(circle at 82% 72%, rgba(81, 136, 255, .17), transparent 24rem),
    linear-gradient(145deg, #070b11, #09111c 64%, #071820);
}
.auth-visual::after {
  content: "AI";
  position: absolute;
  right: -2vw;
  bottom: 4vh;
  font-size: clamp(170px, 22vw, 360px);
  line-height: .72;
  font-weight: 950;
  letter-spacing: -26px;
  color: rgba(177, 225, 255, .025);
  pointer-events: none;
}
.visual-grid { opacity: .46; background-size: 64px 64px; }
.auth-copy h1 {
  max-width: 680px;
  font-size: clamp(44px, 5vw, 74px);
  line-height: 1.01;
  letter-spacing: -4.2px;
  background: linear-gradient(120deg, #fff 12%, #bceeff 58%, #9aa8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-copy p { color: #9cabc0; }
.visual-stats { gap: 12px; }
.visual-stats div {
  border-color: var(--border);
  border-radius: 15px;
  background: rgba(9, 15, 23, .64);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}
.visual-stats strong { color: #eef8ff; }
.auth-panel {
  position: relative;
  background:
    radial-gradient(circle at 100% 0, rgba(81, 136, 255, .12), transparent 24rem),
    #080b12;
}
.auth-card {
  width: min(100%, 450px);
  border: 1px solid rgba(139, 162, 198, .18);
  border-radius: 26px;
  background: rgba(14, 19, 29, .82);
  box-shadow: 0 35px 90px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.045);
  backdrop-filter: blur(22px);
}
.auth-card::before {
  content: "";
  position: absolute;
  width: 34%;
  height: 1px;
  top: -1px;
  left: 10%;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.auth-heading h2 { font-size: 32px; letter-spacing: -1.25px; }
.auth-heading p, .auth-switch, .divider { color: var(--muted); }
.password-field button { color: var(--primary); }
.single-auth { background: radial-gradient(circle at 50% 0, rgba(81,136,255,.13), transparent 28rem), var(--bg); }
.sweetex-auth-badge {
  position: absolute;
  left: 22px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(11, 18, 27, .76);
  backdrop-filter: blur(14px);
}
.sweetex-auth-badge img { width: 38px; height: 38px; object-fit: cover; border-radius: 10px; }
.sweetex-auth-badge small, .sweetex-auth-badge strong { display: block; }
.sweetex-auth-badge small { color: var(--subtle); font-size: 8px; text-transform: uppercase; letter-spacing: .8px; }
.sweetex-auth-badge strong { margin-top: 3px; color: #dce8f7; font-size: 10px; }

/* App shell and navigation */
.sidebar {
  width: 264px;
  padding: 20px 13px;
  border-right: 1px solid var(--border);
  background: rgba(8, 12, 18, .92);
  box-shadow: 14px 0 42px rgba(0, 0, 0, .16);
  backdrop-filter: blur(22px);
}
.sidebar .brand { padding: 2px 11px 21px; }
.side-nav { gap: 4px; }
.side-nav-item { position: relative; }
.side-link {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #8491a6;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.side-link:hover { color: #dbe8f8; background: rgba(20, 29, 42, .72); transform: translateX(2px); }
.side-link.active,
.side-nav-item.active .side-link {
  color: #effbff;
  border-color: rgba(99, 221, 255, .18);
  background: linear-gradient(90deg, rgba(99, 221, 255, .12), rgba(81, 136, 255, .06));
  box-shadow: inset 3px 0 #63ddff, 0 10px 25px rgba(0,0,0,.09);
}
.side-icon { width: 20px; }
.side-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-bottom { border-color: var(--border); }
.side-logout-icon { color: #ff8392; }
.side-admin-item .side-link { color: #b9b3ff; }
.sweetex-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 2px 10px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(16, 24, 35, .72);
}
.sweetex-badge img { width: 35px; height: 35px; object-fit: cover; border-radius: 9px; }
.sweetex-badge small, .sweetex-badge strong { display: block; }
.sweetex-badge small { color: var(--subtle); font-size: 7px; text-transform: uppercase; letter-spacing: .75px; }
.sweetex-badge strong { margin-top: 3px; color: #dce6f5; font-size: 10px; }
.app-shell { margin-left: 264px; }
.topbar {
  height: 82px;
  padding: 0 28px;
  border-color: var(--border);
  background: rgba(6, 9, 14, .78);
  backdrop-filter: blur(24px) saturate(1.25);
}
.topbar h1 { font-size: 21px; letter-spacing: -.6px; }
.topbar-actions { gap: 9px; }
.sweetex-topbar { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 12px; background: rgba(15,22,32,.72); }
.sweetex-topbar img { width: 30px; height: 30px; object-fit: cover; border-radius: 8px; }
.sweetex-topbar small, .sweetex-topbar strong { display: block; }
.sweetex-topbar small { color: var(--subtle); font-size: 7px; letter-spacing: .8px; }
.sweetex-topbar strong { margin-top: 2px; font-size: 10px; color: #dbe7f5; }
.credit-pill { border-color: rgba(99,221,255,.17); border-radius: 12px; background: rgba(99,221,255,.06); }
.credit-pill strong { color: var(--primary); }
.user-chip { border: 1px solid transparent; color: var(--text); transition: border-color .2s ease, background .2s ease; }
.user-chip:hover, .user-chip:focus-visible { border-color: var(--border); background: rgba(18, 26, 38, .82); outline: 0; }
.avatar, .profile-avatar-large { overflow: hidden; border: 1px solid rgba(99,221,255,.22); background: #121b27; }
.avatar img, .profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.page-content { max-width: 1540px; padding: 30px 32px 46px; }

/* Theme toggle */
.theme-toggle { position: relative; display: grid; place-items: center; }
.theme-icon { position: absolute; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; transition: opacity .2s ease, transform .3s ease; }
.theme-icon-moon { opacity: 0; transform: rotate(-35deg) scale(.65); }
[data-theme="light"] .theme-icon-sun { opacity: 0; transform: rotate(35deg) scale(.65); }
[data-theme="light"] .theme-icon-moon { opacity: 1; transform: rotate(0) scale(1); }
.theme-toggle-auth { position: fixed; right: 18px; top: 16px; z-index: 20; }

/* Shared card surfaces */
.welcome-card,
.feature-card,
.module-card,
.admin-card,
.live-control-card,
.live-result-card,
.chart-upload-card,
.chart-result-card,
.future-control-card,
.future-result-card,
.checker-control-card,
.checker-result-card,
.news-control-card,
.news-result-card,
.mm-panel,
.mm-next-card,
.mm-metrics article,
.bp-control-card,
.bp-result-card {
  border-color: var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(17,24,35,.92), rgba(11,16,24,.92));
  box-shadow: var(--soft-shadow), inset 0 1px rgba(255,255,255,.035);
}
.live-control-card,
.chart-upload-card,
.future-control-card,
.checker-control-card,
.news-control-card,
.bp-control-card { position: relative; overflow: hidden; }
.live-control-card::before,
.chart-upload-card::before,
.future-control-card::before,
.checker-control-card::before,
.news-control-card::before,
.bp-control-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,221,255,.72), transparent 70%);
}
.live-control-head,
.future-control-head,
.news-control-head,
.checker-card-head,
.bp-control-head { border-color: var(--border); }
.live-control-head h2,
.future-control-head h2,
.news-control-head h2,
.checker-card-head h2,
.bp-control-head h2 { letter-spacing: -.8px; }
.live-control-head p,
.future-control-head p,
.news-control-head p,
.checker-card-head p,
.bp-control-head p { color: var(--muted); }
.signal-orb,
.future-orb,
.checker-orb,
.news-orb,
.bp-orb,
.chart-upload-icon,
.live-empty-icon,
.future-empty-icon,
.news-empty-icon {
  color: var(--primary);
  border: 1px solid rgba(99,221,255,.2);
  background: linear-gradient(145deg, rgba(99,221,255,.1), rgba(81,136,255,.07));
  box-shadow: inset 0 1px rgba(255,255,255,.06);
}
.live-result-card,
.chart-result-card,
.future-result-card,
.checker-result-card,
.news-result-card,
.bp-result-card { background: rgba(11, 16, 24, .82); }
.live-empty-result,
.future-empty-result,
.news-empty-state,
.checker-empty { color: var(--muted); }
.signal-result-head,
.future-result-head,
.news-result-head,
.checker-result-head,
.bp-result-head { border-color: var(--border); }
.signal-ready-badge,
.checker-ready,
.dashboard-online-pill { color: #62e3bb; border: 1px solid rgba(45,212,168,.22); background: rgba(45,212,168,.07); }

/* Result visualization */
.direction-panel {
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(8, 13, 20, .7);
}
.direction-panel.direction-up { color: #26d20b; border-color: rgba(38,210,11,.42); background: linear-gradient(135deg,rgba(31,191,0,.18),rgba(7,24,9,.86)); box-shadow: inset 0 1px rgba(255,255,255,.035),0 16px 38px rgba(31,191,0,.08); }
.direction-up .direction-icon, .direction-up .direction-copy strong { color: #26d20b; }
.direction-panel.direction-down { color: #e34a3d; border-color: rgba(227,74,61,.44); background: linear-gradient(135deg,rgba(211,63,50,.2),rgba(30,9,10,.86)); box-shadow: inset 0 1px rgba(255,255,255,.035),0 16px 38px rgba(211,63,50,.09); }
.direction-down .direction-icon, .direction-down .direction-copy strong { color: #e34a3d; }
.direction-wait, .direction-null { border-color: rgba(246,200,95,.25); background: rgba(246,200,95,.06); }
.strength-card,
.signal-metric-grid article,
.future-result-stats,
.news-info-grid article,
.checker-stats,
.bp-info-grid article { border-color: var(--border); background: rgba(7, 11, 17, .58); }
.strength-track,
.news-strength-bar,
.bp-score-bar { background: rgba(128, 150, 182, .13); }
.strength-fill,
.news-strength-bar i,
.bp-score-bar i { background: linear-gradient(90deg, #5188ff, #63ddff 52%, #2dd4a8); box-shadow: 0 0 16px rgba(99,221,255,.22); }
.future-signal-item,
.news-signal-item,
.checker-result-item,
.bp-ranking-item,
.selected-pair-chip { border-color: var(--border); background: rgba(7, 11, 17, .62); transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.future-signal-item:hover,
.news-signal-item:hover,
.checker-result-item:hover,
.bp-ranking-item:hover { transform: translateY(-2px); border-color: rgba(99,221,255,.23); background: rgba(13,21,31,.9); }
.future-direction-call, .news-direction-call { color: #58dfb7; border-color: rgba(45,212,168,.24); background: rgba(45,212,168,.08); }
.future-direction-put, .news-direction-put { color: #ff8291; border-color: rgba(255,101,119,.22); background: rgba(255,101,119,.07); }
.checker-status-win, .checker-status-mtg_win { border-color: rgba(45,212,168,.25); }
.checker-status-loss { border-color: rgba(255,101,119,.24); }
.checker-status-pending { border-color: rgba(246,200,95,.22); }
.logic-block { border-color: var(--border); background: rgba(6,10,16,.68); }

/* Premium signal result shared by Live, Chart Analyser and Algorithmic Signal */
.premium-result-shell { position: relative; }
.premium-result-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -26px -26px auto;
  height: 155px;
  pointer-events: none;
  background: radial-gradient(circle at 24% 0,rgba(99,221,255,.07),transparent 52%), linear-gradient(180deg,rgba(81,136,255,.035),transparent);
}
.premium-result-shell .signal-result-head { padding: 3px 2px 20px; }
.premium-result-shell .signal-result-head h2 { margin-top: 9px; font-size: clamp(28px,2.2vw,34px); letter-spacing: -1.25px; }
.premium-result-shell .signal-ready-badge { gap: 7px; padding: 8px 11px; box-shadow: inset 0 1px rgba(255,255,255,.04), 0 8px 24px rgba(45,212,168,.06); }
.premium-result-shell .signal-ready-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(45,212,168,.09), 0 0 12px currentColor; }
.premium-result-shell .direction-panel { justify-content: space-between; margin-top: 18px; padding: 20px 22px; border-radius: 20px; isolation: isolate; box-shadow: inset 0 1px rgba(255,255,255,.035),0 15px 36px rgba(0,0,0,.12); }
.premium-result-shell .direction-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(90deg,#000,transparent 76%); }
.premium-result-shell .direction-panel > * { position: relative; z-index: 1; }
.direction-main { min-width: 0; display: flex; align-items: center; gap: 17px; }
.direction-icon-wrap { position: relative; flex: 0 0 auto; }
.direction-pulse { position: absolute; inset: -5px; border: 1px solid currentColor; border-radius: 24px; opacity: .13; animation: direction-breathe 2.5s ease-in-out infinite; }
.premium-result-shell .direction-icon { width: 70px; height: 70px; border-radius: 20px; background: radial-gradient(circle at 36% 24%,rgba(255,255,255,.09),transparent 27%),linear-gradient(145deg,rgba(18,27,38,.92),rgba(3,7,12,.86)); box-shadow: inset 1px 1px rgba(255,255,255,.08),inset -5px -7px 14px rgba(0,0,0,.28),0 13px 30px rgba(0,0,0,.22); perspective: 180px; }
.direction-arrow-3d { width: 52px; height: 52px; display: grid; place-items: center; animation: direction-arrow-float 2.4s ease-in-out infinite; }
.direction-arrow-3d svg { width: 50px; height: 50px; overflow: visible; transition: transform .35s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 8px 6px rgba(0,0,0,.36)) drop-shadow(0 0 8px currentColor); }
.direction-arrow-depth { fill: rgba(0,0,0,.58); transform: translateY(2px); }
.direction-arrow-face { fill: currentColor; stroke: rgba(255,255,255,.3); stroke-width: .75; }
.direction-arrow-shine { fill: none; stroke: rgba(255,255,255,.62); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.direction-down .direction-arrow-3d svg { transform: rotate(180deg); }
.direction-neutral-symbol { display: none; font-size: 30px; font-weight: 900; }
.direction-wait .direction-arrow-3d, .direction-null .direction-arrow-3d { display: none; }
.direction-wait .direction-neutral-symbol, .direction-null .direction-neutral-symbol { display: block; }
.premium-result-shell .direction-copy span { color: #c7d3e4; letter-spacing: 1.25px; }
.premium-result-shell .direction-copy strong { font-size: 37px; letter-spacing: -.5px; text-shadow: 0 0 24px currentColor; }
.premium-result-shell .direction-copy small { opacity: .9; }
.direction-market-visual { width: 178px; min-height: 68px; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid currentColor; border-radius: 15px; background: rgba(2,7,12,.25); opacity: .82; box-shadow: inset 0 1px rgba(255,255,255,.025); }
.direction-mini-meta { display: grid; gap: 3px; padding-right: 11px; border-right: 1px solid currentColor; }
.direction-mini-meta span { color: #a7b5c8; font-size: 7px; font-weight: 900; letter-spacing: 1px; }
.direction-mini-meta strong { color: currentColor; font-size: 16px; line-height: 1; }
.direction-market-visual svg { width: 100%; overflow: visible; fill: currentColor; }
.direction-chart-grid { fill: none; stroke: currentColor; stroke-width: .7; opacity: .16; }
.direction-candles { display: none; filter: drop-shadow(0 0 3px rgba(255,255,255,.08)); }
.direction-up .direction-candles-up, .direction-down .direction-candles-down { display: block; }
.direction-candles path { fill: none; stroke-width: 1.15; shape-rendering: geometricPrecision; }
.direction-candles path.candle-up { stroke: #21c900; }
.direction-candles path.candle-down { stroke: #e34a3d; }
.direction-candles rect.candle-up { fill: #21c900; }
.direction-candles rect.candle-down { fill: #e34a3d; }
.direction-up .direction-market-visual { color: #26d20b; border-color: rgba(38,210,11,.27); }
.direction-down .direction-market-visual { color: #e34a3d; border-color: rgba(227,74,61,.28); }
.direction-wait .direction-market-visual, .direction-null .direction-market-visual { color: #cbd5e1; border-color: rgba(203,213,225,.18); }
@keyframes direction-breathe { 50% { transform: scale(1.045); opacity: .3; } }
@keyframes direction-arrow-float { 50% { transform: translateY(-2px); } }
.signal-quality-panel { display: grid; gap: 11px; margin-top: 12px; }
.signal-quality-panel .strength-card { margin: 0; padding: 16px 17px; border-radius: 16px; background: linear-gradient(145deg,rgba(10,16,24,.8),rgba(6,10,16,.68)); box-shadow: inset 0 1px rgba(255,255,255,.025); }
.signal-strength-label { display: flex !important; align-items: center; gap: 9px; color: #aebed3 !important; }
.signal-strength-label b { font-size: 10px; font-weight: 900; letter-spacing: .9px; }
.signal-strength-icon, .signal-metric-icon { display: grid; place-items: center; flex: 0 0 auto; border: 1px solid currentColor; }
.signal-strength-icon { width: 29px; height: 29px; border-radius: 9px; color: #63ddff; background: rgba(99,221,255,.07); }
.signal-strength-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.signal-quality-panel .strength-heading strong { font-size: 16px; }
.signal-quality-panel .strength-track { height: 8px; margin-top: 12px; }
.signal-quality-panel .signal-metric-grid { gap: 10px; margin: 0; }
.signal-metric-grid .signal-metric { position: relative; min-height: 104px; padding: 14px; overflow: hidden; border-radius: 16px; background: linear-gradient(145deg,rgba(10,16,24,.86),rgba(6,10,16,.65)); box-shadow: inset 0 1px rgba(255,255,255,.025); transition: transform .2s ease,border-color .2s ease,background .2s ease; }
.signal-metric-grid .signal-metric::after { content: ""; position: absolute; width: 74px; height: 74px; right: -34px; bottom: -38px; border-radius: 50%; background: currentColor; opacity: .035; pointer-events: none; }
.signal-metric-grid .signal-metric:hover { transform: translateY(-2px); border-color: color-mix(in srgb,currentColor 28%,transparent); background: linear-gradient(145deg,rgba(14,22,32,.93),rgba(7,12,18,.76)); }
.signal-metric-label { display: flex; align-items: center; gap: 9px; }
.signal-metric-label > span { color: #91a1b7 !important; }
.signal-metric-icon { width: 34px; height: 34px; border-radius: 10px; }
.signal-metric-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.signal-metric-grid .signal-metric > strong { margin-top: 14px; font-size: 19px; line-height: 1.1; }
.signal-metric-trend { color: #63ddff; }
.signal-metric-trend .signal-metric-icon { background: rgba(99,221,255,.075); border-color: rgba(99,221,255,.24); }
.signal-metric-support { color: #45d9aa; }
.signal-metric-support .signal-metric-icon { background: rgba(45,212,168,.075); border-color: rgba(45,212,168,.24); }
.signal-metric-resistance { color: #a99cff; }
.signal-metric-resistance .signal-metric-icon { background: rgba(139,124,246,.085); border-color: rgba(169,156,255,.25); }
.signal-metric-trap { color: #f6c85f; }
.signal-metric-trap .signal-metric-icon { background: rgba(246,200,95,.075); border-color: rgba(246,200,95,.24); }
.premium-result-shell .live-result-actions, .premium-result-shell .chart-result-actions { margin-top: 15px; padding-top: 15px; }
.premium-result-shell .live-result-actions .btn, .premium-result-shell .chart-result-actions .btn { min-height: 46px; }
.premium-result-shell .chart-result-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
.signal-logic-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 238px; border-color: rgba(246,200,95,.17); background: linear-gradient(135deg,rgba(246,200,95,.065),rgba(255,101,119,.04)); }
.signal-logic-button > svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: #f6c85f; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.signal-logic-button > span { line-height: 1; }
.signal-logic-button > i { color: var(--muted); font-style: normal; transition: transform .2s ease,color .2s ease; }
.signal-logic-button:hover > i { color: var(--primary); transform: translateX(3px); }

/* Pair imagery and selectors */
.market-icon-stack { position: relative; display: inline-flex; width: 39px; height: 28px; flex: 0 0 auto; vertical-align: middle; }
.market-icon-stack img { position: absolute; width: 27px; height: 27px; object-fit: cover; border: 2px solid #101722; border-radius: 50%; box-shadow: 0 5px 12px rgba(0,0,0,.24); }
.market-icon-stack img:nth-child(1) { left: 0; top: 0; }
.market-icon-stack img:nth-child(2) { right: 0; bottom: 0; }
.market-icon-single { width: 29px; }
.market-icon-single img { left: 1px !important; }
.market-pair-heading { display: flex; align-items: center; gap: 8px; }
.market-select-shell { position: relative; display: block; width: 100%; }
.market-select-shell select { width: 100%; padding-left: 52px !important; }
.market-select-icon { position: absolute; z-index: 2; left: 11px; top: 50%; transform: translateY(-50%) scale(.78); pointer-events: none; }
.pair-select-shell { isolation: isolate; }
.pair-select-shell.is-open { z-index: 109; }
.pair-menu-host-open { z-index: 108 !important; overflow: visible !important; animation: none !important; transform: none !important; opacity: 1 !important; }
.pair-select-shell .pair-select-native { position: absolute !important; width: 1px !important; height: 1px !important; inset: 50% auto auto 14px; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.pair-select-trigger { appearance: none; width: 100%; min-height: 52px; display: grid; grid-template-columns: 42px minmax(0,1fr) 34px; align-items: center; gap: 10px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 14px; color: var(--text); background: linear-gradient(135deg,rgba(7,12,19,.96),rgba(10,16,24,.88)); box-shadow: inset 0 1px rgba(255,255,255,.025); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s ease,box-shadow .2s ease,background .2s ease,transform .2s ease; }
.pair-select-trigger:hover { border-color: rgba(99,221,255,.3); background: linear-gradient(135deg,rgba(10,17,26,.98),rgba(14,23,34,.92)); }
.pair-select-trigger:focus-visible, .pair-select-shell.is-open .pair-select-trigger { outline: none; border-color: rgba(99,221,255,.54); box-shadow: var(--focus),inset 0 1px rgba(255,255,255,.04); }
.pair-select-trigger:disabled { opacity: .52; cursor: not-allowed; }
.pair-trigger-icon { width: 42px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(99,221,255,.12); border-radius: 11px; background: rgba(99,221,255,.045); }
.pair-trigger-icon .market-icon-stack { transform: scale(.86); }
.pair-generic-icon { width: 28px; height: 28px; display: grid; place-items: center; color: #778aa3; }
.pair-generic-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pair-trigger-copy { min-width: 0; display: grid; gap: 4px; }
.pair-trigger-copy strong { overflow: hidden; color: var(--text); font-size: 13px; font-weight: 850; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.pair-trigger-copy small { color: var(--muted); font-size: 9px; font-weight: 700; line-height: 1; letter-spacing: .25px; }
.pair-trigger-chevron { width: 30px; height: 30px; display: grid; place-items: center; justify-self: end; border: 1px solid var(--border); border-radius: 9px; color: #8da0b9; background: rgba(128,150,182,.045); transition: transform .2s ease,color .2s ease,border-color .2s ease; }
.pair-trigger-chevron svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pair-select-shell.is-open .pair-trigger-chevron { color: var(--primary); border-color: rgba(99,221,255,.22); transform: rotate(180deg); }
.pair-select-backdrop { display: none; position: fixed; z-index: 104; inset: 0; background: rgba(1,4,8,.42); backdrop-filter: blur(3px); }
.pair-select-shell.is-open .pair-select-backdrop { display: block; }
.pair-select-shell.is-open .pair-select-trigger { position: relative; z-index: 106; }
.pair-select-popover { position: absolute; z-index: 107; top: calc(100% + 9px); left: 0; width: 100%; min-width: 310px; max-height: min(440px,70vh); padding: 12px; overflow: hidden; border: 1px solid rgba(137,166,205,.22); border-radius: 18px; color: var(--text); background: rgba(10,16,24,.985); box-shadow: 0 28px 80px rgba(0,0,0,.52),inset 0 1px rgba(255,255,255,.045); backdrop-filter: blur(18px); animation: pair-menu-enter .2s cubic-bezier(.2,.8,.2,1); }
.pair-select-popover[hidden] { display: none; }
.pair-select-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 11px; }
.pair-select-head > span { display: grid; gap: 4px; }
.pair-select-head strong { font-size: 13px; }
.pair-select-head small { color: var(--muted); font-size: 9px; font-weight: 700; }
.pair-select-close { appearance: none; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 10px; color: #94a4ba; background: rgba(128,150,182,.055); cursor: pointer; }
.pair-select-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.pair-category-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 11px; background: rgba(3,7,12,.62); }
.pair-category-tab { appearance: none; min-width: 0; min-height: 31px; padding: 6px 4px; overflow: hidden; border: 0; border-radius: 8px; color: #93a2b7; background: transparent; font: inherit; font-size: 8px; font-weight: 900; letter-spacing: .15px; text-align: center; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: color .16s ease,background .16s ease,box-shadow .16s ease; }
.pair-category-tab[aria-selected="true"] { color: #effcff; background: linear-gradient(135deg,#238ed4,#2868df); box-shadow: 0 6px 16px rgba(35,142,212,.2); }
.pair-category-tab:focus-visible { outline: 2px solid rgba(99,221,255,.5); outline-offset: 1px; }
.pair-category-tab:disabled { opacity: .26; cursor: not-allowed; }
.pair-select-options { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 310px; display: grid; align-content: start; gap: 7px; margin-top: 10px; padding-right: 4px; overflow-y: auto; overscroll-behavior: contain; }
.pair-select-options::-webkit-scrollbar { width: 5px; }
.pair-select-options::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(128,150,182,.25); }
.pair-select-option { appearance: none; position: relative; min-width: 0; min-height: 72px; display: grid; grid-template-columns: 35px minmax(0,1fr); align-items: center; gap: 7px; padding: 8px 7px; border: 1px solid transparent; border-radius: 13px; color: var(--text); background: rgba(128,150,182,.035); font: inherit; text-align: left; cursor: pointer; transition: border-color .16s ease,background .16s ease,transform .16s ease; }
.pair-select-option:hover, .pair-select-option:focus-visible { outline: none; border-color: rgba(99,221,255,.22); background: rgba(99,221,255,.07); transform: translateX(2px); }
.pair-select-option[aria-selected="true"] { border-color: rgba(45,212,168,.2); background: linear-gradient(90deg,rgba(45,212,168,.09),rgba(99,221,255,.035)); }
.pair-select-option .market-icon-stack { transform: scale(.7); transform-origin: left center; }
.pair-option-copy { min-width: 0; display: grid; gap: 4px; }
.pair-option-copy strong { overflow: hidden; padding-right: 14px; font-size: 10px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.pair-option-copy small { color: var(--muted); font-size: 8px; font-weight: 700; }
.pair-option-check { position: absolute; top: 5px; right: 5px; width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 7px; color: transparent; }
.pair-option-check svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pair-select-option[aria-selected="true"] .pair-option-check { color: #45dfb5; border-color: rgba(45,212,168,.18); background: rgba(45,212,168,.08); }
.pair-select-empty { grid-column: 1 / -1; min-height: 120px; display: grid; place-items: center; color: var(--muted); font-size: 11px; text-align: center; }
@keyframes pair-menu-enter { from { opacity: 0; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: none; } }

/* Future controls */
.future-pair-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.future-pair-buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.future-pair-action {
  appearance: none;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(13,20,29,.8);
  color: #b9c8db;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255,255,255,.025);
  transition: transform .18s ease, border-color .18s ease, color .18s ease, background .18s ease;
}
.future-pair-action svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.future-select-all { color: #8ee9ff; background: rgba(99,221,255,.065); border-color: rgba(99,221,255,.18); }
.future-clear-all { color: #ff9aaa; background: rgba(255,101,119,.055); border-color: rgba(255,101,119,.16); }
.future-pair-action:not(:disabled):hover { transform: translateY(-1px); border-color: rgba(99,221,255,.38); background: rgba(20,31,44,.92); }
.future-pair-action:focus-visible { outline: none; box-shadow: var(--focus); }
.future-pair-action:disabled { opacity: .36; cursor: not-allowed; }
.future-pair-count { display: inline-flex; align-items: center; min-height: 34px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: rgba(7,11,17,.45); font-size: 10px; font-weight: 800; white-space: nowrap; }
.future-orb svg, .future-empty-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.future-button-icon { width: 18px; height: 18px; display: inline-grid; place-items: center; }
.future-button-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.future-button-icon.is-busy svg { stroke-dasharray: 34 18; animation: future-icon-spin .8s linear infinite; }
@keyframes future-icon-spin { to { transform: rotate(360deg); } }
.future-filter-row, .checker-toggle { border-color: var(--border); background: rgba(7,11,17,.54); }

/* Modals, toast and loader */
.signal-modal-backdrop,
.profile-modal-backdrop { background: rgba(1, 4, 8, .76); backdrop-filter: blur(12px); }
.signal-modal-panel,
.profile-modal-card {
  border: 1px solid rgba(137,166,205,.2);
  border-radius: 22px;
  background: rgba(13, 19, 28, .96);
  box-shadow: 0 36px 100px rgba(0,0,0,.52), inset 0 1px rgba(255,255,255,.04);
  animation: modal-enter .28s cubic-bezier(.2,.8,.2,1);
}
.signal-modal-head, .profile-modal-head { border-color: var(--border); }
.signal-modal-close, .profile-close-button { border-color: var(--border); background: #121a25; color: #9eabc0; }
.profile-info-grid article { border-color: var(--border); background: rgba(7,11,17,.62); }
.profile-help-box { border-color: rgba(99,221,255,.2); background: rgba(99,221,255,.06); }
.app-toast { border-color: rgba(99,221,255,.22); border-radius: 13px; background: rgba(14,21,31,.96); box-shadow: var(--shadow); backdrop-filter: blur(15px); }
.live-spinner {
  border-color: rgba(99,221,255,.12);
  border-top-color: var(--primary);
  box-shadow: 0 0 25px rgba(99,221,255,.12);
}
.live-spinner.is-verified {
  display: grid;
  place-items: center;
  animation: none !important;
  transform: none !important;
  border-color: rgba(45,212,168,.58);
  background: rgba(45,212,168,.085);
  box-shadow: 0 0 0 7px rgba(45,212,168,.055), 0 0 30px rgba(45,212,168,.18);
}
.live-spinner.is-verified::after { content: none; }
.verified-mark { width: 29px; height: 29px; fill: none; stroke: #45e2b7; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; animation: verified-pop .3s cubic-bezier(.2,.9,.25,1.25); }
@keyframes verified-pop { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: scale(1); } }

/* Dashboard */
.dashboard-shell { max-width: 1320px; margin: 0 auto; }
.dashboard-plan-notice { margin-bottom: 18px; border-color: rgba(246,200,95,.2); border-radius: 15px; background: rgba(246,200,95,.065); }
.dashboard-notice-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; color: #f6c85f; background: rgba(246,200,95,.11); }
.dashboard-notice-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dashboard-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 40px;
  min-height: 300px;
  padding: 42px;
  overflow: hidden;
  border: 1px solid rgba(112,193,255,.2);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 84% 28%, rgba(99,221,255,.13), transparent 18rem),
    radial-gradient(circle at 12% 120%, rgba(81,136,255,.17), transparent 28rem),
    linear-gradient(130deg, rgba(16,24,36,.97), rgba(8,15,24,.96));
  box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.05);
}
.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(134,191,226,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(134,191,226,.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, black, transparent 75%);
}
.dashboard-hero-copy { max-width: 730px; }
.dashboard-kicker { display: inline-flex; align-items: center; gap: 8px; color: #87e8ff; font-size: 10px; font-weight: 900; letter-spacing: 1.5px; }
.dashboard-kicker i, .dashboard-online-pill i { width: 7px; height: 7px; border-radius: 50%; background: #2dd4a8; box-shadow: 0 0 0 5px rgba(45,212,168,.09); }
.dashboard-hero h2 { margin: 17px 0 12px; font-size: clamp(34px,4vw,56px); line-height: 1.04; letter-spacing: -2.5px; }
.dashboard-hero h2 span { color: var(--primary); }
.dashboard-hero p { max-width: 650px; margin: 0; color: #9ba9bd; line-height: 1.75; }
.dashboard-hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 27px; }
.dashboard-primary-action svg, .dashboard-tool-footer svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dashboard-secondary-action { color: #b4c2d5; font-size: 12px; font-weight: 800; }
.dashboard-secondary-action:hover { color: var(--primary); }
.dashboard-credit-card { display: flex; align-items: center; gap: 18px; min-width: 285px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 20px; background: rgba(7,12,19,.64); backdrop-filter: blur(16px); }
.dashboard-credit-ring { width: 96px; height: 96px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--primary) 0 72%, rgba(130,157,191,.13) 72%); padding: 5px; box-shadow: 0 0 32px rgba(99,221,255,.12); }
.dashboard-credit-ring > div { width: 100%; height: 100%; display: grid; place-content: center; text-align: center; border-radius: inherit; background: #0c131d; }
.dashboard-credit-ring strong, .dashboard-credit-ring span { display: block; }
.dashboard-credit-ring strong { font-size: 28px; letter-spacing: -1px; }
.dashboard-credit-ring span { margin-top: 1px; color: var(--muted); font-size: 9px; }
.dashboard-credit-meta span, .dashboard-credit-meta strong, .dashboard-credit-meta small { display: block; }
.dashboard-credit-meta span { color: var(--subtle); font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.dashboard-credit-meta strong { margin-top: 6px; font-size: 20px; }
.dashboard-credit-meta small { margin-top: 5px; color: var(--primary); font-size: 8px; letter-spacing: .8px; }
.dashboard-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.dashboard-overview-card { position: relative; display: flex; align-items: center; gap: 13px; padding: 17px; overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: rgba(14,20,30,.78); box-shadow: var(--soft-shadow); }
.dashboard-overview-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: var(--primary); background: rgba(99,221,255,.08); }
.dashboard-overview-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.dashboard-overview-card span, .dashboard-overview-card strong { display: block; }
.dashboard-overview-card > div > span { color: var(--subtle); font-size: 8px; font-weight: 900; letter-spacing: .8px; }
.dashboard-overview-card strong { margin-top: 5px; font-size: 15px; }
.dashboard-overview-purple .dashboard-overview-icon { color: #aaa2ff; background: rgba(141,131,255,.09); }
.dashboard-overview-sky .dashboard-overview-icon { color: #78b3ff; background: rgba(81,136,255,.09); }
.dashboard-overview-green .dashboard-overview-icon { color: #59dfb7; background: rgba(45,212,168,.08); }
.dashboard-section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 34px 2px 16px; }
.dashboard-section-head h2 { margin: 7px 0 4px; font-size: 27px; letter-spacing: -1px; }
.dashboard-section-head p { margin: 0; color: var(--muted); font-size: 12px; }
.dashboard-online-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 999px; font-size: 9px; font-weight: 850; }
.dashboard-tool-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.dashboard-tool-card { position: relative; isolation: isolate; display: flex; min-height: 225px; flex-direction: column; padding: 21px; overflow: hidden; color: var(--text); border: 1px solid var(--border); border-radius: 19px; background: linear-gradient(150deg, rgba(17,24,35,.94), rgba(9,14,21,.94)); box-shadow: var(--soft-shadow); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.dashboard-tool-card::after, .modern-interactive::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none; background: radial-gradient(260px circle at var(--pointer-x,50%) var(--pointer-y,50%), rgba(99,221,255,.11), transparent 70%); transition: opacity .25s ease; }
.dashboard-tool-card:hover { color: var(--text); transform: translateY(-5px); border-color: rgba(99,221,255,.27); box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.modern-interactive:hover::before { opacity: 1; }
.dashboard-tool-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dashboard-tool-icon { width: 47px; height: 47px; display: grid; place-items: center; border: 1px solid rgba(99,221,255,.18); border-radius: 14px; color: var(--primary); background: rgba(99,221,255,.075); }
.dashboard-tool-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-tool-tag { color: #718097; font-size: 8px; font-weight: 900; letter-spacing: .9px; }
.dashboard-tool-copy { margin-top: 23px; }
.dashboard-tool-copy h3 { margin: 0; font-size: 17px; letter-spacing: -.45px; }
.dashboard-tool-copy p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.62; }
.dashboard-tool-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 17px; color: #8997ac; border-top: 1px solid var(--border); font-size: 10px; font-weight: 800; }
.dashboard-tool-card:hover .dashboard-tool-footer { color: var(--primary); }
.dashboard-tone-purple .dashboard-tool-icon { color: #aaa2ff; border-color: rgba(141,131,255,.18); background: rgba(141,131,255,.075); }
.dashboard-tone-emerald .dashboard-tool-icon { color: #59dfb7; border-color: rgba(45,212,168,.18); background: rgba(45,212,168,.07); }
.dashboard-tone-sky .dashboard-tool-icon { color: #79b5ff; border-color: rgba(81,136,255,.18); background: rgba(81,136,255,.07); }
.dashboard-tone-rose .dashboard-tool-icon { color: #ff8795; border-color: rgba(255,101,119,.18); background: rgba(255,101,119,.07); }

/* Money management and best pairs */
.mm-hero { border-color: rgba(99,221,255,.17); background: linear-gradient(130deg, rgba(16,25,37,.95), rgba(8,18,25,.94)); }
.mm-hero-badge, .mm-risk-badge, .mm-free-badge { border-color: var(--border); background: rgba(99,221,255,.06); color: var(--primary); }
.mm-next-card { border-color: rgba(99,221,255,.19); background: radial-gradient(circle at 85% 20%, rgba(99,221,255,.1), transparent 18rem), linear-gradient(135deg, #101a27, #0b111a); }
.mm-next-amount { color: var(--primary); }
.mm-step-card, .mm-table td, .mm-log-item { border-color: var(--border); background: rgba(7,11,17,.62); }
.mm-step-card.active, .mm-table tr.active td { border-color: rgba(99,221,255,.31); background: rgba(99,221,255,.065); }
.bp-filter-tabs button { border-color: var(--border); background: rgba(7,11,17,.62); color: var(--muted); }
.bp-filter-tabs button.active { color: #c5f5ff; border-color: rgba(99,221,255,.3); background: rgba(99,221,255,.085); }
.bp-rank { color: var(--primary); border-color: rgba(99,221,255,.19); background: rgba(99,221,255,.07); }
.bp-score-box strong { color: #59dfb7; }

/* Tutorials */
.has-corner-tutorial { position: relative; }
.has-corner-tutorial .live-control-head > div:first-child,
.has-corner-tutorial .future-control-head > div:first-child,
.has-corner-tutorial .checker-card-head > div:first-child,
.has-corner-tutorial .news-control-head > div:first-child,
.has-corner-tutorial .bp-control-head > div:first-child { flex: 1; padding-right: 88px; }
.has-corner-tutorial .chart-upload-head { padding-inline: 76px; }
.has-corner-tutorial .mm-section-head { padding-right: 88px; }
.bp-control-card { position: sticky; top: 108px; align-self: start; }
.module-tutorial-corner { position: absolute; top: 16px; right: 16px; z-index: 5; min-width: 78px; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 10px 0 8px; border: 1px solid rgba(255,101,119,.22); border-radius: 999px; color: #ff8291; background: linear-gradient(135deg,rgba(255,101,119,.115),rgba(255,101,119,.045)); box-shadow: inset 0 1px rgba(255,255,255,.045),0 9px 24px rgba(0,0,0,.12); font: inherit; font-size: 9px; font-weight: 900; letter-spacing: .7px; text-decoration: none; text-transform: uppercase; cursor: pointer; transition: transform .2s ease,border-color .2s ease,background .2s ease,box-shadow .2s ease; }
.module-tutorial-corner:hover { transform: translateY(-2px); border-color: rgba(255,101,119,.42); background: linear-gradient(135deg,rgba(255,101,119,.17),rgba(255,101,119,.075)); box-shadow: inset 0 1px rgba(255,255,255,.06),0 12px 28px rgba(255,101,119,.09); }
.module-tutorial-corner:focus-visible { outline: none; box-shadow: var(--focus); }
.module-tutorial-corner svg { width: 18px; height: 18px; flex: 0 0 auto; filter: drop-shadow(0 0 7px rgba(255,101,119,.24)); }
.youtube-shell { fill: currentColor; }
.youtube-play { fill: #fff; }
.tutorial-button { color: #ff8291; background: rgba(255,101,119,.07); border-color: rgba(255,101,119,.18); }

/* Admin */
.admin-dashboard-shell { max-width: 1380px; margin: 0 auto; }
.admin-command-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px; margin-bottom: 17px; border: 1px solid rgba(99,221,255,.18); border-radius: 23px; background: radial-gradient(circle at 88% 0, rgba(99,221,255,.11), transparent 20rem), linear-gradient(135deg, rgba(17,26,39,.95), rgba(9,15,23,.95)); box-shadow: var(--soft-shadow); }
.admin-command-kicker { color: var(--primary); font-size: 9px; font-weight: 900; letter-spacing: 1.3px; }
.admin-command-head h2 { margin: 8px 0 6px; font-size: 31px; letter-spacing: -1.2px; }
.admin-command-head p { margin: 0; color: var(--muted); }
.admin-command-status { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid rgba(45,212,168,.2); border-radius: 999px; color: #59dfb7; background: rgba(45,212,168,.06); font-size: 9px; font-weight: 850; }
.admin-modern-stats { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.admin-plan-section, .admin-users-card { margin-top: 17px; padding: 22px; border: 1px solid var(--border); border-radius: 20px; background: rgba(14,20,30,.83); box-shadow: var(--soft-shadow); }
.admin-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.admin-plan-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; margin-top: 17px; }
.admin-plan-card { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: rgba(7,11,17,.62); }
.admin-plan-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-plan-form { display: grid; gap: 10px; margin-top: 15px; }
.admin-plan-form input, .admin-plan-form select { border-color: var(--border); background: #080d14; }
.admin-table-wrap { overflow-x: auto; }
.admin-user-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; min-width: 860px; }
.admin-user-table th { color: var(--subtle); font-size: 9px; text-align: left; letter-spacing: .8px; text-transform: uppercase; }
.admin-user-table td { padding: 12px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(7,11,17,.62); }
.admin-user-table td:first-child { border-left: 1px solid var(--border); border-radius: 12px 0 0 12px; }
.admin-user-table td:last-child { border-right: 1px solid var(--border); border-radius: 0 12px 12px 0; }
.admin-user-cell { display: grid; gap: 3px; }
.admin-user-cell span { color: var(--muted); font-size: 10px; }
.admin-credit-value { color: var(--primary); }
.admin-filter-reset, .admin-free-button { color: #b9c8dc; border-color: var(--border); background: #111925; }
.has-modern-motion .admin-users-card.ui-reveal { opacity: 1; transform: none; animation: none; }

/* Motion */
.has-modern-motion .ui-reveal { opacity: 0; transform: translateY(18px) scale(.992); }
.has-modern-motion .ui-reveal.is-visible { animation: ui-enter .62s cubic-bezier(.2,.75,.2,1) var(--reveal-delay,0ms) both; }
.typewriter-active::after { content: ""; display: inline-block; width: 1px; height: 1em; margin-left: 3px; vertical-align: -.12em; background: var(--primary); animation: caret .72s steps(1) infinite; }
@keyframes ui-enter { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modal-enter { from { opacity: 0; transform: translateY(12px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes caret { 50% { opacity: 0; } }

/* Light mode */
[data-theme="light"] {
  --bg: #edf3fa;
  --surface: #f7faff;
  --surface-2: #e5edf7;
  --card: rgba(255,255,255,.84);
  --card-solid: #fff;
  --border: rgba(42,65,95,.14);
  --border-strong: rgba(18,139,183,.28);
  --primary: #087fa8;
  --primary-hover: #086f92;
  --active: #315fd4;
  --accent: #6256d9;
  --text: #101827;
  --muted: #5f6d81;
  --subtle: #79869a;
  --shadow: 0 24px 65px rgba(41,64,91,.15);
  --soft-shadow: 0 13px 32px rgba(41,64,91,.1);
  --focus: 0 0 0 4px rgba(8,127,168,.12);
}
[data-theme="light"] body { background: radial-gradient(circle at 4% -5%, rgba(49,95,212,.1), transparent 31rem), radial-gradient(circle at 100% 8%, rgba(8,127,168,.09), transparent 27rem), var(--bg); }
[data-theme="light"] .app-body::before, [data-theme="light"] .auth-body::before { background-image: linear-gradient(rgba(51,78,111,.055) 1px,transparent 1px), linear-gradient(90deg,rgba(51,78,111,.055) 1px,transparent 1px); }
[data-theme="light"] .sidebar, [data-theme="light"] .topbar { background: rgba(247,250,255,.88); }
[data-theme="light"] .side-link { color: #637086; }
[data-theme="light"] .side-link:hover { color: #182437; background: rgba(222,232,244,.72); }
[data-theme="light"] .side-link.active, [data-theme="light"] .side-nav-item.active .side-link { color: #133246; background: linear-gradient(90deg,rgba(8,127,168,.12),rgba(49,95,212,.05)); }
[data-theme="light"] .sweetex-badge, [data-theme="light"] .sweetex-topbar, [data-theme="light"] .credit-pill { background: rgba(255,255,255,.72); }
[data-theme="light"] .sweetex-badge strong, [data-theme="light"] .sweetex-topbar strong { color: #26354a; }
[data-theme="light"] .icon-btn, [data-theme="light"] .btn-secondary { color: #37465b; background: rgba(255,255,255,.72); }
[data-theme="light"] .btn-primary { color: #fff; background: linear-gradient(135deg,#0b94be,#2576d8); }
[data-theme="light"] .auth-visual { background: radial-gradient(circle at 17% 18%,rgba(8,127,168,.13),transparent 20rem),radial-gradient(circle at 85% 78%,rgba(49,95,212,.14),transparent 25rem),linear-gradient(145deg,#edf5fb,#e5edf8); }
[data-theme="light"] .auth-copy h1 { background: linear-gradient(120deg,#122035,#176786 60%,#495dc3); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .auth-copy p { color: #53647a; }
[data-theme="light"] .visual-stats div, [data-theme="light"] .auth-card { background: rgba(255,255,255,.73); }
[data-theme="light"] .visual-stats strong { color: #142135; }
[data-theme="light"] .auth-panel { background: radial-gradient(circle at 100% 0,rgba(49,95,212,.09),transparent 24rem),#edf3fa; }
[data-theme="light"] .form-stack input,
[data-theme="light"] .search-form input,
[data-theme="light"] .inline-form input,
[data-theme="light"] .inline-form select,
[data-theme="light"] .live-field select,
[data-theme="light"] .future-field input,
[data-theme="light"] .future-field select,
[data-theme="light"] .checker-field textarea,
[data-theme="light"] .mm-field input,
[data-theme="light"] .mm-field select { color: var(--text); background: rgba(247,250,255,.9); }
[data-theme="light"] .welcome-card,
[data-theme="light"] .feature-card,
[data-theme="light"] .module-card,
[data-theme="light"] .admin-card,
[data-theme="light"] .live-control-card,
[data-theme="light"] .live-result-card,
[data-theme="light"] .chart-upload-card,
[data-theme="light"] .chart-result-card,
[data-theme="light"] .future-control-card,
[data-theme="light"] .future-result-card,
[data-theme="light"] .checker-control-card,
[data-theme="light"] .checker-result-card,
[data-theme="light"] .news-control-card,
[data-theme="light"] .news-result-card,
[data-theme="light"] .mm-panel,
[data-theme="light"] .mm-next-card,
[data-theme="light"] .mm-metrics article,
[data-theme="light"] .bp-control-card,
[data-theme="light"] .bp-result-card { background: linear-gradient(145deg,rgba(255,255,255,.91),rgba(242,247,252,.9)); }
[data-theme="light"] .dashboard-hero { background: radial-gradient(circle at 84% 25%,rgba(8,127,168,.11),transparent 18rem),radial-gradient(circle at 12% 120%,rgba(49,95,212,.12),transparent 28rem),linear-gradient(130deg,#fdfefe,#edf5fb); }
[data-theme="light"] .dashboard-hero p { color: #5e6d81; }
[data-theme="light"] .dashboard-credit-card, [data-theme="light"] .dashboard-overview-card, [data-theme="light"] .dashboard-tool-card { background: rgba(255,255,255,.76); }
[data-theme="light"] .dashboard-credit-ring > div { background: #f7fbff; }
[data-theme="light"] .direction-panel,
[data-theme="light"] .strength-card,
[data-theme="light"] .signal-metric-grid article,
[data-theme="light"] .future-signal-item,
[data-theme="light"] .news-signal-item,
[data-theme="light"] .checker-result-item,
[data-theme="light"] .bp-ranking-item,
[data-theme="light"] .selected-pair-chip,
[data-theme="light"] .logic-block,
[data-theme="light"] .profile-info-grid article { background: rgba(244,248,253,.88); }
[data-theme="light"] .signal-modal-panel, [data-theme="light"] .profile-modal-card { background: rgba(250,252,255,.97); }
[data-theme="light"] .market-icon-stack img { border-color: #f4f8fd; }
[data-theme="light"] .signal-quality-panel .strength-card,
[data-theme="light"] .signal-metric-grid .signal-metric { background: linear-gradient(145deg,rgba(255,255,255,.96),rgba(240,246,252,.86)); box-shadow: inset 0 1px rgba(255,255,255,.8),0 9px 24px rgba(42,66,94,.055); }
[data-theme="light"] .premium-result-shell .direction-icon { background: rgba(255,255,255,.52); }
[data-theme="light"] .future-pair-action,
[data-theme="light"] .future-pair-count { background: rgba(247,250,255,.9); }
[data-theme="light"] .pair-select-trigger { background: linear-gradient(135deg,rgba(255,255,255,.96),rgba(240,246,252,.92)); }
[data-theme="light"] .pair-select-popover { color: var(--text); background: rgba(249,252,255,.985); box-shadow: 0 28px 75px rgba(41,64,91,.22),inset 0 1px rgba(255,255,255,.8); }
[data-theme="light"] .pair-category-tabs { background: rgba(233,240,248,.9); }
[data-theme="light"] .pair-select-option { background: rgba(231,239,248,.42); }
[data-theme="light"] .pair-select-option:hover, [data-theme="light"] .pair-select-option:focus-visible { background: rgba(8,127,168,.08); }

/* Responsive */
@media (max-width: 1180px) {
  .dashboard-tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-plan-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .sidebar { width: 264px; transform: translateX(-100%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
  .sidebar.open { transform: translateX(0); }
  .app-shell { margin-left: 0; }
  .mobile-menu { display: grid; place-items: center; }
  .dashboard-hero { grid-template-columns: 1fr; }
  .dashboard-credit-card { width: max-content; }
  .sweetex-topbar { display: none; }
  .bp-control-card { position: relative; top: 0; }
}
@media (max-width: 760px) {
  body.pair-select-open { overflow: hidden; }
  .pair-select-popover { position: fixed; top: 50%; right: 12px; bottom: auto; left: 12px; width: auto; min-width: 0; max-height: min(86svh,680px); padding: 14px; border-radius: 22px; transform: translateY(-50%); animation-name: pair-menu-mobile-enter; }
  .pair-select-options { max-height: min(467px,calc(82svh - 130px)); }
  .pair-select-option { min-height: 72px; }
  @keyframes pair-menu-mobile-enter { from { opacity: 0; transform: translateY(calc(-50% + 18px)) scale(.985); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
  .page-content { padding: 20px 17px 36px; }
  .topbar { height: 74px; padding: 0 16px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; padding: 70px 18px 28px; }
  .mobile-brand { display: flex; align-items: center; gap: 10px; }
  .dashboard-hero { min-height: 0; padding: 28px 24px; border-radius: 22px; }
  .dashboard-hero h2 { font-size: 37px; letter-spacing: -1.8px; }
  .dashboard-overview { grid-template-columns: 1fr 1fr; }
  .dashboard-section-head { align-items: flex-start; flex-direction: column; }
  .dashboard-tool-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-tool-card { min-height: 205px; }
  .admin-command-head { align-items: flex-start; flex-direction: column; }
  .admin-modern-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .premium-result-shell .direction-panel { flex-wrap: wrap; }
  .direction-main { width: 100%; }
  .direction-market-visual {
    width: 100%;
    min-height: 56px;
    grid-template-columns: 72px minmax(0,1fr);
    margin-top: 2px;
    padding: 8px 11px;
  }
  .direction-market-visual svg { width: min(100%,180px); justify-self: end; }
}
@media (max-width: 540px) {
  .auth-card { padding: 25px 21px; border-radius: 22px; }
  .topbar-title h1 { max-width: 145px; }
  .credit-pill { display: none; }
  .user-chip > div { display: none; }
  .dashboard-hero { padding: 24px 20px; }
  .dashboard-hero h2 { font-size: 32px; }
  .dashboard-hero-actions { align-items: flex-start; flex-direction: column; }
  .dashboard-credit-card { width: 100%; min-width: 0; }
  .dashboard-overview { grid-template-columns: 1fr; }
  .dashboard-tool-grid { grid-template-columns: 1fr; }
  .dashboard-tool-card { min-height: 195px; }
  .admin-plan-grid { grid-template-columns: 1fr; }
  .module-tutorial-corner { top: 12px; right: 12px; min-width: 36px; width: 36px; height: 36px; padding: 0; }
  .module-tutorial-corner span { display: none; }
  .has-corner-tutorial .live-control-head > div:first-child,
  .has-corner-tutorial .future-control-head > div:first-child,
  .has-corner-tutorial .checker-card-head > div:first-child,
  .has-corner-tutorial .news-control-head > div:first-child,
  .has-corner-tutorial .bp-control-head > div:first-child { padding-right: 44px; }
  .has-corner-tutorial .chart-upload-head { padding-inline: 36px; }
  .has-corner-tutorial .mm-section-head { padding-right: 44px; }
  .future-pair-actions { align-items: stretch; flex-direction: column; }
  .future-pair-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .future-pair-action { width: 100%; }
  .future-pair-count { width: max-content; min-height: 30px; }
  .premium-result-shell .signal-result-head h2 { font-size: 27px; }
  .premium-result-shell .direction-panel { padding: 17px; gap: 13px; }
  .direction-main { gap: 13px; }
  .premium-result-shell .direction-icon { width: 58px; height: 58px; border-radius: 17px; }
  .premium-result-shell .direction-copy strong { font-size: 29px; }
  .signal-quality-panel .signal-metric-grid { gap: 8px; }
  .signal-metric-grid .signal-metric { min-height: 98px; padding: 12px; }
  .signal-metric-icon { width: 30px; height: 30px; }
  .signal-metric-icon svg { width: 16px; height: 16px; }
  .signal-metric-grid .signal-metric > strong { font-size: 15px; }
  .premium-result-shell .chart-result-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .has-modern-motion .ui-reveal { opacity: 1; transform: none; }
}
