/* TRADER ELITE — Design System 3.0 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --bg:        #060a10;
  --surface:   #0d1219;
  --card:      #141b24;
  --border:    rgba(255,255,255,0.06);
  --border-2:  rgba(255,255,255,0.12);

  --green:     #00e676;
  --green-dim: rgba(0,230,118,0.10);
  --green-glow:rgba(0,230,118,0.22);
  --red:       #ff4757;
  --red-dim:   rgba(255,71,87,0.10);
  --blue:      #2979ff;
  --blue-dim:  rgba(41,121,255,0.10);
  --gold:      #ffc400;
  --gold-dim:  rgba(255,196,0,0.10);

  --text:      #e8edf3;
  --text-dim:  #6b7785;
  --text-mid:  #9aa5b1;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  padding-bottom: 96px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'JetBrains Mono', monospace; }

/* ── CARD ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
}

/* ── LABEL ── */
.label {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  display: block;
}

/* ── STAT GRID ── */
.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--green);
  color: #000;
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: none;
  border-radius: 16px;
  height: 54px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-shadow: 0 4px 20px var(--green-glow);
  transition: opacity 0.15s, transform 0.1s;
}
.btn-primary:active { transform: scale(0.97); opacity: 0.9; }

.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text-mid);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 34px;
  padding: 0 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-ghost:active { background: rgba(255,255,255,0.08); }

/* ── INPUTS (login / config) ── */
input, select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 16px 18px;
  border-radius: 14px;
  width: 100%;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}
input:focus { border-color: var(--green); }
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── PROGRESS ── */
.progress-track {
  background: rgba(255,255,255,0.05);
  border-radius: 100px;
  height: 5px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 0.9s cubic-bezier(0.4,0,0.2,1);
}

/* ── TRADE ITEM ── */
.trade-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.trade-item:last-child { border-bottom: none; }
.trade-item:active { opacity: 0.7; }

/* ── ALERT ── */
.alert-strip {
  background: rgba(255,71,87,0.08);
  border: 1px solid rgba(255,71,87,0.2);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 20px 0 20px;
}

/* ── BOTTOM SHEET ── */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s;
}
.sheet-overlay.active { opacity: 1; pointer-events: all; }

.sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--border);
  padding: 0 20px 44px;
  z-index: 1001;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.32,0.72,0,1);
  max-height: 92vh;
  overflow-y: auto;
}
.sheet.active { transform: translateY(0); }

.sheet-handle {
  width: 32px; height: 4px;
  background: var(--border-2);
  border-radius: 2px;
  margin: 12px auto 22px;
}

/* ── SHEET INPUT ── */
.pts-input {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 36px;
  font-weight: 700;
  width: 100%;
  padding: 14px 20px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}
.pts-input:focus { border-color: var(--green); }
.pts-input::-webkit-outer-spin-button,
.pts-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── SIGN / TOGGLE BUTTONS ── */
.sign-btn {
  height: 58px;
  width: 56px;
  flex-shrink: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.18s;
  display: flex; align-items: center; justify-content: center;
}
.sign-btn.active-pos { background: var(--green-dim); border-color: var(--green); color: var(--green); }
.sign-btn.active-neg { background: var(--red-dim);   border-color: var(--red);   color: var(--red); }

.toggle-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 16px; }
.toggle-btn {
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.toggle-btn.sel-yes { background: var(--green-dim); border-color: var(--green); color: var(--green); }
.toggle-btn.sel-no  { background: var(--red-dim);   border-color: var(--red);   color: var(--red); }

/* ── CHIPS ── */
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 16px; }
.chip {
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
}
.chip.sel { background: var(--blue-dim); border-color: var(--blue); color: #7eb3ff; }

/* ── RESULT PREVIEW ── */
.result-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  text-align: center;
}

/* ── HIDDEN VALUES ── */
.hidden-value {
  filter: blur(8px) !important;
  pointer-events: none;
  user-select: none;
  transition: filter 0.25s;
}

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(6,10,16,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 8px 28px;
  z-index: 900;
  height: 80px;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex: 1;
  transition: color 0.2s;
}
.nav-item.active { color: var(--green); }
.nav-icon { font-size: 19px; line-height: 1; display: block; }

.nav-fab {
  background: var(--green);
  color: #000;
  width: 54px; height: 54px;
  border-radius: 17px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900; line-height: 1;
  border: none; cursor: pointer;
  margin-top: -18px;
  box-shadow: 0 6px 24px var(--green-glow);
  flex-shrink: 0;
  transition: transform 0.18s;
}
.nav-fab:active { transform: scale(0.92); }

/* ── BOTTOM NAV 3 ITENS (grid) ── */
.bottom-nav-3 {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(6,10,16,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 8px 24px 28px;
  z-index: 900;
  height: 80px;
}

/* ── SIDEBAR ── */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  z-index: 1099;
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s;
}
.sidebar-overlay.open { opacity: 1; pointer-events: all; }

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 288px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 1100;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.32,0.72,0,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,0.7); }

.sidebar-header {
  padding: 52px 20px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.snav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 24px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  border: none; background: none;
  width: 100%; text-align: left; cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.snav-item:active { background: rgba(255,255,255,0.04); color: var(--text); }
.snav-item.active { color: var(--green); background: var(--green-dim); border-left: 2px solid var(--green); }
.snav-item .si { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.snav-divider { height: 1px; background: var(--border); margin: 8px 20px; }

/* ── HEADER MENU BTN ── */
.menu-btn {
  background: none; border: none;
  color: var(--text); font-size: 22px;
  cursor: pointer; padding: 4px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
}

/* ── CIRCUIT BREAKER ── */
.circuit-breaker {
  background: rgba(255,71,87,0.06);
  border: 1px solid rgba(255,71,87,0.3);
  border-radius: 16px;
  padding: 16px 20px;
  margin: 12px 20px 0;
  text-align: center;
}

.nav-fab-blocked {
  background: var(--red);
  color: #fff;
  width: 54px; height: 54px;
  border-radius: 17px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; line-height: 1.2;
  text-align: center;
  border: none; cursor: pointer;
  box-shadow: 0 6px 24px rgba(255,71,87,0.3);
  flex-shrink: 0;
}

/* ── CHECKLIST MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 1200;
  display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-box {
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 0 20px 40px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32,0.72,0,1);
}
.modal-overlay.open .modal-box { transform: translateY(0); }

.check-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.check-item:last-child { border-bottom: none; }
.check-box {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--border-2);
  flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-size: 13px;
}
.check-box.checked { background: var(--green); border-color: var(--green); color: #000; }

/* ── MOOD SELECTOR ── */
.mood-group {
  display: flex; gap: 10px; margin: 10px 0 16px;
}
.mood-btn {
  flex: 1; height: 48px; border-radius: 12px;
  border: 1px solid var(--border); background: transparent;
  font-size: 22px; cursor: pointer; transition: all 0.18s;
  display: flex; align-items: center; justify-content: center;
}
.mood-btn.sel { background: var(--green-dim); border-color: var(--green); }

/* ── TEXTAREA ── */
textarea {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 14px;
  padding: 14px 16px; width: 100%; resize: none;
  outline: none; transition: border-color 0.2s; line-height: 1.6;
  margin-bottom: 12px;
}
textarea:focus { border-color: var(--green); }

/* ── MILESTONE BADGE ── */
.milestone-strip {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 0 20px 4px; scrollbar-width: none;
}
.milestone-strip::-webkit-scrollbar { display: none; }

.milestone-badge {
  flex-shrink: 0; text-align: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px; min-width: 80px;
}
.milestone-badge.done { border-color: var(--gold); background: var(--gold-dim); }
.milestone-badge.done .mb-icon { filter: none; }
.milestone-badge .mb-icon { font-size: 22px; display: block; margin-bottom: 4px; filter: grayscale(1) opacity(0.3); }
.milestone-badge .mb-label { font-size: 9px; font-weight: 900; color: var(--text-dim); text-transform: uppercase; }
.milestone-badge.done .mb-label { color: var(--gold); }

/* ── STAT PILL ── */
.adv-stat {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px; text-align: center;
}

/* ── IR TABLE ── */
.ir-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.ir-row:last-child { border-bottom: none; }

/* ── RESPONSIVE ── */
@media (max-width: 499px) {
  .sidebar { width: 100vw; }
}

@media (min-width: 500px) {
  body { max-width: 480px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); min-height: 100vh; }
  .bottom-nav { max-width: 480px; left: 50%; transform: translateX(-50%); }
  .bottom-nav-3 { max-width: 480px; left: 50%; transform: translateX(-50%); }
  .sheet { left: 50%; right: auto; width: 480px; transform: translate(-50%, 100%); }
  .sheet.active { transform: translate(-50%, 0); }
  .sheet-overlay { background: rgba(0,0,0,0.7); }
  .modal-overlay { justify-content: center; align-items: flex-end; }
  .modal-box { border-radius: 24px 24px 0 0; }
}
