/* =========================================================================
   Paintlin's — account / activate / pricing pages (commerce skeleton).
   Page-specific add-on to styles.css. Plain CSS, no build step.
   ========================================================================= */

.auth-main { padding-bottom: clamp(48px, 8vw, 96px); }

/* ---------- card ---------- */
.auth-card {
  max-width: 460px; margin-inline: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: clamp(26px, 4vw, 40px);
}
.auth-card h2 { font-size: 1.5rem; }
.auth-card .muted { color: var(--ink-soft); font-size: .95rem; }
.auth-card .muted-center { text-align: center; }

/* ---------- fields ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-family: var(--font-display); font-weight: 600; font-size: .95rem; }
.field input {
  font-family: var(--font-body); font-size: 1.02rem; padding: .8em 1em; width: 100%;
  border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink);
}
.field input:focus-visible { outline: none; border-color: var(--coral-deep); box-shadow: 0 0 0 4px rgba(200,68,59,.15); }
.field-hint { font-size: .82rem; color: var(--ink-soft); }
.field-opt { font-weight: 400; color: var(--ink-soft); font-size: .85em; }
.field textarea {
  font-family: var(--font-body); font-size: 1.02rem; padding: .8em 1em; width: 100%;
  border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink);
  resize: vertical; min-height: 80px;
}
.field textarea:focus-visible { outline: none; border-color: var(--coral-deep); box-shadow: 0 0 0 4px rgba(200,68,59,.15); }
.code-input { text-transform: uppercase; letter-spacing: .12em; font-family: var(--font-display); font-weight: 600; }
/* address grouping: city / state / zip on one row, wrapping on narrow screens */
.field-row { display: flex; flex-wrap: wrap; gap: 0 14px; }
.field-row .field { flex: 1 1 100%; }
.field-row .field:first-child { flex: 2 1 150px; }  /* city gets the room */
.field-row .field-sm { flex: 1 1 90px; }            /* state + zip stay compact */
.auth-card .btn { width: 100%; margin-top: 4px; }

/* ---------- notice banners ---------- */
.notice { border-radius: 14px; padding: 14px 16px; margin: 0 0 18px; font-size: .96rem; border: 1px solid transparent; }
.notice[hidden] { display: none; }
.notice--info { background: #EAF5FB; border-color: #cfe7f4; color: #1c5168; }
.notice--ok   { background: #e9f7ee; border-color: #c7ebd5; color: #1f7a3d; }
.notice--err  { background: #fdecea; border-color: #f6cfca; color: var(--coral-deep); }
.notice a { color: inherit; font-weight: 600; }

/* ---------- credit balance ---------- */
.balance { text-align: center; padding: 6px 0 2px; }
.balance-num { font-family: var(--font-display); font-weight: 700; font-size: 3.4rem; line-height: 1; color: var(--coral-deep); }
.balance-label { color: var(--ink-soft); margin-top: 4px; }
.balance-email { font-family: var(--font-display); font-weight: 600; margin-top: 12px; }
.token-note { word-break: break-all; background: var(--paper-2); border-radius: 12px; padding: 10px 12px; font-size: .82rem; color: var(--ink-soft); margin-top: 14px; }
.token-note code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
.auth-actions { display: grid; gap: 10px; margin-top: 18px; }
[hidden] { display: none !important; }

/* ---------- pricing packs ---------- */
.pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 10px; }
.pack {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 30px 24px; text-align: center; position: relative;
  display: flex; flex-direction: column;
}
.pack--featured { border-color: var(--coral); box-shadow: 0 16px 36px rgba(200,68,59,.16); }
/* Big is held back during beta — shown as a coming-at-launch teaser */
.pack--soon { border-style: dashed; background: var(--paper-2); box-shadow: none; }
.pack-badge--soon { background: var(--grape-deep); }
.pack-price--soon { font-size: 1.5rem; color: var(--ink-soft); }
.pack-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--coral-deep); color: #fff; font-family: var(--font-display); font-weight: 600;
  font-size: .78rem; padding: .3em 1em; border-radius: 999px; white-space: nowrap;
}
.pack-name { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.pack-credits { color: var(--ink-soft); margin-top: 4px; }
.pack-price { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; margin: 14px 0 2px; }
.pack-price .cur { font-size: 1.2rem; vertical-align: super; margin-right: 1px; }
.pack-sub { color: var(--ink-soft); font-size: .88rem; min-height: 1.2em; flex: 1; }
.pack .btn { width: 100%; margin-top: 18px; }

/* size-based volume tiers (pricing.html) */
.pack-size { color: var(--ink-soft); margin-top: 4px; font-size: .9rem; }
.pack-each { font-weight: 500; font-size: .9rem; color: var(--ink-soft); }
.pack-tiers { list-style: none; margin: 14px 0 16px; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 9px; text-align: left; }
.pack-tiers li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .92rem; }
.pack-tiers li > span:first-child { color: var(--ink-soft); }
.pack-tiers strong { font-family: var(--font-display); font-weight: 600; }
.pack-save { font-style: normal; font-size: .72rem; font-weight: 600; color: var(--coral-deep); background: rgba(255,111,97,.14); padding: .12em .5em; border-radius: 999px; margin-left: 6px; white-space: nowrap; }

.price-disclaimer { text-align: center; color: var(--ink-soft); font-size: .9rem; margin-top: 22px; }

@media (max-width: 760px) {
  .pack-grid { grid-template-columns: 1fr; max-width: 380px; margin-inline: auto; }
}

/* =========================================================================
   Signed-in dashboard: the Paintlin's studio (live projects list).
   Projects come from /api/orders/mine via account.js.
   ========================================================================= */
.dash { padding-bottom: clamp(48px, 8vw, 100px); }
.dash > .container { max-width: 900px; }

/* ---- header ---- */
.dash-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 20px; padding: clamp(28px, 5vw, 56px) 0 clamp(18px, 3vw, 28px);
}
.dash-hello .eyebrow { justify-content: flex-start; }
.dash-hello h1 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); margin: 12px 0 0; }
.dash-wave { display: inline-block; margin-left: .15em; }
.dash-email { color: var(--ink-soft); margin-top: 8px; font-size: .98rem; }
.dash-aside { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.credits-chip {
  display: inline-flex; align-items: baseline; gap: .4em;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow-sm); padding: .5em 1.1em;
}
.credits-num { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; line-height: 1; color: var(--coral-deep); }
.credits-word { font-family: var(--font-display); font-weight: 600; color: var(--ink-soft); font-size: .95rem; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.dash-actions .btn { width: auto; margin-top: 0; }

/* ---- sections ---- */
.dash-section { margin-top: clamp(30px, 5vw, 52px); }
.dash-section-head { margin-bottom: 20px; }
.dash-section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.dash-section-head .muted { color: var(--ink-soft); margin-top: 6px; }
.dash-fineprint { color: var(--ink-soft); font-size: .9rem; margin-top: 18px; text-align: center; }

/* ---- project cards (Level 1: a simple, tappable summary that opens project.html) ---- */
.project-list { display: grid; gap: 14px; }
.project-empty { text-align: center; padding: 24px 0; display: grid; gap: 14px; justify-items: center; }
.project-card {
  display: grid; grid-template-columns: 76px 1fr auto; align-items: center;
  gap: clamp(14px, 2.5vw, 22px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: clamp(14px, 2.2vw, 20px);
  text-decoration: none; color: inherit;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--coral); }
.project-card:focus-visible { outline: none; border-color: var(--coral-deep); box-shadow: 0 0 0 4px rgba(200,68,59,.15); }
.project-card.is-ready { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255,111,97,.18), var(--shadow-sm); }
.project-thumb {
  width: 76px; height: 76px; border-radius: 16px; overflow: hidden;
  background: var(--paper-2); display: grid; place-items: center;
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-thumb-ph { font-size: 1.9rem; }
.project-body { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.project-name { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; flex: 1 1 auto; min-width: 0; }
.project-badge {
  font-family: var(--font-display); font-weight: 600; font-size: .8rem; white-space: nowrap;
  padding: .35em .9em; border-radius: 999px; background: var(--paper-2); color: var(--ink);
}
.project-badge.is-action { background: var(--coral-deep); color: #fff; }
.project-badge.is-done { background: var(--leaf); color: #11371a; }
.project-turn { font-family: var(--font-display); font-weight: 600; color: var(--coral-deep); font-size: .9rem; flex-basis: 100%; margin: 0; }
.project-go { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1; color: var(--ink-soft); }
.project-card:hover .project-go { color: var(--coral-deep); }

/* the Domino's-style step tracker */
.tracker { list-style: none; display: flex; margin: 20px 0 0; padding: 0; }
.tracker-step { flex: 1 1 0; min-width: 0; text-align: center; position: relative; }
.tracker-step::before {
  content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 3px;
  background: var(--line); z-index: 0;
}
.tracker-step:first-child::before { display: none; }
.tracker-step.is-done::before, .tracker-step.is-current::before { background: var(--coral); }
.tracker-node {
  position: relative; z-index: 1; display: block; width: 22px; height: 22px; box-sizing: border-box;
  margin: 0 auto 8px; border-radius: 999px; background: #fff; border: 3px solid var(--line);
  background-repeat: no-repeat; background-position: center; background-size: 12px;
}
.tracker-step.is-done .tracker-node {
  background-color: var(--coral-deep); border-color: var(--coral-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4 10-11'/%3E%3C/svg%3E");
}
.tracker-step.is-current .tracker-node {
  background-color: var(--coral); border-color: var(--coral);
  animation: trackerPulse 1.8s ease-out infinite;
}
@keyframes trackerPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,111,97,.5); }
  70%  { box-shadow: 0 0 0 9px rgba(255,111,97,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,111,97,0); }
}
.tracker-label {
  display: block; font-size: clamp(.62rem, 1.5vw, .76rem); line-height: 1.18;
  color: var(--ink-soft); padding: 0 3px;
}
.tracker-step.is-done .tracker-label, .tracker-step.is-current .tracker-label { color: var(--ink); }
.tracker-step.is-current .tracker-label { font-weight: 600; }

.project-status { color: var(--ink-soft); margin: 16px 0 0; font-size: .98rem; }
.project-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 16px; }
.project-actions .btn { width: auto; margin-top: 0; }
.btn.is-disabled { opacity: .5; cursor: default; pointer-events: none; }

@media (max-width: 560px) {
  .dash-head { align-items: flex-start; }
  .dash-aside { align-items: flex-start; }
  .dash-actions { justify-content: flex-start; }
  .project-thumb { width: 60px; height: 60px; border-radius: 14px; }
  .project-thumb-ph { font-size: 1.5rem; }
}
