:root {
  --bg: #0b0f19;
  --panel: #111827;
  --sidebar: #121a2e;
  --card: #1e2740;
  --card-2: #232d48;
  --line: #2a3450;
  --text: #f4f6fb;
  --muted: #94a0b8;
  --yellow: #ffe500;
  --yellow-ink: #111;
  --green: #10b981;
  --red: #ef4444;
  --display: 'Bebas Neue', ui-sans-serif, system-ui, sans-serif;
  --body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: var(--body); min-height: 100%; }
body { -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 72px; z-index: 20;
  background: var(--sidebar); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; padding: 14px 0;
}
.sidebar-logo img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.sidebar-nav { display: flex; flex-direction: column; gap: 8px; margin-top: 36px; }
.sidebar-nav a, .sidebar-profile {
  width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center;
  color: var(--muted); transition: background .15s, color .15s;
}
.sidebar-nav a:hover, .sidebar-profile:hover { color: var(--text); background: rgba(255,255,255,.04); }
.sidebar-nav a.active, .sidebar-profile.active { background: #1f2a44; color: var(--yellow); }
.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sidebar-support:hover { color: #f472b6 !important; }
.support-link { margin-top: 18px; }
.support-link svg { color: #f472b6; }
.help-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: #15203a; color: var(--text); font-weight: 700; font-size: 14px;
}
.help-btn:hover { border-color: var(--yellow); color: var(--yellow); }

.main { flex: 1; margin-left: 72px; min-width: 0; padding-bottom: 40px; }

.bottom-nav { display: none; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 64px 24px 56px; border-bottom: 1px solid var(--line); }
.ticker {
  display: inline-flex; align-items: stretch; margin: 0 auto 24px;
  background: linear-gradient(180deg, #151d33, #10172a); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.04);
}
.ticker-item { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 22px; min-width: 150px; }
.ticker-label { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ticker-clock {
  font-family: 'Bebas Neue', sans-serif; font-size: 30px; line-height: 1.05; color: var(--yellow);
  letter-spacing: .04em; font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(255,229,0,.25); white-space: nowrap;
}
.ticker-clock small { font-size: 16px; color: #c9d1e1; text-shadow: none; }
.ticker-sec { opacity: .7; }
.ticker-sub { font-size: 11px; color: var(--muted); }
.ticker-sep { width: 1px; background: var(--line); margin: 10px 0; }
.hero-logo { width: 72px; height: 72px; margin: 0 auto 26px; object-fit: cover; }
.eyebrow { font-size: 14px; letter-spacing: .28em; font-weight: 600; color: #c9d1e1; text-transform: uppercase; }
.hero h1 {
  font-family: var(--display); font-weight: 400; font-size: clamp(44px, 6vw, 60px); line-height: .95;
  letter-spacing: .01em; margin-top: 12px; display: inline-block;
}
.hero h1 .underline { display: inline-block; position: relative; padding-bottom: 6px; }
.hero h1 .underline::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 5px; border-radius: 3px; background: var(--yellow);
}
.hero p.tag { margin-top: 30px; font-size: 18px; color: #c3cad8; }
.hero p.tag b { color: var(--yellow); }
.search {
  display: block; max-width: 672px; margin: 28px auto 0; position: relative;
}
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input {
  width: 100%; height: 48px; border-radius: 6px; border: 1px solid #344061; background: #161f36;
  padding: 0 16px 0 48px; font-size: 16px; outline: none; transition: border-color .15s;
}
.search input::placeholder { color: #a6aec0; }
.search input:focus { border-color: var(--yellow); }

/* ---------- Catalog ---------- */
.container { max-width: 1160px; margin: 0 auto; padding: 32px 40px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid #344061; color: #c9d1e1;
  font-size: 14px; font-weight: 500; transition: all .15s;
}
.chip:hover { border-color: #56628a; color: var(--text); }
.chip.active { background: var(--yellow); border-color: var(--yellow); color: var(--yellow-ink); font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s, border-color .2s, box-shadow .2s;
  animation: rise .45s ease both;
}
.card:hover { transform: translateY(-3px); border-color: #3d4a70; box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.cover { position: relative; aspect-ratio: 3 / 4; background: #0f1527; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .cover img { transform: scale(1.03); }
.badge {
  position: absolute; top: 8px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
}
.badge.type { left: 8px; background: rgba(17, 24, 39, .85); color: #e6eaf3; }
.badge.pdf { right: 8px; background: var(--green); color: #fff; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: .02em; text-transform: uppercase; line-height: 1.1; }
.card-body .meta { font-size: 14px; color: var(--muted); }
.price {
  align-self: flex-start; margin: 6px 0 10px; background: var(--yellow); color: var(--yellow-ink);
  font-weight: 700; font-size: 15px; padding: 3px 11px; border-radius: 999px;
}
.card-body .btn { margin-top: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 4px; font-weight: 600; font-size: 14px; transition: filter .15s, background .15s, opacity .15s;
}
.btn svg.icon { width: 17px; height: 17px; }
.btn-primary { background: var(--yellow); color: var(--yellow-ink); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { border: 1px solid var(--line); background: #1a2339; }
.btn-ghost:hover { border-color: #46547d; }
.btn-danger { color: #fca5a5; border: 1px solid #5b2633; background: #2a1520; }
.btn-success { background: var(--green); color: #fff; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }

.empty { text-align: center; color: var(--muted); padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty svg.icon { width: 40px; height: 40px; margin: 0 auto 14px; color: #4b5778; }
.empty h3 { color: var(--text); font-size: 18px; margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }

.skeleton { background: linear-gradient(90deg, #1a2238 0%, #222c47 50%, #1a2238 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
.skeleton.card-sk { height: 520px; }

/* ---------- Page heads ---------- */
.page-head { padding: 44px 40px 0; max-width: 1160px; margin: 0 auto; }
.page-head h1 { font-family: var(--display); font-weight: 400; font-size: 44px; letter-spacing: .02em; }
.page-head p { color: var(--muted); margin-top: 4px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--yellow); color: var(--yellow-ink); display: grid; place-items: center; }
.auth-icon svg.icon { width: 26px; height: 26px; }
.auth h1 { font-size: 30px; font-weight: 800; margin-top: 18px; letter-spacing: -.02em; }
.auth .sub { color: var(--muted); margin-top: 8px; }
.auth-card { width: 100%; max-width: 448px; margin-top: 40px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.auth-foot { margin-top: 22px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-foot a { color: var(--yellow); font-weight: 600; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.input-wrap { position: relative; }
.input-wrap svg.icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.input, .input-wrap input, select.input, textarea.input {
  width: 100%; height: 48px; border-radius: 6px; border: 1px solid #344061; background: #222c47;
  padding: 0 14px; font-size: 15px; outline: none; transition: border-color .15s;
}
.input-wrap input { padding-left: 40px; }
textarea.input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus, .input-wrap input:focus { border-color: var(--yellow); }
.form-error { background: #2a1520; border: 1px solid #5b2633; color: #fca5a5; font-size: 14px; padding: 10px 12px; border-radius: 6px; margin-bottom: 16px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(3, 6, 14, .72); backdrop-filter: blur(3px); z-index: 50; display: grid; place-items: center; padding: 20px; animation: fade .15s ease; }
.modal { width: 100%; max-width: 460px; max-height: calc(100vh - 40px); overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px; position: relative; animation: pop .2s ease; }
.modal.wide { max-width: 640px; }
.modal h2 { font-size: 20px; font-weight: 700; padding-right: 30px; }
.modal .close { position: absolute; top: 16px; right: 16px; color: var(--muted); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; }
.modal .close:hover { background: rgba(255,255,255,.06); color: var(--text); }
.buy-item { display: flex; gap: 14px; align-items: center; margin: 18px 0; padding: 12px; background: #172038; border-radius: 10px; }
.buy-item img { width: 56px; height: 75px; object-fit: cover; border-radius: 4px; }
.buy-item h4 { font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: .02em; }
.buy-item .meta { color: var(--muted); font-size: 13px; }
.qr-box { background: #fff; border-radius: 12px; padding: 14px; width: 240px; margin: 0 auto; }
.qr-box img { width: 100%; }
.qr-missing { text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; padding: 30px 16px; font-size: 14px; }
.steps { list-style: none; counter-reset: s; margin: 18px 0; display: grid; gap: 10px; font-size: 14px; color: #c9d1e1; }
.steps li { counter-increment: s; display: flex; gap: 10px; }
.steps li::before { content: counter(s); flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--yellow); color: var(--yellow-ink); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.pay-account { text-align: center; margin-top: 10px; font-size: 14px; color: var(--muted); }
.pay-account b { color: var(--text); }
.pay-methods { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.pay-methods span { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border, #2a3550); font-size: 12px; font-weight: 600; color: #c9d1e1; }
.amount { text-align: center; font-size: 32px; font-weight: 800; color: var(--yellow); margin: 12px 0 2px; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #1a2339; border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: 8px; padding: 12px 16px; font-size: 14px; max-width: 340px; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: pop .2s ease; }
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }

/* ---------- Collection / profile / admin ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; text-transform: capitalize; align-self: flex-start; }
.status.pending { background: rgba(255, 229, 0, .12); color: var(--yellow); }
.status.paid { background: rgba(16, 185, 129, .14); color: #34d399; }
.status.rejected { background: rgba(239, 68, 68, .14); color: #fca5a5; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.profile-top { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--yellow); color: var(--yellow-ink); display: grid; place-items: center; font-family: var(--display); font-size: 30px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { background: #172038; border-radius: 10px; padding: 14px; }
.stat b { font-size: 24px; display: block; }
.stat span { color: var(--muted); font-size: 13px; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 24px 0; }
.tab { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--yellow); border-color: var(--yellow); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid #222b45; vertical-align: middle; }
td .row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.thumb { width: 40px; height: 54px; object-fit: cover; border-radius: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.upload-row { display: flex; align-items: center; gap: 12px; }
.upload-row img { width: 54px; height: 72px; object-fit: cover; border-radius: 4px; background: #0f1527; }
.file-name { font-size: 13px; color: var(--muted); }

.help-list { display: grid; gap: 14px; margin-top: 16px; font-size: 14px; color: #c9d1e1; line-height: 1.55; }
.help-list b { color: var(--text); display: block; margin-bottom: 2px; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding-bottom: 90px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: 64px;
    background: var(--sidebar); border-top: 1px solid var(--line);
  }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; }
  .bottom-nav a.active { color: var(--yellow); }
  .hero { padding: 44px 18px 36px; }
  .ticker-item { padding: 8px 12px; min-width: 0; }
  .ticker-clock { font-size: 24px; }
  .ticker-clock small { font-size: 13px; }
  .hero p.tag { font-size: 16px; }
  .container { padding: 24px 16px; }
  .page-head { padding: 32px 16px 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-body { padding: 12px; }
  .card-body h3 { font-size: 18px; }
  .card-body .btn { height: 40px; font-size: 13px; padding: 0 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
  #toasts { left: 16px; right: 16px; bottom: 80px; }
}

/* Admin pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.pricing-grid .panel { margin: 0; }
.pricing-grid + .panel { margin-top: 16px; }
.price-input { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; max-width: 200px; }
.price-input > span { font-weight: 700; color: var(--yellow); }
.price-list { display: grid; gap: 8px; }
.price-row { display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.02); border: 1px solid var(--line); }
.price-row .price-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.price-row .price-title small { color: var(--muted); font-size: 12px; }
.price-row .price-input { margin: 0; width: 140px; }

/* Zoomable covers */
img[data-zoom] { cursor: zoom-in; }
.zoom-hint {
  position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 999px;
  display: grid; place-items: center; background: rgba(10, 14, 26, .78); color: #fff;
  pointer-events: none; opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s;
}
.zoom-hint .icon { width: 17px; height: 17px; }
.card:hover .zoom-hint { opacity: 1; transform: none; }
@media (hover: none) { .zoom-hint { opacity: .9; transform: none; } }

.zoom-view {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; overflow: hidden;
  background: rgba(3, 6, 14, .94); touch-action: none; user-select: none; animation: fade .15s ease;
}
.zoom-view img {
  max-width: min(92vw, 900px); max-height: 86vh; object-fit: contain; border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6); cursor: zoom-in; will-change: transform;
}
.zoom-view.zoomed img { cursor: grab; border-radius: 0; }
.zoom-view.zoomed img:active { cursor: grabbing; }
.zoom-bar {
  position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; padding: 5px;
  background: rgba(23, 32, 56, .9); border: 1px solid var(--line); border-radius: 12px;
}
.zoom-bar button { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: var(--text); }
.zoom-bar button:hover { background: rgba(255, 255, 255, .08); }
.zoom-tip {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 12px; color: var(--muted); background: rgba(23, 32, 56, .85); padding: 6px 12px; border-radius: 999px;
  transition: opacity .2s;
}
.zoom-view.zoomed .zoom-tip { opacity: 0; }
@media (max-width: 480px) { .zoom-tip { font-size: 11px; } }
