/* The order desk */
.acct.desk { background: var(--cream); background-image: none; }
.acct.desk::before, .acct.desk::after { display: none; }
/* ---------- The order desk's layout (includes/admin-nav.php): a slim bar, the menu down the left,
   the page on the right. On a phone the menu is one row to swipe along. ---------- */
.admin-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--space-2); height: 60px; padding: 0 var(--space-3); background: #fff; border-bottom: 1px solid var(--edge); }
.admin-bar .logo { flex: none; margin: 0; font-size: 1.3rem; }
.admin-bar-title { padding-left: var(--space-2); font-weight: 600; color: var(--ink-soft); border-left: 1px solid var(--edge); }
.desk-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 60px); background: #F6F4EF; }
.desk-side { position: sticky; top: 60px; align-self: start; display: flex; flex-direction: column; height: calc(100vh - 60px); overflow-y: auto; padding: var(--space-2) var(--space-2); background: #fff; border-right: 1px solid var(--edge); }
.desk-side ul { margin: 0 0 var(--space-1); padding: 0; list-style: none; }
.desk-side-group { margin: 0.5rem 0 0.2rem; padding: 0 0.75rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.desk-side a { display: flex; align-items: center; gap: 0.65rem; padding: 0.45rem 0.75rem; font-weight: 500; font-size: 0.97rem; color: var(--ink-soft); text-decoration: none; border-radius: 10px; }
.desk-side a:hover { color: var(--ink); background: var(--cream); }
.desk-side a[aria-current] { font-weight: 700; color: var(--ink); background: var(--tint-blue); }
.desk-side a span:first-of-type { flex: 1; min-width: 0; }
.desk-icon { flex: none; width: 20px; height: 20px; }
.desk-side-foot { margin-top: auto !important; padding-top: var(--space-2) !important; border-top: 1px solid var(--edge); }
.desk-main { min-width: 0; max-width: 1080px; padding: var(--space-4) var(--space-5) var(--space-6); }
.desk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.desk-head h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.3rem); overflow-wrap: anywhere; }
.desk-main .acct-card { box-shadow: none; }
.desk-live > summary { cursor: pointer; list-style: none; }
.desk-live > summary::-webkit-details-marker { display: none; }
.desk-live > summary h2 { display: inline; margin: 0; font-size: 1.3rem; }
.desk-live > summary::after { content: "Show"; float: right; font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); text-decoration: underline; }
.desk-live[open] > summary::after { content: "Hide"; }
.desk-live[open] > summary { display: block; margin-bottom: var(--space-2); }
.desk-count { display: inline-block; min-width: 1.4em; padding: 0 0.35em; font-size: 0.8rem; font-weight: 700; text-align: center; color: #fff; background: var(--accent); border-radius: 999px; }
@media (max-width: 860px) {
  .admin-bar { position: static; }
  .desk-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .desk-side { position: sticky; top: 0; z-index: 20; flex-direction: row; align-items: center; height: auto; padding: 0.5rem var(--gutter); overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--edge); scrollbar-width: none; }
  .desk-side::-webkit-scrollbar { display: none; }
  .desk-side-group { display: none; }
  .desk-side ul, .desk-side-foot { display: flex; flex: none; gap: 0.25rem; margin: 0 !important; padding: 0 !important; border: 0; }
  .desk-side a { white-space: nowrap; padding: 0.5rem 0.7rem; }
  .desk-main { padding: var(--space-3) var(--gutter) var(--space-5); }
}
.desk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--space-2); margin-bottom: var(--space-3); }
.desk-stat { padding: var(--space-3); color: var(--ink); text-decoration: none; background: #fff; border: 1px solid var(--edge); border-radius: 12px; }
.desk-stat strong { display: block; font-family: var(--display); font-size: 2.2rem; line-height: 1.1; }
.desk-stat.is-action { background: #FFF3D0; border-color: var(--c2); }
.desk-checklist { margin: var(--space-2) 0; padding: 0; list-style: none; }
.desk-checklist li { position: relative; padding: 0.55rem 0 0.55rem 2rem; border-bottom: 1px solid var(--edge); }
.desk-checklist li::before { content: ""; position: absolute; left: 0.1rem; top: 0.8rem; width: 1.1rem; height: 1.1rem; background: var(--sand); border: 1px solid var(--edge-strong); border-radius: 50%; }
.desk-checklist li.is-done::before { background: var(--c3); border-color: var(--c3); }
.desk-checklist li.is-bad::before { background: var(--c1); border-color: var(--c1); }
.desk-checklist span { display: block; font-size: 0.98rem; color: var(--ink-soft); }
.desk-step { margin: var(--space-2) 0; padding: var(--space-2); background: var(--tint-yellow); border: 1px solid var(--edge); border-radius: 12px; }
.desk-step h3 { margin: 0 0 0.25rem; }
.desk-more { margin: var(--space-2) 0; }
.desk-more summary { font-weight: 600; cursor: pointer; }
.order-pill.is-action { color: var(--ink); background: var(--c2); }

/* Privacy and Terms */
.legal h2 { margin-top: var(--space-4); font-size: 1.5rem; }
.legal li { margin-bottom: 0.5rem; }
.legal p, .legal ul { max-width: 46rem; }
.legal-updated { color: var(--ink-soft); }
.legal-todo { padding: 0 0.25rem; background: #FFE27A; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.legal-table th, .legal-table td { padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; border: 1px solid var(--edge); }
.legal-table th { background: var(--sand); }
@media (max-width: 640px) {
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; width: 100%; }
  .legal-table thead { display: none; }
  .legal-table tr { margin-bottom: 0.75rem; border: 1px solid var(--edge); }
  .legal-table td { border: 0; }
}

/* The space for Stripe's payment form on pay.php */
.pay-form { margin-top: var(--space-2); padding: var(--space-2); min-height: 20rem; background: #fff; border-radius: 12px; }
/* The thank-you page: the child's own cover, a happy headline, and room to make another */
.done-covers { display: flex; justify-content: center; gap: var(--space-2); margin: 0 0 var(--space-3); }
.done-covers:empty { display: none; }
.done-cover { width: min(46%, 190px); transform: rotate(var(--tilt, -3deg)); filter: drop-shadow(0 10px 18px rgba(30, 42, 68, 0.22)); animation: done-pop 0.6s cubic-bezier(.3, 1.5, .6, 1) both; }
.done-cover:only-child { width: min(62%, 230px); }
.done-cover .spine { display: none; }
.done-cover svg { display: block; width: 100%; height: auto; border-radius: 6px; }
@keyframes done-pop { from { opacity: 0; transform: translateY(18px) scale(0.9) rotate(0deg); } }
.calm .done-cover { animation: none; }
.done-title { text-align: center; font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.15; }
.done-lead { text-align: center; font-size: 1.1rem; }
.done-more { margin-top: var(--space-4); padding: var(--space-3); text-align: center; background: var(--cream); border-radius: 20px; }
.done-more h2 { margin: 0 0 0.4rem; font-size: 1.4rem; }
.done-more p { margin: 0 0 var(--space-2); }
/* The free printables and the order's own page (my-book.php) */
.done-free { margin: var(--space-3) 0 var(--space-2); padding: var(--space-3); text-align: center; background: var(--tint-yellow); border-radius: 20px; }
.done-free h2 { margin: 0 0 0.4rem; font-size: 1.4rem; }
.done-free p { margin: 0 auto var(--space-2); }
/* December: the printable Christmas card (christmas-card.php) */
.done-card { margin-top: var(--space-4); padding: var(--space-3); text-align: center; background: var(--tint-pink); border-radius: 20px; }
.done-card h2 { margin: 0 0 0.4rem; font-size: 1.4rem; }
.done-card p { margin: 0 auto var(--space-2); }

.pay-page h1 { margin-bottom: 0.4rem; }
.pay-page .checkout-steps { margin: 0 0 var(--space-2); font-size: 0.95rem; color: var(--ink-soft); }
.pay-page .checkout-steps strong { color: var(--ink); }
.pay-lead { margin: 0; font-size: 1.1rem; }
.pay-coupon { margin: 0.6rem 0 0; font-size: 0.98rem; }
.pay-coupon.is-on { color: #1E8A55; font-weight: 600; }
.pay-trust { display: grid; gap: 0.35rem; margin: var(--space-3) 0 0; padding: 0; list-style: none; font-size: 0.95rem; }
.pay-trust li { padding-left: 1.6rem; background: no-repeat 0 0.2em / 1.05em url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='%2334C27A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.pay-back { margin: var(--space-2) 0 0; font-size: 0.95rem; }
@media (max-width: 600px) {
  /* Stripe's form gets the whole width of a phone */
  .pay-page .wrap { padding-left: 10px; padding-right: 10px; }
  .pay-form { padding: 6px; border-radius: 12px; }
  .pay-page h1 { font-size: 1.9rem; }
}

/* ==========================================================================
   Log in, register, profile, order tracking and the order desk.
   ========================================================================== */

.acct {
  min-height: 60vh;
  padding: var(--space-5) 0 var(--space-6);
  background:
    radial-gradient(circle, rgba(255, 90, 95, 0.28) 2.5px, transparent 3px) 0 0 / 52px 52px,
    radial-gradient(circle, rgba(77, 168, 255, 0.28) 2.5px, transparent 3px) 26px 26px / 52px 52px,
    var(--sun);
}
.acct-narrow { max-width: 560px; }
.acct-wide { max-width: 980px; }

.acct-card {
  margin-bottom: var(--space-3);
  padding: var(--space-4);
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 20px;
  box-shadow: var(--sticker);
}
.acct-card h1, .acct-card h2 { margin-bottom: var(--space-2); }
.acct-card h2 { font-size: 1.6rem; }
.acct-card > p { max-width: none; }
.acct-card code { font-size: 0.95em; }

.acct-title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.acct-title h1 { margin: 0; overflow-wrap: anywhere; }
.acct-title form { flex: none; }

.acct-label { display: block; margin: var(--space-2) 0 0.4rem; font-weight: 700; }
.acct-field {
  display: block;
  width: 100%;
  padding: 0.7em 0.9em;
  color: var(--ink);
  font: inherit;
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 12px;
}
.acct-field::placeholder { color: #6E789F; }
.acct-help { margin: 0.4rem 0 0; font-size: 0.95rem; color: var(--ink-soft); }
.acct-submit { width: 100%; margin-top: var(--space-3); }
.acct-links { margin: var(--space-2) 0 0; }
.acct-links a { font-weight: 700; text-underline-offset: 3px; }

.acct-note {
  max-width: none;
  margin: 0 0 var(--space-2);
  padding: 0.7rem 1rem;
  font-weight: 700;
  border: 1px solid var(--edge);
  border-radius: 12px;
}
.acct-note.is-good { background: var(--tint-green); }
.acct-note.is-bad { background: var(--tint-pink); }

.acct-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-3); }
.acct-columns .acct-card { margin: 0; }

.acct-danger summary { cursor: pointer; font-weight: 600; font-size: 1.1rem; }
.acct-danger p { margin-top: var(--space-2); }
.acct-delete { background: var(--c1); color: var(--ink); }

/* ---------- Order lists ---------- */
.order-list { list-style: none; margin: 0; padding: 0; }
.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-top: 2px solid var(--tint-blue);
}
.order-row:first-child { border-top: 0; padding-top: 0; }
.order-row > div:first-child { display: grid; gap: 0.1rem; min-width: 0; }
.order-row > div:first-child span { font-size: 0.98rem; color: var(--ink-soft); }
.order-row strong { font-family: var(--display); font-size: 1.15rem; }
.order-row-end { flex: none; display: flex; align-items: center; gap: var(--space-2); }
.order-row .btn { background: var(--tint-yellow); color: var(--ink); }
.order-pill {
  padding: 0.15rem 0.7rem;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--tint-yellow);
  border: 1px solid var(--edge);
  border-radius: 999px;
}
.order-pill.is-printing { background: var(--tint-purple); }
.order-pill.is-test { background: var(--c2); }
.order-pill.is-posted { background: var(--tint-blue); }
.order-pill.is-delivered, .order-pill.is-ready { background: var(--tint-green); }
.order-pill.is-refunded { background: var(--tint-pink); }

/* ---------- Tracking ---------- */
.track-number { display: inline-block; margin: 0 0 var(--space-1); padding: 0.1rem 0.7rem; font-family: var(--body); font-weight: 700; background: var(--c2); border: 1px solid var(--edge); border-radius: 999px; }
.track-summary { color: var(--ink-soft); }
.track-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-1);
  margin: var(--space-4) 0;
  padding: 0;
}
.track-step { position: relative; display: grid; justify-items: center; gap: 0.3rem; text-align: center; }
.track-step::before {
  content: "";
  position: absolute;
  top: 26px;
  right: 50%;
  width: 100%;
  height: 6px;
  background: var(--tint-blue);
}
.track-step:first-child::before { display: none; }
.track-step.is-done::before { background: var(--c3); }
.track-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  font: 800 1.5rem/1 var(--display);
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 50%;
}
.track-step.is-done .track-dot { background: var(--c3); }
.track-step.is-now .track-dot { background: var(--c2); box-shadow: var(--sticker); }
.track-when { font-size: 0.92rem; color: var(--ink-soft); }
.track-post { padding: var(--space-2) var(--space-3); background: var(--tint-blue); border: 1px solid var(--edge); border-radius: 20px; }
.track-post p { margin: 0 0 0.4rem; max-width: none; }

/* ---------- Order desk ---------- */
.admin-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-3); }
.admin-facts p { margin-bottom: 0.5rem; overflow-wrap: anywhere; }
.admin-form { max-width: 480px; margin-top: var(--space-4); }
.admin-export { margin-top: var(--space-3); padding: var(--space-3); background: var(--tint-blue); border: 1px solid var(--edge); border-radius: 20px; }
.admin-export p { max-width: none; }
.admin-buttons { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.admin-plain { background: #fff; color: var(--ink); }
/* A short form on one line, for sending a code from a list */
.desk-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0; }
.desk-inline label { font-size: 0.92rem; color: var(--ink-soft); }
.desk-inline .acct-field { display: inline-block; width: 4.5em; padding: 0.35em 0.5em; }
.desk-code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; letter-spacing: 0.04em; }
.desk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-3); }

@media (max-width: 760px) {
  .desk-grid { grid-template-columns: minmax(0, 1fr); }
  .order-row-end { flex-wrap: wrap; }
  .acct { padding: var(--space-4) 0 var(--space-5); }
  .acct-card { padding: var(--space-3); box-shadow: var(--sticker); }
  .acct-columns { grid-template-columns: minmax(0, 1fr); }
  .admin-facts { grid-template-columns: minmax(0, 1fr); }
  .order-row { flex-direction: column; align-items: flex-start; }
  .track-steps { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .track-step { grid-template-columns: 50px minmax(0, 1fr); justify-items: start; align-items: center; text-align: left; column-gap: var(--space-2); }
  .track-step::before { display: none; }
  .track-dot { grid-row: span 2; width: 50px; height: 50px; }
  .track-when { grid-column: 2; }
}

/* ---------- Refined look ---------- */
.acct { background: var(--cream); }
.acct-card { border: 1px solid var(--edge); border-radius: 20px; box-shadow: var(--sticker); }
.acct-card h2 { font-weight: 500; }
.acct-card h3 { margin: 0 0 0.5rem; }
.acct-field { border: 1px solid var(--edge-strong); }
.acct-note { border: 0; font-weight: 500; }
.acct-danger summary { font-family: var(--body); font-weight: 600; font-size: 1rem; }
.acct-delete { color: #fff; background: #A63A24; }
form > .btn-small.acct-delete { margin-top: var(--space-3); }
.order-row { border-top: 1px solid var(--edge); }
.order-row strong { font-family: var(--body); font-weight: 600; font-size: 1.08rem; }
.order-row .btn { color: var(--ink); background: #fff; border: 1px solid var(--edge-strong); box-shadow: none; }
.order-pill { font-weight: 500; font-size: 0.86rem; border: 0; background: var(--sand); }
.order-pill.is-test { background: #FBE7B5; }
.track-number { font-family: var(--body); font-weight: 600; font-size: 0.92rem; letter-spacing: 0.02em; background: var(--sand); border: 0; }
.track-step::before { top: 21px; height: 2px; background: var(--edge); }
.track-step.is-done::before { background: var(--ink); }
.track-dot { width: 44px; height: 44px; font: 600 1rem/1 var(--body); color: var(--ink-soft); border: 1px solid var(--edge-strong); border-radius: 50%; }
.track-step.is-done .track-dot { color: #fff; background: var(--ink); border-color: var(--ink); }
.track-step.is-now .track-dot { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(217, 88, 59, 0.16); }
.track-step strong { font-weight: 600; }
.track-post { background: var(--cream); border: 1px solid var(--edge); }
.admin-export { background: var(--cream); border: 1px solid var(--edge); }
.admin-plain { border: 1px solid var(--edge-strong); box-shadow: none; }

/* ---------- Creative flair ---------- */
.acct {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220' fill='none' stroke='%23D94F33' stroke-opacity='.16' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M40 18 L46 33 L62 34 L50 44 L54 60 L40 51 L26 60 L30 44 L18 34 L34 33 Z'/%3E%3Cpath d='M170 120 C153 108 147 96 155 87 C161 81 169 84 170 91 C171 84 179 81 185 87 C193 96 187 108 170 120 Z'/%3E%3Ccircle cx='150' cy='36' r='12'/%3E%3Cpath d='M30 150 C45 138 62 162 80 148'/%3E%3C/svg%3E"),
    var(--blush);
}
.acct-card h1 { font-variation-settings: "opsz" 96, "SOFT" 100, "WONK" 1; }
.track-step.is-done .track-dot { background: var(--teal); border-color: var(--teal); }
.track-step.is-done::before { background: var(--teal); }
.track-step.is-now .track-dot { background: var(--coral); border-color: var(--coral); }
.track-number { background: var(--marigold); color: var(--ink); }
.order-pill.is-delivered { background: #CFEBD9; }
.order-pill.is-express { font-weight: 700; color: #fff; background: #C2410C; }
.desk-express { margin: 0 0 var(--space-2); padding: 0.75rem 1rem; color: #7C2D12; background: #FFEDD5; border: 2px solid #C2410C; border-radius: 12px; }
.mail-log { margin: var(--space-2) 0 0; padding: var(--space-2); list-style: none; font-size: 0.9rem; overflow-wrap: anywhere; background: #FBF7EF; border-radius: 10px; }
.mail-log li + li { margin-top: 0.3rem; }

/* Order desk: removing a Colouring Club member */
.club-actions { flex-wrap: wrap; align-items: flex-start; }
.club-remove summary { padding: 0.35rem 0.8rem; font-size: 0.9rem; font-weight: 600; cursor: pointer; color: #A63A24; border: 1px solid #E8C3BB; border-radius: 999px; list-style: none; }
.club-remove summary::-webkit-details-marker { display: none; }
.club-remove[open] summary { background: #FBEDEA; }
.club-remove-box { display: grid; gap: 0.5rem; margin-top: 0.5rem; padding: 0.75rem; max-width: 22rem; background: #fff; border: 1px solid var(--edge); border-radius: 12px; }
.club-remove-box .acct-help { margin: 0; font-size: 0.88rem; }
.club-remove-box .btn.club-remove-now { color: #fff; background: #A63A24; border-color: #A63A24; }