/* 
  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-green-rgb: 0, 255, 135;
  --color-purple: #B026FF;
  --color-purple-rgb: 176, 38, 255;
  --color-red: #ff3366;
  --color-blue: #00d2ff;
  --theme-hue-rotate: 0deg;
  
  --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(var(--color-green-rgb), 0.15), 0 0 20px rgba(var(--color-purple-rgb), 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: 250px;
}

/* Theme Selection Overrides */
/* 2. Midnight Blue */
:root[data-theme="midnight-blue"] {
  --bg-primary: #020617; 
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --bg-glass: rgba(15, 23, 42, 0.8);
  --border-color: rgba(6, 182, 212, 0.2);
  --border-glow: rgba(6, 182, 212, 0.15);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #475569;
  
  --color-green: #06b6d4; 
  --color-green-rgb: 6, 182, 212;
  --color-purple: #3b82f6; 
  --color-purple-rgb: 59, 130, 246;
  --color-red: #ef4444;
  --color-blue: #0ea5e9;
  --theme-hue-rotate: 70deg;
  
  --gradient-primary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-card: linear-gradient(180deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
}

/* 3. Crimson */
:root[data-theme="crimson"] {
  --bg-primary: #0a0a0a; 
  --bg-secondary: #171717;
  --bg-tertiary: #262626;
  --bg-glass: rgba(23, 23, 23, 0.8);
  --border-color: rgba(220, 38, 38, 0.2); 
  --border-glow: rgba(220, 38, 38, 0.15);
  
  --text-main: #fafafa;
  --text-muted: #a3a3a3;
  --text-dark: #525252;
  
  --color-green: #dc2626; 
  --color-green-rgb: 220, 38, 38;
  --color-purple: #991b1b; 
  --color-purple-rgb: 153, 27, 27;
  --color-red: #ef4444;
  --color-blue: #ef4444;
  --theme-hue-rotate: 220deg;
  
  --gradient-primary: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  --gradient-card: linear-gradient(180deg, rgba(38, 38, 38, 0.8) 0%, rgba(23, 23, 23, 0.9) 100%);
}

/* 4. Royal Gold */
:root[data-theme="royal-gold"] {
  --bg-primary: #000000; 
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-glass: rgba(17, 17, 17, 0.8);
  --border-color: rgba(234, 179, 8, 0.2); 
  --border-glow: rgba(234, 179, 8, 0.15);
  
  --text-main: #fefce8;
  --text-muted: #a1a1aa;
  --text-dark: #52525b;
  
  --color-green: #eab308; 
  --color-green-rgb: 234, 179, 8;
  --color-purple: #ca8a04; 
  --color-purple-rgb: 202, 138, 4;
  --color-red: #ef4444;
  --color-blue: #fde047;
  --theme-hue-rotate: 265deg;
  
  --gradient-primary: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
  --gradient-card: linear-gradient(180deg, rgba(26, 26, 26, 0.8) 0%, rgba(17, 17, 23, 0.9) 100%);
}

/* 5. Arctic */
:root[data-theme="arctic"] {
  --bg-primary: #1e293b; 
  --bg-secondary: #334155;
  --bg-tertiary: #475569;
  --bg-glass: rgba(51, 65, 85, 0.8);
  --border-color: rgba(226, 232, 240, 0.15); 
  --border-glow: rgba(186, 230, 253, 0.15);
  
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-dark: #64748b;
  
  --color-green: #bae6fd; 
  --color-green-rgb: 186, 230, 253;
  --color-purple: #e0f2fe; 
  --color-purple-rgb: 224, 242, 254;
  --color-red: #ef4444;
  --color-blue: #7dd3fc;
  --theme-hue-rotate: 55deg;
  
  --gradient-primary: linear-gradient(135deg, #bae6fd 0%, #e0f2fe 100%);
  --gradient-card: linear-gradient(180deg, rgba(71, 85, 105, 0.8) 0%, rgba(51, 65, 85, 0.9) 100%);
}

/* 6. Emerald */
:root[data-theme="emerald"] {
  --bg-primary: #18181b; 
  --bg-secondary: #27272a;
  --bg-tertiary: #3f3f46;
  --bg-glass: rgba(39, 39, 42, 0.8);
  --border-color: rgba(16, 185, 129, 0.2); 
  --border-glow: rgba(16, 185, 129, 0.15);
  
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dark: #52525b;
  
  --color-green: #10b981; 
  --color-green-rgb: 16, 185, 129;
  --color-purple: #059669; 
  --color-purple-rgb: 5, 150, 105;
  --color-red: #ef4444;
  --color-blue: #34d399;
  --theme-hue-rotate: 10deg;
  
  --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-card: linear-gradient(180deg, rgba(63, 63, 70, 0.8) 0%, rgba(39, 39, 42, 0.9) 100%);
}

/* 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;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  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 {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

.main-content {
  position: relative;
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  padding: 1.5rem 1.75rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: var(--transition);
  overflow-x: hidden;
  box-sizing: border-box;
}



/* 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: 1.25rem 1.15rem;
  transition: var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Sleek Cyberpunk Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
  width: 5px;
}
.sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(176, 38, 255, 0.3);
  border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 135, 0.6);
}

.sidebar-logo {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.logo-main {
  font-size: 1.65rem;
  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.7rem;
  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: 10px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

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

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

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

/* Sidebar Menu */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  margin-bottom: 0.75rem;
}

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

.menu-item a i {
  font-size: 1.05rem;
  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: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.72rem;
  color: var(--text-dark);
  text-align: center;
  flex-shrink: 0;
}

/* 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(175px, 1fr));
  gap: 1.15rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.weekly-monthly-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}


.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: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition);
  width: 100%;
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.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(8, 1fr);
  gap: 0.75rem;
}

.calendar-day.week-summary-day {
  background: rgba(176, 38, 255, 0.03);
  border-color: rgba(176, 38, 255, 0.15);
  box-shadow: inset 0 0 10px rgba(176, 38, 255, 0.05);
}

.calendar-day.week-summary-day.week-profit {
  background: linear-gradient(135deg, rgba(176, 38, 255, 0.04) 60%, rgba(0, 255, 135, 0.06) 100%);
  border-color: rgba(0, 255, 135, 0.25);
}

.calendar-day.week-summary-day.week-loss {
  background: linear-gradient(135deg, rgba(176, 38, 255, 0.04) 60%, rgba(255, 51, 102, 0.06) 100%);
  border-color: rgba(255, 51, 102, 0.25);
}

.calendar-day-name {
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem !important;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.75rem 0;
}

.calendar-day {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  min-height: 125px !important;
  aspect-ratio: auto !important;
  padding: 0.85rem !important;
  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.4);
  box-shadow: 0 4px 18px rgba(176, 38, 255, 0.15);
}

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

.day-number {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #fff !important;
}

.day-pnl {
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  text-align: center;
}

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

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

.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;
}

/* Laptop / Standard Desktop Screen Layouts */
@media (min-width: 1100px) and (max-width: 1399px) {
  .kpi-metrics-row,
  .dashboard-kpi-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 1rem !important;
  }
  .weekly-monthly-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }
  .phase4-interactive-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.25rem !important;
  }
}

/* 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 the 5 core metric cards horizontally */
  .dashboard-main .dashboard-kpi-grid,
  .dashboard-main .kpi-metrics-row {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 1rem !important;
  }

  .dashboard-main .weekly-monthly-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }

  .dashboard-main .phase4-interactive-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.25rem !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;
  }
}

/* Phase 4: Gamified Jarvis AI & Interactive UI Styles */
.gamified-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(26, 26, 36, 0.9) 0%, rgba(176, 38, 255, 0.12) 100%);
  border: 1px solid rgba(176, 38, 255, 0.3);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.xp-progress-bar-container {
  flex: 0 0 auto !important;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  height: 8px !important;
  max-height: 8px !important;
  overflow: hidden;
  position: relative;
  margin-top: 0.85rem;
}

.xp-progress-bar-fill {
  background: var(--gradient-primary);
  height: 100%;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(0, 255, 135, 0.6);
}

.ninja-avatar-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ninja-mask-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(17, 17, 23, 0.95) 0%, rgba(8, 8, 12, 1) 100%);
  border: 3px solid var(--color-green);
  box-shadow: 0 0 25px rgba(0, 255, 135, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.4s ease;
  margin-bottom: 1rem;
}

.ninja-mask-circle[data-skin="cyber_ninja"] {
  border-color: var(--color-purple);
  box-shadow: 0 0 25px rgba(176, 38, 255, 0.5);
}

.ninja-mask-circle[data-skin="golden_master"] {
  border-color: #ffd700;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.ninja-mask-kanji {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 0 0 12px #ffd700;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
}

.pomodoro-card .timer-digits {
  font-size: 3rem;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 800;
  color: var(--color-green);
  text-shadow: 0 0 15px rgba(0, 255, 135, 0.4);
  margin: 0.5rem 0;
}

.sound-wave-box {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 20px;
}

.sound-wave-bar {
  width: 4px;
  background: var(--color-purple);
  border-radius: 2px;
  animation: soundPulse 1s infinite ease-in-out alternate;
}

.sound-wave-bar:nth-child(2) { animation-delay: 0.2s; height: 16px; }
.sound-wave-bar:nth-child(3) { animation-delay: 0.4s; height: 10px; }
.sound-wave-bar:nth-child(4) { animation-delay: 0.1s; height: 18px; }
.sound-wave-bar:nth-child(5) { animation-delay: 0.3s; height: 12px; }

@keyframes soundPulse {
  0% { transform: scaleY(0.4); opacity: 0.5; }
  100% { transform: scaleY(1.4); opacity: 1; }
}

.jarvis-chat-log {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.5rem 0;
}

.jarvis-msg {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.jarvis-msg.user {
  background: rgba(176, 38, 255, 0.15);
  border: 1px solid rgba(176, 38, 255, 0.3);
  align-self: flex-end;
  color: #fff;
  max-width: 85%;
}

.jarvis-msg.assistant {
  background: rgba(24, 24, 34, 0.9);
  border: 1px solid var(--border-color);
  align-self: flex-start;
  color: #e0e0f0;
  max-width: 95%;
}

/* =========================================================
   CYBERPUNK COCKPIT UI (iNINJA85 AI JOURNAL ASSISTANT)
   ========================================================= */
.cyber-cockpit-grid {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(260px, 1.8fr) minmax(210px, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.5rem;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 1450px) {
  .cyber-cockpit-grid {
    grid-template-columns: minmax(200px, 1fr) minmax(240px, 1.4fr) minmax(200px, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 1250px) {
  .cyber-cockpit-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cyber-cockpit-grid > *:nth-child(3) {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .cyber-cockpit-grid {
    grid-template-columns: 1fr;
  }
  .cyber-cockpit-grid > *:nth-child(3) {
    grid-column: span 1;
  }
}

.cockpit-panel {
  background: rgba(13, 16, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 1.15rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.cockpit-panel-glow-green {
  border-color: rgba(0, 255, 135, 0.35);
  box-shadow: 0 0 25px rgba(0, 255, 135, 0.1);
}

.cockpit-panel-glow-purple {
  border-color: rgba(176, 38, 255, 0.4);
  box-shadow: 0 0 25px rgba(176, 38, 255, 0.15);
}

.cockpit-header-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cockpit-overview-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.cockpit-overview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  font-size: 0.82rem;
  color: #fff;
  transition: var(--transition);
}

.cockpit-overview-item:hover {
  border-color: rgba(0, 255, 135, 0.3);
  background: rgba(0, 255, 135, 0.04);
}

.cockpit-hero-avatar {
  background: radial-gradient(circle at 50% 40%, rgba(0, 255, 135, 0.18) 0%, rgba(176, 38, 255, 0.12) 45%, rgba(10, 13, 20, 0.96) 80%);
  border: 1px solid rgba(176, 38, 255, 0.45);
  border-radius: 18px;
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.cockpit-hero-pedestal {
  background: rgba(18, 14, 28, 0.9);
  border: 1px solid rgba(176, 38, 255, 0.3);
  border-radius: 12px;
  padding: 1.1rem;
  margin-top: 1rem;
  width: 100%;
  text-align: left;
}

.cockpit-press-to-speak {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  background: rgba(10, 13, 20, 0.95);
  border: 1px solid rgba(0, 255, 135, 0.25);
  border-radius: 16px;
  padding: 1.1rem;
}

.cockpit-mic-btn {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--color-green-rgb), 0.25) 0%, rgba(10, 13, 20, 0.9) 70%);
  border: 2px solid var(--color-green);
  color: var(--color-green);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(var(--color-green-rgb), 0.4);
  transition: all 0.3s ease;
}

.cockpit-mic-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(var(--color-green-rgb), 0.7);
}

.cockpit-protocols-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  font-size: 0.75rem;
}

.cockpit-protocol-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  color: var(--text-secondary);
}

.cockpit-protocol-item strong {
  color: #fff;
  display: block;
}

.journey-progress-ring-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.journey-progress-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 4px solid var(--color-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 255, 135, 0.3);
}

/* =========================================================
   STUNNING AI CYBERPUNK NINJA HOLOGRAM AVATAR (`AI JAISA ICON`)
   ========================================================= */
.ninja-mask-circle {
  width: 145px !important;
  height: 145px !important;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(10, 15, 26, 0.95) 0%, rgba(5, 7, 12, 0.98) 100%);
  border: 2px solid var(--color-green) !important;
  box-shadow: 0 0 30px rgba(0, 255, 135, 0.4), inset 0 0 20px rgba(0, 255, 135, 0.2) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin: 0.4rem auto !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ninja-mask-circle[data-skin="cyber_ninja"] {
  border-color: var(--color-purple) !important;
  box-shadow: 0 0 35px rgba(176, 38, 255, 0.5), inset 0 0 25px rgba(176, 38, 255, 0.3) !important;
}

.ninja-mask-circle[data-skin="golden_master"] {
  border-color: #ffd700 !important;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.6), inset 0 0 25px rgba(255, 215, 0, 0.3) !important;
}

/* Rotating HUD Tech Ring outside the avatar */
.ninja-mask-circle::before {
  content: "";
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(0, 255, 135, 0.45);
  animation: rotateHudRing 18s linear infinite;
  pointer-events: none;
}

.ninja-mask-circle[data-skin="cyber_ninja"]::before {
  border-color: rgba(176, 38, 255, 0.55);
}

.ninja-mask-circle[data-skin="golden_master"]::before {
  border-color: rgba(255, 215, 0, 0.6);
}

@keyframes rotateHudRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.cyber-ninja-hologram-svg {
  width: 90%;
  height: 90%;
  z-index: 2;
  filter: drop-shadow(0 0 10px rgba(0, 255, 135, 0.5));
  animation: hologramFloat 4s ease-in-out infinite;
}

.ninja-mask-circle[data-skin="cyber_ninja"] .cyber-ninja-hologram-svg {
  filter: drop-shadow(0 0 12px rgba(176, 38, 255, 0.6));
}

.ninja-mask-circle[data-skin="golden_master"] .cyber-ninja-hologram-svg {
  filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.7));
}

@keyframes hologramFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.03); }
}

/* Visor eye pulse animation */
.ai-visor-eye {
  fill: var(--color-green);
  animation: pulseVisorEye 2s infinite alternate;
}

.ninja-mask-circle[data-skin="cyber_ninja"] .ai-visor-eye {
  fill: #ff00ff;
}

.ninja-mask-circle[data-skin="golden_master"] .ai-visor-eye {
  fill: #ffd700;
}

@keyframes pulseVisorEye {
  0% { opacity: 0.7; filter: brightness(1); }
  100% { opacity: 1; filter: brightness(1.6); }
}

/* Forehead Kanji Emblem */
.ai-forehead-kanji {
  fill: #ffcc00;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 28px;
  text-anchor: middle;
  dominant-baseline: central;
  filter: drop-shadow(0 0 8px rgba(255, 204, 0, 0.8));
}

.ninja-mask-circle[data-skin="cyber_ninja"] .ai-forehead-kanji {
  fill: #00ffff;
  filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.8));
}

.ninja-mask-circle[data-skin="golden_master"] .ai-forehead-kanji {
  fill: #ffffff;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9));
}

/* Audio Wave & Speech Mic Active State */
.cockpit-mic-btn.listening {
  background: radial-gradient(circle, rgba(255, 0, 85, 0.4) 0%, rgba(10, 13, 20, 0.9) 70%) !important;
  border-color: #ff0055 !important;
  color: #ff0055 !important;
  animation: pulseListeningMic 0.8s infinite alternate;
}

@keyframes pulseListeningMic {
  0% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 0, 85, 0.5); }
  100% { transform: scale(1.15); box-shadow: 0 0 35px rgba(255, 0, 85, 0.9); }
}

/* =========================================================
   3D-STYLE CYBERNETIC NINJA HERO (`CLIENT MOCKUP AI COACH`)
   ========================================================= */
.ai-hero-container {
  width: 100%;
  max-width: 320px;
  height: 230px;
  margin: 0 auto -18px auto;
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  transition: all 0.5s ease;
}

.ai-hero-character-svg {
  width: 100%;
  height: 100%;
  max-height: 230px;
  filter: drop-shadow(0 4px 20px rgba(0, 255, 135, 0.4));
  animation: heroHoverFloat 5s ease-in-out infinite;
}

.ai-hero-container[data-skin="cyber_ninja"] .ai-hero-character-svg {
  filter: drop-shadow(0 4px 25px rgba(176, 38, 255, 0.55));
}

.ai-hero-container[data-skin="golden_master"] .ai-hero-character-svg {
  filter: drop-shadow(0 4px 30px rgba(255, 215, 0, 0.65));
}

@keyframes heroHoverFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-4px) scale(1.02); }
}

/* Hero Visor Eyes Glow */
.ai-hero-visor-eyes {
  fill: var(--color-green);
  filter: drop-shadow(0 0 15px rgba(0, 255, 135, 0.9));
  animation: pulseHeroEyes 2.2s infinite alternate;
}

.ai-hero-container[data-skin="cyber_ninja"] .ai-hero-visor-eyes {
  fill: #ff00ff;
  filter: drop-shadow(0 0 18px rgba(255, 0, 255, 0.9));
}

.ai-hero-container[data-skin="golden_master"] .ai-hero-visor-eyes {
  fill: #ffd700;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.95));
}

@keyframes pulseHeroEyes {
  0% { opacity: 0.75; filter: brightness(1) drop-shadow(0 0 10px rgba(0,255,135,0.6)); }
  100% { opacity: 1; filter: brightness(1.7) drop-shadow(0 0 25px rgba(0,255,135,1)); }
}

/* Forehead Kanji Crystal */
.ai-hero-kanji {
  fill: #ffcc00;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 30px;
  text-anchor: middle;
  dominant-baseline: central;
  filter: drop-shadow(0 0 10px rgba(255, 204, 0, 0.9));
}

.ai-hero-container[data-skin="cyber_ninja"] .ai-hero-kanji {
  fill: #00ffff;
  filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.9));
}

.ai-hero-container[data-skin="golden_master"] .ai-hero-kanji {
  fill: #ffffff;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1));
}

/* Audio Visualizer Wave in Chat Box */
.ai-chat-audio-visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 20px;
  margin: 0.5rem auto 0.2rem auto;
}

.ai-chat-audio-visualizer span {
  display: inline-block;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--color-green) 0%, var(--color-purple) 100%);
  animation: audioWaveBar 1.2s ease-in-out infinite alternate;
}

.ai-chat-audio-visualizer span:nth-child(2n) { animation-delay: 0.2s; background: var(--color-green); }
.ai-chat-audio-visualizer span:nth-child(3n) { animation-delay: 0.4s; background: #ff00ff; }
.ai-chat-audio-visualizer span:nth-child(4n) { animation-delay: 0.1s; background: #00ffff; }
.ai-chat-audio-visualizer span:nth-child(5n) { animation-delay: 0.5s; background: #ffd700; }

@keyframes audioWaveBar {
  0% { height: 4px; opacity: 0.5; }
  100% { height: 18px; opacity: 1; }
}

/* Cockpit Bottom Panel Double-Ring Mic Pedestal */
.cockpit-mic-pedestal {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 1px dashed rgba(var(--color-green-rgb), 0.4);
  background: radial-gradient(circle at 50% 50%, rgba(var(--color-green-rgb), 0.15) 0%, rgba(10, 13, 20, 0.95) 75%);
  box-shadow: 0 0 25px rgba(var(--color-green-rgb), 0.25);
  margin: 0.2rem auto;
}

/* =========================================================================
   UNIVERSAL CYBERPUNK GLASSMORPHISM & NEON GLOW (`ALL PAGES & CARDS`)
   ========================================================================= */
.card, .stat-card, .chart-card, .chart-box, .table-container, .metric-card, .settings-box, .kpi-card, .calendar-day-box {
  background: rgba(13, 16, 26, 0.88) !important;
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.55);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 14px;
}

.card:hover, .stat-card:hover, .chart-card:hover, .chart-box:hover, .table-container:hover, .metric-card:hover, .settings-box:hover, .kpi-card:hover {
  border-color: rgba(var(--color-green-rgb), 0.38) !important;
  box-shadow: 0 0 28px rgba(var(--color-green-rgb), 0.15), 0 8px 30px rgba(0, 0, 0, 0.7);
  transform: translateY(-3px);
}

/* Sub-card interior accents */
.card-header, .stat-card-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Subtle glowing cyber corner brackets on primary cards */
.cockpit-panel::after, .card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  border-top: 2px solid rgba(176, 38, 255, 0.4);
  border-right: 2px solid rgba(176, 38, 255, 0.4);
  border-top-right-radius: 12px;
  pointer-events: none;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.cockpit-panel:hover::after, .card:hover::after {
  border-color: var(--color-green);
  opacity: 1;
  box-shadow: 2px -2px 10px rgba(0, 255, 135, 0.4);
}

/* =========================================================
   BULLETPROOF PERMANENT UNBREAKABLE FLEX-ROW MASTER (`NO WRAPPING ON ANY CHROME/WINDOWS ZOOM OR RESOLUTION!`)
   ========================================================= */
.ai-cockpit-master-grid,
main.main-content .ai-cockpit-master-grid,
.app-container .main-content .ai-cockpit-master-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 0.85rem !important;
  align-items: stretch !important;
  width: 100% !important;
  min-height: 0 !important;
}

@media (max-width: 1200px) {
  .ai-cockpit-master-grid,
  main.main-content .ai-cockpit-master-grid,
  .app-container .main-content .ai-cockpit-master-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
  }
}

/* TABLET AND MOBILE STACKING FOR AI COACH LAYOUT */
.ai-coach-main {
  margin-left: var(--sidebar-width, 250px) !important;
  width: calc(100% - var(--sidebar-width, 250px)) !important;
  max-width: calc(100% - var(--sidebar-width, 250px)) !important;
  height: calc(100vh - 2px) !important;
  max-height: calc(100vh - 2px) !important;
  padding: 0.5rem 1.25rem !important;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cockpit-left-panel {
  flex: 1 1 auto !important;
  width: calc(100% - 325px) !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

.cockpit-right-panel {
  flex: 0 0 clamp(270px, 26vw, 315px) !important;
  width: clamp(270px, 26vw, 315px) !important;
  min-width: clamp(270px, 26vw, 315px) !important;
  max-width: 315px !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 0.55rem !important;
}

@media (max-width: 1024px) {
  .ai-cockpit-master-grid,
  main.main-content .ai-cockpit-master-grid,
  .app-container .main-content .ai-cockpit-master-grid {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    height: auto !important;
  }

  .ai-coach-main {
    margin-left: var(--sidebar-width) !important;
    width: calc(100% - var(--sidebar-width)) !important;
    max-width: calc(100% - var(--sidebar-width)) !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 1rem !important;
  }

  .cockpit-left-panel {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
  }

  .cockpit-right-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }

  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

@media (max-width: 768px) {
  .ai-coach-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* RESPONSIVE 3D NINJA BEZEL */
@media (max-width: 768px) {
  .ninja-bezel-container {
    width: clamp(290px, 60vw, 360px) !important;
    height: clamp(290px, 60vw, 360px) !important;
    margin-top: 15px !important;
  }
  
  #ninja-samurai-img {
    width: 120% !important;
    height: 120% !important;
  }
}

@media (max-width: 480px) {
  .ninja-bezel-container {
    width: 270px !important;
    height: 270px !important;
  }
}

/* BOTTOM GLANCE METRICS RESPONSIVENESS */
.cockpit-glance-metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
  align-items: center;
  width: 100%;
}

.cockpit-glance-metric-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding-right: 0.65rem;
}

.cockpit-glance-metric-item:last-child {
  border-right: none;
}

@media (max-width: 900px) {
  .cockpit-glance-metrics {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .cockpit-glance-metric-item {
    border-right: none !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 600px) {
  .cockpit-glance-metrics {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 400px) {
  .cockpit-glance-metrics {
    grid-template-columns: 1fr !important;
  }
}

/* MODAL GRIDS AND TWO COLUMN GRIDS */
.modal-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.responsive-two-column-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
  .modal-grid-2col {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .responsive-two-column-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Screenshots inside modal details */
  .modal-body .modal-screenshots-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
}

