/* ============================================================
   MyCAD Drawing Store — responsive blueprint theme
   Mobile-first. Breakpoints: ≥640px tablet, ≥960px desktop.
   ============================================================ */

:root {
  --bg: #0b1220;
  --bg-soft: #0d1526;
  --panel: #101a2e;
  --panel-2: #0d1830;
  --line: #22334f;
  --line-soft: #1a2942;
  --ink: #e8eefc;
  --muted: #93a5c4;
  --accent: #38bdf8;
  --accent-2: #7dd3fc;
  --accent-3: #22d3a7;
  --warn: #fbbf24;
  --danger: #f87171;
  --gold: #fbbf24;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(2, 6, 18, .45);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(56, 189, 248, .12), transparent 60%),
    radial-gradient(900px 480px at -10% 15%, rgba(34, 211, 167, .07), transparent 55%),
    linear-gradient(rgba(120, 160, 220, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 220, .045) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 32px 32px, 32px 32px, auto;
  background-attachment: fixed;
  min-height: 100vh;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; color: #fff; }
code, .mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent);
  color: #04202f; padding: 8px 14px; border-radius: 0 0 8px 0; z-index: 200;
}
.skip-link:focus { left: 0; }
.wrap { width: min(1180px, 100% - 2.2rem); margin-inline: auto; }
.wrap-wide { width: min(1320px, 100% - 1.6rem); margin-inline: auto; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 18, 32, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; padding: .65rem 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-mark svg { width: 34px; height: 34px; }
.brand-name { letter-spacing: .2px; }
.site-nav {
  display: flex; align-items: center; gap: .35rem .9rem;
  flex: 1 1 100%; order: 3; flex-wrap: wrap;
  padding: .35rem 0 .3rem; border-top: 1px dashed var(--line-soft);
}
.site-nav > a { color: var(--muted); font-weight: 600; padding: .3rem .55rem; border-radius: 8px; }
.site-nav > a:hover { color: #fff; text-decoration: none; background: rgba(56, 189, 248, .08); }
.site-nav > a.active { color: var(--accent-2); }
.site-nav > a.nav-admin { color: var(--gold); }
.nav-spacer { flex: 1; }
.nav-user { color: var(--muted); font-size: .9rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle, .nav-burger { display: none; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; content: ""; position: relative;
}
.nav-burger span::before { position: absolute; top: -7px; }
.nav-burger span::after { position: absolute; top: 7px; }

@media (max-width: 779px) {
  .nav-toggle:not(:checked) ~ .site-nav { display: none; }
  .nav-burger { display: inline-flex; align-items: center; margin-left: auto; cursor: pointer; padding: 10px 6px; order: 2; }
  .site-nav { order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: .15rem; padding: .6rem 0 .9rem; }
  .site-nav > a { padding: .55rem .7rem; }
  .site-nav .btn { text-align: center; }
  .nav-spacer { display: none; }
  .nav-user { order: -1; }
}
@media (min-width: 780px) {
  .site-nav { border-top: 0; padding: 0; flex: 1 1 auto; order: 0; }
}

.announce {
  background: linear-gradient(90deg, rgba(56, 189, 248, .16), rgba(34, 211, 167, .14));
  border-bottom: 1px solid var(--line);
  text-align: center; padding: .55rem 1rem; font-size: .93rem; color: var(--accent-2);
}

/* ---------- Header announcement ticker (between menu and Log in) ---------- */
.nav-announce {
  flex: 1 1 auto;              /* fills the gap between the menu and Log in */
  min-width: 130px; max-width: min(66%, 680px);
  display: inline-flex; align-items: center; gap: .55rem;
  margin: 0 .55rem; padding: .26rem .95rem;
  border: 1px dashed rgba(56, 189, 248, .4); border-radius: 999px;
  background: linear-gradient(90deg, rgba(56, 189, 248, .09), rgba(34, 211, 167, .08));
  overflow: hidden;
}
.ticker { flex: 1; min-width: 0; overflow: hidden; }
.ticker-track {
  display: inline-flex; white-space: nowrap; will-change: transform;
  animation: ticker-scroll var(--ticker-duration, 22s) linear infinite;
}
.ticker-copy {
  padding-right: 3.5em;        /* keeps the -50% loop seamless (train gap) */
  font-size: clamp(.72rem, 1.5vw, .87rem);
  font-weight: 600; letter-spacing: .2px; color: var(--accent-2);
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.nav-announce:hover .ticker-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}
.nav-announce-dot {
  flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-3);
  animation: announce-pulse 2.2s ease-out infinite;
}
@keyframes announce-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 167, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(34, 211, 167, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 167, 0); }
}
@media (max-width: 779px) {
  .nav-announce { width: 100%; margin: .35rem 0; max-width: 100%; }
}
@media (min-width: 780px) and (max-width: 979px) {
  .nav-announce { max-width: 46%; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .62rem 1.15rem; border-radius: var(--radius-sm);
  font: inherit; font-weight: 700; cursor: pointer; border: 1px solid transparent;
  transition: transform .08s ease, filter .15s ease, background .15s ease;
  text-decoration: none !important; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, #38bdf8, #0284c7); color: #04202f; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-success { background: linear-gradient(180deg, #34d8ab, #0ea47a); color: #03251b; }
.btn-success:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }
.btn-danger { background: transparent; border-color: #7f2d2d; color: var(--danger); }
.btn-danger:hover { background: rgba(248, 113, 113, .1); }
.btn-sm { padding: .38rem .8rem; font-size: .88rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Flash ---------- */
.flash {
  display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem;
  margin: 0 0 1.05rem; padding: .75rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid; font-size: .95rem;
}
.flash b, .flash strong { color: inherit; }
.flash-x { background: none; border: 0; color: inherit; font-size: 1.1rem; cursor: pointer; line-height: 1; padding: .15rem .3rem; opacity: .7; }
.flash-x:hover { opacity: 1; }
.flash-success { background: rgba(34, 211, 167, .1); border-color: rgba(34, 211, 167, .35); color: #a7f3d0; }
.flash-error   { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .35); color: #fecaca; }
.flash-warn    { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .35); color: #fde68a; }
.flash-info    { background: rgba(56, 189, 248, .1); border-color: rgba(56, 189, 248, .3); color: #bae6fd; }
.flash a { color: inherit; text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2rem, 6vw, 4.2rem) 0 1.6rem; text-align: center; }
.hero-kicker {
  display: inline-block; font-family: var(--mono); font-size: .78rem; letter-spacing: 2.5px;
  color: var(--accent-2); text-transform: uppercase; border: 1px solid rgba(56, 189, 248, .35);
  padding: .3rem .85rem; border-radius: 999px; background: rgba(56, 189, 248, .07);
}
.hero h1 {
  font-size: clamp(1.9rem, 5.4vw, 3.3rem); margin: .9rem 0 .7rem; letter-spacing: -.5px;
}
.hero h1 .grad {
  background: linear-gradient(90deg, #7dd3fc, #22d3a7);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { max-width: 640px; margin: .4rem auto 1.4rem; color: var(--muted); font-size: clamp(.98rem, 2vw, 1.12rem); }
.hero-cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.hero-badges { display: flex; gap: .6rem 1.4rem; justify-content: center; flex-wrap: wrap; margin-top: 1.6rem; color: var(--muted); font-size: .88rem; }
.hero-badges span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-badges svg { width: 15px; height: 15px; }

/* ---------- Toolbar (search + filters) ---------- */
.toolbar { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin: 1.4rem 0 1.1rem; }
.search-form { display: flex; flex: 1 1 260px; gap: .5rem; }
.search-form input[name="q"] {
  flex: 1; min-width: 0;
}
.chips { display: flex; gap: .45rem; flex-wrap: wrap; }
.chip {
  display: inline-block; padding: .34rem .8rem; border-radius: 999px; font-size: .86rem; font-weight: 600;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
}
a.chip:hover { border-color: var(--accent); color: var(--accent-2); text-decoration: none; }
.chip.on { background: rgba(56, 189, 248, .13); border-color: var(--accent); color: var(--accent-2); }
.toolbar select { width: auto; }

/* ---------- Widgets: PH clock + USD↔PHP converter ---------- */
.widgets {
  display: grid; gap: 1.15rem; margin-bottom: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}
.widget-clock { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.analog { width: 148px; flex: none; }
.analog svg { width: 100%; height: auto; filter: drop-shadow(0 6px 18px rgba(2, 6, 18, .5)); }
.hand { transform-box: view-box; transform-origin: 70px 70px; }
.hand.sec { transition: transform .18s cubic-bezier(.4, 2.2, .6, .9); }
.clock-digits { display: grid; gap: .3rem; min-width: 170px; }
.clock-digits .digital { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; color: #fff; letter-spacing: 1px; }
.clock-digits .clock-date { font-size: .92rem; }
.widget-title { margin: 0 0 .2rem; font-size: 1.05rem; }
.fx-rows { display: flex; gap: .7rem; align-items: end; flex-wrap: wrap; margin: .9rem 0 .4rem; }
.fx-row { display: grid; gap: .3rem; flex: 1 1 150px; font-weight: 700; color: #c7d5f0; }
.fx-row input { font-family: var(--mono); font-size: 1.06rem; }
.fx-eq { color: var(--accent); font-size: 1.3rem; padding-bottom: .55rem; }
@media (max-width: 480px) { .analog { margin-inline: auto; } .clock-digits { text-align: center; justify-items: center; } }

/* ---------- Product grid & cards ---------- */
.grid {
  display: grid; gap: 1.15rem;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  margin-bottom: 2.5rem;
}
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(2, 6, 18, .25);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
  color: var(--ink); position: relative;
}
.card:hover { transform: translateY(-3px); border-color: rgba(56, 189, 248, .5); box-shadow: var(--shadow); text-decoration: none; }
.thumb { aspect-ratio: 16 / 10; background: var(--panel-2); border-bottom: 1px solid var(--line-soft); overflow: hidden; position: relative; }
.thumb img, .thumb-ph svg { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph svg { display: block; }
.card .price-tag {
  position: absolute; top: .7rem; right: .7rem; z-index: 2;
  background: rgba(4, 20, 34, .88); border: 1px solid rgba(56, 189, 248, .45);
  color: var(--accent-2); font-weight: 800; font-size: .95rem;
  padding: .28rem .7rem; border-radius: 999px; backdrop-filter: blur(4px);
}
.card .price-tag.free { color: #6ee7b7; border-color: rgba(34, 211, 167, .5); }
.card .owned-tag {
  position: absolute; top: .7rem; left: .7rem; z-index: 2;
  background: rgba(6, 34, 26, .9); border: 1px solid rgba(34, 211, 167, .5);
  color: #6ee7b7; font-weight: 700; font-size: .78rem; padding: .24rem .6rem; border-radius: 999px;
}
.card-body { padding: .95rem 1.05rem 1.1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card-cat { font-family: var(--mono); font-size: .72rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); }
.card-title { font-size: 1.06rem; font-weight: 700; color: #fff; margin: 0; }
.card-desc {
  color: var(--muted); font-size: .9rem; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: auto; padding-top: .65rem; border-top: 1px dashed var(--line-soft); }
.card-foot .muted { font-size: .8rem; }
.card-foot .btn { font-size: .86rem; }
.empty {
  text-align: center; padding: 3rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--muted); background: rgba(16, 26, 46, .5); margin-bottom: 2rem;
}
.empty h3 { margin-top: 0; }

/* ---------- Section headings ---------- */
.section-head { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; margin: 2.2rem 0 1rem; }
.section-head h2 { font-size: clamp(1.2rem, 3vw, 1.55rem); margin: 0; }
.section-head .muted { font-size: .9rem; }

/* ---------- Forms ---------- */
label.field { display: block; margin-bottom: 1rem; }
label.field > span, .field-label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .35rem; color: #c7d5f0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=file], select, textarea {
  width: 100%; padding: .66rem .85rem;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); font: inherit; transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .18);
}
textarea { min-height: 130px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
input[type=file] { padding: .45rem .6rem; }
input[type=checkbox] { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; vertical-align: -2px; }
.checkline { display: flex; gap: .55rem; align-items: flex-start; margin: .8rem 0; }
.hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }

/* ---------- Auth pages ---------- */
.auth-wrap { display: grid; gap: 1.6rem; padding: 2.2rem 0 3rem; }
@media (min-width: 880px) { .auth-wrap { grid-template-columns: 1.05fr .95fr; align-items: center; } }
.auth-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.3rem, 4vw, 2.2rem); box-shadow: var(--shadow); max-width: 460px; width: 100%;
  margin-inline: auto;
}
.auth-card h1 { margin: 0 0 .3rem; font-size: 1.5rem; }
.auth-card .sub { color: var(--muted); margin: 0 0 1.4rem; font-size: .95rem; }
.auth-alt { margin-top: 1.1rem; font-size: .92rem; color: var(--muted); text-align: center; }
.auth-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.auth-perks li { display: flex; gap: .8rem; align-items: flex-start; }
.auth-perks svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.auth-perks b { display: block; }
.auth-perks p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Product page ---------- */
.product-layout { display: grid; gap: 1.8rem; padding: 1.8rem 0 2.6rem; }
@media (min-width: 900px) { .product-layout { grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr); align-items: start; } }
.product-media {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden;
}
.product-media img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.product-main { background: var(--panel-2); overflow: hidden; }

/* Additional preview thumbnails — two-up, balanced under the main image */
.product-thumbs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem;
  padding: .55rem; border-top: 1px solid var(--line-soft); background: var(--panel-2);
}
.thumb-mini {
  display: block; width: 100%; padding: 0; margin: 0; cursor: pointer; overflow: hidden;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.thumb-mini img { display: block; width: 100%; aspect-ratio: 16/10; height: auto; object-fit: cover; }
.thumb-mini:hover, .thumb-mini.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, .2);
}
.product-media .thumb-ph svg { aspect-ratio: 16/10; height: auto; }
.buy-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 1.8rem); box-shadow: var(--shadow);
  position: sticky; top: 84px;
}
.buy-price { font-size: clamp(1.7rem, 4.5vw, 2.3rem); font-weight: 800; color: var(--accent-2); margin: .2rem 0 .9rem; }
.buy-price .cur { font-size: .6em; vertical-align: .28em; margin-right: .15em; }
.meta-list { list-style: none; margin: 1rem 0 1.2rem; padding: 0; font-size: .9rem; display: grid; gap: .45rem; }
.meta-list li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--line-soft); padding-bottom: .45rem; }
.meta-list li span:first-child { color: var(--muted); }
.meta-list li span:last-child { text-align: right; word-break: break-word; }
.desc-body { white-space: normal; }
.desc-body p { margin: 0 0 .8rem; }
.crumb { font-size: .85rem; color: var(--muted); margin: 1.2rem 0 -.6rem; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent-2); }

/* ---------- Checkout ---------- */
.checkout-grid { display: grid; gap: 1.6rem; padding: 1.6rem 0 2.6rem; }
@media (min-width: 940px) { .checkout-grid { grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); align-items: start; } }
.pay-panel {
  background: linear-gradient(180deg, rgba(56, 189, 248, .06), transparent 42%), var(--panel);
  border: 1px solid rgba(56, 189, 248, .35); border-radius: var(--radius);
  padding: clamp(1.2rem, 3.5vw, 2rem); box-shadow: var(--shadow); text-align: center;
}
.pay-amount { font-size: clamp(1.9rem, 6vw, 2.6rem); font-weight: 800; color: #fff; margin: .1rem 0 .2rem; }
.pay-ref {
  display: inline-flex; gap: .5rem; align-items: center; font-family: var(--mono); font-size: 1.02rem;
  background: var(--panel-2); border: 1px dashed var(--line); border-radius: var(--radius-sm);
  padding: .45rem .9rem; margin: .5rem 0 1.2rem;
}
.qr-holder {
  width: min(320px, 82%); margin: .4rem auto 1rem; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  background: #fff; border: 6px solid #fff; box-shadow: 0 8px 28px rgba(2, 6, 18, .5);
}
.qr-holder img { width: 100%; height: 100%; object-fit: contain; }
.pay-steps { text-align: left; margin: 1.2rem 0; padding: .2rem 0 .2rem 1.3rem; color: #cfdcf5; font-size: .93rem; display: grid; gap: .45rem; }
.pay-note { font-size: .82rem; color: var(--muted); margin-top: 1rem; }
.pay-actions { margin-top: 1.3rem; display: grid; gap: .7rem; }
.order-summary { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.order-summary .row { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px dashed var(--line-soft); font-size: .95rem; }
.order-summary .row:last-child { border-bottom: 0; }
.order-summary .row.total { font-weight: 800; font-size: 1.1rem; color: #fff; }

/* ---------- Tables (admin & downloads) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 560px; }
.tbl th, .tbl td { padding: .68rem .9rem; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: .92rem; vertical-align: middle; }
.tbl th { font-size: .74rem; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); background: rgba(13, 24, 48, .6); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num { font-family: var(--mono); white-space: nowrap; }
.tbl .thumb-sm img, .tbl .thumb-sm svg { width: 58px; height: 40px; object-fit: cover; border-radius: 6px; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.b-ok { background: rgba(34, 211, 167, .14); color: #6ee7b7; border: 1px solid rgba(34, 211, 167, .4); }
.b-warn { background: rgba(251, 191, 36, .13); color: #fde68a; border: 1px solid rgba(251, 191, 36, .4); }
.b-info { background: rgba(56, 189, 248, .13); color: #bae6fd; border: 1px solid rgba(56, 189, 248, .4); }
.b-danger { background: rgba(248, 113, 113, .13); color: #fecaca; border: 1px solid rgba(248, 113, 113, .4); }
.b-muted { background: rgba(147, 165, 196, .12); color: var(--muted); border: 1px solid var(--line); }

/* ---------- Admin layout ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-side {
  width: 230px; flex: none; background: var(--bg-soft); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.admin-side-head { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.admin-nav { display: flex; flex-direction: column; gap: .15rem; padding: .8rem .7rem; flex: 1; }
.admin-nav a { color: var(--muted); padding: .55rem .8rem; border-radius: 9px; font-weight: 600; }
.admin-nav a:hover { color: #fff; text-decoration: none; background: rgba(56, 189, 248, .08); }
.admin-nav a.active { color: var(--gold); background: rgba(251, 191, 36, .1); }
.admin-side-foot { padding: .9rem 1.1rem; border-top: 1px solid var(--line); font-size: .8rem; word-break: break-all; }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 1rem;
  padding: .8rem 1.4rem; background: rgba(11, 18, 32, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.admin-title { font-size: 1.25rem; margin: 0; flex: 1; }
.admin-content { padding: 1.4rem 0 3rem; }
.nav-burger.always { display: inline-flex; }

@media (max-width: 899px) {
  .admin-side {
    position: fixed; z-index: 120; left: 0; top: 0; transform: translateX(-100%);
    transition: transform .18s ease; width: min(280px, 84vw); height: 100dvh;
  }
  #admin-nav-toggle:checked ~ .admin-side { transform: translateX(0); box-shadow: 0 0 0 100vmax rgba(2, 6, 18, .55); }
  .admin-side .nav-burger { display: inline-flex; }
  .admin-shell { display: block; }
  .admin-side { position: fixed; }
}
@media (min-width: 900px) {
  .admin-topbar .nav-burger { display: none; }
}

/* ---------- Admin widgets ---------- */
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); margin-bottom: 1.6rem; }
.stat {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 1.05rem 1.2rem;
}
.stat .v { font-size: 1.65rem; font-weight: 800; color: #fff; font-family: var(--mono); }
.stat .k { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; }
.stat.warn .v { color: var(--warn); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.6rem); margin-bottom: 1.5rem; }
.panel > h2, .panel > h3 { margin-top: 0; }
.panel .panel-sub { color: var(--muted); font-size: .92rem; margin: -.4rem 0 1rem; }
.duo-grid { display: grid; gap: 1.2rem; }
@media (min-width: 800px) { .duo-grid { grid-template-columns: 1fr 1fr; } }
.progress { height: 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, #38bdf8, #22d3a7); }
.progress.hot > span { background: linear-gradient(90deg, #fbbf24, #f87171); }
.actions-cell { display: flex; gap: .4rem; flex-wrap: wrap; }
.inline-form { display: inline; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: rgba(9, 14, 26, .7); margin-top: 3rem; }
.footer-inner { display: grid; gap: 1.6rem; padding: 2.2rem 0 1.2rem; }
@media (min-width: 820px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand { font-weight: 800; font-size: 1.05rem; color: #fff; }
.footer-links { display: grid; gap: .45rem; align-content: start; }
.footer-pay { display: flex; gap: .5rem; flex-wrap: wrap; align-content: start; }
.pay-chip {
  font-size: .78rem; font-weight: 700; padding: .3rem .7rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
}
.footer-bottom { padding: 1rem 0 1.6rem; font-size: .8rem; border-top: 1px dashed var(--line-soft); }

/* ---------- Misc ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 1.4rem; }
.mb-1 { margin-bottom: .6rem; }
.copy-box {
  display: flex; gap: .5rem; align-items: center; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .5rem .7rem; font-family: var(--mono); font-size: .8rem; word-break: break-all;
}
.copy-box input { border: 0; background: none; color: var(--muted); padding: 0; font: inherit; flex: 1; min-width: 0; }
.copy-box input:focus { box-shadow: none; }
.verify-link-card { border: 1px dashed rgba(56, 189, 248, .5); border-radius: var(--radius-sm); padding: .8rem 1rem; background: rgba(56, 189, 248, .05); }
.divider { border: 0; border-top: 1px dashed var(--line); margin: 1.4rem 0; }

@media print {
  .site-header, .site-footer, .announce, .nav-announce, .btn, .flash { display: none !important; }
  body { background: #fff; color: #000; }
}
