/* 
  iNinja85 Trading Journal MVP Stylesheet
  Theme: Premium Dark Mode
  Accent Colors: Neon Green to Electric Purple Gradient
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #08080c;
  --bg-secondary: #111117;
  --bg-tertiary: #181822;
  --bg-glass: rgba(17, 17, 23, 0.7);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(157, 78, 221, 0.15);
  
  --text-main: #ffffff;
  --text-muted: #8b8b9f;
  --text-dark: #52526b;
  
  /* Primary Green to Purple Gradient Colors */
  --color-green: #00FF87;
  --color-purple: #B026FF;
  --color-red: #ff3366;
  --color-blue: #00d2ff;
  
  --gradient-primary: linear-gradient(135deg, var(--color-green) 0%, var(--color-purple) 100%);
  --gradient-card: linear-gradient(180deg, rgba(24, 24, 34, 0.8) 0%, rgba(17, 17, 23, 0.9) 100%);
  --gradient-glow: 0 0 20px rgba(0, 255, 135, 0.15), 0 0 20px rgba(176, 38, 255, 0.15);
  
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 280px;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

body {

  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 255, 135, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(176, 38, 255, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button, input, select, textarea {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dark);
}

/* Layout Framework */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.main-content {
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  padding: 2.5rem;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  transition: var(--transition);
}



/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  padding: 2rem 1.5rem;
  transition: var(--transition);
}

.sidebar-logo {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 2rem;
}

.logo-main {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-main span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-main i {
  background: linear-gradient(135deg, var(--color-green) 0%, var(--color-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 5px rgba(0, 255, 135, 0.4));
}


.logo-sub {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

/* Mantra Card */
.mantra-card {
  background: rgba(176, 38, 255, 0.03);
  border: 1px solid rgba(176, 38, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.mantra-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 3px;
  background: var(--gradient-primary);
}

.mantra-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-purple);
  margin-bottom: 0.35rem;
  letter-spacing: 1px;
}

.mantra-text {
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--text-main);
  font-weight: 500;
}

/* Sidebar Menu */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.menu-item a i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  transition: var(--transition);
}

.menu-item:hover a,
.menu-item.active a {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.menu-item.active a {
  background: linear-gradient(90deg, rgba(0, 255, 135, 0.08) 0%, rgba(176, 38, 255, 0.08) 100%);
  border: 1px solid rgba(157, 78, 221, 0.2);
  color: #fff;
}

.menu-item.active a i {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-dark);
  text-align: center;
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.welcome-section h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.welcome-section p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #000;
  box-shadow: 0 4px 15px rgba(0, 255, 135, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 135, 0.35);
  color: #000;
}

.btn-secondary {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-dark);
  transform: translateY(-2px);
}

.btn-purple {
  background: rgba(176, 38, 255, 0.1);
  border: 1px solid rgba(176, 38, 255, 0.3);
  color: #e0b0ff;
}

.btn-purple:hover {
  background: rgba(176, 38, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(176, 38, 255, 0.3);
}

.btn-danger {
  background: rgba(255, 51, 102, 0.1);
  border: 1px solid rgba(255, 51, 102, 0.3);
  color: var(--color-red);
}

.btn-danger:hover {
  background: rgba(255, 51, 102, 0.2);
  transform: translateY(-2px);
}

/* Premium Card Panels */
.card-panel {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  transition: var(--transition);
}

.card-panel:hover {
  border-color: rgba(157, 78, 221, 0.2);
  box-shadow: var(--border-glow);
}

.card-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title i {
  color: var(--color-purple);
}

/* KPI Summary Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.weekly-monthly-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
}


.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kpi-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.kpi-value.positive {
  color: var(--color-green);
  text-shadow: 0 0 10px rgba(0, 255, 135, 0.2);
}

.kpi-value.negative {
  color: var(--color-red);
  text-shadow: 0 0 10px rgba(255, 51, 102, 0.2);
}

.kpi-change {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.kpi-change.up { color: var(--color-green); }
.kpi-change.down { color: var(--color-red); }

/* Main Dashboard Layout Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.full-width {
  grid-column: 1 / -1;
}

/* Equity and Performance Charts Styling */
.chart-container {
  position: relative;
  width: 100%;
  height: 320px;
}

/* Custom Rule Score Progress Gauge */
.score-circle-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
  position: relative;
}

.score-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-purple);
  text-shadow: 0 0 15px rgba(176, 38, 255, 0.3);
}

.score-max {
  font-size: 1rem;
  color: var(--text-muted);
}

.score-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  margin-top: 1rem;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 1s ease-in-out;
}

/* Table Style UI */
.table-wrapper {
  overflow-x: auto;
  width: 100%;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  padding: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  letter-spacing: 0.5px;
}

.custom-table td {
  padding: 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

/* Badges styling */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-long {
  background: rgba(0, 255, 135, 0.1);
  color: var(--color-green);
  border: 1px solid rgba(0, 255, 135, 0.2);
}

.badge-short {
  background: rgba(255, 51, 102, 0.1);
  color: var(--color-red);
  border: 1px solid rgba(255, 51, 102, 0.2);
}

.badge-win {
  background: rgba(0, 255, 135, 0.15);
  color: var(--color-green);
}

.badge-loss {
  background: rgba(255, 51, 102, 0.15);
  color: var(--color-red);
}

.badge-be {
  background: rgba(139, 139, 159, 0.15);
  color: var(--text-muted);
}

.badge-session {
  background: rgba(176, 38, 255, 0.1);
  color: #d896ff;
  border: 1px solid rgba(176, 38, 255, 0.2);
}

/* Forms Elements & Form Controls */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  transition: var(--transition);
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-purple);
  box-shadow: 0 0 10px rgba(176, 38, 255, 0.25);
  background: var(--bg-tertiary);
}

/* Direction selector */
.direction-toggle {
  display: flex;
  gap: 1rem;
}

.direction-btn {
  flex: 1;
  padding: 0.85rem;
  border-radius: 10px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  transition: var(--transition);
}

.direction-btn.long.active {
  background: rgba(0, 255, 135, 0.15);
  border-color: var(--color-green);
  color: var(--color-green);
  box-shadow: 0 0 15px rgba(0, 255, 135, 0.15);
}

.direction-btn.short.active {
  background: rgba(255, 51, 102, 0.15);
  border-color: var(--color-red);
  color: var(--color-red);
  box-shadow: 0 0 15px rgba(255, 51, 102, 0.15);
}

/* Rule checklist selector on Form */
.rules-checklist-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: 12px;
  max-height: 250px;
  overflow-y: auto;
}

.rule-check-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.35rem 0;
}

.rule-check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-purple);
  cursor: pointer;
}

.rule-check-text {
  font-size: 0.9rem;
  color: var(--text-main);
}

/* Image Upload Preview Area */
.screenshot-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 600px) {
  .screenshot-upload-grid {
    grid-template-columns: 1fr;
  }
}

.screenshot-box {
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  background: var(--bg-secondary);
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.screenshot-box:hover {
  border-color: var(--color-purple);
  color: var(--text-main);
  background: var(--bg-tertiary);
}

.screenshot-box img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screenshot-box input[type="file"] {
  display: none;
}

.screenshot-box-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Live Entry Preview Panel */
.live-preview-panel {
  position: sticky;
  top: 2rem;
  border-color: rgba(176, 38, 255, 0.3);
  box-shadow: 0 0 15px rgba(176, 38, 255, 0.05);
}

.live-preview-title {
  color: var(--color-purple);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.preview-field {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  font-size: 0.9rem;
}

.preview-field-label {
  color: var(--text-muted);
}

.preview-field-val {
  font-weight: 600;
}

.preview-badge-status {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin: 1.5rem 0;
}

/* Trading Calendar Grid UI */
.calendar-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
}

.calendar-day-name {
  text-align: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0.5rem 0;
}

.calendar-day {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  aspect-ratio: 1;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.calendar-day:hover {
  transform: translateY(-2px);
  border-color: rgba(176, 38, 255, 0.3);
  box-shadow: 0 4px 15px rgba(176, 38, 255, 0.1);
}

.calendar-day.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
  pointer-events: none;
}

.day-number {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.day-pnl {
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
}

.day-pnl.profit {
  color: var(--color-green);
  text-shadow: 0 0 5px rgba(0, 255, 135, 0.3);
}

.day-pnl.loss {
  color: var(--color-red);
  text-shadow: 0 0 5px rgba(255, 51, 102, 0.3);
}

.calendar-day.profit-day {
  background: linear-gradient(135deg, var(--bg-secondary) 60%, rgba(0, 255, 135, 0.06) 100%);
  border-color: rgba(0, 255, 135, 0.15);
}

.calendar-day.loss-day {
  background: linear-gradient(135deg, var(--bg-secondary) 60%, rgba(255, 51, 102, 0.06) 100%);
  border-color: rgba(255, 51, 102, 0.15);
}

/* Modal Popup Window */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 650px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: var(--transition);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
  border-color: rgba(176, 38, 255, 0.3);
  box-shadow: 0 0 30px rgba(176, 38, 255, 0.15);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

/* Search and Filters Bar style */
.filter-bar {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

@media (max-width: 992px) {
  .filter-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .filter-bar .btn {
    grid-column: 1 / -1;
  }
}

/* Rule Adherence Stats on Analytics */
.adherence-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.adherence-label {
  font-size: 0.9rem;
}

.adherence-score-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
}

.adherence-score-badge.high {
  background: rgba(0, 255, 135, 0.15);
  color: var(--color-green);
}

.adherence-score-badge.mid {
  background: rgba(255, 152, 0, 0.15);
  color: #ff9800;
}

.adherence-score-badge.low {
  background: rgba(255, 51, 102, 0.15);
  color: var(--color-red);
}

/* General Custom Tags */
.tag-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  color: var(--text-muted);
}

/* Emotional state emojis */
.emoji-badge {
  font-size: 1.1rem;
  vertical-align: middle;
  margin-right: 0.25rem;
}

/* Settings Settings items lists style */
.settings-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

/* Mobile Helper Default Rules */
.mobile-header {
  display: none;
}
.sidebar-close {
  display: none;
}
.sidebar-overlay-bg {
  display: none;
}

/* Responsive details */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 80px;
  }
  
  .sidebar-logo .logo-main span,
  .sidebar-logo .logo-sub,
  .mantra-card,
  .menu-item-text,
  .sidebar-footer {
    display: none;
  }
  
  .sidebar-logo {
    align-items: center;
    margin-bottom: 3rem;
  }
  
  .menu-item a {
    justify-content: center;
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px !important;
  }

  body {
    display: block !important;
  }

  .app-container {
    display: block !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }



  /* Mobile Header Top Navigation Bar */
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 101;
  }

  .mobile-header .logo-main {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .hamburger-toggle {
    font-size: 1.25rem;
    color: var(--text-main);
    cursor: pointer;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: var(--transition);
  }

  .hamburger-toggle:hover {
    border-color: var(--color-purple);
    box-shadow: 0 0 10px rgba(176, 38, 255, 0.2);
  }

  /* Close Button in Sidebar Mobile */
  .sidebar-close {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    z-index: 102;
  }

  .sidebar-close:hover {
    color: var(--color-purple);
  }

  /* Sliding Sidebar Drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px; /* Hide offscreen */
    width: 280px;
    height: 100vh;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
  }

  .sidebar.active {
    left: 0; /* Slide in */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(176, 38, 255, 0.1);
  }

  /* Show Logo & Texts in Mobile Drawer */
  .sidebar-logo .logo-main span,
  .sidebar-logo .logo-sub,
  .mantra-card,
  .menu-item-text,
  .sidebar-footer {
    display: block;
  }

  .sidebar-logo {
    align-items: flex-start;
    margin-bottom: 2rem;
  }

  .menu-item a {
    justify-content: flex-start;
    padding: 0.85rem 1rem;
  }

  /* Mobile overlay background */
  .sidebar-overlay-bg {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .sidebar-overlay-bg.active {
    opacity: 1;
    pointer-events: auto;
  }

  .main-content {
    margin: 0 !important;
    padding: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    gap: 1rem !important;
  }

  .table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .chart-container {
    height: 180px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }


  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch !important;
  }

  .weekly-monthly-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch !important;
  }

  .weekly-monthly-grid .card-panel {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch !important;
  }

  .card-panel {
    padding: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    align-self: stretch !important;
    min-width: 0 !important;
  }

  .kpi-value {
    font-size: 1.3rem !important;
  }

  .kpi-label {
    font-size: 0.68rem !important;
  }

  .dashboard-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 1rem !important;
    align-self: stretch !important;
  }

  .dashboard-column {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    align-self: stretch !important;
    min-width: 0 !important;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .header-actions .btn {
    width: 100%;
  }

  /* Calendar Responsive Grid Adjustments */
  .calendar-grid {
    gap: 0.35rem !important;
  }

  .calendar-day {
    padding: 0.25rem !important;
  }

  .day-number {
    font-size: 0.75rem !important;
  }

  .day-pnl {
    font-size: 0.6rem !important;
  }
}

/* Mistake Tags on Calendar Modal */
.mistake-pill {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.mistake-pill:hover {
  border-color: var(--color-purple);
  color: var(--text-main);
}

.mistake-pill.active {
  background: var(--color-purple) !important;
  color: white !important;
  border-color: var(--color-purple) !important;
  box-shadow: 0 0 10px rgba(176, 38, 255, 0.4);
}

/* Integrated KPI and Weekly/Monthly Grid Styling */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.dashboard-kpi-grid .weekly-monthly-card {
  min-height: 100px;
}

/* Desktop Auto-fit Layout Optimization for Wide / Ultrawide screens */
@media (min-width: 1400px) {
  /* Tighter spacing & padding to reduce vertical scroll requirement */
  .dashboard-main {
    padding: 1.5rem 2rem !important;
    gap: 1.25rem !important;
  }

  .dashboard-main .dashboard-header {
    margin-bottom: 0;
  }

  .dashboard-main .welcome-section h1 {
    font-size: 1.5rem;
  }

  .dashboard-main .welcome-section p {
    font-size: 0.85rem;
  }

  /* Compact KPI row spanning all 7 cards horizontally */
  .dashboard-main .dashboard-kpi-grid {
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 1rem !important;
  }

  .dashboard-main .card-panel {
    padding: 1.25rem !important;
  }

  .dashboard-main .kpi-value {
    font-size: 1.4rem !important;
  }

  .dashboard-main .kpi-label {
    font-size: 0.72rem !important;
  }

  /* Reorganize Dashboard Main Grid into a 4-column layout */
  .dashboard-main .dashboard-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.25rem !important;
  }

  /* Use display: contents so children cards participate directly in the parent grid */
  .dashboard-main .dashboard-column {
    display: contents !important;
  }

  /* Row 1: Charts sitting side-by-side (2 columns each) */
  .dashboard-main .dashboard-column:nth-of-type(1) > .card-panel {
    grid-column: span 2 !important;
  }

  /* Row 2: Adherence (1 col), Outcomes (2 cols), Insights (1 col) */
  .dashboard-main .dashboard-column:nth-of-type(2) > .card-panel:nth-of-type(1) {
    grid-column: span 1 !important;
  }
  .dashboard-main .dashboard-column:nth-of-type(2) > .card-panel:nth-of-type(2) {
    grid-column: span 2 !important;
  }
  .dashboard-main .dashboard-column:nth-of-type(2) > .card-panel:nth-of-type(3) {
    grid-column: span 1 !important;
  }

  /* Row 3: Recent executed trades table spans full width (4 columns) */
  .dashboard-main .full-width {
    grid-column: span 4 !important;
  }

  /* Tighter heights on charts to guarantee everything fits without scrolling */
  .dashboard-main .chart-container {
    height: 230px !important;
  }

  .dashboard-main .dashboard-column:nth-of-type(2) > .card-panel:nth-of-type(2) .chart-container {
    height: 160px !important; /* Outcomes Doughnut chart height */
  }

  .dashboard-main .score-circle-wrapper {
    padding: 0.25rem 0 !important;
  }

  .dashboard-main .score-value {
    font-size: 2.2rem !important;
  }
}



