:root {
  --bg: #0b0d12;
  --bg-soft: #12151d;
  --card: #161a23;
  --card-2: #1c212c;
  --border: #262c39;
  --text: #e7eaf0;
  --muted: #9aa4b6;
  --brand: #f7931a;      /* bitcoin orange */
  --brand-2: #ffb347;
  --accent: #4f8cff;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 80% -10%, #1a2030 0%, var(--bg) 55%) fixed;
  color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.container { width: min(1180px, 92vw); margin: 0 auto; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11,13,18,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .container { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { font-weight: 800; font-size: 18px; letter-spacing: .2px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg,var(--brand),var(--brand-2)); box-shadow: 0 0 16px var(--brand); }
.nav { display: flex; gap: 16px; margin-left: 8px; }
.nav a { color: var(--muted); font-weight: 600; font-size: 14px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.spacer { flex: 1; }
.topbar .actions { display: flex; align-items: center; gap: 10px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--card-2); color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer;
  transition: transform .05s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { border-color: #39404f; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg,var(--brand),var(--brand-2)); color: #17130a; border: none; }
.btn-accent { background: var(--accent); color: #071022; border: none; }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger); color: #fff; border: none; }
.btn-sm { padding: 7px 11px; font-size: 13px; }
.btn-block { width: 100%; }

/* cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px){ .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 620px){ .grid.cols-2,.grid.cols-3,.grid.cols-4 { grid-template-columns: 1fr; } .nav { display:none; } }

/* product card */
.product { overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .1s; }
.product:hover { border-color: #3a4252; transform: translateY(-2px); }
.product .thumb { aspect-ratio: 16/10; background: linear-gradient(135deg,#1b2130,#141821); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.product .thumb img { width:100%; height:100%; object-fit: cover; }
.product .thumb .ph { font-size: 34px; opacity: .6; }
.product .body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product h3 { margin: 0; font-size: 16px; }
.product .muted { font-size: 13px; }
.product .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-weight: 800; font-size: 18px; color: var(--text); }
.tag { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--border); padding: 3px 8px; border-radius: 999px; }

/* forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { min-height: 120px; resize: vertical; }
.form-row { margin-bottom: 14px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px){ .form-grid { grid-template-columns: 1fr; } }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* misc */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.mt0{margin-top:0}.mt1{margin-top:8px}.mt2{margin-top:16px}.mt3{margin-top:28px}
.mb0{margin-bottom:0}.mb2{margin-bottom:16px}.mb3{margin-bottom:28px}
.flex { display:flex; align-items:center; gap:10px; }
.flex.between { justify-content: space-between; }
.flex.wrap { flex-wrap: wrap; }
.pill { display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:700; }
.pill.ok { background: rgba(34,197,94,.14); color: #7ee2a8; }
.pill.warn { background: rgba(245,158,11,.15); color: #ffce7a; }
.pill.bad { background: rgba(239,68,68,.15); color: #ff9898; }
.pill.info { background: rgba(79,140,255,.15); color: #a9c6ff; }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid; font-weight: 600; }
.alert.success { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.35); color:#a7f3c4; }
.alert.error { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.35); color:#fecaca; }
.alert.info { background: rgba(79,140,255,.1); border-color: rgba(79,140,255,.35); color:#cfe0ff; }

.hero { padding: 64px 0 40px; }
.hero h1 { font-size: 42px; line-height: 1.1; margin: 0 0 14px; letter-spacing: -0.02em; }
.hero p { font-size: 17px; color: var(--muted); max-width: 640px; }
.gradient-text { background: linear-gradient(135deg,var(--brand),var(--brand-2),#ffe1a8); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 620px){ .hero h1 { font-size: 32px; } }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .05em; }
tr:hover td { background: rgba(255,255,255,.02); }

.btc-box { background: var(--bg-soft); border: 1px dashed var(--border); border-radius: var(--radius); padding: 18px; }
.qr { background:#fff; padding:8px; border-radius:8px; display:inline-block; }

/* admin layout */
.admin-wrap { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--bg-soft); border-right: 1px solid var(--border); padding: 18px 14px; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { margin-bottom: 22px; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.sidebar a:hover, .sidebar a.active { background: var(--card-2); color: var(--text); text-decoration: none; }
.admin-main { flex: 1; padding: 26px 30px; max-width: 1200px; }
.stat { padding: 18px; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 28px; font-weight: 800; margin-top: 6px; }
@media (max-width: 820px){ .sidebar { display:none; } }

.footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 26px 0; color: var(--muted); font-size: 13px; }
