/* Auth layout */
.auth-page {
  min-height: calc(100vh - 80px); /* header space */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3rem;
  background: #f5f7fb;
}

.auth-card {
  width: 100%;
  max-width: 850px;
  background: #ffffff;
  border-radius: 14px;
  padding: 2.5rem 2rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

@media (min-width: 768px) {
  .auth-card {
    padding: 3rem 3rem;
  }
}

.auth-title {
  margin: 0 0 0.5rem;
  font-size: 1.9rem;
  font-weight: 600;
}

.auth-subtitle {
  margin: 0 0 2rem;
  color: #6b7280;
}

/* Grid of the two sections */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 900px) {
  .form-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

.section-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 1.25rem;
}

/* Form fields */
.auth-form {
  margin-top: 0.5rem;
}

.form-field {
  margin-bottom: 1.1rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #111827;
}

/* Style all Django-generated inputs inside auth-form */
.auth-form input,
.auth-form select,
.auth-form textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease;
  background-color: #f9fafb;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
  background-color: #ffffff;
}

.field-help {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.password-requirements {
  margin-top: 0.65rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #f8fafc;
  transition: opacity 0.2s ease;
}

.password-requirements.is-checking {
  opacity: 0.7;
}

.password-requirements ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.password-requirements li,
.password-match-status {
  position: relative;
  padding-left: 1.55rem;
  color: #64748b;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.password-requirements li::before,
.password-match-status::before {
  content: "";
  position: absolute;
  top: 0.05rem;
  left: 0;
  display: grid;
  width: 1rem;
  height: 1rem;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #ffffff;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

.password-requirements li.is-valid,
.password-match-status.is-valid {
  color: #15803d;
}

.password-requirements li.is-valid::before,
.password-match-status.is-valid::before {
  content: "\2713";
  border-color: #22c55e;
  background: #22c55e;
}

.password-requirements li.is-invalid,
.password-match-status.is-invalid {
  color: #b91c1c;
}

.password-requirements li.is-invalid::before,
.password-match-status.is-invalid::before {
  content: "\00d7";
  border-color: #ef4444;
  background: #ef4444;
  font-size: 0.9rem;
}

.password-match-status {
  margin-top: 0.55rem;
}

.auth-form input.is-valid {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
  background-color: #f0fdf4;
}

.auth-form input.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
  background-color: #fef2f2;
}

.field-error {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: #b91c1c;
}

/* Non-field errors */
.form-errors {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.9rem;
}

/* Buttons */
.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.full-width {
  width: 100%;
}

/* Footer text */
.auth-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
}

.auth-footer a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Make login card narrower than signup */
.auth-card--narrow {
  max-width: 520px;
}

.remember-me {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.auth-form .remember-me input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  padding: 0;
  border-radius: 0.3rem;
  accent-color: #2563eb;
  cursor: pointer;
}

.remember-me:hover {
  color: #111827;
}

/* Modal styling (matches auth card look) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 9999;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

@media (min-width: 768px) {
  .modal-card {
    padding: 2rem 2rem;
  }
}

.modal-title {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  font-weight: 650;
}

.modal-text {
  margin: 0 0 1.25rem;
  color: #6b7280;
}

/* Optional: make secondary close button look consistent */
.modal-close {
  margin-top: 0.75rem;
}

.addr-row{
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom:8px;
}

.addr-row #addrSearch{
  flex: 1 1 auto;     /* grow + shrink nicely */
  min-width: 220px;   /* prevents placeholder getting unusably small */
}

.addr-row button{
  flex: 0 0 auto;     /* buttons keep natural width */
  white-space: nowrap; /* stop "Use my location" wrapping */
}

/* Privacy Notice */
.privacy-consent {
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.privacy-consent .field-help {
  text-align: center;
}

.required-marker {
  color: #dc2626;
}

.privacy-consent-copy {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #111827;
  line-height: 1.5;
}

.privacy-consent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.75rem 0 0.35rem;
  flex-wrap: wrap;
}

.privacy-checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.privacy-checkbox-wrap input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: #2563eb;
}

.privacy-checkbox-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: #111827;
}

.privacy-link {
  white-space: nowrap;
}

.privacy-popup[hidden] {
  display: none !important;
}

.privacy-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.privacy-popup.is-visible {
  opacity: 1;
}

.privacy-popup-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(640px, calc(100vw - 2rem));
  max-height: 85vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);

  transform: translate(-50%, -48%) scale(0.98);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.privacy-popup.is-visible .privacy-popup-dialog {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.privacy-popup-dialog h3 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  color: #0f172a;
}

.privacy-popup-dialog p {
  margin: 0 0 1rem;
  color: #334155;
  line-height: 1.65;
}

.privacy-document-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.privacy-document-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease,
    transform 0.2s ease;
}

.privacy-document-links a:hover {
  border-color: #60a5fa;
  background: #dbeafe;
  transform: translateY(-1px);
}

.privacy-document-links a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .privacy-document-links {
    grid-template-columns: 1fr;
  }
}

.privacy-popup-close {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: #111827;
}

body.privacy-popup-open {
  overflow: hidden;
}

.privacy-popup-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

/* Industry_Type */
.multi-select {
  position: relative;
}

.multi-select-toggle {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background-color: #f9fafb;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.multi-select-toggle::after {
  content: "▾";
  float: right;
}

.multi-select-menu {
  display: none;
  position: absolute;
  z-index: 20;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 0.25rem;
  padding: 0.65rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.multi-select.is-open .multi-select-menu {
  display: block;
}

.multi-select-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.multi-select-menu li {
  margin-bottom: 0.45rem;
}

.multi-select-menu label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  cursor: pointer;
}

.multi-select-menu input[type="checkbox"] {
  width: auto;
}

/* .selected-industries-preview {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: #374151;
} */
.selected-industries-preview {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #374151;
}

.industry-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #1e3a8a;
  font-weight: 500;
}

.industry-pill-remove {
  border: none;
  background: transparent;
  color: #1e3a8a;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.industry-pill-remove:hover {
  color: #dc2626;
}


/* Info tooltip */
.label-with-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.info-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #999;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  user-select: none;
}

.info-tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: 50%;
  bottom: 140%;
  transform: translateX(-50%);
  width: 280px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #222;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  z-index: 50;
  transition: opacity 0.15s ease;
  text-transform: none;
  letter-spacing: normal;
}

.info-tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #222 transparent transparent transparent;
}

.info-tooltip:hover .info-tooltip-text,
.info-tooltip:focus .info-tooltip-text {
  visibility: visible;
  opacity: 1;
}

.password-input-wrapper {
  position: relative;
}

.auth-form .password-input-wrapper input {
  padding-right: 3rem;
}

.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}

.password-visibility-toggle:hover {
  background: #e5e7eb;
  color: #1f2937;
}

.password-visibility-toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.password-eye {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-eye[hidden] {
  display: none;
}
