@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

/* ==========================================================================
   IQCapital Copier Premium Design System - Vanilla CSS
   ========================================================================== */

/* --- CSS Variables --- */
:root {
  --bg-primary: #FFFFFF;        /* White background */
  --bg-secondary: #0F0F0F;      /* Dark sidebar background */
  --bg-card: #FBFBFB;           /* Fast White cards */
  --bg-card-hover: #E2F3EF;     /* Green-50 Heading highlight background */
  --border-color: rgba(56, 123, 103, 0.1); /* Subtle border */
  --border-hover: #387B67;      /* Primary button/accent border */
  
  --gold-primary: #387B67;      /* Dunkelgrün for button/accent */
  --gold-secondary: #387B67;    
  --gold-glow: rgba(56, 123, 103, 0.15);
  --gold-text: #387B67;
  
  --text-primary: #000000;      /* Black text */
  --text-secondary: #333333;    
  --text-muted: #666666;        
  
  --success: #1AA87F;           /* Grün Gewinn */
  --success-glow: rgba(26, 168, 127, 0.2);
  --danger: #8E2222;            /* Rot Verlust */
  --danger-glow: rgba(142, 34, 34, 0.15);
  --warning: #CA9E3F;           /* Gelb Neutral */
  --info: #0284c7;
  
  --alert-error-text: #8E2222;
  --alert-success-text: #1AA87F;
  
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-serif: 'Outfit', -apple-system, sans-serif;
  --transition-speed: 0.3s;
  --border-radius: 14px;
}

.dark-theme, html.dark-theme {
  --bg-primary: #0F0F0F;        /* Fast Schwarz background */
  --bg-secondary: #121212;      /* Dark gray sidebar background */
  --bg-card: #121212;           /* Dunkelgrau cards */
  --bg-card-hover: rgba(56, 123, 103, 0.15);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: #387B67;
  
  --gold-primary: #387B67;      
  --gold-secondary: #387B67;    
  --gold-glow: rgba(56, 123, 103, 0.2);
  --gold-text: #387B67;
  
  --text-primary: #FFFFFF;      /* White text */
  --text-secondary: #CCCCCC;    
  --text-muted: #999999;        
  
  --success: #1AA87F;           
  --success-glow: rgba(26, 168, 127, 0.2);
  --danger: #8E2222;            
  --danger-glow: rgba(142, 34, 34, 0.15);
  --warning: #CA9E3F;           
  
  --alert-error-text: #ff9fae;
  --alert-success-text: #a7f3d0;
}


/* --- Reset & Base Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  height: 100vh;
}

a {
  color: var(--gold-secondary);
  text-decoration: none;
  transition: color var(--transition-speed);
}
a:hover {
  color: #ffffff;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(56, 123, 103, 0.2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* --- Utilities --- */
.hidden {
  display: none !important;
}
.mt-4 { margin-top: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.p-5 { padding: 3rem !important; }
.text-center { text-align: center !important; }
.gold-text { color: var(--gold-text) !important; }
.muted-text { color: var(--text-muted) !important; }
.neutral-text { color: var(--text-secondary) !important; }
.win-text { color: var(--success) !important; }
.loss-text { color: var(--danger) !important; }
.font-bold { font-weight: 700 !important; }

/* --- Alert Boxes --- */
.alert-box {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-box.error {
  background-color: rgba(142, 34, 34, 0.15);
  border: 1px solid var(--danger);
  color: var(--alert-error-text);
}
.alert-box.success {
  background-color: rgba(26, 168, 127, 0.15);
  border: 1px solid var(--success);
  color: var(--alert-success-text);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-secondary) 100%);
  color: var(--bg-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}
.btn-gold:hover {
  box-shadow: 0 0 20px var(--gold-primary);
  transform: translateY(-2px);
}
.btn-dark {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-dark:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: var(--gold-primary);
}
.btn-outline-gold {
  background-color: transparent;
  color: var(--gold-secondary);
  border: 1px solid var(--border-hover);
}
.btn-outline-gold:hover {
  background-color: var(--gold-primary);
  border-color: var(--gold-primary);
  color: var(--bg-primary);
}
.btn-outline-danger {
  background-color: transparent;
  color: var(--danger);
  border: 1px solid rgba(142, 34, 34, 0.3);
}
.btn-outline-danger:hover {
  background-color: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}
.btn-full {
  width: 100%;
}

/* --- Forms & Inputs --- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrapper i {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
}
.input-wrapper input {
  width: 100%;
  padding: 12px 12px 12px 42px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 14px;
  outline: none;
  transition: all var(--transition-speed);
}
.input-wrapper input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
  background-color: rgba(255, 255, 255, 0.07);
}
.form-row {
  display: flex;
  gap: 16px;
}
.form-row .form-group {
  flex: 1;
}
.form-row .form-group input {
  width: 100%;
  padding: 12px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 14px;
  outline: none;
  transition: all var(--transition-speed);
}
.form-row .form-group input:focus {
  border-color: var(--gold-primary);
}
.form-group select {
  padding: 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 14px;
  outline: none;
  cursor: pointer;
}
.form-group select:focus {
  border-color: var(--gold-primary);
}
.form-tip {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}


/* ==========================================================================
   AUTH WRAPPER & VIEWS
   ========================================================================== */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at center, #1b1246 0%, var(--bg-primary) 70%);
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background-color: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 1px var(--border-color);
  animation: fadeIn 0.4s ease;
}

#register-view {
  max-width: 540px;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-header .logo {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.logo-spinning i {
  font-size: 40px;
  margin-bottom: 16px;
}

.gold-glow {
  filter: drop-shadow(0 0 8px var(--gold-primary));
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.scrollable-form {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 8px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.gold-link {
  color: var(--gold-secondary);
  font-weight: 600;
}
.gold-link:hover {
  text-decoration: underline;
}

/* --- Checkout / Billing Details --- */
.subscription-plan-card {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}
.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.plan-header h3 {
  font-size: 16px;
  font-weight: 700;
}
.plan-header .price {
  font-size: 20px;
  font-weight: 800;
  color: var(--gold-text);
}
.plan-header .period {
  font-size: 12px;
  color: var(--text-secondary);
}
.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.plan-features i {
  margin-right: 6px;
}
.info-note {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(202, 158, 63, 0.08);
  border: 1px solid rgba(202, 158, 63, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--warning);
}
.security-lock {
  font-size: 14px;
}


/* ==========================================================================
   MAIN DASHBOARD WRAPPER & LAYOUT
   ========================================================================== */
.dashboard-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* --- Sidebar Style --- */
.sidebar {
  width: 280px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all var(--transition-speed) ease;
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-header .logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  display: none;
}

.user-profile-widget {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.user-profile-widget .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-primary) 0%, var(--gold-secondary) 100%);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 10px var(--gold-glow);
}

.user-profile-widget .user-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.user-profile-widget .user-info .role-badge {
  font-size: 11px;
  color: var(--gold-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
}

.nav-section-title {
  padding: 0 24px 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1.5px;
}

.sidebar-nav ul {
  list-style: none;
  margin-bottom: 24px;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all var(--transition-speed);
}

.sidebar-nav li a i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.sidebar-nav li:hover a,
.sidebar-nav li.active a {
  color: #ffffff;
  background-color: rgba(56, 123, 103, 0.05);
}

.sidebar-nav li.active a {
  border-left-color: var(--gold-primary);
  background-color: rgba(56, 123, 103, 0.08);
}

.sidebar-nav li.disabled {
  pointer-events: none;
  opacity: 0.4;
  cursor: not-allowed;
}

.sidebar-nav li.disabled a {
  cursor: not-allowed;
}

.sidebar-footer {
  margin-top: auto;
  padding: 24px;
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  margin-left: auto;
}
.badge-cyan {
  background-color: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* --- Toggles inside Menu --- */
.toggle-menu-item {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  gap: 12px;
}
.toggle-menu-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.toggle-menu-item span {
  flex: 1;
}

/* --- Switch Slide Style --- */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-primary);
  transition: .3s;
}
input:checked + .slider {
  background-color: var(--gold-primary);
}
input:checked + .slider:before {
  transform: translateX(18px);
}
.slider.round {
  border-radius: 34px;
}
.slider.round:before {
  border-radius: 50%;
}


/* --- Main Content Panel --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-primary);
}

.main-header {
  padding: 20px 40px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-header h2 {
  font-size: 22px;
  font-weight: 700;
}

.active-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  background-color: rgba(26, 168, 127, 0.1);
  border: 1px solid rgba(26, 168, 127, 0.3);
  color: var(--success);
}
.success-glow {
  box-shadow: 0 0 10px var(--success-glow);
}

.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
}

/* --- Section Animation --- */
.page-section {
  animation: slideUp 0.4s ease;
}


/* ==========================================================================
   GLASS CARDS & STATS
   ========================================================================== */
.glass-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-speed);
}
.glass-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.listening-status-card {
  max-width: 720px;
  margin: 40px auto;
  padding: 50px 40px;
}

.listening-status-card h4 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 16px;
  color: #ffffff;
}

.listening-status-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 30px;
}

.progress-bar-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-secondary));
  animation: progressPulse 2.5s infinite linear;
}

/* --- Dashboard Stat Cards --- */
.accounts-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-card .stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background-color: rgba(56, 123, 103, 0.1);
  border: 1px solid rgba(56, 123, 103, 0.2);
  color: var(--gold-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-card .stat-info span {
  font-size: 13px;
  color: var(--text-secondary);
}

.stat-card .stat-info h2 {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
}


/* ==========================================================================
   CLOUD ACCOUNTS & CARDS
   ========================================================================== */
.cloud-accounts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cloud-accounts-header h4 {
  font-size: 16px;
  font-weight: 700;
}
.cloud-accounts-header p {
  font-size: 12px;
  color: var(--text-secondary);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.account-summary-mini {
  padding: 16px 20px;
}
.account-summary-mini .label {
  font-size: 12px;
  color: var(--text-secondary);
}
.account-summary-mini h3 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
}

/* --- Filters --- */
.filter-box {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
}
.filter-box .filter-group {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-box .filter-group label {
  font-size: 12px;
  color: var(--text-secondary);
}
.filter-box .filter-group input {
  padding: 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 14px;
  outline: none;
}
.filter-box .filter-group input:focus {
  border-color: var(--gold-primary);
}

/* --- Account Cards --- */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.account-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition-speed);
}
.account-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.05);
}

.account-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.account-card-header h4 {
  font-size: 16px;
  font-weight: 700;
}
.account-card-header p {
  font-size: 12px;
  color: var(--text-secondary);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
}
.status-indicator.connected, .status-active {
  background-color: rgba(26, 168, 127, 0.15);
  color: var(--success);
  border: 1px solid rgba(26, 168, 127, 0.3);
}
.status-indicator.error, .status-error {
  background-color: rgba(142, 34, 34, 0.15);
  color: var(--danger);
  border: 1px solid rgba(142, 34, 34, 0.3);
}
.status-indicator.disconnected {
  background-color: rgba(110, 106, 146, 0.15);
  color: var(--text-secondary);
  border: 1px solid rgba(110, 106, 146, 0.3);
}
.status-indicator.suspended, .status-warning {
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.account-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.account-card-stats .stat-item {
  display: flex;
  flex-direction: column;
}
.account-card-stats .stat-item span {
  font-size: 11px;
  color: var(--text-secondary);
}
.account-card-stats .stat-item h3 {
  font-size: 16px;
  font-weight: 700;
}

.account-card-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 16px;
}

.large-icon {
  font-size: 48px;
  margin-bottom: 16px;
}


/* ==========================================================================
   TRADING JOURNAL & CHARTS
   ========================================================================== */
.journal-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}
.journal-stat-box {
  padding: 16px 20px;
}
.journal-stat-box .label {
  font-size: 12px;
  color: var(--text-secondary);
}
.journal-stat-box h3 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
}

.journal-charts-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 24px;
}

.chart-card {
  display: flex;
  flex-direction: column;
  height: 380px;
}
.chart-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}
.chart-container {
  flex: 1;
  position: relative;
  min-height: 0;
}

.win-loss-card {
  display: flex;
  flex-direction: column;
}
.win-loss-row {
  display: flex;
  gap: 16px;
  flex: 1;
}
.win-loss-row .half-box {
  flex: 1;
  border-radius: 8px;
  padding: 16px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.win-loss-row .half-box.win-color {
  background-color: rgba(26, 168, 127, 0.04);
  border-color: rgba(26, 168, 127, 0.15);
}
.win-loss-row .half-box.loss-color {
  background-color: rgba(142, 34, 34, 0.04);
  border-color: rgba(142, 34, 34, 0.15);
}
.win-loss-row .half-box span {
  font-size: 11px;
  color: var(--text-secondary);
}
.win-loss-row .half-box h3 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}
.win-loss-row .half-box h4 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
}


/* ==========================================================================
   DATA TABLES
   ========================================================================== */
.table-container {
  width: 100%;
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.data-table th,
.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
}
.data-table th {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}
.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.01);
}
.data-table td {
  color: #ffffff;
}

/* User role / status badge */
.badge-admin {
  background-color: rgba(56, 123, 103, 0.15);
  color: var(--gold-text);
  border: 1px solid rgba(56, 123, 103, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.badge-user {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.badge-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}
.badge-status.active {
  background-color: rgba(26, 168, 127, 0.15);
  color: var(--success);
  border: 1px solid rgba(26, 168, 127, 0.3);
}
.badge-status.inactive {
  background-color: rgba(110, 106, 146, 0.15);
  color: var(--text-secondary);
  border: 1px solid rgba(110, 106, 146, 0.3);
}


/* ==========================================================================
   SYSTEM LOGS VIEW
   ========================================================================== */
.logs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 16px;
}
.logs-console {
  background-color: #05040f;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 20px;
  font-family: monospace;
  font-size: 13px;
  height: 400px;
  overflow-y: auto;
  color: #a7f3d0;
  margin-top: 20px;
}
.log-line {
  margin-bottom: 6px;
  line-height: 1.6;
}
.log-time {
  color: var(--text-muted);
}
.log-tag {
  font-weight: 700;
}
.log-tag.tag-info {
  color: #3b82f6;
}
.log-tag.tag-success {
  color: var(--success);
}
.log-tag.tag-error {
  color: var(--danger);
}


/* ==========================================================================
   ADMIN PANEL DASHBOARD
   ========================================================================== */
.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.metric-box {
  padding: 20px;
}
.metric-box .label {
  font-size: 12px;
  color: var(--text-secondary);
}
.metric-box h2 {
  font-size: 32px;
  font-weight: 800;
  margin-top: 4px;
}
.metric-box p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.admin-actions-cell {
  display: flex;
  gap: 8px;
  align-items: center;
}


/* ==========================================================================
   RESPONSIVE STYLING & ANIMATIONS
   ========================================================================== */

/* --- Media Queries --- */
@media (max-width: 991px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    height: 100vh;
    z-index: 1000;
  }
  .sidebar.open {
    left: 0;
    box-shadow: 5px 0 25px rgba(0,0,0,0.5);
  }
  .sidebar-toggle {
    display: block;
  }
  .main-header {
    padding: 16px 20px;
  }
  .content-body {
    padding: 20px;
  }
  .journal-charts-row {
    grid-template-columns: 1fr;
  }
}

/* --- Keyframe Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes progressPulse {
  0% { transform: scaleX(0.01); transform-origin: left; }
  50% { transform: scaleX(0.99); transform-origin: left; }
  51% { transform: scaleX(0.99); transform-origin: right; }
  100% { transform: scaleX(0.01); transform-origin: right; }
}

/* --- Journal Performance Grid --- */
.journal-performance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.performance-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.performance-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
  margin-bottom: 8px;
}

/* --- Journal Header Selector Row --- */
.journal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* --- PREMIUM LIGHT-MODE DESIGN THEME OVERRIDES --- */

/* Serif typography for headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-serif);
  color: var(--gold-secondary) !important;
}

/* Sidebar exclusions (since it is a dark section using --bg-secondary) */
.sidebar, 
.sidebar h1, 
.sidebar h2, 
.sidebar h3, 
.sidebar h4, 
.sidebar h5, 
.sidebar h6,
.sidebar span,
.sidebar a {
  font-family: var(--font-family) !important; /* Keep sans-serif in sidebar */
}

.sidebar-header .logo {
  color: #ffffff !important;
}
.sidebar-header .logo i {
  color: var(--gold-primary) !important;
}

.user-profile-widget .user-info h4 {
  color: #ffffff !important;
}

.user-profile-widget .user-info .role-badge {
  color: #1AA87F !important; /* Green-300 highlight */
}

/* Sidebar navigation links */
.sidebar-nav li a {
  color: #E2F3EF !important; /* Green-50 */
}
.sidebar-nav li a i {
  color: #45917C !important; /* Green-400 */
}
.sidebar-nav li:hover a,
.sidebar-nav li.active a {
  color: var(--gold-primary) !important; /* Brand Dunkelgrün */
  background-color: rgba(56, 123, 103, 0.05) !important;
}
.sidebar-nav li.active a {
  border-left-color: var(--gold-primary) !important;
  background-color: rgba(56, 123, 103, 0.1) !important;
}
.sidebar-nav li.active a i {
  color: var(--gold-primary) !important;
}

/* Responsive card adjustments using theme CSS variables */
.glass-card {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
  color: var(--text-primary) !important;
}
.glass-card:hover {
  background-color: var(--bg-card) !important;
  border-color: var(--border-hover) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08) !important;
}

/* Auth views wrapper radial gradient */
.auth-wrapper {
  background: radial-gradient(circle at center, var(--bg-card) 0%, var(--bg-primary) 100%) !important;
}
.auth-card {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06) !important;
}
.auth-card h2, .auth-card h3, .auth-card p, .auth-card label, .auth-card .auth-footer p {
  color: var(--text-primary) !important;
}
.auth-card .logo {
  color: var(--gold-secondary) !important;
}

/* Inputs and Forms (making them adapt dynamically) */
.input-wrapper input,
.form-row .form-group input,
.form-group select {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
}
.input-wrapper input::placeholder,
.form-row .form-group input::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.6;
}
.input-wrapper input:focus,
.form-row .form-group input:focus,
.form-group select:focus {
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 8px var(--gold-glow) !important;
  background-color: var(--bg-card) !important;
}

/* Data Tables */
.data-table th {
  background-color: var(--bg-card-hover) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
}
.data-table td {
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
}
.data-table tbody tr:hover {
  background-color: rgba(56, 123, 103, 0.03) !important;
}

/* Buttons adjustments */
.btn-dark {
  background-color: var(--gold-secondary) !important;
  color: #ffffff !important;
  border: 1px solid var(--border-color) !important;
}
.btn-dark:hover {
  background-color: var(--bg-secondary) !important;
}
.btn-outline-gold {
  color: var(--gold-primary) !important;
  border-color: var(--gold-primary) !important;
}
.btn-outline-gold:hover {
  background-color: var(--bg-card-hover) !important;
}

/* General Link hover state */
a:hover {
  color: var(--gold-primary) !important;
}

/* Status logs and details */
.log-item, .status-item {
  border-bottom: 1px solid var(--border-color) !important;
}
.status-item .label, .info-row .label {
  color: var(--text-secondary) !important;
}
.status-item .value, .info-row .value {
  color: var(--text-primary) !important;
}

/* Modal adjustments */
.modal-content {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
}

/* Top bar / dashboard header status badges */
.cloud-sync-btn {
  background-color: var(--bg-card-hover) !important;
  color: var(--gold-primary) !important;
  border: 1px solid var(--border-color) !important;
}

/* Checkbox switches */
.switch input:checked + .slider {
  background-color: var(--gold-primary) !important;
}
.slider {
  background-color: rgba(0, 56, 40, 0.1) !important;
}

/* User Badges */
.badge-user {
  background-color: rgba(0, 56, 40, 0.05) !important;
  color: var(--text-secondary) !important;
  border: 1px solid rgba(0, 56, 40, 0.1) !important;
}
.badge-admin {
  background-color: #E2F3EF !important;
  color: var(--gold-secondary) !important;
  border: 1px solid rgba(34, 142, 113, 0.2) !important;
}


/* ==========================================================================
   P&L CALENDAR & NEW JOURNAL WIDGETS
   ========================================================================== */

.calendar-card {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 400px;
  padding-bottom: 20px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-month-selector {
  display: flex;
  align-items: center;
  gap: 16px;
}

.calendar-month-selector button {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px !important;
  border-radius: 6px;
  transition: background-color 0.2s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-month-selector button:hover {
  background-color: var(--bg-card-hover) !important;
}

.calendar-month-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 100px;
  text-align: center;
  display: block;
}

.calendar-monthly-pnl {
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
  display: block;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  flex: 1;
}

.calendar-header-cell {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-color);
}

.calendar-day-cell {
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 48px;
  position: relative;
  box-sizing: border-box;
}

.calendar-day-cell.adjacent-month {
  opacity: 0.25;
}

.calendar-day-number {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  align-self: flex-start;
}

.calendar-day-pnl {
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  margin-top: 2px;
}

.calendar-day-stats {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  margin-top: 1px;
}

/* Green and Red Day Colors (matched to theme) */
.calendar-day-cell.win-day {
  background-color: rgba(26, 168, 127, 0.9) !important;
  border-color: rgba(26, 168, 127, 0.9) !important;
}
.calendar-day-cell.win-day .calendar-day-number,
.calendar-day-cell.win-day .calendar-day-pnl,
.calendar-day-cell.win-day .calendar-day-stats {
  color: #ffffff !important;
}

.calendar-day-cell.loss-day {
  background-color: rgba(142, 34, 34, 0.9) !important;
  border-color: rgba(142, 34, 34, 0.9) !important;
}
.calendar-day-cell.loss-day .calendar-day-number,
.calendar-day-cell.loss-day .calendar-day-pnl,
.calendar-day-cell.loss-day .calendar-day-stats {
  color: #ffffff !important;
}

/* Week column specific styling */
.calendar-day-cell.week-column {
  background-color: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.calendar-day-cell.week-column .calendar-day-number {
  font-weight: 700;
  color: var(--gold-primary) !important;
}

.calendar-day-cell.week-column .calendar-day-pnl {
  color: var(--text-primary);
}

.calendar-day-cell.week-column .calendar-day-stats {
  color: var(--text-secondary);
}

/* Layout for Streaks, Long/Short, and Win/Loss Analysis Row */
.journal-performance-widgets-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.widget-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px !important;
  box-sizing: border-box;
}

.widget-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.widget-divider {
  width: 1px;
  height: 32px;
  background-color: var(--border-color);
}

/* Custom Popup Modal styling */
.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.custom-modal.show {
  opacity: 1;
  pointer-events: auto;
}
.custom-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}
.custom-modal.show .custom-modal-content {
  transform: translateY(0);
}
.custom-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 20px;
}
.custom-modal-header h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
}
.custom-modal-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s;
}
.custom-modal-close-btn:hover {
  color: var(--gold-primary);
}
.custom-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}




