﻿:root {
  --bg: #0a1020;
  --panel: #111936;
  --panel-2: #172145;
  --card: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.12);
  --text: #eef4ff;
  --muted: #9fb0d0;
  --primary: #6ee7f9;
  --primary-2: #8b5cf6;
  --success: #34d399;
  --danger: #fb7185;
  --warning: #fbbf24;
  --shadow: 0 18px 60px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: radial-gradient(circle at top left, #16245a 0, transparent 32rem), var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.container { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.container.wide { width: min(1400px, calc(100% - 32px)); }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10,16,32,.82); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -.03em; font-size: 1.15rem; }
.logo { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #06111f; box-shadow: 0 10px 30px rgba(110,231,249,.22); }
.nav-links { display: flex; gap: 22px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.auth-area, #adminAuthArea { display: flex; align-items: center; gap: 10px; }
.user-pill { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); }
.btn { border: 0; border-radius: 14px; padding: 10px 16px; color: var(--text); cursor: pointer; transition: transform .16s, opacity .16s, border-color .16s; display: inline-flex; justify-content: center; align-items: center; gap: 8px; font-weight: 800; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #06111f; }
.btn.ghost { background: rgba(255,255,255,.06); border: 1px solid var(--border); }
.btn.danger { background: rgba(251,113,133,.15); border: 1px solid rgba(251,113,133,.32); color: #fecdd3; }
.btn.big { padding: 14px 20px; border-radius: 18px; }
.btn.full { width: 100%; }
.hero { padding: 82px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 48px; }
.eyebrow { color: var(--primary); text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 900; margin: 0 0 8px; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: clamp(2.25rem, 6vw, 5rem); line-height: .98; letter-spacing: -.07em; margin-bottom: 22px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); letter-spacing: -.04em; margin-bottom: 0; }
.hero-text { color: var(--muted); font-size: 1.15rem; line-height: 1.7; max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-card { min-height: 480px; position: relative; display: grid; place-items: center; }
.mock-phone { width: 300px; padding: 24px; border: 1px solid var(--border); border-radius: 34px; background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05)); box-shadow: var(--shadow); }
.qr-mini { width: 170px; height: 170px; border-radius: 20px; margin: 26px auto; background: conic-gradient(from 90deg, #fff 0 25%, #111936 0 50%, #fff 0 75%, #111936 0), repeating-linear-gradient(45deg, #111936 0 8px, #fff 8px 16px); border: 12px solid #fff; }
.screen-line { height: 13px; background: rgba(255,255,255,.18); border-radius: 999px; margin: 10px 0; }
.screen-line.w80 { width: 80%; } .screen-line.w60 { width: 60%; }
.floating-card { position: absolute; padding: 16px 20px; border-radius: 18px; background: rgba(255,255,255,.1); border: 1px solid var(--border); box-shadow: var(--shadow); font-weight: 900; }
.top-card { top: 42px; left: 25px; }
.bottom-card { right: 22px; bottom: 54px; color: #bbf7d0; }
.toolbar, .section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.toolbar { padding: 42px 0 20px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; }
.filters.compact { margin-bottom: 14px; }
.input { min-height: 44px; width: 100%; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.07); color: var(--text); padding: 10px 14px; outline: 0; }
.input:focus { border-color: rgba(110,231,249,.7); box-shadow: 0 0 0 4px rgba(110,231,249,.1); }
.input::placeholder { color: #7485a8; }
select.input option { color: #111827; }
.textarea { min-height: 120px; resize: vertical; }
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 36px; }
.product-card { border: 1px solid var(--border); border-radius: 28px; overflow: hidden; background: rgba(255,255,255,.07); box-shadow: 0 10px 40px rgba(0,0,0,.18); display: flex; flex-direction: column; }
.product-img { height: 178px; background: linear-gradient(135deg, #1e3a8a, #7c3aed); background-size: cover; background-position: center; }
.product-body { padding: 18px; display: flex; flex: 1; flex-direction: column; gap: 14px; }
.product-title { display: flex; justify-content: space-between; gap: 12px; }
.product-title h3 { margin: 0; letter-spacing: -.03em; }
.badge { display: inline-flex; align-items: center; white-space: nowrap; border: 1px solid var(--border); border-radius: 999px; padding: 5px 9px; color: var(--muted); font-size: .8rem; }
.desc { color: var(--muted); line-height: 1.55; min-height: 50px; }
.buy-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin-top: auto; }
.price { font-size: 1.25rem; font-weight: 900; color: #dffcff; }
.stock { color: var(--muted); font-size: .86rem; margin-top: 4px; }
.section { padding: 46px 0; }
.card, .muted-box, .history-box { border: 1px solid var(--border); border-radius: 26px; background: rgba(255,255,255,.07); padding: 22px; box-shadow: 0 12px 40px rgba(0,0,0,.16); }
.muted, .hint, .muted-box { color: var(--muted); }
.history-list { display: grid; gap: 12px; max-height: 560px; overflow: auto; padding-right: 6px; }
.history-item { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.045); }
.history-item { cursor: pointer; transition: border-color .16s, background .16s; }
.history-item:hover { border-color: rgba(110,231,249,.5); background: rgba(110,231,249,.06); }
.history-item.not-clickable { cursor: default; }
.history-item.not-clickable:hover { border-color: var(--border); background: rgba(255,255,255,.045); }
.key-box { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border: 1px dashed rgba(110,231,249,.55); padding: 10px 12px; border-radius: 12px; color: #dffcff; background: rgba(110,231,249,.07); }
.status { display: inline-flex; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-size: .8rem; font-weight: 800; }
.status.delivered, .status.unused { color: #bbf7d0; border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.1); }
.status.pending_payment { color: #fde68a; border-color: rgba(251,191,36,.36); background: rgba(251,191,36,.1); }
.status.sold { color: #bfdbfe; border-color: rgba(96,165,250,.34); background: rgba(96,165,250,.1); }
.status.expired, .status.disabled, .status.paid_no_stock { color: #fecdd3; border-color: rgba(251,113,133,.34); background: rgba(251,113,133,.1); }
.footer { margin-top: 46px; padding: 38px 0; border-top: 1px solid var(--border); background: rgba(0,0,0,.16); color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 24px; }
.footer h4 { color: var(--text); margin-bottom: 10px; }
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 18px; background: rgba(1,6,20,.74); backdrop-filter: blur(10px); }
.modal.open { display: grid; }
.modal-card { width: min(720px, 100%); max-height: 92vh; overflow: auto; position: relative; border: 1px solid var(--border); border-radius: 30px; background: linear-gradient(180deg, #151f43, #0d142b); padding: 24px; box-shadow: var(--shadow); }
.modal-card.small { width: min(430px, 100%); }
.close { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.06); color: var(--text); cursor: pointer; font-size: 22px; }
.tabs { display: flex; gap: 8px; margin: 4px 44px 18px 0; }
.tab { flex: 1; border: 1px solid var(--border); border-radius: 14px; color: var(--muted); background: rgba(255,255,255,.04); padding: 10px; cursor: pointer; font-weight: 900; }
.tab.active { color: #06111f; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.form { display: grid; gap: 12px; }
.payment-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.qr-img { width: 100%; border-radius: 20px; background: #fff; padding: 10px; }
.payment-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.35rem; letter-spacing: .06em; padding: 12px 14px; border-radius: 14px; background: rgba(110,231,249,.09); border: 1px dashed rgba(110,231,249,.55); color: #dffcff; text-align: center; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; background: #101936; border: 1px solid var(--border); color: var(--text); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow); transition: .18s; max-width: min(560px, calc(100% - 30px)); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.empty { text-align: center; color: var(--muted); padding: 42px; }
.hidden { display: none !important; }
.admin-main { padding-top: 30px; }
.admin-login { margin-top: 54px; }
.row-form, .product-form { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: start; }
.product-form .textarea { grid-column: span 3; min-height: 74px; }
.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin: 24px 0; }
.stat { border: 1px solid var(--border); border-radius: 22px; padding: 18px; background: rgba(255,255,255,.07); }
.stat .num { font-size: 1.6rem; font-weight: 950; margin-top: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.table-wrap { width: 100%; overflow: auto; border-radius: 18px; border: 1px solid var(--border); }
.small-table { max-height: 450px; }
.orders-table { max-height: 560px; overflow: auto; }
.orders-table .table th { position: sticky; top: 0; z-index: 2; background: #111936; }
.table { width: 100%; border-collapse: collapse; min-width: 840px; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.table tr:last-child td { border-bottom: 0; }
.admin-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.admin-product { padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.04); }
.admin-product h3 { margin-bottom: 6px; }
.product-edit-form .textarea { min-height: 78px; }
.option-edit-list { display: grid; gap: 8px; }
.option-edit-row { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; align-items: center; }
.copyable { cursor: pointer; }
@media (max-width: 980px) {
  .hero-grid, .products-grid, .footer-grid, .grid-2, .payment-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-products { grid-template-columns: 1fr; }
  .option-edit-row { grid-template-columns: 1fr; }
  .row-form, .product-form { grid-template-columns: 1fr; }
  .product-form .textarea { grid-column: auto; }
  .nav-links { display: none; }
  .toolbar, .section-head { align-items: stretch; flex-direction: column; }
}
@media (max-width: 620px) {
  .nav { min-height: auto; padding: 12px 0; align-items: flex-start; flex-direction: column; }
  .auth-area { width: 100%; }
  .auth-area .btn { flex: 1; }
  .hero { padding-top: 42px; }
  .hero-card { min-height: 390px; }
  .mock-phone { width: 250px; }
  .floating-card { display: none; }
  .history-item { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
}


