/* ===== HETZENDORF MODAL CSS ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-wrap {
  background: #fff; border-radius: 18px; width: 100%;
  max-width: 700px; max-height: 92vh; overflow-y: auto;
  transform: translateY(14px); transition: transform 0.25s;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28); position: relative;
}
.modal-overlay.open .modal-wrap { transform: translateY(0); }
.modal-wrap .mwrap { padding: 32px 28px 40px; }
.modal-wrap h1 {
  font-family: var(--heading-font-family, Georgia, serif);
  font-size: 1.6rem; margin: 0 0 0.3rem; font-weight: 700;
  color: #0d1b2a;
}
.modal-close {
  position: absolute; top: 1.2rem; right: 1.2rem;
  background: #1e7fba; border: none; width: 38px; height: 38px;
  border-radius: 50%; cursor: pointer; font-size: 1.2rem;
  display: grid; place-items: center; color: #fff;
  transition: all 0.15s; font-family: inherit; z-index: 10;
}
.modal-close:hover { background: #145a87; transform: scale(1.08); }
.modal-wrap p.lead { color: #64748b; margin: 0 0 1.2rem; font-size: 0.88rem; }
.modal-wrap .card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px; }
.modal-wrap .tabs {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 6px; background: #eef0f3; padding: 5px;
  border-radius: 12px; margin-bottom: 18px;
}
.modal-wrap .tabs button {
  background: transparent; border: 0; padding: 10px 6px;
  font-size: 0.73rem; font-weight: 600; color: #64748b;
  border-radius: 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; font-family: inherit; transition: all 0.15s;
}
.modal-wrap .tabs button.active {
  background: #fff; color: #0f172a;
  box-shadow: 0 1px 3px rgba(15,23,42,0.1);
}
.modal-wrap label {
  display: block; font-size: 0.82rem; font-weight: 500;
  margin: 0 0 6px; color: #1e293b;
}
.modal-wrap .req { color: #dc2626; }
.modal-wrap input,
.modal-wrap select,
.modal-wrap textarea {
  width: 100%; padding: 11px 12px;
  border: 1px solid #e2e8f0; border-radius: 10px;
  background: #fff; font-size: 0.9rem; font-family: inherit;
  outline: none; transition: border-color 0.15s; color: #1e293b;
}
.modal-wrap input:focus,
.modal-wrap select:focus,
.modal-wrap textarea:focus { border-color: #1e7fba; }
.modal-wrap textarea { min-height: 88px; resize: vertical; }
.modal-wrap .mrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-wrap .field { margin-bottom: 14px; }
.modal-wrap .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.modal-wrap .chip {
  padding: 8px 12px; border: 1px solid #e2e8f0;
  border-radius: 9px; font-size: 0.8rem; background: #fff;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.modal-wrap .chip.active {
  border-color: #1e7fba;
  background: rgba(30,127,186,0.07);
  color: #1e7fba; font-weight: 600;
}
.modal-wrap .switch {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid #e2e8f0; padding: 12px; border-radius: 10px;
  margin-bottom: 14px; font-size: 0.85rem; gap: 1rem;
}
.modal-wrap .btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 18px; border-radius: 11px; border: 0;
  font-weight: 700; font-size: 0.92rem; cursor: pointer; width: 100%;
  background: #1e7fba; color: #fff;
  transition: all 0.2s; font-family: inherit; margin-top: 4px;
}
.modal-wrap .btn:hover { background: #145a87; }
.modal-wrap .alert {
  padding: 12px 14px; border-radius: 10px;
  font-size: 0.83rem; margin-bottom: 14px; line-height: 1.5;
}
.modal-wrap .alert.warn { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; }
.modal-wrap .alert.ok { background: #dcfce7; border: 1px solid #bbf7d0; color: #166534; }
.modal-wrap .alert.err { background: #fee2e2; border: 1px solid #fecaca; color: #991b1b; }
.modal-wrap .hidden { display: none; }
.hidden { display: none !important; }
.modal-wrap .sec-label {
  font-size: 0.72rem; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin: 18px 0 10px; border-top: 1px solid #e2e8f0; padding-top: 14px;
}
.modal-wrap .sec-label:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
@media (max-width: 520px) {
  .modal-wrap .mrow { grid-template-columns: 1fr; }
  .modal-wrap .tabs { grid-template-columns: repeat(3,1fr); }
}
