/* ══════════════════════════════════════════════
   STUDY JOURNAL — Side Panel + Selection Popup
   v2.0 — full redesign
   ══════════════════════════════════════════════ */

/* ── Panel shell ── */
.journal-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 400px;
  background: #FFFFFF;
  border-left: 1px solid #E2E8F0;
  z-index: 100;
  transform: translateX(100%);
  transition: transform 300ms ease;
  display: flex;
  flex-direction: row;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  font-family: 'DM Sans', sans-serif;
}
.journal-panel.open {
  transform: translateX(0);
}

/* ── Toggle tab (also external resize handle) ── */
.journal-toggle {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-100%, -50%);
  width: 2rem;
  height: 8rem;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-right: none;
  border-radius: 1rem 0 0 1rem;
  cursor: ew-resize;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #94A3B8;
  transition: all 150ms ease;
  box-shadow: -8px 0 15px rgba(0,0,0,0.04);
}
.journal-toggle:hover {
  background: #F8FAFC;
  color: #6366F1;
}
.journal-toggle svg { pointer-events: none; }
.journal-toggle-label {
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  pointer-events: none;
}
.journal-toggle-grip {
  width: 4px;
  height: 2rem;
  border-radius: 2px;
  background: #E2E8F0;
  transition: background 150ms ease;
}
.journal-toggle:hover .journal-toggle-grip {
  background: #818CF8;
}

/* ── Badge ── */
.journal-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #6366F1;
  color: #fff;
  font-size: .58rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 4px;
  box-shadow: 0 1px 4px rgba(99,102,241,.35);
}

/* ── Panel header ── */
.journal-head {
  padding: 1.25rem;
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
  flex-shrink: 0;
}
.journal-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.journal-head h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1E293B;
  margin: 0;
}
.journal-head-actions {
  display: flex;
  gap: .3rem;
}
.journal-head-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #E8E8EE;
  background: #fff;
  color: #94A3B8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 150ms ease;
  padding: 0;
}
.journal-head-btn:hover {
  border-color: #6366F1;
  color: #4F46E5;
  background: #EEF2FF;
}
.journal-head-btn.active {
  background: #4F46E5;
  color: #fff;
  border-color: #4F46E5;
}

/* Scope toggle — REMOVED in v3 (replaced by dashboard view) */

/* ── Left column (jotter + entry list) ── */
.journal-left-col {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #FBFBFB;
  border-right: 1px solid #F1F5F9;
  overflow: hidden;
}
.journal-panel.expanded .journal-left-col {
  width: 320px;
  flex-shrink: 0;
}
.journal-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.journal-scroll::-webkit-scrollbar { width: 4px; }
.journal-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

/* ── Quick Jotter ── */
.journal-jotter {
  padding: 1rem;
  border-bottom: 1px solid #F1F5F9;
  flex-shrink: 0;
}
.journal-jotter-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94A3B8;
  margin-bottom: 0.75rem;
}
.journal-jotter-label svg { flex-shrink: 0; }
.journal-jotter-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.journal-jotter-group label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: #94A3B8;
  margin-bottom: 0.25rem;
}
.journal-jotter-textarea {
  width: 100%;
  border: 1px solid #F1F5F9;
  border-radius: 0.75rem;
  background: #F8FAFC;
  font-family: 'DM Sans', sans-serif;
  color: #475569;
  resize: none;
  outline: none;
  transition: all 150ms ease;
  box-sizing: border-box;
}
.journal-jotter-textarea.review {
  height: 4rem;
  padding: 0.75rem;
  font-size: 0.875rem;
}
.journal-jotter-textarea.small {
  height: 5rem;
  padding: 0.625rem;
  font-size: 0.75rem;
}
.journal-jotter-textarea.review:focus {
  ring: none;
  box-shadow: 0 0 0 2px #FDE68A;
  background: #FFFFFF;
}
.journal-jotter-textarea.connections:focus {
  box-shadow: 0 0 0 2px #E0E7FF;
  background: #FFFFFF;
}
.journal-jotter-textarea.questions:focus {
  box-shadow: 0 0 0 2px #FFE4E6;
  background: #FFFFFF;
}
.journal-jotter-textarea::placeholder { color: #CBD5E1; }

/* ── Entry History list ── */
.journal-entry-list {
  padding: 1rem 1rem 1.5rem;
}
.journal-entry-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.journal-entry-list-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94A3B8;
}
.journal-entry-list-viewall {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #6366F1;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: color 150ms ease;
}
.journal-entry-list-viewall:hover { color: #4338CA; }
.journal-entry-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ── Entry card (replaces .journal-entry in v3) ── */
.journal-entry-card {
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 200ms ease;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.journal-entry-card:hover {
  background: rgba(226,232,240,.3);
}
.journal-entry-card.active {
  background: #FFFFFF;
  border-color: #C7D2FE;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 0 0 1px #EEF2FF;
}
.journal-entry-card-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.journal-entry-card-dot.review { background: #FBBF24; }
.journal-entry-card-dot.connections { background: #818CF8; }
.journal-entry-card-dot.questions { background: #FB7185; }
.journal-entry-card-dot.confused { background: #EF4444; }
.journal-entry-card-dot.key { background: #F59E0B; }
.journal-entry-card-dot.connection { background: #818CF8; }
.journal-entry-card-dot.bookmark { background: #10B981; }
.journal-entry-card-body {
  flex: 1;
  min-width: 0;
}
.journal-entry-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.journal-entry-card.active .journal-entry-card-title {
  color: #4F46E5;
}
.journal-entry-card-preview {
  font-size: 11px;
  color: #64748B;
  line-height: 1.625;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.journal-entry-card-time {
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  color: #94A3B8;
  margin-top: 2px;
}
.journal-entry-card-chevron {
  color: #CBD5E1;
  flex-shrink: 0;
  margin-top: 4px;
  transition: transform 150ms ease;
}
.journal-entry-card:hover .journal-entry-card-chevron {
  transform: translateX(2px);
}

/* ── Individual entries ── */
.journal-entry {
  background: #fff;
  border: 1px solid #E8E8EE;
  border-radius: 10px;
  padding: .6rem .7rem;
  margin-bottom: .4rem;
  position: relative;
  transition: all .2s;
  animation: journalSlideIn .3s ease both;
}
@keyframes journalSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.journal-entry:hover {
  border-color: #D0D0DA;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}

/* Color accent stripe */
.journal-entry::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
}
.journal-entry[data-type="confused"]::before { background: #EF4444; }
.journal-entry[data-type="key"]::before { background: #F59E0B; }
.journal-entry[data-type="connection"]::before { background: #6366F1; }
.journal-entry[data-type="bookmark"]::before { background: #10B981; }

.journal-entry-highlight {
  font-size: .8rem;
  color: #1E1E2A;
  line-height: 1.45;
  font-style: italic;
  padding-right: 1.2rem;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.journal-entry-highlight::before { content: '\201C'; color: #ccc; }
.journal-entry-highlight::after { content: '\201D'; color: #ccc; }

.journal-entry-note {
  font-size: .75rem;
  color: #5A5A72;
  line-height: 1.4;
  margin-top: .35rem;
  padding-left: .5rem;
  border-left: 2px solid #E8E8EE;
}

.journal-entry-meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .35rem;
  font-size: .65rem;
  color: #B0B0BE;
}
.journal-entry-meta-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #ccc;
}

/* Remove button */
.journal-entry-remove {
  position: absolute;
  top: .4rem;
  right: .35rem;
  background: none;
  border: none;
  color: transparent;
  cursor: pointer;
  font-size: .85rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all .15s;
}
.journal-entry:hover .journal-entry-remove {
  color: #ccc;
}
.journal-entry-remove:hover {
  color: #EF4444 !important;
  background: #FEE2E2;
}

/* ── Empty state ── */
.journal-empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: #B0B0BE;
}
.journal-empty-icon {
  font-size: 2rem;
  margin-bottom: .6rem;
  opacity: .4;
}
.journal-empty-title {
  font-size: .85rem;
  font-weight: 600;
  color: #8A8AA0;
  margin-bottom: .3rem;
}
.journal-empty-hint {
  font-size: .75rem;
  line-height: 1.5;
  color: #B0B0BE;
}
.journal-empty-demo {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .6rem;
  padding: .35rem .7rem;
  background: #F5F5FF;
  border: 1px solid #E0E0F0;
  border-radius: 6px;
  font-size: .72rem;
  color: #6366F1;
  font-weight: 600;
}

.journal-section-empty {
  font-size: .72rem;
  color: #ccc;
  font-style: italic;
  padding: .2rem .5rem .4rem;
}

/* ── Note input (inline, appears after adding) ── */
.journal-note-input-wrap {
  margin-top: .35rem;
  display: flex;
  gap: .3rem;
  animation: journalSlideIn .2s ease both;
}
.journal-note-input {
  flex: 1;
  font-family: 'DM Sans', sans-serif;
  font-size: .75rem;
  padding: .35rem .5rem;
  border: 1px solid #D0D0DA;
  border-radius: 6px;
  background: #FAFAF8;
  color: #1E1E2A;
  outline: none;
  transition: border-color .15s;
  resize: none;
  min-height: 32px;
}
.journal-note-input:focus {
  border-color: #6366F1;
  background: #fff;
}
.journal-note-input::placeholder {
  color: #B0B0BE;
}
.journal-note-save {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: #6366F1;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
  align-self: flex-end;
}
.journal-note-save:hover { background: #4F46E5; }
.journal-note-skip {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #E8E8EE;
  background: #fff;
  color: #8A8AA0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
  font-size: .7rem;
  align-self: flex-end;
}
.journal-note-skip:hover { border-color: #ccc; color: #666; }

/* ── Export toast ── */
.journal-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #1E1E2A;
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  z-index: 200;
  animation: toastIn .3s ease both;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Selection popup ── */
.journal-popup {
  position: absolute;
  display: none;
  gap: .25rem;
  transform: translate(-50%, -100%);
  z-index: 1000;
  background: #1E1E2A;
  border-radius: 10px;
  padding: .3rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  animation: popupIn .15s ease both;
}
@keyframes popupIn {
  from { opacity: 0; transform: translate(-50%, -100%) scale(.9); }
  to { opacity: 1; transform: translate(-50%, -100%) scale(1); }
}
.journal-popup::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #1E1E2A;
}

.journal-popup-btn {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .35rem .55rem;
  border-radius: 7px;
  border: none;
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  line-height: 1;
}
.journal-popup-btn .popup-icon {
  font-weight: 800;
  font-size: .75rem;
}

.journal-popup-btn.confused {
  background: rgba(239,68,68,.12);
  color: #FCA5A5;
}
.journal-popup-btn.confused:hover {
  background: #EF4444;
  color: #fff;
}
.journal-popup-btn.key {
  background: rgba(245,158,11,.12);
  color: #FCD34D;
}
.journal-popup-btn.key:hover {
  background: #F59E0B;
  color: #fff;
}
.journal-popup-btn.connection {
  background: rgba(99,102,241,.12);
  color: #A5B4FC;
}
.journal-popup-btn.connection:hover {
  background: #6366F1;
  color: #fff;
}
.journal-popup-btn.bookmark {
  background: rgba(16,185,129,.12);
  color: #6EE7B7;
}
.journal-popup-btn.bookmark:hover {
  background: #10B981;
  color: #fff;
}

/* ── Panel footer — REMOVED in v3 (replaced by editor toolbar) ── */

/* ── Internal resize handle ── */
.journal-resize-internal {
  width: 6px;
  flex-shrink: 0;
  cursor: col-resize;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease;
}
.journal-panel.expanded .journal-resize-internal {
  display: flex;
}
.journal-resize-internal:hover {
  background: #F8FAFC;
}
.journal-resize-internal-grip {
  width: 1px;
  height: 2rem;
  background: #E2E8F0;
  border-radius: 1px;
  transition: background 150ms ease;
}
.journal-resize-internal:hover .journal-resize-internal-grip {
  background: #818CF8;
}

/* ── Right column ── */
.journal-right-col {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.journal-panel.expanded .journal-right-col {
  display: flex;
}

/* ── Editor view ── */
.journal-editor {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  animation: journalFadeIn 300ms ease;
}
@keyframes journalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.journal-editor-header {
  padding: 2rem;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  flex-shrink: 0;
}
.journal-editor-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.journal-editor-icon.review { background: #FFFBEB; color: #F59E0B; }
.journal-editor-icon.connections { background: #EEF2FF; color: #6366F1; }
.journal-editor-icon.questions { background: #FFE4E6; color: #F43F5E; }
.journal-editor-icon.confused { background: #FEE2E2; color: #EF4444; }
.journal-editor-icon.key { background: #FEF3C7; color: #F59E0B; }
.journal-editor-icon.connection { background: #EEF2FF; color: #6366F1; }
.journal-editor-icon.bookmark { background: #D1FAE5; color: #10B981; }
.journal-editor-meta {
  flex: 1;
  min-width: 0;
}
.journal-editor-title {
  width: 100%;
  border: none;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.875rem;
  font-weight: 900;
  color: #1E293B;
  line-height: 1.25;
  outline: none;
  padding: 0;
  margin-bottom: 0.5rem;
}
.journal-editor-title::placeholder { color: #E2E8F0; }
.journal-editor-tags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.journal-editor-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  background: #F1F5F9;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
}
.journal-editor-sync {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #CBD5E1;
}
.journal-editor-sync-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #34D399;
  animation: journalPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes journalPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.journal-editor-body {
  flex: 1;
  overflow-y: auto;
  padding: 2.5rem;
  background: #FDFDFD;
}
.journal-editor-textarea {
  width: 100%;
  min-height: 200px;
  border: none;
  background: transparent;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.25rem;
  color: #475569;
  line-height: 1.625;
  outline: none;
  resize: none;
}
.journal-editor-textarea::placeholder { color: #E2E8F0; }
.journal-editor-toolbar {
  padding: 1.5rem;
  border-top: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}
.journal-toolbar-btn {
  width: auto;
  height: auto;
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  color: #94A3B8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 150ms ease;
}
.journal-toolbar-btn:hover {
  background: #F8FAFC;
  color: #475569;
}
.journal-toolbar-sep {
  width: 1px;
  height: 1.5rem;
  background: #F1F5F9;
}
.journal-toolbar-sync {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #CBD5E1;
  margin-left: auto;
}
.journal-toolbar-sync-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #34D399;
  animation: journalPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.journal-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.journal-settings-btn,
.journal-delete-btn {
  padding: 0.625rem;
  border-radius: 0.75rem;
  border: none;
  background: transparent;
  color: #94A3B8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 150ms ease;
}
.journal-settings-btn:hover { background: #F8FAFC; color: #475569; }
.journal-delete-btn:hover { background: #FFF1F2; color: #F43F5E; }
.journal-primary-btn {
  padding: 0.625rem 1.5rem;
  border-radius: 1rem;
  border: none;
  background: #4F46E5;
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 150ms ease;
  box-shadow: 0 10px 15px -3px #EEF2FF;
}
.journal-primary-btn:hover {
  background: #4338CA;
  transform: translateY(-2px);
}
.journal-primary-btn:active {
  transform: translateY(0);
}

/* ── Dashboard view (The Vault) ── */
.journal-dashboard {
  flex: 1;
  overflow-y: auto;
  padding: 3rem;
  background: rgba(248,250,252,.3);
  animation: journalFadeIn 300ms ease;
}
.journal-dashboard-inner {
  max-width: 48rem;
  margin: 0 auto;
}
.journal-dashboard-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.journal-vault-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  background: #4F46E5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 10px 15px -3px #EEF2FF;
}
.journal-dashboard h2 {
  font-size: 1.875rem;
  font-weight: 900;
  color: #1E293B;
  letter-spacing: -0.025em;
  margin: 0;
}
.journal-dashboard-subtitle {
  font-weight: 500;
  color: #64748B;
  margin: 0;
}
.journal-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.journal-stat-card {
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid #F1F5F9;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.journal-stat-label {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: #94A3B8;
  margin-bottom: 0.25rem;
}
.journal-stat-number {
  font-size: 2.25rem;
  font-weight: 900;
}
.journal-dashboard-actions-label {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: #94A3B8;
  margin-bottom: 1rem;
}
.journal-dashboard-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.journal-action-card {
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid #F1F5F9;
  background: #FFFFFF;
  cursor: pointer;
  transition: border-color 200ms ease;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.journal-action-card:hover {
  border-color: #C7D2FE;
}
.journal-action-icon {
  color: #4F46E5;
  flex-shrink: 0;
  transition: transform 150ms ease;
}
.journal-action-card:hover .journal-action-icon {
  transform: scale(1.1);
}
.journal-action-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1E293B;
}
.journal-action-desc {
  font-size: 0.75rem;
  color: #94A3B8;
}

/* ── Backdrop overlay ── */
.journal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.05);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  z-index: 99;
}
.journal-backdrop.visible {
  display: block;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .journal-panel {
    width: 100%;
    height: 55vh;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    border-left: none;
    border-top: 1px solid #E2E8F0;
    transform: translateY(100%);
    border-radius: 16px 16px 0 0;
    flex-direction: column;
  }
  .journal-panel.open {
    transform: translateY(0);
  }
  .journal-panel.expanded .journal-left-col {
    width: 100%;
    border-right: none;
  }
  .journal-panel.expanded .journal-right-col,
  .journal-panel.expanded .journal-resize-internal {
    display: none;
  }
  .journal-toggle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -100%);
    width: 48px;
    height: 36px;
    border-radius: 1rem 1rem 0 0;
    border: 1px solid #E2E8F0;
    border-bottom: none;
    flex-direction: row;
    gap: 4px;
    cursor: pointer;
  }
  .journal-popup {
    flex-wrap: wrap;
    max-width: 180px;
    justify-content: center;
  }
}
