/* Tarab Global III — Account page (Sunlit Atelier) */

.account-page {
  position: relative;
  padding: clamp(56px, 8vh, 96px) 0 clamp(72px, 10vh, 120px);
  overflow: hidden;
  background: var(--v2-sand-light);
}

.account-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 12% 0%, rgba(92, 122, 104, 0.14), transparent 60%),
    radial-gradient(ellipse 55% 40% at 100% 30%, rgba(196, 92, 62, 0.10), transparent 60%),
    radial-gradient(ellipse 40% 30% at 30% 100%, rgba(196, 92, 62, 0.06), transparent 60%);
}

.account-wrap {
  position: relative;
  z-index: 1;
}

.account-intro {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 40px;
}

.account-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--v2-coral);
  margin-bottom: 14px;
}
.account-eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--v2-coral);
  border-radius: 2px;
}

.account-intro h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--v2-ink);
}
.account-intro h1 em {
  font-style: italic;
  color: var(--v2-teal);
  font-weight: 500;
}

.account-lede {
  margin: 0 auto;
  max-width: 46ch;
  color: var(--v2-muted);
  font-size: 15px;
  line-height: 1.7;
}

.account-loading {
  max-width: 420px;
  margin: 0 auto 20px;
  text-align: center;
}

/* ── Logged-out — auth shell (split layout) ── */
.auth-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  max-width: 960px;
  margin: 0 auto;
  background: var(--v2-white);
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius);
  box-shadow: var(--v2-shadow);
  overflow: hidden;
}

.auth-side {
  position: relative;
  padding: clamp(32px, 4vw, 48px);
  color: var(--v2-white);
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,0.18), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(196, 92, 62, 0.34), transparent 55%),
    linear-gradient(155deg, var(--v2-teal) 0%, var(--v2-teal-dark) 55%, #364a3f 100%);
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.auth-side::before {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.14), transparent 65%);
  pointer-events: none;
}
.auth-side::after {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.auth-side-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  align-self: stretch;
  width: 100%;
  z-index: 1;
}

.auth-side-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--v2-white);
  margin-bottom: 6px;
  backdrop-filter: blur(4px);
}

.auth-side-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--v2-coral-soft);
  opacity: 0.9;
}

.auth-side h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--v2-white);
  margin: 0;
}

.auth-side p {
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  max-width: 34ch;
}

.auth-side-perks {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-side-perks li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}
.perk-check {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--v2-coral-soft);
  font-size: 12px;
  font-weight: 800;
}

/* Auth card (right side) */
.auth-card {
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: var(--v2-white);
}

.auth-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  background: var(--v2-sand-light);
  border: 1px solid var(--v2-line);
  border-radius: 999px;
  isolation: isolate;
}
.auth-switch-btn {
  position: relative;
  z-index: 2;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: var(--v2-muted);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.25s ease;
}
.auth-switch-btn.is-active { color: var(--v2-white); }
.auth-switch-thumb {
  position: absolute;
  top: 5px;
  left: 5px;
  width: calc(50% - 5px);
  height: calc(100% - 10px);
  background: var(--v2-teal);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(70, 96, 82, 0.25);
  transition: transform 0.3s cubic-bezier(.6,.2,.1,1);
  z-index: 1;
}
.auth-shell[data-mode="register"] .auth-switch-thumb {
  transform: translateX(100%);
}

.auth-body { position: relative; }

.auth-pane {
  display: none;
  animation: paneFade 0.35s ease;
}
.auth-pane.is-active {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.auth-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--v2-ink);
  margin: 0 0 6px;
}
.auth-head p {
  margin: 0;
  color: var(--v2-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Forms — clean floating-style */
.account-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin: 0;
  max-width: none;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v2-ink);
  margin: 0;
  display: block;
}
.account-form input,
.account-form select,
.account-form textarea {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--v2-ink);
  background: var(--v2-sand-light);
  border: 1px solid var(--v2-line);
  border-radius: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.account-form input:focus,
.account-form select:focus,
.account-form textarea:focus {
  outline: none;
  border-color: var(--v2-teal);
  background: var(--v2-white);
  box-shadow: 0 0 0 4px rgba(70, 96, 82, 0.12);
}
.account-form input::placeholder { color: rgba(107, 98, 88, 0.55); }

.account-form .btn {
  margin-top: 8px;
  width: auto;
  align-self: flex-start;
}
.account-form .btn.btn-block { width: 100%; align-self: stretch; }

.form-subhead {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--v2-ink);
}

/* Recover / reset */
.auth-recover {
  border-top: 1px dashed var(--v2-line);
  padding-top: 16px;
  margin-top: 4px;
}
.auth-recover summary {
  list-style: none;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--v2-teal);
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.auth-recover summary::-webkit-details-marker { display: none; }
.auth-recover summary::after {
  content: '›';
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  color: var(--v2-teal);
  transition: transform 0.25s;
}
.auth-recover[open] summary::after { transform: rotate(90deg); }
.auth-recover-body {
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-reset {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px dashed var(--v2-line);
}

.auth-swap {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--v2-line);
  font-size: 13.5px;
  color: var(--v2-muted);
  text-align: center;
}
.auth-swap .linkish {
  border: 0;
  background: transparent;
  color: var(--v2-teal);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
.auth-swap .linkish:hover { color: var(--v2-teal-dark); }

.auth-footnote {
  font-size: 12.5px;
  color: var(--v2-muted);
  margin: 0;
  line-height: 1.55;
}

/* Outline button */
.btn-outline {
  background: transparent;
  color: var(--v2-teal) !important;
  border-color: var(--v2-teal);
}
.btn-outline:hover {
  background: var(--v2-teal-soft);
}

/* Buttons: overrides for size variants */
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 12.5px; }

/* ── Logged-in — dashboard layout ── */
.account-dashboard {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}

.account-sidebar {
  position: relative;
  padding: 28px 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(196, 92, 62, 0.24), transparent 55%),
    linear-gradient(160deg, var(--v2-teal) 0%, var(--v2-teal-dark) 100%);
  color: var(--v2-white);
  border-radius: var(--v2-radius);
  box-shadow: var(--v2-shadow);
  text-align: center;
  overflow: hidden;
}

.sidebar-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.35);
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--v2-white);
  backdrop-filter: blur(4px);
}

.sidebar-brand {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--v2-coral-soft);
  opacity: 0.85;
  margin: 0 0 6px;
}

.account-sidebar h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--v2-white);
  margin: 0 0 6px;
  word-break: break-word;
}

.sidebar-note {
  margin: 0 0 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.sidebar-actions .btn { justify-content: center; }
.account-sidebar .btn-outline {
  color: var(--v2-white) !important;
  border-color: rgba(255, 255, 255, 0.4);
  background: transparent;
}
.account-sidebar .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
}
.account-sidebar .btn-soft {
  background: rgba(255, 255, 255, 0.15);
  color: var(--v2-white) !important;
  border-color: transparent;
}
.account-sidebar .btn-soft:hover {
  background: rgba(255, 255, 255, 0.24);
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  text-align: left;
}
.sidebar-links a {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  padding: 6px 0;
  transition: color 0.2s;
}
.sidebar-links a:hover { color: var(--v2-coral-soft); }

.account-main {
  background: var(--v2-white);
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius);
  box-shadow: var(--v2-shadow-soft);
  padding: 28px;
  min-height: 400px;
}

.account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  background: var(--v2-sand-light);
  border: 1px solid var(--v2-line);
  border-radius: 999px;
  margin-bottom: 24px;
}
.account-tab {
  flex: 1;
  min-width: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: var(--v2-muted);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.account-tab:hover { color: var(--v2-teal); }
.account-tab.is-active {
  background: var(--v2-white);
  color: var(--v2-teal);
  box-shadow: 0 4px 12px rgba(70, 96, 82, 0.10);
}
.tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--v2-line);
  transition: background 0.2s, transform 0.2s;
}
.account-tab.is-active .tab-dot {
  background: var(--v2-coral);
  transform: scale(1.3);
}

.account-panel {
  display: none;
  animation: paneFade 0.35s ease;
}
.account-panel.is-active { display: block; }

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--v2-line);
}
.panel-head h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--v2-ink);
  margin: 0;
  line-height: 1.2;
}
.panel-head p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--v2-muted);
  width: 100%;
}

/* Profile info cards */
.profile-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}
.profile-item {
  padding: 16px 18px;
  background: var(--v2-sand-light);
  border: 1px solid var(--v2-line);
  border-radius: 16px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.profile-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--v2-shadow-soft);
  border-color: rgba(70, 96, 82, 0.18);
}
.profile-item .k {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--v2-muted);
  margin-bottom: 6px;
}
.profile-item .v {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--v2-ink);
  word-break: break-word;
  line-height: 1.4;
}
.profile-item .v.mono {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--v2-muted);
}
.profile-item .v.is-verified {
  color: var(--v2-teal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.profile-item .v.is-verified::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--v2-teal);
  box-shadow: 0 0 0 3px rgba(70, 96, 82, 0.15);
}
.profile-item .v.is-pending {
  color: var(--v2-coral);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.profile-item .v.is-pending::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--v2-coral);
  box-shadow: 0 0 0 3px rgba(196, 92, 62, 0.15);
}

/* Order list on account main */
.order-list { display: flex; flex-direction: column; gap: 12px; }
.account-main .order-row,
.account-page .order-row {
  background: var(--v2-sand-light);
  border: 1px solid var(--v2-line);
  border-radius: 16px;
  padding: 16px 18px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.account-main .order-row:hover,
.account-page .order-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--v2-shadow-soft);
  border-color: rgba(70, 96, 82, 0.18);
}

/* Verify notice */
#profileVerifyNotice:not(:empty) {
  margin: 0 0 20px;
  padding: 14px 18px;
  background: rgba(196, 92, 62, 0.08);
  border: 1px solid rgba(196, 92, 62, 0.24);
  border-radius: 14px;
  color: var(--v2-coral);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 380px;
  padding: 14px 18px;
  background: var(--v2-ink);
  color: var(--v2-white);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateY(8px);
  z-index: 100;
  border-left: 4px solid var(--v2-teal);
}
.toast.is-visible,
.toast.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.toast.success { border-left-color: var(--v2-teal); }
.toast.error { border-left-color: #d33; }
.toast.warning { border-left-color: var(--v2-coral); }

/* ── Responsive ── */
@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 520px; }
  .auth-side {
    padding: 26px 28px;
    min-height: 180px;
  }
  .auth-side::before { display: none; }
  .auth-side-inner { align-self: center; }
  .account-dashboard {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
  .account-sidebar { text-align: left; padding: 24px; }
  .sidebar-avatar { margin: 0 0 14px; }
  .sidebar-actions { flex-direction: row; flex-wrap: wrap; }
  .sidebar-actions .btn { flex: 1; min-width: 140px; }
  .sidebar-links { text-align: left; }
}

@media (max-width: 600px) {
  .account-page { padding: 40px 0 64px; }
  .account-intro { text-align: left; margin-bottom: 28px; }
  .account-intro h1 { font-size: 2rem; }
  .auth-card { padding: 26px 22px; gap: 20px; }
  .auth-switch-btn { padding: 10px 8px; font-size: 12.5px; }
  .account-main { padding: 22px 18px; }
  .account-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    justify-content: flex-start;
  }
  .account-tabs::-webkit-scrollbar { display: none; }
  .account-tab { flex: 0 0 auto; }
  .profile-cards { grid-template-columns: 1fr; }
  .panel-head { flex-direction: column; align-items: flex-start; }
  .toast { left: 16px; right: 16px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-pane,
  .account-panel,
  .auth-switch-thumb {
    animation: none;
    transition: none;
  }
}
