/* SMART AI TOOL - Ultra-Modern Fintech UI Theme (2026 Pro Edition)
   Crafted with Titanium Glassmorphism, Floating Dock, Dual Quote Blocks & Cyberpunk Accents */

:root {
  --bg: #060a14;
  --bg-gradient: radial-gradient(circle at 15% 0%, #1e355b 0%, transparent 38%),
                 radial-gradient(circle at 85% 15%, #2c1a52 0%, transparent 35%),
                 radial-gradient(circle at 50% 65%, #0e1e38 0%, transparent 50%),
                 linear-gradient(180deg, #091021 0%, #060a14 100%);
  --panel: rgba(16, 28, 52, 0.75);
  --panel-solid: #0e182f;
  --panel-hover: rgba(24, 40, 72, 0.85);
  --panel2: rgba(22, 36, 64, 0.65);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-focus: rgba(255, 190, 59, 0.45);
  --glass-highlight: rgba(255, 255, 255, 0.12);
  --line: rgba(56, 82, 123, 0.4);
  --line-strong: rgba(78, 114, 168, 0.6);
  --text: #f4f8ff;
  --text-dim: #cad7ec;
  --muted: #8ea4c5;
  --gold: #ffbe3b;
  --gold-glow: rgba(255, 190, 59, 0.35);
  --green: #2ee6a8;
  --green-glow: rgba(46, 230, 168, 0.35);
  --green-dark: #0f4433;
  --red: #ff5274;
  --red-glow: rgba(255, 82, 116, 0.35);
  --red-dark: #4a1422;
  --blue: #4da6ff;
  --blue-glow: rgba(77, 166, 255, 0.35);
  --violet: #9e7aff;
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
}

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

body {
  margin: 0;
  background: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.45 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

button, input, select, textarea {
  font: inherit;
  font-variant-numeric: tabular-nums;
}

button {
  cursor: pointer;
  color: inherit;
}

.app {
  width: 100%;
  max-width: 520px;
  margin: auto;
  min-height: 100vh;
  padding-bottom: 110px; /* Space for Floating Dock */
  background: var(--bg-gradient);
  position: relative;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.85);
}

/* =============================================================================
   HEADER (Frosted Titanium Glass)
   ============================================================================= */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 18, 34, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffd778, #b87a18);
  display: grid;
  place-items: center;
  color: #171003;
  font-weight: 900;
  font-size: 19px;
  box-shadow: 0 0 16px rgba(255, 190, 59, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
  overflow: hidden;
}

.logo span {
  position: relative;
  z-index: 2;
}

.brand b {
  display: block;
  letter-spacing: 0.8px;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(90deg, #ffffff, #cfdeff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand small {
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 1.4px;
  display: block;
  font-weight: 600;
}

/* Status Pill with Pulsing Radar */
.status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--green);
  border: 1px solid rgba(46, 230, 168, 0.35);
  border-radius: 20px;
  padding: 5px 11px;
  background: rgba(15, 68, 51, 0.45);
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 0 14px rgba(46, 230, 168, 0.18);
  transition: all .25s ease;
}

.status::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: radar-pulse 1.8s infinite;
}

@keyframes radar-pulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 12px currentColor; }
  100% { transform: scale(0.85); opacity: 0.6; }
}

.status.offline {
  color: #9cb2cf;
  border-color: rgba(90, 114, 150, 0.4);
  background: rgba(22, 34, 52, 0.45);
  box-shadow: none;
}
.status.offline::before {
  animation: none;
  opacity: 0.5;
}

.status.simulated {
  color: var(--gold);
  border-color: rgba(255, 190, 59, 0.35);
  background: rgba(60, 44, 14, 0.45);
  box-shadow: 0 0 14px rgba(255, 190, 59, 0.18);
}

.status.danger {
  color: var(--red);
  border-color: rgba(255, 82, 116, 0.35);
  background: rgba(74, 20, 34, 0.45);
  box-shadow: 0 0 14px rgba(255, 82, 116, 0.18);
}

/* =============================================================================
   PAGES & HEADINGS
   ============================================================================= */
main {
  padding: 16px 16px;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: page-fade-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes page-fade-in {
  from {
    opacity: 0.3;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  font-size: 23px;
  margin: 2px 0 4px;
  font-weight: 850;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 40%, #b8d2ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 16px;
  margin: 0 0 12px;
  font-weight: 750;
  letter-spacing: -0.2px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sub {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 18px;
  font-weight: 500;
}

/* =============================================================================
   CARDS (Titanium Glassmorphism)
   ============================================================================= */
.card {
  background: linear-gradient(145deg, rgba(20, 34, 62, 0.74), rgba(11, 20, 38, 0.86));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 0 0 var(--glass-highlight), 0 12px 30px rgba(0, 0, 0, 0.42);
  position: relative;
  transition: transform .2s ease, border-color .2s ease;
}

/* Total Equity Hero Card (Holographic Titanium Finish) */
.hero {
  background: radial-gradient(circle at 90% 0%, rgba(158, 122, 255, 0.22), transparent 45%),
              radial-gradient(circle at 10% 100%, rgba(46, 230, 168, 0.16), transparent 45%),
              linear-gradient(135deg, rgba(30, 52, 90, 0.85), rgba(13, 23, 44, 0.94));
  border: 1px solid rgba(130, 168, 230, 0.26);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.25), 0 16px 38px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.eyebrow {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  font-weight: 700;
}

.big {
  font-size: 32px;
  font-weight: 850;
  letter-spacing: -1.2px;
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff, #e1edff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

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

/* Hero Floating Profit Badge */
.hero-floating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 750;
  margin-top: 4px;
  background: rgba(15, 68, 51, 0.4);
  border: 1px solid rgba(46, 230, 168, 0.35);
  box-shadow: 0 0 14px rgba(46, 230, 168, 0.2);
}

.hero-floating.negative {
  background: rgba(74, 20, 34, 0.4);
  border-color: rgba(255, 82, 116, 0.35);
  box-shadow: 0 0 14px rgba(255, 82, 116, 0.2);
}

.pulse-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: radar-pulse 1.8s infinite;
}

/* 2-Column Grid & Metric Tiles */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.metric {
  background: linear-gradient(145deg, rgba(18, 33, 60, 0.7), rgba(11, 21, 39, 0.85));
  border: 1px solid rgba(56, 82, 123, 0.35);
  border-radius: 15px;
  padding: 13px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 16px rgba(0, 0, 0, 0.25);
}

.metric strong {
  display: block;
  font-size: 19px;
  margin-top: 5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

.metric small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

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

.muted {
  color: var(--muted);
}

.tiny {
  font-size: 11px;
}

/* =============================================================================
   MENU GRID (App Launcher)
   ============================================================================= */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0 18px;
}

.menu {
  background: linear-gradient(145deg, rgba(25, 42, 74, 0.75), rgba(15, 26, 48, 0.88));
  backdrop-filter: blur(16px);
  border: 1px solid rgba(64, 94, 142, 0.35);
  border-radius: 17px;
  padding: 14px 6px 12px;
  text-align: center;
  min-height: 96px;
  transition: all .18s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 6px 18px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.menu:active {
  transform: scale(0.95);
  background: rgba(22, 38, 68, 0.95);
  border-color: var(--gold);
}

.menu .ico {
  width: 42px;
  height: 42px;
  margin: 0 auto 9px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(64, 106, 168, 0.6), rgba(82, 68, 148, 0.6));
  display: grid;
  place-items: center;
  font-size: 21px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.menu b {
  font-size: 12px;
  display: block;
  font-weight: 750;
  color: var(--text);
}

.menu small {
  font-size: 9.5px;
  color: var(--muted);
  display: block;
  margin-top: 1px;
}

/* =============================================================================
   DUAL QUOTE BLOCK (TradingView Pro / Exness Mobile Style)
   ============================================================================= */
.card-trading-symbol {
  padding-bottom: 12px;
}

.symbol-select-wrap {
  position: relative;
  display: inline-block;
  margin-top: 2px;
}

.symbol-select {
  font-size: 20px;
  font-weight: 850;
  background: transparent;
  border: none;
  color: #fff;
  outline: none;
  cursor: pointer;
  letter-spacing: -0.4px;
  padding-right: 20px;
}

.dual-quote-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin: 12px 0 12px;
}

.quote-box {
  padding: 12px 10px;
  border-radius: 15px;
  text-align: center;
  position: relative;
  transition: all .18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.25);
}

.quote-box.sell-side {
  background: linear-gradient(145deg, rgba(255, 82, 116, 0.12), rgba(18, 28, 48, 0.85));
  border: 1px solid rgba(255, 82, 116, 0.32);
}

.quote-box.buy-side {
  background: linear-gradient(145deg, rgba(46, 230, 168, 0.12), rgba(18, 28, 48, 0.85));
  border: 1px solid rgba(46, 230, 168, 0.32);
}

.quote-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.quote-box.sell-side .quote-label { color: var(--red); }
.quote-box.buy-side .quote-label { color: var(--green); }

.quote-tag {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  letter-spacing: 0.4px;
}

.quote-price {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.2;
}

/* Tick flash animations */
.quote-box.flash-up {
  background: rgba(46, 230, 168, 0.35) !important;
  border-color: var(--green) !important;
  box-shadow: 0 0 20px rgba(46, 230, 168, 0.5) !important;
}

.quote-box.flash-down {
  background: rgba(255, 82, 116, 0.35) !important;
  border-color: var(--red) !important;
  box-shadow: 0 0 20px rgba(255, 82, 116, 0.5) !important;
}

.spread-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 12px;
  background: rgba(14, 25, 45, 0.8);
  border: 1px dashed rgba(255, 190, 59, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.spread-title {
  font-size: 8px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.6px;
}

.spread-value {
  font-size: 11.5px;
  font-weight: 850;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

/* Mini Sparkline Chart Frame */
.sparkline-wrapper {
  position: relative;
  width: 100%;
  margin: 8px 0 4px;
}

#sparklineCanvas {
  width: 100%;
  height: 52px;
  display: block;
  border-radius: 12px;
  background: rgba(8, 15, 29, 0.85);
  border: 1px solid rgba(56, 82, 123, 0.25);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* =============================================================================
   TACTILE INPUTS & QUICK LOT CHIPS
   ============================================================================= */
.field {
  margin: 12px 0;
}

.field label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.field input, .field select {
  width: 100%;
  background: rgba(10, 18, 34, 0.88);
  border: 1px solid rgba(56, 82, 123, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  outline: none;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  transition: all .2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

.field input:focus, .field select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 190, 59, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

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

.inline > * {
  flex: 1;
}

/* Quick Lot Chip Buttons */
.lot-chip {
  padding: 10px 4px;
  font-size: 13px;
  font-weight: 750;
  border: 1px solid rgba(56, 82, 123, 0.45);
  border-radius: 12px;
  background: rgba(18, 32, 58, 0.7);
  color: #dce7fa;
  text-align: center;
  transition: all .2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.lot-chip:active, .lot-chip.active {
  background: linear-gradient(135deg, #ffbe3b, #f39c12);
  color: #1a1202;
  border-color: #ffbe3b;
  font-weight: 850;
  box-shadow: 0 4px 14px rgba(255, 190, 59, 0.4);
  transform: translateY(-1px);
}

/* =============================================================================
   BUTTONS (3D Cyberpunk Tactile Actions)
   ============================================================================= */
.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 750;
  letter-spacing: 0.3px;
  background: linear-gradient(145deg, #263854, #19273c);
  color: #eaf1ff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: all .15s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  cursor: pointer;
}

.btn:active {
  transform: scale(0.97);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn.gold {
  background: linear-gradient(135deg, #ffd778, #ffad3b);
  color: #241600;
  font-weight: 850;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 24px rgba(255, 173, 59, 0.35);
}

.btn.green {
  background: linear-gradient(135deg, #2ee6a8, #0fa370);
  color: #06281b;
  font-weight: 850;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 24px rgba(46, 230, 168, 0.35);
}
.btn.green:active {
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(46, 230, 168, 0.25);
}

.btn.red {
  background: linear-gradient(135deg, #ff5274, #ba1c40);
  color: #ffffff;
  font-weight: 850;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 24px rgba(255, 82, 116, 0.35);
}
.btn.red:active {
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(255, 82, 116, 0.25);
}

.btn.blue {
  background: linear-gradient(135deg, #4da6ff, #2968db);
  color: #ffffff;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 24px rgba(77, 166, 255, 0.35);
}

.btn.full {
  width: 100%;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.actions.three {
  grid-template-columns: repeat(3, 1fr);
}

/* =============================================================================
   SWITCH TOGGLE BUTTONS (Subtle Neon Glow)
   ============================================================================= */
.switch {
  width: 48px;
  height: 27px;
  border-radius: 20px;
  background: rgba(45, 62, 88, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px;
  flex: none;
  cursor: pointer;
  transition: all .25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.switch:after {
  content: "";
  display: block;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: all .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.switch.on {
  background: linear-gradient(135deg, #2ee6a8, #16a879);
  border-color: #2ee6a8;
  box-shadow: 0 0 16px rgba(46, 230, 168, 0.45);
}

.switch.on:after {
  transform: translateX(21px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.switchrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid rgba(43, 65, 101, 0.45);
}

.switchrow:last-child {
  border: 0;
}

/* Pills & Tags */
.pill {
  font-size: 10px;
  font-weight: 750;
  padding: 4px 9px;
  border-radius: 20px;
  background: rgba(27, 45, 70, 0.6);
  border: 1px solid rgba(80, 115, 165, 0.35);
  color: #a9c8ef;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pill.green {
  background: rgba(17, 52, 38, 0.6);
  border-color: rgba(46, 230, 168, 0.4);
  color: #4ee6b6;
  box-shadow: 0 0 10px rgba(46, 230, 168, 0.2);
}

.pill.red {
  background: rgba(61, 20, 33, 0.6);
  border-color: rgba(255, 82, 116, 0.4);
  color: #ff7f96;
  box-shadow: 0 0 10px rgba(255, 82, 116, 0.2);
}

.pill.gold {
  background: rgba(63, 47, 18, 0.6);
  border-color: rgba(255, 190, 59, 0.4);
  color: #ffd47a;
  box-shadow: 0 0 10px rgba(255, 190, 59, 0.2);
}

/* =============================================================================
   FLOATING GLASS DOCK (iOS / VisionOS Style Navigation)
   ============================================================================= */
.bottom {
  position: fixed;
  z-index: 100;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 488px;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(11, 20, 38, 0.82);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.nav {
  border: 0;
  background: none;
  color: #7b91b2;
  font-size: 10px;
  padding: 6px 0 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 650;
  position: relative;
  border-radius: 18px;
}

.nav span.nav-icon {
  font-size: 18px;
  transition: transform .2s ease;
}

.nav:active {
  transform: scale(0.92);
}

.nav.active {
  color: #ffffff;
  background: linear-gradient(145deg, rgba(255, 190, 59, 0.18), rgba(255, 190, 59, 0.05));
}

.nav.active span.nav-icon {
  color: var(--gold);
  transform: translateY(-2px);
  text-shadow: 0 0 12px var(--gold-glow);
}

.nav.active::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: 18%;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 850;
  padding: 1px 5px;
  border-radius: 10px;
  line-height: 1.2;
  box-shadow: 0 0 8px var(--red-glow);
}

/* =============================================================================
   NOTICES, TITLES & PROGRESS BARS
   ============================================================================= */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 10px;
}

.notice {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(56, 44, 22, 0.7);
  border: 1px solid rgba(184, 138, 59, 0.5);
  color: #f7d898;
  font-size: 11.5px;
  margin-bottom: 13px;
  line-height: 1.55;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.notice.danger {
  background: rgba(58, 22, 32, 0.7);
  border-color: rgba(186, 52, 75, 0.5);
  color: #ff9fb2;
}

.notice.success {
  background: rgba(16, 51, 37, 0.7);
  border-color: rgba(30, 125, 90, 0.5);
  color: #79f0be;
}

/* Positions List Cards */
.position {
  padding: 13px 0;
  border-bottom: 1px solid rgba(56, 82, 123, 0.35);
}

.position:last-child {
  border: 0;
}

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

.position-ticket {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.btn-close-ticket {
  border: 0;
  background: rgba(255, 82, 116, 0.18);
  color: #ff859d;
  border: 1px solid rgba(255, 82, 116, 0.4);
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 750;
  margin-left: 8px;
  cursor: pointer;
  transition: all .2s;
}

.btn-close-ticket:hover, .btn-close-ticket:active {
  background: #ff5274;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 82, 116, 0.4);
}

/* Daily Target Progress Bar */
.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(11, 23, 48, 0.85);
  border-radius: 10px;
  overflow: hidden;
  margin: 8px 0;
  border: 1px solid rgba(56, 82, 123, 0.3);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2ee6a8, #4da6ff);
  width: 0%;
  transition: width .35s ease;
  box-shadow: 0 0 12px rgba(46, 230, 168, 0.5);
}

/* Toast Message */
.toast-msg {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  z-index: 1000;
  background: rgba(17, 29, 53, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #f3f7ff;
  border: 1px solid var(--gold);
  border-radius: 16px;
  padding: 11px 20px;
  font-size: 12.5px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 190, 59, 0.25);
  transition: transform .35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  pointer-events: none;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
}

/* Modals & Overlays */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(4, 8, 18, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 410px;
  background: linear-gradient(145deg, rgba(24, 40, 70, 0.95), rgba(14, 25, 47, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  position: relative;
}

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

.modal-close {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

hr {
  border: 0;
  border-top: 1px solid rgba(56, 82, 123, 0.35);
  margin: 14px 0;
}

footer {
  text-align: center;
  color: #64758d;
  font-size: 10.5px;
  padding: 20px 12px 10px;
  letter-spacing: 0.5px;
}

/* Desktop & Tablet responsive frames */
@media(min-width: 521px) {
  body {
    padding: 24px 0;
  }
  .app {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    overflow: hidden;
    min-height: calc(100vh - 48px);
  }
  .bottom {
    bottom: 24px;
    max-width: 480px;
  }
}
