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;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.field-title {
    font-weight: 600;
    margin-bottom: .35rem;
}

.camera-btn {
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-row .btn {
    flex: 1 1 0;
    min-height: 44px;
    white-space: nowrap;
}

/* Scanner overlay */
.scanner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 2000;
    display: none;
    padding: 12px;
}

.scanner-card {
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    max-width: 720px;
    margin: 0 auto;
    height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
}

.scanner-header {
    color: #fff;
    padding: 12px 12px 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.scanner-video-wrap {
    position: relative;
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

video#scannerVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scan-reticle {
    position: absolute;
    width: min(80vw, 520px);
    height: 120px; /* good for 1D barcodes */
    border: 2px solid rgba(255,255,255,.8);
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,.25);
}

.scanner-footer {
    padding: 10px 12px 12px 12px;
    color: rgba(255,255,255,.9);
    font-size: .95rem;
    background: #0b0b0b;
}

/* Overlay background */
.overlay {
    display: none; /* toggle to block when showing */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 2000;
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
}

/* Popup */
.popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 32px); /* mobile safe margin */
    max-width: 420px;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

/* Fields */
.field {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.field-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Inputs */
.form-control {
    font-size: 16px; /* prevents iOS zoom */
    padding: 12px;
    border-radius: 8px;
}

/* Actions */
.actions {
    margin-top: 12px;
}

.actions .btn {
width: 100%;
padding: 14px;
font-size: 16px;
border-radius: 10px;
}

.icon-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

    .icon-link:hover {
        color: var(--bs-primary);
    }
