:root {
  --bg: #0b1020;
  --card: #131a2e;
  --border: #243052;
  --text: #e8eefc;
  --muted: #9aa7c7;
  --accent: #7c5cff;
  --accent-hover: #6a47ff;
  --ok: #2ecc71;
  --warn: #f1c40f;
  --err: #ff5c7a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(circle at top, #182242 0%, var(--bg) 60%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.shell {
  width: 100%;
  max-width: 460px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.16);
  color: #c2b3ff;
  border: 1px solid rgba(124, 92, 255, 0.35);
}

h1 {
  margin: 12px 0 6px;
  font-size: 24px;
}

.subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.hidden {
  display: none !important;
}

.banner {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.4;
}

.banner.info {
  background: rgba(124, 92, 255, 0.16);
  border: 1px solid rgba(124, 92, 255, 0.4);
}

.banner.success {
  background: rgba(46, 204, 113, 0.14);
  border: 1px solid rgba(46, 204, 113, 0.45);
  color: #bdf5d2;
}

.banner.error {
  background: rgba(255, 92, 122, 0.14);
  border: 1px solid rgba(255, 92, 122, 0.45);
  color: #ffc2ce;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #0d1324;
  padding: 5px;
  border-radius: 12px;
  margin-bottom: 18px;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  background: var(--accent);
  color: #fff;
}

.hint {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

.detector {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
  background: #0d1324;
  border: 1px solid var(--border);
  color: var(--muted);
}

.detector.ok {
  border-color: rgba(46, 204, 113, 0.5);
  color: #bdf5d2;
}

.detector.warn {
  border-color: rgba(241, 196, 15, 0.45);
  color: #fae69b;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: #1d2744;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}

.qr-box {
  background: #0d1324;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  margin-bottom: 16px;
}

.qr-active img {
  background: #fff;
  padding: 8px;
  border-radius: 10px;
  max-width: 100%;
  height: auto;
}

.qr-status {
  margin: 12px 0;
  font-size: 13px;
  color: var(--muted);
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.bunker-details {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  font-size: 13.5px;
  color: var(--muted);
}

.bunker-details summary {
  cursor: pointer;
  user-select: none;
}

.bunker-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bunker-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #0d1324;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
}

.session-info {
  background: #0d1324;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.value-lg {
  font-size: 19px;
  font-weight: 700;
  margin: 4px 0 8px;
}

.mono-box {
  display: block;
  word-break: break-all;
  padding: 8px 10px;
  background: #131a2e;
  border-radius: 8px;
  font-size: 12px;
  color: #c2b3ff;
  margin-bottom: 10px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-footer {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
