/* =============================================
   BaanPro — Enterprise Registration Form Styles
   ============================================= */

/* ---------- Form Layout ---------- */
.join-form { display: flex; flex-direction: column; gap: 24px; }

.form-row { display: flex; flex-direction: column; }
.form-row-full { width: 100%; }
.form-row-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 0; }

/* ---------- Labels ---------- */
.form-label {
  font-size: 14px;
  font-weight: 600;
  color: #1A2340;
  margin-bottom: 8px;
  display: block;
}
.required { color: #E53935; margin-left: 2px; }

/* ---------- Inputs ---------- */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #E2E8F8;
  border-radius: 10px;
  font-size: 14px;
  color: #1A2340;
  background: #F9FBFF;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
  font-family: inherit;
}
.form-input::placeholder { color: #B0BAD4; }
.form-input:hover { border-color: #9DB8F0; background: #fff; }
.form-input:focus {
  border-color: #1B6FD8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(27, 111, 216, .12);
}
.form-input.error { border-color: #E53935; background: #FFF8F8; }
.form-input.error:focus { box-shadow: 0 0 0 3px rgba(229, 57, 53, .1); }
.form-input.success { border-color: #43A047; background: #F6FBF6; }

/* Select — 用 wrapper+::after 统一箭头，彻底避免多箭头问题 */
.select-wrap {
  position: relative;
  display: block;
}
.select-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 8l5 5 5-5' stroke='%235A6480' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 18px 18px;
  pointer-events: none;
}
.select-wrap:focus-within::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 8l5 5 5-5' stroke='%231B6FD8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.form-select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: none !important;
  padding-right: 40px;
  cursor: pointer;
  width: 100%;
}
/* optgroup 样式 */
.form-select optgroup { font-weight: 700; color: var(--navy); }
.form-select option { font-weight: 400; color: var(--text); padding: 4px 8px; }

/* Input with icon */
.input-with-icon { position: relative; }
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.form-input-icon { padding-left: 42px; }

/* ---------- Error Messages ---------- */
.form-error {
  display: block;
  font-size: 12px;
  color: #E53935;
  margin-top: 5px;
  min-height: 16px;
  transition: opacity .2s;
}

/* ---------- Logo Upload ---------- */
.logo-upload {
  width: 100%;
}
.logo-upload-inner {
  width: 160px;
  height: 160px;
  border: 2px dashed #C5D5F0;
  border-radius: 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  overflow: hidden;
  position: relative;
  background: #F9FBFF;
}
.logo-upload-inner:hover {
  border-color: #1B6FD8;
  background: #EFF6FF;
}
.logo-upload-inner.drag-over {
  border-color: #1B6FD8;
  background: #EFF6FF;
  transform: scale(1.02);
}
.logo-upload-inner.has-image { border-style: solid; border-color: #1B6FD8; }

.logo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 8px;
  padding: 16px;
  text-align: center;
}
.logo-placeholder svg { width: 48px; height: 48px; }
.logo-placeholder span { font-size: 13px; font-weight: 600; color: #1B6FD8; }
.logo-placeholder small { font-size: 11px; color: #9BA3BD; line-height: 1.5; }

.logo-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.logo-upload-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #9BA3BD;
}

/* ---------- Quill Rich Text ---------- */
.quill-wrap {
  border: 1.5px solid #E2E8F8;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}
.quill-wrap:focus-within {
  border-color: #1B6FD8;
  box-shadow: 0 0 0 3px rgba(27, 111, 216, .12);
}
.quill-wrap.error { border-color: #E53935; }

.quill-wrap .ql-toolbar {
  border: none;
  border-bottom: 1.5px solid #E2E8F8;
  padding: 10px 12px;
  background: #F9FBFF;
}
.quill-wrap .ql-container {
  border: none;
  font-size: 14px;
  font-family: inherit;
}
.quill-wrap .ql-editor {
  min-height: 160px;
  padding: 14px 16px;
  line-height: 1.7;
  color: #1A2340;
}
.quill-wrap .ql-editor.ql-blank::before {
  color: #B0BAD4;
  font-style: normal;
  left: 16px;
  right: 16px;
}

/* Quill toolbar button colors */
.ql-toolbar .ql-stroke { stroke: #5A6480; }
.ql-toolbar .ql-fill { fill: #5A6480; }
.ql-toolbar button:hover .ql-stroke,
.ql-toolbar .ql-active .ql-stroke { stroke: #1B6FD8; }
.ql-toolbar button:hover .ql-fill,
.ql-toolbar .ql-active .ql-fill { fill: #1B6FD8; }

/* ---------- Submit Button ---------- */
.form-submit-row {
  align-items: center;
  gap: 16px;
}
.btn-submit {
  width: 100%;
  justify-content: center;
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1B6FD8, #4A9FFF);
  color: #fff;
  font-weight: 700;
  letter-spacing: .3px;
  box-shadow: 0 6px 24px rgba(27, 111, 216, .35);
  transition: all .25s;
  position: relative;
  overflow: hidden;
}
.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.0), rgba(255,255,255,.12));
  opacity: 0;
  transition: opacity .2s;
}
.btn-submit:hover::before { opacity: 1; }
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(27, 111, 216, .45); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}

.btn-loading { display: inline-flex; align-items: center; gap: 8px; }
.btn-loading svg { width: 18px; height: 18px; }

.form-privacy {
  text-align: center;
  font-size: 12px;
  color: #9BA3BD;
  line-height: 1.6;
}
.form-privacy a { color: #1B6FD8; text-decoration: underline; }

/* ---------- Responsive Form ---------- */
@media (max-width: 600px) {
  .form-row-half { grid-template-columns: 1fr; gap: 16px; }
  .logo-upload-inner { width: 140px; height: 140px; }
}
