/* ==========================================================================
   SOULDENT DENTAL LAB — Unified Stylesheet for all Rx forms
   ========================================================================== */

:root {
  --souldent-primary: #0a4f6e;
  --souldent-accent:  #0a8a6e;
  --souldent-light:   #e9f3f1;
  --souldent-grey:    #5e6a73;
  --souldent-bg:      #f4f6f7;
  --souldent-border:  #c9d4d9;
  --souldent-header:  #6e7c84;
  --hand-red:         #d22a2a;
  --hand-black:       #222;
}

html, body {
  background: var(--souldent-bg);
  color: #1f2a31;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  line-height: 1.35;
}

/* ----- Page wrapper / paper feel ----- */
.rx-paper {
  background: #fff;
  max-width: 1100px;
  margin: 24px auto;
  padding: 28px 36px 40px;
  border: 1px solid var(--souldent-border);
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
  border-radius: 4px;
  position: relative;
}

/* ----- Header ----- */
.rx-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--souldent-primary);
  padding-bottom: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 16px;
}
.rx-header .logo img { width:90px }
.rx-header .form-title {
  text-align: right;
  text-transform: uppercase;
}
.rx-header .form-title h1 {
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--souldent-primary);
  margin: 0;
  font-weight: 700;
}
.rx-header .form-title .subtitle {
  font-size: 11px;
  color: var(--souldent-grey);
  letter-spacing: 1px;
  margin-top: 4px;
}
.rx-header .rx-badge {
  display: inline-block;
  background: #fff;
  border: 2px solid var(--souldent-primary);
  color: var(--souldent-primary);
  padding: 6px 14px;
  font-weight: 700;
  font-size: 18px;
  border-radius: 4px;
  margin-left: 12px;
}

/* ----- Section header bands (gray bar like the PDFs) ----- */
.section-band {
  background: var(--souldent-header);
  color: #fff;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 18px 0 10px;
  border-radius: 2px;
}
.section-band .sub {
  font-weight: 400;
  font-size: 11px;
  margin-left: 8px;
  opacity: .85;
  text-transform: none;
  letter-spacing: .5px;
}

/* ----- Inline labels under input lines ----- */
.field-line {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-bottom: 8px;
}
.field-line label {
  font-size: 11px;
  color: #444;
  white-space: nowrap;
  font-weight: 600;
}
.field-line input,
.field-line select {
  border: 0;
  border-bottom: 1px solid #888;
  border-radius: 0;
  background: transparent;
  flex: 1;
  font-size: 12px;
  padding: 2px 4px;
}
.field-line input:focus,
.field-line select:focus {
  outline: none;
  border-bottom-color: var(--souldent-accent);
  background: #fafff9;
}

/* ----- Tooth / batch boxes ----- */
.batch-boxes {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
}
.batch-boxes input {
  width: 22px; height: 26px;
  text-align: center;
  border: 1px solid #888;
  border-radius: 2px;
  font-size: 12px;
  padding: 0;
}

/* ----- Checkbox / radio rows ----- */
.opt-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 12px;
}
.opt-row input[type="checkbox"],
.opt-row input[type="radio"] {
  margin: 0;
  accent-color: var(--souldent-accent);
}
.opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(199px, 1fr));
  gap: 4px 18px;
}

/* ----- Tooth chart ----- */
.tooth-chart {
  border: 1px solid #888;
  border-radius: 4px;
  padding: 8px 10px;
  margin: 8px 0;
  background: #fcfcfc;
}
.tooth-row {
  display: flex;
  gap: 1px;
  font-size: 11px;
}
.tooth-row .arch-label {
  width: 50px;
  font-weight: 700;
  color: #444;
}
.tooth-cell {
  flex: 1;
  text-align: center;
  border: 1px solid #ccc;
  padding: 3px 0;
  background: #fff;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  line-height: 10px;
}
.tooth-cell:hover {
  background: var(--souldent-light);
}
.tooth-cell.marked {
  background: #ffeaea;
  color: #b30000;
  font-weight: 700;
}
.tooth-legend {
  font-size: 10px;
  color: #555;
  margin-top: 4px;
  font-style: italic;
}

/* Visual upper/lower jaw chart */
.jaw-chart {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}
.jaw-chart svg { max-width: 320px; width: 100%; height: auto; }

/* ----- Special instructions / textareas ----- */
.notes-box {
  width: 100%;
  min-height: 90px;
  border: 1px solid #888;
  border-radius: 3px;
  padding: 8px;
  font-size: 12px;
  resize: vertical;
}

/* ----- Small mock thumbnail (for shade boxes etc.) ----- */
.shade-box {
  width: 100%;
  height: 110px;
  border: 1px solid #888;
  border-radius: 6px;
  background: linear-gradient(180deg, #fff 0%, #f7e6c8 100%);
  position: relative;
}
.shade-box::after {
  content: "tooth shade reference";
  position: absolute;
  bottom: 4px; left: 0; right: 0;
  text-align: center;
  font-size: 9px;
  color: #888;
  font-style: italic;
}

/* ----- Material enclosed table ----- */
.mat-list {
  font-size: 11px;
}
.mat-list .mat-header {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  font-weight: 700;
  border-bottom: 1px solid #aaa;
  padding-bottom: 3px;
  margin-bottom: 4px;
  color: #555;
}
.mat-list .mat-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  border-bottom: 1px dotted #ddd;
}
.mat-list .mat-row .checks {
  display: flex;
  gap: 22px;
}

/* ----- Handwritten annotation overlay ----- */
.handwritten {
  font-family: 'Caveat', 'Bradley Hand', cursive;
  color: var(--hand-red);
  font-weight: 700;
  font-size: 16px;
  display: inline-block;
  transform: rotate(-3deg);
  margin-left: 6px;
}
.handwritten.black { color: var(--hand-black); }
.handwritten.large { font-size: 22px; }
.hand-note {
  display: block;
  font-family: 'Caveat', 'Bradley Hand', cursive;
  color: var(--hand-red);
  font-weight: 700;
  font-size: 15px;
  margin-top: 4px;
}
.hand-circle {
  display: inline-block;
  border: 2px solid var(--hand-red);
  border-radius: 50%;
  padding: 2px 8px;
  color: var(--hand-red);
  font-family: 'Caveat', cursive;
  font-weight: 700;
  margin-left: 6px;
  transform: rotate(-2deg);
}

/* ----- Footer ----- */
.rx-footer {
  border-top: 1px solid var(--souldent-primary);
  margin-top: 24px;
  padding-top: 10px;
  text-align: center;
  font-size: 10px;
  color: var(--souldent-grey);
}
.rx-footer a { color: var(--souldent-accent); text-decoration: none; }
.rx-footer a:hover { text-decoration: underline; }

.disclaimer {
  background: var(--souldent-light);
  border-left: 3px solid var(--souldent-primary);
  padding: 8px 12px;
  font-size: 11px;
  color: #333;
  margin-top: 18px;
  border-radius: 2px;
}

/* ----- Top toolbar (print / back) ----- */
.rx-toolbar {
  max-width: 1100px;
  margin: 16px auto -8px;
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
}
.rx-toolbar .btn {
  font-size: 12px;
}
@media print {
  .rx-toolbar, .no-print { display: none !important; }
  body { background: #fff; }
  .rx-paper { box-shadow: none; border: 0; margin: 0; max-width: 100%; }
}

/* ============================================================
   STARTER / INDEX PAGE
   ============================================================ */
.starter-hero {
  background: linear-gradient(135deg, var(--souldent-primary) 0%, var(--souldent-accent) 100%);
  color: #fff;
  padding: 48px 32px;
  text-align: center;
  border-radius: 6px;
  margin: 24px auto;
  max-width: 1100px;
}
.starter-hero h1 {
  font-size: 32px;
  letter-spacing: 3px;
  margin: 0;
}
.starter-hero p {
  margin-top: 8px;
  opacity: .9;
  letter-spacing: 1px;
}
.starter-grid {
  max-width: 1100px;
  margin: 0 auto 48px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.form-card {
  background: #fff;
  border: 1px solid var(--souldent-border);
  border-top: 4px solid var(--souldent-accent);
  border-radius: 6px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: transform .15s ease, box-shadow .15s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.form-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  color: inherit;
  text-decoration: none;
}
.form-card .icon {
  font-size: 28px;
  color: var(--souldent-primary);
  margin-bottom: 8px;
}
.form-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--souldent-primary);
}
.form-card p {
  font-size: 12px;
  color: var(--souldent-grey);
  margin: 0 0 12px;
  flex: 1;
}
.form-card .open-btn {
  display: inline-block;
  background: var(--souldent-accent);
  color: #fff;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 3px;
  letter-spacing: 1px;
  text-transform: uppercase;
  align-self: flex-start;
}

/* ----- Misc helpers ----- */
.divider { border-top: 1px dashed #ccc; margin: 12px 0; }
.text-muted-sm { font-size: 10px; color: #777; }
.required-star { color: #c0392b; }

.icon-circle {
  display: inline-flex;
  width: 18px; height: 18px;
  border: 1px solid #888;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* Smile-type photo placeholder for Penn Composite Stent */
.smile-thumb {
  width: 100%;
  height: 70px;
  background: linear-gradient(180deg, #fde7d4 0%, #f0c79a 60%, #b87a4d 100%);
  border-radius: 3px;
  position: relative;
  /* overflow: hidden; */
}
/* .smile-thumb::before {
  content: '';
  position: absolute;
  top: 18px; left: 10%; right: 10%; height: 36px;
  background:
    radial-gradient(ellipse at 12% 50%, #fff 18%, transparent 22%),
    radial-gradient(ellipse at 28% 50%, #fff 18%, transparent 22%),
    radial-gradient(ellipse at 44% 50%, #fff 20%, transparent 24%),
    radial-gradient(ellipse at 60% 50%, #fff 20%, transparent 24%),
    radial-gradient(ellipse at 76% 50%, #fff 18%, transparent 22%),
    radial-gradient(ellipse at 92% 50%, #fff 18%, transparent 22%);
} */
.smile-card {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px;
  cursor: pointer;
  transition: border-color .15s;
}
.smile-card:hover, .smile-card.selected { border-color: var(--souldent-accent); }
.smile-card .lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 4px;
}
