* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
}

.field {
  width: 100%;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 0.75rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  color: #0f172a;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field::placeholder {
  color: #94a3b8;
}

.field:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.field.error {
  border-color: #f87171;
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

textarea.field {
  resize: vertical;
  min-height: 96px;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

.lbl {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.lbl .req {
  color: #ef4444;
}

.card {
  background: #fff;
  border: 1px solid #e0f2fe;
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.05);
}

.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: #e0f2fe;
  color: #0284c7;
  font-weight: 700;
  font-size: 0.85rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #0ea5e9;
  color: #fff;
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  border-radius: 0.9rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.28);
}

.btn-primary:hover {
  background: #0284c7;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px dashed #bae6fd;
  color: #0369a1;
  background: #f0f9ff;
  padding: 0.55rem 0.9rem;
  border-radius: 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-ghost:hover {
  background: #e0f2fe;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fecaca;
  color: #dc2626;
  background: #fff;
  padding: 0.35rem 0.7rem;
  border-radius: 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-danger:hover {
  background: #fef2f2;
}

.btn-danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.row-in {
  animation: rowIn 0.28s ease;
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.preview-paper {
  font-family: 'Times New Roman', Times, serif;
  color: #111827;
  background: #fff;
  border-radius: 0.5rem;
}

.preview-paper.font-arial {
  font-family: Helvetica, Arial, sans-serif;
}

.preview-paper .p-name {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.2;
}

.preview-paper .p-contact {
  font-size: 0.8rem;
  color: #374151;
  margin-top: 0.15rem;
}

.preview-paper .p-head {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-bottom: 1.5px solid #111827;
  padding-bottom: 3px;
  margin: 0 0 6px;
}

.preview-paper .p-muted {
  font-size: 0.78rem;
  color: #6b7280;
}

.preview-paper .p-photo {
  width: 76px;
  height: 76px;
}

.photo-thumb {
  width: 84px;
  height: 84px;
  border-radius: 9999px;
  border: 2px dashed #bae6fd;
  background: #f0f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
  font-size: 0.7rem;
  font-weight: 600;
  color: #7dd3fc;
  text-align: center;
  padding: 0.25rem;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pv-text {
  white-space: pre-line;
  line-height: 1.45;
}

#toastWrap {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.25);
  animation: rowIn 0.25s ease;
}

@media print {
  body {
    background: #fff !important;
  }
  .no-print {
    display: none !important;
  }
  #previewPanel {
    position: static !important;
    box-shadow: none !important;
    border: none !important;
  }
  .preview-paper {
    box-shadow: none !important;
    border: none !important;
  }
}