:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: #272222;
  background: #f7f6f5;
  --paper: #fff;
  --ink: #272222;
  --muted: #6f6765;
  --line: #e7e1df;
  --wash: #f8f6f5;
  --brand: #b51d2b;
  --brand-deep: #8b1422;
  --brand-pale: #fcecee;
  --green: #176951;
  --focus: #b51d2b;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
p, h1, h2, dl, dd, ol { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
h1[tabindex="-1"]:focus { outline: none; }
.boot-message { margin: 5rem auto; width: min(36rem, 100% - 2.5rem); }
.glyph { display: inline-block; line-height: .8; font-weight: 500; }
.muted { color: var(--muted); }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 2.65rem; padding: .58rem 1rem; border: 1px solid transparent; border-radius: .55rem;
  font-size: .9rem; font-weight: 620; line-height: 1.35; text-decoration: none; white-space: nowrap;
}
.primary, .danger { background: var(--brand); color: #fff; }
.primary:hover:not(:disabled), .danger:hover:not(:disabled) { background: var(--brand-deep); }
.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.secondary:hover:not(:disabled) { border-color: #c6b9b5; background: #fcfaf9; }
.outline-danger { background: #fff; border-color: #eccbd0; color: var(--brand-deep); }
.outline-danger:hover:not(:disabled) { background: var(--brand-pale); }
.full { width: 100%; }
.text-button {
  border: 0; padding: .2rem 0; background: transparent; color: var(--muted); font-size: inherit;
  line-height: 1.5; text-decoration: none;
}
.text-button:hover { text-decoration: underline; text-underline-offset: .2em; color: var(--brand-deep); }
.accent { color: var(--brand-deep); font-weight: 620; }

.field { display: grid; align-content: start; gap: .48rem; color: #514845; min-width: 0; }
.field > span:first-child, .field:has(textarea) > span { font-size: .88rem; font-weight: 600; }
:where(.pad-shell, .dialog) :is(input:not([type=checkbox]), select, textarea) {
  display: block; min-width: 0; width: 100%; min-height: 2.7rem; padding: .62rem .76rem;
  color: var(--ink); border: 1px solid #ded7d4; border-radius: .48rem; background: #fff;
}
:where(.pad-shell, .dialog) :is(input, textarea)::placeholder { color: #827775; opacity: 1; }
:where(.pad-shell, .dialog) input[aria-invalid] { border-color: var(--brand); }
:where(.pad-shell, .dialog) :is(input:not([type=checkbox]), select, textarea):focus { border-color: #b85b62; }
:where(.pad-shell, .dialog) input:disabled { color: #847b78; background: #f4f2f1; }
:where(.pad-shell, .dialog) textarea { resize: vertical; }
.password-field { position: relative; display: block; min-width: 0; }
.password-field input:not([type=checkbox]) { padding-right: 4.2rem; }
.reveal {
  position: absolute; right: .4rem; top: .22rem; bottom: .22rem; padding: 0 .55rem;
  border: 0; border-radius: .3rem; background: transparent; color: var(--muted); font-size: .82rem;
}
.reveal:hover { background: #ece7e5; color: var(--ink); }
.form-error { border-left: .18rem solid var(--brand); background: var(--brand-pale); color: #801723; border-radius: .3rem; padding: .62rem .8rem; font-size: .86rem; line-height: 1.55; }
.info-strip { padding: .65rem .8rem; font-size: .85rem; line-height: 1.6; border-radius: .45rem; background: #f4f1ef; color: #514745; }
.status-note { margin-bottom: 1.1rem; color: #175b46; background: #eaf5f0; }
.status-note.warning { color: #784f15; background: #fff3df; }
.info-strip strong { margin-left: .45rem; letter-spacing: .04em; }
.wordmark {
  border: 1.5px solid currentColor; border-radius: 28% / 18%;
  display: inline-grid; place-items: center; padding: .28em .3em; flex: none;
  font-weight: 800; line-height: 1.1; letter-spacing: .05em;
}

/* PAD */
.pad-shell { position: relative; min-height: 100dvh; display: grid; grid-template-columns: minmax(20rem, 42%) minmax(0, 1fr); }
.pad-status {
  position: absolute; z-index: 1; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: .75rem clamp(1rem, 2.25vw, 2.5rem); color: #322925; font-size: .82rem; font-weight: 620;
}
.pad-status > span:first-child { color: #fff; }
.pad-status a { justify-self: end; text-decoration: none; color: #625855; }
.pad-status a:hover { color: var(--brand-deep); text-decoration: underline; }
.status-dots { letter-spacing: .22em; color: #69615d; }
.pad-brand {
  display: flex; flex-direction: column; align-items: flex-start; position: relative; min-height: 100%;
  padding: clamp(4rem, 8vh, 7rem) clamp(1.8rem, 4.1vw, 4.7rem) clamp(2rem, 5vh, 4.6rem);
  color: #fff; background-color: #a5252d;
  background-image: linear-gradient(155deg, #c32e35e8 0%, #aa1e2bd4 53%, #6e1223df 100%), url("./PAD登录-产线背景.jpg");
  background-position: center, 51% center; background-size: cover;
}
.brand-sign { position: relative; display: flex; align-items: center; gap: .75rem; font-weight: 620; font-size: clamp(.8rem, 1.4vw, 1.2rem); }
.brand-sign .wordmark { font-size: 1.1em; }
.brand-headline { margin-top: min(13vh, 7.8rem); }
.brand-headline h2 { font-size: clamp(2.3rem, 4vw, 4.5rem); line-height: 1.18; letter-spacing: .025em; font-weight: 730; }
.brand-headline p { font-size: clamp(.95rem, 1.45vw, 1.3rem); margin-top: 1rem; color: #fff5f4; }
.brand-foot { display: flex; align-items: center; gap: .75rem; margin-top: auto; padding-top: 3rem; font-size: .91rem; letter-spacing: .1em; color: #fff0ee; }
.brand-rule { width: 2.25rem; border-top: 1px solid #ffffffaa; }
.pad-work {
  position: relative; display: grid; align-content: center; justify-items: center;
  min-width: 0; padding: 4.5rem clamp(1.3rem, 4vw, 4.5rem) 5.5rem; background: #f8f7f6;
}
.pad-card {
  width: min(100%, 31.5rem); min-width: 0; padding: clamp(1.6rem, 3.0vw, 2.6rem);
  background: #fff; border: 1px solid #f0ecea; border-radius: 1.3rem; box-shadow: 0 .55rem 2rem #54312b0d;
}
.pad-card h1 { font-size: clamp(1.9rem, 2.65vw, 2.55rem); line-height: 1.22; letter-spacing: -.04em; font-weight: 720; }
.card-intro { font-size: 1rem; color: var(--muted); margin-top: .65rem; line-height: 1.68; }
.pad-card .field > span:first-child { font-size: .93rem; }
.pad-card .field input { min-height: 3.05rem; font-size: 1rem; border-radius: .55rem; background: #faf9f8; }
.pad-card .primary, .pad-card .session-actions .secondary { min-height: 3.1rem; font-size: 1rem; }
.segment { display: grid; grid-template-columns: 1fr 1fr; padding: .24rem; gap: .23rem; border-radius: .57rem; background: #f3f0ef; margin: 1.35rem 0 1.15rem; }
.segment button { min-height: 2.53rem; padding: .4rem; border: 1px solid transparent; border-radius: .42rem; color: #625856; background: transparent; font-size: .96rem; font-weight: 590; }
.segment button[aria-pressed="true"] { color: var(--brand-deep); background: #fff; border-color: #ece4e1; box-shadow: 0 1px 3px #3a1e140d; }
.segment button:hover { color: var(--brand-deep); }
.pad-form { display: grid; gap: .94rem; }
.pad-form > .button[type="submit"] { margin-top: .16rem; }
.login-links { display: flex; justify-content: space-between; gap: 1rem; font-size: .93rem; margin-top: .78rem; }
.pad-card-footer { margin-top: 1rem; padding-top: .65rem; border-top: 1px solid #eee8e5; color: var(--muted); font-size: .87rem; }
.back-button { min-height: 2.05rem; margin: 0 0 .6rem; padding: .06rem .55rem .06rem 0; border: 0; background: transparent; color: var(--muted); font-size: .85rem; }
.back-button:hover { color: var(--brand-deep); }
.back-button .glyph { font-size: 1.5em; }
.steps {
  display: flex; gap: .8rem; padding: 0; margin: 1rem 0 1.15rem; list-style: none;
  color: var(--muted); font-size: .82rem;
}
.steps li { display: flex; align-items: center; gap: .35rem; }
.steps li + li::before { content: ""; width: clamp(.85rem, 3vw, 2.4rem); border-top: 1px solid #e4dcda; margin-right: .43rem; }
.steps span { min-width: 1.4rem; display: inline-grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 100%; }
.steps .current { color: var(--brand-deep); font-weight: 670; }
.steps .current span { color: #fff; background: var(--brand); border-color: var(--brand); }
.steps .passed span { background: #eaf5f0; color: var(--green); }
.pad-card .card-intro + .info-strip { margin-top: 1rem; }
.pad-card .info-strip + .pad-form { margin-top: .9rem; }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) 8.2rem; align-items: end; gap: .6rem; }
.pad-card .code-row .button { min-height: 3.05rem; color: var(--brand-deep); border-color: #ead9da; padding-inline: .4rem; font-size: .84rem; }
.sms-hint { padding: .65rem .75rem; color: #6f4a16; background: #fff5e4; border: 1px solid #f2e4c7; border-radius: .45rem; line-height: 1.5; font-size: .86rem; }
.identity-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); margin: 1.05rem 0; gap: .5rem; padding: .75rem .8rem; border-radius: .5rem; background: #f7f4f2; font-size: .9rem; }
.identity-summary dt { margin-bottom: .3rem; font-size: .75rem; color: var(--muted); }
.identity-summary dd { font-weight: 640; overflow-wrap: anywhere; }
.success-symbol { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; background: #e9f5ef; color: var(--green); border: 1px solid #d5eadf; border-radius: 50%; margin-bottom: .95rem; font-size: 1.75rem; }
.activation-note { border: 1px solid #edd9d9; border-radius: .6rem; background: #fdf3f3; padding: .85rem; margin: 1.1rem 0; color: var(--brand-deep); }
.activation-note p { margin-top: .32rem; color: #70535a; font-size: .87rem; line-height: 1.6; }
.activation-actions { margin-top: .7rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; font-size: .82rem; }
.pad-card .activation-actions .button { min-height: 2.3rem; font-size: .86rem; }
.session-actions { display: grid; gap: .5rem; }
.info-strip + .session-actions { margin-top: .85rem; }
.pad-demo { position: absolute; z-index: 2; right: clamp(1rem, 2.25vw, 3.5rem); bottom: 1.2rem; max-width: calc(100% - 2rem); font-size: .84rem; line-height: 1.5; }
.pad-demo summary { display: flex; align-items: center; gap: .36rem; min-height: 2.2rem; width: max-content; margin-left: auto; padding: .35rem .68rem; color: #655956; background: #fff; border: 1px solid var(--line); border-radius: .55rem; cursor: pointer; list-style: none; }
.pad-demo summary::-webkit-details-marker { display: none; }
.tiny-dot { width: .42rem; height: .42rem; border-radius: 50%; background: var(--brand); }
.pad-demo-content { position: absolute; right: 0; bottom: calc(100% + .4rem); width: min(20.5rem, 85vw); padding: .9rem; border-radius: .66rem; border: 1px solid var(--line); background: #fff; box-shadow: 0 .45rem 1.35rem #372a211f; }
.pad-demo-content dl { margin: .6rem 0; }
.pad-demo-content dl > div { display: flex; justify-content: space-between; gap: .6rem; border-bottom: 1px solid #f2eeec; padding: .2rem 0; }
.pad-demo-content dl dt { color: var(--muted); }
.demo-actions { display: flex; flex-wrap: wrap; gap: .7rem; }

/* Shared dialogs */
.dialog { width: min(31rem, 100% - 2rem); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1.45rem; margin: auto; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 1.1rem 3rem #2c13152b; }
.dialog::backdrop { background: #231e1b70; }
.dialog-header { display: flex; justify-content: space-between; align-items: start; gap: .5rem; margin-bottom: 1rem; }
.dialog-header h2 { font-size: 1.35rem; letter-spacing: -.025em; font-weight: 680; }
.dialog-header p { margin-top: .47rem; color: var(--muted); line-height: 1.55; font-size: .86rem; }
.icon-button { flex: none; width: 2.1rem; height: 2.1rem; padding: .2rem; background: #f7f4f2; color: #5a4d48; border: 1px solid transparent; border-radius: .45rem; font-size: 1.35rem; }
.icon-button:hover { border-color: var(--line); }
.dialog form { display: grid; gap: .75rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; padding-top: .8rem; margin-top: .25rem; border-top: 1px solid var(--line); }
.contact-info { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; padding: .8rem; margin-bottom: .9rem; background: #f8f5f3; border-radius: .55rem; }
.contact-info dt { color: var(--muted); font-size: .74rem; margin-bottom: .25rem; }
.contact-info dd { font-size: .86rem; min-height: 1.35rem; }
.toast { position: fixed; z-index: 5; right: 1.1rem; bottom: 1.1rem; max-width: calc(100% - 2.2rem); color: #fff; background: #362526; border-radius: .55rem; padding: .65rem .85rem; font-size: .86rem; line-height: 1.55; box-shadow: 0 .4rem 1rem #22171333; pointer-events: none; }

@media (max-width: 720px) {
  .pad-shell { grid-template-columns: 1fr; }
  .pad-brand { min-height: 13rem; padding: 3.2rem 1.35rem 1.45rem; background-position: center, 50% 58%; }
  .brand-headline { margin-top: 1.15rem; }
  .brand-headline h2 { font-size: clamp(1.65rem, 7.5vw, 2.5rem); }
  .brand-break { display: none; }
  .brand-headline p { font-size: .88rem; margin-top: .45rem; }
  .brand-foot { display: none; }
  .pad-work { padding-top: 1.4rem; min-height: 0; align-content: start; }
  .pad-status a, .status-dots { color: #fff; }
  .pad-demo { bottom: .85rem; }
}
@media (max-width: 420px) {
  .pad-work { padding-inline: .8rem; }
  .pad-card { padding-inline: 1rem; }
  .pad-status > span:first-child { font-size: .72rem; }
  .identity-summary { padding-inline: .55rem; font-size: .78rem; }
}
