/* MG Enterprise 3 — Greenhouse Member Journal account UI */

.member-journal-page {
  position: relative;
  padding: 40px 0 72px;
  background: var(--parchment);
  overflow: hidden;
}
.journal-greenhouse-light {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(107, 158, 120, 0.12), transparent 60%),
    radial-gradient(ellipse 40% 30% at 90% 20%, rgba(198, 123, 78, 0.08), transparent 50%);
  pointer-events: none;
}
.journal-wrap {
  position: relative;
  max-width: 980px;
}

.journal-intro {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 32px;
}
.journal-badge-num {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--burgundy);
  color: var(--parchment);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 8px 20px 8px 20px;
  transform: rotate(-4deg);
  box-shadow: 0 6px 16px rgba(107, 39, 55, 0.25);
}
.journal-kicker {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--euca-deep);
  margin: 0 0 8px;
}
.journal-intro h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 8px;
}
.journal-intro h1 em {
  font-style: italic;
  color: var(--copper-dark);
}
.journal-lede {
  color: var(--muted);
  margin: 0;
  max-width: 46ch;
}

.journal-loading {
  text-align: center;
  padding: 24px;
  background: var(--white);
  border: 2px dashed var(--copper-pale);
  border-radius: var(--radius-lg);
}

/* ── Logged in: open journal ── */
.journal-open {
  background: var(--white);
  border: 2px solid var(--copper-pale);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.journal-pass-card {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--ink) 0%, #2a3140 100%);
  color: var(--parchment);
  border-bottom: 3px solid var(--copper);
}
.pass-card-photo {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--burgundy);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  border: 2px solid var(--copper-pale);
  flex-shrink: 0;
}
.pass-card-kicker {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--copper);
  margin: 0 0 4px;
}
.pass-card-main h2 {
  font-size: 1.25rem;
  margin: 0;
  color: var(--parchment);
}
.pass-card-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.journal-signout {
  border-color: rgba(244, 239, 228, 0.35) !important;
  color: var(--parchment) !important;
}
.journal-signout:hover {
  background: rgba(244, 239, 228, 0.1) !important;
  color: var(--parchment) !important;
}

.journal-spread {
  display: grid;
  grid-template-columns: 72px 1fr;
  min-height: 420px;
}
.journal-spine {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #5c3d2e 0%, #3d2819 100%);
  padding: 12px 0;
  gap: 4px;
}
.journal-spine-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  border: 0;
  background: transparent;
  color: rgba(244, 239, 228, 0.55);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background .2s, color .2s;
  border-left: 3px solid transparent;
}
.journal-spine-tab:hover,
.journal-spine-tab.is-active {
  background: rgba(198, 123, 78, 0.2);
  color: var(--parchment);
  border-left-color: var(--copper);
}
.spine-tab-mark {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  color: var(--copper-pale);
}
.spine-tab-label {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  line-height: 1;
}

.journal-pages {
  padding: 28px 32px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(28, 31, 38, 0.035) 27px,
      rgba(28, 31, 38, 0.035) 28px
    ),
    var(--parchment);
}
.page-kicker {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--copper-dark);
  margin: 0 0 4px;
}
.page-title {
  font-size: 1.25rem;
  margin: 0 0 20px;
}

.dash-panel { display: none; }
.dash-panel.is-active { display: block; }

.journal-profile-grid,
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.profile-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  border-left: 3px solid var(--euca);
}
.profile-item .k {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 4px;
}
.profile-item .v {
  display: block;
  font-weight: 700;
  font-size: .92rem;
  color: var(--ink);
  word-break: break-word;
}
.profile-item .v.mono {
  font-family: ui-monospace, monospace;
  font-size: .78rem;
  font-weight: 500;
}

.orders-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.orders-head .page-title { margin-bottom: 0; }

.journal-orders .order-row,
.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px dashed var(--copper-pale);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.order-row:hover {
  border-color: var(--copper);
  box-shadow: 0 4px 12px rgba(28, 31, 38, 0.06);
}
.order-row strong { display: block; margin-bottom: 4px; }
.mini-copy {
  font-size: .82rem;
  color: var(--muted);
  margin: 0;
}

.journal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.journal-form-narrow { max-width: 380px; }
.journal-field label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.journal-field input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: var(--white);
  transition: border-color .2s;
}
.journal-field input:focus {
  outline: none;
  border-color: var(--copper);
}
.form-subhead {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 12px 0 4px;
  color: var(--copper-dark);
}
.btn-block { width: 100%; }

/* ── Logged out: closed journal ── */
.journal-closed {
  position: relative;
  background: var(--white);
  border: 2px solid var(--copper-pale);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.journal-closed-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  background: linear-gradient(90deg, #3d2819, #5c3d2e 40%, #3d2819);
  box-shadow: inset -2px 0 6px rgba(0,0,0,.2);
  z-index: 2;
}
.journal-closed-grid {
  display: grid;
  grid-template-columns: 88px 1fr;
  min-height: 480px;
  padding-left: 14px;
}

.journal-cover-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 12px;
  background: var(--parchment-2);
  border-right: 1px dashed var(--line);
}
.cover-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .2s, background .2s, transform .15s;
}
.cover-tab:hover { border-color: var(--copper-pale); transform: translateX(2px); }
.cover-tab.is-active {
  background: var(--copper-pale);
  border-color: var(--copper);
  box-shadow: -3px 0 0 var(--copper);
}
.cover-tab-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--burgundy);
}
.cover-tab-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-soft);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.journal-cover-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 480px;
}
.journal-perks {
  padding: 28px 24px;
  background: linear-gradient(180deg, var(--euca-pale) 0%, var(--parchment) 100%);
  border-right: 1px dashed var(--line);
}
.journal-perks-kicker {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--euca-deep);
  margin: 0 0 8px;
}
.journal-perks h2 {
  font-size: 1.15rem;
  margin: 0 0 16px;
}
.journal-perks-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.journal-perks-list li {
  position: relative;
  padding: 8px 0 8px 18px;
  font-size: .85rem;
  color: var(--ink-soft);
  border-bottom: 1px dotted var(--line);
}
.journal-perks-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--copper);
  font-size: .55rem;
  top: 11px;
}

.journal-cover-stage {
  padding: 28px 32px;
  background: var(--white);
}
.journal-pane { display: none; }
.journal-pane.is-active { display: block; }
.journal-pane-head { margin-bottom: 22px; }
.journal-pane-step {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--copper-dark);
  background: var(--copper-pale);
  padding: 3px 8px;
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.journal-pane-step-alt { background: var(--euca-pale); color: var(--euca-deep); }
.journal-pane-head h3 {
  font-size: 1.35rem;
  margin: 0 0 8px;
}
.journal-pane-lead {
  color: var(--muted);
  font-size: .9rem;
  margin: 0;
  max-width: 42ch;
}
.journal-footnote {
  font-size: .82rem;
  color: var(--muted);
  margin: 16px 0 0;
}

.journal-recover {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}
.journal-recover summary {
  cursor: pointer;
  font-weight: 700;
  font-size: .88rem;
  color: var(--copper-dark);
  list-style: none;
}
.journal-recover summary::-webkit-details-marker { display: none; }
.journal-recover-body { margin-top: 16px; }
.journal-reset-form { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }

/* ── Notices & toast ── */
.notice {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .88rem;
  margin-bottom: 16px;
  border-left: 4px solid var(--copper);
  background: var(--copper-pale);
  color: var(--ink);
}
.notice.success {
  background: var(--euca-pale);
  border-left-color: var(--euca);
  color: var(--euca-deep);
}
.notice.warning {
  background: #fff8e6;
  border-left-color: #d4a017;
  color: #7a5c00;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 360px;
  padding: 14px 18px;
  background: var(--ink);
  color: var(--parchment);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--copper);
  box-shadow: var(--shadow);
  font-size: .88rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s;
  z-index: 200;
  pointer-events: none;
}
.toast.visible,
.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.toast.success { border-left-color: var(--euca); }
.toast.error { border-left-color: #c53030; }
.toast.warning { border-left-color: #d4a017; }

@media (max-width: 900px) {
  .journal-cover-body { grid-template-columns: 1fr; }
  .journal-perks { border-right: 0; border-bottom: 1px dashed var(--line); }
  .journal-spread { grid-template-columns: 1fr; }
  .journal-spine {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 10px;
  }
  .journal-spine-tab {
    flex-direction: row;
    padding: 10px 14px;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }
  .journal-spine-tab.is-active { border-bottom-color: var(--copper); border-left: 0; }
  .spine-tab-label {
    writing-mode: horizontal-tb;
    transform: none;
  }
  .journal-pass-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .pass-card-actions {
    margin-left: 0;
    width: 100%;
  }
  .pass-card-actions .btn { flex: 1 1 auto; min-width: calc(50% - 4px); }
}

@media (max-width: 640px) {
  .journal-closed-grid { grid-template-columns: 1fr; padding-left: 0; }
  .journal-closed-spine { display: none; }
  .journal-cover-tabs {
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px dashed var(--line);
  }
  .cover-tab-label {
    writing-mode: horizontal-tb;
    transform: none;
  }
  .journal-intro { flex-direction: column; }
  .pass-card-actions { margin-left: 0; width: 100%; flex-direction: column; }
  .pass-card-actions .btn { width: 100%; min-width: 0; }
  .journal-pages { padding: 20px 16px; }
  .journal-cover-stage { padding: 20px 16px; }
  .order-row { flex-direction: column; align-items: flex-start; }
  .toast { left: 16px; right: 16px; max-width: none; }
}
