/* Dashboard Prototype Layout */

:root {
  --sidebar-width: 272px;
  --header-height: 72px;
  --sidebar-bg: var(--paper-aged);
  --sidebar-surface-top: var(--dialog-key-surface);
  --sidebar-surface-bottom: var(--paper-aged);
  --sidebar-accent: var(--leather-brown);
  --content-bg: var(--paper-base, #F6F1E7);
  --border-color: rgba(62, 39, 35, 0.08);
  --dashboard-content-top-gap: 24px;
}

.dashboard-body {
  margin: 0;
  padding: 0;
  background-color: var(--content-bg);
  color: var(--ink-primary, #2B2A27);
  font-family: var(--font-sans, sans-serif);
  height: 100vh;
  overflow: hidden;
}

.dashboard-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar */
.dashboard-sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  background-image:
    linear-gradient(180deg, var(--sidebar-surface-top) 0%, var(--sidebar-surface-bottom) 100%);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px 16px 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.dashboard-sidebar__logo {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  margin: 0 4px 24px;
  position: relative;
}

.dashboard-brand-link {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.dashboard-brand-link:focus-visible {
  outline: 2px solid var(--sidebar-accent);
  outline-offset: 3px;
  border-radius: 12px;
}

.dashboard-brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(91, 70, 54, 0.1);
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.64);
  box-shadow: 0 2px 8px rgba(62, 39, 35, 0.06), inset 0 1px rgba(255, 252, 246, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-logo-icon {
  width: 27px;
  height: 27px;
  object-fit: contain;
}

.dashboard-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-logo-text {
  font-family: var(--font-serif);
  font-size: 25px;
  line-height: 1;
  font-weight: 600;
  color: var(--ink-primary);
}

.dashboard-logo-tagline {
  color: var(--ink-muted, #6E6B65);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.035em;
  margin-top: 5px;
  white-space: nowrap;
}

.dashboard-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 4px 12px;
  scrollbar-color: rgba(91, 70, 54, 0.16) transparent;
  scrollbar-width: thin;
}

.dashboard-nav__group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dashboard-nav__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ink-muted, #6E6B65);
  margin: 0 10px 7px;
  font-weight: 600;
}

.dashboard-nav__item {
  --nav-item-surface: var(--paper-warm);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 5px 8px;
  color: var(--ink-dark);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 17px;
  position: relative;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 160ms ease;
}

.dashboard-nav__item--home { --nav-item-surface: var(--sidebar-home-surface); }
.dashboard-nav__item--journals { --nav-item-surface: var(--sidebar-journals-surface); }
.dashboard-nav__item--checkins { --nav-item-surface: var(--sidebar-checkins-surface); }
.dashboard-nav__item--north-stars { --nav-item-surface: var(--sidebar-north-stars-surface); }
.dashboard-nav__item--beliefs { --nav-item-surface: var(--sidebar-beliefs-surface); }
.dashboard-nav__item--recenter { --nav-item-surface: var(--sidebar-recenter-surface); }
.dashboard-nav__item--decisions { --nav-item-surface: var(--sidebar-decisions-surface); }
.dashboard-nav__item--photo-book { --nav-item-surface: var(--sidebar-photo-book-surface); }
.dashboard-nav__item--followers { --nav-item-surface: var(--sidebar-followers-surface); }
.dashboard-nav__item--subscription { --nav-item-surface: var(--sidebar-subscription-surface); }
.dashboard-nav__item--vault { --nav-item-surface: var(--sidebar-vault-surface); }
.dashboard-nav__item--feedback { --nav-item-surface: var(--sidebar-feedback-surface); }
.dashboard-nav__item--settings { --nav-item-surface: var(--sidebar-settings-surface); }

.dashboard-nav__item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--ink-soft);
}

.dashboard-nav__group--primary .dashboard-nav__item {
  min-height: 48px;
  padding: 5px 8px;
}

.dashboard-nav__item:hover {
  background: color-mix(in srgb, var(--nav-item-surface) 22%, var(--dialog-key-surface));
}

.dashboard-nav__item:hover .dashboard-nav__icon {
  transform: translateY(-2px) rotate(-3deg);
  box-shadow: 0 4px 7px -4px color-mix(in srgb, var(--leather-brown) 35%, transparent);
}

.dashboard-nav__item:focus-visible,
.sidebar-toggle-btn:focus-visible {
  outline: 2px solid var(--sidebar-accent);
  outline-offset: 2px;
}

.dashboard-nav__item.active {
  border-color: color-mix(in srgb, var(--paper-shadow) 60%, var(--nav-item-surface));
  border-bottom-width: 3px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--nav-item-surface) 60%, var(--dialog-key-surface)), var(--nav-item-surface));
  box-shadow: 0 3px 7px -4px color-mix(in srgb, var(--leather-brown) 30%, transparent), inset 0 1px 0 var(--dialog-key-surface);
  color: var(--ink-dark);
}

.dashboard-nav__group--primary .dashboard-nav__item.active {
  padding-right: 27px;
}

.dashboard-nav__group--primary .dashboard-nav__item.active::after {
  content: "";
  position: absolute;
  right: 13px;
  top: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-top: 1.5px solid var(--ink-soft);
  border-right: 1.5px solid var(--ink-soft);
  transform: rotate(45deg);
}

.dashboard-nav__item.active .dashboard-nav__icon {
  background: var(--dialog-key-surface);
}

.dashboard-nav__item:active {
  transform: translateY(1px);
  box-shadow: none;
}

.dashboard-nav__item:active .dashboard-nav__icon {
  transform: translateY(1px);
  box-shadow: none;
}

/* Coming-soon nav items */
.dashboard-nav__item--soon {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.nav-badge-soon {
  margin-left: auto;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(146, 64, 14, 0.09);
  color: #7C3A12;
  border: 1px solid rgba(146, 64, 14, 0.13);
  flex-shrink: 0;
}

.badge {
  background-color: #Eaeaea;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  margin-left: auto;
  font-weight: 600;
}

.badge--success {
  background-color: rgba(111, 143, 114, 0.15); /* var(--success) opacity */
  color: var(--success, #6F8F72);
}

.dashboard-sidebar__footer {
  border-top: 1px solid rgba(91, 70, 54, 0.09);
  margin: 0 4px;
  padding-top: 12px;
  flex-shrink: 0;
}

/* Main Area */
.dashboard-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: clip;
  position: relative;
}

/* Header */
.dashboard-header {
  height: var(--header-height);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent; /* Keeps layout consistent without visible border if desired */
}

.dashboard-header__title {
  display: block;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  margin: 0;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 600px; /* Reasonable max-width to force truncation */
}

.btn-icon.dashboard-header__home {
  display: none;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.dashboard-header__home:focus-visible {
  outline: 2px solid var(--action-primary);
  outline-offset: 3px;
}

.dashboard-header__back {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: var(--space-sm);
  color: var(--ink-primary);
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  text-decoration: none;
}

.dashboard-header__back span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-header__back svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.dashboard-header__back:hover {
  color: var(--action-primary);
}

.dashboard-header__back:focus-visible {
  border-radius: 6px;
  outline: 2px solid var(--action-primary);
  outline-offset: 3px;
}

/* Keep navigation and actions from overlapping on narrow phone screens. */
@media (max-width: 380px) {
  .dashboard-header:has(.dashboard-header__home, .dashboard-header__back) {
    height: auto;
    flex-shrink: 0;
    flex-wrap: wrap;
    row-gap: var(--space-xs);
    padding-block: var(--space-xs);
  }

  .dashboard-header:has(.dashboard-header__home, .dashboard-header__back) .dashboard-header__left {
    flex: 1 0 100%;
    padding-right: 0;
  }

  .dashboard-header:has(.dashboard-header__home, .dashboard-header__back) .dashboard-header__right {
    margin-left: auto;
  }

  .dashboard-header__back { min-width: 44px; }
}

.dashboard-header__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.onboarding-resume-button {
  gap: 7px;
  min-height: 36px;
  background: color-mix(in srgb, var(--action-primary) 7%, transparent);
  box-shadow: 0 2px 8px rgba(201, 168, 106, 0.12);
}

.onboarding-resume-button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-icon {
  background: none;
  border: none;
  cursor: var(--cursor-pointer);
  padding: 8px;
  border-radius: 50%;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  background-color: rgba(0,0,0,0.04);
  color: var(--ink-primary);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-header__search {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.global-journal-search__modal {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  padding: var(--space-md);
  overflow-y: auto;
  background: var(--dialog-backdrop);
  place-items: start center;
}

.global-journal-search__modal[hidden] {
  display: none;
}

.global-journal-search__surface {
  width: min(100%, 640px);
  max-height: min(720px, calc(100vh - 32px));
  margin-top: 8vh;
  overflow-y: auto;
  color: var(--ink-dark);
  background: var(--dialog-surface);
  border: 1px solid var(--dialog-border);
  border-radius: var(--dialog-radius);
  box-shadow: var(--dialog-shadow);
}

.global-journal-search__header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid color-mix(in srgb, var(--sepia-line) 65%, transparent);
}

.global-journal-search__header h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 500;
}

.global-journal-search__field {
  position: relative;
  display: flex;
  align-items: center;
  margin: var(--space-lg);
}

.global-journal-search__field > svg {
  position: absolute;
  left: 14px;
  width: 18px;
  color: var(--ink-muted);
  pointer-events: none;
}

.global-journal-search__field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px 10px 42px;
  color: var(--ink-dark);
  background: rgba(246, 241, 231, 0.72);
  border: 1px solid rgba(90, 62, 43, 0.2);
  border-radius: 999px;
  font: inherit;
}

.global-journal-search__field input:focus-visible {
  outline: none;
  border-color: var(--action-primary);
  box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.2);
}

.global-journal-search__status {
  margin: 0 var(--space-lg) var(--space-lg);
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.global-journal-search__status[data-state="error"] {
  color: var(--danger);
}

.global-journal-search__results {
  display: grid;
  gap: var(--space-lg);
  padding: 0 var(--space-lg) var(--space-lg);
}

.global-journal-search__section {
  display: grid;
  gap: var(--space-xs);
}

.global-journal-search__section h3 {
  margin: 0 0 var(--space-xs);
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 600;
}

.global-journal-search__result {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 52px;
  padding: var(--space-sm);
  color: var(--ink-dark);
  border-radius: 8px;
  text-decoration: none;
}

.global-journal-search__result:hover,
.global-journal-search__result:focus-visible {
  background: color-mix(in srgb, var(--leather-brown) 8%, transparent);
  outline: none;
}

.global-journal-search__result small,
.global-journal-search__result small + span {
  display: block;
}

.global-journal-search__result small {
  margin-bottom: 2px;
  color: var(--ink-soft);
  font-size: var(--text-xs);
}

.global-journal-search__cover,
.global-journal-search__memory-mark,
.global-journal-search__diary-mark,
.global-journal-search__north-star-mark {
  width: 28px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 3px 6px 6px 3px;
  background: var(--leather-brown);
}

.global-journal-search__cover--ocean {
  background: #2c5e77;
}

.global-journal-search__cover--sky {
  background: #5e81ac;
}

.global-journal-search__memory-mark {
  width: 28px;
  border: 1px solid var(--sepia-line);
  background: repeating-linear-gradient(to bottom, var(--paper-base) 0 7px, rgba(90, 62, 43, 0.18) 7px 8px);
}

.global-journal-search__diary-mark,
.global-journal-search__north-star-mark {
  width: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--paper-base);
}

.global-journal-search__diary-mark {
  background: var(--action-primary);
}

.global-journal-search__diary-mark::after {
  content: "✦";
}

.global-journal-search__north-star-mark {
  background: var(--leather-brown);
}

.global-journal-search__north-star-mark::after {
  content: "★";
}

.global-journal-search-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .global-journal-search__modal {
    padding: 0;
    align-items: end;
  }

  .global-journal-search__surface {
    width: 100%;
    max-height: 82vh;
    margin-top: 0;
    border-width: 1px 0 0;
    border-radius: 16px 16px 0 0;
  }

  .global-journal-search__field,
  .global-journal-search__status,
  .global-journal-search__results {
    margin-right: var(--space-md);
    margin-left: var(--space-md);
  }

  .global-journal-search__header {
    padding-right: var(--space-md);
    padding-left: var(--space-md);
  }

  .global-journal-search__results {
    padding-right: 0;
    padding-left: 0;
  }
}

.divider-vertical {
  width: 1px;
  height: 24px;
  background-color: var(--border-color);
  margin: 0 8px;
}

.quick-note__trigger {
  position: relative;
}

.quick-note__indicator {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  display: none;
  border: 1px solid var(--paper-base);
  border-radius: 50%;
  background: var(--leather-brown);
}

.quick-note__indicator.is-visible {
  display: block;
}

.quick-note__modal {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  padding: var(--space-md);
  overflow-y: auto;
  background: var(--dialog-backdrop);
  place-items: center;
}

.quick-note__modal[hidden] {
  display: none;
}

.quick-note__surface {
  width: min(100%, 560px);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink-dark);
  background: var(--dialog-surface);
  border: 1px solid var(--dialog-border);
  border-radius: var(--dialog-radius);
  box-shadow: var(--dialog-shadow);
}

.quick-note__header,
.quick-note__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
}

.quick-note__header {
  border-bottom: 1px solid color-mix(in srgb, var(--sepia-line) 65%, transparent);
}

.quick-note__header h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 500;
}

.quick-note__header p {
  margin: var(--space-xs) 0 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.quick-note__header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.quick-note__clear {
  min-height: 44px;
  padding: 0 var(--space-sm);
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: inherit;
  cursor: var(--cursor-pointer);
}

.quick-note__clear:hover,
.quick-note__clear:focus-visible {
  color: var(--ink-dark);
  background: color-mix(in srgb, var(--leather-brown) 8%, transparent);
}

.quick-note__clear:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.quick-note__field {
  min-height: 250px;
  flex: 1;
  padding: var(--space-lg);
  resize: vertical;
  color: var(--ink-dark);
  background-color: transparent;
  background-image: linear-gradient(to bottom, transparent 31px, color-mix(in srgb, var(--sepia-line) 42%, transparent) 32px);
  background-size: 100% 32px;
  border: 0;
  outline: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 32px;
}

.quick-note__field::placeholder {
  color: var(--ink-soft);
  opacity: 0.82;
}

.quick-note__field:focus-visible {
  box-shadow: inset 3px 0 var(--leather-brown);
}

.quick-note__footer {
  min-height: 52px;
  color: var(--ink-soft);
  border-top: 1px solid color-mix(in srgb, var(--sepia-line) 65%, transparent);
  font-size: var(--text-xs);
}

.quick-note__privacy {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.quick-note__privacy svg {
  width: 14px;
  height: 14px;
}

.quick-note__status[data-state="error"] {
  color: var(--danger);
}

.quick-note-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .quick-note__modal {
    padding: 0;
    align-items: end;
  }

  .quick-note__surface {
    width: 100%;
    min-height: min(72vh, 560px);
    max-height: 82vh;
    border-width: 1px 0 0;
    border-radius: 16px 16px 0 0;
  }

  .quick-note__header,
  .quick-note__footer {
    padding-right: var(--space-md);
    padding-left: var(--space-md);
  }

  .quick-note__field {
    min-height: 240px;
    padding-right: var(--space-md);
    padding-left: var(--space-md);
  }
}

@media (prefers-reduced-motion: reduce) {
  .quick-note__modal,
  .quick-note__surface {
    scroll-behavior: auto;
  }
}

.user-avatar {
  width: 36px;
  height: 36px;
  aspect-ratio: 1;
  flex-shrink: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
  background-color: #FFFFFF;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  cursor: var(--cursor-pointer);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.user-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.12);
}

/* Content */
.dashboard-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.dashboard-content__body {
  flex: 1 0 auto;
  padding: var(--dashboard-content-top-gap) 40px 40px;
  width: 100%;
}

.dashboard-content--full {
  padding: 0 !important;
  display: flex !important;
  flex-direction: column;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
  max-width: 1200px;
}

.journal-card {
  background: white;
  border-radius: 6px 12px 12px 6px;
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08), -1px 0 2px rgba(0, 0, 0, 0.03);
  overflow: visible;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  cursor: var(--cursor-pointer);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  text-decoration: none; /* Remove underline from link */
  position: relative;
}

.journal-card:hover {
  transform: translateY(-6px) rotate(1deg);
  box-shadow: 6px 12px 24px rgba(0, 0, 0, 0.12), -2px 0 4px rgba(0, 0, 0, 0.05);
}

.journal-card__cover {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #5A3E2B; /* Default leather brown */
  position: relative;
  border-radius: 5px 11px 0 0;
  box-shadow: inset 12px 0 15px -10px rgba(0, 0, 0, 0.5), 
              inset 0 1px 1px rgba(255, 255, 255, 0.15),
              inset 0 -1px 1px rgba(0,0,0,0.1);
  overflow: hidden;
  opacity: 1 !important; /* Force full opacity */
}

/* Hardcover book spine fold crease line */
.journal-card__cover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10px;
  bottom: 0;
  width: 1px;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 1px 0 1px rgba(255, 255, 255, 0.1);
  z-index: 3;
}

/* Hardcover gold foil inset frame */
.journal-card__cover::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 18px;
  right: 10px;
  bottom: 10px;
  border: 1px solid rgba(212, 175, 55, 0.35); /* Gold foil */
  border-radius: 3px;
  pointer-events: none;
  z-index: 1;
}

/* Realistic Vintage Paste-on Label Plate for Book Icons */
.journal-card__icon {
  font-size: 28px;
  background: #FDFBF7; /* Creamy paper */
  border: 1px solid #C8B89A; /* Sepia line */
  padding: 6px 14px;
  border-radius: 3px;
  box-shadow: inset 0 0 3px rgba(200, 184, 154, 0.15), 
              0 2px 4px rgba(0, 0, 0, 0.15);
  font-weight: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.journal-card__info {
  padding: 16px;
  background: #FFFFFF;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 0 0 11px 5px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.journal-card__title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--ink-dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.journal-card__meta {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0;
  font-family: var(--font-sans);
}

/* Distinctive new creation card styling */
.journal-card--new {
  border: 2px dashed rgba(200, 184, 154, 0.6);
  box-shadow: none;
  background: rgba(253, 251, 247, 0.4);
  border-radius: 12px;
}

.journal-card--new:hover {
  border-color: var(--action-primary, #9E2A2B);
  background: rgba(253, 251, 247, 0.8);
  transform: translateY(-4px);
}

.journal-card--new .journal-card__cover {
  background: transparent;
  box-shadow: none;
}

.journal-card--new .journal-card__cover::before,
.journal-card--new .journal-card__cover::after {
  display: none; /* Hide hardcover creases/borders on new button */
}

.journal-card--new .journal-card__icon {
  background: transparent;
  border: none;
  box-shadow: none;
  font-size: 32px;
  color: var(--ink-soft);
}


/* Journal List Styles */

.journal-container {
  max-width: 800px;
  margin: 0 auto;
}

.journal-header {
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.journal-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.journal-title {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--ink-primary);
  margin: 0 0 8px 0;
  font-weight: 500;
}

.journal-subtitle {
  color: var(--ink-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.journal-subtitle svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.bullet {
    opacity: 0.5;
}

.journal-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-input {
    position: relative;
    width: 240px;
}

.search-input input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: white;
    font-size: 14px;
    color: var(--ink-primary);
    transition: all 0.2s;
}

.search-input input:focus {
    outline: none;
    border-color: var(--action-primary, #C9A86A);
    box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.1);
}

.search-input svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--ink-muted);
}

.memories-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.memories-month {
    margin: 24px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.month-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
    margin: 0;
}

.memory-item {
    display: flex;
    gap: 24px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.memory-item:hover {
    background: white;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.03);
}

.memory-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
    padding-right: 24px;
    border-right: 1px solid var(--border-color);
}

.day-number {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 500;
    color: var(--ink-primary);
    line-height: 1;
}

.day-name {
    font-size: 12px;
    color: var(--ink-muted);
    text-transform: uppercase;
    margin-top: 4px;
    font-weight: 500;
}

.memory-content-preview {
    flex: 1;
}

.memory-title {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--ink-primary);
    margin: 0 0 6px 0;
    font-weight: 600;
}

.memory-snippet {
    font-size: 14px;
    color: var(--ink-muted);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  word-break: break-word;
}

.memory-tags {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.tag {
    font-size: 12px;
    color: var(--ink-light, #9B978F);
}

.memory-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-muted);
    min-width: 60px;
}

/* Memory Detail Styles */

.memory-detail-container {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.memory-nav {
    margin-bottom: 32px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--ink-primary);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

.memory-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

.memory-title-large {
    font-family: var(--font-serif);
    font-size: 40px;
    line-height: 1.2;
    color: var(--ink-primary);
    margin: 0 0 16px 0;
}

.memory-meta-large {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    color: var(--ink-muted);
    font-size: 14px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item svg {
    width: 14px;
    height: 14px;
}

.memory-tags-large {
    display: flex;
    gap: 8px;
}

.memory-header__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.divider {
    border: 0;
    border-bottom: 1px solid var(--border-color);
    margin: 24px 0 40px 0;
}

.memory-body {
    font-family: var(--font-serif); /* Using serif for reading content */
    font-size: 18px;
    line-height: 1.7;
    color: var(--ink-primary);
    word-break: break-word;
    overflow-wrap: break-word;
}

.memory-body p {
    margin-bottom: 24px;
}

.memory-body blockquote {
    border-left: 3px solid var(--action-primary, #C9A86A);
    margin: 32px 0;
    padding-left: 20px;
    font-style: italic;
    color: var(--ink-muted);
}

.memory-body ul {
    margin-bottom: 24px;
    padding-left: 20px;
}

.memory-body li {
    margin-bottom: 8px;
}

.memory-attachments {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px dashed var(--border-color);
}

.attachments-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
    margin: 0 0 16px 0;
}

.attachments-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.attachment-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 200px;
    overflow: hidden;
    background: white;
}

.attachment-preview {
    height: 120px;
    background-color: #f5f5f5;
    color: var(--ink-muted);
}

.attachment-preview svg {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

.attachment-info {
    padding: 12px;
}

.attachment-name {
    display: block;
    font-size: 13px;
    color: var(--ink-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

/* Refined Memory Styles */

.memory-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.memory-pagination {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-primary);
}

.memory-tabs {
    display: flex;
    gap: 32px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 32px;
}

.tab-item {
    padding-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-muted);
    cursor: var(--cursor-pointer);
    position: relative;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-item:hover {
    color: var(--ink-primary);
}

.tab-item.active {
    color: var(--ink-primary);
    border-bottom-color: var(--ink-primary);
}

.tab-count {
    background-color: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 4px;
}

.memory-footer-nav {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
}

.nav-button {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    max-width: 45%;
    transition: transform 0.2s ease;
}

.nav-button:hover {
    transform: translateX(-4px);
}

.nav-button.next:hover {
    transform: translateX(4px);
}

.nav-button.next {
    align-items: flex-end;
    text-align: right;
}

.nav-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
    margin-bottom: 4px;
}

.nav-title {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--ink-primary);
    font-weight: 500;
}

.nav-divider {
    width: 1px;
    background-color: var(--border-color);
}

/* Responsive Styles */

/* Mobile Sidebar Toggle - Hidden by default */
.mobile-sidebar-toggle {
    display: none;
    margin-right: 16px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 90;
    opacity: 0;
    animation: fadeIn 0.2s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Tablet Breakpoint (Sidebar becomes narrower or icon rail if we wanted, but for now just compact) */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* Phone Breakpoint */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 272px; /* Standard width for drawer */
        --header-height: 64px;
        --dashboard-content-top-gap: 16px;
    }

    .mobile-sidebar-toggle {
        display: flex;
        margin-left: -8px; /* visually align with edge */
    }

    /* Sidebar becomes a drawer */
    .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: var(--sidebar-width);
    }

    .dashboard-sidebar.sidebar--mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
    }

    .sidebar-overlay {
        display: block;
    }

    .dashboard-header {
        padding: 0 16px;
    }

    .dashboard-content {
        padding: 0;
    }
    
    .dashboard-content__body {
        padding: 16px;
    }
    
    .dashboard-header__left {
         display: flex;
         align-items: center;
         flex: 1;
         min-width: 0; /* allows title to truncate */
         padding-right: 16px;
    }

    .dashboard-header__title {
         display: none;
    }

    .btn-icon.dashboard-header__home {
         display: flex;
    }
    
    .dashboard-header__right {
         flex-shrink: 0;
         gap: 4px;
    }
    
    .divider-vertical {
        display: none;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    /* Memory Detail Responses */
    .memory-header {
        flex-direction: column;
        gap: 12px;
    }

    .memory-header__actions {
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }
    
    .action-group {
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: flex-start; /* Or space-between if they want them spread */
        gap: 16px;
    }

    .memory-title-large {
        font-size: 28px;
    }

    .memory-tabs {
        gap: 20px;
        overflow-x: auto;
        padding-bottom: 0;
        /* Hide scrollbar */
        -ms-overflow-style: none;
        scrollbar-width: none; 
    }
    
    .memory-tabs::-webkit-scrollbar { 
        display: none;
    }

    .tab-item {
        white-space: nowrap;
    }

    .memory-footer-nav {
        flex-direction: column;
        gap: 24px;
    }

    .nav-button {
        max-width: 100%;
        width: 100%;
        align-items: flex-start;
    }

    .nav-button.next {
        align-items: flex-start;
        text-align: left;
    }

    .nav-divider {
        display: none;
    }
    
    /* Hide some header actions on mobile to save space if needed */
    .dashboard-header__right .btn:not(.btn-icon):not(.onboarding-resume-button) {
        display: none; /* Hide 'New Journal' text button, rely on floating action button if we had one, or keep simpler */
    }

    .onboarding-resume-button {
        width: 36px;
        min-width: 36px;
        height: 36px;
        padding: 8px;
        border-radius: 50%;
    }

    .onboarding-resume-button__label {
        display: none;
    }
    
    /* Alternatively, make the New Journal button an icon only */
    .dashboard-header__right .btn-primary span {
        display: none;
    }
    
    .dashboard-header__right .btn-primary {
         padding: 8px;
    }
}

/* User Menu Dropdown */

.user-menu {
    position: relative;
    z-index: 50;
}

.user-menu__dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 200px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.05);
    padding: 8px;
    display: none;
    transform-origin: top right;
    animation: dropdownFadeIn 0.1s ease-out;
}

.user-menu__dropdown--open {
    display: block;
}

.user-menu__item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--ink-primary);
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.1s;
    font-weight: 500;
}

.user-menu__item:hover {
    background-color: rgba(0,0,0,0.04);
}

.user-menu__item--logout {
    color: #D32F2F; /* Error red */
}

.user-menu__item--logout:hover {
    background-color: rgba(211, 47, 47, 0.04);
}

.divider-horizontal {
    height: 1px;
    background-color: var(--border-color);
    margin: 4px 0;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* Collapsed Sidebar State */
body.sidebar-collapsed {
  --sidebar-width: 76px;
}

body.sidebar-collapsed .dashboard-nav__label,
body.sidebar-collapsed .dashboard-brand-copy,
body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .dashboard-sidebar .badge,
body.sidebar-collapsed .nav-badge-soon {
  display: none;
}

body.sidebar-collapsed .dashboard-nav__item {
  justify-content: center;
  padding: 6px;
}

body.sidebar-collapsed .dashboard-nav__group--primary .dashboard-nav__item {
  justify-content: center;
  gap: 0;
  padding: 5px 8px;
}

body.sidebar-collapsed .dashboard-sidebar {
  padding-left: 10px;
  padding-right: 10px;
}

body.sidebar-collapsed .dashboard-sidebar__logo {
  justify-content: center;
  margin: 0 0 26px;
}

body.sidebar-collapsed .dashboard-brand-mark {
  width: 40px;
  height: 40px;
}

body.sidebar-collapsed .dashboard-nav,
body.sidebar-collapsed .dashboard-sidebar__footer {
  padding-left: 0;
  padding-right: 0;
}

body.sidebar-collapsed .dashboard-nav__group--primary .dashboard-nav__item.active::after {
  display: none;
}

body.sidebar-collapsed .sidebar-toggle-btn {
  position: absolute;
  right: -32px;
  top: 0;
  border-color: var(--paper-shadow);
  background: var(--dialog-key-surface);
  box-shadow: var(--shadow-sm);
}

body.sidebar-collapsed .sidebar-toggle-btn .icon-collapse {
  display: none;
}

body.sidebar-collapsed .sidebar-toggle-btn .icon-expand {
  display: block;
  margin: 0 auto;
}

/* A full-size hit area keeps collapse accessible on touch laptops too. */
.sidebar-toggle-btn {
  background: transparent;
  border: 1px solid transparent;
  cursor: var(--cursor-pointer);
  color: var(--ink-muted);
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-left: auto;
  z-index: 4;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.sidebar-toggle-btn:hover {
  color: var(--ink-dark);
  background: var(--paper-warm);
}

.sidebar-toggle-btn:active { transform: translateY(1px); }
.sidebar-toggle-btn svg { width: 16px; height: 16px; }

@media (min-width: 769px) and (max-width: 1024px) {
  .dashboard-sidebar__logo { gap: 4px; }
  .dashboard-brand-link { gap: 8px; }
  .dashboard-brand-mark { width: 36px; height: 36px; }
  .dashboard-logo-text { font-size: 22px; }
  .dashboard-logo-tagline { font-size: 9px; }
}

.icon-expand {
  display: none;
}

/* Smooth Transition */
.dashboard-sidebar {
  transition: width 300ms cubic-bezier(0.22, 1, 0.36, 1), padding 300ms cubic-bezier(0.22, 1, 0.36, 1), transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dashboard-main {
  transition: margin-left 300ms cubic-bezier(0.22, 1, 0.36, 1);
  /* Note: margin-left transition might not be needed if flex layout handles it, 
     but added for completeness if layout changes */
}

@media (max-width: 768px) {
  body.sidebar-collapsed {
    --sidebar-width: 272px;
  }

  body.sidebar-collapsed .dashboard-sidebar {
    padding: 20px 16px 16px;
  }

  body.sidebar-collapsed .dashboard-sidebar__logo {
    justify-content: flex-start;
    margin: 0 4px 30px;
  }

  body.sidebar-collapsed .dashboard-brand-copy,
  body.sidebar-collapsed .nav-text,
  body.sidebar-collapsed .nav-badge-soon {
    display: flex;
  }

  body.sidebar-collapsed .dashboard-sidebar .badge {
    display: inline-flex;
  }

  body.sidebar-collapsed .dashboard-nav__item {
    justify-content: flex-start;
    padding: 5px 8px;
  }

  body.sidebar-collapsed .dashboard-nav__group--primary .dashboard-nav__item {
    justify-content: flex-start;
    gap: 10px;
    padding: 5px 8px;
  }

  body.sidebar-collapsed .dashboard-nav__group--primary .dashboard-nav__item.active {
    padding-right: 27px;
  }

  body.sidebar-collapsed .dashboard-nav__group--primary .dashboard-nav__item.active::after {
    display: block;
  }

  body.sidebar-collapsed .dashboard-nav {
    padding: 2px 4px 12px;
  }

  body.sidebar-collapsed .dashboard-sidebar__footer {
    padding: 12px 0 0;
  }

  .sidebar-toggle-btn {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-overlay {
    animation: none;
    opacity: 1;
  }

  .dashboard-sidebar,
  .dashboard-main,
  .dashboard-nav__item,
  .dashboard-nav__icon,
  .dashboard-nav__item svg,
  .sidebar-toggle-btn {
    transition-duration: 0.01ms !important;
  }
}

/* ─────────────────────────────────────────
   Dashboard Footer  (.df)
   Professional 4-column footer inside .dashboard-main
───────────────────────────────────────── */
.df {
  flex-shrink: 0;
  border-top: 1px solid var(--border-color, rgba(0,0,0,0.07));
  background-color: var(--sidebar-bg, #F0EDE6);
  padding: 36px 40px 28px;
}

.df__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 32px 48px;
  max-width: 100%;
}

/* ── Brand column ── */
.df__brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.df__brand-logo {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink-primary, #2B2A27);
  width: fit-content;
}

.df__brand-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.85;
}

.df__brand-name {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-primary, #2B2A27);
  letter-spacing: 0.01em;
}

.df__tagline {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-muted, #6E6B65);
  font-family: var(--font-sans);
  margin: 0;
}

.df__copy {
  font-size: 11px;
  color: var(--ink-muted, #6E6B65);
  opacity: 0.65;
  font-family: var(--font-sans);
  margin: 0;
  margin-top: auto;
  padding-top: 8px;
}

/* ── Navigation columns ── */
.df__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.df__col-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted, #6E6B65);
  font-family: var(--font-sans);
  margin: 0;
}

.df__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.df__link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  font-size: 13px;
  color: var(--ink-primary, #2B2A27);
  text-decoration: none;
  font-family: var(--font-sans);
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s, background-color 0.15s;
  width: fit-content;
  opacity: 0.75;
}

.df__link--button {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.df__link:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--ink-primary, #2B2A27);
}

/* ── Social items ── */
.df__socials {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.df__social-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-primary, #2B2A27);
  text-decoration: none;
  font-family: var(--font-sans);
  padding: 5px 6px;
  border-radius: 5px;
  transition: color 0.15s, background-color 0.15s;
  opacity: 0.75;
}

.df__social-item svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.df__social-item:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--ink-primary, #2B2A27);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .df__inner {
    grid-template-columns: 1fr 1fr;
    gap: 28px 32px;
  }
  .df__brand {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
  }
  .df__tagline {
    border-left: 1px solid var(--border-color, rgba(0,0,0,0.08));
    padding-left: 24px;
  }
  .df__copy {
    width: 100%;
    padding-top: 0;
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .df {
    display: none;
  }
}

/* Pastel controls keep the top bar in the same family as navigation. */
.dashboard-header { flex-shrink: 0; }
.dashboard-header__right { gap: 10px; }
.dashboard-header .color-action > svg { width: 19px; height: 19px; }
.dashboard-header__back { gap: 10px; }
.dashboard-header__back > svg { box-sizing: content-box; padding: 10px; border: 1px solid var(--paper-shadow); border-bottom-width: 3px; border-radius: 13px; background: linear-gradient(135deg, var(--dialog-key-surface), var(--feeling-surface-gold)); }
.dashboard-header .feature-help__link { border: 1px solid var(--paper-shadow); border-bottom-width: 3px; border-radius: 14px; background: linear-gradient(135deg, var(--dialog-key-surface), var(--sidebar-recenter-surface)); box-shadow: var(--shadow-sm); color: var(--ink-soft); }
.dashboard-header .btn-primary, .dashboard-header .onboarding-resume-button { min-height: 44px; border-radius: 14px; border-bottom-width: 3px; box-shadow: var(--shadow-sm); }
.dashboard-header .user-menu__dropdown { width: 238px; padding: 8px; border: 1px solid var(--paper-shadow); border-radius: 20px; background: var(--dialog-key-surface); box-shadow: var(--shadow-floating); }
.dashboard-header .user-menu__item { min-height: 48px; gap: 10px; padding: 6px 8px; border-radius: 14px; }
.dashboard-header .user-menu__item:hover { background: color-mix(in srgb, var(--control-tint, var(--paper-warm)) 45%, var(--dialog-key-surface)); }
.dashboard-header .user-menu__item--logout { color: var(--danger); }
.dashboard-header .user-menu__item--logout .color-icon { color: var(--danger); }
.dashboard-header .user-menu:has(.user-menu__dropdown--open) > .color-action,
.dashboard-header .notifications-menu:has(.notifications-dropdown--open) > .color-action { border-color: var(--sepia-line); box-shadow: inset 0 2px 4px color-mix(in srgb, var(--leather-brown) 12%, transparent); transform: translateY(1px); }
@media (min-width: 769px) and (max-width: 1024px) { .dashboard-sidebar .badge { display: none; } }
@media (max-width: 768px) {
  .dashboard-header { height: auto; min-height: var(--header-height); padding: 4px 12px; flex-wrap: wrap; gap: 4px 0; }
  .dashboard-header__left { flex: 1 0 auto; max-width: 100%; padding-right: 8px; }
  .dashboard-header__right { max-width: 100%; flex-wrap: wrap; justify-content: flex-end; gap: 4px; margin-left: auto; }
  .dashboard-header .onboarding-resume-button { width: 44px; min-width: 44px; height: 44px; }
  .mobile-sidebar-toggle { margin-inline: 0; }
}
@media (max-width: 380px) {
  .dashboard-header { height: auto; min-height: var(--header-height); flex-wrap: wrap; gap: 4px 0; padding-block: 4px; }
  .dashboard-header__right { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { .dashboard-header .feature-help__link, .dashboard-header__back > svg { transition: none; } }
