.scanner-app { min-height: 100vh; display: flex; flex-direction: column; }

.scanner-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 20px 40px;
  max-width: 460px;
  margin: 0 auto;
  width: 100%;
}

.scanner-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.scanner-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-guide {
  position: absolute; inset: 12%;
  border: 3px solid rgba(var(--red-rgb), 0.7);
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25);
}

.scanner-start { width: 100%; text-align: center; }

.camera-error {
  color: var(--red-bright);
  font-size: 0.9rem;
  text-align: center;
  margin: 0;
}

.scan-result {
  width: 100%;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.scan-result-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin-bottom: 8px;
}
.scan-result.success { border-color: rgba(74, 222, 128, 0.5); }
.scan-result.success .scan-result-icon { background: rgba(60, 180, 90, 0.15); color: #4ade80; }
.scan-result.warning { border-color: rgba(250, 204, 21, 0.5); }
.scan-result.warning .scan-result-icon { background: rgba(250, 204, 21, 0.15); color: #facc15; }
.scan-result.error { border-color: rgba(var(--red-rgb), 0.5); }
.scan-result.error .scan-result-icon { background: rgba(var(--red-rgb), 0.15); color: var(--red-bright); }

.scan-result h2 { margin: 0; font-size: 1.3rem; }
.scan-result-sub, .scan-result p { color: var(--ink-70); margin: 0; }

.scan-result-details {
  width: 100%;
  margin: 14px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.scan-result-details div { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9rem; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.scan-result-details dt { color: var(--ink-50); }
.scan-result-details dd { margin: 0; color: var(--white); text-align: right; }

.scan-result-ok { width: 100%; margin-top: 14px; padding: 16px; font-size: 1.05rem; }

.manual-entry { width: 100%; color: var(--ink-50); font-size: 0.85rem; }
.manual-entry summary { cursor: pointer; }
.manual-entry form { display: flex; gap: 10px; margin-top: 12px; }
.manual-entry input {
  flex: 1; background: var(--bg-alt); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 10px 12px; color: var(--white); font-size: 0.95rem;
}
.manual-entry input:focus { outline: none; border-color: var(--red-bright); }
