/* ===== Form Panel ===== */
.form-panel,
.form,
.form-panel__placeholder {
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}

.form-panel {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.form-panel__title {
  padding: 18px 24px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(to right, rgba(26, 58, 92, 0.04), transparent);
}

.form-panel__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 480px;
  padding: 48px 24px;
  text-align: center;
}

.form-panel__placeholder-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.form-panel__placeholder-text {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.form-panel__placeholder-hint {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

/* ===== Form ===== */
.form {
  padding: 8px 24px 24px;
}

.form-section {
  border: none;
  margin: 0;
  padding: 16px 0;
}

.form-section + .form-section {
  border-top: 1px solid var(--color-border);
}

.form-section__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
  padding: 0 0 12px;
  margin-bottom: 4px;
}

.form-section__fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.form-field__required {
  color: #e53e3e;
  margin-left: 2px;
}

.form-field__input {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-field__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.form-field__input::placeholder,
.form-field__textarea::placeholder {
  color: #a0aec0;
  opacity: 1;
}

.form-field__textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-field__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23718096' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-field--error .form-field__input {
  border-color: #e53e3e;
}

.form-field--error .form-field__input:focus {
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15);
}

.form-field__error {
  font-size: 0.8125rem;
  color: #e53e3e;
  min-height: 1.2em;
}

.form-field__hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.form-field--nested {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--color-border);
}

/* ===== Attachment Checkboxes ===== */
.form-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--color-text);
  user-select: none;
}

.form-checkbox__input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.form-checkbox__label {
  line-height: 1.4;
}

.form-field--attachment-other {
  margin-top: 12px;
}

.form__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid var(--color-border);
}

.form__actions .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.form__actions .btn[disabled]:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: none;
}

.form__actions--standalone {
  padding: 0 24px 24px;
  margin-top: 0;
  border-top: none;
}
