:root {
  --ink: #17142c;
  --muted: #6d6a83;
  --line: #e9e8f3;
  --blue: #4058e8;
  --violet: #784de8;
  --bg: #fafaff;
  --r: 18px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.topbar { background: #15122b; color: #e7e4ff; text-align: center; font-size: 12px; padding: 9px; }
header { height: 76px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 max(24px, calc((100% - 1180px) / 2)); gap: 44px; position: sticky; top: 0; z-index: 4; }
.logo { font-size: 23px; line-height: 1.2; font-weight: 700; letter-spacing: -1.5px; color: var(--ink); }
.logo span { color: var(--blue); }
nav { display: flex; gap: 25px; flex: 1; color: #5c5871; }
nav a:hover, footer a:hover { color: var(--blue); }
.account { display: flex; gap: 16px; align-items: center; font-size: 13px; }
.account b { color: var(--blue); }
.account form { display: inline; }
.btn { display: inline-block; border: 0; border-radius: 11px; padding: 12px 17px; font-weight: 700; cursor: pointer; transition: .2s; background: #eeeefa; }
.btn:hover { transform: translateY(-2px); }
.primary { background: linear-gradient(100deg, var(--blue), var(--violet)); color: white; }
.secondary { background: #f0effb; color: var(--blue); font-size: 13px; padding: 10px 12px; }
.section, .page-title, .detail, .auth, .dashboard { max-width: 1180px; margin: auto; }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: 2px; }
.auth h1 { font-size: clamp(45px, 6vw, 78px); line-height: .98; font-weight: 700; letter-spacing: -4px; margin: 18px 0; }
.auth em { color: var(--violet); font-style: normal; }
.lead { color: var(--muted); font-size: 17px; line-height: 1.65; max-width: 500px; }
.section { padding: 40px 0 100px; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 24px; }
.section h2, .panel h2 { font-size: 28px; line-height: 1.2; font-weight: 600; margin: 8px 0; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: white; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: .25s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 35px #352b7910; }
.card img { width: 100%; height: 170px; object-fit: cover; }
.card-body { padding: 16px; }
.card-body small { color: var(--violet); font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.card h3 { font-size: 17px; line-height: 1.25; font-weight: 600; min-height: 42px; margin: 8px 0 15px; }
.meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.meta strong, .price { color: var(--blue); font-size: 19px; }
.meta span { color: var(--muted); font-size: 12px; }
.page-title { padding: 75px 0 35px; }
.page-title h1, .detail h1, .dashboard h1 { font-size: 48px; line-height: 1.1; font-weight: 700; letter-spacing: -2px; margin: 12px 0; }
.products { padding-bottom: 100px; }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; padding: 75px 0 110px; align-items: center; }
.detail > img { width: 100%; border-radius: 28px; }
.detail form { display: flex; gap: 10px; margin-top: 25px; }
.detail input { width: 70px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.auth { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; padding: 90px 0; }
.auth-copy { padding-top: 35px; }
.form { background: white; border: 1px solid var(--line); border-radius: var(--r); padding: 34px; display: flex; flex-direction: column; gap: 16px; }
.form h2 { font-size: 30px; line-height: 1.2; font-weight: 600; margin: 0 0 8px; }
.form label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.form input, .panel input { border: 1px solid var(--line); border-radius: 10px; padding: 13px; outline-color: var(--blue); }
.error { background: #fff0f2; color: #c13b55; padding: 10px; border-radius: 9px; font-size: 13px; }
.dashboard { padding: 55px 0 100px; }
.dash-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 30px; }
.balance { background: #18142f; color: white; border-radius: 16px; padding: 18px 24px; min-width: 190px; }
.balance small, .balance strong { display: block; }
.balance small { color: #bcb9d4; }
.balance strong { font-size: 26px; line-height: 1.2; font-weight: 600; margin-top: 5px; }
.dash-grid, .admin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.panel form { display: flex; gap: 9px; margin-top: 20px; }
.row { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding: 13px 0; gap: 15px; }
.row span > * { display: block; }
.row small, .muted { color: var(--muted); font-size: 12px; margin-top: 4px; }
.qr { max-width: 500px; margin: 80px auto; text-align: center; }
.qr-box { margin: 25px auto; padding: 60px 20px; border: 2px dashed #a39bed; border-radius: 20px; color: var(--violet); font-weight: 700; }
.qr-box small { display: block; color: var(--muted); margin-top: 14px; }
footer { background: #17142c; color: #dedcf0; padding: 45px max(24px, calc((100% - 1180px) / 2)); display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
footer .logo { color: white; }
footer small { grid-column: 1 / -1; color: #85819f; }

@media (max-width: 800px) {
  header { padding: 0 18px; gap: 15px; }
  nav { display: none; }
  .account { margin-left: auto; }
  .detail, .auth { grid-template-columns: 1fr; padding: 55px 20px; }
  .section, .page-title, .dashboard { padding-left: 20px; padding-right: 20px; }
  .section { padding-top: 24px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .admin-grid { grid-template-columns: 1fr; }
  .dash-head { display: block; }
  .balance { margin-top: 20px; }
  .page-title h1, .detail h1, .dashboard h1 { font-size: 40px; }
  footer { padding: 40px 20px; }
}

@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  .account a:first-child { display: none; }
  .auth h1 { font-size: 52px; }
}
