:root {
  color: #17212b;
  background: #f5f7fa;
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: #f5f7fa; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; text-decoration: none; }

.site-header { height: 68px; background: #fff; border-bottom: 1px solid #e7ebef; }
.bar { width: min(1120px, calc(100% - 32px)); height: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #17212b; font-size: 16px; font-weight: 750; letter-spacing: 0; }
.brand-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: #1473e6; color: #fff; font-size: 14px; }
.header-links { display: flex; align-items: center; gap: 18px; color: #5e6c78; font-size: 14px; }
.header-links a:hover { color: #1473e6; }

.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.hero { position: relative; min-height: 370px; overflow: hidden; background: #16375b; color: #fff; }
.hero .shell { min-height: 370px; display: grid; grid-template-columns: minmax(0, 1fr) 400px; align-items: center; gap: 58px; }
.eyebrow { margin: 0; color: #8fd5ff; font-size: 12px; font-weight: 700; letter-spacing: 0; }
h1 { max-width: 640px; margin: 13px 0 0; color: #fff; font-size: 42px; line-height: 1.16; font-weight: 720; letter-spacing: 0; }
.hero-copy { max-width: 560px; margin: 18px 0 0; color: #d4e3f0; font-size: 16px; line-height: 1.75; }
.hero-points { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 27px; color: #e7f1f8; font-size: 13px; }
.hero-points span { display: inline-flex; align-items: center; gap: 8px; }
.hero-points i { width: 7px; height: 7px; border-radius: 50%; background: #5ad6a0; }
.hero-visual { position: relative; align-self: end; height: 322px; }
.hero-visual img { position: absolute; right: 0; bottom: -8px; width: 385px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(0,0,0,.23)); }

.main-grid { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(320px, .87fr); gap: 24px; padding: 34px 0 48px; }
.panel { border: 1px solid #e1e7ed; border-radius: 7px; background: #fff; box-shadow: 0 4px 18px rgba(18, 42, 66, .04); }
.redeem-panel { padding: 27px; }
.section-label { margin: 0; color: #1473e6; font-size: 12px; font-weight: 750; letter-spacing: 0; }
h2 { margin: 8px 0 0; color: #17212b; font-size: 25px; line-height: 1.25; font-weight: 720; letter-spacing: 0; }
.section-copy { margin: 10px 0 0; color: #6b7885; font-size: 14px; line-height: 1.6; }
.form-stack { display: grid; gap: 18px; margin-top: 25px; }
.field { display: grid; gap: 8px; }
.field label, .fieldset-label { color: #435160; font-size: 13px; font-weight: 650; }
.input, .textarea, .select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cfd8e1; border-radius: 5px; background: #fff; color: #17212b; outline: none; transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 124px; resize: vertical; line-height: 1.45; }
.input:focus, .textarea:focus, .select:focus { border-color: #1473e6; box-shadow: 0 0 0 3px rgba(20, 115, 230, .14); }
.input::placeholder, .textarea::placeholder { color: #9ba8b4; }
.input.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; text-transform: uppercase; }
.segment { display: grid; grid-template-columns: repeat(2, 1fr); padding: 3px; border: 1px solid #d5dee7; border-radius: 6px; background: #f6f8fa; }
.segment button { min-height: 34px; border: 0; border-radius: 4px; background: transparent; color: #637180; font-size: 13px; font-weight: 650; }
.segment button.active { background: #fff; color: #1473e6; box-shadow: 0 1px 3px rgba(19, 42, 66, .12); }
.help { margin: 0; color: #7b8794; font-size: 12px; line-height: 1.55; }
.primary { min-height: 45px; border: 1px solid #1267cd; border-radius: 5px; background: #1473e6; color: #fff; font-size: 14px; font-weight: 700; }
.primary:hover:not(:disabled) { background: #0e67cf; }
.secondary { min-height: 42px; border: 1px solid #ccd8e3; border-radius: 5px; background: #fff; color: #28465f; font-size: 13px; font-weight: 650; }
.secondary:hover { border-color: #1473e6; color: #1473e6; }
.danger { border-color: #e6c0c1; color: #b3292e; }
.notice { display: none; margin-top: 18px; padding: 12px 13px; border-radius: 5px; font-size: 13px; line-height: 1.5; }
.notice.show { display: block; }
.notice.info { border: 1px solid #b9daf9; background: #eff8ff; color: #1e5e93; }
.notice.success { border: 1px solid #bde4d0; background: #f0fbf5; color: #247148; }
.notice.error { border: 1px solid #edc3c3; background: #fff6f5; color: #a63131; }
.quote { display: none; grid-template-columns: 1fr auto; gap: 14px; align-items: center; margin-top: 18px; padding: 16px; border: 1px solid #c5e4d4; border-radius: 6px; background: #f4fbf7; }
.quote.show { display: grid; }
.quote small { display: block; color: #628071; font-size: 12px; }
.quote strong { display: block; margin-top: 3px; color: #184b31; font-size: 19px; }
.quote .plan-tag { padding: 5px 8px; border-radius: 4px; background: #d9f2e5; color: #216640; font-size: 12px; font-weight: 700; }
.order-result { display: none; margin-top: 18px; padding: 15px; border: 1px solid #bde4d0; border-radius: 6px; background: #f0fbf5; color: #1d623d; }
.order-result.show { display: block; }
.order-result strong { display: block; font-size: 14px; }
.order-result p { margin: 7px 0 0; font-size: 13px; line-height: 1.5; }

.side-stack { display: grid; gap: 18px; align-content: start; }
.card-config { padding: 23px; }
.key-value { display: grid; gap: 0; margin-top: 18px; border-top: 1px solid #edf0f3; }
.key-value div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid #edf0f3; color: #5e6c78; font-size: 13px; }
.key-value strong { color: #1e2d3c; font-weight: 680; text-align: right; }
.plans { padding: 23px; }
.plan-list { display: grid; gap: 10px; margin-top: 17px; }
.plan-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: center; padding: 10px 0; border-bottom: 1px solid #edf0f3; }
.plan-row:last-child { border-bottom: 0; }
.plan-index { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 5px; background: #eef6ff; color: #1473e6; font-size: 12px; font-weight: 750; }
.plan-row strong { color: #1e2d3c; font-size: 14px; }
.plan-row small { display: block; margin-top: 2px; color: #7a8894; font-size: 12px; }
.plan-row span:last-child { color: #51616f; font-size: 13px; font-variant-numeric: tabular-nums; }

.footer { padding: 21px 0; border-top: 1px solid #e1e7ed; background: #fff; color: #81909d; font-size: 12px; }
.footer .bar { justify-content: space-between; }

.admin-page { min-height: 100vh; background: #f5f7fa; }
.admin-header { height: 64px; background: #172c40; color: #fff; }
.admin-header .brand { color: #fff; }
.admin-header .brand-mark { background: #23a6d5; }
.admin-header .header-links { color: #d5e2ec; }
.admin-shell { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 48px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.admin-head h1 { margin: 0; color: #17212b; font-size: 29px; }
.admin-head p { margin: 8px 0 0; color: #72808c; font-size: 13px; }
.admin-auth { width: min(430px, calc(100% - 32px)); margin: 86px auto; padding: 28px; }
.admin-auth h1 { color: #17212b; font-size: 28px; }
.admin-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; }
.admin-layout .panel { padding: 21px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.stat { min-height: 72px; padding: 11px; border: 1px solid #e4eaf0; border-radius: 5px; background: #f9fafb; }
.stat span { color: #7a8792; font-size: 12px; }
.stat strong { display: block; margin-top: 7px; color: #1d2c3a; font-size: 21px; font-variant-numeric: tabular-nums; }
.admin-main { min-width: 0; display: grid; gap: 22px; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 18px; }
.admin-toolbar .field { width: 130px; }
.admin-toolbar .field.wide { width: 210px; }
.admin-toolbar button { padding: 0 14px; }
.table-wrap { overflow-x: auto; margin-top: 20px; border: 1px solid #e3e9ee; border-radius: 5px; }
table { width: 100%; min-width: 760px; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 13px; border-bottom: 1px solid #eaf0f3; color: #4f5f6d; font-size: 12px; text-align: left; white-space: nowrap; }
th { background: #f7f9fa; color: #63727f; font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #263c4f; }
.status { display: inline-block; padding: 3px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.status.active { background: #e6f7ed; color: #277548; }
.status.reserved { background: #fff4d6; color: #966800; }
.status.redeemed { background: #e8f2ff; color: #2565a6; }
.status.disabled, .status.expired { background: #eef1f3; color: #65717a; }
.row-actions { display: flex; gap: 6px; }
.icon-button { min-height: 29px; padding: 0 8px; border: 1px solid #d3dde5; border-radius: 4px; background: #fff; color: #486072; font-size: 11px; }
.icon-button:hover { border-color: #1473e6; color: #1473e6; }
.empty { padding: 40px; color: #83909b; font-size: 13px; text-align: center; }

@media (max-width: 820px) {
  .hero .shell { grid-template-columns: 1fr; gap: 0; min-height: 460px; padding-top: 48px; align-items: start; }
  h1 { font-size: 34px; }
  .hero-visual { height: 180px; }
  .hero-visual img { width: 270px; bottom: -8px; }
  .main-grid, .admin-layout { grid-template-columns: 1fr; }
  .admin-layout { gap: 16px; }
}
@media (max-width: 520px) {
  .bar, .shell, .admin-shell { width: min(100% - 24px, 1120px); }
  .header-links { gap: 12px; font-size: 12px; }
  .hero .shell { min-height: 470px; padding-top: 41px; }
  .hero-copy { font-size: 14px; }
  .hero-points { gap: 11px; font-size: 12px; }
  .redeem-panel { padding: 20px; }
  .main-grid { padding-top: 20px; }
  .admin-head { display: block; }
  .admin-head button { margin-top: 13px; }
  .admin-toolbar .field, .admin-toolbar .field.wide { width: 100%; }
}
