/* KRips — shared design system. One file for the shop and the admin panel. */

:root {
  color-scheme: dark;

  --bg: #0b0414;
  --bg-2: #150a26;
  --surface: rgba(24, 8, 40, 0.86);
  --surface-2: rgba(37, 14, 58, 0.9);
  --surface-3: rgba(52, 20, 80, 0.92);

  --line: rgba(255, 141, 240, 0.16);
  --line-strong: rgba(255, 141, 240, 0.46);

  --text: #fdf7ff;
  --muted: #c3a5d8;
  --brand: #ff7ded;
  --brand-deep: #b52fb2;
  --accent: #ffd233;
  --ok: #59f0a5;
  --danger: #ff5c7a;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow: 0 26px 64px -28px rgba(0, 0, 0, 0.92);
  --shadow-soft: 0 12px 28px -18px rgba(0, 0, 0, 0.85);
  --ring: 0 0 0 3px rgba(255, 125, 237, 0.3);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(rgba(186, 168, 255, 0.05) 1px, transparent 1px) 0 0 / 76px 76px,
    linear-gradient(90deg, rgba(186, 168, 255, 0.05) 1px, transparent 1px) 0 0 / 76px 76px,
    radial-gradient(900px 520px at 12% -8%, rgba(255, 125, 237, 0.16), transparent 70%),
    radial-gradient(760px 460px at 88% 4%, rgba(35, 171, 255, 0.14), transparent 68%),
    radial-gradient(620px 420px at 46% 108%, rgba(255, 210, 51, 0.1), transparent 72%),
    linear-gradient(168deg, #1a0d2e 0%, #120823 46%, #0a0616 100%);
}

body::after {
  background-image: url("k-rips-logo.jpg");
  background-repeat: repeat;
  background-position: 40px 18px;
  background-size: 210px 210px;
  filter: grayscale(1) contrast(1.1);
  mix-blend-mode: screen;
  opacity: 0.035;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  color: #1a0016;
  background: var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 10px clamp(14px, 4vw, 40px);
  background: rgba(11, 4, 20, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(150%);
  transition: box-shadow 220ms var(--ease), background 220ms var(--ease);
}

.topbar.is-stuck {
  background: rgba(11, 4, 20, 0.94);
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.95);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  flex: 0 0 auto;
}

.brand__mark {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border: 1px solid rgba(255, 141, 240, 0.34);
  border-radius: 10px;
  background: #14001f;
  box-shadow: 0 0 24px rgba(190, 68, 255, 0.26);
}

.brand__name {
  display: block;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1;
}

.brand__tag {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.search {
  position: relative;
  flex: 1 1 auto;
  max-width: 560px;
  margin-left: clamp(0px, 2vw, 18px);
}

.search__icon {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search__input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 40px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  outline: none;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}

.search__input::placeholder {
  color: rgba(195, 165, 216, 0.72);
}

.search__input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-strong);
  box-shadow: var(--ring);
}

.search__clear {
  position: absolute;
  top: 50%;
  right: 8px;
  display: none;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transform: translateY(-50%);
}

.search__clear:hover {
  color: var(--text);
}

.search.has-value .search__clear {
  display: grid;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 12px;
  color: var(--muted);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  transition: color 140ms var(--ease), background 140ms var(--ease);
}

.nav__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 17px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 140ms var(--ease), background 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease), box-shadow 140ms var(--ease);
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.09);
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.btn--brand {
  color: #22001d;
  background: linear-gradient(180deg, #ff96f2, #ff6fe6);
  border-color: transparent;
  box-shadow: 0 12px 26px -14px rgba(255, 125, 237, 0.9);
}

.btn--brand:hover {
  background: linear-gradient(180deg, #ffa7f5, #ff7ded);
  border-color: transparent;
}

.btn--ghost {
  color: var(--brand);
  background: transparent;
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  color: #22001d;
  background: var(--brand);
  border-color: var(--brand);
}

.btn--danger {
  color: #fff;
  background: rgba(255, 92, 122, 0.16);
  border-color: rgba(255, 92, 122, 0.5);
}

.btn--danger:hover {
  background: rgba(255, 92, 122, 0.28);
  border-color: rgba(255, 92, 122, 0.7);
}

.btn--sm {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12.5px;
  border-radius: 9px;
}

.btn--icon {
  width: 40px;
  min-height: 40px;
  padding: 0;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 26px clamp(14px, 4vw, 40px) 60px;
}

.banner {
  position: relative;
  z-index: 18;
  margin-bottom: 22px;
  animation: banner-in 760ms var(--ease) both;
  transition: opacity 380ms var(--ease), transform 380ms var(--ease), max-height 380ms var(--ease), margin 380ms var(--ease);
}

.banner.is-hidden {
  max-height: 0;
  margin-bottom: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-90px);
}

.banner__frame {
  display: grid;
  place-items: center;
  min-height: clamp(96px, 18vw, 210px);
  overflow: hidden;
}

.banner__frame img {
  width: 100%;
  max-height: clamp(110px, 21vw, 240px);
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.34));
}

.banner__fallback {
  display: none;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 5vw, 48px);
  width: 100%;
  padding: 20px;
}

.banner__fallback img {
  width: min(30vw, 220px);
}

.banner__copy {
  color: #ff8df7;
  font-size: clamp(30px, 7vw, 72px);
  font-weight: 950;
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(255, 89, 243, 0.5);
}

.banner__copy span {
  display: block;
  color: var(--text);
  font-size: 0.32em;
  font-weight: 500;
  text-align: center;
  text-transform: none;
}

@keyframes banner-in {
  from {
    opacity: 0;
    transform: translateX(90px);
  }

  70% {
    opacity: 1;
    transform: translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(250px, 358px);
  gap: 20px;
  margin-bottom: 22px;
}

.panel-soft {
  background: linear-gradient(180deg, rgba(44, 12, 68, 0.9), rgba(18, 5, 32, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero__main {
  display: grid;
  align-content: center;
  min-height: 320px;
  padding: clamp(24px, 4.6vw, 50px);
  overflow: hidden;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero__title {
  max-width: 660px;
  font-size: clamp(34px, 6.4vw, 66px);
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: -0.025em;
}

.hero__copy {
  max-width: 560px;
  margin: 16px 0 22px;
  color: #edd6f8;
  font-size: clamp(14.5px, 1.6vw, 17px);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__side {
  padding: 16px;
  perspective: 1000px;
}

.spotlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.badge {
  padding: 4px 10px;
  color: #241600;
  background: var(--accent);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 900;
}

.chiprow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  height: 34px;
  padding: 0 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: color 140ms var(--ease), background 140ms var(--ease), border-color 140ms var(--ease);
}

.chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

.chip.is-active {
  color: #22001d;
  background: linear-gradient(180deg, #ff96f2, #ff6fe6);
  border-color: transparent;
}

.filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 11px;
}

.filterbar__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(186px, 1fr));
  gap: 15px;
  align-items: stretch;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: linear-gradient(180deg, rgba(42, 12, 64, 0.96), rgba(17, 4, 30, 0.97));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: transform 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 125, 237, 0.12);
  transform: translateY(-2px);
}

.card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 0.72;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 7px;
  background: radial-gradient(circle at 50% 30%, rgba(255, 125, 237, 0.08), transparent 62%);
}

.card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.card__media .card__art {
  inset: auto;
  top: 26.8%;
  left: 49.7%;
  width: 63.5%;
  height: 65.8%;
  object-fit: fill;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.44);
}

.card__name {
  display: -webkit-box;
  min-height: 36px;
  overflow: hidden;
  font-size: 15.5px;
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.005em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card__set {
  width: fit-content;
  max-width: 100%;
  margin-top: 3px;
  color: #ffd8fa;
  font-size: 11.5px;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.3;
}

.card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.card__price {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: clamp(15px, 3.6vw, 17.5px);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.card__price svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--accent);
}

.card__qty {
  margin-top: 5px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.card__change {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.card__cta {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  color: var(--brand);
  border: 1.5px solid var(--brand);
  border-radius: 50%;
  transition: background 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}

.card__cta:hover,
.card__cta:focus-visible {
  color: #22001d;
  background: var(--brand);
  transform: translateY(-1px);
}

.card__cta svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

/* Featured slab: tilt + sheen. Pointer-fine only. */

.card--featured {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --glow-x: 50%;
  --glow-y: 30%;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateZ(0);
  transform-style: preserve-3d;
  animation: featured-float 6.2s ease-in-out infinite;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
  will-change: transform;
}

.card--featured::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, 0.28), transparent 20%),
    linear-gradient(118deg, transparent 18%, rgba(255, 125, 238, 0.2) 38%, transparent 56%);
  mix-blend-mode: screen;
  opacity: 0.4;
  transition: opacity 200ms var(--ease);
}

.card--featured:hover,
.card--featured.is-tilting {
  animation-play-state: paused;
  box-shadow: 0 26px 52px -24px rgba(0, 0, 0, 0.95), 0 0 34px rgba(255, 125, 238, 0.22);
}

.card--featured:hover::after,
.card--featured.is-tilting::after {
  opacity: 0.72;
}

.card--featured .card__media {
  transform: translateZ(24px);
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.34));
}

.card--featured .card__name,
.card--featured .card__set,
.card--featured .card__meta,
.card--featured .card__foot {
  position: relative;
  z-index: 3;
  transform: translateZ(16px);
}

@keyframes featured-float {
  0%,
  100% {
    transform: rotateX(0deg) rotateY(0deg) translateY(0);
  }

  35% {
    transform: rotateX(2.4deg) rotateY(-3.2deg) translateY(-6px);
  }

  70% {
    transform: rotateX(-1.8deg) rotateY(2.8deg) translateY(-3px);
  }
}

/* Toast */

.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(92vw, 420px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 11px 15px;
  color: #22001d;
  background: var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.9);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
  animation: toast-in 220ms var(--ease) both;
}

.toast--error {
  color: #fff;
  background: var(--danger);
}

.toast--ok {
  color: #04200f;
  background: var(--ok);
}

.toast.is-leaving {
  animation: toast-out 220ms var(--ease) both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* Empty, loading and error states */

.empty {
  display: grid;
  gap: 8px;
  place-items: center;
  padding: 42px 20px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(42, 12, 64, 0.6), rgba(17, 4, 30, 0.72));
  border: 1px dashed rgba(255, 141, 240, 0.3);
  border-radius: var(--radius);
  text-align: center;
}

.empty strong {
  color: var(--text);
  font-size: 16px;
}

.empty p {
  max-width: 44ch;
  font-size: 13.5px;
}

.empty .btn {
  margin-top: 6px;
}

.is-hidden {
  display: none !important;
}

/* Native hidden attribute must beat component display rules, including before
   the stylesheet finishes loading. */
[hidden] {
  display: none !important;
}

.skeleton {
  min-height: 320px;
  border-radius: var(--radius-sm);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.045) 30%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.045) 70%);
  background-size: 240% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  from {
    background-position: 140% 0;
  }

  to {
    background-position: -40% 0;
  }
}

/* ---------- Admin panel ---------- */

.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-head h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.02em;
}

.admin-head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 800;
}

.session-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(89, 240, 165, 0.16);
}

.tabs {
  display: flex;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 16px;
  padding: 5px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}

.tab {
  padding: 9px 16px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  transition: color 140ms var(--ease), background 140ms var(--ease);
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  color: #22001d;
  background: linear-gradient(180deg, #ff96f2, #ff6fe6);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat {
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(44, 12, 68, 0.86), rgba(18, 5, 32, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.stat__label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat__value {
  margin-top: 6px;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat__hint {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
}

.stat.is-warn .stat__value {
  color: var(--accent);
}

.stat.is-bad .stat__value {
  color: var(--danger);
}

.stat.is-money .stat__value {
  font-size: 20px;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 11px;
}

.toolbar__search {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}

.toolbar__search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 34px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  outline: none;
}

.toolbar__search input:focus {
  border-color: var(--line-strong);
  box-shadow: var(--ring);
}

.toolbar__search svg {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--muted);
  transform: translateY(-50%);
}

.select {
  height: 38px;
  padding: 0 30px 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  outline: none;
  appearance: none;
  cursor: pointer;
}

.select:focus {
  border-color: var(--line-strong);
  box-shadow: var(--ring);
}

.bulk-bar {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  color: var(--text);
  background: rgba(255, 125, 237, 0.1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
}

.bulk-bar.is-visible {
  display: flex;
}

.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 14px;
}

.inv-card {
  padding-top: 8px;
}

.inv-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.inv-card__check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
}

.inv-card__check input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}

.inv-card__tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: color 140ms var(--ease), background 140ms var(--ease), border-color 140ms var(--ease);
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.icon-btn--danger:hover {
  color: #fff;
  background: rgba(255, 92, 122, 0.32);
  border-color: rgba(255, 92, 122, 0.55);
}

.icon-btn svg {
  width: 14px;
  height: 14px;
}

.inv-card.is-off {
  opacity: 0.58;
}

.inv-card.is-off::before {
  content: "Hidden";
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  padding: 2px 8px;
  color: #241600;
  background: var(--accent);
  border-radius: var(--radius-pill);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  gap: 6px;
  margin-top: 8px;
}

.editor input {
  min-width: 0;
  height: 32px;
  padding: 0 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 12px;
  outline: none;
}

.editor input:focus {
  border-color: var(--line-strong);
  box-shadow: var(--ring);
}

.editor__save {
  grid-column: 1 / -1;
}

.editor.is-dirty input {
  border-color: rgba(255, 125, 237, 0.6);
}

.panel {
  padding: clamp(16px, 3vw, 24px);
  margin-bottom: 16px;
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel__title {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.panel__hint {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  max-width: 62ch;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field--wide {
  grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  outline: none;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--line-strong);
  box-shadow: var(--ring);
}

.field input[type="file"] {
  padding: 7px;
  font-size: 12.5px;
}

.field input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 12px;
  color: #22001d;
  background: var(--brand);
  border: 0;
  border-radius: 7px;
  font-weight: 850;
  cursor: pointer;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.form-note {
  min-height: 17px;
  margin-top: 10px;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 800;
}

.form-note.is-error {
  color: var(--danger);
}

.form-note.is-ok {
  color: var(--ok);
}

.notice {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #ffe9fb;
  background: rgba(255, 125, 237, 0.09);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.55;
}

.notice strong {
  font-size: 14px;
}

.notice--warn {
  color: #fff3cf;
  background: rgba(255, 210, 51, 0.1);
  border-color: rgba(255, 210, 51, 0.42);
}

.preview-stage {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 12px;
  border: 1px dashed rgba(255, 141, 240, 0.3);
  border-radius: var(--radius);
}

.preview-stage .card {
  width: min(100%, 230px);
}

.preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  width: 100%;
  max-height: 520px;
  overflow: auto;
}

.preview-list .card {
  width: 100%;
}

.preview-count {
  grid-column: 1 / -1;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 850;
}

/* ---------- Utilities ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.stack {
  display: grid;
  gap: 14px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.row--between {
  justify-content: space-between;
}

.spacer {
  flex: 1 1 auto;
}

.mono {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero__side {
    max-width: 380px;
  }
}

@media (max-width: 820px) {
  .topbar {
    flex-wrap: wrap;
  }

  .search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
  }

  .nav__link {
    display: none;
  }

  .inv-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }
}

@media (max-width: 620px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .filterbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card {
    padding: 8px;
  }

  .card__name {
    font-size: 14px;
    min-height: 33px;
  }

  .card__price {
    font-size: 14.5px;
  }

  .inv-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .shell {
    padding-inline: 10px;
  }

  .brand__tag {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .editor {
    grid-template-columns: minmax(0, 1fr) 56px;
  }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .card--featured {
    animation: none;
    transform: none;
  }

  .skeleton {
    background: rgba(255, 255, 255, 0.06);
  }
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.check-inline input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}

.check-inline:hover {
  color: var(--text);
}

/* ---------- Refresh report ---------- */

.refresh-report {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.refresh-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
}

.refresh-head strong {
  color: var(--text);
  font-size: 13.5px;
}

.refresh-head span {
  padding: 2px 9px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
}

.refresh-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.refresh-list {
  max-height: 190px;
  margin: 10px 0;
  padding: 8px 10px;
  overflow: auto;
  list-style: none;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  font-size: 12.5px;
}

.refresh-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.refresh-list li:last-child {
  border-bottom: 0;
}

.refresh-list li span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.refresh-list li.more {
  color: var(--brand);
  font-weight: 800;
}

.refresh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* ---------- Admin rail ---------- */

.admin-layout {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  transition: grid-template-columns 200ms var(--ease);
}

.admin-layout.is-collapsed {
  grid-template-columns: 68px minmax(0, 1fr);
}

.admin-content {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 10px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(44, 12, 68, 0.9), rgba(18, 5, 32, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.sidebar__toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  transition: color 140ms var(--ease), background 140ms var(--ease);
}

.sidebar__toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar__toggle svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.sidebar__toggle span {
  white-space: nowrap;
  overflow: hidden;
}

.sidebar__nav {
  display: grid;
  gap: 4px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: color 140ms var(--ease), background 140ms var(--ease), border-color 140ms var(--ease);
}

.side-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.side-link.is-active {
  color: #22001d;
  background: linear-gradient(180deg, #ff96f2, #ff6fe6);
  border-color: transparent;
  box-shadow: 0 10px 22px -14px rgba(255, 125, 237, 0.9);
}

.side-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.side-link__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-layout.is-collapsed .side-link,
.admin-layout.is-collapsed .sidebar__toggle {
  justify-content: center;
  padding: 0;
}

.admin-layout.is-collapsed .side-link__label,
.admin-layout.is-collapsed .sidebar__toggle span {
  display: none;
}

/* ---------- Cost panel ---------- */

.cost-bulk {
  align-items: flex-end;
  margin-bottom: 12px;
}

.cost-bulk__field {
  width: min(240px, 100%);
}

.cost-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cost-card {
  padding: 10px;
}

.cost-card.is-dirty {
  border-color: rgba(255, 125, 237, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 125, 237, 0.22), var(--shadow-soft);
}

.cost-card .card__name {
  font-size: 15px;
}

/* Keep the plate big but stop runaway height on very wide screens. */
.cost-card .card__media {
  max-height: 340px;
}

.cost-card__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.cost-card__stat {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cost-card__stat span {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cost-card__stat b {
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cost-card__cost {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-top: 8px;
}

.cost-card__cost label {
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cost-card__cost input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  text-align: right;
  outline: none;
}

.cost-card__cost input:focus {
  border-color: var(--line-strong);
  box-shadow: var(--ring);
}

.cost-card.is-dirty .cost-card__cost input {
  border-color: rgba(255, 125, 237, 0.65);
}

.cost-card__margin {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.cost-card__margin span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cost-card__margin b {
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

/* ---------- Sold state ---------- */

.inv-card.is-sold {
  border-color: rgba(89, 240, 165, 0.38);
}

.sold-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 9px;
  color: var(--muted);
  background: rgba(89, 240, 165, 0.08);
  border: 1px solid rgba(89, 240, 165, 0.26);
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.35;
}

.sold-strip__badge {
  padding: 2px 8px;
  color: #04200f;
  background: var(--ok);
  border-radius: var(--radius-pill);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sold-strip span {
  white-space: nowrap;
}

.sold-strip i {
  font-style: normal;
  font-weight: 900;
}

/* ---------- Sale form ---------- */

.sale-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.sale-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sale-form input {
  width: 100%;
  height: 34px;
  padding: 0 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}

.sale-form input:focus {
  border-color: var(--line-strong);
  box-shadow: var(--ring);
}

.sale-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------- Sales panel ---------- */

.sale-facts {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.sale-facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.sale-facts span {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sale-facts b {
  max-width: 62%;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sale-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-top: 10px;
}

.cost-margin--pos {
  color: var(--ok);
}

.cost-margin--neg {
  color: var(--danger);
}

.cost-margin--none {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .cost-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .admin-layout,
  .admin-layout.is-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .sidebar__nav {
    display: flex;
    flex-wrap: wrap;
  }

  .side-link {
    flex: 0 1 auto;
    min-height: 36px;
    padding: 0 12px;
  }

  /* A collapsed rail makes no sense on a narrow screen: labels come back. */
  .admin-layout.is-collapsed .side-link,
  .admin-layout.is-collapsed .sidebar__toggle {
    justify-content: flex-start;
    padding: 0 12px;
  }

  .admin-layout.is-collapsed .side-link__label,
  .admin-layout.is-collapsed .sidebar__toggle span {
    display: inline;
  }
}

@media (max-width: 700px) {
  .cost-grid {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) {
  .card--featured {
    animation: none;
  }

  .card:hover {
    transform: none;
  }
}




