/* Shared app-like finish for the store, account pages and staff workspaces. */

:root {
  color-scheme:dark;
  --bg:#0b0e0c; --bg-2:#101512; --surface:#171d19; --surface-2:#202822; --surface-3:#29352c;
  --text:#f5f7f1; --text-2:#c2ccc1; --text-3:#96a398;
  --border:rgba(234,242,228,.1); --border-2:rgba(234,242,228,.2);
  --accent:#b5e879; --accent-dim:#c5ed8f; --accent-bg:rgba(181,232,121,.1); --accent-border:rgba(181,232,121,.36);
  --staff-bg:var(--bg); --staff-panel:var(--surface); --staff-line:var(--border-2); --staff-accent:var(--accent); --staff-muted:var(--text-2);
}
:root, body { transition:background-color .38s ease,color .38s ease; }
html { background:var(--bg); }
body, body.storefront, body.staff-page, body.admin-body, body.identity-page, body.linking-body {
  color:var(--text); background:var(--bg); --ink:var(--text); --muted:var(--text-2);
  --line:var(--border); --line-hover:var(--border-2); --purple:var(--accent); --blue:var(--accent);
}
body :is(.top-nav,.staff-header,.studio-header,.admin-topbar,.admin-sidebar,.studio-sidebar) {
  color:var(--text); background:var(--bg-2); border-color:var(--border);
  transition:background-color .38s ease,border-color .38s ease,color .38s ease;
}
body :is(.card,.support-card,.admin-panel,.department-card,.management-card,.link-card,.gate-card,.profile-card,dialog,.product-card) {
  color:var(--text); background:var(--surface); border-color:var(--border-2);
  transition:background-color .38s ease,border-color .38s ease,color .38s ease,box-shadow .22s ease,transform .22s ease;
}
body :is(input,select,textarea) { color:var(--text); background:var(--surface-2); border-color:var(--border-2); }
body :is(input,select,textarea)::placeholder { color:var(--text-3); }
body :is(a,button) { -webkit-tap-highlight-color:transparent; }
body a { text-underline-offset:3px; }
body :focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
body :is(.btn-primary,.btn-primary:hover,.btn-primary:focus-visible,.btn-discord,.btn-link-discord,.btn-link-roblox) {
  color:#142219; background:var(--accent); border-color:var(--accent); box-shadow:none;
}
body :is(.btn-primary,.btn-discord,.btn-link-discord,.btn-link-roblox):hover { filter:brightness(1.07); }
body :is(.btn,.btn-glass,.btn-ghost) { border-radius:11px; }
body :is(.btn-glass,.btn-ghost) { color:var(--text); background:var(--surface-2); border-color:var(--border-2); box-shadow:none; }
body :is(.nav-actions,.header-links) { display:flex; align-items:center; gap:10px; }
body .staff-header { min-height:68px; padding:12px clamp(18px,4vw,48px); }
body .header-links { flex-wrap:wrap; justify-content:flex-end; }

/* Keep the product imagery and category rail, with clearer spacing and card rhythm. */
body.storefront .top-nav { position:sticky; z-index:40; width:100%; padding:12px clamp(18px,4vw,48px); background:var(--bg-2); border-bottom:1px solid var(--border); backdrop-filter:blur(18px); }
body.storefront .brand-avatar { width:40px; height:40px; border-radius:12px; }
body.storefront .nav-links { gap:8px; }
body.storefront .nav-link { padding:9px 12px; border-radius:10px; color:var(--text-2); border:1px solid transparent; }
body.storefront .nav-link:hover,body.storefront .nav-link-active { color:var(--text); background:var(--surface); border-color:var(--border); }
body.storefront .hero { border-bottom:1px solid var(--border); }
body.storefront .hero-copy { border-radius:22px; border-color:rgba(236,242,220,.24); box-shadow:0 28px 80px #07160f55; }
body.storefront .hero-search { border-radius:14px; }
body.storefront .store-shortcuts { color:var(--text); background:var(--surface); border-color:var(--border); }
body.storefront .store-shortcuts>a { border-color:var(--border); }
body.storefront .store-shortcuts>a:hover { background:var(--surface-2); }
body.storefront .catalog { color:#f5f7f1; background:#0b0e0c; --text:#f5f7f1; --text-2:#c2ccc1; --text-3:#96a398; --surface:#171d19; --surface-2:#202822; --surface-3:#29352c; --border:rgba(234,242,228,.1); --border-2:rgba(234,242,228,.2); --accent:#b5e879; --accent-dim:#c5ed8f; --accent-bg:rgba(181,232,121,.1); --accent-border:rgba(181,232,121,.36); }
body.storefront .catalog :is(.catalog-heading,.catalog-sidebar,.catalog-count,.product-name,.product-price,.product-category,.empty-state-title) { color:var(--text); }
body.storefront .catalog :is(.section-eyebrow,.catalog-heading p,.product-desc,.catalog-sidebar p,.catalog-sidebar label,.empty-state-desc) { color:var(--text-2); }
body.storefront .catalog .product-card { overflow:hidden; border-radius:18px; border-color:var(--border-2); background:var(--surface); box-shadow:0 8px 24px #00000012; }
body.storefront .catalog .product-image { background:var(--surface-2); border-color:var(--border); }
body.storefront .catalog .product-body { padding:20px; }
body.storefront .catalog .product-grid { gap:20px; }
body.storefront .catalog .product-card:hover { transform:translateY(-4px); border-color:var(--accent-border); box-shadow:0 18px 40px #00000024; }
body.storefront .catalog .chip { background:var(--surface); border-color:var(--border-2); color:var(--text-2); }
body.storefront .catalog .chip.active,body.storefront .catalog .chip:hover { color:var(--text); border-color:var(--accent-border); background:var(--accent-bg); }
body.storefront .catalog .empty-state { border-color:var(--border-2); background:var(--surface); color:var(--text-2); }
body.storefront .site-footer { background:var(--bg-2); color:var(--text-2); border-color:var(--border); }
body.storefront .footer-links a:hover { color:var(--accent); }
body.storefront .cart-drawer { color:var(--text); background:var(--bg-2); border-color:var(--border); }
body.storefront #toast { color:#142219; background:var(--accent); }

/* Staff and account pages use the same app frame and steady surface contrast. */
body.staff-page { min-height:100vh; }
body.staff-page { --staff-bg:var(--bg); --staff-panel:var(--surface); --staff-line:var(--border-2); --staff-accent:var(--accent); --staff-muted:var(--text-2); }
body.staff-page .staff-header { position:sticky; top:0; z-index:30; border-bottom:1px solid var(--border); }
body.staff-page .header-links a { color:var(--text-2); }
body.staff-page .header-links a:hover { color:var(--text); }
body.staff-page main { max-width:1440px; margin:0 auto; }
body.staff-page .card,body.staff-page .department-card,body.staff-page .support-card { border:1px solid var(--border-2); border-radius:18px; box-shadow:0 10px 34px #00000012; }
body.staff-page .card:hover,body.staff-page .department-card:hover { border-color:var(--accent-border); }
body.staff-page :is(.department-announcement,.calendar-day,.tester-dropdown,.mod-toolbar,.ticket-detail,.ticket-filters,.ticket-list,.staff-subnav,.workspace-form fieldset) { color:var(--text); background:var(--surface); border-color:var(--border-2); }
body.staff-page :is(.announcement-rank,.calendar-day button,.department-announcement footer button) { color:var(--text); background:var(--surface-2); border-color:var(--border-2); }
body.staff-page .muted,body.staff-page small { color:var(--text-2); }
body.staff-page .tag { color:var(--text-2); background:var(--surface-2); border-color:var(--border-2); }
body.staff-page .workspace-link { color:var(--accent); }
body.admin-body .admin-layout { background:var(--bg); }
body.admin-body .admin-sidebar { background:var(--bg-2); }
body.admin-body .admin-panel,body.admin-body .admin-login-card { background:var(--surface); border-color:var(--border-2); }
body .site-footer a:hover,body .header-links a:hover { color:var(--accent); }

/* Product testing should explain an empty state instead of leaving a blank screen. */
.testing-main { padding:clamp(28px,5vw,64px); }
.testing-main>h1 { font-size:clamp(30px,4vw,42px); letter-spacing:-.04em; margin:0 0 10px; }
.testing-main>.muted { max-width:760px; line-height:1.7; }
.testing-main #testStatus:empty { display:none; }
.testing-empty { max-width:720px; min-height:250px; display:grid; grid-template-columns:72px minmax(0,1fr); align-items:center; gap:22px; margin-top:30px; padding:30px; border:1px solid var(--border-2); border-radius:22px; background:var(--surface); box-shadow:0 18px 48px #00000018; animation:panel-enter .45s cubic-bezier(.2,.7,.2,1) both; }
.testing-empty-icon { display:grid; place-items:center; width:68px; height:68px; border:1px solid var(--accent-border); border-radius:20px; color:var(--accent); background:var(--accent-bg); }
.testing-empty-icon svg { width:32px; height:32px; }
.testing-empty h2 { margin:0 0 8px; color:var(--text); font-size:20px; }
.testing-empty p { margin:0; max-width:500px; color:var(--text-2); line-height:1.65; }
.testing-empty .btn { margin-top:20px; }
.testing-main .product-draft-grid { margin-top:30px; }
@keyframes panel-enter { from { opacity:0; transform:translateY(12px) scale(.99); } to { opacity:1; transform:none; } }

@media (max-width:760px) {
  body .staff-header { align-items:center; }
  body .header-links { gap:12px; }
  body.storefront .top-nav { flex-wrap:wrap; }
  body.storefront .nav-actions { gap:7px; flex-wrap:wrap; justify-content:flex-end; }
  .testing-main { padding:32px 20px; }
  .testing-empty { grid-template-columns:1fr; justify-items:start; min-height:0; padding:24px; }
}
@media (max-width:480px) {
  body.storefront .nav-actions { flex-basis:100%; justify-content:flex-start; margin-left:0; }
  body .header-links { width:100%; justify-content:flex-start; }
}
@media (prefers-reduced-motion:reduce) {
  :root,body,body * { scroll-behavior:auto!important; transition-duration:.01ms!important; animation-duration:.01ms!important; animation-iteration-count:1!important; }
}
