/* Contrast improvements */
:root {
  --bg: #0a0d12;
  --panel: #0e141e;
  --card: #101a29;
  --line: #273247;
  --text: #f3f6fb;
  --muted: #b8c7d8;
  --primary: #6ea8fe;
  --accent: #00d0ff;
  --good: #16c784;
  --warn: #ff8a33;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, Segoe UI, Roboto
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(11, 15, 20, .6);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line)
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer
}

.logo {
  width: 36px;
  height: 36px
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1
}

.brand-text span {
  color: var(--muted);
  font-size: 12px
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 16px
}

.nav .cta {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 8px 12px;
  border-radius: 10px
}

.view {
  padding: 28px 0;
  animation: fade .35s ease
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.hero {
  padding: 72px 0 32px;
  text-align: center
}

/* Hero title white and big */
.hero h1 {
  color: #ffffff;
  font-size: 56px;
  letter-spacing: .5px
}

.sub {
  color: var(--muted)
}

.search {
  margin-top: 16px
}

.search-wrap {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center
}

.search-wrap .ico {
  width: 22px;
  height: 22px
}

/* Search input centered and without placeholder */
.search-wrap input {
  width: min(640px, 92vw);
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0e1622;
  color: var(--text);
  text-align: center
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--accent)
}

.btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: transform .12s ease
}

.btn:hover {
  transform: translateY(-1px)
}

.btn:active {
  transform: translateY(0)
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent
}

.btn.ghost {
  background: transparent
}

.tips {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px
}

.tips span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0e1622;
  color: var(--muted)
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 18px
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr))
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px
}

.muted {
  color: var(--muted)
}

.hidden {
  display: none
}

.app-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 16px 0;
  margin-top: 24px
}

.result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0e1622
}

.result img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line)
}

.result .name {
  font-weight: 600
}

.result .pid {
  color: var(--muted);
  font-size: 12px
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #0e1622
}

.profile-actions {
  margin-left: auto;
  display: flex;
  gap: 8px
}

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

.field {
  padding: 8px 10px;
  background: #0e1622;
  border: 1px solid var(--line);
  border-radius: 10px
}

.json {
  max-height: 360px;
  overflow: auto;
  background: #0e1622;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  color: #c8e6ff
}

/* Wizard */
.wizard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px
}

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

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0e1622;
  color: var(--muted)
}

.step.active {
  border-color: var(--accent);
  color: #fff
}

.step span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: 12px
}

.wizard-body {
  min-height: 280px
}

/* Register wizard visibility */
#wizard-body,
.wizard-head,
.wizard-nav {
  color: var(--text)
}

#wizard-body input,
#wizard-body select,
#wizard-body textarea {
  color: var(--text);
  background: #0e1622;
  border-color: var(--line)
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0e1622;
  color: var(--text)
}

.wizard-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px
}

.wizard-nav .spacer {
  flex: 1
}

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

.addlist .row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px
}

.addlist .row input {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0e1622;
  color: var(--text)
}

.addlist .row .x {
  padding: 10px 12px
}

.extra-box {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #0e1622
}

/* Decorative background */
.bg-orb {
  position: fixed;
  inset: auto auto 10% -10%;
  width: 60vmin;
  height: 60vmin;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .35;
  z-index: -1
}

.orb-1 {
  background: radial-gradient(closest-side, #00e5ff55, transparent)
}

.orb-2 {
  right: -10%;
  left: auto;
  background: radial-gradient(closest-side, #7c4dff55, transparent)
}

/* Credential card enhancements */
.credential {
  background: linear-gradient(180deg, rgba(18, 28, 43, 0.9), rgba(18, 28, 43, 0.75));
  border-radius: 20px;
}

.credential-avatar {
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: cover;
  background: #0e1622
}

/* Credential light variant (improved readability) */
.credential-light {
  background: #ffffff;
  color: #0d1b2a
}

.credential-light .credential-header {
  background: #f5f7fb
}

.credential-light #c-qr canvas {
  background: #fff
}

.credential-light .item {
  background: #f7f9fc;
  border-color: #e2e8f0
}

.credential-light .bi {
  color: #0d6efd
}

/* QR box sizing for header */
#c-qr {
  width: 96px;
  height: 96px
}

#c-qr canvas {
  width: 96px !important;
  height: 96px !important;
  border-radius: 8px;
  background: #fff;
  padding: 4px
}

/* Smooth section reveal */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease
}

.reveal.show {
  opacity: 1;
  transform: none
}

/* Harmonize Bootstrap buttons in dark UI */
.btn-outline-light {
  --bs-btn-color: #eaf2fa;
  --bs-btn-border-color: var(--line);
  --bs-btn-hover-bg: #1a2434;
  --bs-btn-hover-border-color: #2a3952
}

/* Accordion dark theme tweaks */
.accordion-button {
  background: #0e1622;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px
}

.accordion-button:not(.collapsed) {
  background: #142033;
  color: #fff;
  box-shadow: none
}

.accordion-item {
  border-radius: 12px
}

.accordion-body {
  background: #0e1622;
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* Credential refinements */
#c-qr {
  width: 96px;
  height: 96px
}

#c-qr canvas {
  width: 96px !important;
  height: 96px !important;
  border-radius: 8px;
  background: #fff;
  padding: 4px
}

.credential-light .h4 {
  line-height: 1.2
}

/* Profile head actions */
.profile-actions .btn {
  padding: 6px 10px
}

/* Remove extra margin for credential */
.credential {
  margin-top: 12px
}

/* Navbar customizations */
.app-header .navbar {
  background: rgba(11, 15, 20, .6);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.app-header .navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  font-size: 32px;
  color: #fff;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.brand-text {
  line-height: 1;
}

.brand-text strong {
  display: block;
  font-size: 1.1rem;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.7rem;
}

.nav-link.cta {
  color: #fff !important;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  padding: 8px 12px !important;
  margin: 0 8px;
}

/* Mobile responsiveness */
@media (max-width: 991px) {
  .app-header .navbar-collapse {
    margin-top: 12px;
    background: var(--panel);
    border-radius: 12px;
    padding: 12px;
  }

  .app-header .nav-item {
    margin-bottom: 8px;
  }

  .app-header .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .credential {
    flex-direction: column;
  }

  .credential .row {
    flex-direction: column;
  }
}

/* Ensure text is uppercase */
.text-uppercase {
  text-transform: uppercase !important;
}