.j3-watchdog-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.56);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.j3-watchdog-modal {
  width: min(100%, 640px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
}

.j3-watchdog-modal-header,
.j3-watchdog-modal-body {
  padding: 24px 28px;
}

.j3-watchdog-modal-header {
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.j3-watchdog-modal-header h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.j3-watchdog-modal-subtitle {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.j3-watchdog-modal-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.j3-watchdog-form {
  display: block;
}

.j3-watchdog-panel {
  display: grid;
  gap: 18px;
}

.j3-watchdog-panel > .j3-watchdog-field--wide,
.j3-watchdog-panel > .j3-watchdog-account-note,
.j3-watchdog-panel > .j3-watchdog-footer {
  width: 100%;
}

.j3-watchdog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.j3-watchdog-field {
  margin-bottom: 0;
  display: block !important;
  width: 100%;
}

.j3-watchdog-field--wide {
  grid-column: 1 / -1;
  width: 100%;
}

.j3-watchdog-field > label,
.j3-watchdog-form label {
  display: block;
  margin-bottom: 8px;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  width: 100% !important;
  max-width: none !important;
  float: none !important;
}

.j3-watchdog-field > .form-control,
.j3-watchdog-field > .j3-watchdog-static,
.j3-watchdog-field > .text-danger,
.j3-watchdog-field > .help-block {
  display: block;
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  float: none !important;
}

.j3-watchdog-form .form-control {
  min-height: 48px;
  border-radius: 10px;
  border-color: #d7dce3;
  box-shadow: none;
}

.j3-watchdog-form .form-control:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.j3-watchdog-static,
.j3-watchdog-modal .form-control[readonly] {
  background: #f8fafc;
  color: #111827;
  font-weight: 600;
}

.j3-watchdog-alert {
  margin-bottom: 16px;
}

.j3-watchdog-error {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
}

.j3-watchdog-help {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

.j3-watchdog-help-box {
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}

.j3-watchdog-account-note {
  margin-top: -2px;
}

.j3-watchdog-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px 20px;
  padding-top: 6px;
}

.j3-watchdog-price-field {
  max-width: 320px;
}

#j3-watchdog-price {
  text-align: left;
}

.j3-watchdog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0;
}

.j3-watchdog-submit {
  min-width: 220px;
  min-height: 50px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 12px 24px rgba(251, 205, 0, 0.22);
}

html.j3-watchdog-open,
html.j3-watchdog-open body {
  overflow: hidden;
}

@media (max-width: 767px) {
  .j3-watchdog-modal-overlay {
    padding: 12px;
  }

  .j3-watchdog-modal-header,
  .j3-watchdog-modal-body {
    padding: 18px;
  }

  .j3-watchdog-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .j3-watchdog-footer {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .j3-watchdog-price-field {
    max-width: none;
  }

  .j3-watchdog-submit {
    width: 100%;
  }
}
