/* Appily-Two — account chrome (Specimen Atlas auth gate + dashboard) */
.auth-page {
  padding: 48px 0 72px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--coral-pale) 0%, transparent 55%),
    var(--mist, #FAF6F0);
}
.auth-page > .container {
  max-width: 900px;
}
.auth-page > .container:has(.auth-dash-layout) {
  max-width: 1000px;
}

#accountLoggedIn[hidden],
#accountLoggedOut[hidden],
#accountLoading[hidden] {
  display: none !important;
}

/* Logged-out: split gate — form + product visual flip sides */
.auth-split-gate {
  position: relative;
  background: var(--white, #fff);
  border-radius: var(--radius-xl, 24px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.auth-split-tabs {
  position: relative;
  z-index: 20;
  isolation: isolate;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px 20px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.auth-tab-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.auth-split-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill, 999px);
  background: var(--mist);
  color: var(--slate-mid, #5C4F55);
  font-family: var(--font-body, 'Work Sans', sans-serif);
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: color .3s ease, background .3s ease, border-color .3s ease, box-shadow .3s ease;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}
.auth-tab-icon {
  font-size: .62rem;
  opacity: .7;
  transition: transform .35s ease;
}
.auth-split-tab:hover {
  border-color: var(--coral);
  color: var(--teal);
}
.auth-split-tab:hover .auth-tab-icon { transform: scale(1.2); }
.auth-split-tab.is-active,
.auth-split-tabs:has(#authTabSignin:checked) label[for="authTabSignin"],
.auth-split-tabs:has(#authTabRegister:checked) label[for="authTabRegister"] {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(74, 44, 90, 0.22);
}
.auth-split-tab.is-active .auth-tab-icon,
.auth-split-tabs:has(#authTabSignin:checked) label[for="authTabSignin"] .auth-tab-icon,
.auth-split-tabs:has(#authTabRegister:checked) label[for="authTabRegister"] .auth-tab-icon {
  opacity: 1;
  color: var(--coral);
}

.auth-tab-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--coral), var(--mint));
  border-radius: 3px 3px 0 0;
  transition: transform .42s cubic-bezier(.4, 0, .2, 1), width .42s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
  z-index: 1;
}

/* Two-column body — columns swap on tab change */
.auth-split-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "form visual";
  min-height: 460px;
  transition: grid-template-areas 0s;
  position: relative;
  z-index: 1;
}
.auth-split-gate[data-active="register"] .auth-split-body,
.auth-split-gate:has(#authTabRegister:checked) .auth-split-body {
  grid-template-areas: "visual form";
}

.auth-form-col {
  grid-area: form;
  position: relative;
  padding: 36px 40px 40px;
  background: var(--white);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  transition: transform .48s cubic-bezier(.4, 0, .2, 1);
}
.auth-split-gate[data-active="signin"] .auth-visual-col {
  border-left: 1px solid var(--line);
}
.auth-split-gate[data-active="register"] .auth-form-col {
  border-left: 1px solid var(--line);
}
.auth-visual-col {
  grid-area: visual;
  position: relative;
  overflow: hidden;
  min-height: 460px;
  transition: transform .48s cubic-bezier(.4, 0, .2, 1);
}

.auth-split-gate.is-swapping[data-direction="forward"] .auth-form-col {
  animation: authColShiftLeft .48s cubic-bezier(.4, 0, .2, 1);
}
.auth-split-gate.is-swapping[data-direction="forward"] .auth-visual-col {
  animation: authColShiftRight .48s cubic-bezier(.4, 0, .2, 1);
}
.auth-split-gate.is-swapping[data-direction="back"] .auth-form-col {
  animation: authColShiftRight .48s cubic-bezier(.4, 0, .2, 1);
}
.auth-split-gate.is-swapping[data-direction="back"] .auth-visual-col {
  animation: authColShiftLeft .48s cubic-bezier(.4, 0, .2, 1);
}

@keyframes authColShiftLeft {
  0% { transform: translateX(0); }
  40% { transform: translateX(-12px); opacity: .85; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes authColShiftRight {
  0% { transform: translateX(0); }
  40% { transform: translateX(12px); opacity: .85; }
  100% { transform: translateX(0); opacity: 1; }
}

/* Form panes — only active pane visible */
.auth-form-pane {
  position: absolute;
  inset: 36px 40px 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity .38s ease,
    transform .38s cubic-bezier(.4, 0, .2, 1),
    visibility .38s;
  --auth-accent: var(--coral);
}
.auth-form-pane[data-pane="register"] { --auth-accent: var(--mint); }
.auth-form-pane.is-active,
.auth-split-gate:has(#authTabSignin:checked) #tabSignin,
.auth-split-gate:has(#authTabRegister:checked) #tabRegister {
  position: relative;
  inset: auto;
  width: 100%;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.auth-split-gate.is-swapping .auth-form-pane.is-active {
  animation: authPaneIn .42s cubic-bezier(.4, 0, .2, 1);
}
@keyframes authPaneIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-form-pane h2 {
  font-family: var(--font-display, 'Spectral', serif);
  font-size: 1.5rem;
  margin: 0 0 8px;
  color: var(--teal, #4A2C5A);
  text-align: left;
}
.auth-form-pane .lead {
  color: var(--muted, #7A6E74);
  margin: 0 0 24px;
  font-size: .88rem;
  max-width: 36ch;
  line-height: 1.5;
  text-align: left;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  width: 100%;
}
.auth-field {
  width: 100%;
  max-width: 280px;
}
.auth-form label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--teal);
  letter-spacing: .02em;
}
.auth-form input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill, 999px);
  font: inherit;
  font-size: .9rem;
  background: var(--white);
  transition: border-color .25s, box-shadow .25s, transform .2s;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--auth-accent, var(--coral));
  box-shadow: 0 0 0 3px rgba(212, 160, 84, 0.18);
  transform: translateY(-1px);
}
.auth-form-pane[data-pane="register"] .auth-form input:focus {
  box-shadow: 0 0 0 3px rgba(139, 168, 136, 0.22);
}
.auth-submit {
  width: 100%;
  max-width: 280px;
  margin-top: 4px;
}
.form-subhead {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 12px;
  color: var(--teal-mid, #6B4578);
  text-align: left;
}
.auth-forgot-block {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
  width: 100%;
  max-width: 280px;
}

/* Product visual panels */
.auth-visual {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  transition:
    opacity .42s ease,
    transform .42s cubic-bezier(.4, 0, .2, 1),
    visibility .42s;
}
.auth-visual.is-active,
.auth-split-gate:has(#authTabSignin:checked) .auth-visual-signin,
.auth-split-gate:has(#authTabRegister:checked) .auth-visual-register {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}
.auth-split-gate.is-swapping .auth-visual.is-active {
  animation: authVisualIn .48s cubic-bezier(.4, 0, .2, 1);
}
@keyframes authVisualIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-visual-signin .auth-visual-bg {
  background:
    radial-gradient(ellipse 70% 60% at 60% 30%, rgba(196, 83, 58, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(31, 92, 69, 0.22) 0%, transparent 50%),
    linear-gradient(160deg, #174A38 0%, #0C1610 55%, #0C1610 100%);
}
.auth-visual-register .auth-visual-bg {
  background:
    radial-gradient(ellipse 65% 55% at 40% 25%, rgba(166, 124, 0, 0.25) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 80% 75%, rgba(31, 92, 69, 0.2) 0%, transparent 50%),
    linear-gradient(200deg, #1F5C45 0%, #174A38 45%, #0C1610 100%);
}
.auth-visual-bg {
  position: absolute;
  inset: 0;
  transition: background .5s ease;
}

.auth-scent-wisp {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0;
  animation: scentDrift 7s ease-in-out infinite;
  pointer-events: none;
}
.auth-visual-signin .wisp-1 { width: 90px; height: 90px; background: rgba(212, 160, 84, 0.5); left: 10%; top: 15%; animation-delay: 0s; }
.auth-visual-signin .wisp-2 { width: 70px; height: 70px; background: rgba(243, 235, 245, 0.35); right: 12%; top: 35%; animation-delay: 2.2s; }
.auth-visual-signin .wisp-3 { width: 80px; height: 80px; background: rgba(212, 160, 84, 0.35); left: 40%; bottom: 20%; animation-delay: 4s; }
.auth-visual-register .wisp-1 { width: 85px; height: 85px; background: rgba(139, 168, 136, 0.45); right: 15%; top: 12%; animation-delay: 0.5s; }
.auth-visual-register .wisp-2 { width: 65px; height: 65px; background: rgba(251, 243, 228, 0.3); left: 10%; bottom: 25%; animation-delay: 2.8s; }
.auth-visual-register .wisp-3 { width: 75px; height: 75px; background: rgba(212, 160, 84, 0.3); right: 35%; bottom: 15%; animation-delay: 4.5s; }

@keyframes scentDrift {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.9); }
  35%, 65% { opacity: 0.75; transform: translateY(-20px) scale(1.08); }
}

.auth-visual-art {
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
}
.auth-illo {
  width: min(200px, 42vw);
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.18));
}
.auth-flame {
  animation: flameFlicker 2s ease-in-out infinite;
  transform-origin: 100px 56px;
}
@keyframes flameFlicker {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: .7; transform: scaleY(1.15); }
}
.auth-reed { animation: reedSway 4s ease-in-out infinite; transform-origin: center bottom; }
.auth-reed.reed-2 { animation-delay: .6s; }
.auth-reed.reed-3 { animation-delay: 1.2s; }
@keyframes reedSway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(2deg); }
}

.auth-visual-copy {
  position: relative;
  z-index: 1;
  color: var(--white);
  max-width: 28ch;
}
.auth-visual-eyebrow {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 8px;
}
.auth-visual-copy h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 8px;
  font-weight: 600;
  line-height: 1.25;
}
.auth-visual-copy p {
  margin: 0;
  font-size: .84rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.auth-visual-chips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.auth-visual-chips li {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--white);
  backdrop-filter: blur(4px);
}

@media (prefers-reduced-motion: reduce) {
  .auth-scent-wisp,
  .auth-flame,
  .auth-reed,
  .auth-form-col,
  .auth-visual-col,
  .auth-form-pane,
  .auth-visual,
  .auth-tab-indicator { animation: none !important; transition-duration: 0.01ms !important; }
}

/* Logged-in: sidebar dashboard + aligned profile sheet */
.auth-dash-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  background: var(--white);
  border-radius: var(--radius-xl, 24px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 520px;
}

.auth-dash-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px 20px;
  background: linear-gradient(180deg, var(--fern, #1F5C45) 0%, var(--ink, #0C1610) 100%);
  color: var(--parchment, #F6F1E6);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.dash-sidebar-brand .eyebrow {
  color: var(--coral);
  margin: 0 0 6px;
  font-size: .66rem;
}
.dash-sidebar-brand h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0;
  color: var(--white);
  line-height: 1.3;
  word-break: break-word;
}
.dash-sidebar-nav,
.dash-sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-sidebar-links {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.dash-nav-link {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: .84rem;
  font-weight: 600;
  color: rgba(250, 246, 240, 0.75);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, color .2s, border-color .2s;
}
.dash-nav-link:hover,
.dash-nav-link.is-active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(212, 160, 84, 0.35);
  color: var(--white);
}
.dash-nav-link.is-active {
  background: rgba(212, 160, 84, 0.18);
  border-color: rgba(212, 160, 84, 0.45);
}
.dash-nav-link-muted {
  font-size: .78rem;
  font-weight: 500;
  color: rgba(250, 246, 240, 0.55);
}
.dash-nav-link-muted:hover { color: rgba(250, 246, 240, 0.9); }

.auth-dash-main {
  display: flex;
  flex-direction: column;
  padding: 28px 32px 32px;
  min-width: 0;
}
.dash-main-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.dash-main-title { min-width: 0; }
.dash-panel-label {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 4px;
  color: var(--teal);
  font-weight: 600;
}
.dash-panel-hint {
  margin: 0;
  font-size: .86rem;
  color: var(--muted);
  line-height: 1.45;
}
.auth-dash-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.dash-verify-slot { margin-bottom: 0; }
.dash-verify-slot:empty { display: none; }
.dash-verify-slot:not(:empty) {
  margin-bottom: 28px;
}
.dash-verify-slot .notice { margin: 0; }

/* Extra room for orders when verification banner is shown above */
.dash-verify-slot:not(:empty) ~ #dashOrders {
  padding-top: 8px;
}

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

.orders-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
#dashOrders .ledger-index,
#dashOrders .order-list {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

/* Profile information sheet */
.profile-sheet {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.profile-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
}
.profile-block-title {
  margin: 0;
  padding: 12px 20px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-mid);
  background: linear-gradient(90deg, var(--teal-light), var(--mint-pale));
  border-bottom: 1px solid var(--line);
}
.profile-rows {
  margin: 0;
  padding: 0;
}
.profile-row {
  display: grid;
  grid-template-columns: minmax(130px, 180px) 1fr;
  gap: 16px 24px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.profile-row:last-child { border-bottom: 0; }
.profile-row:nth-child(even) { background: rgba(250, 246, 240, 0.5); }
.profile-key {
  margin: 0;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .02em;
}
.profile-val {
  margin: 0;
  font-size: .92rem;
  font-weight: 600;
  color: var(--slate);
  word-break: break-word;
  text-align: left;
}
.profile-val.is-mono {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: .8rem;
  font-weight: 500;
  color: var(--teal-mid);
}

/* Password panel — left-aligned fields */
.dash-password-form {
  align-items: flex-start;
  max-width: 360px;
}
.dash-password-form .form-subhead {
  text-align: left;
  margin-bottom: 16px;
}
.dash-password-form .auth-field { max-width: 100%; width: 100%; }
.dash-password-form .auth-form input { max-width: 100%; border-radius: var(--radius); }
.dash-password-form .auth-submit { max-width: 100%; }

.orders-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--line);
}
.orders-head h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0;
  color: var(--teal);
}
.orders-view-all {
  padding: 5px 12px;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.2;
  flex-shrink: 0;
  white-space: nowrap;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 360px;
  padding: 14px 18px;
  background: var(--slate);
  color: var(--white);
  border-radius: var(--radius, 6px);
  font-size: .88rem;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  z-index: 100;
  border-left: 4px solid var(--coral);
}
.toast.is-visible { opacity: 1; pointer-events: auto; }

@media (max-width: 720px) {
  .auth-page > .container { max-width: calc(100% - 24px); }
  .auth-split-body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "visual"
      "form" !important;
    min-height: auto;
  }
  .auth-visual-col {
    min-height: 240px;
    order: -1;
  }
  .auth-form-col {
    padding: 24px 20px 32px;
  }
  .auth-form-pane {
    inset: 24px 20px 32px;
  }
  .auth-form-pane.is-active { inset: auto; }
  .auth-field, .auth-form input, .auth-submit, .auth-forgot-block { max-width: 100%; }
  .auth-illo { width: 140px; }
  .auth-visual { padding: 24px 16px; }
  .auth-visual-copy h3 { font-size: 1.15rem; }
  .auth-split-tabs { padding: 14px 12px 12px; gap: 8px; }
  .auth-split-tab { padding: 8px 14px; font-size: .8rem; }
  .auth-dash-layout {
    grid-template-columns: 1fr;
  }
  .auth-dash-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
  }
  .dash-sidebar-brand { flex: 1 1 100%; }
  .dash-sidebar-brand h2 { font-size: 1.05rem; }
  .dash-sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
  }
  .dash-sidebar-links {
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    gap: 6px;
  }
  .dash-nav-link {
    width: auto;
    padding: 8px 12px;
    font-size: .78rem;
  }
  .auth-dash-main { padding: 20px 16px 24px; }
  .dash-main-head {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .auth-dash-actions { justify-content: flex-start; }
  .profile-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 16px;
    align-items: flex-start;
  }
  .profile-key { font-size: .72rem; }
  .profile-val { font-size: .88rem; }
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}
