/* TLV MEDICAL - Doctor Onboarding Kit */
:root {
  --teal-dark: #0E7C8A;
  --teal: #1F94A0;
  --teal-light: #A6D5DA;
  --teal-bg: #E1F0F1;
  --text-dark: #2A3D45;
  --grey-bg: #E5E5E5;
  --grey-light: #F4F4F4;
  --white: #FFFFFF;
  --border-radius: 24px;
  --shadow: 0 4px 16px rgba(14, 124, 138, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Heebo', 'Assistant', 'Arial Hebrew', sans-serif;
  background: linear-gradient(180deg, #F8FCFC 0%, #EAF6F7 100%);
  color: var(--text-dark);
  direction: rtl;
  min-height: 100vh;
  line-height: 1.55;
  font-size: 16px;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 80px;
  position: relative;
}

/* Header (logo + contact strip) */
.site-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 16px 16px;
  position: relative;
  flex-direction: row-reverse;
}

.logo-wrap {
  position: relative;
  width: 180px;
  flex: 0 0 180px;
}

.logo-blob {
  display: none;
}

.header-meta {
  text-align: right;
}

.logo-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
}

.header-meta {
  flex: 1;
  padding-top: 8px;
  font-size: 12px;
  color: var(--text-dark);
  line-height: 1.6;
}

.header-meta .brand-name {
  font-weight: 700;
  color: var(--teal-dark);
  font-size: 14px;
  letter-spacing: 0.5px;
}

.header-meta .brand-name-en {
  color: var(--teal-dark);
}

/* Save status indicator */
.save-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--teal-dark);
  padding: 6px 16px;
  margin-bottom: 4px;
}

.save-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.save-text {
  font-weight: 500;
}

.reset-link {
  margin-right: auto;
  background: transparent;
  border: 1px solid var(--teal);
  color: var(--teal-dark);
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  transition: all 0.2s;
}

.reset-link:hover {
  background: var(--teal);
  color: white;
}

/* Step progress */
.progress {
  display: flex;
  gap: 6px;
  margin: 8px 0 32px;
  padding: 0 8px;
}

.progress .dot {
  flex: 1;
  height: 6px;
  background: var(--grey-bg);
  border-radius: 3px;
  transition: background 0.3s;
}

.progress .dot.active {
  background: var(--teal);
}

.progress .dot.completed {
  background: var(--teal-dark);
}

/* Card / step container */
.step {
  display: none;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  margin-bottom: 24px;
  position: relative;
}

.step.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Headings */
h1, h2, h3 {
  color: var(--teal-dark);
  font-weight: 800;
}

h1 {
  font-size: 28px;
  margin-bottom: 16px;
}

h2 {
  font-size: 26px;
  margin-bottom: 8px;
  text-align: right;
}

h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.section-title {
  background: var(--teal-dark);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  margin: 28px 0 20px;
  text-align: right;
}

.subhead {
  background: var(--teal-light);
  color: var(--teal-dark);
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  margin: 18px 0 22px;
}

.subhead-small {
  background: var(--teal-dark);
  color: var(--white);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 16px;
}

p {
  margin-bottom: 12px;
  font-size: 15px;
}

/* Welcome page */
.welcome-greeting {
  font-size: 18px;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 4px;
}

.welcome-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 18px;
}

.welcome-body {
  font-size: 15px;
  line-height: 1.8;
  text-align: right;
}

.welcome-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 20px 0;
}

.welcome-images img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
}

.specialty-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.specialty-card {
  background: var(--teal-light);
  color: var(--teal-dark);
  text-align: center;
  padding: 18px 8px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  position: relative;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.specialty-card .icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.specialty-card .icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.specialty-card .label-text {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  line-height: 1.3;
}

.specialty-card::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--teal-light);
}

.welcome-cta {
  text-align: center;
  margin-top: 32px;
  font-weight: 700;
  font-size: 16px;
  color: var(--teal-dark);
}

/* Form fields */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.form-grid.full {
  grid-template-columns: 1fr;
}

.field {
  position: relative;
}

.field label {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
  background: white;
  padding: 0 4px;
  transition: all 0.2s;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  border: 1.5px solid var(--teal);
  border-radius: 999px;
  padding: 14px 18px;
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: right;
  direction: rtl;
}

.field textarea {
  border-radius: 16px;
  resize: vertical;
  min-height: 100px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal-dark);
  box-shadow: 0 0 0 3px rgba(31, 148, 160, 0.15);
}

.field input.field-error,
.field select.field-error,
.field textarea.field-error,
input.field-error,
select.field-error {
  border-color: #d32f2f !important;
  background: #fff5f5;
  animation: shake 0.4s ease;
}

.field input.field-error + label,
.field select.field-error + label {
  color: #d32f2f;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field select:focus + label,
.field select:valid + label {
  top: 0;
  font-size: 11px;
  color: var(--teal-dark);
  font-weight: 700;
  background: white;
}

.field-inline-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.field-inline-label > label {
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-weight: 600;
  font-size: 14px;
  min-width: 130px;
  text-align: right;
}

.field-inline-label input {
  flex: 1;
  border: 1.5px solid var(--teal);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 15px;
  outline: none;
}

/* Radio / Checkbox groups */
.radio-row, .check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border: 1.5px solid var(--teal);
  border-radius: 999px;
  background: white;
}

/* When the row contains many items that wrap, use a softer rectangle */
.check-row {
  border-radius: 18px;
  align-items: flex-start;
  padding: 14px 18px 10px;
}

.radio-row .label,
.check-row .label {
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 14px;
  margin-left: 10px;
  margin-bottom: 4px;
  flex: 0 0 100%;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--teal-bg);
}

.radio-row .label {
  flex: 0 0 auto;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.radio-row label,
.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.15s;
}

.radio-row label:hover,
.check-row label:hover {
  background: var(--teal-bg);
}

.radio-row input[type="radio"],
.check-row input[type="checkbox"] {
  accent-color: var(--teal-dark);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Use grid for checkbox row so columns line up cleanly */
.check-row-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 16px;
  padding: 14px 18px;
  border: 1.5px solid var(--teal);
  border-radius: 18px;
  background: white;
}

.check-row-grid > .label {
  grid-column: 1 / -1;
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--teal-bg);
  margin-bottom: 4px;
}

.check-row-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s;
}

.check-row-grid label:hover {
  background: var(--teal-bg);
}

.check-row-grid input[type="checkbox"] {
  accent-color: var(--teal-dark);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.check-row.column {
  flex-direction: column;
  align-items: stretch;
  border-radius: 16px;
  gap: 10px;
}

.check-row.column label {
  padding: 4px 0;
  border-bottom: 1px solid var(--teal-bg);
}

.check-row.column label:last-child {
  border-bottom: none;
}

/* Operations table */
.ops-intro {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
  text-align: right;
}

.ops-table {
  border: 1.5px solid var(--teal-dark);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 24px;
}

.ops-header {
  display: grid;
  grid-template-columns: 1fr 200px;
  background: white;
  border-bottom: 1.5px solid var(--teal-dark);
}

.ops-header > div {
  padding: 16px 20px;
  text-align: center;
  font-weight: 700;
  color: var(--teal-dark);
  font-size: 15px;
}

.ops-header > div:first-child {
  border-left: 1.5px solid var(--teal-dark);
}

.ops-row {
  display: grid;
  grid-template-columns: 1fr 200px;
  border-bottom: 1px solid var(--teal-bg);
  align-items: center;
}

.ops-row:last-child {
  border-bottom: none;
}

.ops-row .op-name {
  padding: 12px 20px;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  border-left: 1px solid var(--teal-bg);
}

.ops-row .op-name input[type="checkbox"] {
  accent-color: var(--teal-dark);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.ops-row .op-count {
  padding: 8px 20px;
  display: flex;
  justify-content: center;
}

.ops-row .op-count input {
  width: 80px;
  border: 1.5px solid var(--teal);
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  font-size: 14px;
  outline: none;
}

.upload-bar {
  background: var(--teal-light);
  color: var(--teal-dark);
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  margin: 18px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s;
}

.upload-bar:hover {
  background: var(--teal);
  color: white;
}

.upload-bar input[type="file"] {
  display: none;
}

.upload-bar .filename {
  font-size: 13px;
  font-weight: 500;
  font-style: italic;
}

/* Single-row upload (operations page) */
.upload-bar.single-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 14px 8px;
  background: var(--teal-light);
  border-radius: 999px;
  cursor: pointer;
  margin: 18px 0;
  transition: background 0.2s;
}

.upload-bar.single-row:hover {
  background: var(--teal);
  color: white;
}

.upload-bar.single-row .upload-text {
  flex: 1;
  font-weight: 700;
  color: var(--teal-dark);
  font-size: 15px;
  text-align: right;
  padding-right: 10px;
}

.upload-bar.single-row:hover .upload-text {
  color: white;
}

.upload-bar.single-row .upload-icon-side {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal-dark);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.upload-bar.single-row.uploaded {
  background: #d6f0d6;
}

.upload-bar.single-row.uploaded .upload-text {
  color: #2e7d32;
}

/* Documents grid */
.docs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 8px;
}

/* Two-column docs (required / optional) */
.docs-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 8px;
}

.doc-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.req-star {
  color: #d32f2f;
  font-size: 15px;
  font-weight: 700;
  margin-right: 3px;
  vertical-align: middle;
}

.doc-upload {
  background: var(--teal-bg);
  border: 1.5px solid var(--teal-light);
  border-radius: 999px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.doc-upload:hover {
  background: var(--teal-light);
  border-color: var(--teal);
}

.doc-upload .doc-label {
  font-weight: 600;
  color: var(--teal-dark);
  font-size: 14px;
  text-align: right;
  flex: 1;
}

.doc-upload .doc-status {
  font-size: 12px;
  color: var(--text-dark);
  opacity: 0.8;
}

.doc-upload.uploaded {
  background: #d6f0d6;
  border-color: #4caf50;
}

.doc-upload.uploaded .doc-status {
  color: #2e7d32;
  font-weight: 600;
}

.doc-upload input[type="file"] {
  display: none;
}

.doc-upload .upload-icon {
  width: 26px;
  height: 26px;
  background: var(--teal-dark);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Procedures / agreement text */
.legal-list {
  text-align: right;
  font-size: 14px;
  line-height: 1.85;
}

.legal-list li {
  margin-bottom: 8px;
  padding-right: 4px;
  list-style-position: inside;
}

.legal-list ol {
  counter-reset: item;
  list-style: none;
  padding-right: 0;
}

.legal-list ol > li {
  counter-increment: item;
  position: relative;
  padding-right: 32px;
}

.legal-list ol > li::before {
  content: counter(item) ".";
  position: absolute;
  right: 0;
  color: var(--teal-dark);
  font-weight: 700;
}

.legal-list ol ol > li::before {
  content: counters(item, ".") ".";
}

.legal-list h4 {
  color: var(--teal-dark);
  margin: 20px 0 10px;
  font-size: 16px;
  font-weight: 700;
}

.intro-block {
  background: #F4FAFB;
  border-right: 4px solid var(--teal);
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.8;
}

/* Signature pad */
.signature-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--teal-bg);
}

.sig-block label {
  display: block;
  color: var(--teal-dark);
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 15px;
}

.sig-pad-wrap {
  background: var(--grey-light);
  border: 1.5px dashed var(--teal);
  border-radius: 14px;
  position: relative;
  height: 120px;
  overflow: hidden;
}

.sig-pad {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.sig-clear {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: white;
  border: 1px solid var(--teal);
  color: var(--teal-dark);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.sig-clear:hover {
  background: var(--teal);
  color: white;
}

.date-display {
  background: var(--grey-light);
  border: 1.5px solid var(--teal);
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
}

/* Navigation buttons */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--teal-bg);
}

.btn {
  background: var(--teal-dark);
  color: white;
  border: none;
  padding: 14px 36px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  min-width: 120px;
}

.btn:hover {
  background: var(--teal);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 124, 138, 0.2);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: white;
  color: var(--teal-dark);
  border: 1.5px solid var(--teal-dark);
}

/* Force arrow characters to keep their actual direction (no bidi mirroring) */
.arrow-left, .arrow-right {
  display: inline-block;
  direction: ltr;
  unicode-bidi: bidi-override;
  font-family: 'Segoe UI Symbol', Arial, sans-serif;
  font-weight: 400;
  margin: 0 4px;
}

.btn-secondary:hover {
  background: var(--teal-bg);
}

.btn-submit {
  background: var(--teal-light);
  color: var(--teal-dark);
  font-size: 22px;
  padding: 18px 64px;
  font-weight: 800;
}

.btn-submit:hover {
  background: var(--teal);
  color: white;
}

/* Final / thank-you page */
.final-page {
  text-align: center;
  padding: 40px 24px;
}

.success-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  background: var(--teal-dark);
  color: white;
  font-size: 56px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(14, 124, 138, 0.3);
  animation: popIn 0.5s ease;
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.final-bar {
  background: var(--teal-dark);
  height: 12px;
  border-radius: 999px;
  margin: 0 40px 40px;
}

.final-page h2 {
  text-align: center;
  font-size: 28px;
  line-height: 1.4;
  margin: 0 auto 16px;
  color: var(--teal-dark);
}

.success-sub {
  text-align: center;
  font-size: 17px;
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 24px;
  color: var(--text-dark);
}

/* Final submit block on step 7 */
.final-submit-block {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--teal-bg);
}

.final-submit-hint {
  background: var(--teal-bg);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--teal-dark);
  text-align: center;
  margin-bottom: 18px;
  line-height: 1.6;
}

.btn-submit-final {
  background: var(--teal-dark);
  font-size: 18px;
  font-weight: 800;
  padding: 16px 48px;
  box-shadow: 0 4px 16px rgba(14, 124, 138, 0.3);
}

.btn-submit-final:hover {
  background: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 124, 138, 0.4);
}

.validation-summary {
  margin-top: 18px;
  background: #fff5f5;
  border: 1.5px solid #d32f2f;
  border-radius: 14px;
  padding: 16px 20px;
  color: #c62828;
  font-size: 14px;
  line-height: 1.7;
}

.validation-summary h4 {
  color: #c62828;
  margin-bottom: 10px;
  font-size: 16px;
}

.validation-summary ul {
  list-style: none;
  padding-right: 0;
}

.validation-summary li {
  padding: 4px 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.validation-summary li::before {
  content: '⚠';
  color: #d32f2f;
}

.validation-summary a {
  color: var(--teal-dark);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--teal-dark);
  border-top: 2px solid var(--teal-bg);
}

.site-footer .brand-line {
  font-weight: 700;
  margin-bottom: 4px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 124, 138, 0.6);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: white;
  border-radius: 20px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
}

.modal-wide {
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  text-align: right;
}

.modal-close-x {
  position: absolute;
  top: 12px;
  left: 16px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--teal-dark);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: inherit;
}

.modal-close-x:hover {
  background: var(--teal-bg);
}

/* Doc upload wrapper with external info button */
.doc-upload-wrap {
  position: relative;
}

.doc-upload-wrap .doc-upload {
  padding-left: 44px;
}

.info-btn-outside {
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal-dark);
  color: white;
  border: 2px solid white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(14, 124, 138, 0.25);
  transition: all 0.2s;
}

.info-btn-outside:hover {
  background: var(--teal);
  transform: translateY(-50%) scale(1.1);
}

.modal h3 {
  margin-bottom: 12px;
}

.modal-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--teal-bg);
  border-top-color: var(--teal-dark);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Tooltip / hint */
.hint {
  font-size: 13px;
  color: var(--teal);
  margin-top: 4px;
}

/* Hide / show conditional sections */
.specialty-section {
  display: none;
}

.specialty-section.active {
  display: block;
}

/* Responsive */
@media (max-width: 720px) {
  .step {
    padding: 24px 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .docs-grid,
  .docs-2col {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .welcome-images {
    grid-template-columns: repeat(2, 1fr);
  }
  .specialty-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .signature-section {
    grid-template-columns: 1fr;
  }
  .ops-row, .ops-header {
    grid-template-columns: 1fr 110px;
  }
  .check-row-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ops-row .op-count input {
    width: 70px;
  }
  h1, h2 {
    font-size: 22px;
  }
  .site-header {
    padding: 16px 8px;
  }
  .logo-wrap {
    width: 130px;
    flex: 0 0 130px;
  }
}

/* Narrow phones — stack multi-column checkbox grids to a single column */
@media (max-width: 480px) {
  .step {
    padding: 20px 14px;
  }
  .check-row-grid {
    grid-template-columns: 1fr;
    gap: 2px 12px;
  }
  .radio-row {
    gap: 10px 14px;
  }
  .ops-header > div {
    font-size: 12px;
    padding: 10px 8px;
  }
  .ops-row .op-name {
    font-size: 13px;
    padding: 10px 10px;
    gap: 6px;
  }
  .ops-row, .ops-header {
    grid-template-columns: 1fr 90px;
  }
  .ops-row .op-count input {
    width: 60px;
  }
  .subhead {
    font-size: 15px;
    padding: 12px 14px;
  }
  .section-title {
    font-size: 15px;
    padding: 10px 16px;
  }
  .upload-bar.single-row .upload-text {
    font-size: 13.5px;
  }
  .doc-upload .doc-label {
    font-size: 13.5px;
  }
  .header-meta {
    font-size: 11px;
  }
  .btn {
    padding: 13px 22px;
    font-size: 15px;
    min-width: 96px;
  }
  .modal {
    padding: 24px 18px;
  }
}

/* Print-friendly */
@media print {
  .step {
    display: block !important;
    page-break-after: always;
    box-shadow: none;
  }
  .nav-buttons,
  .progress,
  .sig-clear {
    display: none;
  }
}
