html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* ——— QR doğrulama (tek ekran, sabit alt aksiyon) ——— */
body.qr-dogrula-body {
  margin-bottom: 0;
  transition: background-color 0.35s ease;
}

body.qr-dogrula-body.qr-bg-state--first {
  min-height: 100dvh;
  background-color: #bbf7d0;
}

body.qr-dogrula-body.qr-bg-state--repeat {
  min-height: 100dvh;
  background-color: #fef08a;
}

body.qr-dogrula-body.qr-bg-state--notfound {
  min-height: 100dvh;
  background-color: #fecdd3;
}

body.qr-dogrula-body.qr-bg-state--error {
  min-height: 100dvh;
  background-color: #e5e5e5;
}

body.qr-dogrula-body footer.footer {
  display: none;
}

body.qr-dogrula-body header .navbar {
  margin-bottom: 0.5rem !important;
}

body.qr-dogrula-body main.pb-3 {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)) !important;
}

.qr-dogrula-shell {
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: calc(100dvh - 8.5rem);
}

.qr-dogrula-top {
  flex: 0 0 auto;
}

.qr-dogrula-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.25;
}

.qr-dogrula-hint {
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.3;
}

.qr-camera-line {
  min-height: 1.25rem;
  line-height: 1.25;
}

.qr-reader-wrap {
  flex: 0 0 auto;
  max-height: min(42dvh, 260px);
  min-height: 140px;
  transition: max-height 0.22s ease, opacity 0.2s ease, min-height 0.22s ease;
}

.qr-reader-wrap--collapsed {
  max-height: 0 !important;
  min-height: 0 !important;
  opacity: 0;
  border: none !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  pointer-events: none;
  overflow: hidden;
}

.qr-reader {
  width: 100%;
  min-height: 120px;
}

#reader video {
  width: 100% !important;
  max-height: min(40dvh, 240px) !important;
  height: auto !important;
  object-fit: cover;
}

.qr-details summary {
  cursor: pointer;
  user-select: none;
}

.qr-result {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.qr-status-banner {
  border-radius: 0.375rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.35;
}

.qr-status-banner--first {
  background-color: #15803d;
  color: #fff;
}

.qr-status-banner--repeat {
  background-color: #ea580c;
  color: #fff;
}

.qr-result-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.65rem;
  font-size: 0.85rem;
  align-items: baseline;
}

.qr-result-grid .qr-rk {
  color: #6c757d;
  font-size: 0.78rem;
}

.qr-result-grid .qr-rv {
  font-weight: 500;
  word-break: break-word;
}

.qr-error-panel--notfound {
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  border: none;
  background-color: rgba(255, 255, 255, 0.92);
  color: #991b1b;
}

.qr-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  z-index: 1080;
  padding-top: 0.6rem;
  padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
  padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

@media (min-width: 768px) {
  .qr-bottom-bar {
    max-width: 28rem;
    left: 50%;
    right: auto;
    transform: translate3d(-50%, 0, 0);
    -webkit-transform: translate3d(-50%, 0, 0);
    width: calc(100% - 1.5rem);
    border-radius: 0.5rem 0.5rem 0 0;
  }
}

.qr-bottom-bar__btn {
  font-weight: 600;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
