:root {
  --ink: #18211b;
  --ink-soft: #344039;
  --paper: #f4efe5;
  --paper-deep: #e9e0d1;
  --white: #fffdf8;
  --orange: #ec5b32;
  --orange-dark: #bd3d1d;
  --lime: #c9f05b;
  --green: #1c4f38;
  --line: rgba(24, 33, 27, .16);
  --muted: #6f766f;
  --shadow: 0 24px 80px rgba(24, 33, 27, .12);
  --radius: 22px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Arial Black", Impact, var(--sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
.shell { min-height: 100vh; overflow: hidden; }
.wrap { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; letter-spacing: -.04em; font-size: 20px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--paper); background: var(--ink); transform: rotate(-5deg); }
.brand em { color: var(--orange); font-style: normal; }
.site-nav { display: flex; gap: 8px; align-items: center; }
.nav-link { padding: 10px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-size: 14px; font-weight: 700; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.6); color: var(--ink); }

.hero {
  position: relative;
  min-height: 700px;
  padding: 86px 0 74px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .24;
  pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.35fr .65fr; align-items: center; gap: 72px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 900; }
.eyebrow::before { content: ""; width: 38px; height: 3px; background: var(--orange); }
.hero h1 { max-width: 800px; margin: 0; font-family: var(--display); font-size: clamp(58px, 7.3vw, 108px); line-height: .93; letter-spacing: -.07em; text-transform: uppercase; }
.hero h1 span { display: block; color: var(--orange); }
.hero-copy { max-width: 620px; margin: 32px 0 0; color: var(--ink-soft); font-size: 18px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: 999px; font-weight: 850; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: white; background: var(--orange); box-shadow: 0 12px 28px rgba(236,91,50,.25); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-dark { color: var(--paper); background: var(--ink); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,.38); }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.hero-card { position: relative; padding: 28px; color: var(--paper); background: var(--ink); border-radius: 30px; box-shadow: var(--shadow); transform: rotate(2.5deg); }
.hero-card::after { content: ""; position: absolute; right: -18px; bottom: -18px; width: 86px; height: 86px; border-radius: 50%; background: var(--lime); z-index: -1; }
.ticket-top { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 24px; border-bottom: 1px dashed rgba(255,255,255,.28); }
.ticket-number { color: var(--lime); font: 900 12px/1 var(--sans); letter-spacing: .12em; }
.ticket-icon { font-size: 34px; }
.ticket-title { margin: 28px 0 8px; font-size: 30px; letter-spacing: -.04em; }
.ticket-list { display: grid; gap: 13px; margin: 28px 0; padding: 0; list-style: none; color: rgba(255,255,255,.74); }
.ticket-list li { display: flex; align-items: center; gap: 10px; }
.ticket-list li::before { content: "✓"; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--ink); background: var(--lime); font-size: 12px; font-weight: 900; }
.privacy-stamp { padding: 14px 16px; color: var(--lime); border: 1px solid rgba(201,240,91,.45); border-radius: 14px; font-size: 12px; font-weight: 850; line-height: 1.6; }

.section { padding: 108px 0; }
.section-dark { color: var(--paper); background: var(--ink); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 44px; }
.section-kicker { margin: 0 0 12px; color: var(--orange); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 900; }
.section h2 { max-width: 720px; margin: 0; font-size: clamp(38px, 5vw, 68px); line-height: 1.02; letter-spacing: -.06em; }
.section-lead { max-width: 460px; margin: 0; color: var(--muted); line-height: 1.7; }
.section-dark .section-lead { color: rgba(255,255,255,.58); }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.plan-card { position: relative; display: flex; flex-direction: column; min-height: 420px; padding: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: transform .25s ease, box-shadow .25s ease; }
.plan-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.plan-card.featured { color: var(--paper); background: var(--green); }
.plan-card.featured .plan-description, .plan-card.featured .plan-meta { color: rgba(255,255,255,.62); }
.plan-card::before { content: attr(data-index); position: absolute; top: -24px; right: 14px; color: rgba(24,33,27,.055); font: 900 116px/1 var(--display); }
.plan-card.featured::before { color: rgba(255,255,255,.06); }
.platform-tag { align-self: flex-start; padding: 7px 10px; color: var(--ink); background: var(--lime); border-radius: 999px; text-transform: uppercase; font-size: 11px; letter-spacing: .09em; font-weight: 900; }
.plan-card h3 { position: relative; margin: 34px 0 14px; font-size: 27px; letter-spacing: -.04em; }
.plan-description { position: relative; flex: 1; margin: 0; color: var(--muted); line-height: 1.7; }
.plan-prices { position: relative; margin: 28px 0 6px; }
.plan-price { display: flex; align-items: baseline; gap: 5px; font-size: 16px; }
.plan-price strong { font-size: 46px; letter-spacing: -.05em; }
.plan-group-price { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; color: var(--orange-dark); font-size: 13px; font-weight: 800; }
.plan-group-price strong { font-size: 20px; letter-spacing: -.03em; }
.plan-group-price em { font-style: normal; font-weight: 600; }
.plan-card.featured .plan-group-price { color: var(--lime); }
.plan-meta { margin-bottom: 20px; color: var(--muted); font-size: 13px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.14); }
.step { min-height: 260px; padding: 28px; background: var(--ink); }
.step-number { color: var(--lime); font: 900 42px/1 var(--display); }
.step h3 { margin: 52px 0 12px; font-size: 20px; }
.step p { margin: 0; color: rgba(255,255,255,.55); line-height: 1.7; font-size: 14px; }

.safety-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; align-items: center; }
.safety-card { padding: 34px; color: var(--paper); background: var(--orange); border-radius: 30px; transform: rotate(-2deg); box-shadow: var(--shadow); }
.safety-card strong { display: block; margin-bottom: 22px; font: 900 48px/1 var(--display); }
.safety-card p { margin: 0; font-size: 18px; line-height: 1.7; }
.safe-list { display: grid; gap: 12px; margin: 30px 0 0; padding: 0; list-style: none; }
.safe-list li { display: flex; gap: 15px; padding: 17px 0; border-top: 1px solid var(--line); line-height: 1.6; }
.safe-list b { color: var(--orange); }

.footer { padding: 38px 0; color: rgba(255,255,255,.58); background: #101611; font-size: 13px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer a { color: var(--paper); }

.page-hero { padding: 68px 0 48px; border-top: 1px solid var(--line); }
.page-hero h1 { margin: 0 0 16px; font-size: clamp(46px, 7vw, 80px); letter-spacing: -.065em; }
.page-hero p { max-width: 620px; color: var(--muted); line-height: 1.7; }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 12px 50px rgba(24,33,27,.06); }
.track-layout { display: grid; grid-template-columns: 390px 1fr; gap: 22px; align-items: start; padding-bottom: 100px; }
.form-grid { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--ink-soft); font-size: 13px; font-weight: 800; }
.field small { color: var(--muted); line-height: 1.5; }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 0 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; outline: none; background: #fff; }
.textarea { min-height: 96px; padding-top: 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(236,91,50,.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.empty { display: grid; place-items: center; min-height: 330px; padding: 40px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-icon { margin-bottom: 12px; font-size: 42px; }

.status-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.status-head h2 { margin: 6px 0 0; font-size: 28px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: var(--paper-deep); font-size: 12px; font-weight: 900; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pending_payment { color: var(--orange-dark); background: #ffe0d3; }
.status-active { color: #177a47; background: #dff5e9; }
.status-processing, .status-pending_confirmation { color: #8b5d00; background: #fff0c7; }
.status-failed, .status-canceled, .status-refunded { color: #9c3628; background: #fbe1dc; }
.order-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 24px 0; background: var(--line); }
.fact { padding: 18px; background: var(--white); }
.fact span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.fact strong { word-break: break-all; }
.timeline { margin: 28px 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 26px 34px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px rgba(236,91,50,.1); }
.timeline li::after { content: ""; position: absolute; left: 11px; top: 20px; bottom: 3px; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline strong { display: block; margin-bottom: 5px; }
.timeline p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 13px; }
.timeline time { display: block; margin-top: 5px; color: #9a9e99; font-size: 11px; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(13,18,14,.72); backdrop-filter: blur(10px); }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 26px; background: var(--paper); box-shadow: 0 30px 120px rgba(0,0,0,.35); }
.modal-head { position: sticky; z-index: 2; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 22px 26px; border-bottom: 1px solid var(--line); background: rgba(244,239,229,.94); backdrop-filter: blur(10px); }
.modal-head h2 { margin: 0; font-size: 22px; }
.modal-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--paper-deep); font-size: 22px; }
.modal-body { padding: 26px; }
.notice { padding: 14px 16px; border-left: 4px solid var(--orange); border-radius: 8px; color: var(--ink-soft); background: rgba(236,91,50,.08); font-size: 13px; line-height: 1.65; }
.order-price-preview { display: flex; justify-content: space-between; align-items: center; padding: 15px 16px; border: 1px solid rgba(236,91,50,.28); border-radius: 14px; color: var(--ink-soft); background: rgba(236,91,50,.08); }
.order-price-preview strong { color: var(--orange-dark); font-size: 24px; letter-spacing: -.04em; }
.receipt-code { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }
.code-box { padding: 16px; border: 1px dashed var(--line); border-radius: 14px; background: var(--white); }
.code-box span { display: block; color: var(--muted); font-size: 11px; }
.code-box strong { display: block; margin-top: 7px; font-size: 18px; letter-spacing: .05em; word-break: break-all; }
.qr-box { display: grid; place-items: center; min-height: 230px; margin: 18px 0; padding: 18px; border-radius: 18px; background: white; }
.qr-box img { display: block; width: min(230px, 100%); max-height: 260px; object-fit: contain; }
.qr-placeholder { color: var(--muted); text-align: center; line-height: 1.6; }

.toast { position: fixed; z-index: 200; left: 50%; bottom: 28px; max-width: calc(100% - 32px); padding: 12px 18px; color: white; background: var(--ink); border-radius: 999px; box-shadow: var(--shadow); transform: translate(-50%, 30px); opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: #a83925; }
.loading { opacity: .65; pointer-events: none; }

.admin-shell { min-height: 100vh; color: #eaf0eb; background: #111713; }
.admin-login { display: grid; place-items: center; min-height: 100vh; padding: 28px; background: radial-gradient(circle at 10% 10%, rgba(201,240,91,.12), transparent 32%), #111713; }
.login-card { width: min(430px, 100%); padding: 34px; border: 1px solid rgba(255,255,255,.12); border-radius: 24px; background: #19211b; box-shadow: 0 34px 100px rgba(0,0,0,.35); }
.login-card h1 { margin: 32px 0 8px; font-size: 36px; letter-spacing: -.05em; }
.login-card p { margin: 0 0 28px; color: rgba(255,255,255,.5); line-height: 1.7; }
.login-card .field label { color: rgba(255,255,255,.7); }
.login-card .input { color: white; border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.06); }
.admin-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px; border-right: 1px solid rgba(255,255,255,.1); background: #151c17; }
.admin-sidebar .brand { color: white; margin: 0 10px 40px; }
.admin-sidebar .brand-mark { color: var(--ink); background: var(--lime); }
.admin-menu { display: grid; gap: 7px; }
.admin-menu button { width: 100%; padding: 12px 14px; color: rgba(255,255,255,.58); text-align: left; border: 0; border-radius: 11px; background: transparent; font-weight: 750; }
.admin-menu button:hover, .admin-menu button.active { color: white; background: rgba(255,255,255,.08); }
.admin-sidebar-foot { position: absolute; bottom: 26px; left: 20px; right: 20px; display: grid; gap: 8px; }
.admin-sidebar-foot a, .admin-sidebar-foot button { padding: 10px 12px; color: rgba(255,255,255,.48); border: 0; background: transparent; text-align: left; text-decoration: none; font-size: 13px; }
.admin-main { min-width: 0; padding: 34px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.admin-top h1 { margin: 0; font-size: 32px; letter-spacing: -.04em; }
.admin-top p { margin: 6px 0 0; color: rgba(255,255,255,.46); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.stat { padding: 20px; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: #19211b; }
.stat span { color: rgba(255,255,255,.45); font-size: 12px; }
.stat strong { display: block; margin-top: 10px; color: white; font-size: 30px; }
.admin-panel { border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: #19211b; overflow: hidden; }
.admin-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-panel-head h2 { margin: 0; font-size: 17px; }
.admin-panel-head h2 { white-space: nowrap; }
.admin-search { display: flex; gap: 8px; align-items: center; }
.admin-search .input { width: 190px; min-height: 38px; }
.admin-search .select { width: 130px; min-height: 38px; }
.admin-pager { display: flex; justify-content: center; align-items: center; gap: 18px; padding: 15px; color: rgba(255,255,255,.45); border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.admin-panel .select, .admin-panel .input, .admin-panel .textarea { color: white; border-color: rgba(255,255,255,.12); background: #111713; }
.admin-panel .field label { color: rgba(255,255,255,.58); }
.admin-table-wrap { overflow: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { padding: 12px 16px; color: rgba(255,255,255,.38); text-align: left; white-space: nowrap; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.admin-table td { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.07); vertical-align: middle; }
.admin-table tbody tr { cursor: pointer; }
.admin-table tbody tr:hover { background: rgba(255,255,255,.035); }
.admin-table strong { color: white; }
.admin-muted { color: rgba(255,255,255,.45); }
.admin-content-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 16px; }
.admin-detail { padding: 22px; }
.admin-detail h3 { margin: 0 0 18px; }
.admin-detail .order-facts { background: rgba(255,255,255,.1); }
.admin-detail .fact { background: #19211b; }
.admin-detail .fact span { color: rgba(255,255,255,.4); }
.admin-detail .timeline li::after { background: rgba(255,255,255,.1); }
.admin-detail .timeline p, .admin-detail .timeline time { color: rgba(255,255,255,.42); }
.admin-form { display: grid; gap: 14px; padding: 22px; }
.plan-editor { display: grid; gap: 14px; padding: 20px; }
.plan-edit-card { display: grid; grid-template-columns: 1.2fr 112px 112px 90px 92px auto; gap: 10px; align-items: end; padding: 16px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; }
.plan-edit-card .field:first-child { min-width: 0; }
.toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; color: rgba(255,255,255,.64); font-size: 13px; }
.payment-admin { display: grid; grid-template-columns: 320px 1fr; gap: 24px; padding: 24px; }
.payment-preview { display: grid; place-items: center; min-height: 320px; border: 1px dashed rgba(255,255,255,.16); border-radius: 18px; background: #111713; }
.payment-preview img { width: 260px; max-height: 300px; object-fit: contain; }

@media (max-width: 980px) {
  .hero-grid, .safety-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-card { width: min(520px, 92%); transform: rotate(1deg); }
  .plan-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .track-layout { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 76px minmax(0, 1fr); }
  .admin-sidebar { padding-inline: 12px; }
  .admin-sidebar .brand span, .admin-menu button span, .admin-sidebar-foot { display: none; }
  .admin-sidebar .brand { margin-inline: 8px; }
  .admin-menu button { text-align: center; font-size: 20px; }
  .admin-content-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .plan-edit-card { grid-template-columns: 1fr 1fr; }
  .payment-admin { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .wrap, .site-header { width: min(100% - 28px, 1160px); }
  .site-header { padding: 17px 0; }
  .site-nav .nav-admin { display: none; }
  .hero { padding: 58px 0; }
  .hero h1 { font-size: clamp(50px, 17vw, 76px); }
  .hero-copy { font-size: 16px; }
  .hero-card { width: 100%; }
  .section { padding: 78px 0; }
  .section-head { align-items: start; flex-direction: column; }
  .plan-grid, .steps { grid-template-columns: 1fr; }
  .step { min-height: 220px; }
  .footer-inner { align-items: start; flex-direction: column; }
  .form-row, .receipt-code, .order-facts { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 0; place-items: end center; }
  .modal { max-height: 92vh; border-radius: 24px 24px 0 0; }
  .admin-layout { display: block; }
  .admin-sidebar { position: fixed; z-index: 30; top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 68px; display: flex; align-items: center; padding: 8px 14px; border-top: 1px solid rgba(255,255,255,.1); border-right: 0; }
  .admin-sidebar .brand { display: none; }
  .admin-menu { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .admin-menu button { padding: 8px; font-size: 20px; }
  .admin-main { padding: 22px 14px 90px; }
  .admin-top { align-items: start; flex-direction: column; gap: 12px; }
  .admin-search { width: 100%; flex-wrap: wrap; }
  .admin-search .input { width: 100%; }
  .stat-grid { gap: 8px; }
  .stat { padding: 15px; }
  .admin-content-grid { display: block; }
  .admin-content-grid > * + * { margin-top: 14px; }
  .plan-edit-card { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
