/* Appily-Five — Herbarium Ledger account (unique folio design) */

.herbarium-account {
  position: relative;
  padding: 44px 0 80px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(168, 197, 160, 0.15) 0%, transparent 55%),
    var(--cream);
}
.herbarium-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.herbarium-wrap {
  position: relative;
  z-index: 1;
  max-width: 920px;
}

.herbarium-intro {
  text-align: center;
  margin-bottom: 32px;
}
.catalog-code {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 10px;
}
.herbarium-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  margin: 0 0 10px;
  color: var(--moss-deep);
  font-style: italic;
}
.herbarium-lede {
  margin: 0 auto;
  max-width: 46ch;
  color: var(--muted);
  font-size: .94rem;
}

.folio-loading {
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
  background: var(--sunflower-pale) !important;
  border-color: var(--sunflower) !important;
}

/* ── Logged-out: Guest folio sheet ── */
.guest-folio {
  perspective: 1200px;
}

.guest-sheet {
  position: relative;
  background:
    linear-gradient(175deg, #fffef9 0%, #faf6ee 40%, #f5efe3 100%);
  border: 1px solid rgba(47, 82, 51, 0.15);
  border-radius: 4px 4px 12px 12px;
  box-shadow:
    0 2px 0 rgba(47, 82, 51, 0.06),
    0 24px 60px rgba(30, 42, 34, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  padding: 0 0 36px;
  overflow: visible;
}

.sheet-pin {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e8e4dc, #a09888);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 -2px 4px rgba(0, 0, 0, 0.15);
  z-index: 2;
}
.sheet-pin-tl { top: 18px; left: 22px; }
.sheet-pin-br { bottom: 28px; right: 28px; }

.sheet-header {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 14px 28px;
  border-bottom: 1px dashed rgba(47, 82, 51, 0.2);
  background: rgba(47, 82, 51, 0.04);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.sheet-seal-wrap {
  text-align: center;
  padding: 28px 24px 8px;
}
.sheet-seal {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, var(--bloom), #c94d6a);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  font-style: italic;
  box-shadow:
    0 0 0 4px rgba(255, 107, 138, 0.25),
    0 8px 24px rgba(255, 107, 138, 0.35),
    inset 0 2px 8px rgba(255, 255, 255, 0.3);
  transform: rotate(-8deg);
}
.sheet-seal span { transform: rotate(8deg); }
.sheet-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--moss-deep);
  margin: 0;
}

/* Index tabs — stick up from top edge like folder tabs */
.index-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 20px 28px 0;
  padding: 0;
  position: relative;
  z-index: 12;
}
.index-tab {
  position: relative;
  padding: 12px 28px 14px;
  border: 1px solid rgba(47, 82, 51, 0.18);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: #ebe5d9;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
  transition: background .25s, color .25s, transform .25s;
  margin-bottom: -1px;
}
.index-tab:first-child { margin-right: -1px; }
.index-tab:hover {
  background: #f5f0e6;
  color: var(--moss);
}
.index-tab.is-active {
  background: #fffef9;
  color: var(--moss-deep);
  z-index: 2;
  transform: translateY(-3px);
  box-shadow: 0 -4px 12px rgba(47, 82, 51, 0.06);
}

.sheet-body {
  margin: 0 28px;
  padding: 32px 28px 8px;
  background: #fffef9;
  border: 1px solid rgba(47, 82, 51, 0.18);
  border-radius: 0 0 8px 8px;
  min-height: 340px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.sheet-pane {
  display: none;
  animation: folioReveal .45s ease;
}
.sheet-pane.is-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@keyframes folioReveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.sheet-pane h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 8px;
  color: var(--moss-deep);
  font-style: italic;
  text-align: center;
}
.sheet-lead {
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: .9rem;
  max-width: 42ch;
  line-height: 1.55;
  text-align: center;
}

/* Ledger-style form lines */
.ledger-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}
.ledger-form-narrow { max-width: 400px; }

.ledger-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(47, 82, 51, 0.12);
  width: 100%;
}
.ledger-line label {
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  font-style: italic;
  color: var(--moss);
  text-align: center;
}
.ledger-line input {
  width: 100%;
  max-width: 320px;
  border: 0;
  border-bottom: 2px dotted rgba(47, 82, 51, 0.25);
  background: transparent;
  padding: 8px 4px;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  text-align: center;
  transition: border-color .2s;
}
.ledger-line input:focus {
  outline: none;
  border-bottom-color: var(--bloom);
  border-bottom-style: solid;
}

.ledger-field {
  margin-bottom: 14px;
}
.ledger-field label {
  display: block;
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  font-style: italic;
  color: var(--moss);
  margin-bottom: 6px;
}
.ledger-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px dashed rgba(47, 82, 51, 0.25);
  border-radius: 4px;
  font: inherit;
  background: rgba(255, 255, 255, 0.6);
}
.ledger-field input:focus {
  outline: none;
  border-style: solid;
  border-color: var(--moss-light);
  background: var(--white);
}

.btn-seal {
  margin-top: 20px;
  border-radius: 50px !important;
  box-shadow:
    0 4px 0 var(--moss-deep),
    0 8px 20px rgba(47, 82, 51, 0.25) !important;
  letter-spacing: .04em;
}
.btn-seal:active {
  transform: translateY(2px) !important;
  box-shadow: 0 2px 0 var(--moss-deep) !important;
}
.btn-block { width: 100%; justify-content: center; }

.sheet-recover {
  margin: 24px auto 0;
  max-width: 380px;
  width: 100%;
  border-top: 1px dashed rgba(47, 82, 51, 0.2);
  padding-top: 14px;
  text-align: center;
}
.sheet-recover summary {
  cursor: pointer;
  font-size: .84rem;
  font-weight: 700;
  color: var(--moss-light);
  font-family: var(--font-display);
  font-style: italic;
  display: inline-block;
}
.sheet-recover-body {
  padding-top: 14px;
  text-align: center;
}
.sheet-reset {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed rgba(47, 82, 51, 0.2);
}
.sheet-footnote {
  margin: 16px auto 0;
  font-size: .78rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
  max-width: 38ch;
}
.sheet-perks {
  list-style: none;
  padding: 0;
  margin: 20px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.sheet-perks li {
  font-size: .72rem;
  font-weight: 600;
  padding: 5px 12px;
  background: var(--sage-pale);
  border: 1px dashed var(--sage);
  border-radius: 4px;
  color: var(--moss);
}
.form-subhead {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  margin: 0 0 12px;
  color: var(--moss);
  text-align: center;
}

/* ── Logged-in: Member folio spread ── */
.member-folio {
  perspective: 1000px;
}

.folio-spread {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 520px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 4px 0 rgba(47, 82, 51, 0.08),
    0 28px 70px rgba(30, 42, 34, 0.14);
}

.folio-cover {
  position: relative;
  background:
    linear-gradient(160deg, #2a4a32 0%, var(--moss-deep) 40%, #1a2e22 100%);
  color: var(--cream);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-right: 3px solid rgba(255, 255, 255, 0.08);
}

.cover-pin {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d4cfc4, #8a8278);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
}
.cover-pin-tl { top: 16px; left: 16px; }
.cover-pin-tr { top: 16px; right: 16px; }

.cover-seal {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, var(--bloom), #b83a58);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  font-style: italic;
  box-shadow: 0 0 0 4px rgba(255, 107, 138, 0.3), 0 10px 30px rgba(0, 0, 0, 0.25);
  transform: rotate(-6deg);
  margin-bottom: 16px;
}
.cover-seal span { transform: rotate(6deg); }

.cover-stamp {
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blush);
  font-weight: 700;
  margin: 0 0 8px;
}
.folio-cover h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 8px;
  color: var(--cream);
  line-height: 1.25;
  word-break: break-word;
}
.cover-note {
  font-size: .75rem;
  opacity: .75;
  margin: 0 0 20px;
  font-style: italic;
}

.cover-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 20px;
}
.cover-actions .btn { width: 100%; justify-content: center; }
.btn-signout {
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: var(--cream) !important;
  background: transparent !important;
}
.btn-signout:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.cover-links {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.cover-links a {
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255, 251, 247, 0.75);
  transition: color .15s;
}
.cover-links a:hover { color: var(--blush); }

.folio-pages {
  background:
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(47, 82, 51, 0.06) 27px,
      rgba(47, 82, 51, 0.06) 28px
    ),
    linear-gradient(180deg, #fffef9 0%, #faf6ee 100%);
  padding: 0 28px 32px;
  position: relative;
}

/* Ribbon bookmark tabs */
.ribbon-nav {
  display: flex;
  gap: 6px;
  margin: 0 -28px 24px;
  padding: 0 28px;
  border-bottom: 2px solid rgba(47, 82, 51, 0.1);
}
.ribbon-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px 12px;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s;
}
.ribbon-tail {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 0;
  background: var(--bloom);
  border-radius: 0 0 2px 2px;
  transition: height .25s;
}
.ribbon-tab.is-active {
  color: var(--moss-deep);
}
.ribbon-tab.is-active .ribbon-tail {
  height: 10px;
}
.ribbon-tab:hover { color: var(--moss); }

.folio-page {
  display: none;
  animation: folioReveal .35s ease;
}
.folio-page.is-active { display: block; }

.page-label {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  margin: 0 0 20px;
  color: var(--moss-deep);
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.page-head .page-label { margin-bottom: 0; }

#profileVerifyNotice:not(:empty) {
  margin: 16px 0 0;
}

/* Specimen profile cards */
.specimen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.profile-item {
  position: relative;
  padding: 18px 16px 16px 20px;
  background: var(--white);
  border: 1px solid rgba(47, 82, 51, 0.12);
  border-radius: 3px;
  box-shadow: 2px 3px 0 rgba(47, 82, 51, 0.06);
  transform: rotate(-0.4deg);
  transition: transform .2s, box-shadow .2s;
}
.profile-item:nth-child(even) { transform: rotate(0.35deg); }
.profile-item:hover {
  transform: rotate(0) translateY(-2px);
  box-shadow: 4px 6px 0 rgba(47, 82, 51, 0.08);
}
.profile-item::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ddd8ce, #9a9288);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.profile-item .k {
  display: block;
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 700;
}
.profile-item .v {
  display: block;
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
  line-height: 1.4;
  font-family: var(--font-display);
  font-size: 1.02rem;
}
.profile-item .v.mono {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .76rem;
  font-weight: 500;
  color: var(--muted);
}
.profile-item .v.is-verified { color: var(--moss-light); }
.profile-item .v.is-pending { color: #c45a00; }

.herbarium-account .order-row {
  background: var(--white);
  border: 1px solid rgba(47, 82, 51, 0.12);
  border-left: 4px solid var(--bloom);
  border-radius: 3px;
  position: relative;
  transition: box-shadow .2s;
}
.herbarium-account .order-row:hover {
  box-shadow: 3px 4px 0 rgba(47, 82, 51, 0.06);
}
.herbarium-account .order-row::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 12px;
  background: repeating-linear-gradient(
    180deg,
    transparent,
    transparent 4px,
    rgba(47, 82, 51, 0.08) 4px,
    rgba(47, 82, 51, 0.08) 8px
  );
  opacity: .5;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 380px;
  padding: 14px 18px;
  background: var(--moss-deep);
  color: var(--cream);
  border-radius: 4px;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  transform: translateY(8px);
  z-index: 100;
  border-left: 4px solid var(--bloom);
  font-family: var(--font-display);
  font-style: italic;
}
.toast.is-visible,
.toast.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.toast.success { border-left-color: var(--sage); }
.toast.error { border-left-color: #c0392b; }
.toast.warning { border-left-color: var(--sunflower); }

/* ── Responsive ── */
@media (max-width: 720px) {
  .herbarium-account { padding: 28px 0 56px; }
  .herbarium-intro { text-align: left; }

  .sheet-header {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
  }
  .sheet-body { margin: 0 16px; padding: 24px 18px 8px; }
  .index-tabs { margin: 16px 16px 0; }
  .index-tab { flex: 1; padding: 10px 12px; font-size: .85rem; text-align: center; }
  .ledger-form { max-width: none; width: 100%; }
  .ledger-line input { max-width: none; }

  .folio-spread { grid-template-columns: 1fr; }
  .folio-cover {
    padding: 24px 20px;
    flex-direction: row;
    flex-wrap: wrap;
    text-align: left;
    align-items: flex-start;
    gap: 12px 16px;
  }
  .cover-pin-tr { display: none; }
  .cover-seal {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
    margin: 0;
    flex-shrink: 0;
  }
  .cover-stamp, .folio-cover h2, .cover-note { width: calc(100% - 72px); }
  .cover-actions {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
  .cover-actions .btn { width: auto; flex: 1; min-width: 120px; }
  .cover-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
  }

  .ribbon-nav {
    margin: 0 -20px 20px;
    padding: 0 12px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .ribbon-nav::-webkit-scrollbar { display: none; }
  .ribbon-tab {
    flex-shrink: 0;
    padding: 12px 14px 10px;
    font-size: .82rem;
  }
  .folio-pages { padding: 0 20px 28px; }
  .specimen-grid { grid-template-columns: 1fr; }

  .toast {
    left: 16px;
    right: 16px;
    max-width: none;
  }
}

@media (max-width: 400px) {
  .cover-actions { flex-direction: column; }
  .cover-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .sheet-pane,
  .folio-page.is-active { animation: none; }
  .profile-item { transform: none; }
}
