body {
  font-family: "Roboto", Arial, sans-serif;
}

.btn {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  border-radius: 0.375rem;
  padding: 0.625rem 0.875rem;
  font-weight: 600;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn-primary {
  background: #0f172a;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1e293b;
}

.btn-secondary {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: #f1f5f9;
}

.btn-ghost {
  color: #475569;
}

.btn-disabled {
  cursor: not-allowed;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
}

.panel {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.page-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: 0;
}

.section-kicker {
  margin-bottom: 0.5rem;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.form-label {
  display: block;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 650;
}

.input {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #ffffff;
  padding: 0.625rem 0.75rem;
  color: #0f172a;
  outline: none;
}

.input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.choice-button {
  display: flex;
  min-height: 6.25rem;
  align-items: center;
  gap: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 1rem;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.choice-button:hover {
  border-color: #64748b;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.choice-button-dark {
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
}

.choice-icon {
  display: grid;
  min-width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 800;
}

.choice-icon-light {
  background: #e0f2fe;
  color: #0f172a;
}

.document-preview {
  border: 1px solid #dbe3ee;
  border-radius: 0.375rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 14px 24px rgba(15, 23, 42, 0.07);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-danger {
  background: #fef2f2;
  color: #991b1b;
}

.status-warning {
  background: #fffbeb;
  color: #92400e;
}

#qr-reader {
  width: 100%;
}

#qr-reader video {
  width: 100%;
  border-radius: 0.375rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.52);
  padding: 1rem;
}

.modal-panel {
  width: min(100%, 58rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-radius: 0.5rem;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}

.template-option {
  min-height: 6rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 1rem;
  text-align: left;
}

.template-option:hover,
.template-option-active {
  border-color: #0f766e;
  background: #f0fdfa;
}

.print-preview-sheet {
  position: relative;
  width: 100%;
  max-width: 16rem;
  aspect-ratio: 3 / 4;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.print-preview-landscape {
  aspect-ratio: 4 / 3;
}

.print-preview-qr {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 3.75rem;
  height: 3.75rem;
  place-items: center;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 900;
}

.print-preview-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-pos-top-left {
  left: 1rem;
  top: 1rem;
}

.preview-pos-top-right {
  right: 1rem;
  top: 1rem;
}

.preview-pos-bottom-left {
  bottom: 1rem;
  left: 1rem;
}

.preview-pos-bottom-right {
  bottom: 1rem;
  right: 1rem;
}

.preview-pos-center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.print-preview-data {
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: calc(50% + 2.4rem);
  text-align: center;
  color: #334155;
  font-size: 0.7rem;
  line-height: 1.25;
}

.position-picker {
  position: absolute;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
}

.position-picker:hover {
  border-color: #0f766e;
  background: #ccfbf1;
}

.picker-top-left {
  left: 1rem;
  top: 1rem;
}

.picker-top-right {
  right: 1rem;
  top: 1rem;
}

.picker-bottom-left {
  bottom: 1rem;
  left: 1rem;
}

.picker-bottom-right {
  bottom: 1rem;
  right: 1rem;
}

.picker-center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
