:root {
  --bg-base: #f5efe4;
  --bg-panel: rgba(255, 250, 242, 0.9);
  --bg-panel-strong: #fffdf9;
  --bg-hero: linear-gradient(140deg, #103c54 0%, #0f766e 54%, #2b8f68 100%);
  --ink-strong: #14212b;
  --ink-base: #274050;
  --ink-soft: #6a7780;
  --line-soft: rgba(25, 55, 74, 0.12);
  --line-strong: rgba(17, 78, 94, 0.28);
  --accent-primary: #e67e22;
  --accent-primary-deep: #c86514;
  --accent-secondary: #0f766e;
  --accent-secondary-soft: rgba(15, 118, 110, 0.12);
  --accent-warm: #f6cf7b;
  --accent-success: #2a9d6f;
  --accent-danger: #c84b31;
  --shadow-lg: 0 28px 58px rgba(27, 43, 54, 0.12);
  --shadow-md: 0 18px 36px rgba(27, 43, 54, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-display: "Alibaba PuHuiTi 3.0", "PingFang SC", "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei UI", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink-strong);
  background:
    radial-gradient(circle at top left, rgba(246, 207, 123, 0.34), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 30%),
    linear-gradient(180deg, #f8f2e7 0%, #f7f5f1 54%, #f1f6f4 100%);
}

#app,
.app-root {
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.page-backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.page-backdrop__orbit {
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.55;
}

.page-backdrop__orbit--a {
  width: 22rem;
  height: 22rem;
  top: -6rem;
  right: -4rem;
  background: radial-gradient(circle, rgba(230, 126, 34, 0.28), rgba(230, 126, 34, 0));
}

.page-backdrop__orbit--b {
  width: 24rem;
  height: 24rem;
  bottom: -8rem;
  left: -6rem;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.22), rgba(15, 118, 110, 0));
}

.page-backdrop__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 60, 84, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 60, 84, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 88%);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 24px;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 48px;
  display: grid;
  place-items: center;
}

.auth-stage {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
  gap: 24px;
  align-items: stretch;
}

.auth-stage__panel,
.auth-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.auth-stage__panel {
  padding: 34px;
  color: #ecf8f7;
  background: linear-gradient(145deg, #0c3854 0%, #0f766e 52%, #2a8a67 100%);
}

.auth-stage__panel::before {
  content: "";
  position: absolute;
  inset: auto -12% -30% auto;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 207, 123, 0.28), rgba(246, 207, 123, 0));
}

.auth-stage__panel h1 {
  position: relative;
  z-index: 1;
  margin: 18px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: 0.02em;
}

.auth-stage__copy {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0;
  color: rgba(236, 248, 247, 0.88);
  font-size: 16px;
  line-height: 1.9;
}

.auth-feature-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.auth-feature-card {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.09);
}

.auth-feature-card strong {
  display: block;
  font-size: 18px;
}

.auth-feature-card span {
  display: block;
  margin-top: 8px;
  color: rgba(236, 248, 247, 0.78);
  line-height: 1.7;
}

.auth-card {
  padding: 28px;
  background: rgba(255, 250, 242, 0.94);
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  width: 88px;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--accent-primary), rgba(230, 126, 34, 0.2));
}

.auth-card__head h2 {
  margin: 10px 0 0;
  font-size: 28px;
  line-height: 1.15;
}

.auth-card__head p {
  margin: 12px 0 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.auth-credential-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 249, 238, 0.96), rgba(241, 248, 245, 0.96));
  border: 1px solid rgba(15, 118, 110, 0.12);
}

.auth-credential-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--ink-soft);
}

.auth-credential-box strong {
  display: block;
  color: var(--ink-strong);
  font-size: 18px;
}

.auth-fill-btn {
  grid-column: 1 / -1;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.auth-submit {
  margin-top: 4px;
}

.auth-error {
  margin: -2px 0 0;
  color: var(--accent-danger);
  font-size: 14px;
  line-height: 1.6;
}

.sidebar,
.content {
  display: grid;
  gap: 20px;
  align-content: start;
}

.hero-card,
.panel-card,
.form-card,
.result-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.hero-card {
  padding: 28px;
  color: #ecf8f7;
  background: var(--bg-hero);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(246, 207, 123, 0.36), rgba(246, 207, 123, 0) 65%);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(130deg, transparent 0 65%, rgba(255, 255, 255, 0.08) 65% 67%, transparent 67% 100%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 10px, transparent 10px 24px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.eyebrow-row,
.panel-head,
.button-row,
.sample-block__head,
.signature-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(236, 248, 247, 0.86);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tag,
.status-badge,
.panel-kicker,
.upload-card__badge,
.progress-score {
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.hero-card h1 {
  position: relative;
  z-index: 1;
  margin: 20px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.hero-copy {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(236, 248, 247, 0.88);
}

.hero-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.metric-card {
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
}

.metric-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: rgba(236, 248, 247, 0.72);
}

.metric-value {
  font-size: 15px;
  word-break: break-all;
}

.hero-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tag {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(236, 248, 247, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-card,
.form-card,
.result-card {
  padding: 24px;
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
}

.panel-card::before,
.form-card::before,
.result-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  width: 84px;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--accent-primary), rgba(230, 126, 34, 0.2));
}

.panel-card--soft {
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(241, 248, 245, 0.96));
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent-secondary);
  font-weight: 700;
}

.panel-head h2,
.result-card h2 {
  margin: 8px 0 0;
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink-strong);
}

.panel-copy {
  margin: 14px 0 0;
  color: var(--ink-base);
  line-height: 1.75;
}

.status-badge {
  padding: 10px 14px;
  background: rgba(20, 33, 43, 0.08);
  color: var(--ink-base);
  font-weight: 700;
  white-space: nowrap;
}

.status-badge--success {
  background: rgba(42, 157, 111, 0.12);
  color: var(--accent-success);
}

.button-row {
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--small {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
}

.btn-primary {
  color: #fffefb;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-deep));
  box-shadow: 0 16px 24px rgba(200, 101, 20, 0.24);
}

.btn-primary--wide {
  min-width: 180px;
}

.btn-secondary {
  color: #e8fbf8;
  background: linear-gradient(135deg, #136f74, #0f766e);
  box-shadow: 0 14px 24px rgba(15, 118, 110, 0.2);
}

.btn-ghost {
  color: var(--ink-base);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line-soft);
}

.btn-ghost-light {
  color: #f6fbf9;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.text-btn {
  padding: 0;
  color: var(--accent-secondary);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}

.search-field {
  margin-top: 18px;
}

.search-box,
.inline-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-btn {
  min-width: 92px;
}

.field-grid {
  display: grid;
  gap: 16px;
}

.field-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 10px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-base);
}

.field__hint {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.field__control {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  color: var(--ink-strong);
  background: var(--bg-panel-strong);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field__control:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.field__control::placeholder {
  color: #96a1a8;
}

.field__control--textarea {
  min-height: 112px;
  resize: vertical;
}

.field.is-invalid .field__control,
.field__control.is-invalid,
.upload-card.is-invalid,
.signature-panel.is-invalid {
  border-color: rgba(200, 75, 49, 0.46);
  box-shadow: 0 0 0 4px rgba(200, 75, 49, 0.12);
}

.lookup-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.lookup-item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.lookup-item:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.32);
  box-shadow: var(--shadow-md);
}

.lookup-item strong {
  display: block;
  font-size: 15px;
  color: var(--ink-strong);
}

.lookup-item span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.sample-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(20, 33, 43, 0.08);
}

.sample-block__head {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-base);
}

.sample-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.sample-chip {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-secondary);
  font-size: 13px;
  font-weight: 700;
}

.progress-score {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  background: rgba(230, 126, 34, 0.12);
  color: var(--accent-primary-deep);
  font-weight: 800;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  margin-top: 18px;
  overflow: hidden;
  background: rgba(20, 33, 43, 0.08);
}

.progress-track__fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f4a83b, #0f766e);
  transition: width 220ms ease;
}

.step-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.step-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(20, 33, 43, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-soft);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.step-pill strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(20, 33, 43, 0.08);
  font-size: 13px;
  color: inherit;
}

.step-pill.is-active {
  transform: translateY(-1px);
  border-color: rgba(230, 126, 34, 0.28);
  background: rgba(255, 246, 236, 0.88);
  color: var(--ink-base);
}

.step-pill.is-active strong {
  background: rgba(230, 126, 34, 0.14);
  color: var(--accent-primary-deep);
}

.step-pill.is-complete {
  border-color: rgba(42, 157, 111, 0.22);
  background: rgba(236, 248, 243, 0.9);
  color: var(--accent-success);
}

.step-pill.is-complete strong {
  background: rgba(42, 157, 111, 0.14);
  color: var(--accent-success);
}

.info-note,
.draft-meta {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.65;
}

.info-note {
  background: linear-gradient(180deg, rgba(255, 249, 238, 0.94), rgba(255, 244, 228, 0.94));
  color: #805127;
}

.draft-meta {
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-secondary);
}

.bullet-list {
  display: grid;
  gap: 12px;
  padding-left: 18px;
  margin: 18px 0 0;
  color: var(--ink-base);
  line-height: 1.7;
}

.section-head {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.section-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(230, 126, 34, 0.18), rgba(15, 118, 110, 0.16));
  color: var(--accent-secondary);
  font-weight: 800;
}

.toggle-grid,
.upload-grid {
  display: grid;
  gap: 16px;
}

.toggle-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.toggle-card {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.76);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.toggle-card input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--accent-secondary);
}

.toggle-card:has(input:checked) {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.26);
  box-shadow: var(--shadow-md);
  background: rgba(240, 250, 247, 0.94);
}

.toggle-card__content strong {
  display: block;
  font-size: 16px;
  color: var(--ink-strong);
}

.toggle-card__content small {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.upload-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 224px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.78);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.upload-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.upload-card.is-required {
  border-color: rgba(230, 126, 34, 0.28);
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(255, 246, 236, 0.92));
}

.upload-card--hidden {
  display: none;
}

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-card__badge {
  justify-self: start;
  padding: 8px 12px;
  font-weight: 800;
  color: var(--accent-primary-deep);
  background: rgba(230, 126, 34, 0.12);
}

.upload-card strong {
  font-size: 17px;
  line-height: 1.2;
}

.upload-card small {
  color: var(--ink-soft);
  line-height: 1.6;
}

.upload-card__preview {
  margin-top: auto;
  min-height: 94px;
  border-radius: 18px;
  border: 1px dashed rgba(15, 118, 110, 0.2);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.06), rgba(255, 255, 255, 0.88));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

.upload-card__preview.has-image {
  border-style: solid;
  background: #fff;
}

.upload-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-card__preview .file-meta {
  padding: 12px;
  font-weight: 700;
  color: var(--accent-secondary);
}

.signature-panel {
  margin-top: 20px;
  padding: 18px;
  border-radius: 26px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(246, 250, 248, 0.94));
}

.signature-panel__head strong {
  display: block;
  font-size: 18px;
}

.signature-panel__head p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.signature-panel canvas {
  width: 100%;
  height: 240px;
  margin-top: 16px;
  display: block;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 250, 245, 0.98));
  border: 1px dashed rgba(20, 33, 43, 0.16);
  touch-action: none;
}

.agreement {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 249, 238, 0.9);
  color: #6f4a25;
  line-height: 1.7;
}

.agreement input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--accent-primary);
}

.action-bar {
  position: sticky;
  bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 22px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 32px rgba(20, 33, 43, 0.08);
}

.result-card {
  background:
    linear-gradient(180deg, rgba(250, 255, 252, 0.95), rgba(244, 251, 247, 0.96));
}

.json-preview {
  margin: 18px 0 0;
  max-height: 420px;
  overflow: auto;
  padding: 18px;
  border-radius: 20px;
  background: #132733;
  color: #cde7dc;
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.6;
}

.toast-region {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  display: grid;
  gap: 10px;
  width: min(320px, calc(100vw - 32px));
}

.toast {
  padding: 14px 16px;
  border-radius: 16px;
  color: #fffefb;
  box-shadow: 0 18px 32px rgba(20, 33, 43, 0.18);
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(18, 97, 121, 0.96));
  animation: toast-in 220ms ease;
}

.toast--warning {
  background: linear-gradient(135deg, rgba(200, 75, 49, 0.96), rgba(166, 55, 34, 0.96));
}

.reveal {
  animation: rise-in 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.reveal:nth-child(2) {
  animation-delay: 70ms;
}

.reveal:nth-child(3) {
  animation-delay: 140ms;
}

.reveal:nth-child(4) {
  animation-delay: 210ms;
}

.auth-shell--compact {
  width: min(1040px, calc(100% - 28px));
}

.auth-stage--compact {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
}

.auth-card--compact,
.auth-stage--compact .auth-stage__panel {
  padding: 24px;
}

.auth-feature-list--compact {
  margin-top: 22px;
  gap: 12px;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-base);
  font-size: 14px;
}

.remember-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-secondary);
}

.overview-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 420px);
  gap: 24px;
}

.overview-hero,
.overview-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.overview-hero {
  padding: 30px;
  color: #ecf8f7;
  background: linear-gradient(145deg, #103c54 0%, #0f766e 55%, #2c8e69 100%);
}

.overview-hero h1 {
  margin: 18px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
}

.overview-hero__copy {
  max-width: 38rem;
  margin: 0;
  color: rgba(236, 248, 247, 0.86);
  line-height: 1.8;
}

.overview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.overview-stat-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.overview-stat-card span {
  display: block;
  color: rgba(236, 248, 247, 0.74);
  font-size: 13px;
}

.overview-stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.overview-action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.overview-panel {
  padding: 24px;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
}

.record-search {
  margin-top: 18px;
}

.record-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.record-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.82);
}

.record-item strong {
  display: block;
  color: var(--ink-strong);
}

.record-item span,
.record-item small {
  display: block;
  margin-top: 6px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.record-item--draft {
  border-color: rgba(230, 126, 34, 0.28);
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.95), rgba(255, 246, 236, 0.92));
}

.empty-state {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-secondary);
  line-height: 1.75;
}

.step-pill--button {
  cursor: pointer;
}

.field__control-wrap {
  position: relative;
}

.field-lock-mask {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: rgba(20, 33, 43, 0.08);
  color: var(--ink-base);
  border: 1px dashed rgba(20, 33, 43, 0.14);
  font-weight: 700;
}

.field__control.is-locked,
.field--locked .field__control {
  color: var(--ink-soft);
  background: #eef2f4;
}

.section-head--document {
  margin-bottom: 16px;
}

.promise-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(231, 185, 129, 0.7);
  background: linear-gradient(180deg, rgba(253, 247, 239, 0.98), rgba(250, 242, 231, 0.98));
  box-shadow: 0 16px 30px rgba(210, 175, 126, 0.12);
}

.promise-card--document {
  margin-top: 0;
}

.promise-card__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.promise-card__head strong {
  font-size: 18px;
  line-height: 1.4;
}

.promise-card__head span {
  color: #9c622a;
  font-size: 13px;
  line-height: 1.7;
  text-align: right;
}

.promise-card__content {
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(238, 230, 218, 0.9);
  background: rgba(255, 255, 255, 0.96);
}

.promise-card__content p {
  margin: 0 0 12px;
  color: #294154;
  line-height: 1.85;
  font-size: 15px;
}

.promise-card__content p:last-child {
  margin-bottom: 0;
}

.promise-card__fields {
  margin-top: 18px;
}

.field--document {
  gap: 8px;
}

.field__label--document {
  color: #2b3340;
  font-size: 15px;
}

.field__required {
  color: var(--accent-danger);
  font-style: normal;
  font-weight: 700;
}

.field--document .field__control {
  min-height: 58px;
  border-radius: 18px;
  border-color: rgba(211, 219, 227, 0.9);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.field--document .field__control::placeholder {
  color: #a2aab4;
}

.signature-panel--document {
  margin-top: 18px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(227, 231, 236, 0.95);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 36px rgba(31, 43, 56, 0.08);
}

.signature-panel__head--document {
  align-items: flex-start;
}

.signature-panel__head--document strong {
  font-size: 18px;
  color: #24313d;
}

.signature-panel__head--document p {
  margin-top: 8px;
  color: #6d7a84;
}

.signature-panel__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.signature-panel__qr {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(247, 250, 252, 0.96), rgba(242, 246, 249, 0.96));
  border: 1px solid rgba(225, 231, 236, 0.95);
}

.signature-panel__qr p {
  margin: 0;
  align-self: center;
  color: #6d7a84;
  line-height: 1.75;
}

.signature-panel__qr-frame {
  aspect-ratio: 1;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(214, 222, 230, 0.95);
}

.signature-panel__qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.signature-panel__canvas-shell {
  margin-top: 16px;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid rgba(227, 231, 236, 0.95);
  background: linear-gradient(180deg, rgba(250, 251, 252, 0.98), rgba(245, 247, 249, 0.98));
}

.signature-panel__canvas-shell canvas {
  margin-top: 0;
  border-radius: 18px;
  background: #fff;
}

.signature-panel__footer {
  margin: 14px 2px 0;
  color: #7a8691;
  line-height: 1.75;
  font-size: 13px;
}

.action-bar__spacer {
  flex: 1 1 auto;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1024px) {
  .auth-stage {
    grid-template-columns: 1fr;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 1;
  }

  .content {
    order: 2;
  }
}

@media (max-width: 760px) {
  .auth-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 16px;
  }

  .auth-stage__panel,
  .auth-card {
    padding: 22px;
    border-radius: 24px;
  }

  .auth-stage__panel h1,
  .auth-card__head h2 {
    font-size: 24px;
  }

  .auth-credential-box {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 16px;
    gap: 16px;
  }

  .hero-card,
  .panel-card,
  .form-card,
  .result-card {
    border-radius: 24px;
    padding: 20px;
  }

  .hero-card h1,
  .section-head h3,
  .panel-head h2,
  .result-card h2 {
    font-size: 22px;
  }

  .field-grid--two,
  .toggle-grid,
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .promise-card__head,
  .signature-panel__head--document,
  .signature-panel__qr {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .search-box,
  .inline-action {
    grid-template-columns: 1fr;
  }

  .action-bar {
    position: static;
    justify-content: stretch;
  }

  .action-bar .btn,
  .btn-primary--wide {
    width: 100%;
  }

  .signature-panel canvas {
    height: 200px;
  }

  .signature-panel__tools {
    width: 100%;
  }

  .signature-panel__tools .btn {
    width: 100%;
  }

  .promise-card__head span {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .toast,
  .btn,
  .lookup-item,
  .toggle-card,
  .upload-card,
  .progress-track__fill {
    animation: none;
    transition: none;
  }
}

.dashboard-hero-clickable {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.dashboard-hero-clickable:active {
  opacity: 0.7;
}

.dashboard-arrow {
  font-size: 18px;
  color: #94a3b8;
  font-weight: bold;
}

.btn-ledger {
  width: 100%;
  margin-bottom: 10px;
}



.signature-pad {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #d7e3f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.signature-pad canvas {
  display: block;
  width: 100%;
  height: 220px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}



/* === 范围切换行 === */
.scope-toggle-row {
  display: flex;
  padding: 12px 16px 0;
  background: #fff;
}

.scope-btn {
  flex: 1;
  padding: 8px 0;
  border: 1px solid #d2d6dc;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.scope-btn:first-child {
  border-radius: 10px 0 0 10px;
  border-right: none;
}

.scope-btn:last-child {
  border-radius: 0 10px 10px 0;
}

.scope-btn.scope-active {
  background: linear-gradient(135deg, #0d6ea3 0%, #1580bf 100%);
  color: #fff;
  border-color: #0d6ea3;
}

/* === 日期筛选行 === */
.list-filter-row {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  align-items: flex-end;
  background: #fff;
  border-bottom: 1px solid #e8ecf1;
}

.filter-label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: #64748b;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.filter-input {
  padding: 8px 10px;
  border: 1px solid #d2d6dc;
  border-radius: 8px;
  font-size: 14px;
  color: #1e293b;
  background: #f8fafc;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.filter-input:focus {
  outline: none;
  border-color: #0d6ea3;
  box-shadow: 0 0 0 3px rgba(13, 110, 163, 0.12);
  background: #fff;
}

/* === 总数统计 === */
.list-total {
  padding: 10px 16px 6px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.list-total::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0d6ea3;
  margin-right: 6px;
  vertical-align: middle;
}

/* === 空状态 === */
.list-empty {
  text-align: center;
  padding: 80px 16px;
  font-size: 14px;
  color: #94a3b8;
}

.list-empty::before {
  content: '📋';
  display: block;
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* === 卡片列表 === */
.list-cards {
  padding: 6px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.install-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  border: 1px solid #eef1f5;
  transition: box-shadow 180ms ease;
}

.install-card:active {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* === 卡片字段 === */
.card-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.card-label {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.3px;
}

.card-value {
  font-size: 14px;
  color: #1e293b;
  font-weight: 500;
  word-break: break-all;
  line-height: 1.4;
}

.card-actions {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #eef1f5;
}

.btn-regenerate-qr {
  width: 100%;
  padding: 8px 0;
  border: 1px solid #0d6ea3;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #0d6ea3;
  background: #fff;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.btn-regenerate-qr:active {
  background: #f0f7fb;
}

/* === 底部加载状态 === */
.list-bottom-status {
  text-align: center;
  padding: 20px 16px 32px;
  font-size: 13px;
  color: #94a3b8;
}

.list-bottom-status:first-line {
  font-weight: 500;
}

/* === 查询按钮 — 蓝色渐变，紧凑尺寸 === */
.btn-filter-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0d6ea3 0%, #1580bf 100%);
  box-shadow: 0 3px 10px rgba(13, 110, 163, 0.25);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
  align-self: flex-end;
}

.btn-filter-search:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(13, 110, 163, 0.18);
}

.btn-filter-export {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #0d6ea3;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #0d6ea3;
  background: #fff;
  cursor: pointer;
  align-self: flex-end;
  transition: background 160ms ease, color 160ms ease;
}

.btn-filter-export:hover {
  background: #f0f7fb;
}

.btn-filter-export:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}



.mobile-app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f5f7fb;
  color: #1f2937;
  position: relative;
}

.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.scroll-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 2rem;
}

.nav-bar {
  display: flex;
  align-items: center;
  padding: 1rem;
  color: #fff;
}

.bg-blue {
  background: linear-gradient(135deg, #0f4c81 0%, #0d6ea3 58%, #1580bf 100%);
}

.nav-title {
  flex: 1;
  text-align: center;
  font-weight: 700;
}

.nav-spacer,
.back-icon {
  width: 24px;
}

.back-icon {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}


.logout-btn {
  cursor: pointer;
  font-size: 0.9rem;
  margin-left: auto;
  text-align: right;
  min-width: 3rem;
}

.workbench-nav {
  justify-content: space-between;
}

.workbench-title {
  font-weight: 700;
}

.workbench-dashboard {
  margin: 0.9rem 0.75rem 0;
  display: grid;
  gap: 0.85rem;
}

.account-banner {
  display: grid;
  grid-template-columns: 2.25rem repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #0d4f8d, #0e6da7);
  color: #fff;
  box-shadow: 0 8px 24px rgba(15, 76, 129, 0.2);
}

.account-avatar {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.account-meta {
  min-width: 0;
  font-size: 0.76rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.account-meta span {
  color: rgba(255, 255, 255, 0.72);
}

.dashboard-hero,
.trend-card,
.ledger-strip {
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.dashboard-hero {
  min-height: 8.2rem;
  padding: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 56%, rgba(233, 246, 255, 0.82) 100%);
  background-repeat: no-repeat;
  background-size: auto, 5.4rem;
  background-position: center, right 1.2rem center;
}

.dashboard-eyebrow {
  color: #1f2937;
  font-weight: 800;
}

.dashboard-total {
  margin-top: 0.35rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.dashboard-total strong {
  font-size: 2.1rem;
  color: #1677ff;
  line-height: 1;
}

.dashboard-total span {
  font-weight: 700;
}

.refresh-btn {
  align-self: flex-start;
  border: 0;
  background: transparent;
  color: #1677ff;
  font-size: 0.78rem;
  font-weight: 700;
}

.trend-card {
  overflow: hidden;
}

.trend-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #e6edf5;
}

.trend-tabs button {
  min-height: 2.6rem;
  border: 0;
  background: #fff;
  color: #475569;
  font-weight: 700;
}

.trend-tabs button.active {
  color: #1677ff;
  box-shadow: inset 0 -2px 0 #1677ff;
}

.trend-chart {
  padding: 0.9rem 0.8rem 0.4rem;
}

.trend-chart-title {
  margin-bottom: 0.35rem;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
}

.trend-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-grid {
  stroke: #e8eef6;
  stroke-width: 1;
}

.chart-axis {
  stroke: #d4dee9;
  stroke-width: 1.2;
}

.chart-line {
  fill: none;
  stroke: #4096ff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dot {
  fill: #fff;
  stroke: #4096ff;
  stroke-width: 2;
}

.trend-axis-labels {
  display: flex;
  justify-content: space-between;
  gap: 0.3rem;
  color: #64748b;
  font-size: 0.68rem;
}

.trend-filter {
  display: grid;
  grid-template-columns: auto 6.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem;
  border-top: 1px solid #eef2f7;
}

.trend-filter label {
  color: #64748b;
  font-size: 0.78rem;
}

.trend-filter select,
.trend-filter input {
  min-height: 2.2rem;
  border: 1px solid #d7e3f0;
  border-radius: 8px;
  padding: 0 0.55rem;
  background: #fff;
}

.trend-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  padding: 0 0.85rem 0.95rem;
}

.trend-stat-card {
  min-height: 4rem;
  padding: 0.7rem 0.55rem;
  border: 1px solid #e6edf5;
  border-radius: 10px;
  background: #fbfdff;
}

.trend-stat-card span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.3;
}

.trend-stat-card strong {
  display: block;
  margin-top: 0.35rem;
  color: #1f2937;
  font-size: 1rem;
}

.ledger-strip {
  padding: 0.95rem;
  display: grid;
  gap: 0.6rem;
}

.ledger-strip div:not(.ledger-actions) {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.5rem;
}

.ledger-strip span {
  color: #64748b;
}

.ledger-strip strong {
  text-align: right;
  color: #1f2937;
}

.ledger-actions {
  display: flex;
  gap: 0.55rem;
}

.login-wrapper {
  justify-content: center;
  padding: 1rem;
}

.login-hero {
  text-align: center;
}

.login-hero--compact h2 {
  margin: 0.8rem 0 0.45rem;
  font-size: 1.58rem;
  line-height: 1.35;
}

.login-badge,
.prefill-badge,
.source-chip,
.status-source {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.login-badge,
.prefill-badge,
.source-chip {
  background: rgba(13, 110, 163, 0.1);
  color: #0d6ea3;
}

.source-chip.is-imported {
  background: #fff7ed;
  color: #b45309;
}

.login-hero p,
.panel-desc,
.panel-note,
.mode-banner-desc,
.inline-banner-desc,
.upload-note,
.promise-text,
.feedback-message {
  line-height: 1.6;
  color: #5b6877;
}

.login-footer {
  text-align: center;
  color: #7b8794;
  margin-top: 1rem;
}

.login-footer a,
.site-beian-footer a {
  color: #64748b;
  font-size: 0.78rem;
  text-decoration: none;
}

.beian-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin-top: 0.35rem;
}

.gongan-beian-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.gongan-beian-link img {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.site-beian-footer {
  padding: 0.75rem 1rem 1rem;
  text-align: center;
  background: #f5f7fb;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0.25rem;
  border-radius: 10px;
  background: #edf2f7;
}

.auth-tabs button {
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 0.5rem;
  background: transparent;
  color: #52606d;
  font-weight: 700;
}

.auth-tabs button.active {
  background: #fff;
  color: #0d6ea3;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.sms-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem;
  gap: 0.6rem;
}

.sms-code-btn {
  min-height: 3.25rem;
  padding: 0 0.65rem;
}

.account-summary-card {
  display: grid;
  gap: 0.35rem;
}

.account-name {
  font-size: 1rem;
  font-weight: 800;
  color: #1f2933;
}

.account-phone {
  color: #52606d;
  font-size: 0.92rem;
}

.account-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: #0d6ea3;
  font-size: 0.9rem;
  font-weight: 700;
}

.verified-phone {
  display: inline-flex;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #e7f7ef;
  color: #0f7a3f;
  font-size: 0.86rem;
  font-weight: 700;
}

.bg-gray {
  background: transparent;
}

.text-blue {
  color: #0d6ea3;
}

.text-gold {
  color: #b7791f;
}

.required {
  color: #dc2626;
}

.optional-label {
  color: #94a3b8;
  font-size: 0.9em;
  font-weight: 500;
}

.error-text {
  margin-top: 0.45rem;
  color: #b91c1c;
  font-size: 0.78rem;
  background: #fef2f2;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.w-full {
  width: 100%;
}

.workbench-card,
.form-card,
.info-card,
.inline-banner,
.notice-card {
  margin: 1rem;
  padding: 1.1rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.tip-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 255, 0.98));
}

.panel-head,
.modal-actions,
.stats-row,
.input-with-btn,
.sensor-grid,
.upload-grid {
  display: grid;
  gap: 0.75rem;
}

.panel-head {
  grid-template-columns: 1fr auto;
}

.stats-row {
  grid-template-columns: repeat(3, 1fr);
}

.modal-actions,
.sensor-grid {
  grid-template-columns: repeat(2, 1fr);
}

.upload-grid {
  grid-template-columns: repeat(2, 1fr);
}

.device-db-status-card {
  position: relative;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 1rem 0 0;
  padding: 0.85rem 2.6rem 0.85rem 0.9rem;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
  color: #334155;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.device-db-status-card.is-connected {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.device-db-status-card.is-disconnected,
.device-db-status-card.is-error {
  border-color: #fecaca;
  background: #fff7f7;
}

.device-db-status-card.is-loading {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.device-db-status-card.is-pending {
  border-color: #fed7aa;
  background: #fff7ed;
}

.device-db-status-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-weight: 800;
}

.device-db-status-card.is-connected .device-db-status-icon {
  background: #22c55e;
  color: #fff;
}

.device-db-status-card.is-disconnected .device-db-status-icon,
.device-db-status-card.is-error .device-db-status-icon {
  background: #fee2e2;
  color: #dc2626;
}

.device-db-status-card.is-pending .device-db-status-icon {
  background: #fed7aa;
  color: #c2410c;
}

.device-db-status-body {
  min-width: 0;
  flex: 1;
}

.device-db-status-title {
  font-weight: 800;
  color: #0f172a;
}

.device-db-status-detail {
  margin-top: 0.18rem;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.55;
}

.device-db-status-time {
  margin-top: 0.28rem;
  color: #94a3b8;
  font-size: 0.78rem;
}

.device-db-status-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  font-size: 1.15rem;
  line-height: 1;
}

.input-with-btn {
  grid-template-columns: 1fr auto;
}

.user-info,
.status-box,
.feedback-toast,
.feedback-inline,
.input-with-icon {
  display: flex;
  align-items: center;
}

.user-info {
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 1rem;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.avatar-local {
  color: #fff;
  background: linear-gradient(135deg, #0d6ea3, #e4a11b);
}

.info-text .name,
.panel-title,
.notice-title,
.info-title {
  font-weight: 700;
}

.stat-item {
  padding: 0.8rem 0.5rem;
  border-radius: 14px;
  background: #f8fbff;
  text-align: center;
}

.num {
  font-size: 1.5rem;
  font-weight: 800;
}

.label {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.8rem;
}

.action-buttons {
  padding: 0 1rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.draft-list {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.draft-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  line-height: 1.35;
}

.draft-content {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.draft-button small {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
}

.draft-delete {
  flex: 0 0 auto;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

.compact-summary-card {
  display: grid;
  gap: 0.75rem;
}

.compact-summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.compact-summary-row span {
  color: #64748b;
}

.compact-summary-row strong {
  flex: 1;
  text-align: right;
  color: #1f2937;
  font-weight: 600;
}

.compact-summary-actions {
  display: flex;
  gap: 0.6rem;
}

.btn,
.btn-sm,
.feedback-close,
.qr-scan-btn {
  border: none;
  cursor: pointer;
}

.btn {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  font-weight: 700;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #0d6ea3 0%, #1580bf 100%);
}

.btn-warning {
  color: #fff;
  background: linear-gradient(135deg, #c87b14 0%, #e4a11b 100%);
}

.btn-outline {
  color: #0d6ea3;
  background: transparent;
  border: 1px solid rgba(13, 110, 163, 0.35);
}

.btn-cancel {
  color: #475569;
  background: #eef2f7;
}

.btn-ghost {
  color: #0d6ea3;
  background: rgba(13, 110, 163, 0.08);
}

.btn-disabled {
  color: #94a3b8;
  background: #e5e7eb;
}

.btn-sm {
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-size: 0.84rem;
}

.submit-btn {
  width: calc(100% - 2rem);
  margin: 0 1rem 2rem;
}

.form-group-title,
.inline-banner-title {
  padding: 0 1rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.form-item {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.walking-type-radio {
  display: flex;
  gap: 0.6rem;
}

.walking-type-radio .walking-opt {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid #d7e3f0;
  border-radius: 12px;
  background: #fff;
  margin-bottom: 0;
}

.walking-type-radio input[type="radio"] {
  width: auto;
  padding: 0;
  margin: 0;
  accent-color: #2563eb;
}

.walking-type-radio .walking-opt span {
  color: #333;
  font-size: 0.86rem;
}

.form-item label {
  margin-bottom: 0.5rem;
  color: #4b5563;
  font-size: 0.86rem;
}

.form-item input,
.form-item select {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid #d7e3f0;
  border-radius: 12px;
  background: #fff;
}

.field-control-wrap {
  position: relative;
}

.bg-disabled {
  background: #f3f6fa !important;
  color: #7b8794;
}

.field-lock-mask {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 1px dashed rgba(124, 144, 166, 0.7);
  cursor: pointer;
  z-index: 1;
}

.field-lock-mask::after {
  content: "点击修改";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  color: #475569;
}

.input-with-icon {
  border: 1px solid #d7e3f0;
  border-radius: 12px;
  background: #fff;
}

.input-with-icon input {
  border: none;
  flex: 1;
}

.scanner-input {
  padding-right: 0.2rem;
}

.qr-scan-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(13, 110, 163, 0.12);
  color: #0d6ea3;
}

.mode-banner,
.notice-card {
  margin: 1rem;
}

.mode-banner {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(13, 110, 163, 0.1), rgba(228, 161, 27, 0.08));
}

.notice-card {
  background: linear-gradient(180deg, #fffaf0 0%, #fff7ed 100%);
}

.notice-list {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;
  color: #7c4a08;
  line-height: 1.6;
}

.modal-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.modal-desc,
.qr-tip {
  margin: 0.7rem 0 1rem;
  color: #64748b;
  line-height: 1.6;
}

.modal-warning {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

.feedback-title {
  font-weight: 700;
}

.sensor-card,
.status-icon,
.upload-box,
.scanner-placeholder {
  display: grid;
  place-items: center;
}

.sensor-card {
  padding: 0.9rem;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  text-align: center;
}

.tag-status-area {
  border-top: 1px dashed #d7e3f0;
  padding-top: 1rem;
}

.status-box {
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
}

.bg-loading {
  justify-content: center;
  background: #f1f5f9;
  color: #475569;
}

.bg-success {
  background: #ecfdf5;
  color: #065f46;
}

.bg-error {
  background: #fef2f2;
  color: #991b1b;
}

.status-info {
  flex: 1;
}

.status-icon {
  min-width: 3.2rem;
  padding: 0.35rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
}

.status-title {
  font-weight: 700;
}

.status-desc,
.lookup-row,
.info-row {
  font-size: 0.82rem;
}

.upload-box {
  position: relative;
  cursor: pointer;
  min-height: 124px;
  border-radius: 16px;
  border: 1px dashed #c7d2de;
  background: #f8fbff;
  text-align: center;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.upload-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 124px;
  padding: 0.75rem;
  color: #334155;
  line-height: 1.4;
}

.upload-delete-btn {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 0;
  background: transparent;
  color: rgba(100, 116, 139, 0.72);
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 700;
  box-shadow: none;
}

.upload-gallery-btn {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  z-index: 2;
  min-width: 3rem;
  height: 1.7rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.9);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
}

.upload-box.has-photo .upload-gallery-btn {
  background: rgba(15, 23, 42, 0.54);
}

.qr-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.required-box::after {
  content: "必拍";
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  font-size: 0.68rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.42);
  z-index: 110;
}

.scanner-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(15, 23, 42, 0.92);
}

.scanner-modal {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  color: #fff;
  box-sizing: border-box;
  touch-action: pan-y;
}

.scanner-actions {
  grid-template-columns: repeat(2, 1fr);
}

.scanner-close-btn {
  grid-column: 1 / -1;
}

.scanner-topbar {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.2rem 0 0.45rem;
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.9) 82%, rgba(15, 23, 42, 0) 100%);
}

.scanner-back-btn {
  flex: 0 0 auto;
  min-width: 68px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-weight: 600;
}

.scanner-topcopy {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding-right: 68px;
}

.scanner-title {
  color: #fff;
  font-size: 1.22rem;
}

.scanner-desc {
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.8);
}

.scanner-env-notice {
  margin: 0.7rem auto 0;
  max-width: 28rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(255, 214, 102, 0.26);
  border-radius: 14px;
  background: rgba(255, 214, 102, 0.12);
  color: rgba(255, 243, 208, 0.96);
  font-size: 0.88rem;
  line-height: 1.55;
  text-align: left;
}

.modal-content {
  width: 100%;
  max-width: 360px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.3rem;
  border-radius: 20px;
  background: #fff;
  text-align: center;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.24);
}

.lookup-summary {
  margin-bottom: 1rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: #f8fbff;
}

.lookup-row,
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #475569;
  margin-bottom: 0.45rem;
}

.qr-wrapper,
.scanner-stage {
  width: 100%;
  border-radius: 18px;
}

.qr-wrapper {
  height: 220px;
  margin: 1rem auto;
  padding: 0.85rem;
  background: #fff;
  box-shadow: inset 0 0 0 1px #eef2f7;
  overflow: visible;
}

.qr-wrapper--large {
  width: min(100%, 320px);
  height: min(72vw, 320px);
}

.scanner-stage {
  overflow: hidden;
}

.qr-result-card {
  margin-top: -0.25rem;
}

.qr-result-actions {
  margin-top: 1rem;
}

.qr-waiting-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: -0.25rem 0 0.8rem;
  color: #0f766e;
  font-size: 0.88rem;
  line-height: 1.45;
}

.qr-waiting-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #14b8a6;
  box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.35);
  animation: qr-waiting-pulse 1.4s infinite;
}

.qr-waiting-status.is-completed {
  color: #15803d;
  font-weight: 700;
}

.qr-waiting-status.is-completed .qr-waiting-dot {
  background: #22c55e;
  animation: none;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

@keyframes qr-waiting-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.35);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(20, 184, 166, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(20, 184, 166, 0);
  }
}

.qr-link-preview {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: #f8fbff;
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.55;
  word-break: break-all;
}

.signature-wrapper {
  padding: 0.6rem;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  border: 1px solid #dbe7f3;
}

.complete-card {
  text-align: center;
  padding: 2rem 1.2rem;
}

.complete-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: linear-gradient(135deg, #0d6ea3 0%, #1d90d2 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.scanner-stage {
  position: relative;
  flex: 0 0 auto;
  min-height: clamp(300px, 48vh, 420px);
  border-radius: 18px;
  background: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.scanner-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(70vw, 320px);
  height: min(70vw, 320px);
  transform: translate(-50%, -56%);
  border-radius: 22px;
  box-shadow:
    0 0 0 999px rgba(10, 16, 31, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.scanner-corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: rgba(255, 255, 255, 0.96);
  border-style: solid;
  border-width: 0;
}

.scanner-corner--tl {
  top: 0;
  left: 0;
  border-top-width: 7px;
  border-left-width: 7px;
  border-top-left-radius: 14px;
}

.scanner-corner--tr {
  top: 0;
  right: 0;
  border-top-width: 7px;
  border-right-width: 7px;
  border-top-right-radius: 14px;
}

.scanner-corner--bl {
  bottom: 0;
  left: 0;
  border-bottom-width: 7px;
  border-left-width: 7px;
  border-bottom-left-radius: 14px;
}

.scanner-corner--br {
  right: 0;
  bottom: 0;
  border-right-width: 7px;
  border-bottom-width: 7px;
  border-bottom-right-radius: 14px;
}

.scanner-bottom-panel {
  display: grid;
  gap: 0.65rem;
  padding-bottom: max(0.35rem, env(safe-area-inset-bottom));
}

.scanner-status-card {
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
  word-break: break-all;
}

.scanner-placeholder {
  height: 100%;
  color: #fff;
  padding: 1rem 1rem 4.5rem;
  background: linear-gradient(180deg, rgba(10, 16, 31, 0.78), rgba(10, 16, 31, 0.92));
}

.scanner-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.scanner-placeholder-text {
  margin-top: 0.9rem;
  line-height: 1.6;
  word-break: break-all;
  color: rgba(255, 255, 255, 0.9);
}

.feedback-toast,
.feedback-inline {
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  color: #fff;
}

.feedback-toast {
  position: fixed;
  top: 1rem;
  left: max(1rem, env(safe-area-inset-left));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 120;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.2);
}

.feedback-inline {
  position: relative;
  margin: -1.4rem 1rem 2rem;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

.feedback-toast.is-success,
.feedback-inline.is-success {
  background: linear-gradient(135deg, #15803d, #16a34a);
}

.feedback-toast.is-error,
.feedback-inline.is-error {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
}

.feedback-toast.is-warning,
.feedback-inline.is-warning {
  background: linear-gradient(135deg, #b45309, #d97706);
}

.feedback-toast.is-info,
.feedback-inline.is-info {
  background: linear-gradient(135deg, #0d6ea3, #1580bf);
}

.feedback-body {
  flex: 1;
}

.feedback-toast .feedback-message,
.feedback-inline .feedback-message {
  color: rgba(255, 255, 255, 0.88);
}

.feedback-close {
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(71, 85, 105, 0.2);
  border-top-color: #475569;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 360px) {
  .stats-row,
  .sensor-grid,
  .upload-grid,
  .modal-actions {
    grid-template-columns: 1fr;
  }

  .scanner-modal {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .scanner-frame {
    width: min(76vw, 300px);
    height: min(76vw, 300px);
  }

  .scanner-guidance {
    left: 0.85rem;
    right: 0.85rem;
    font-size: 0.92rem;
  }
}

@media (max-height: 760px) {
  .scanner-modal {
    gap: 0.7rem;
  }

  .scanner-topbar {
    padding-bottom: 0.7rem;
  }

  .scanner-stage {
    min-height: clamp(280px, 44vh, 380px);
  }

  .scanner-placeholder {
    padding-bottom: 3.5rem;
  }
}
