/* Gaya A "Ceria buku anak": the four logo colors, round corners, Baloo 2 headings, Nunito text.
   Fonts are served from /static (SIL OFL, see fonts-LICENSE.txt), so no request goes to a third party. */
@font-face { font-family: "Baloo 2"; src: url("/static/baloo2-latin.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/static/nunito-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  /* --blue and --red pass 4.5:1 as text on --bg/--surface and under white text (WCAG AA). */
  --red: #df2026; --yellow: #f5a623; --green: #2fa36b; --blue: #1e6bcf;
  --red-soft: #fde4e4; --yellow-soft: #fff0cc; --green-soft: #def5ea; --blue-soft: #e2eefc;
  --blue-dark: #1d5fb5; --blue-ink: #1d5fb5; --blue-hover: #1a5db5; --blue-tint: #f6faff;
  --red-ink: #b42328; --green-ink: #1d7a4e; --yellow-ink: #8a5a00; --grey-ink: #555b66; --grey-soft: #eceef1;
  --error: #c62f35; --red-tint: #fff5f5; --red-line: #f3c3c4;
  --ink: #24203a; --muted: #6b6680; --line: #f0e6d6; --ink-line: #3a3552; --on-fill: #ffffff;
  --night: #24203a; --night-strong: #ffffff;
  --bg: #fffaf2; --surface: #ffffff; --soft: #fff1d6;
  --hero-sun: #ffe2a8; --hero-sky: #d6ecff;
  --footer-text: #c9c6d8; --side-text: #e9e6f5; --side-muted: #a9a5bf; --side-danger: #ffb3b5;
  --radius: 20px; --radius-sm: 14px; --shadow: 0 6px 0 rgba(36, 32, 58, .08);
  --font-head: "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.6;
  color-scheme: light;
}

/* Dark theme: follows the device setting. Only token values change here; --night grounds and their text stay as they are. */
@media (prefers-color-scheme: dark) {
  :root {
    --red: #ff6b6f; --yellow: #ffb938; --green: #45c487; --blue: #6aa5f5;
    --red-soft: #3d2232; --yellow-soft: #3b3020; --green-soft: #1b3a30; --blue-soft: #1f2d4c;
    --blue-dark: #3a6fc0; --blue-ink: #a3c7ff; --blue-hover: #8ab9f8; --blue-tint: #1d2843;
    --red-ink: #ff9fa2; --green-ink: #7ddfae; --yellow-ink: #ffcf70; --grey-ink: #c9c6d8; --grey-soft: #2f2c42;
    --error: #ff8589; --red-tint: #331f2b; --red-line: #6b3540;
    --ink: #f3efe6; --muted: #aea9c4; --line: #3a3552; --on-fill: #141127;
    --night: #0e0c1b;
    --bg: #17142a; --surface: #221e38; --soft: #2b2645;
    --hero-sun: #3a2e1d; --hero-sky: #1b2944;
    --shadow: 0 6px 0 rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
  /* Trix draws dark icons on transparent buttons; give them a light ground. */
  trix-toolbar .trix-button-group { background: var(--ink); }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
/* Short pages: the footer stays at the bottom of the window instead of floating mid-screen. */
body:not(.admin) { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body:not(.admin) > main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -.3px; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.section { padding-top: 32px; padding-bottom: 56px; }
.muted { color: var(--muted); font-size: .92rem; }
.icon { width: 24px; height: 24px; flex: none; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 30; }

/* Header */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo { display: inline-flex; flex: none; }
.logo-img { display: block; height: 38px; width: auto; }
.main-nav { display: flex; gap: 22px; align-items: center; margin-left: auto; font-weight: 700; }
.main-nav a { color: var(--ink); text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--blue); }
.icon-links { display: flex; gap: 6px; align-items: center; }
.icon-link { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); }
.icon-link:hover { background: var(--soft); }
.menu { display: none; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
@media (max-width: 760px) {
  .main-nav { display: none; }
  .icon-links { margin-left: auto; }
  .menu { display: block; position: relative; }
  .menu[open] .menu-panel { display: flex; }
  .menu-panel { display: none; position: absolute; right: 0; top: 52px; flex-direction: column; min-width: 220px; background: var(--surface); border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(36, 32, 58, .15); padding: 8px; }
  .menu-panel a { padding: 12px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
  .menu-panel a:hover { background: var(--soft); }
  .logo-img { height: 32px; }
}

.promo { background: var(--yellow); color: var(--night); text-align: center; font-weight: 700; font-size: .92rem; padding: 8px 16px; }
.promo a { color: inherit; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--blue); color: var(--on-fill); padding: 12px 24px; border-radius: 999px; border: 2px solid var(--blue); box-shadow: 0 4px 0 var(--blue-dark); text-decoration: none; font: inherit; font-weight: 800; cursor: pointer; transition: transform .08s, box-shadow .08s; }
.button:hover { background: var(--blue-hover); }
.button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--blue-dark); }
.button.secondary { background: transparent; color: var(--blue); box-shadow: none; }
.button.secondary:hover { background: var(--blue-soft); }
.button.small { padding: 7px 14px; font-size: .9rem; box-shadow: 0 3px 0 var(--blue-dark); }
.button.secondary.small { box-shadow: none; }
.button.block { width: 100%; }
.link-button { background: none; border: 0; color: var(--red); cursor: pointer; font: inherit; font-weight: 700; text-decoration: underline; padding: 0; }

/* Badges (pills) */
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; letter-spacing: .02em; }
.badge.sale, .badge.red { background: var(--red-soft); color: var(--red-ink); }
.badge.preorder, .badge.blue { background: var(--blue-soft); color: var(--blue-ink); }
.badge.green { background: var(--green-soft); color: var(--green-ink); }
.badge.yellow { background: var(--yellow-soft); color: var(--yellow-ink); }
.badge.sold-out, .badge.grey { background: var(--grey-soft); color: var(--grey-ink); }

/* Notices and errors */
.notice { background: var(--blue-soft); color: var(--ink); padding: 12px 16px; border-radius: var(--radius-sm); }
.notice.warn { background: var(--red-soft); }
.notice ul { margin: 6px 0; }
.error { color: var(--error); font-size: .9rem; font-weight: 700; display: block; margin: 6px 0 0; }
p.error[role="alert"] { background: var(--red-soft); padding: 10px 14px; border-radius: var(--radius-sm); }

/* Forms */
input, textarea, select { font: inherit; color: var(--ink); padding: 11px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); max-width: 100%; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); outline: none; }
input[type="number"] { width: 5.5em; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.checkout-form label { display: block; margin-bottom: 16px; font-weight: 700; }
.checkout-form label > input, .checkout-form label > textarea, .checkout-form label > select { display: block; width: 100%; margin-top: 6px; font-weight: 400; }
.checkout-form .inline { margin-top: 6px; }
.checkout-form .inline input { width: 9em; }
.checkout-form label.check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.checkout-form p.hint { margin: -8px 0 14px; font-size: .82rem; }
.checkout-form label.check > input { display: inline-block; width: auto; margin: 0; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

/* Page title */
.page-title { padding: 40px 0 8px; }
.page-title h1 { margin: 0; }
.prose { max-width: 760px; padding-top: 16px; padding-bottom: 64px; }
.prose img { border-radius: var(--radius-sm); }

/* Home */
.hero { overflow: hidden; background: radial-gradient(circle at 88% 18%, var(--hero-sun) 0 130px, transparent 131px), radial-gradient(circle at 6% 92%, var(--hero-sky) 0 100px, transparent 101px); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); margin: 0; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; margin: 18px 0 28px; }
.kicker { font-weight: 800; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin: 0 0 12px; }
.hero-art { position: relative; }
.hero-art img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 6px solid var(--surface); box-shadow: 0 14px 0 var(--yellow); transform: rotate(2deg); }
.hero-art::before { content: ""; position: absolute; width: 72px; height: 72px; border-radius: 50%; background: var(--green); left: -18px; top: -18px; z-index: -1; }
@media (max-width: 860px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); padding-top: 32px; gap: 32px; }
  .hero-art { display: block; width: min(100%, 460px); margin: 0 auto 12px; }
}

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.sec-head h1, .sec-head h2 { margin: 0; }
.admin-main .sec-head { align-items: center; } /* a title next to a button, not a text link */
.sec-head a { font-weight: 800; text-decoration: none; }

.values { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: 24px; padding-bottom: 48px; }
.values article { border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.values article:nth-child(1) { background: var(--red-soft); } .values article:nth-child(2) { background: var(--yellow-soft); }
.values article:nth-child(3) { background: var(--green-soft); } .values article:nth-child(4) { background: var(--blue-soft); }
.values h3 { margin: 0 0 6px; font-size: 1.3rem; }
.values p { margin: 0; color: var(--muted); }
@media (max-width: 960px) { .values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .values { grid-template-columns: minmax(0, 1fr); } }
/* Full container width, so it lines up with the sections above: text beside the brand figure. */
.about { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px 56px; align-items: center; padding-bottom: 64px; }
.about-text h2 { margin-top: 0; }
.about-art { position: relative; isolation: isolate; margin: 0; justify-self: center; width: min(100%, 340px); }
.about-art img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: 0 12px 0 var(--green); transform: rotate(-3deg); }
.about-art::before, .about-art::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; }
.about-art::before { width: 90px; height: 90px; background: var(--yellow); right: -24px; top: -24px; }
.about-art::after { width: 56px; height: 56px; background: var(--red); left: -18px; bottom: 28px; }
@media (max-width: 860px) { .about { grid-template-columns: minmax(0, 1fr); } .about-art { width: min(70%, 260px); order: -1; } }

/* Category chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 24px; padding: 0; list-style: none; }
.chip { display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); color: var(--ink); font-weight: 700; font-size: .92rem; text-decoration: none; }
.chip:hover { border-color: var(--blue); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
/* Phones: one row that scrolls sideways, edge to edge, instead of several wrapped rows. */
@media (max-width: 640px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 16px; padding: 0 16px; gap: 6px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { padding: 6px 12px; font-size: .85rem; white-space: nowrap; }
}

/* Product cards */
.product-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
@media (max-width: 560px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.product-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; position: relative; display: flex; flex-direction: column; transition: transform .12s; }
.product-card:hover { transform: translateY(-3px); }
.product-card a { color: var(--ink); text-decoration: none; }
.product-card a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.product-card .img { position: relative; aspect-ratio: 1; background: var(--soft); }
.product-card img, .img-placeholder { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.img-placeholder { background: linear-gradient(135deg, var(--soft), var(--line)); }
.product-card .badges { position: absolute; top: 10px; left: 10px; }
.product-card .body { padding: 12px 16px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-card h3 { font-size: 1.15rem; margin: 0; }
.product-card .muted { font-size: .85rem; margin: 0; }
.product-card .rating { margin: 0; font-size: .9rem; font-weight: 700; } /* average of visible reviews */
.tab-rating { font-weight: 700; }
@media (max-width: 560px) { .product-card h3 { font-size: 1rem; } .product-card .body { padding: 10px 12px 14px; } }
.price { font-weight: 800; color: var(--red); margin: 0; font-size: 1.05rem; }
.price.big { font-size: 1.6rem; margin: 6px 0 12px; }
.short-desc { color: var(--muted); font-size: 1.05rem; margin: -4px 0 18px; max-width: 52ch; }

/* Product page */
.product { display: grid; gap: 40px; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: start; }
@media (max-width: 860px) {
  .product { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .gallery { width: min(100%, 560px); margin: 0 auto; }
}
.gallery { min-width: 0; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; border-radius: var(--radius); background: var(--soft); scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides img, .slides .img-placeholder { flex: 0 0 100%; width: 100%; aspect-ratio: 1; object-fit: cover; scroll-snap-align: start; scroll-margin-top: 90px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.thumbs a { flex: none; border-radius: 12px; border: 3px solid transparent; overflow: hidden; }
.thumbs a:hover, .thumbs a:focus-visible, .thumbs a[aria-current] { border-color: var(--blue); }
.thumbs img { width: 64px; height: 64px; object-fit: cover; }
.summary h1 { margin: 10px 0 0; }
.preorder-note { display: flex; gap: 10px; align-items: center; background: var(--soft); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 16px; }

/* Editions as chips that wrap, so 10+ variants still fit. The checked chip's price is shown
   on one line under the chips (absolutely placed in the room the fieldset keeps for it). No JavaScript. */
.variants { position: relative; border: 0; padding: 0 0 34px; margin: 0 0 12px; min-width: 0; }
.variants legend { font-weight: 800; padding: 0; margin-bottom: 8px; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { position: static; display: inline-flex; padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.option:hover { border-color: var(--blue); }
.option:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: var(--blue-tint); }
.option:has(input:focus-visible) { outline: 3px solid var(--yellow); outline-offset: 2px; }
.option.disabled { opacity: .5; cursor: not-allowed; border-style: dashed; }
.option.disabled .option-name { text-decoration: line-through; }
.option-name { font-weight: 800; font-size: .92rem; }
.option-price { display: none; }
.option:has(input:checked) .option-price { display: block; position: absolute; left: 0; bottom: 4px; font-weight: 800; color: var(--red); font-size: 1.1rem; }
.option-price s { color: var(--muted); font-weight: 400; font-size: .85rem; margin-left: 6px; }
.option-price em { display: none; }
.buy { display: flex; gap: 10px; align-items: center; }
.buy .button { flex: 1; }
.qty-label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
@media (max-width: 860px) {
  .has-buy-bar { padding-bottom: 88px; }
  .buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--surface); padding: 12px 16px; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(36, 32, 58, .08); }
  .qty-label span { position: absolute; left: -9999px; }
}
.product-meta { margin-top: 12px; }
/* Product page: breadcrumb, a buy box that stays in view on wide screens, then description and reviews. */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; padding-top: 20px; font-size: .88rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.product.section { padding-top: 16px; padding-bottom: 40px; }
@media (min-width: 861px) { .product .summary { position: sticky; top: 88px; } }
.product-more { padding-bottom: 24px; }
/* Tabs from radio buttons: the checked one shows its panel. Arrow keys move between them. */
.tabs { display: flex; flex-wrap: wrap; gap: 0 4px; }
.tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tabs > label { padding: 10px 16px; font-weight: 800; color: var(--muted); cursor: pointer; border-bottom: 4px solid transparent; }
.tabs > label:hover { color: var(--ink); }
.tabs > input:checked + label { color: var(--ink); border-color: var(--blue); }
.tabs > input:focus-visible + label { outline: 3px solid var(--yellow); outline-offset: -3px; border-radius: 10px 10px 0 0; }
.tab-panel { display: none; flex-basis: 100%; margin-top: 16px; }
#tab-deskripsi:checked ~ .description, #tab-ulasan:checked ~ .reviews { display: block; }
.description img { border-radius: var(--radius-sm); }
.description > :last-child { margin-bottom: 0; }
.description h2 + * { margin-top: 0; }
.rating-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 16px; }
.rating-summary .rating { display: grid; justify-items: center; margin: 0; }
.rating-summary .rating strong { font-size: 2.2rem; line-height: 1; }
.rating-summary .stars { font-size: 1rem; }
/* An average as stars: empty ones, with full ones on top cut at the average (4,4 = 88%). */
.stars-avg { position: relative; display: inline-block; color: var(--yellow); letter-spacing: 1px; white-space: nowrap; }
.stars-avg > span { position: absolute; inset: 0 auto 0 0; overflow: hidden; }
.star-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .82rem; }
.star-bars li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) 2em; gap: 8px; align-items: center; }
.star-bars .bar { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.star-bars .bar span { display: block; height: 100%; background: var(--yellow); }
.reviews .review { box-shadow: none; border: 2px solid var(--line); }

/* Reviews */
.stars { color: var(--yellow); letter-spacing: 1px; }
.rating { font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; margin: 0 0 8px; }
.review { background: var(--surface); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.review p { margin: 6px 0; white-space: pre-line; }
/* Order page: what happens next first, then the items; totals and address on the side. */
.order-top { padding-top: 32px; }
.order-top h1 { margin: 4px 0 4px; }
.order-top h1 .badges { display: inline-flex; vertical-align: middle; font-family: var(--font-body); }
.order-top p { margin: 0; }
.order-page { display: grid; gap: 18px 28px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.order-page > aside { grid-column: 2; grid-row: 1 / span 3; }
.order-page > :not(aside) { grid-column: 1; }
@media (max-width: 860px) { .order-page { grid-template-columns: minmax(0, 1fr); } .order-page > aside, .order-page > :not(aside) { grid-column: 1; grid-row: auto; } }
.order-page.section { padding-top: 20px; }
.order-state h2 { margin-top: 0; font-size: 1.35rem; }
.order-state .track { margin-bottom: 8px; }
.order-state .resi { margin-bottom: 0; }
.order-lines { list-style: none; padding: 0; margin: 0; }
.order-lines li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-lines li:last-child { border-bottom: 0; }
.order-lines img, .order-lines .img-placeholder { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.order-lines .info { display: grid; gap: 2px; }
.order-lines .info a { color: var(--ink); font-weight: 700; }
.order-lines .muted { font-size: .85rem; }
@media (max-width: 640px) { .order-lines li { grid-template-columns: 56px minmax(0, 1fr); } .order-lines b { grid-column: 2; } }
.order-page aside .card h2, .order-page aside .order-summary h2 { font-size: 1.2rem; }
.order-page address { line-height: 1.6; }
.review-form { margin-top: 16px; }
.review-form + .review-form { border-top: 2px dashed var(--line); padding-top: 16px; }
.review-form h3 { margin: 0 0 8px; font-size: 1.05rem; }
.star-input { border: 0; padding: 0; margin: 0 0 16px; }
.star-input legend { font-weight: 700; margin-bottom: 6px; }
.star-input label { display: inline-flex; gap: 4px; margin: 0 12px 6px 0; font-weight: 400; color: var(--yellow); }

/* Cart */
.cart-layout { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .cart-layout { grid-template-columns: minmax(0, 1fr); } }
.cart-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.cart-line { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 8px 16px; align-items: start; background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.cart-line img, .img-placeholder.thumb { width: 88px; height: 88px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-info a { color: var(--ink); text-decoration: none; }
.cart-info .muted { margin: 2px 0; }
.cart-total { font-weight: 800; text-align: right; }
.cart-qty { grid-column: 2 / 4; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cart-qty label { display: flex; gap: 8px; align-items: center; font-weight: 700; }

/* Checkout and order summary */
.checkout { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .checkout { grid-template-columns: minmax(0, 1fr); } }
.step { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px 6px; margin-bottom: 18px; }
.step h2 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; margin: 0 0 14px; }
.step h2 .n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: var(--on-fill); font-size: 1rem; }
.step:nth-of-type(2) h2 .n { background: var(--green); }
.step:nth-of-type(3) h2 .n { background: var(--red); }
.rates { display: grid; gap: 8px; margin-bottom: 16px; }
.rate { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer; font-weight: 400 !important; margin: 0 !important; }
.rate input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rate:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: var(--blue-tint); }
.rate:has(input:focus-visible) { outline: 3px solid var(--yellow); outline-offset: 2px; }
.rate b { white-space: nowrap; }
.checkout-form label.rate { display: flex; } /* beats .checkout-form label: price on the right */
.order-summary { background: var(--soft); border-radius: var(--radius); padding: 18px 20px; align-self: start; }
@media (min-width: 861px) { .checkout .order-summary, .cart-layout .order-summary { position: sticky; top: 88px; } }
.order-summary h2 { margin-top: 0; font-size: 1.35rem; }
.order-summary.plain { background: none; padding: 0; }
.order-summary ul, ul.order-summary { list-style: none; padding: 0; margin: 0 0 12px; }
.order-summary li, .row { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0; }
.row.total { font-weight: 800; font-size: 1.15rem; border-top: 2px dashed var(--line); padding-top: 10px; margin-top: 10px; }
.order-summary .button { margin-top: 12px; }

/* Order page: status track */
.track { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 16px 0 24px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.track li { border-top: 6px solid var(--line); padding-top: 6px; border-radius: 3px; }
.track li.on { border-color: var(--green); color: var(--ink); }
address { font-style: normal; }

/* Account */
.account-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
/* The base line is an inset shadow, so the tabs' underline can cover it without spilling out
   of the box (a negative margin there made the row scroll vertically). */
.account-nav { display: flex; gap: 22px; align-items: center; box-shadow: inset 0 -2px 0 var(--line); margin: 8px 0 24px; overflow-x: auto; overflow-y: hidden; }
.account-nav a { color: var(--muted); font-weight: 800; text-decoration: none; padding: 12px 0; border-bottom: 4px solid transparent; white-space: nowrap; }
.account-nav a[aria-current="page"] { color: var(--ink); border-color: var(--blue); }
.account-nav form { margin-left: auto; }
.account-orders .num a { font-weight: 800; }
.account-orders .total { font-weight: 800; white-space: nowrap; }
.account-orders .act { text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
  /* Each order becomes a card: number and total, date and items, then status and the action. */
  .account-orders tr { grid-template-areas: "num total" "items items" "status act"; gap: 6px 12px; align-items: center; }
  .account-orders .num { grid-area: num; }
  .account-orders .items { grid-area: items; color: var(--muted); font-size: .9rem; }
  .account-orders .total { grid-area: total; text-align: right; }
  .account-orders .status { grid-area: status; }
  .account-orders .act { grid-area: act; }
}
.auth-grid { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 800px) { .auth-grid { grid-template-columns: minmax(0, 1fr); } }
.narrow { max-width: 520px; }
.address-card { background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px; }
.address-card address { margin-bottom: 8px; }
.resend { margin-top: 28px; }
.resend summary { cursor: pointer; font-weight: 700; color: var(--blue); }
.resend form { margin-top: 10px; }

/* Tables */
.table-scroll { overflow-x: auto; }
table.orders { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; }
.orders th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.orders td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.orders td a { font-weight: 800; }
.orders tr:last-child td { border-bottom: 0; }
.orders .sub { display: block; color: var(--muted); font-size: .82rem; }
.order-list td:first-child { white-space: nowrap; } /* keep TAP-2026-000001 on one line */
.order-list .items { min-width: 180px; max-width: 320px; }
.order-list .items .item { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .orders thead { display: none; }
  .orders tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px; border-bottom: 1px solid var(--line); }
  .orders td { border: 0; padding: 0; }
  /* Order lists: number and total on top, buyer, products, then the pills. */
  .order-list tr { grid-template-areas: "num total" "buyer buyer" "items items" "status status"; gap: 4px 12px; }
  .order-list td:nth-child(1) { grid-area: num; white-space: nowrap; }
  .order-list td:nth-child(2) { grid-area: buyer; overflow-wrap: anywhere; }
  .order-list td:nth-child(2) .sub { display: inline; }
  .order-list td:nth-child(2) .sub:not(:empty)::before { content: " · "; }
  .order-list td:nth-child(3) { grid-area: items; min-width: 0; max-width: none; font-size: .9rem; }
  .order-list .items .item { white-space: normal; } /* wrap on phones, so the quantity shows */
  .order-list td:nth-child(4) { grid-area: total; font-weight: 800; text-align: right; }
  .order-list td:nth-child(5) { grid-area: status; }
  .order-list td[colspan] { grid-column: 1 / -1; }
}

/* Footer */
.site-footer { background: var(--night); color: var(--footer-text); padding: 44px 0 18px; margin-top: 24px; }
.site-footer a { color: var(--night-strong); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h2 { font-size: 1.1rem; color: var(--night-strong); margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.footer-brand { margin: 0 0 8px; }
.footer-brand .logo-img { height: 40px; }
.copyright { border-top: 1px solid var(--ink-line); margin-top: 28px; padding-top: 16px; font-size: .85rem; }

/* Admin */
.admin-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: var(--night); color: var(--side-text); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.admin-side .logo { margin: 0 8px 18px; }
.admin-side .logo-img { height: 32px; }
.admin a.nav { color: var(--side-text); text-decoration: none; font-weight: 700; padding: 10px 12px; border-radius: 12px; display: flex; justify-content: space-between; gap: 8px; }
.admin a.nav:hover { background: rgba(255, 255, 255, .08); }
.admin a.nav[aria-current="page"] { background: rgba(255, 255, 255, .14); }
.admin .who { margin-top: auto; font-size: .82rem; color: var(--side-muted); padding: 12px 8px 0; border-top: 1px solid var(--ink-line); }
.admin .who .link-button { color: var(--side-danger); }
.admin-main { padding: 28px 32px 56px; min-width: 0; }
.admin-top { display: none; }
.admin-menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--side-text); }
.admin-menu summary::-webkit-details-marker { display: none; }
.admin-menu[open] summary { background: rgba(255, 255, 255, .14); }
/* The drawer sits under the 60px bar so ☰ stays visible to close it; tapping the dimmed page also closes it,
   because the backdrop is part of <summary>. */
.admin-menu[open] summary::after { content: ""; position: fixed; inset: 60px 0 0; background: rgba(0, 0, 0, .45); cursor: default; }
.admin-menu-panel { position: fixed; top: 60px; bottom: 0; left: 0; width: min(280px, 85vw); overflow-y: auto; background: var(--night); padding: 12px; display: flex; flex-direction: column; gap: 2px; box-shadow: 12px 0 24px rgba(0, 0, 0, .25); animation: drawer-in .2s ease-out; }
@keyframes drawer-in { from { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .admin-menu-panel { animation: none; } }
.admin-main h1 { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 0; }
.admin-main > p:first-child { margin-top: 0; } /* the back link sits right under the top bar */
@media (max-width: 860px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .admin-side { display: none; }
  .admin-top { display: flex; align-items: center; gap: 8px; height: 60px; position: sticky; top: 0; z-index: 20; background: var(--night); padding: 0 16px 0 8px; }
  .admin-top .logo-img { height: 30px; }
  .admin-main { padding: 16px 16px 48px; }
}
.inline-form { display: inline; }
.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 24px; }
.stat { background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 16px 18px; color: var(--muted); text-decoration: none; font-weight: 600; border: 2px solid transparent; }
a.stat:hover { border-color: var(--blue); } /* only the cards that are links */
.stat strong { display: block; font-family: var(--font-head); font-size: 2.2rem; line-height: 1.1; color: var(--ink); }
.stat.warn { background: var(--red-tint); border-color: var(--red-line); }
.stat.warn strong { color: var(--error); }
@media (max-width: 640px) { .stat-grid { gap: 10px; } .stat { padding: 12px 14px; font-size: .9rem; } .stat strong { font-size: 1.6rem; } }
.filter { margin-bottom: 16px; }
/* Dashboard revenue chart: one bar per day, heights set by the server. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.revenue { margin-bottom: 28px; }
.revenue-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 8px 24px; }
.revenue-head h2 { margin: 0; font-size: 1.25rem; }
.revenue-head p { margin: 2px 0 0; }
.revenue-total { text-align: right; }
@media (max-width: 640px) { .revenue-total { text-align: left; } }
.revenue-total strong { display: block; font-family: var(--font-head); font-size: 1.8rem; line-height: 1.1; }
.chart { position: relative; margin-top: 18px; }
.chart-max { position: absolute; top: -4px; left: 0; font-size: .75rem; }
.bars { list-style: none; margin: 0; padding: 18px 0 0; height: 160px; display: flex; align-items: end; gap: 3px; border-bottom: 2px solid var(--line); background: linear-gradient(var(--line) 1px, transparent 1px) 0 18px / 100% 50%; }
.bars li { flex: 1; height: 100%; display: flex; align-items: end; }
.bar { display: block; width: 100%; background: var(--blue); border-radius: 4px 4px 0 0; }
.bars li:hover .bar { background: var(--blue-hover); }
.chart-axis { display: flex; justify-content: space-between; margin: 6px 0 0; font-size: .75rem; }
.pager { justify-content: center; margin-top: 20px; }
trix-editor { min-height: 14em; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; margin-bottom: 16px; }
.trix-button-group--file-tools { display: none !important; }
.admin trix-toolbar .trix-button-row { flex-wrap: wrap; gap: 6px 0; } /* fits phones without sideways scroll */
/* Admin products: list rows, and the edit page's info form, variant cards and images. */
.error-text { color: var(--error); font-weight: 700; }
.product-table .thumb { width: 72px; }
.product-table .thumb img, .product-table .img-placeholder { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.product-table .name a { color: var(--ink); }
.product-table .name .badges { margin-top: 6px; }
.product-table tr.is-archived { opacity: .6; }
@media (max-width: 640px) {
  /* Each product becomes a card: photo on the left, name, status, then the figures. */
  .product-table tr { grid-template-columns: 56px minmax(0, 1fr); gap: 2px 12px; }
  .product-table .thumb { grid-row: span 6; width: auto; }
  .product-table td:not(.thumb) { grid-column: 2; }
  .product-table td[data-label] { font-size: .88rem; }
  .product-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
  .product-table td[colspan] { grid-column: 1 / -1; }
}
/* Admin users: table on wide screens, cards on phones (like the product table). */
.user-table .name a { color: var(--ink); font-weight: 800; }
.user-table .email { overflow-wrap: anywhere; }
.user-table .act { text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
  .user-table tr { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .user-table td { grid-column: 1; }
  .user-table .act { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .user-table td[data-label] { font-size: .85rem; }
  .user-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
  .user-table td[colspan] { grid-column: 1 / -1; }
}
.saved-address { padding: 10px 0; border-bottom: 1px solid var(--line); }
.saved-address:last-child { border-bottom: 0; }
/* Admin settings: cards of fields; checkbox lists in columns. */
.settings-form { display: grid; gap: 18px; max-width: 860px; }
.settings-form h2 { font-size: 1.25rem; margin: 0 0 12px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.settings-grid .wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 16px; margin-bottom: 12px; }
.checkout-form .check-grid label.check { margin-bottom: 6px; font-weight: 600; }
.checkout-form label.short > input { max-width: 12em; }
.settings-save { position: sticky; bottom: 0; padding: 12px 0; background: var(--bg); margin: 0; }
.section-nav { margin-top: 8px; margin-bottom: 18px; } /* keep .chips side margins: on phones they bleed to the edge */
.product-form { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; margin-bottom: 36px; }
@media (max-width: 1000px) { .product-form { grid-template-columns: minmax(0, 1fr); } }
.product-form h2, .product-section h2 { font-size: 1.25rem; margin: 0 0 12px; }
.new-category input { flex: 1; min-width: 0; }
.product-section { margin-bottom: 36px; scroll-margin-top: 72px; }
#info { scroll-margin-top: 72px; }
.variant-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 400px) { .variant-cards { grid-template-columns: minmax(0, 1fr); } }
.variant-card { background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 10px; }
.variant-card.is-off { opacity: .7; }
.variant-card.is-new { box-shadow: none; border: 2px dashed var(--line); background: transparent; }
.variant-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.variant-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.variant-fields .wide { grid-column: 1 / -1; }
.checkout-form .variant-fields label { margin: 0; font-size: .85rem; }
.checkout-form .variant-fields label > input { margin-top: 4px; padding: 8px 10px; }
.variant-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.checkout-form .variant-foot label.check { margin: 0; }
.upload { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; margin-bottom: 16px; border: 2px dashed var(--line); box-shadow: none; }
.upload label { display: grid; gap: 6px; font-weight: 700; flex: 1 1 220px; min-width: 0; }
.upload input[type="file"] { width: 100%; min-width: 0; padding: 8px; }
.upload p { flex-basis: 100%; margin: 0; }
.image-card { position: relative; }
.image-card .cover { position: absolute; top: 16px; left: 16px; }
.image-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-bottom: 16px; }
.image-card { margin: 0; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 10px; }
.image-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.image-card label { margin-bottom: 8px; }
/* Admin order detail: actions and items on the left, buyer, shipping and history on the right. */
.order-head { display: grid; gap: 4px; }
/* The pills follow the last word of the title instead of taking a line of their own. */
.admin-main .order-head h1 { display: block; margin: 0; }
.order-head h1 .badges { display: inline-flex; vertical-align: middle; margin-left: 4px; font-family: var(--font-body); }
.order-head .muted { margin: 0; }
.order-detail { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.order-detail .stack > * { min-width: 0; } /* a wide table scrolls inside its card instead of pushing it wider */
/* A user's own orders: the buyer column would repeat their name on every row. */
.user-orders .order-list th:nth-child(2), .user-orders .order-list td:nth-child(2) { display: none; }
@media (max-width: 1000px) { .order-detail { grid-template-columns: minmax(0, 1fr); } }
.order-detail h2 { font-size: 1.25rem; margin: 0 0 12px; }
.order-detail h3 { font-size: 1rem; margin: 18px 0 8px; }
.actions { display: grid; gap: 14px; }
.actions form + form { border-top: 2px dashed var(--line); padding-top: 14px; }
.actions .checkout-form label, .actions p { margin-bottom: 10px; }
.note summary { cursor: pointer; color: var(--blue); font-weight: 700; font-size: .92rem; margin-bottom: 10px; }
.button.danger { background: transparent; color: var(--error); border-color: var(--error); box-shadow: none; }
.button.danger:hover { background: var(--red-soft); }
.order-items { list-style: none; padding: 0; margin: 0 0 8px; }
.order-items li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-items .sub, .timeline .sub { display: block; color: var(--muted); font-size: .82rem; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.facts dt { color: var(--muted); font-size: .85rem; font-weight: 700; padding-top: 2px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; padding: 0 0 0 18px; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 12px 4px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); border: 2px solid var(--surface); }
.timeline li.muted::before { background: var(--line); }
.timeline .note-text { display: block; margin-top: 2px; white-space: pre-line; }
.admin-review.is-hidden { opacity: .6; }
/* Admin reviews: one card per review; the hide/show button top right, below the text on phones. */
.review-list { display: grid; gap: 12px; }
.admin-review { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: start; }
.admin-review > * { grid-column: 1 / -1; }
.admin-review .meta { grid-column: 1; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.admin-review form { grid-column: 2; grid-row: 1; }
.admin-review .body { margin: 8px 0 4px; white-space: pre-line; }
.admin-review .email { margin: 0; font-size: .82rem; }
.chip .count { opacity: .7; font-weight: 600; margin-left: 2px; }
.review-filter select { min-width: 0; }
@media (max-width: 640px) { .admin-review form { grid-column: 1 / -1; grid-row: auto; margin-top: 10px; } .review-filter select, .review-filter input[type="search"] { flex: 1 1 100%; } }
.admin-list { list-style: none; padding: 0; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.admin-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.admin-list li:last-child { border-bottom: 0; }
.stack { display: grid; gap: 18px; align-content: start; }
/* Current tab, from the page's "here" block on <body data-here>. */
[data-here="orders"] .account-nav a[data-nav="orders"],
[data-here="addresses"] .account-nav a[data-nav="addresses"],
[data-here="profile"] .account-nav a[data-nav="profile"] { color: var(--ink); border-color: var(--blue); }
[data-here="dashboard"] a.nav[data-nav="dashboard"], [data-here="orders"] a.nav[data-nav="orders"],
[data-here="products"] a.nav[data-nav="products"], [data-here="pages"] a.nav[data-nav="pages"],
[data-here="reviews"] a.nav[data-nav="reviews"], [data-here="users"] a.nav[data-nav="users"], [data-here="settings"] a.nav[data-nav="settings"] { background: rgba(255, 255, 255, .14); }

/* Manual bank transfer on the order page */
.bank-accounts { white-space: pre-line; font-weight: 600; padding: .75rem 1rem; border-radius: var(--radius-sm); background: var(--soft); }
.proof-form { margin-top: 1rem; }
.proof-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; }
.proof-thumbs img { width: 120px; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.proof-modal { padding: 12px; border: 0; border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); max-width: min(92vw, 720px); }
.proof-modal::backdrop { background: rgba(10, 8, 20, .7); }
.proof-modal img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 8px; }
.proof-modal p { margin: 8px 0 0; text-align: center; }
.proof-modal form { position: absolute; top: 4px; right: 4px; margin: 0; }
.proof-modal .close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25); }

/* Konfigurasi: services grouped by courier */
.courier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.courier-services { border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 8px 14px 12px; margin: 0; }
.courier-services legend { font-weight: 700; padding: 0 6px; }
.courier-services .check { display: flex; align-items: center; gap: 8px; margin: 6px 0; }

/* Checkout: rates grouped by courier */
.rate-group h3 { font-size: .95rem; margin: 12px 0 6px; }
.rate-group:first-of-type h3 { margin-top: 4px; }
.rate-group .rates { margin-bottom: 4px; }

/* Checkout: the courier dropdown. Closed: the choice; open: the list by courier. */
.rate-picker { margin-bottom: 16px; }
.rate-picker > summary { list-style: none; padding-right: 40px; }
.rate-picker > summary::-webkit-details-marker { display: none; }
.rate-picker > summary::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.rate-picker[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.rate-picker > summary:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.rate-picker[open] > summary { border-color: var(--blue); }
.rate-list { max-height: min(60vh, 520px); overflow-y: auto; margin-top: 8px; padding: 4px 8px; border: 2px solid var(--line); border-radius: var(--radius-sm); }
.rates-cache { padding: 12px 14px; margin-bottom: 16px; border-radius: var(--radius-sm); background: var(--soft); }
.rates-cache p { margin: 0 0 8px; }
.more-reviews { text-align: center; margin: 16px 0 0; }
.more-reviews a[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* "Masuk dengan Google": white, as Google asks for its sign-in button, in both themes. */
.google-button { background: #fff; color: #1f1f1f; border-color: #dadce0; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.google-button:hover { background: #f8f9fa; }
.google-signin { display: grid; justify-items: center; gap: 8px; text-align: center; max-width: 520px; margin: 0 auto; }
.google-signin p { margin: 0; }
.or { display: flex; align-items: center; gap: 12px; max-width: 520px; margin: 18px auto; color: var(--muted); font-size: .9rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* Login / sign-up, lost and new password: one centered card; Masuk/Daftar are tabs (radio buttons, no JS). */
.auth-page { display: grid; grid-template-columns: minmax(0, 460px); justify-content: center; }
.auth-card { padding: 24px; }
.auth-card h1 { font-size: 1.6rem; margin: 0 0 8px; }
.auth-tabs > label { flex: 1; text-align: center; }
.auth-tabs .tab-panel { margin-top: 0; }
#tab-masuk:checked ~ .login-form, #tab-daftar:checked ~ .register-form { display: block; }
.auth-google { flex-basis: 100%; display: grid; justify-items: stretch; margin-top: 18px; }
.auth-google .google-button { width: 100%; }
.auth-google .or { margin: 16px 0; max-width: none; }
.auth-tabs form.tab-panel { margin-top: 18px; }
.auth-google + form.tab-panel, .auth-google ~ form.tab-panel { margin-top: 0; }
.auth-links { margin: 12px 0 0; text-align: center; }
.auth-card .resend { margin-top: 16px; font-size: .92rem; }
.password-field { position: relative; display: block; margin-top: 6px; }
.checkout-form .password-field > input { display: block; width: 100%; margin-top: 0; padding-right: 48px; }
.show-password { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.show-password:hover { color: var(--ink); background: var(--soft); }
.show-password:focus-visible { outline: 3px solid var(--yellow); }
