/* ==========================================================================
   LEETFX TRADE JOURNAL - 3D ENHANCED & DIARY & PERFORMANCE STYLING
   High Contrast & 3D Tactile Visibility in Both Dark & Light Themes
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. GLOBAL 3D LIGHTING & TACTILE TOKENS
   -------------------------------------------------------------------------- */
:root {
  --3d-gold-grad: linear-gradient(135deg, #f6dc96 0%, #d4a748 50%, #aa7a22 100%);
  --3d-gold-shadow: 0 5px 0 #6e4e13, 0 12px 24px rgba(0, 0, 0, 0.45);
  --3d-card-border: 1px solid rgba(216, 175, 89, 0.35);
  --3d-card-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(216, 175, 89, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --3d-card-hover-shadow: 0 24px 48px -6px rgba(0, 0, 0, 0.8), 0 0 25px rgba(216, 175, 89, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  --3d-dark-btn: linear-gradient(145deg, #242c42, #121727);
  --3d-dark-btn-shadow: 0 4px 0 #090c15, 0 8px 16px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   2. 3D BUTTONS & INTERACTIVE TACTILE CONTROLS
   -------------------------------------------------------------------------- */
.save-trade,
.add-button,
.diary-save-btn {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: var(--3d-gold-grad) !important;
  color: #1a1204 !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  letter-spacing: 0.04em !important;
  padding: 12px 22px !important;
  border: 1px solid #ffecad !important;
  border-radius: 10px !important;
  box-shadow: var(--3d-gold-shadow) !important;
  transform: perspective(600px) translateZ(0) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease !important;
  cursor: pointer !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.save-trade:hover,
.add-button:hover,
.diary-save-btn:hover {
  transform: perspective(600px) translateY(-3px) scale(1.02) !important;
  filter: brightness(1.08) !important;
  box-shadow: 0 8px 0 #6e4e13, 0 18px 30px rgba(216, 175, 89, 0.35) !important;
}

.save-trade:active,
.add-button:active,
.diary-save-btn:active {
  transform: translateY(3px) scale(0.99) !important;
  box-shadow: 0 2px 0 #6e4e13, 0 4px 10px rgba(0, 0, 0, 0.4) !important;
}

.diary-btn-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  white-space: nowrap;
  min-width: 72px;
  background: var(--3d-dark-btn);
  color: #e2e8f0;
  border: 1px solid #3c4b69;
  border-radius: 9px;
  font: 700 11px var(--mono, monospace);
  letter-spacing: 0.05em;
  box-shadow: var(--3d-dark-btn-shadow);
  cursor: pointer;
  transition: all 0.15s ease;
}

.diary-btn-secondary:hover {
  transform: translateY(-2px);
  border-color: #64748b;
  color: #fff;
  box-shadow: 0 6px 0 #090c15, 0 12px 20px rgba(0, 0, 0, 0.6);
}

.diary-btn-secondary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #090c15;
}

/* --------------------------------------------------------------------------
   3. TRADER'S DIARY STYLING ("DAIRY KI TRAH HON")
   -------------------------------------------------------------------------- */
.diary-view {
  margin-top: 35px !important;
}

.diary-head {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-end !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  margin-bottom: 12px !important;
}

.diary-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4a748;
  box-shadow: 0 0 10px #d4a748;
  margin-right: 8px;
  animation: pulse-diary 2s infinite ease-in-out;
}

@keyframes pulse-diary {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.diary-head-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.diary-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #141b2c;
  border: 1px solid #32415d;
  color: #cbd5e1;
  font: 700 11px var(--mono, monospace);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.diary-badge.gold-badge {
  background: #241c0c;
  border-color: #d4a74888;
  color: #f3d487;
  box-shadow: 0 0 12px rgba(212, 167, 72, 0.2);
}

/* Quick Prompt Template Chips */
.diary-quick-prompts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(21, 28, 45, 0.85), rgba(11, 15, 25, 0.95));
  border: 1px solid rgba(216, 175, 89, 0.25);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.prompt-label {
  font: 700 11px var(--mono, monospace);
  color: #e2b86a;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.diary-chip-btn {
  padding: 7px 13px;
  border-radius: 8px;
  background: linear-gradient(145deg, #1b2438, #0e1320);
  border: 1px solid #3e4f6d;
  color: #e2e8f0;
  font: 600 11px var(--sans, sans-serif);
  cursor: pointer;
  box-shadow: 0 3px 0 #0a0d16, 0 6px 12px rgba(0, 0, 0, 0.35);
  transition: all 0.15s ease;
}

.diary-chip-btn:hover {
  transform: translateY(-2px);
  border-color: #d4a748;
  color: #fce7b2;
  box-shadow: 0 5px 0 #0a0d16, 0 8px 16px rgba(212, 167, 72, 0.25);
}

.diary-chip-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #0a0d16;
}

/* 3D Diary Book / Leather-bound Editor Container */
.diary-book-wrapper {
  position: relative;
  margin-bottom: 30px;
  border-radius: 20px;
  background: linear-gradient(145deg, #192134, #0b0f19);
  padding: 2px;
  border: 1px solid rgba(216, 175, 89, 0.4);
  box-shadow: var(--3d-card-shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.diary-book-wrapper:hover {
  box-shadow: var(--3d-card-hover-shadow);
}

.diary-editor-card {
  padding: 26px 28px;
  border-radius: 18px;
  background: radial-gradient(circle at 95% 5%, rgba(212, 167, 72, 0.12), transparent 45%), linear-gradient(145deg, #141b2a, #0b0f19 80%);
}

.diary-meta-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.diary-field-group label {
  display: block;
  font: 700 10px var(--mono, monospace);
  color: #d4a748;
  letter-spacing: 0.08em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.diary-inline-inputs {
  display: flex;
  gap: 8px;
}

.diary-input,
.diary-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: #0d121f;
  border: 1px solid #33435e;
  color: #f8fafc;
  font: 600 12px var(--sans, sans-serif);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.diary-input:focus,
.diary-select:focus {
  border-color: #d4a748;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 0 10px rgba(212, 167, 72, 0.3);
}

.diary-title-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  background: #0b101c;
  border: 1px solid #354562;
  color: #fff;
  font: 700 16px var(--sans, sans-serif);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  outline: none;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.diary-title-input::placeholder {
  color: #718096;
  font-weight: 500;
}

.diary-title-input:focus {
  border-color: #d4a748;
  background: #0e1424;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5), 0 0 12px rgba(212, 167, 72, 0.25);
}

.diary-textarea-wrap {
  position: relative;
}

.diary-textarea {
  width: 100%;
  min-height: 180px;
  padding: 16px 18px;
  border-radius: 10px;
  background: #0a0e1a;
  border: 1px solid #2d3b54;
  color: #e6edf8;
  font: 500 14px/1.75 var(--sans, sans-serif);
  resize: vertical;
  outline: none;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.diary-textarea::placeholder {
  color: #64748b;
  line-height: 1.6;
}

.diary-textarea:focus {
  border-color: #d4a748;
  background: #0d1222;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 14px rgba(212, 167, 72, 0.25);
}

.diary-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.diary-footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.diary-star-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.diary-star-toggle input {
  accent-color: #d4a748;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.star-label {
  font: 700 11px var(--mono, monospace);
  color: #f1cf80;
}

.diary-status-text {
  font: 500 11px var(--mono, monospace);
  color: #94a3b8;
}

.diary-footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   4. DIARY FILTER STRIP & SEARCH
   -------------------------------------------------------------------------- */
.diary-filter-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: rgba(14, 19, 31, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.diary-search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 320px;
}

.diary-search-box .search-icon {
  position: absolute;
  left: 12px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0.7;
}

.diary-search-box input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border-radius: 8px;
  background: #090e18;
  border: 1px solid #334155;
  color: #f1f5f9;
  font: 500 12px var(--sans, sans-serif);
  outline: none;
  transition: all 0.2s ease;
}

.diary-search-box input:focus {
  border-color: #d4a748;
  box-shadow: 0 0 10px rgba(212, 167, 72, 0.25);
}

.diary-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.diary-tag-filter {
  padding: 6px 12px;
  border-radius: 7px;
  background: #141b2c;
  border: 1px solid #303e58;
  color: #94a3b8;
  font: 700 10px var(--mono, monospace);
  cursor: pointer;
  transition: all 0.15s ease;
}

.diary-tag-filter:hover {
  color: #fff;
  border-color: #64748b;
  transform: translateY(-1px);
}

.diary-tag-filter.active {
  background: linear-gradient(135deg, #f0d58c, #b78634);
  color: #1a1204;
  border-color: #ffd875;
  font-weight: 800;
  box-shadow: 0 3px 0 #6e4e13;
}

/* --------------------------------------------------------------------------
   5. DIARY CARDS 3D GRID
   -------------------------------------------------------------------------- */
.diary-entries-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)) !important;
  gap: 20px !important;
}

.diary-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 22px 24px !important;
  border-radius: 16px !important;
  background: radial-gradient(circle at 10% 10%, rgba(212, 167, 72, 0.06), transparent 30%), linear-gradient(145deg, #151c2c, #0d121f) !important;
  border: 1px solid rgba(216, 175, 89, 0.3) !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease !important;
}

.diary-card:hover {
  border-color: rgba(216, 175, 89, 0.7) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(212, 167, 72, 0.25) !important;
}

.diary-card.pinned-entry {
  border-color: #d4a748 !important;
  background: radial-gradient(circle at 90% 10%, rgba(212, 167, 72, 0.15), transparent 40%), linear-gradient(145deg, #1b2338, #0f1526) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 167, 72, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.diary-card-ribbon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.diary-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.diary-session-badge {
  padding: 4px 8px;
  border-radius: 6px;
  background: #1e283d;
  border: 1px solid #3e4f6d;
  color: #93c5fd;
  font: 700 9px var(--mono, monospace);
  letter-spacing: 0.04em;
}

.diary-tag-badge {
  padding: 4px 8px;
  border-radius: 6px;
  background: #231d10;
  border: 1px solid #d4a74877;
  color: #f3d487;
  font: 700 9px var(--mono, monospace);
}

.diary-mood-badge {
  padding: 4px 8px;
  border-radius: 6px;
  background: #172421;
  border: 1px solid #2d5a4c;
  color: #86efac;
  font: 700 9px var(--mono, monospace);
}

.diary-pin-btn {
  padding: 4px 8px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid #475569;
  color: #94a3b8;
  font: 700 10px var(--mono, monospace);
  cursor: pointer;
  transition: all 0.15s ease;
}

.diary-pin-btn:hover,
.diary-pin-btn.is-pinned {
  border-color: #d4a748;
  color: #f5d789;
  background: #251d0e;
  box-shadow: 0 0 10px rgba(212, 167, 72, 0.3);
}

.diary-entry-header {
  margin-bottom: 12px;
}

.diary-entry-title {
  margin: 0 0 6px 0;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.diary-date-stamp {
  display: block;
  color: #94a3b8;
  font: 600 10px var(--mono, monospace);
  letter-spacing: 0.05em;
}

.diary-entry-content {
  margin-bottom: 18px;
  flex-grow: 1;
}

.diary-entry-content p {
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.diary-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.diary-private-indicator {
  font: 600 10px var(--mono, monospace);
  color: #64748b;
}

.action-buttons-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.diary-action-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font: 700 11px var(--mono, monospace);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.edit-diary-btn {
  background: #1b263b;
  border: 1px solid #3b5074;
  color: #bfdbfe;
  box-shadow: 0 2px 0 #0d1522;
}

.edit-diary-btn:hover {
  background: #2b3e63;
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
}

.delete-diary-btn {
  background: #2b141d;
  border: 1px solid #6b2639;
  color: #fca5a5;
  box-shadow: 0 2px 0 #15090e;
}

.delete-diary-btn:hover {
  background: #4a1d2d;
  border-color: #f87171;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(248, 113, 113, 0.3);
}

/* --------------------------------------------------------------------------
   6. 3D PERFORMANCE REVIEW STYLING ("PERFAMANCE WALA KAM KR RAHA")
   -------------------------------------------------------------------------- */
.review-grid {
  /* Do NOT put display !important here — journal-ux.css hides this with display:none */
  flex-direction: column;
  gap: 24px;
  margin-top: 35px !important;
}

/* When the view is active, ensure correct flex layout */
.journal-shell.view-review .review-grid {
  display: flex !important;
  flex-direction: column !important;
}

/* 3D KPI Strip */
.review-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.review-kpi-card {
  position: relative;
  padding: 22px 20px;
  border-radius: 16px;
  background: radial-gradient(circle at 10% 10%, rgba(212, 167, 72, 0.08), transparent 35%), linear-gradient(145deg, #151c2d, #0d121e);
  border: 1px solid rgba(216, 175, 89, 0.35);
  box-shadow: var(--3d-card-shadow);
  transform: perspective(600px) translateZ(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-kpi-card:hover {
  transform: perspective(600px) translateY(-4px);
  box-shadow: var(--3d-card-hover-shadow);
}

.kpi-label {
  display: block;
  font: 700 9px var(--mono, monospace);
  letter-spacing: 0.12em;
  color: #d4a748;
  margin-bottom: 10px;
}

.kpi-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 6px;
}

.review-kpi-card small {
  display: block;
  font: 600 11px var(--sans, sans-serif);
  color: #94a3b8;
}

/* 2x2 Review Panels Grid */
.review-panels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.review-panel {
  position: relative;
  padding: 26px !important;
  border-radius: 18px !important;
  background: radial-gradient(circle at 90% 10%, rgba(212, 167, 72, 0.06), transparent 30%), linear-gradient(145deg, #151c2d, #0c101a) !important;
  border: 1px solid rgba(216, 175, 89, 0.35) !important;
  box-shadow: var(--3d-card-shadow) !important;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.badge-eyebrow {
  display: block;
  font: 700 9px var(--mono, monospace);
  letter-spacing: 0.12em;
  color: #d4a748;
  margin-bottom: 4px;
}

.panel-tag {
  padding: 4px 10px;
  border-radius: 6px;
  background: #1c263c;
  border: 1px solid #3c4f74;
  color: #93c5fd;
  font: 700 9px var(--mono, monospace);
}

.panel-tag.warning-tag {
  background: #2b181c;
  border-color: #6d2d38;
  color: #fca5a5;
}

.panel-subtitle {
  font: 500 12px var(--sans, sans-serif);
  color: #94a3b8;
  margin: 0 0 18px 0;
}

/* Strategy Row 3D Bars */
.strategy-row {
  display: grid;
  grid-template-columns: 140px 1fr 110px;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #0d1322;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.18s ease;
}

.strategy-row:hover {
  transform: translateX(3px);
  border-color: rgba(216, 175, 89, 0.4);
}

.strategy-meta strong {
  display: block;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.strategy-badge {
  display: block;
  color: #94a3b8;
  font: 600 10px var(--mono, monospace);
  margin-top: 3px;
}

.strategy-bar-wrap {
  width: 100%;
}

.strategy-bar-track {
  height: 8px;
  border-radius: 999px;
  background: #1a2236;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.strategy-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.strategy-bar-fill.positive-fill {
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

.strategy-bar-fill.negative-fill {
  background: linear-gradient(90deg, #ef4444, #f87171);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.5);
}

.strategy-stat {
  text-align: right;
}

.strategy-stat .strategy-r {
  display: block;
  font: 700 11px var(--mono, monospace);
  color: #f3d487;
}

.strategy-stat strong {
  display: block;
  font: 800 13px var(--mono, monospace);
  margin-top: 2px;
}

/* Mistake Radar Chips */
.mistake-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.mistake-item {
  padding: 12px 16px;
  border-radius: 10px;
  background: #14111d;
  border: 1px solid #4a293d;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease;
}

.mistake-item:hover {
  transform: translateX(2px);
  border-color: #883965;
}

.mistake-chip-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.mistake-name {
  color: #fca5a5;
  font-weight: 700;
  font-size: 13px;
}

.mistake-count-badge {
  padding: 3px 8px;
  border-radius: 5px;
  background: #3b1825;
  color: #fda4af;
  font: 700 10px var(--mono, monospace);
}

.mistake-bar-meter {
  height: 6px;
  border-radius: 999px;
  background: #281420;
  overflow: hidden;
  margin-bottom: 6px;
}

.mistake-bar-meter .meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f43f5e, #fb7185);
  box-shadow: 0 0 8px rgba(251, 113, 133, 0.6);
}

.mistake-freq {
  color: #94a3b8;
  font: 600 10px var(--mono, monospace);
}

.clean-discipline-card {
  padding: 24px;
  text-align: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #11261d, #0b1812);
  border: 1px solid #166534;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.clean-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 10px;
}

.clean-discipline-card strong {
  display: block;
  color: #86efac;
  font-size: 16px;
  margin-bottom: 6px;
}

.clean-discipline-card p {
  color: #bbf7d0;
  font-size: 12px;
  margin: 0;
  line-height: 1.6;
}

.coaching-insight-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #182030;
  border: 1px solid #334466;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.coaching-insight-box .coach-bulb {
  font-size: 16px;
}

.coaching-insight-box p {
  margin: 0;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.6;
}

/* Active Streak 3D Card */
.streak-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 26px !important;
  border-radius: 18px !important;
  background: radial-gradient(circle at 85% 15%, rgba(212, 167, 72, 0.18), transparent 45%), linear-gradient(145deg, #241935, #0f0d19) !important;
  border: 1px solid rgba(216, 175, 89, 0.45) !important;
  box-shadow: var(--3d-card-shadow) !important;
}

.streak-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.streak-header span {
  font: 700 9px var(--mono, monospace);
  letter-spacing: 0.12em;
  color: #f3d487;
}

.streak-flame {
  font-size: 26px;
  animation: flame-pulse 1.8s infinite ease-in-out;
}

@keyframes flame-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(4deg); }
}

.streak-card strong {
  display: block !important;
  font-size: 58px !important;
  font-weight: 800 !important;
  letter-spacing: -0.05em !important;
  color: #fde047 !important;
  text-shadow: 0 0 25px rgba(253, 224, 71, 0.4) !important;
  margin: 14px 0 8px 0 !important;
}

.streak-badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.streak-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #182236;
  border: 1px solid #3b4e72;
  color: #e2e8f0;
  font: 700 10px var(--mono, monospace);
}

.streak-pill.gold {
  background: #2d220f;
  border-color: #d4a748;
  color: #fef08a;
  box-shadow: 0 0 10px rgba(212, 167, 72, 0.3);
}

.streak-card p {
  color: #cbd5e1 !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* Session Matrix Breakdown */
.session-matrix-panel {
  position: relative !important;
  padding: 26px !important;
  border-radius: 18px !important;
  background: radial-gradient(circle at 10% 90%, rgba(212, 167, 72, 0.08), transparent 35%), linear-gradient(145deg, #151c2d, #0d121f) !important;
  border: 1px solid rgba(216, 175, 89, 0.35) !important;
  box-shadow: var(--3d-card-shadow) !important;
}

.matrix-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.matrix-card {
  padding: 14px 12px;
  border-radius: 10px;
  background: #0d1322;
  border: 1px solid #293852;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.matrix-name {
  display: block;
  font: 700 9px var(--mono, monospace);
  color: #94a3b8;
  margin-bottom: 6px;
}

.matrix-value {
  display: block;
  font: 800 15px var(--mono, monospace);
  margin-bottom: 4px;
}

.matrix-sub {
  display: block;
  color: #64748b;
  font: 600 9px var(--mono, monospace);
}

.direction-ratio-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.direction-chip {
  padding: 12px 14px;
  border-radius: 10px;
  background: #111726;
  border: 1px solid #30405e;
}

.dir-title {
  display: block;
  font: 700 9px var(--mono, monospace);
  color: #d4a748;
  margin-bottom: 4px;
}

.direction-chip strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.direction-chip small {
  color: #94a3b8;
  font: 600 10px var(--mono, monospace);
}

/* --------------------------------------------------------------------------
   7. FLAWLESS HIGH-CONTRAST LIGHT THEME (html[data-theme="light"])
   All text, tables, inputs, diary, review guaranteed crystal visible!
   -------------------------------------------------------------------------- */
html[data-theme="light"] body {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] strong,
html[data-theme="light"] b {
  color: #0f172a !important;
}

html[data-theme="light"] p,
html[data-theme="light"] .section-caption,
html[data-theme="light"] .panel-subtitle,
html[data-theme="light"] .hero-copy {
  color: #334155 !important;
}

html[data-theme="light"] .eyebrow,
html[data-theme="light"] .badge-eyebrow,
html[data-theme="light"] .prompt-label,
html[data-theme="light"] .kpi-label,
html[data-theme="light"] .diary-field-group label {
  color: #85580e !important;
  font-weight: 800 !important;
}

/* Light Theme 3D Buttons */
html[data-theme="light"] .save-trade,
html[data-theme="light"] .add-button,
html[data-theme="light"] .diary-save-btn {
  background: linear-gradient(135deg, #f6d888 0%, #d4a338 50%, #ad7b1b 100%) !important;
  color: #1a1204 !important;
  border-color: #ffecb3 !important;
  box-shadow: 0 5px 0 #785411, 0 12px 22px rgba(133, 88, 14, 0.25) !important;
}

html[data-theme="light"] .save-trade:hover,
html[data-theme="light"] .add-button:hover,
html[data-theme="light"] .diary-save-btn:hover {
  box-shadow: 0 8px 0 #785411, 0 18px 28px rgba(133, 88, 14, 0.35) !important;
}

html[data-theme="light"] .save-trade:active,
html[data-theme="light"] .add-button:active,
html[data-theme="light"] .diary-save-btn:active {
  box-shadow: 0 2px 0 #785411 !important;
}

html[data-theme="light"] .diary-btn-secondary {
  background: linear-gradient(145deg, #ffffff, #e2e8f0) !important;
  color: #1e293b !important;
  border-color: #94a3b8 !important;
  box-shadow: 0 4px 0 #cbd5e1, 0 6px 12px rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] .diary-btn-secondary:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #64748b !important;
}

html[data-theme="light"] .diary-btn-secondary:active {
  box-shadow: 0 1px 0 #cbd5e1 !important;
}

/* Light Theme Prompt Chips */
html[data-theme="light"] .diary-quick-prompts {
  background: linear-gradient(135deg, #ffffff, #f1f5f9) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] .diary-chip-btn {
  background: linear-gradient(145deg, #ffffff, #eef2f6) !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 3px 0 #cbd5e1, 0 4px 10px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] .diary-chip-btn:hover {
  border-color: #b4852c !important;
  color: #85580e !important;
}

/* Light Theme Diary Editor */
html[data-theme="light"] .diary-book-wrapper {
  background: linear-gradient(145deg, #ffffff, #f1f5f9) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(180, 133, 44, 0.25) !important;
}

html[data-theme="light"] .diary-editor-card {
  background: radial-gradient(circle at 95% 5%, rgba(212, 167, 72, 0.12), transparent 45%), linear-gradient(145deg, #ffffff, #f8fafc 80%) !important;
}

html[data-theme="light"] .diary-input,
html[data-theme="light"] .diary-select,
html[data-theme="light"] .diary-title-input,
html[data-theme="light"] .diary-textarea,
html[data-theme="light"] .diary-search-box input {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] .diary-title-input::placeholder,
html[data-theme="light"] .diary-textarea::placeholder,
html[data-theme="light"] .diary-search-box input::placeholder {
  color: #64748b !important;
}

html[data-theme="light"] .diary-input:focus,
html[data-theme="light"] .diary-select:focus,
html[data-theme="light"] .diary-title-input:focus,
html[data-theme="light"] .diary-textarea:focus,
html[data-theme="light"] .diary-search-box input:focus {
  border-color: #b4852c !important;
  box-shadow: 0 0 0 3px rgba(180, 133, 44, 0.18) !important;
}

html[data-theme="light"] .diary-badge {
  background: #ffffff !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] .diary-badge.gold-badge {
  background: #fff8e8 !important;
  color: #85580e !important;
  border-color: #d4a748 !important;
}

html[data-theme="light"] .star-label {
  color: #85580e !important;
}

html[data-theme="light"] .diary-filter-strip {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] .diary-tag-filter {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] .diary-tag-filter.active {
  background: linear-gradient(135deg, #f6d888, #d4a338) !important;
  color: #1a1204 !important;
  border-color: #ffecb3 !important;
  box-shadow: 0 3px 0 #785411 !important;
}

/* Light Theme Diary Cards */
html[data-theme="light"] .diary-card {
  background: linear-gradient(145deg, #ffffff, #f8fafc) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(180, 133, 44, 0.18) !important;
}

html[data-theme="light"] .diary-card:hover {
  border-color: #b4852c !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12), 0 0 18px rgba(180, 133, 44, 0.2) !important;
}

html[data-theme="light"] .diary-card.pinned-entry {
  background: radial-gradient(circle at 90% 10%, rgba(212, 167, 72, 0.12), transparent 40%), linear-gradient(145deg, #fffdf8, #f8fafc) !important;
  border-color: #d4a748 !important;
}

html[data-theme="light"] .diary-entry-title {
  color: #0f172a !important;
}

html[data-theme="light"] .diary-entry-content p {
  color: #334155 !important;
}

html[data-theme="light"] .diary-date-stamp {
  color: #64748b !important;
}

html[data-theme="light"] .diary-session-badge {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

html[data-theme="light"] .diary-tag-badge {
  background: #fff8e6 !important;
  color: #85580e !important;
  border-color: #fde68a !important;
}

html[data-theme="light"] .diary-mood-badge {
  background: #f0fdf4 !important;
  color: #15803d !important;
  border-color: #bbf7d0 !important;
}

html[data-theme="light"] .edit-diary-btn {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
  box-shadow: 0 2px 0 #cbd5e1 !important;
}

html[data-theme="light"] .delete-diary-btn {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border-color: #fecaca !important;
  box-shadow: 0 2px 0 #cbd5e1 !important;
}

/* Light Theme Review Panels */
html[data-theme="light"] .review-kpi-card,
html[data-theme="light"] .review-panel,
html[data-theme="light"] .session-matrix-panel {
  background: linear-gradient(145deg, #ffffff, #f8fafc) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(180, 133, 44, 0.2) !important;
}

html[data-theme="light"] .kpi-value {
  color: #0f172a !important;
}

html[data-theme="light"] .review-kpi-card small {
  color: #475569 !important;
}

html[data-theme="light"] .strategy-row {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

html[data-theme="light"] .strategy-meta strong {
  color: #0f172a !important;
}

html[data-theme="light"] .strategy-badge {
  color: #475569 !important;
}

html[data-theme="light"] .strategy-bar-track {
  background: #e2e8f0 !important;
}

html[data-theme="light"] .strategy-stat .strategy-r {
  color: #85580e !important;
}

html[data-theme="light"] .mistake-item {
  background: #fff5f5 !important;
  border-color: #fed7d7 !important;
}

html[data-theme="light"] .mistake-name {
  color: #9b2c2c !important;
}

html[data-theme="light"] .mistake-count-badge {
  background: #fed7d7 !important;
  color: #742a2a !important;
}

html[data-theme="light"] .coaching-insight-box {
  background: #f0f7ff !important;
  border-color: #bae6fd !important;
}

html[data-theme="light"] .coaching-insight-box p {
  color: #0369a1 !important;
}

html[data-theme="light"] .streak-card {
  background: radial-gradient(circle at 85% 15%, rgba(212, 167, 72, 0.2), transparent 45%), linear-gradient(145deg, #fffbeb, #ffffff) !important;
  border-color: #d4a748 !important;
  box-shadow: 0 10px 30px rgba(180, 133, 44, 0.15) !important;
}

html[data-theme="light"] .streak-header span {
  color: #85580e !important;
}

html[data-theme="light"] .streak-card strong {
  color: #92400e !important;
  text-shadow: none !important;
}

html[data-theme="light"] .streak-pill {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

html[data-theme="light"] .streak-pill.gold {
  background: #fff8e8 !important;
  border-color: #d4a748 !important;
  color: #85580e !important;
}

html[data-theme="light"] .streak-card p {
  color: #475569 !important;
}

html[data-theme="light"] .matrix-card,
html[data-theme="light"] .direction-chip {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

html[data-theme="light"] .matrix-name,
html[data-theme="light"] .matrix-sub,
html[data-theme="light"] .direction-chip small {
  color: #475569 !important;
}

html[data-theme="light"] .direction-chip strong {
  color: #0f172a !important;
}

/* High Contrast PnL Classes for Light Mode */
html[data-theme="light"] .pnl-positive {
  color: #15803d !important;
  font-weight: 800 !important;
}

html[data-theme="light"] .pnl-negative {
  color: #b91c1c !important;
  font-weight: 800 !important;
}

/* --------------------------------------------------------------------------
   8. RESPONSIVE OPTIMIZATIONS
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .review-kpi-strip {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .review-panels-grid {
    grid-template-columns: 1fr !important;
  }
  .diary-meta-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 600px) {
  .review-kpi-strip {
    grid-template-columns: 1fr !important;
  }
  .diary-entries-grid {
    grid-template-columns: 1fr !important;
  }
  .strategy-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .strategy-stat {
    text-align: left !important;
  }
  .matrix-cards-row {
    grid-template-columns: 1fr !important;
  }
}
