:root {
  --journal-bg: linear-gradient(180deg, #0b1112 0%, #0e1516 100%);
  --journal-card: #121a1b;
  --journal-card-alt: #0f1516;
  --journal-card-border: rgba(117, 167, 139, 0.12);
  --journal-text: #eef4f0;
  --journal-muted: #8a9c95;
  --journal-accent: #5fca8b;
  --journal-accent-strong: #7fe1a5;
  --journal-accent-ice: #9fd6ff;
  --journal-accent-gold: #e1c27a;
  --journal-danger: #ff7b7b;
  --journal-warn: #f2c66d;
  --journal-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

body[data-page="journal"] {
  background: var(--journal-bg);
  color: var(--journal-text);
}

.journal-main {
  position: relative;
  isolation: isolate;
  padding: 24px 24px 36px;
}

.journal-bg-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.journal-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(0);
  opacity: 0.55;
}

.journal-orb-a {
  top: -80px;
  right: 6%;
  width: 320px;
  height: 320px;
  background:
    radial-gradient(circle at 30% 30%, rgba(127, 225, 165, 0.34), transparent 58%),
    radial-gradient(circle at 68% 60%, rgba(159, 214, 255, 0.22), transparent 62%);
}

.journal-orb-b {
  top: 320px;
  left: -110px;
  width: 280px;
  height: 280px;
  background:
    radial-gradient(circle at 50% 50%, rgba(225, 194, 122, 0.16), transparent 60%),
    radial-gradient(circle at 40% 35%, rgba(95, 202, 139, 0.18), transparent 56%);
}

.journal-grid-glow {
  position: absolute;
  inset: 120px 8% auto;
  height: 520px;
  border-radius: 40px;
  opacity: 0.2;
  background:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent);
}

.journal-topbar {
  position: static;
  height: auto;
  min-height: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 0 0 28px;
  margin-bottom: 28px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: none;
}

.journal-heading h1 {
  margin: 8px 0 10px;
  font-size: clamp(2rem, 2.7vw, 3rem);
  line-height: 1.08;
  max-width: 16ch;
}

.journal-heading p,
.card-kicker,
.eyebrow,
.overview-meta-item span,
.stack-form span,
.empty-state,
.muted-copy,
.timeline-meta,
.pill-meta {
  color: var(--journal-muted);
}

.journal-heading p {
  margin: 0;
  max-width: 62ch;
  line-height: 1.55;
}

.journal-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-icon,
.tab-icon,
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon svg,
.tab-icon svg,
.section-icon svg,
.price-note-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 0 15px;
  border: 1px solid var(--line2, rgba(255, 255, 255, 0.1));
  background: linear-gradient(180deg, rgba(20, 28, 41, 0.96), rgba(15, 22, 34, 0.96));
  color: var(--journal-text);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.dashboard-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(123, 216, 148, 0.34);
}

.dashboard-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(82, 183, 111, 0.16);
}

.dashboard-btn.primary {
  background: linear-gradient(180deg, var(--brand2, #7bd894), var(--brand, #52b76f));
  border-color: rgba(123, 216, 148, 0.52);
  color: #0f1b15;
  box-shadow: 0 10px 24px rgba(23, 128, 61, 0.18);
}

.dashboard-btn.primary:hover {
  background: linear-gradient(180deg, #8be0a1, #5fca8b);
  color: #0b1611;
}

.dashboard-btn.subtle {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(154, 168, 187, 0.18);
  color: var(--journal-muted);
}

.dashboard-btn.subtle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--journal-text);
}

.eyebrow,
.card-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
}

.journal-shell,
.journal-grid {
  display: grid;
  gap: 14px;
}

.journal-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.card,
.journal-overview {
  background: var(--journal-card);
  border: 1px solid var(--journal-card-border);
  border-radius: 20px;
  box-shadow: var(--journal-shadow);
}

.journal-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 18px;
  flex-wrap: wrap;
  padding: 0 0 6px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(95, 202, 139, 0.16), rgba(95, 202, 139, 0.08));
  color: var(--journal-accent-strong);
  font-size: 0.68rem;
  font-weight: 700;
  margin-bottom: 6px;
  border: 1px solid rgba(127, 225, 165, 0.14);
}

.hero-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 6px rgba(127, 225, 165, 0.09);
}

.overview-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
  flex: 1 1 420px;
}

.overview-identity h2 {
  margin: 0;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1;
  max-width: none;
  white-space: nowrap;
}

.overview-identity p {
  margin: 0;
  max-width: 58ch;
  font-size: 0.82rem;
  line-height: 1.2;
}

.overview-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 1 auto;
  flex-wrap: wrap;
}

.overview-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  min-width: 0;
}

.overview-meta-item span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.overview-meta-item strong {
  display: inline;
  margin-top: 0;
  font-size: 0.82rem;
  line-height: 1.1;
  white-space: nowrap;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-card {
  grid-column: span 1;
  background: var(--journal-card-alt);
  border: 1px solid var(--journal-card-border);
  border-radius: 14px;
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    linear-gradient(180deg, rgba(15, 21, 22, 0.98), rgba(11, 17, 18, 0.98));
}

.kpi-card::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(127, 225, 165, 0.08);
  border: 1px solid rgba(127, 225, 165, 0.12);
}

.ui-icon-badge {
  width: 24px;
  height: 24px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  margin-right: 8px;
  border-radius: 8px;
  vertical-align: middle;
  color: var(--journal-accent-strong);
  background: rgba(95, 202, 139, 0.1);
  border: 1px solid rgba(127, 225, 165, 0.14);
}

.ui-icon-badge svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi-card > span:not(.ui-icon-badge) {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--journal-muted);
  vertical-align: middle;
  max-width: calc(100% - 38px);
}

.kpi-card strong {
  display: block;
  font-size: 1.28rem;
  margin: 8px 0 4px;
  position: relative;
  z-index: 1;
  line-height: 1.1;
}

.kpi-card em {
  font-style: normal;
  color: var(--journal-muted);
  display: block;
  font-size: 0.76rem;
  line-height: 1.25;
}

.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-12 { grid-column: span 12; }

.card {
  padding: 18px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-head h3 {
  margin: 6px 0 0;
  font-size: 1.25rem;
}

.stack-form .dashboard-btn {
  justify-self: start;
}

.stack-form {
  display: grid;
  gap: 15px;
}

.stack-form label {
  display: grid;
  gap: 8px;
}

.stack-form input,
.stack-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 13, 14, 0.9);
  color: var(--journal-text);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
}

.stack-form textarea {
  resize: vertical;
  min-height: 110px;
}

.stack-form input:focus,
.stack-form textarea:focus {
  outline: none;
  border-color: rgba(127, 225, 165, 0.48);
  box-shadow: 0 0 0 4px rgba(95, 202, 139, 0.12);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.toggle-row input {
  width: auto;
}

.form-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
}

.pill-toggle {
  display: inline-flex;
  gap: 8px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.pill-toggle button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: transparent;
  color: var(--journal-muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.pill-toggle button.active {
  background: rgba(95, 202, 139, 0.14);
  color: var(--journal-accent-strong);
}

.price-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(95, 202, 139, 0.07);
  border: 1px solid rgba(95, 202, 139, 0.14);
}

.price-note-icon {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--journal-accent-strong);
  background: rgba(95, 202, 139, 0.12);
  border: 1px solid rgba(127, 225, 165, 0.18);
}

.price-note strong {
  font-size: 1rem;
}

.ticker-field {
  position: relative;
}

.ticker-ac-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  background: #101918;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.ticker-ac-item {
  border: 0;
  background: transparent;
  color: var(--journal-text);
  text-align: left;
  border-radius: 14px;
  padding: 11px 12px;
  cursor: pointer;
}

.ticker-ac-item:hover,
.ticker-ac-item.active {
  background: rgba(127, 225, 165, 0.1);
}

.data-list,
.timeline-list {
  display: grid;
  gap: 12px;
}

.position-card,
.timeline-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)),
    rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.position-card::before,
.timeline-card::before,
.discover-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(127, 225, 165, 0.9), rgba(159, 214, 255, 0.45));
  opacity: 0.9;
}

.position-card-head,
.timeline-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.position-card-head-secondary {
  margin-top: 10px;
}

.position-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.position-card strong,
.timeline-card strong {
  font-size: 1.02rem;
}

.position-direction {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.position-direction.long {
  background: rgba(95, 202, 139, 0.14);
  color: var(--journal-accent-strong);
}

.position-direction.short {
  background: rgba(255, 123, 123, 0.14);
  color: #ffb0b0;
}

.position-close-btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.position-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.metric-box {
  border-radius: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.16);
}

.metric-box span {
  display: block;
  color: var(--journal-muted);
  font-size: 0.78rem;
}

.metric-box strong {
  display: block;
  margin-top: 6px;
}

.timeline-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 700;
}

.timeline-pill::before,
.position-direction::before,
.discover-chip::before,
.chart-note-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

.timeline-pill.entry {
  color: var(--journal-accent-strong);
  background: rgba(95, 202, 139, 0.16);
}

.timeline-pill.exit {
  color: #ffb0b0;
  background: rgba(255, 123, 123, 0.16);
}

.timeline-card p,
.position-card p {
  margin: 12px 0 0;
  line-height: 1.55;
}

.timeline-meta {
  margin-top: 12px;
  font-size: 0.86rem;
}

.reason-block + .reason-block {
  margin-top: 12px;
}

.reason-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--journal-text);
}

.journal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.journal-table th,
.journal-table td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.journal-table th {
  color: var(--journal-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.table-wrap {
  overflow-x: auto;
}

.journal-workspace {
  padding: 0;
  overflow: hidden;
}

.journal-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
}

.journal-tab {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(154, 168, 187, 0.14);
  border-radius: 999px;
  background: transparent;
  color: var(--journal-muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.journal-tab:hover {
  color: var(--journal-text);
  border-color: rgba(123, 216, 148, 0.28);
}

.journal-tab.active {
  background: rgba(95, 202, 139, 0.12);
  border-color: rgba(123, 216, 148, 0.34);
  color: var(--journal-accent-strong);
}

.tab-icon {
  width: 20px;
  height: 20px;
  color: currentColor;
}

.journal-tab-panel {
  display: grid;
  gap: 0;
}

.journal-tab-panel[hidden] {
  display: none !important;
}

.journal-subtabs {
  padding: 12px 16px 0;
  border-bottom: 0;
  background: transparent;
}

.workspace-section {
  padding: 24px;
}

.workspace-section + .workspace-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.workspace-section-narrow {
  max-width: 760px;
}

.discover-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  margin-bottom: 18px;
}

.discover-toolbar label {
  display: grid;
  gap: 8px;
}

.discover-toolbar input,
.discover-toolbar select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 13, 14, 0.9);
  color: var(--journal-text);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
}

.discover-toolbar input:focus,
.discover-toolbar select:focus {
  outline: none;
  border-color: rgba(127, 225, 165, 0.48);
  box-shadow: 0 0 0 4px rgba(95, 202, 139, 0.12);
}

.discover-summary-grid,
.discover-grid {
  display: grid;
  gap: 14px;
}

.discover-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.discover-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.discover-summary-card strong {
  font-size: 1.25rem;
  line-height: 1.3;
}

.discover-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.discover-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.discover-card-head h4 {
  margin: 10px 0 8px;
  font-size: 1.12rem;
}

.discover-card-head p {
  margin: 0;
  color: var(--journal-muted);
  line-height: 1.5;
}

.discover-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.discover-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
  color: var(--journal-muted);
  font-size: 0.9rem;
}

.discover-holdings {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.discover-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(95, 202, 139, 0.08);
  border: 1px solid rgba(95, 202, 139, 0.16);
  color: var(--journal-accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-title-pack {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.section-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--journal-accent-strong);
  background:
    linear-gradient(180deg, rgba(95, 202, 139, 0.16), rgba(95, 202, 139, 0.08));
  border: 1px solid rgba(127, 225, 165, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  flex: 0 0 auto;
}

.section-head h3 {
  margin: 6px 0 0;
  font-size: 1.25rem;
}

.workspace-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.workspace-split > .workspace-section + .workspace-section {
  border-top: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-notes-layout {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.015);
}

.chart-notes-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.08);
}

.chart-notes-sidebar-head {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-notes-sidebar-head strong {
  font-size: 0.96rem;
}

.chart-notes-sidebar-head span {
  color: var(--journal-muted);
  font-size: 0.82rem;
}

.chart-notes-trade-list {
  display: grid;
  gap: 0;
  max-height: 780px;
  overflow: auto;
}

.chart-note-trade {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: var(--journal-text);
  text-align: left;
  cursor: pointer;
}

.chart-note-trade:hover,
.chart-note-trade.active {
  background: rgba(95, 202, 139, 0.08);
}

.chart-note-trade-head,
.chart-note-trade-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chart-note-trade strong {
  font-size: 0.95rem;
}

.chart-note-trade small {
  color: var(--journal-muted);
  font-size: 0.78rem;
}

.chart-note-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-note-status.open {
  background: rgba(95, 202, 139, 0.14);
  color: var(--journal-accent-strong);
}

.chart-note-status.closed {
  background: rgba(255, 255, 255, 0.08);
  color: var(--journal-text);
}

.chart-notes-main {
  display: grid;
  grid-template-rows: auto auto auto minmax(520px, 1fr);
  min-height: 700px;
}

.chart-notes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-notes-summary {
  color: var(--journal-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.chart-notes-timeframe {
  display: grid;
  gap: 6px;
  min-width: 120px;
}

.chart-notes-timeframe span {
  color: var(--journal-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.chart-notes-timeframe select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 13, 14, 0.9);
  color: var(--journal-text);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

.chart-notes-empty {
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--journal-muted);
  min-height: 520px;
  text-align: center;
  gap: 14px;
}

.chart-notes-empty strong {
  font-size: 1.05rem;
  color: var(--journal-text);
}

.chart-notes-empty p {
  max-width: 44ch;
  margin: 0;
  line-height: 1.55;
}

.chart-notes-empty-art {
  position: relative;
  width: 130px;
  height: 72px;
}

.chart-notes-empty-art span {
  position: absolute;
  bottom: 0;
  border-radius: 999px 999px 12px 12px;
  background: linear-gradient(180deg, rgba(159, 214, 255, 0.8), rgba(95, 202, 139, 0.16));
  border: 1px solid rgba(159, 214, 255, 0.12);
}

.chart-notes-empty-art span:nth-child(1) {
  left: 0;
  width: 30px;
  height: 44px;
}

.chart-notes-empty-art span:nth-child(2) {
  left: 42px;
  width: 38px;
  height: 68px;
}

.chart-notes-empty-art span:nth-child(3) {
  right: 0;
  width: 32px;
  height: 54px;
}

.chart-notes-empty[hidden],
.chart-notes-frame-wrap[hidden] {
  display: none !important;
}

.chart-notes-frame-wrap {
  min-height: 520px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-notes-frame {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
  background: #0c111b;
}

.journal-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 380px;
  border-radius: 16px;
  background: rgba(12, 20, 18, 0.96);
  border: 1px solid rgba(127, 225, 165, 0.22);
  color: var(--journal-text);
  padding: 13px 15px;
  box-shadow: var(--journal-shadow);
  z-index: 50;
}

.number-positive { color: var(--journal-accent-strong); }
.number-negative { color: var(--journal-danger); }
.number-flat { color: var(--journal-warn); }

.empty-state {
  padding: 20px;
  border-radius: 14px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)),
    rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(127, 225, 165, 0.14);
}

.empty-state strong {
  display: block;
  color: var(--journal-text);
  margin-bottom: 8px;
  font-size: 1rem;
}

.empty-state p {
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 1120px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .span-5,
  .span-6,
  .span-7,
  .span-12 {
    grid-column: span 12;
  }
  .journal-overview {
    align-items: flex-start;
  }
  .workspace-split {
    grid-template-columns: 1fr;
  }
  .chart-notes-layout {
    grid-template-columns: 1fr;
  }
  .chart-notes-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .chart-notes-main {
    min-height: 0;
  }
  .workspace-split > .workspace-section + .workspace-section {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
  .discover-summary-grid,
  .discover-grid,
  .discover-kpis {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .journal-main {
    padding: 16px 16px 32px;
  }
  .journal-topbar {
    flex-direction: column;
    padding-bottom: 22px;
  }
  .form-split,
  .position-metrics,
  .discover-toolbar {
    grid-template-columns: 1fr;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .overview-meta {
    width: 100%;
    justify-content: flex-start;
    gap: 8px 14px;
  }
  .chart-notes-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .chart-notes-timeframe {
    min-width: 0;
  }
  .chart-notes-frame,
  .chart-notes-frame-wrap,
  .chart-notes-empty {
    min-height: 420px;
  }
  .discover-card-head {
    flex-direction: column;
  }
  .chart-notes-trade-list {
    max-height: none;
  }
  .kpi-card {
    grid-column: span 1;
  }
  .journal-tabs {
    overflow-x: auto;
    padding: 14px;
  }
  .workspace-section {
    padding: 18px;
  }
  .journal-overview,
  .card {
    padding: 18px;
  }
}
