:root {
  --v-bg: #1d1409;
  --v-card: #fffaf3;
  --v-line: #ecdcc7;
  --v-text: #362311;
  --v-muted: #8b7358;
  --v-primary: #ff5a36;
  --v-primary-dark: #d8431f;
  --v-green: #1f9254;
  --v-amber: #b78106;
  --v-red: #cc321f;
}

* {
  box-sizing: border-box;
}

body {
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(circle at 20% 0%, #4a2a12 0%, #1d1409 60%);
  color: var(--v-text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  margin: 0;
  min-height: 100vh;
  padding: 18px 14px calc(30px + env(safe-area-inset-bottom));
}

.hidden {
  display: none !important;
}

.v-loading {
  align-items: center;
  color: #f7e6d3;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
}

.v-spinner {
  animation: vSpin 900ms linear infinite;
  border: 3px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  border-top-color: var(--v-primary);
  height: 34px;
  width: 34px;
}

@keyframes vSpin {
  to { transform: rotate(360deg); }
}

.v-view {
  margin: 0 auto;
  max-width: 520px;
}

.v-card {
  background: var(--v-card);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
  margin-bottom: 14px;
  padding: 18px 16px;
}

.v-login-card {
  margin-top: 34px;
  text-align: center;
}

.v-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--v-primary), #ff9152);
  border-radius: 18px;
  color: #fff;
  display: inline-flex;
  font-size: 24px;
  font-weight: 800;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.v-login-card h1 {
  font-size: 21px;
  margin: 14px 0 8px;
}

.v-sub {
  color: var(--v-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 14px;
}

.v-form {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  text-align: left;
}

.v-form label {
  display: grid;
  gap: 6px;
}

.v-form label span {
  color: var(--v-muted);
  font-size: 12px;
  font-weight: 700;
}

.v-form input,
.v-inline-form input {
  background: #fff;
  border: 1px solid var(--v-line);
  border-radius: 12px;
  color: var(--v-text);
  font-size: 15px;
  min-width: 0;
  padding: 12px 13px;
  width: 100%;
}

.v-form input:focus,
.v-inline-form input:focus {
  border-color: var(--v-primary);
  outline: none;
}

.v-primary {
  background: linear-gradient(135deg, var(--v-primary), var(--v-primary-dark));
  border: none;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(216, 67, 31, .32);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  padding: 13px 20px;
  transition: transform .16s ease, opacity .16s ease;
}

.v-primary:active {
  transform: scale(.97);
}

.v-primary[disabled] {
  box-shadow: none;
  cursor: default;
  opacity: .6;
}

.v-ghost {
  background: #fff;
  border: 1px solid var(--v-line);
  border-radius: 999px;
  color: var(--v-text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
}

.v-link {
  color: #f3d9bd;
  display: inline-block;
  font-size: 12px;
  margin-top: 4px;
  text-decoration: none;
}

.v-header {
  align-items: center;
  color: #fdf1e2;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 4px 4px 0;
}

.v-header h1 {
  font-size: 19px;
  margin: 2px 0 0;
}

.v-kicker {
  color: #e0ae7f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
}

.v-phone {
  color: #cbb194;
  font-size: 12px;
  margin: 4px 0 0;
}

.v-card h2 {
  font-size: 16px;
  margin: 0 0 8px;
}

.v-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.v-scan-stage {
  background: #120c05;
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
}

.v-scan-stage video {
  display: block;
  height: 260px;
  object-fit: cover;
  width: 100%;
}

.v-scan-frame {
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.v-scan-frame i {
  border-color: #ffd85e;
  border-style: solid;
  height: 26px;
  position: absolute;
  width: 26px;
}

.v-scan-frame i:nth-child(1) { border-width: 3px 0 0 3px; left: 14px; top: 14px; }
.v-scan-frame i:nth-child(2) { border-width: 3px 3px 0 0; right: 14px; top: 14px; }
.v-scan-frame i:nth-child(3) { border-width: 0 0 3px 3px; bottom: 14px; left: 14px; }
.v-scan-frame i:nth-child(4) { border-width: 0 3px 3px 0; bottom: 14px; right: 14px; }

.v-hint {
  color: var(--v-muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 12px 0 0;
}

.v-inline-form {
  display: flex;
  gap: 10px;
}

.v-inline-form input {
  flex: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.v-inline-form .v-primary {
  flex: none;
  padding: 13px 22px;
}

.v-result {
  border: 1px solid transparent;
  display: grid;
  gap: 6px;
}

.v-result.ok {
  background: #f1fbf4;
  border-color: #bfe6cd;
}

.v-result.fail {
  background: #fff4f2;
  border-color: #f6c6bd;
}

.v-result strong {
  font-size: 17px;
}

.v-result.ok strong { color: var(--v-green); }
.v-result.fail strong { color: var(--v-red); }

.v-result .v-result-row {
  color: var(--v-muted);
  display: flex;
  font-size: 13px;
  gap: 10px;
  justify-content: space-between;
}

.v-result .v-result-row b {
  color: var(--v-text);
  font-weight: 700;
}

.v-list-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.v-badge {
  background: #ffe9d8;
  border-radius: 999px;
  color: #b2521c;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
}

.v-history {
  display: grid;
  gap: 8px;
}

.v-history-item {
  align-items: center;
  border-bottom: 1px dashed var(--v-line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-bottom: 8px;
}

.v-history-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.v-history-item div {
  min-width: 0;
}

.v-history-item strong {
  display: block;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v-history-item small {
  color: var(--v-muted);
  font-size: 11px;
}

.v-history-item .v-tag {
  border-radius: 999px;
  flex: none;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
}

.v-history-item .v-tag.ok { background: #e3f7ea; color: var(--v-green); }
.v-history-item .v-tag.fail { background: #ffe4de; color: var(--v-red); }

.v-empty {
  color: var(--v-muted);
  font-size: 12px;
  margin: 0;
}

.v-toast-root {
  bottom: calc(24px + env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
  left: 50%;
  max-width: 460px;
  pointer-events: none;
  position: fixed;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  z-index: 60;
}

.v-toast {
  background: rgba(28, 18, 8, .94);
  border-radius: 12px;
  color: #fff;
  font-size: 13px;
  padding: 11px 14px;
  text-align: center;
  transition: opacity .2s ease, transform .2s ease;
}

.v-toast.success { background: rgba(23, 122, 71, .96); }
.v-toast.error { background: rgba(178, 45, 27, .96); }
