:root {
  --brand-primary: #0d6efd;
  --brand-light: #f5f7fa;
  --card-radius: 1rem;
  --card-shadow: 0 4px 16px rgba(0,0,0,0.05);
}
body { background: var(--brand-light); }
.mentor-page {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.main-page {
  width: min(1680px, calc(100vw - 32px));
  max-width: none;
  margin: 0 auto;
  padding: 1.5rem .5rem 2rem;
}

.auth-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.1), transparent 24%),
    linear-gradient(180deg, #f8fafc, #eef2f7);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(420px, 520px);
  gap: 1rem;
  align-items: stretch;
}

.auth-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(244,247,251,0.92));
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.06);
}

.auth-card {
  width: min(520px, 100%);
  padding: 1.5rem;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.96), rgba(255,255,255,0.82)),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
  box-shadow: 0 26px 56px rgba(15, 23, 42, 0.1);
}

.auth-card--compact {
  width: min(440px, 100%);
}

.auth-card--surface {
  width: 100%;
}

.auth-brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.auth-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  border: 1px solid rgba(219, 234, 254, 0.96);
  background: rgba(255,255,255,0.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
}

.auth-brand__eyebrow {
  margin-bottom: .28rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #64748b;
}

.auth-brand__title {
  margin: 0;
  font-family: "IBM Plex Sans", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -.04em;
  color: #0f172a;
}

.auth-brand__subtitle {
  margin: .38rem 0 0;
  font-size: .93rem;
  line-height: 1.6;
  color: #667085;
}

.auth-aside__panel {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(219, 234, 254, 0.92);
  border-radius: 1.2rem;
  background: rgba(255,255,255,0.78);
}

.auth-aside__label {
  margin-bottom: .55rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #64748b;
}

.auth-aside__list {
  margin: 0;
  padding-left: 1.1rem;
  color: #344054;
  display: grid;
  gap: .55rem;
  font-size: .93rem;
  line-height: 1.58;
}

.auth-form-header {
  margin-bottom: 1.2rem;
}

.auth-form-header__eyebrow {
  margin-bottom: .32rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #64748b;
}

.auth-form-header__title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.04em;
  color: #0f172a;
}

.auth-form-header__subtitle {
  margin: .38rem 0 0;
  font-size: .92rem;
  line-height: 1.58;
  color: #667085;
}

.auth-field {
  margin-bottom: 1rem;
}

.auth-label {
  display: inline-block;
  margin-bottom: .42rem;
  font-size: .82rem;
  font-weight: 600;
  color: #344054;
}

.auth-input {
  min-height: 3rem;
  border: 1px solid rgba(203, 213, 225, 0.96);
  border-radius: 1rem;
  background: rgba(255,255,255,0.96);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

.auth-input:focus {
  border-color: rgba(59, 130, 246, 0.72);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.auth-field__icon {
  top: calc(50% + .7rem);
  left: 1rem;
  transform: translateY(-50%);
  color: #98a2b3;
  font-size: 1rem;
  pointer-events: none;
}

.auth-toggle-password {
  top: calc(50% + .7rem);
  right: .7rem;
  transform: translateY(-50%);
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: .8rem !important;
  background: rgba(255,255,255,0.96);
  color: #667085;
  box-shadow: none !important;
}

.auth-toggle-password:hover {
  background: rgba(248, 250, 252, 0.98);
  color: #0f172a;
}

.auth-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 3.1rem;
  margin-top: .2rem;
  margin-bottom: 1rem;
  border-radius: 1rem !important;
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color: #eff6ff;
  font-weight: 700;
  letter-spacing: -.01em;
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.2) !important;
}

.auth-submit-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #1d4ed8, #1e40af);
  color: #fff;
  transform: translateY(-1px);
}

.auth-submit-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  font-size: .88rem;
  color: #667085;
}

.auth-footer--center {
  justify-content: center;
  flex-wrap: wrap;
}

.auth-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #175cd3;
  text-decoration: none;
  font-weight: 600;
}

.auth-link:hover {
  color: #1d4ed8;
}

.auth-check {
  margin-bottom: 1rem;
  padding: .9rem 1rem .9rem 2rem;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.82);
}

.auth-check .form-check-input {
  margin-top: .18rem;
}

.auth-check .form-check-label {
  font-size: .88rem;
  line-height: 1.55;
  color: #475467;
}

.auth-result {
  margin-top: .35rem;
}

@media (max-width: 575.98px) {
  .auth-shell {
    padding: 1rem;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 1.1rem;
    border-radius: 1.2rem;
  }

  .auth-aside {
    padding: 1.05rem;
    border-radius: 1.2rem;
  }

  .auth-brand {
    flex-direction: column;
    gap: .8rem;
  }

  .auth-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 991.98px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
}
.card, .navbar, .btn, .nav-tabs .nav-link {
  border-radius: var(--card-radius) !important;
  box-shadow: var(--card-shadow) !important;
}
.btn { padding: .75rem 1.5rem; font-size: 1rem; font-weight: 500; border: none; transition: transform .1s, box-shadow .2s; }
.btn-primary { background-color: var(--brand-primary); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(13,110,253,0.3); }
.btn-secondary, .btn-outline-secondary { background: #fff; color: var(--brand-primary); border: 2px solid var(--brand-primary); }
.btn-secondary:hover, .btn-outline-secondary:hover { background: var(--brand-primary); color: #fff; transform: translateY(-2px); }
.nav-tabs { border: none; background: #fff; padding: .5rem 1rem; margin-bottom: 1rem; }
.nav-tabs .nav-link { color: #333; margin-right: 1rem; background: #fff; border: none; }
.nav-tabs .nav-link.active { color: #000; background: var(--brand-light); }
.nav-tabs .nav-link:hover { background: var(--brand-primary); color: #fff; }
.table-responsive { border-radius: var(--card-radius); overflow: hidden; }
.row-delete-btn { display: none; background: transparent; border: none; font-size: 1rem; cursor: pointer; }
tr:hover .row-delete-btn { display: inline-block; }
.schema-hint { font-size: .875rem; color: #6c757d; }
.table-responsive {
    overflow-x: auto !important;
}
.cell-link {
  color: #0d6efd;
  text-decoration: underline;
  cursor: pointer;
}

.journal-shell {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 1rem;
}

.journal-main {
  flex: 1 1 auto;
  min-width: 0;
}

.journal-metrics-sidebar {
  flex: 0 0 292px;
  width: 292px;
  min-width: 292px;
  align-self: flex-start;
}

.journal-metrics-panel {
  position: sticky;
  top: 88px;
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08) !important;
  background:
    radial-gradient(circle at top, rgba(13,110,253,0.08), transparent 48%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96)),
    #fff;
}

.journal-metrics-panel__header {
  margin-bottom: .85rem;
}

.journal-metrics-panel__eyebrow {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7b8794;
  margin-bottom: .25rem;
}

.journal-metrics-panel__title {
  margin: 0;
  font-size: .98rem;
  font-weight: 700;
  color: #0f172a;
}

.journal-metrics-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}

.journal-metric-card {
  min-width: 0;
  padding: .75rem .8rem;
  border-radius: .85rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,252,0.92));
}

.journal-metric-card--primary {
  background: linear-gradient(135deg, rgba(13,110,253,0.14), rgba(255,255,255,0.94));
  border-color: rgba(13,110,253,0.2);
}

.journal-metric-card__label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  margin-bottom: .3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.journal-metric-card__value {
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.03em;
}

.journal-metric-card__value.is-placeholder {
  color: #9aa4b2;
}

.journal-metric-card.is-positive {
  border-color: rgba(25, 135, 84, 0.2);
  background: linear-gradient(180deg, rgba(25, 135, 84, 0.08), rgba(255,255,255,0.96));
}

.journal-metric-card.is-positive .journal-metric-card__value {
  color: #198754;
}

.journal-metric-card.is-negative {
  border-color: rgba(220, 53, 69, 0.2);
  background: linear-gradient(180deg, rgba(220, 53, 69, 0.08), rgba(255,255,255,0.96));
}

.journal-metric-card.is-negative .journal-metric-card__value {
  color: #dc3545;
}

.journal-metric-card.is-warning {
  border-color: rgba(183, 121, 31, 0.24);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.10), rgba(255,255,255,0.96));
}

.journal-metric-card.is-warning .journal-metric-card__value {
  color: #b7791f;
}

.journal-live-analysis {
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.journal-live-analysis__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .55rem;
}

.journal-live-analysis__eyebrow {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #7b8794;
  margin-bottom: .2rem;
}

.journal-live-analysis__title {
  margin: 0;
  font-size: .92rem;
  font-weight: 700;
  color: #0f172a;
}

.journal-live-analysis__badge {
  flex: 0 0 auto;
  padding: .22rem .55rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
}

.journal-live-analysis__badge.is-ok {
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
}

.journal-live-analysis__badge.is-warning {
  background: rgba(245, 158, 11, 0.16);
  color: #b7791f;
}

.journal-live-analysis__badge.is-critical {
  background: rgba(220, 53, 69, 0.14);
  color: #dc3545;
}

.journal-live-analysis__meta {
  font-size: .78rem;
  color: #64748b;
  margin-bottom: .6rem;
}

.journal-live-analysis__messages {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: .35rem;
  color: #1e293b;
  font-size: .8rem;
}

.journal-live-highlights {
  margin-top: .9rem;
  padding-top: .85rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.3);
}

.journal-live-highlights__header {
  margin-bottom: .55rem;
}

.journal-live-highlights__eyebrow {
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #7b8794;
  margin-bottom: .15rem;
}

.journal-live-highlights__title {
  margin: 0;
  font-size: .88rem;
  font-weight: 700;
  color: #0f172a;
}

.journal-live-highlights__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}

.journal-live-highlights__item {
  padding: .55rem .6rem;
  border-radius: .8rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.72);
}

.journal-live-highlights__item.is-critical {
  border-color: rgba(220, 53, 69, 0.22);
  background: linear-gradient(180deg, rgba(220, 53, 69, 0.08), rgba(255,255,255,0.96));
}

.journal-live-highlights__item.is-important {
  border-color: rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.10), rgba(255,255,255,0.96));
}

.journal-live-highlights__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .2rem;
}

.journal-live-highlights__label {
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
}

.journal-live-highlights__severity {
  font-size: .68rem;
  font-weight: 700;
  color: #475569;
}

.journal-live-highlights__item.is-critical .journal-live-highlights__severity {
  color: #dc3545;
}

.journal-live-highlights__item.is-important .journal-live-highlights__severity {
  color: #b7791f;
}

.journal-live-highlights__text {
  font-size: .78rem;
  color: #1e293b;
  line-height: 1.35;
}

.journal-live-highlights__empty {
  font-size: .78rem;
  color: #64748b;
}

.journal-toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1080;
  display: grid;
  gap: .65rem;
  width: min(360px, calc(100vw - 32px));
}

.journal-toast {
  padding: .9rem 1rem;
  border-radius: .95rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
}

.journal-toast__title {
  font-size: .88rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.journal-toast__text {
  font-size: .8rem;
  color: rgba(248, 250, 252, 0.86);
}

@media (max-width: 991.98px) {
  .journal-shell {
    display: block;
  }

  .journal-metrics-sidebar {
    width: 100%;
    min-width: 0;
    margin-top: 1rem;
    order: -1;
  }

  .journal-metrics-panel {
    position: static;
    box-shadow: var(--card-shadow) !important;
  }

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

@media (max-width: 575.98px) {
  .main-page {
    width: min(100vw - 16px, 100%);
    padding: 1rem .25rem 1.5rem;
  }

  .journal-toast-stack {
    right: 8px;
    bottom: 8px;
    width: min(100vw - 16px, 100%);
  }

  .journal-metrics-list {
    grid-template-columns: 1fr;
  }

  .journal-metric-card__value {
    font-size: 1.2rem;
  }
}

/* Recommendations and Cash */
.journal-surface {
  padding: 1.15rem;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 1.4rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.95));
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.06);
}

.journal-surface__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.journal-surface__eyebrow {
  margin-bottom: .3rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #64748b;
}

.journal-surface__title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #0f172a;
}

.journal-surface__subtitle {
  margin: .35rem 0 0;
  font-size: .92rem;
  line-height: 1.55;
  color: #667085;
}

.journal-segmented-control {
  display: inline-flex;
  align-items: center;
  gap: .22rem;
  padding: .24rem;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(248, 250, 252, 0.96);
}

.journal-segmented-control__btn {
  min-height: 2.4rem;
  padding: .52rem .9rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475467;
  font-size: .85rem;
  font-weight: 600;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.journal-segmented-control__btn.active {
  background: rgba(255,255,255,0.98);
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.journal-segmented-control__btn:hover {
  color: #111827;
}

.journal-empty-state {
  display: grid;
  justify-items: center;
  gap: .7rem;
  padding: 3rem 1.2rem;
  border: 1px dashed rgba(203, 213, 225, 0.96);
  border-radius: 1.25rem;
  background: rgba(248, 250, 252, 0.72);
  text-align: center;
}

.journal-empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: rgba(219, 234, 254, 0.92);
  color: #2563eb;
  font-size: 1.2rem;
}

.journal-empty-state__title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #0f172a;
}

.journal-empty-state__text {
  max-width: 420px;
  font-size: .92rem;
  line-height: 1.6;
  color: #667085;
}

.recs-surface,
.cash-surface {
  display: grid;
  gap: 1rem;
}

.recs-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(0, 1.4fr);
  gap: 1rem;
}

.recs-score {
  padding: 1rem 1.05rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(191, 219, 254, 0.92);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(239,246,255,0.9), rgba(255,255,255,0.96));
}

.recs-score__label {
  display: block;
  margin-bottom: .35rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #64748b;
}

.recs-score__value {
  display: flex;
  align-items: baseline;
  gap: .3rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.05em;
  color: #0f172a;
}

.recs-score__value small {
  font-size: .95rem;
  color: #667085;
}

.recs-score__meta {
  margin: .3rem 0 .85rem;
  font-size: .82rem;
  color: #667085;
}

.dna-progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(37, 99, 235, 0.12);
}

.dna-progress .progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.recs-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
}

.recs-metric-card,
.cash-overview-card {
  padding: 1rem 1.05rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255,255,255,0.96);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.recs-metric-card__label,
.cash-overview-card__label {
  display: block;
  margin-bottom: .3rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #64748b;
}

.recs-metric-card__value,
.cash-overview-card__value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #0f172a;
}

.cash-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.cash-overview-card--primary .cash-overview-card__value {
  color: #2563eb;
}

.recs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.recs-toolbar__filters {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
}

.recs-refresh-status {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(37, 99, 235, 0.42);
  border-radius: .95rem;
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.98), rgba(191, 219, 254, 0.94));
  color: #0f172a;
  font-size: .94rem;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.recs-refresh-status .spinner-border {
  color: #1d4ed8;
}

.recs-filter {
  min-width: 180px;
  min-height: 2.65rem;
  border-radius: .95rem;
  border-color: rgba(203, 213, 225, 0.92);
  box-shadow: none;
  font-size: .88rem;
}

.recs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.recs-card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid rgba(226, 232, 240, 0.92) !important;
  border-radius: 1.2rem !important;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.05) !important;
}

.recs-card .card-body {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 1rem 1rem 1.05rem;
}

.recs-badge {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  min-height: 1.9rem;
  padding: .25rem .62rem;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(248, 250, 252, 0.96);
  font-size: .78rem;
  font-weight: 700;
}

.recs-badge.critical {
  color: #b42318;
  background: rgba(254, 228, 226, 0.92);
  border-color: rgba(254, 205, 202, 0.96);
}

.recs-badge.important {
  color: #b54708;
  background: rgba(255, 244, 229, 0.94);
  border-color: rgba(254, 223, 137, 0.96);
}

.recs-badge.improve {
  color: #175cd3;
  background: rgba(239, 246, 255, 0.94);
  border-color: rgba(191, 219, 254, 0.96);
}

.recs-menu {
  position: absolute;
  top: .9rem;
  right: .9rem;
}

.recs-menu .btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255,255,255,0.96);
  color: #667085;
}

.recs-title {
  margin: 0;
  padding-right: 2.25rem;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.02em;
  color: #0f172a;
}

.recs-desc {
  margin: 0;
  font-size: .9rem;
  line-height: 1.62;
  color: #667085;
}

.recs-kpis {
  display: grid;
  gap: .45rem;
  padding: .8rem .85rem;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(248, 250, 252, 0.94);
}

.recs-kpi {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  font-size: .86rem;
  color: #667085;
}

.recs-kpi b {
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.recs-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #344054;
  font-size: .88rem;
  line-height: 1.55;
}

.recs-actions {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: .1rem;
}

.recs-actions .btn {
  min-height: 2.45rem;
  padding: .55rem .9rem;
  border-radius: .9rem !important;
  box-shadow: none !important;
  font-size: .84rem;
  font-weight: 600;
}

.recs-status {
  font-size: .75rem;
  color: #667085;
}

.recs-pager-wrap {
  display: flex;
  justify-content: center;
  padding-top: .2rem;
}

.recs-pager .page-link {
  border: 1px solid rgba(226, 232, 240, 0.92);
  color: #344054;
  border-radius: .8rem !important;
  margin: 0 .14rem;
  min-width: 2.2rem;
  text-align: center;
}

.recs-pager .page-item.active .page-link {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.cash-table-shell {
  padding: .1rem;
}

#cashOperationsTable thead th {
  white-space: nowrap;
}

.cash-type-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: .24rem .62rem;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(248, 250, 252, 0.96);
  font-size: .78rem;
  font-weight: 700;
  color: #344054;
}

.cash-type-chip.is-positive {
  background: rgba(236, 253, 243, 0.94);
  border-color: rgba(171, 239, 198, 0.96);
  color: #027a48;
}

.cash-type-chip.is-negative {
  background: rgba(254, 243, 242, 0.94);
  border-color: rgba(254, 205, 202, 0.96);
  color: #b42318;
}

.cash-type-chip.is-neutral {
  background: rgba(239, 246, 255, 0.94);
  border-color: rgba(191, 219, 254, 0.96);
  color: #175cd3;
}

.cash-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cash-amount.is-positive {
  color: #15803d;
}

.cash-amount.is-negative {
  color: #dc2626;
}

.cash-trade-link {
  font-weight: 600;
  color: #175cd3;
  text-decoration: none;
}

.cash-trade-link:hover {
  text-decoration: underline;
}

.cash-text-muted {
  color: #667085;
}

@media (max-width: 992px) {
  .recs-hero,
  .cash-overview {
    grid-template-columns: 1fr;
  }

  .recs-metrics {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 576px) {
  .journal-surface {
    padding: .95rem;
    border-radius: 1.15rem;
  }

  .journal-surface__header,
  .recs-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .recs-toolbar__filters {
    width: 100%;
  }

  .recs-filter {
    width: 100%;
    min-width: 0;
  }

  .recs-grid {
    grid-template-columns: 1fr;
  }
}

/* Header */
.journal-topbar {
  padding: 0;
  background: transparent !important;
  box-shadow: none !important;
  position: relative;
  z-index: 1100;
  overflow: visible;
}

.journal-topbar__inner {
  display: grid !important;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 68px;
  padding-top: .45rem;
  padding-bottom: .45rem;
  column-gap: 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.92));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07) !important;
  backdrop-filter: blur(12px);
  overflow: visible;
}

.journal-topbar__brand {
  gap: .8rem;
  text-decoration: none;
  flex: 0 0 auto;
  margin-right: 0 !important;
}

.journal-topbar__brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: .95rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(241,245,249,0.94));
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.journal-topbar__brand-mark img {
  display: block;
}

.journal-topbar__brand-text {
  font-family: "IBM Plex Sans", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #0f172a;
}

.journal-topbar__actions {
  align-items: center;
  flex-wrap: wrap;
  gap: .85rem !important;
}

.journal-topbar__center {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.journal-topbar__nav {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .24rem;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.journal-topbar__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  min-width: 7.5rem;
  padding: .58rem .95rem;
  border-radius: .8rem;
  color: #667085;
  text-decoration: none;
  font-size: .96rem;
  font-weight: 700;
  letter-spacing: -.01em;
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.journal-topbar__nav-link::after {
  content: "";
  position: absolute;
  left: .95rem;
  right: .95rem;
  bottom: .42rem;
  height: 2px;
  border-radius: 999px;
  background: #175cd3;
  opacity: 0;
  transform: scaleX(.72);
  transition: opacity .16s ease, transform .16s ease;
}

.journal-topbar__nav-link:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.9);
}

.journal-topbar__nav-link.is-active {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.journal-topbar__nav-link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.journal-topbar__nav-link:focus-visible,
.journal-topbar__external-link:focus-visible,
.journal-topbar__cta:focus-visible,
.journal-topbar__avatar:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16) !important;
  border-radius: .8rem;
}

.journal-topbar__external-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 2.15rem;
  color: #98a2b3;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 500;
  transition: color .16s ease, opacity .16s ease;
  opacity: .82;
}

.journal-topbar__external-link:hover {
  color: #475467;
  opacity: 1;
}

.journal-topbar__cta {
  min-height: 2.35rem;
  padding: .52rem .78rem !important;
  border: 1px solid rgba(226, 232, 240, 0.96) !important;
  border-radius: .82rem !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: #475467 !important;
  box-shadow: none !important;
  font-size: .84rem !important;
  font-weight: 600 !important;
  letter-spacing: -.01em;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}

.journal-topbar__cta i {
  font-size: .95rem;
}

.journal-topbar__cta:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(203, 213, 225, 0.98) !important;
  color: #0f172a !important;
}

.journal-topbar__user {
  min-height: 2.4rem;
  padding: .48rem .72rem !important;
  border: 1px solid rgba(226, 232, 240, 0.92) !important;
  border-radius: .82rem !important;
  background: rgba(248, 250, 252, 0.92) !important;
  color: #475467 !important;
  box-shadow: none !important;
  font-size: .84rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.journal-topbar__user:hover {
  border-color: rgba(203, 213, 225, 0.98) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
}

.journal-topbar__user::after {
  margin-left: .45rem;
}

.journal-topbar__menu {
  margin-top: .55rem !important;
  padding: .45rem;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  z-index: 1200;
}

.journal-topbar__menu .dropdown-item {
  border-radius: .7rem;
  padding: .55rem .72rem;
  font-size: .9rem;
  font-weight: 500;
}

/* Modals */
.modal-backdrop {
  z-index: 1240;
}

.modal-backdrop.show {
  opacity: .48;
  backdrop-filter: blur(6px);
}

.modal {
  z-index: 1250;
}

.modal-dialog {
  --bs-modal-margin: 1.1rem;
}

.journal-modal {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.95));
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.18);
}

.journal-modal .modal-header,
.journal-modal .modal-footer {
  border-color: rgba(226, 232, 240, 0.88);
}

.journal-modal .modal-header {
  padding: 1.05rem 1.2rem .95rem;
  background: rgba(255, 255, 255, 0.52);
}

.journal-modal .modal-title {
  font-family: "IBM Plex Sans", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #0f172a;
}

.journal-modal .btn-close {
  border-radius: .75rem;
  box-shadow: none !important;
}

.journal-modal .modal-body {
  padding: 1.15rem 1.2rem;
}

.journal-modal .modal-footer {
  padding: .95rem 1.2rem 1.15rem;
  background: rgba(255, 255, 255, 0.44);
}

.journal-modal .form-label {
  margin-bottom: .42rem;
  font-size: .82rem;
  font-weight: 600;
  color: #475467;
}

.journal-modal .form-control,
.journal-modal .form-select {
  min-height: 2.85rem;
  border-color: rgba(203, 213, 225, 0.96);
  border-radius: .9rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  color: #0f172a;
}

.journal-modal textarea.form-control {
  min-height: 7rem;
}

.journal-modal .form-control:focus,
.journal-modal .form-select:focus {
  border-color: rgba(59, 130, 246, 0.72);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.journal-tag-input {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  min-height: 2.85rem;
  padding: .38rem .56rem;
  border: 1px solid rgba(203, 213, 225, 0.96);
  border-radius: .9rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  cursor: text;
}

.journal-tag-input:focus-within {
  border-color: rgba(59, 130, 246, 0.72);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.journal-tag-input__chips {
  display: contents;
}

.journal-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  max-width: 100%;
  padding: .28rem .34rem .28rem .55rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: .5rem;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.15;
}

.journal-tag-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  border: 0;
  border-radius: .45rem;
  background: transparent;
  color: #1d4ed8;
  line-height: 1;
}

.journal-tag-chip__remove:hover {
  background: rgba(37, 99, 235, 0.14);
}

.journal-tag-input__control {
  flex: 1 1 10rem;
  min-width: 8rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
}

.journal-tag-input__suggestions {
  position: absolute;
  z-index: 1300;
  top: calc(100% + .35rem);
  left: 0;
  right: 0;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.96);
  border-radius: .75rem;
  background: #fff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.journal-tag-input__suggestions.is-open {
  display: block;
}

.journal-tag-suggestion {
  display: block;
  width: 100%;
  padding: .62rem .78rem;
  border: 0;
  border-bottom: 1px solid rgba(241, 245, 249, 0.96);
  background: #fff;
  color: #0f172a;
  text-align: left;
  font-size: .88rem;
}

.journal-tag-suggestion:hover,
.journal-tag-suggestion:focus-visible {
  background: rgba(37, 99, 235, 0.08);
  outline: 0;
}

.journal-modal .form-text,
.journal-modal small,
.journal-modal .schema-hint {
  color: #667085;
}

.journal-modal .table {
  --bs-table-bg: transparent;
}

.journal-modal .table thead th {
  border-bottom-color: rgba(226, 232, 240, 0.92);
  background: rgba(248, 250, 252, 0.92);
  color: #667085;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.journal-modal .table tbody td {
  border-bottom-color: rgba(241, 245, 249, 0.96);
}

.journal-modal .table-hover > tbody > tr:hover > * {
  background: rgba(248, 250, 252, 0.94);
}

.schema-modal-dialog {
  width: min(98vw, 1720px);
  max-width: none;
  height: calc(100vh - 2rem);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.schema-modal-dialog .modal-content {
  max-height: 100%;
  overflow: hidden;
}

.schema-editor-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.schema-editor-toolbar {
  flex: 0 0 auto;
}

.schema-editor-toolbar .schema-hint {
  min-width: 0;
}

.schema-editor-toolbar #addFieldBtn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.schema-editor-table-wrap {
  flex: 1 1 auto;
  min-height: 14rem;
  overflow: auto;
}

.schema-editor-table-wrap #schemaTable {
  margin-bottom: 0;
}

.schema-editor-table-wrap #schemaTable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

@media (max-width: 767.98px) {
  .schema-modal-dialog {
    height: calc(100vh - 1rem);
    margin-top: .5rem;
    margin-bottom: .5rem;
  }

  .schema-editor-toolbar {
    align-items: stretch !important;
    flex-direction: column;
  }

  .schema-editor-toolbar #addFieldBtn {
    width: 100%;
  }
}

.journal-modal .btn {
  min-height: 2.75rem;
  padding: .68rem .98rem;
  border-radius: .92rem !important;
  font-size: .9rem;
  font-weight: 600;
  box-shadow: none !important;
}

.journal-modal .btn-primary {
  background: linear-gradient(180deg, #0f172a, #111827);
  color: #f8fafc;
  border: 0;
}

.journal-modal .btn-primary:hover {
  background: linear-gradient(180deg, #111827, #1e293b);
}

.journal-modal .btn-outline-secondary {
  border-color: rgba(203, 213, 225, 0.95);
  color: #0f172a;
  background: rgba(255,255,255,0.96);
}

.journal-modal .btn-outline-secondary:hover {
  background: rgba(248,250,252,0.98);
  color: #0f172a;
  border-color: rgba(148,163,184,0.9);
}

.journal-modal .btn-outline-danger {
  background: rgba(255, 244, 244, 0.92);
  border-color: rgba(254, 205, 211, 0.95);
  color: #b42318;
}

.journal-modal .btn-outline-danger:hover {
  background: rgba(254, 242, 242, 0.96);
  color: #912018;
  border-color: rgba(253, 164, 175, 0.95);
}

.recs-filter { min-width: 190px; }

.recs-archived { opacity: .85; }
.recs-status { font-size:.85rem; color:#6c757d; }

/* Main dashboard */
.main-dashboard-shell {
  padding-top: .25rem;
  padding-bottom: 2rem;
}

.main-dashboard-hero {
  margin-bottom: 1.15rem;
  padding: 1.55rem 1.65rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.15), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.07);
}

.main-dashboard-hero__profile {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.main-dashboard-hero__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.6rem;
  height: 4.6rem;
  flex: 0 0 auto;
  border-radius: 1.3rem;
  background: linear-gradient(180deg, #0f172a, #1d4ed8);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.04em;
  box-shadow: 0 14px 26px rgba(29, 78, 216, 0.16);
}

.main-dashboard-hero__copy {
  max-width: 780px;
}

.main-dashboard-hero__eyebrow {
  margin-bottom: .4rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #64748b;
}

.main-dashboard-hero__title {
  margin: 0;
  font-family: "IBM Plex Sans", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 2.9vw, 2.7rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.05em;
  color: #0f172a;
}

.main-dashboard-hero__subtitle {
  margin-top: .45rem;
  font-size: .96rem;
  font-weight: 600;
  color: #475467;
}

.main-dashboard-hero__description {
  margin: .55rem 0 0;
  font-size: .96rem;
  line-height: 1.6;
  color: #5b6677;
}

.main-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.main-dashboard-card {
  padding: 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.35rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,250,252,0.96));
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
}

.main-dashboard-card__eyebrow {
  margin-bottom: .35rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #667085;
}

.main-dashboard-card__title {
  margin: 0 0 .8rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #0f172a;
}

.main-dashboard-list {
  display: grid;
  gap: .55rem;
  margin: 0;
  padding-left: 1.1rem;
  color: #172033;
}

.main-dashboard-list li {
  line-height: 1.55;
}

.main-dashboard-list__empty {
  color: #667085;
}

.main-dashboard-text {
  color: #172033;
  line-height: 1.65;
}

/* Mentor page */
.mentor-shell {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-top: .25rem;
  padding-bottom: 1rem;
}

.mentor-hero {
  margin-bottom: 1.15rem;
  padding: 1.5rem 1.6rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.15), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.07);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
}

.mentor-hero__copy {
  max-width: 760px;
}

.mentor-hero__eyebrow {
  margin-bottom: .55rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #64748b;
}

.mentor-hero__title {
  margin: 0;
  font-family: "IBM Plex Sans", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 2.8vw, 2.7rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.05em;
  color: #0f172a;
}

.mentor-hero__subtitle {
  margin: .6rem 0 0;
  font-size: .98rem;
  line-height: 1.6;
  color: #5b6677;
}

.mentor-hero__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  min-width: min(100%, 340px);
}

.mentor-hero__meta-card {
  padding: .95rem 1rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(219, 234, 254, 0.92);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.mentor-hero__meta-label {
  display: block;
  margin-bottom: .2rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}

.mentor-hero__meta-card strong {
  display: block;
  font-size: .98rem;
  font-weight: 700;
  color: #0f172a;
}

.mentor-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 1rem;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.mentor-layout--triple {
  grid-template-columns: 280px minmax(0, 1fr) 340px;
}

.mentor-sidebar,
.mentor-chat,
.mentor-context {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.45rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,250,252,0.96));
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
}

.mentor-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.mentor-sidebar__header,
.mentor-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.mentor-chat__header--stacked {
  display: grid;
  gap: .95rem;
}

.mentor-chat__header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.mentor-sidebar__eyebrow,
.mentor-chat__eyebrow {
  margin-bottom: .18rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #667085;
}

.mentor-sidebar__title,
.mentor-chat__title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.02em;
}

.mentor-sidebar__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: .6rem;
  display: grid;
  gap: .45rem;
}

.mentor-sidebar__empty,
.mentor-messages__empty {
  color: #667085;
  font-size: .92rem;
  line-height: 1.55;
}

.mentor-chat-item {
  width: 100%;
  text-align: left;
  padding: .8rem .9rem;
  border: 1px solid rgba(241, 245, 249, 0.96);
  border-radius: 1rem;
  background: rgba(255,255,255,0.94);
  box-shadow: none;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.mentor-chat-item:hover {
  transform: translateY(-1px);
  border-color: rgba(191, 219, 254, 0.96);
  background: rgba(248, 250, 252, 0.98);
}

.mentor-chat-item.is-active {
  border-color: rgba(191, 219, 254, 0.98);
  background: linear-gradient(180deg, rgba(239,246,255,0.96), rgba(219,234,254,0.9));
  box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.65);
}

.mentor-chat-item__title {
  display: block;
  font-size: .94rem;
  font-weight: 700;
  color: #0f172a;
}

.mentor-chat-item__meta {
  display: block;
  margin-top: .2rem;
  font-size: .78rem;
  color: #667085;
}

.mentor-chat {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.mentor-scope {
  display: grid;
  gap: .42rem;
  min-width: min(100%, 250px);
}

.mentor-scope__label {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}

.mentor-select {
  min-height: 2.7rem;
  width: 100%;
  border: 1px solid rgba(203, 213, 225, 0.96);
  border-radius: .92rem;
  background: rgba(255,255,255,0.98);
  padding: .72rem .9rem;
  color: #0f172a;
  font-size: .9rem;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

.mentor-select:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.72);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.mentor-select--compact {
  min-width: 220px;
  min-height: 2.45rem;
  padding-top: .58rem;
  padding-bottom: .58rem;
}

.mentor-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.mentor-quick-action {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.55rem;
  padding: .55rem .9rem;
  border: 1px solid rgba(219, 234, 254, 0.96);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.96);
  color: #0f172a;
  font-size: .86rem;
  font-weight: 600;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}

.mentor-quick-action:hover {
  transform: translateY(-1px);
  border-color: rgba(147, 197, 253, 0.98);
  background: rgba(239, 246, 255, 0.98);
}

.mentor-messages {
  flex: 1;
  min-height: 0;
  padding: 1rem;
  overflow-y: auto;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 26%),
    linear-gradient(180deg, rgba(248,250,252,0.98), rgba(243,246,250,0.94));
  display: grid;
  align-content: start;
  gap: .85rem;
}

.mentor-message {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.mentor-message.user {
  justify-content: flex-end;
  align-items: flex-end;
}

.mentor-message__bubble {
  max-width: min(760px, 76%);
  padding: .9rem 1rem;
  border-radius: 1.15rem;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
  line-height: 1.58;
}

.mentor-message.assistant .mentor-message__bubble {
  background: rgba(255,255,255,0.98);
  color: #172033;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-top-left-radius: .45rem;
}

.mentor-message.user .mentor-message__bubble {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color: #eff6ff;
  border-top-right-radius: .45rem;
}

.mentor-message__meta-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #667085;
  padding: 0 .2rem;
}

.mentor-message__bubble p,
.mentor-message__bubble ul,
.mentor-message__bubble ol {
  margin: .45rem 0;
}

.mentor-message__bubble ul,
.mentor-message__bubble ol {
  padding-left: 1.1rem;
}

.mentor-message__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .7rem;
}

.mentor-message__file {
  width: auto;
  min-width: 0;
  max-width: min(100%, 320px);
  padding: .45rem .65rem !important;
  height: auto;
  gap: .45rem;
  font-size: .8rem;
}

.mentor-message__file span {
  display: inline-block;
  min-width: 0;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mentor-message__image {
  max-width: 220px;
  max-height: 180px;
  border-radius: .9rem;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.mentor-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: .1rem;
  padding: .7rem .9rem;
  border-radius: .95rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255,255,255,0.96);
  color: #667085;
  font-size: .84rem;
  width: fit-content;
}

.mentor-typing-indicator .dot {
  animation: mentor-blink 1s infinite;
}

.mentor-typing-indicator .dot:nth-child(2) { animation-delay: .2s; }
.mentor-typing-indicator .dot:nth-child(3) { animation-delay: .4s; }

@keyframes mentor-blink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

.mentor-composer {
  padding: .85rem 1rem 1rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255,255,255,0.88);
}

.mentor-composer__attachments {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}

.mentor-attach-trade {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}

.mentor-trade-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: .75rem;
}

.mentor-trade-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid rgba(191, 219, 254, 0.96);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.96);
  color: #1d4ed8;
  padding: .38rem .7rem;
  font-size: .82rem;
  font-weight: 600;
}

.mentor-composer__input-row {
  display: flex;
  align-items: flex-end;
  gap: .75rem;
}

.mentor-composer__textarea {
  flex: 1;
  min-height: 3.4rem;
  max-height: 11rem;
  resize: none;
  border: 1px solid rgba(203, 213, 225, 0.96);
  border-radius: 1rem;
  background: rgba(255,255,255,0.98);
  padding: .85rem .95rem;
  color: #0f172a;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

.mentor-composer__textarea:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.72);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.mentor-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .7rem .95rem;
  border-radius: .92rem !important;
  border: 1px solid transparent;
  box-shadow: none !important;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: -.01em;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}

.mentor-action-btn:hover {
  transform: translateY(-1px);
}

.mentor-action-btn--primary {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color: #eff6ff;
}

.mentor-action-btn--primary:hover {
  background: linear-gradient(180deg, #1d4ed8, #1e40af);
  color: #fff;
}

.mentor-action-btn--secondary {
  background: rgba(255,255,255,0.96);
  color: #0f172a;
  border-color: rgba(203, 213, 225, 0.92);
}

.mentor-action-btn--secondary:hover {
  background: rgba(248,250,252,0.98);
  color: #020617;
  border-color: rgba(148, 163, 184, 0.9);
}

.mentor-action-btn--soft {
  background: rgba(239, 246, 255, 0.98);
  color: #1d4ed8;
  border-color: rgba(191, 219, 254, 0.96);
}

.mentor-action-btn--soft:hover {
  background: rgba(219, 234, 254, 0.98);
  color: #1e40af;
  border-color: rgba(147, 197, 253, 0.98);
}

.mentor-action-btn--compact {
  min-height: 2.4rem;
  padding: .55rem .8rem;
  font-size: .84rem;
}

.mentor-file-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  max-width: min(100%, 420px);
  background: rgba(239, 246, 255, 0.98);
  border: 1px dashed rgba(147, 197, 253, 0.95);
  border-radius: 999px;
  padding: .35rem .65rem;
  font-size: .84rem;
  color: #175cd3;
}

.mentor-file-pill #fileName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mentor-file-pill .remove {
  cursor: pointer;
  flex: 0 0 auto;
}

.mentor-context {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.mentor-context__header {
  padding: 1rem 1.05rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.mentor-context__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: .85rem;
  display: grid;
  gap: .8rem;
}

.mentor-context-card {
  padding: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 1.1rem;
  background: rgba(255,255,255,0.94);
}

.mentor-context-card__label {
  margin-bottom: .55rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #64748b;
}

.mentor-context-card__scope {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.mentor-context-card__hint {
  margin-top: .35rem;
  font-size: .86rem;
  line-height: 1.55;
  color: #667085;
}

.mentor-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
}

.mentor-overview__card {
  padding: .8rem .85rem;
  border-radius: .95rem;
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.mentor-overview__card span {
  display: block;
  margin-bottom: .2rem;
  font-size: .76rem;
  font-weight: 600;
  color: #64748b;
}

.mentor-overview__card strong {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.mentor-overview__card.is-positive strong {
  color: #15803d;
}

.mentor-overview__card.is-negative strong {
  color: #dc2626;
}

.mentor-warnings,
.mentor-trade-list {
  display: grid;
  gap: .65rem;
}

.mentor-warning {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  padding: .8rem .85rem;
  border-radius: .95rem;
  background: rgba(255, 247, 237, 0.95);
  border: 1px solid rgba(253, 186, 116, 0.7);
  color: #9a3412;
  font-size: .86rem;
  line-height: 1.5;
}

.mentor-context-empty {
  font-size: .88rem;
  line-height: 1.55;
  color: #667085;
}

.questionnaire-shell {
  gap: 0;
  min-height: calc(100vh - 112px);
  max-height: calc(100vh - 112px);
}

.questionnaire-hero {
  align-items: center;
  padding: 1rem 1.15rem;
  margin-bottom: .8rem;
  flex: 0 0 auto;
}

.questionnaire-hero .mentor-hero__title {
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.questionnaire-hero .mentor-hero__subtitle {
  margin-top: .45rem;
  font-size: .9rem;
  line-height: 1.45;
}

.questionnaire-hero__actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.questionnaire-layout {
  grid-template-columns: 340px minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.questionnaire-side,
.questionnaire-chat {
  min-height: 0;
  height: 100%;
}

.questionnaire-messages {
  padding-top: 1.1rem;
}

.questionnaire-chat__meta {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.98);
  border: 1px solid rgba(191, 219, 254, 0.96);
  color: #1d4ed8;
  font-size: .82rem;
  font-weight: 600;
}

.questionnaire-progress {
  display: grid;
  gap: .75rem;
}

.questionnaire-progress__bar {
  position: relative;
  height: .75rem;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.95);
  overflow: hidden;
}

.questionnaire-progress__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  transition: width .2s ease;
}

.questionnaire-progress__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
}

.questionnaire-progress__meta strong {
  font-size: 1.2rem;
  color: #0f172a;
}

.questionnaire-progress__meta span {
  font-size: .88rem;
  color: #667085;
}

.questionnaire-guidelines {
  display: grid;
  gap: .75rem;
}

.questionnaire-guideline {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: .65rem;
  align-items: start;
  font-size: .88rem;
  line-height: 1.55;
  color: #475467;
}

.questionnaire-guideline i {
  color: #2563eb;
}

.questionnaire-composer__hint {
  margin-bottom: .7rem;
  font-size: .84rem;
  color: #667085;
}

.questionnaire-chat .mentor-chat__header {
  padding: .8rem .95rem;
}

.questionnaire-chat .mentor-composer {
  padding: .75rem .9rem .85rem;
}

.main-dashboard-onboarding {
  margin-bottom: 1rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(191, 219, 254, 0.96);
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 35%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(239,246,255,0.95));
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.main-dashboard-onboarding__copy {
  max-width: 760px;
}

.main-dashboard-onboarding__title {
  margin: 0 0 .45rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.main-dashboard-onboarding__text {
  margin: 0;
  font-size: .95rem;
  line-height: 1.6;
  color: #475467;
}

.main-dashboard-onboarding__actions {
  flex: 0 0 auto;
}

.mentor-trade-item {
  text-align: left;
  padding: .82rem .85rem;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(248, 250, 252, 0.96);
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}

.mentor-trade-item:hover {
  transform: translateY(-1px);
  border-color: rgba(191, 219, 254, 0.96);
  background: rgba(239, 246, 255, 0.96);
}

.mentor-trade-item.is-active {
  border-color: rgba(147, 197, 253, 0.98);
  background: rgba(219, 234, 254, 0.94);
}

.mentor-trade-item__top,
.mentor-trade-item__meta,
.mentor-trade-item__flags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  flex-wrap: wrap;
}

.mentor-trade-item__symbol {
  font-size: .92rem;
  font-weight: 700;
  color: #0f172a;
}

.mentor-trade-item__pnl {
  font-size: .9rem;
  font-weight: 700;
}

.mentor-trade-item__pnl.is-positive {
  color: #15803d;
}

.mentor-trade-item__pnl.is-negative {
  color: #dc2626;
}

.mentor-trade-item__meta {
  margin-top: .45rem;
  font-size: .76rem;
  color: #667085;
}

.mentor-trade-item__flags {
  margin-top: .45rem;
}

.mentor-flag {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.95);
  color: #334155;
  font-size: .73rem;
  font-weight: 600;
}

.mentor-flag--warn {
  background: rgba(254, 243, 199, 0.95);
  color: #b45309;
}

/* Journals page */
.journals-page .main-page {
  width: min(1680px, calc(100vw - 32px));
  max-width: none;
  margin: 0 auto;
}

.journals-shell {
  padding-top: .25rem;
  padding-bottom: 2rem;
}

.journals-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
  padding: 1.5rem 1.6rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.15), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.07);
}

.journals-hero__copy {
  max-width: 760px;
}

.journals-hero__eyebrow {
  margin-bottom: .55rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #64748b;
}

.journals-hero__title {
  margin: 0;
  font-family: "IBM Plex Sans", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 2.8vw, 2.7rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.05em;
  color: #0f172a;
}

.journals-hero__subtitle {
  margin: .6rem 0 0;
  font-size: .98rem;
  line-height: 1.6;
  color: #5b6677;
}

.journals-toolbar {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
}

.journals-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 2.85rem;
  padding: .74rem 1rem;
  border-radius: .95rem !important;
  border: 1px solid transparent;
  box-shadow: none !important;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: -.01em;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}

.journals-action-btn:hover {
  transform: translateY(-1px);
}

.journals-action-btn--primary {
  background: linear-gradient(180deg, #0f172a, #111827);
  color: #f8fafc;
}

.journals-action-btn--primary:hover {
  background: linear-gradient(180deg, #111827, #1e293b);
  color: #fff;
}

.journals-action-btn--secondary {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border-color: rgba(203, 213, 225, 0.92);
}

.journals-action-btn--secondary:hover {
  background: rgba(248, 250, 252, 0.98);
  color: #020617;
  border-color: rgba(148, 163, 184, 0.9);
}

.journals-surface {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.45rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,250,252,0.96));
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
  padding: 1.2rem;
}

.journals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.journals-card {
  display: flex;
  flex-direction: column;
  gap: .95rem;
  min-height: 100%;
  padding: 1.15rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.95));
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.journals-card:hover {
  transform: translateY(-2px);
  border-color: rgba(191, 219, 254, 0.96);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.journals-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .8rem;
}

.journals-card__eyebrow {
  margin-bottom: .2rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #667085;
}

.journals-card__title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #0f172a;
}

.journals-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.95rem;
  padding: .3rem .66rem;
  border-radius: .8rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(248, 250, 252, 0.96);
  color: #334155;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.journals-card__description {
  margin: 0;
  color: #5b6677;
  font-size: .92rem;
  line-height: 1.55;
}

.journals-card__meta {
  display: grid;
  gap: .65rem;
}

.journals-card__meta-item {
  display: grid;
  gap: .18rem;
}

.journals-card__meta-label,
.journals-card__stat-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #667085;
}

.journals-card__meta-value,
.journals-card__stat-value {
  color: #101828;
  font-size: .9rem;
  font-weight: 600;
}

.journals-card__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  padding-top: .1rem;
}

.journals-card__stat {
  padding: .7rem .8rem;
  border-radius: .9rem;
  border: 1px solid rgba(241, 245, 249, 0.96);
  background: rgba(248, 250, 252, 0.76);
}

.journals-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .9rem;
  margin-top: auto;
  padding-top: .1rem;
}

.journals-card__timestamps {
  display: grid;
  gap: .2rem;
  color: #667085;
  font-size: .76rem;
}

.journals-card__actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex: 0 0 auto;
}

.journals-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: .8rem !important;
  background: rgba(255,255,255,0.96);
  color: #475467;
  box-shadow: none !important;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.journals-icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(248,250,252,0.98);
  color: #0f172a;
  border-color: rgba(203, 213, 225, 0.98);
}

.journals-icon-btn--danger:hover {
  background: rgba(254, 242, 242, 0.96);
  color: #b42318;
  border-color: rgba(253, 164, 175, 0.9);
}

.journals-empty-state {
  text-align: center;
  padding: 4.2rem 1rem 4rem;
  color: #667085;
}

.journals-empty-state img {
  max-width: 210px;
  margin-bottom: 1.6rem;
}

.journals-empty-state h3 {
  margin-bottom: .55rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #101828;
}

.journals-empty-state p {
  max-width: 560px;
  margin: 0 auto 1.2rem;
  font-size: .98rem;
  line-height: 1.6;
}

.journals-table-shell {
  padding: .35rem;
  border-radius: 1.15rem;
  background: linear-gradient(180deg, rgba(248,250,252,0.94), rgba(255,255,255,0.98));
  border: 1px solid rgba(226, 232, 240, 0.88);
}

.journals-table {
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.journals-table thead th {
  padding: .95rem;
  border: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(248, 250, 252, 0.96);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #667085;
  white-space: nowrap;
}

.journals-table tbody td {
  padding: .95rem;
  border: 0;
  border-bottom: 1px solid rgba(241, 245, 249, 0.96);
  vertical-align: middle;
  color: #172033;
  background: transparent;
}

.journals-table tbody tr {
  cursor: pointer;
}

.journals-table tbody tr:hover td {
  background: rgba(248, 250, 252, 0.92);
}

.journals-table__title {
  font-size: .96rem;
  font-weight: 700;
  color: #0f172a;
}

.journals-table__subtitle {
  margin-top: .18rem;
  font-size: .82rem;
  color: #667085;
}

/* Journal main area refresh: scoped to top + central content only */
.journal-page-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 1.5rem 1.6rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.07);
}

.journal-page-header__copy {
  max-width: 760px;
}

.journal-page-header__actions {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}

.journal-page-header__eyebrow {
  margin-bottom: .55rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #64748b;
}

.journal-page-header__title {
  margin: 0;
  font-family: "IBM Plex Sans", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: clamp(1.9rem, 2.8vw, 2.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.05em;
  color: #0f172a;
}

.journal-page-header__subtitle {
  margin: .55rem 0 0;
  font-size: .98rem;
  line-height: 1.55;
  color: #5b6677;
}

.journal-tabs-shell {
  margin-bottom: 1.15rem;
  padding: .45rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.3rem;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

#journalTabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none !important;
}

#journalTabs .nav-item {
  margin: 0;
}

#journalTabs .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: .7rem 1.05rem;
  border: 0;
  border-radius: 1rem !important;
  background: transparent;
  box-shadow: none !important;
  font-family: "IBM Plex Sans", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: #5f6b7c;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

#journalTabs .nav-link:hover {
  background: rgba(241, 245, 249, 0.92);
  color: #0f172a;
  transform: translateY(-1px);
}

#journalTabs .nav-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16) !important;
}

#journalTabs .nav-link.active {
  color: #0f172a;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,247,251,0.96));
  box-shadow:
    inset 0 0 0 1px rgba(148, 163, 184, 0.18),
    0 8px 18px rgba(15, 23, 42, 0.08) !important;
}

.journal-main {
  font-family: "IBM Plex Sans", "SF Pro Display", "Segoe UI", sans-serif;
}

.journal-main .tab-content {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.journal-main .tab-pane {
  min-width: 0;
}

.journal-main .tab-pane > .card,
.journal-main .tab-pane .journal-surface {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.45rem !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,250,252,0.96));
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06) !important;
  min-width: 0;
}

.journal-main .tab-pane > .card > .card-body,
.journal-main .tab-pane .journal-surface > .card-body {
  padding: 1.2rem 1.2rem 1.25rem;
}

.journal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.journal-toolbar__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .7rem;
}

.journal-toolbar__meta {
  display: inline-flex;
  align-items: center;
  min-height: 2.7rem;
  padding: .6rem .85rem;
  border-radius: .95rem;
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.journal-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 2.8rem;
  padding: .72rem 1rem;
  border-radius: .95rem !important;
  border: 1px solid transparent;
  box-shadow: none !important;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: -.01em;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.journal-action-btn i {
  font-size: .92rem;
}

.journal-action-btn:hover {
  transform: translateY(-1px);
}

.journal-action-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
}

.journal-action-btn--primary {
  background: linear-gradient(180deg, #0f172a, #111827);
  color: #f8fafc;
}

.journal-action-btn--primary:hover {
  background: linear-gradient(180deg, #111827, #1e293b);
  color: #fff;
}

.journal-action-btn--secondary {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border-color: rgba(203, 213, 225, 0.9);
}

.journal-action-btn--secondary:hover {
  background: rgba(248, 250, 252, 0.98);
  color: #020617;
  border-color: rgba(148, 163, 184, 0.9);
}

.journal-action-btn--ghost {
  background: rgba(255, 244, 244, 0.92);
  color: #b42318;
  border-color: rgba(254, 205, 211, 0.92);
}

.journal-action-btn--ghost:hover {
  background: rgba(254, 242, 242, 0.96);
  color: #912018;
}

#filterBtn .badge {
  min-width: 1.35rem;
  padding: .2rem .42rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12) !important;
  color: #1d4ed8;
  font-size: .72rem;
  font-weight: 700;
}

.schema-hint {
  font-size: .84rem;
  font-weight: 500;
  color: #6b7280;
}

.journal-table-frame {
  max-width: 100%;
  padding: .35rem;
  border-radius: 1.15rem;
  background:
    linear-gradient(180deg, rgba(248,250,252,0.94), rgba(255,255,255,0.98));
  border: 1px solid rgba(226, 232, 240, 0.88);
}

.journal-table-responsive {
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
  border-radius: .95rem;
  background: rgba(255, 255, 255, 0.96);
}

#tradesTable {
  margin: 0;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #0f172a;
}

#tradesTable thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: .95rem .95rem;
  border: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(248, 250, 252, 0.96);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #667085;
  white-space: nowrap;
}

#tradesTable tbody tr {
  transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease;
  cursor: pointer;
}

#tradesTable tbody td {
  padding: .9rem .95rem;
  border: 0;
  border-bottom: 1px solid rgba(241, 245, 249, 0.96);
  vertical-align: middle;
  font-size: .92rem;
  color: #172033;
  background: transparent;
}

#tradesTable tbody tr:hover td {
  background: rgba(248, 250, 252, 0.92);
}

#tradesTable tbody tr:hover {
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.78);
}

#tradesTable tbody td.trade-cell--editable {
  position: relative;
  padding-right: 2.4rem;
}

#tradesTable tbody td.trade-cell--editable:hover {
  background: rgba(239, 246, 255, 0.92);
}

.trade-cell__value {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 1.9rem;
}

.trade-inline-edit-btn {
  position: absolute;
  top: 50%;
  right: .45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  opacity: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: .45rem;
  background: rgba(255, 255, 255, 0.98);
  color: #475467;
  transition: opacity .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}

.trade-cell--editable:hover .trade-inline-edit-btn,
.trade-inline-edit-btn:focus-visible {
  opacity: 1;
}

.trade-inline-edit-btn:hover {
  background: rgba(219, 234, 254, 0.98);
  border-color: rgba(147, 197, 253, 0.95);
  color: #175cd3;
}

#tradesTable tbody td[data-field="open_time"],
#tradesTable tbody td[data-field="close_time"],
#tradesTable tbody td[data-field="entry_price"],
#tradesTable tbody td[data-field="qty"],
#tradesTable tbody td[data-field="pnl"] {
  font-variant-numeric: tabular-nums;
}

#tradesTable tbody td:last-child,
#tradesTable thead th:last-child {
  text-align: right;
  width: 64px;
}

.row-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  opacity: 0;
  border-radius: .7rem;
  color: #98a2b3;
  transition: opacity .16s ease, background-color .16s ease, color .16s ease;
}

tr:hover .row-delete-btn {
  opacity: 1;
}

.row-delete-btn:hover {
  background: rgba(254, 242, 242, 0.95);
  color: #b42318;
}

.cell-link {
  color: #175cd3;
  text-decoration: none;
  font-weight: 600;
}

.cell-link:hover {
  color: #1849a9;
  text-decoration: underline;
}

.trade-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 1.9rem;
  padding: .3rem .68rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.trade-chip--buy {
  color: #027a48;
  background: rgba(236, 253, 243, 0.96);
  border-color: rgba(171, 239, 198, 0.92);
}

.trade-chip--sell {
  color: #b42318;
  background: rgba(254, 243, 242, 0.96);
  border-color: rgba(254, 205, 211, 0.9);
}

.trade-chip--order {
  color: #475467;
  background: rgba(248, 250, 252, 0.96);
  border-color: rgba(226, 232, 240, 0.92);
}

.trade-chip--filled {
  color: #175cd3;
  background: rgba(239, 248, 255, 0.96);
  border-color: rgba(182, 224, 254, 0.92);
}

.trade-chip--closed {
  color: #027a48;
  background: rgba(236, 253, 243, 0.96);
  border-color: rgba(171, 239, 198, 0.92);
}

.trade-chip--canceled {
  color: #b42318;
  background: rgba(254, 243, 242, 0.96);
  border-color: rgba(254, 205, 211, 0.9);
}

.trade-symbol {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2rem;
  padding: .34rem .78rem;
  border-radius: .8rem;
  background: linear-gradient(180deg, rgba(248,250,252,0.98), rgba(241,245,249,0.92));
  border: 1px solid rgba(226, 232, 240, 0.92);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: #0f172a;
}

.trade-symbol::before {
  content: "";
  width: .42rem;
  height: .42rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #1d4ed8, #0f172a);
}

.trade-pnl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: .36rem .7rem;
  border-radius: .8rem;
  font-size: .82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.trade-pnl--positive {
  color: #027a48;
  background: rgba(236, 253, 243, 0.96);
}

.trade-pnl--negative {
  color: #b42318;
  background: rgba(254, 243, 242, 0.96);
}

.trade-pnl--neutral {
  color: #475467;
  background: rgba(248, 250, 252, 0.96);
}

.trade-ratio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.6rem;
  padding: .32rem .56rem;
  border-radius: .7rem;
  background: rgba(243, 244, 246, 0.92);
  color: #111827;
  font-size: .76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.trade-date {
  display: inline-flex;
  align-items: center;
  color: #475467;
  font-size: .87rem;
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .mentor-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    height: auto;
  }

  .mentor-layout--triple {
    grid-template-columns: 240px minmax(0, 1fr) 290px;
  }

  .mentor-chat__header-top {
    flex-direction: column;
    align-items: stretch;
  }

  .main-dashboard-grid {
    grid-template-columns: 1fr;
  }

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

  .journal-topbar__inner {
    border-radius: 1.2rem;
  }

  .journal-page-header {
    padding: 1.25rem 1.15rem;
  }

  .journal-main .tab-pane > .card > .card-body,
  .journal-main .tab-pane .journal-surface > .card-body {
    padding: 1rem;
  }
}

@media (max-width: 767.98px) {
  .mentor-hero {
    padding: 1.25rem 1.15rem;
    flex-direction: column;
  }

  .mentor-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .mentor-sidebar,
  .mentor-context {
    max-height: 280px;
  }

  .mentor-hero__meta {
    width: 100%;
    min-width: 0;
  }

  .mentor-overview {
    grid-template-columns: 1fr 1fr;
  }

  .mentor-composer__input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .mentor-attach-trade {
    width: 100%;
  }

  .mentor-select--compact {
    min-width: 0;
    flex: 1 1 auto;
  }

  .main-dashboard-hero {
    padding: 1.25rem 1.15rem;
  }

  .main-dashboard-hero__profile {
    align-items: flex-start;
  }

  .journals-hero {
    padding: 1.25rem 1.15rem;
  }

  .journals-surface {
    padding: 1rem;
  }

  .journals-grid {
    grid-template-columns: 1fr;
  }

  .journals-card__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .journals-card__actions {
    justify-content: flex-start;
  }

  .journal-topbar__inner {
    display: flex !important;
    flex-wrap: wrap;
    gap: .75rem;
  }

  .journal-topbar__actions {
    width: 100%;
    justify-content: flex-start !important;
  }

  .journal-topbar__center {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .journal-topbar__nav {
    width: 100%;
  }

  .journal-topbar__external-link {
    order: 1;
  }

  .journal-topbar__cta {
    order: 2;
  }

  .journal-topbar__user {
    order: 4;
  }

  .journal-page-header__title {
    font-size: 1.75rem;
  }

  .journal-tabs-shell {
    padding: .35rem;
  }

  #journalTabs .nav-link {
    min-height: 2.55rem;
    padding: .6rem .85rem;
    font-size: .88rem;
  }

  .journal-toolbar {
    align-items: stretch;
  }

  .journal-toolbar__actions {
    width: 100%;
  }

  .journal-action-btn {
    flex: 1 1 calc(50% - .5rem);
  }

  .journal-toolbar__meta {
    width: 100%;
  }

  #tradesTable thead th,
  #tradesTable tbody td {
    padding-left: .75rem;
    padding-right: .75rem;
  }
}

@media (max-width: 575.98px) {
  .mentor-shell {
    padding-bottom: 1.4rem;
  }

  .mentor-file-pill {
    max-width: 100%;
  }

  .mentor-message__file {
    max-width: 100%;
  }

  .mentor-hero {
    padding: 1rem .95rem;
    border-radius: 1.15rem;
  }

  .mentor-sidebar,
  .mentor-chat,
  .mentor-context {
    border-radius: 1.15rem;
  }

  .mentor-sidebar__header,
  .mentor-chat__header,
  .mentor-context__header,
  .mentor-composer {
    padding-left: .9rem;
    padding-right: .9rem;
  }

  .mentor-messages {
    padding: .85rem;
  }

  .mentor-message__bubble {
    max-width: 88%;
  }

  .mentor-overview {
    grid-template-columns: 1fr;
  }

  .main-dashboard-shell {
    padding-bottom: 1.4rem;
  }

  .main-dashboard-hero {
    padding: 1rem .95rem;
    border-radius: 1.15rem;
  }

  .main-dashboard-hero__profile {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-dashboard-card {
    padding: 1rem;
    border-radius: 1.15rem;
  }

  .journals-shell {
    padding-bottom: 1.4rem;
  }

  .journals-hero {
    padding: 1rem .95rem;
    border-radius: 1.15rem;
  }

  .journals-action-btn {
    width: 100%;
  }

  .journals-surface {
    padding: .85rem;
    border-radius: 1.15rem;
  }

  .journals-card {
    padding: 1rem;
  }

  .journals-card__stats {
    grid-template-columns: 1fr;
  }

  .journal-topbar__inner {
    padding-top: .75rem;
    padding-bottom: .75rem;
    border-radius: 1rem;
  }

  .journal-topbar__brand {
    margin-right: 0 !important;
  }

  .journal-topbar__nav {
    padding: .2rem;
  }

  .journal-topbar__nav-link {
    min-width: 0;
    flex: 1 1 0;
    font-size: .9rem;
  }

  .journal-topbar__cta {
    flex: 1 1 auto;
  }

  .journal-topbar__user {
    flex: 0 0 auto;
  }

  .journal-modal .modal-header,
  .journal-modal .modal-body,
  .journal-modal .modal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .journal-page-header {
    margin-bottom: .8rem;
    padding: 1rem .95rem;
    border-radius: 1.15rem;
  }

  .journal-action-btn {
    flex-basis: 100%;
  }

  .journal-table-frame {
    padding: .2rem;
  }

  .trade-symbol,
  .trade-chip,
  .trade-pnl,
  .trade-ratio {
    font-size: .74rem;
  }
}
