/* App bridge — master-design tokens applied to existing QR UI utilities */
.btn-primary,
button.btn-primary {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: var(--navy-deep) !important;
  font-weight: 600;
  border-radius: 6px;
  min-height: 44px;
}
.btn-primary:hover {
  background: #c9892a !important;
  border-color: #c9892a !important;
  color: var(--navy-deep) !important;
}
.btn-secondary,
button.btn-secondary {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  color: var(--navy) !important;
  font-weight: 600;
  border-radius: 6px;
  min-height: 44px;
}
.btn-secondary:hover {
  border-color: var(--gold) !important;
  color: var(--navy) !important;
}
.input-field,
.form-control {
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  color: var(--text) !important;
  background: var(--bg-card) !important;
}
.input-field:focus,
.form-control:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(223, 160, 57, 0.25) !important;
  outline: none;
}
.card,
.card-subtle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(2, 27, 56, 0.04);
}
.label {
  color: var(--text-muted) !important;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.section-title {
  color: var(--heading) !important;
}
.chip {
  border-color: var(--border) !important;
  color: var(--navy) !important;
}
.peer:checked + .chip,
input:checked + .chip {
  border-color: var(--gold) !important;
  background: rgba(223, 160, 57, 0.12) !important;
  color: var(--navy) !important;
}
.accent-\[\#1a5c2a\],
.accent-sdau {
  accent-color: var(--gold);
}
input[type="range"] {
  accent-color: var(--gold);
}
.text-\[\#1a5c2a\],
.font-semibold.text-\[\#1a5c2a\] {
  color: var(--gold) !important;
}
.text-\[\#14532d\],
.text-\[\#0f3d1f\] {
  color: var(--heading) !important;
}
.text-\[\#4d6b54\],
.text-\[\#86868b\] {
  color: var(--text-muted) !important;
}
.border-\[\#d8e5d8\],
.border-\[\#e8e8ed\] {
  border-color: var(--border) !important;
}
.bg-\[\#f7faf7\],
.bg-\[\#f5f5f7\],
.bg-\[\#fbfbfd\] {
  background: var(--bg-section) !important;
}
.spinner {
  border-color: var(--border);
  border-top-color: var(--gold);
}
.info-tip {
  border-color: rgba(223, 160, 57, 0.45) !important;
  background: rgba(223, 160, 57, 0.12) !important;
  color: var(--navy) !important;
}
.info-tip::after {
  background: var(--navy) !important;
}
.info-tip::before {
  border-top-color: var(--navy) !important;
}

/* Auth shell uses guest tokens */
.auth-shell {
  position: relative;
  background: var(--bg-section) !important;
  min-height: calc(100vh - 12rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  overflow: hidden;
}
/* Soft, out-of-focus blobs echoing the reference design's background
   texture - cheap CSS in place of the bespoke leaf line-art we don't have
   assets for. */
.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 92, 42, 0.06), rgba(26, 92, 42, 0) 70%);
}
.auth-shell::before {
  top: -120px;
  left: -120px;
}
.auth-shell::after {
  bottom: -140px;
  right: -140px;
}
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 40px 36px;
  box-shadow: 0 20px 50px rgba(6, 42, 26, 0.1);
}
.auth-title {
  font-family: "Lora", serif;
  color: var(--heading);
  font-size: 1.65rem;
  font-weight: 700;
}
.auth-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}
.auth-error {
  color: #d2740f;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.auth-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}
.auth-logo-divider {
  width: 1px;
  height: 30px;
  background: var(--border);
  flex-shrink: 0;
}
.auth-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.auth-logo-title {
  font-weight: 800;
  color: var(--heading);
  font-size: 1.05rem;
}
.auth-logo-caption {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

/* Icon-prefixed inputs (email/password on auth forms) */
.input-icon-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.input-icon-group:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(223, 160, 57, 0.2);
}
.input-icon-group .input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  flex-shrink: 0;
  background: var(--bg-section);
  border-right: 1px solid var(--border);
  color: var(--text-muted);
}
.input-icon-group input.form-control {
  flex: 1;
  min-width: 0;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.input-icon-group.password-input {
  position: relative;
}
.input-icon-group.password-input input.form-control {
  padding-right: 44px;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 16px;
  font-size: 0.85rem;
}
.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  cursor: pointer;
}
.auth-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
}
.auth-link-sm {
  color: var(--link);
  font-weight: 600;
}

/* Home hero — master-design .hero adapted for QR paste */
.qr-hero {
  position: relative;
  background:
    linear-gradient(
      115deg,
      rgba(6, 42, 26, 0.95) 0%,
      rgba(6, 42, 26, 0.88) 45%,
      rgba(6, 42, 26, 0.74) 100%
    ),
    url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?q=80&w=1600&auto=format&fit=crop")
      center / cover;
  color: #fff;
  overflow: hidden;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(223, 160, 57, 0.4);
  color: #e7f0e9;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
}
.hero-badge i {
  color: var(--gold);
}
.qr-hero .container {
  position: relative;
  z-index: 1;
  padding: 72px 24px 64px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}
.qr-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(223, 160, 57, 0.16);
  border: 1px solid rgba(223, 160, 57, 0.4);
  color: var(--gold-soft);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 30px;
  margin-bottom: 18px;
}
.qr-hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: 14px;
  font-family: "Lora", serif;
}
.qr-hero h1 em {
  color: var(--gold);
  font-style: normal;
}
.qr-hero .lead {
  color: #cdd7e6;
  font-size: 1.05rem;
  max-width: 34rem;
  margin-bottom: 0;
}
.qr-hero-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  backdrop-filter: blur(6px);
  padding: 22px;
}
.qr-hero-panel h2 {
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-left: 3px solid var(--gold);
  padding-left: 10px;
  margin-bottom: 16px;
}
.qr-hero-panel .form-control {
  background: #fff !important;
  min-height: 48px;
  text-align: center;
  font-size: 1rem;
}
.qr-hero-panel .home-input-pulse {
  animation: home-attention 1.6s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes home-attention {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(223, 160, 57, 0.45);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(223, 160, 57, 0.15);
  }
}
@keyframes hero-rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.qr-hero .container > * {
  animation: hero-rise-in 0.6s ease both;
}
.qr-hero .container > *:nth-child(2) {
  animation-delay: 0.12s;
}
@media (max-width: 980px) {
  .qr-hero .container {
    grid-template-columns: 1fr;
    padding: 52px 20px 48px;
  }
}

.site-navbar .brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* Compact desktop nav + visible menus (avoid Tailwind .collapse conflict) */
:root {
  --topbar-py: 4px;
}

.topbar-strip {
  font-size: 13px;
  padding: 3px 0 !important;
  line-height: 1.3;
}

.site-navbar {
  padding: 4px 0 !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1030 !important;
}

.site-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}

.site-navbar .navbar-brand {
  margin: 0;
  padding: 0 !important;
  gap: 8px !important;
}

.site-navbar .brand-name {
  font-size: 1.05rem !important;
  line-height: 1.2 !important;
  color: var(--navy);
}

.site-navbar .brand-text {
  min-width: 0;
  line-height: 1.15;
}

.site-navbar .brand-subtitle {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: normal;
}

.desktop-nav {
  display: none;
}

@media (min-width: 992px) {
  .desktop-nav {
    display: flex !important;
    align-items: center;
    margin-left: auto;
  }

  .site-navbar .navbar-toggler {
    display: none !important;
  }

  .site-navbar .nav-link {
    font-size: 0.95rem !important;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.01em;
    padding: 6px 10px !important;
    margin: 0 1px !important;
    border-radius: 6px;
    color: var(--navy) !important;
  }

  .site-navbar .nav-link::after {
    left: 10px;
    right: 10px;
    bottom: 2px;
  }

  .site-navbar .nav-link:hover,
  .site-navbar .nav-link.active {
    color: var(--gold) !important;
  }

  .site-navbar .nav-signin {
    font-size: 0.95rem !important;
    font-weight: 600;
  }

  .site-navbar .nav-auth-item {
    display: flex;
    align-items: center;
    margin-left: 8px;
    padding-left: 10px;
    border-left: 1px solid var(--border);
  }

  .site-navbar .btn-sm {
    min-height: 38px;
    font-size: 0.95rem;
    padding: 0.35rem 0.9rem;
  }
}

@media (max-width: 991.98px) {
  .desktop-nav {
    display: none !important;
  }

  .nav-offcanvas .nav-link {
    font-size: 1.1rem !important;
    padding: 14px 4px !important;
  }
}

.form-label,
.label {
  text-transform: none;
  letter-spacing: 0.02em;
}

.site-footer .brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 36px;
  padding: 16px 0;
  font-size: 0.95rem;
  color: #8b96a8;
}
.admin-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  overflow-x: auto;
}
.admin-table th {
  background: var(--bg-section) !important;
  color: var(--heading) !important;
}
.prose-page h1 {
  font-family: "Lora", serif;
  color: var(--heading);
  font-size: 2rem !important;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.history-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  padding: 1rem 1.15rem;
}
.history-item-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-start;
}
.history-url {
  color: var(--heading);
  font-weight: 600;
  word-break: break-all;
  text-decoration: none;
}
.history-url:hover {
  color: var(--gold);
}
.history-meta {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.qr-settings-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}
.qr-settings-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.qr-settings-key {
  font-weight: 600;
  color: var(--heading);
}
.qr-settings-key::after {
  content: ":";
}
.qr-settings-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.qr-settings-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84rem;
}

/* Create page — dark green header bar bleeding to the edges of a .card
   (which has 0.625rem padding via the !p-2.5 override on that page). */
.panel-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: -0.625rem -0.625rem 0.625rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(135deg, var(--navy), #1a5c2a);
  color: #fff;
}
.panel-head i {
  font-size: 1rem;
  flex-shrink: 0;
}
.panel-head h3 {
  margin: 0;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.panel-head p {
  margin: 0;
  color: #cfe3d4;
  font-size: 0.72rem;
}
.panel-head-sub {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.panel-head-sub i {
  color: var(--navy);
}
.panel-head-sub h3 {
  margin: 0;
}
.panel-head-sub p {
  margin: 0;
}
.new-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--gold);
  color: var(--navy) !important;
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s ease;
}
.new-link-btn:hover {
  background: rgba(223, 160, 57, 0.12);
}
/* Create page's main download action reads as the page's primary green CTA
   in the reference design, distinct from the gold CTA used on the home hero. */
#downloadBtn {
  background: var(--navy) !important;
  border-color: var(--navy) !important;
  color: #fff !important;
}
#downloadBtn:hover:not(:disabled) {
  background: #1a5c2a !important;
  border-color: #1a5c2a !important;
}

.hidden {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
