:root {
  --ink: #102a35;
  --night: #0b2a35;
  --jade: #25b894;
  --jade-dark: #137c65;
  --paper: #f7f3e9;
  --white: #fff;
  --coral: #e96f55;
  --amber: #c88924;
  --muted: #667b82;
  --line: rgba(16, 42, 53, 0.16);
  --radius: 14px;
}

/* Font Awesome Free 7.3.1, Solid. Fonticons, Inc. */
@font-face {
  font-family: "Font Awesome 7 Free";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("/__access/fa-solid-900.woff2") format("woff2");
}
.fa-solid { display: inline-block; width: 1.25em; font-family: "Font Awesome 7 Free"; font-style: normal; font-weight: 900; line-height: 1; text-align: center; -webkit-font-smoothing: antialiased; }
.fa-eye::before { content: "\f06e"; }
.fa-eye-slash::before { content: "\f070"; }
.fa-chevron-down::before { content: "\f078"; }
.fa-check::before { content: "\f00c"; }

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  color: var(--ink);
  background-color: var(--night);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  letter-spacing: 0;
}

button, input { font: inherit; letter-spacing: 0; }
button:focus-visible, input:focus-visible, .reason-option input:focus-visible + span {
  outline: 3px solid rgba(37, 184, 148, 0.35);
  outline-offset: 2px;
}

main { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.pass { position: relative; width: min(100%, 460px); overflow: hidden; border-radius: var(--radius); background: var(--paper); box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34); }
.route-line { display: grid; grid-template-columns: 52% 29% 19%; height: 8px; }
.route-line span:nth-child(1) { background: var(--jade); }
.route-line span:nth-child(2) { background: var(--coral); }
.route-line span:nth-child(3) { background: var(--amber); }
.pass-inner { padding: 27px 30px 29px; }
.pass-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; padding-bottom: 19px; border-bottom: 1px dashed rgba(16, 42, 53, 0.24); }
.seal { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid rgba(37, 184, 148, 0.46); border-radius: 50%; background: rgba(37, 184, 148, 0.09); font-size: 22px; font-weight: 900; }
.duration { text-align: right; }
.duration strong { display: block; font: 800 26px/1 Consolas, "SFMono-Regular", monospace; }
.duration span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.eyebrow { margin: 0 0 7px; color: var(--jade-dark); font-size: 11px; font-weight: 800; text-transform: uppercase; }
h1 { margin: 0; font-size: 32px; line-height: 1.16; }
.intro { margin: 10px 0 20px; color: var(--muted); font-size: 14px; line-height: 1.7; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 20px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(16, 42, 53, 0.05); }
.tab { height: 40px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 800; }
.tab.active { background: var(--white); color: var(--night); box-shadow: 0 3px 10px rgba(16, 42, 53, 0.1); }
.panel[hidden], .status-view[hidden], .approved-code[hidden] { display: none; }
.field { margin-bottom: 15px; }
label, legend { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 800; }
input { width: 100%; height: 52px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); padding: 0 15px; color: var(--night); font-size: 16px; font-weight: 700; outline: none; transition: border-color 160ms ease, box-shadow 160ms ease; }
input:focus { border-color: var(--jade); box-shadow: 0 0 0 4px rgba(37, 184, 148, 0.13); }
input::placeholder { color: #a6b1b2; font-weight: 500; }
.secure-input { position: relative; }
.secure-input input { padding-right: 58px; }
.reveal-button { position: absolute; top: 7px; right: 7px; width: 42px; height: 38px; display: grid; place-items: center; border: 0; border-radius: var(--radius); background: rgba(16, 42, 53, 0.07); color: var(--ink); cursor: pointer; font-size: 16px; transition: background 160ms ease, color 160ms ease; }
.reveal-button:hover { background: rgba(37, 184, 148, 0.13); color: var(--jade-dark); }
.field-hint { margin: 7px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.identity-consent { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.55; cursor: pointer; }
.identity-consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--jade); }
.reason-field { min-width: 0; margin: 0 0 18px; border: 0; padding: 0; }
.reason-accordion { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: border-color 180ms ease, box-shadow 180ms ease; }
.reason-accordion:hover, .reason-accordion.is-open { border-color: rgba(37, 184, 148, 0.65); box-shadow: 0 0 0 3px rgba(37, 184, 148, 0.09); }
.reason-toggle { width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 0; background: transparent; padding: 9px 14px; color: var(--ink); cursor: pointer; text-align: left; }
.reason-toggle.has-selection strong { color: var(--jade-dark); }
.reason-toggle-copy { min-width: 0; }
.reason-toggle-copy strong, .reason-toggle-copy small { display: block; }
.reason-toggle-copy strong { font-size: 14px; line-height: 1.35; }
.reason-toggle-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.reason-toggle > .fa-chevron-down { flex: 0 0 auto; color: var(--muted); font-size: 12px; transition: transform 220ms ease, color 180ms ease; }
.reason-toggle.is-open > .fa-chevron-down { color: var(--jade-dark); transform: rotate(180deg); }
.reason-collapse { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 240ms ease, opacity 180ms ease; }
.reason-collapse.is-open { grid-template-rows: 1fr; opacity: 1; }
.reason-collapse-inner { min-height: 0; overflow: hidden; }
.reason-options { border-top: 1px solid rgba(16, 42, 53, 0.1); }
.reason-option { margin: 0; cursor: pointer; }
.reason-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.reason-option + .reason-option span { border-top: 1px solid rgba(16, 42, 53, 0.08); }
.reason-option span { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 14px; color: var(--muted); font-size: 13px; font-weight: 800; transition: background 160ms ease, color 160ms ease; }
.reason-option span > .fa-check { color: var(--jade-dark); font-size: 12px; opacity: 0; transform: scale(0.7); transition: opacity 160ms ease, transform 160ms ease; }
.reason-option:hover span { background: rgba(16, 42, 53, 0.035); color: var(--ink); }
.reason-option input:checked + span { background: rgba(37, 184, 148, 0.1); color: var(--jade-dark); }
.reason-option input:checked + span > .fa-check { opacity: 1; transform: scale(1); }
.code-input { font-family: Consolas, "SFMono-Regular", monospace; font-size: 20px; text-transform: uppercase; }
.primary-button { width: 100%; min-height: 52px; border: 0; border-radius: var(--radius); background: var(--night); color: var(--white); cursor: pointer; box-shadow: 0 12px 24px rgba(11, 42, 53, 0.18); font-size: 15px; font-weight: 800; transition: transform 160ms ease, background 160ms ease; }
.primary-button:hover { background: #123b48; transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: 0.66; transform: none; }
.message { display: none; margin: 14px 0 0; padding: 11px 13px; border-radius: var(--radius); font-size: 13px; line-height: 1.55; }
.message.show { display: block; }
.message.error { background: rgba(233, 111, 85, 0.13); color: #943927; }
.message.info { background: rgba(37, 184, 148, 0.12); color: #116d59; }

.status-view { text-align: center; }
.status-mark { width: 64px; height: 64px; display: grid; place-items: center; margin: 9px auto 17px; border-radius: 50%; background: rgba(200, 137, 36, 0.12); }
.status-mark span { width: 18px; height: 18px; border: 3px solid rgba(200, 137, 36, 0.3); border-top-color: var(--amber); border-radius: 50%; animation: spin 1s linear infinite; }
.status-view.approved .status-mark { background: rgba(37, 184, 148, 0.12); }
.status-view.approved .status-mark span { width: 24px; height: 13px; border: 0; border-left: 3px solid var(--jade-dark); border-bottom: 3px solid var(--jade-dark); border-radius: 0; transform: rotate(-45deg) translate(2px, -2px); animation: none; }
.status-view.rejected .status-mark { background: rgba(233, 111, 85, 0.13); }
.status-view.rejected .status-mark span { position: relative; width: 25px; height: 25px; border: 0; animation: none; }
.status-view.rejected .status-mark span::before, .status-view.rejected .status-mark span::after { content: ""; position: absolute; top: 11px; left: 2px; width: 21px; height: 3px; background: #943927; }
.status-view.rejected .status-mark span::before { transform: rotate(45deg); }
.status-view.rejected .status-mark span::after { transform: rotate(-45deg); }
.status-kicker { margin: 0 0 6px; color: var(--jade-dark); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.status-view h2 { margin: 0; font-size: 23px; line-height: 1.3; }
.status-copy { margin: 9px auto 18px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.application-ticket { margin: 0; border-top: 1px dashed rgba(16, 42, 53, 0.22); border-bottom: 1px dashed rgba(16, 42, 53, 0.22); }
.application-ticket div { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.application-ticket div + div { border-top: 1px solid rgba(16, 42, 53, 0.08); }
.application-ticket dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.application-ticket dd { margin: 0; color: var(--ink); font: 800 13px/1.2 Consolas, "Microsoft YaHei UI", sans-serif; }
.approved-code { margin-top: 19px; padding: 17px; border: 1px solid rgba(37, 184, 148, 0.35); border-radius: var(--radius); background: rgba(255, 255, 255, 0.7); }
.approved-code span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.approved-code strong { display: block; margin: 9px 0 15px; color: var(--night); font: 900 28px/1 Consolas, monospace; }
.text-button { border: 0; background: transparent; margin-top: 15px; padding: 8px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; }
.policy { margin: 21px 0 0; padding-top: 16px; border-top: 1px dashed rgba(16, 42, 53, 0.22); color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; }
.serial { position: absolute; right: 9px; bottom: 10px; color: rgba(16, 42, 53, 0.2); font: 700 8px/1 Consolas, monospace; writing-mode: vertical-rl; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  main { place-items: start center; padding: 10px; }
  .pass-inner { padding: 23px 19px 24px; }
  .pass-header { margin-bottom: 20px; }
  h1 { font-size: 28px; }
  .intro { font-size: 13px; }
  .serial { display: none; }
}

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