/* JJ TRADER - Luxury Dark Gold Trading Platform Styles */

:root {
  --bg-dark: #080a0f;
  --bg-card: rgba(18, 22, 32, 0.75);
  --bg-card-hover: rgba(28, 34, 48, 0.85);
  --border-gold: rgba(212, 175, 55, 0.25);
  --border-gold-glow: rgba(255, 215, 0, 0.6);
  
  --gold-primary: #f5c518;
  --gold-light: #ffe57f;
  --gold-dark: #b8860b;
  --gold-gradient: linear-gradient(135deg, #ffd700 0%, #d4af37 50%, #aa7c11 100%);
  --gold-text-gradient: linear-gradient(135deg, #fff2a3 0%, #ffd700 50%, #cca010 100%);
  
  --text-main: #f0f4f8;
  --text-muted: #8a99ad;
  --text-gold: #ffd700;

  --accent-green: #00e676;
  --accent-red: #ff5252;
  --accent-cyan: #00e5ff;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', 'Cinzel', sans-serif;
  --shadow-gold: 0 4px 25px rgba(212, 175, 55, 0.15);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* LOGIN MODAL OVERLAY */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 6, 8, 0.95);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: #121620;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 24px;
  padding: 40px 36px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.25);
  text-align: center;
  position: relative;
}

.login-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.5));
  margin-bottom: 16px;
}

.login-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 11px;
  color: var(--gold-light);
  letter-spacing: 1.5px;
  margin-bottom: 24px;
  opacity: 0.85;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-input {
  width: 100%;
  background: rgba(8, 10, 15, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  font-size: 15px;
  font-family: var(--font-main);
  outline: none;
  text-align: center;
  letter-spacing: 2px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.2);
}

.btn-login {
  background: var(--gold-gradient);
  border: none;
  color: #000;
  font-weight: 800;
  font-family: var(--font-heading);
  font-size: 15px;
  padding: 13px;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
  letter-spacing: 1px;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-login:hover {
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.45);
  transform: translateY(-1px);
}

.login-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.6;
}

.login-error {
  background: rgba(255, 82, 82, 0.1);
  border: 1px solid rgba(255, 82, 82, 0.3);
  color: var(--accent-red);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  display: none;
}

.login-error.show {
  display: block;
}

/* TOP TICKER CONTAINER */
.ticker-container {
  height: 46px;
  background: rgba(8, 10, 15, 0.95);
  border-bottom: 1px solid var(--border-gold);
}

/* HEADER BANNER */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: linear-gradient(180deg, rgba(18, 22, 32, 0.95) 0%, rgba(12, 15, 22, 0.95) 100%);
  border-bottom: 1px solid var(--border-gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border-gold-glow);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.brand-tagline {
  font-size: 10px;
  color: var(--gold-light);
  letter-spacing: 1.5px;
  font-weight: 600;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid var(--border-gold);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-light);
}

.logout-btn {
  background: transparent;
  border: none;
  color: var(--accent-red);
  cursor: pointer;
  font-size: 13px;
  padding: 0 4px;
}

/* TOOLBAR CONTAINER */
.toolbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  background: rgba(12, 15, 22, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
  gap: 8px;
}

.asset-selector, .timeframe-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-btn {
  background: rgba(18, 22, 32, 0.8);
  border: 1px solid var(--border-gold);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.quick-btn:hover, .quick-btn.active {
  background: var(--gold-gradient);
  color: #000;
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

.tf-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 4px;
}

.tf-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tf-btn:hover, .tf-btn.active {
  background: rgba(255, 215, 0, 0.15);
  color: var(--gold-primary);
  border-color: var(--border-gold);
}

/* MAIN LAYOUT (2 COLUMNS) */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 16px;
  padding: 16px 24px;
  flex: 1;
}

@media (max-width: 1100px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-gold);
}

.chart-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 620px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-gold);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-badge {
  color: var(--accent-green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.chart-container {
  flex: 1;
  width: 100%;
  min-height: 560px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
}

/* SIDEBAR PANELS */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sessions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.session-chip {
  background: rgba(8, 10, 15, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
  border-radius: 8px;
  text-align: center;
  transition: all 0.2s ease;
}

.session-chip.active {
  border-color: var(--accent-green);
  background: rgba(0, 230, 118, 0.08);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.2);
}

.session-name {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.session-time {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  font-family: monospace;
}

.overlap-badge {
  margin-top: 8px;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  padding: 6px;
  border-radius: 6px;
  font-size: 11px;
  text-align: center;
  font-weight: 700;
}

.technical-wrapper {
  height: 220px;
  border-radius: 8px;
  overflow: hidden;
}

/* TOOL TABS */
.tool-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 12px;
  gap: 4px;
}

.tool-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tool-tab-btn.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
}

.tool-panel {
  display: none;
}

.tool-panel.active {
  display: block;
}

/* CALCULATORS */
.calc-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calc-input-group label {
  font-size: 10px;
  color: var(--text-muted);
}

.calc-input {
  background: rgba(8, 10, 15, 0.8);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  padding: 8px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  outline: none;
}

.risk-result-card {
  background: rgba(255, 215, 0, 0.05);
  border: 1px solid var(--border-gold);
  padding: 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.result-label {
  font-size: 10px;
  color: var(--text-muted);
}

.risk-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-green);
}

.risk-val-large {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold-primary);
}

/* PIVOT TABLE */
.pivot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 6px;
}

.pivot-table th, .pivot-table td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  text-align: center;
}

.pivot-r { color: var(--accent-red); font-weight: 700; }
.pivot-p { color: var(--gold-primary); font-weight: 700; }
.pivot-s { color: var(--accent-green); font-weight: 700; }

/* JOURNAL & ALERTS */
.journal-textarea {
  width: 100%;
  height: 80px;
  background: rgba(8, 10, 15, 0.8);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 8px 10px;
  color: #fff;
  font-size: 12px;
  font-family: var(--font-main);
  outline: none;
  resize: vertical;
}

.note-item, .alert-item {
  background: rgba(8, 10, 15, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.delete-note-btn {
  background: transparent;
  border: none;
  color: var(--accent-red);
  cursor: pointer;
  font-size: 12px;
}

/* FOOTER */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(8, 10, 15, 0.95);
  border-top: 1px solid var(--border-gold);
  font-size: 11px;
  color: var(--text-muted);
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(18, 22, 32, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-light);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  z-index: 99998;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}
