/* yoursite.com/admin (D78): the shell around the parts' screens. Loaded after the app's own stylesheet (copied to
   /_g/admin/app.css), so the screens look as they do in Ginta; this file only lays out the admin itself. Mobile first. */
body.ga { margin: 0; min-height: 100dvh; background: var(--color-bg); color: var(--color-ink); }
.ga a { color: inherit; }

/* signing in */
.ga-auth { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 1.25rem; padding: 2rem 1rem; }
.ga-auth-card { width: min(26rem, 100%); background: var(--paper, #fff); border: 1px solid var(--color-line); border-radius: 1.25rem; padding: 1.75rem 1.5rem 1.5rem; box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 18px 40px -28px rgb(0 0 0 / .25); }
@media (min-width: 640px) { .ga-auth-card { padding: 2.25rem 2.25rem 1.75rem; } }
.ga-eyebrow { margin: 0 0 .75rem; font-size: .8125rem; color: var(--color-muted); overflow-wrap: anywhere; }
.ga-h1 { margin: 0; font-size: 1.5rem; line-height: 1.2; letter-spacing: -.02em; font-weight: 650; text-wrap: balance; overflow-wrap: anywhere; }
.ga-lead { margin: .625rem 0 1.25rem; color: var(--color-ink-2, var(--color-muted)); font-size: .9688rem; text-wrap: pretty; }
.ga-form { display: grid; gap: .875rem; }
.ga-wide { width: 100%; justify-content: center; min-height: 2.75rem; }
.ga-code { font-size: 1.375rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.ga-alt { margin: 1rem 0 0; text-align: center; font-size: .875rem; color: var(--color-muted); }
.ga-small { margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid var(--color-line); font-size: .8125rem; color: var(--color-muted); text-wrap: pretty; }
.ga-foot { margin: 0; text-align: center; font-size: .75rem; color: var(--color-faint, var(--color-muted)); }
.ga-foot a { text-decoration: none; }
.ga-foot a:hover { text-decoration: underline; }

/* the signed-in admin */
.ga-top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--color-bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-line); }
.ga-top-in { display: flex; align-items: center; justify-content: space-between; gap: .75rem; max-width: 72rem; margin: 0 auto; padding: .75rem 1rem .5rem; }
.ga-brand { min-width: 0; display: grid; line-height: 1.2; }
.ga-brand b { font-size: 1.0625rem; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-brand span { font-size: .75rem; color: var(--color-muted); }
.ga-top-actions { display: flex; align-items: center; gap: .375rem; flex: none; }
.ga-tabs { max-width: 72rem; margin: 0 auto; padding: 0 1rem; border-bottom: 0; scrollbar-width: none; }
.ga-tabs::-webkit-scrollbar { display: none; }
.ga-tabs [role="tab"] { padding: .625rem .75rem .6875rem; font-size: .9375rem; }
/* D284: a fade at the edge where more tabs are cut off (admin.js sets data-more), and on a wide screen the tabs wrap
   to a second row instead of hiding "Search & sharing" or "Payments". */
.ga-tabs[data-more~="end"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent); }
.ga-tabs[data-more~="start"] { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 2.5rem), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 2.5rem), transparent); }
.ga-tabs[data-more~="start"][data-more~="end"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent); mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent); }
@media (min-width: 1024px) { .ga-tabs { flex-wrap: wrap; overflow-x: visible; } .ga-tabs[data-more] { -webkit-mask-image: none; mask-image: none; } }
@media (max-width: 639px) { .ga-tabs [role="tab"] { min-height: 2.75rem; } }
.ga-me { position: relative; }
.ga-me > summary { list-style: none; cursor: pointer; }
.ga-me > summary::-webkit-details-marker { display: none; }
.ga-me-pop { position: absolute; right: 0; top: calc(100% + .375rem); width: max-content; max-width: min(18rem, calc(100vw - 2rem)); padding: .875rem; background: var(--paper, #fff); border: 1px solid var(--color-line); border-radius: .875rem; box-shadow: 0 18px 40px -20px rgb(0 0 0 / .3); display: grid; gap: .625rem; }
.ga-me-pop p { margin: 0; font-size: .8125rem; color: var(--color-muted); overflow-wrap: anywhere; }
.ga-main { max-width: 72rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
@media (min-width: 768px) { .ga-top-in { padding: .875rem 1.5rem .5rem; } .ga-tabs { padding: 0 1.5rem; } .ga-main { padding: 1.75rem 1.5rem 4rem; } }
.ga-note { margin: 2.5rem 0 .75rem; font-size: .8125rem; color: var(--color-muted); text-align: center; }
/* The parts' screens: rows in grids and flex lines shrink to the screen (long names are cut with "…", never pushed off). */
.ga-main .grid > *, .ga-main .flex > .min-w-0 { min-width: 0; }

/* Messages */
.ga-empty { padding: 1.25rem; color: var(--color-muted); }
.ga-empty p { margin: 0; }
.ga-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; max-width: 46rem; }
.ga-msg { padding: 1rem 1.125rem; }
.ga-msg-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.ga-msg-when { font-size: .8125rem; color: var(--color-muted); }
.ga-msg-btns { display: flex; gap: .375rem; }
.ga-msg dl { margin: 0; display: grid; gap: .375rem; }
.ga-msg dl div { display: grid; gap: .125rem; }
@media (min-width: 640px) { .ga-msg dl div { grid-template-columns: 9rem minmax(0, 1fr); gap: .75rem; } }
.ga-msg dt { font-size: .8125rem; color: var(--color-muted); overflow-wrap: anywhere; }
.ga-msg dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* photo picker */
.ga-photo { display: flex; align-items: center; gap: .75rem; }
.ga-thumb { flex: none; width: 4rem; height: 4rem; display: grid; place-items: center; overflow: hidden; border-radius: .75rem; border: 1px solid var(--color-line); background: var(--color-surface); font-size: .75rem; color: var(--color-muted); }
.ga-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ga-photo-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.ga-photo-btns label { cursor: pointer; }

body > .toast { position: fixed; max-width: calc(100vw - 2rem); white-space: normal; text-align: center; }

/* D230: Payments (this website's own Stripe) */
.ga-pay { max-width: 36rem; padding: 1.25rem 1.25rem 1.375rem; display: grid; gap: .75rem; }
.ga-pay > * { margin: 0; }
.ga-pay .ga-eyebrow { margin: 0; }
.ga-pay-status { display: flex; align-items: center; gap: .5rem; font-size: 1.0625rem; overflow-wrap: anywhere; }
.ga-dot { flex: none; width: .625rem; height: .625rem; border-radius: 999px; background: var(--color-line); box-shadow: 0 0 0 3px rgb(0 0 0 / .05); }
.ga-dot.is-on { background: var(--color-ok); box-shadow: 0 0 0 3px rgb(29 122 76 / .15); }
.ga-dot.is-wait { background: #c98a14; box-shadow: 0 0 0 3px rgb(201 138 20 / .15); }
.ga-pay-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.ga-pay-ask { display: grid; gap: .5rem; padding: 1rem; border: 1px solid var(--color-line); border-radius: .875rem; background: var(--color-surface); }
.ga-pay-ask > p { margin: 0; overflow-wrap: anywhere; }
.ga-pay-test { font-size: .8125rem; color: var(--color-muted); }
/* D284: the owner's Stripe takes the payments; this website's own one is a second, quieter line. */
.ga-pay-own { padding-top: .75rem; border-top: 1px solid var(--color-line); font-size: .9375rem; color: var(--color-muted); overflow-wrap: anywhere; }
.ga-pay-own b { color: var(--color-ink); font-weight: 600; }

/* D285: "More" (View website on phones, Search & sharing, Payments, who's signed in, Sign out) drawn ABOVE the tab row
   (the tabs' fade mask makes its own stacking context), phone-sized hit areas for the small links, Messages entries of
   the Parts (kind, number, status). */
.ga-top-in { position: relative; z-index: 3; }
.ga-me-pop { z-index: 10; min-width: 15rem; padding: .375rem; gap: 0; }
.ga-me > summary { gap: .25rem; }
.ga-caret { font-size: .7em; opacity: .7; }
.ga-me-item { display: flex; align-items: center; gap: .375rem; width: 100%; min-height: 2.75rem; padding: .5rem .75rem; border: 0; border-radius: .625rem; background: none; color: var(--color-ink); font: inherit; font-size: .9375rem; text-align: left; text-decoration: none; cursor: pointer; }
.ga-me-item:hover, .ga-me-item:focus-visible { background: var(--color-surface); }
.ga-me-item[aria-current="page"] { font-weight: 600; }
.ga-me-who { display: grid; gap: .5rem; margin-top: .375rem; padding: .75rem .75rem .5rem; border-top: 1px solid var(--color-line); }
.ga-me-view { display: none; }
@media (max-width: 479px) { .ga-view { display: none; } .ga-me-view { display: flex; } }
.ga-note[hidden] { display: none; }
.ga-auth .link-btn { min-height: 2.75rem; padding: 0 .25rem; }
@media (min-width: 640px) { .ga-auth .link-btn { min-height: 0; padding: 0; } }
.ga-msg-when { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .625rem; }
.ga-msg-kind { color: var(--color-ink); font-weight: 600; }
.ga-msg-stat { padding: .0625rem .5rem; border: 1px solid var(--color-line); border-radius: 999px; font-size: .75rem; color: var(--color-ink-2, var(--color-muted)); }
.ga-pay-h { margin: 0; font-size: .8125rem; font-weight: 500; color: var(--color-muted); }
