/* ================= FIELD BASICS ================= */
.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #171717;
  margin-bottom: 0.375rem;
}
.field-hint {
  font-size: 0.75rem;
  color: #737373;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}
.field-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  border: 2px solid #e5e5e5;
  background: #fff;
  color: #171717;
  transition: all 0.2s;
  outline: none;
}
.field-input::placeholder { color: #a3a3a3; }
.field-input:hover { border-color: #d4d4d4; }
.field-input:focus { border-color: #171717; box-shadow: 0 0 0 4px rgba(23,23,23,0.1); }
.field-input.field-invalid { border-color: #f87171; background: #fef2f2; }
.field-error {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: #dc2626;
  min-height: 0;
}
.field-error:empty { display: none; }

/* ================= SEARCHABLE SELECT ================= */
.ss-wrapper { position: relative; }
.ss-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  border: 2px solid #e5e5e5;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
}
.ss-button:hover { border-color: #d4d4d4; }
.ss-button.ss-invalid { border-color: #f87171; background: #fef2f2; }
.ss-button[disabled] { background: #f5f5f5; color: #a3a3a3; cursor: not-allowed; }
.ss-value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #171717; }
.ss-value.ss-placeholder { color: #a3a3a3; }
.ss-caret { width: 1.25rem; height: 1.25rem; color: #a3a3a3; transition: transform 0.2s; flex-shrink: 0; }
.ss-open .ss-caret { transform: rotate(180deg); }
.ss-panel {
  position: absolute;
  z-index: 50;
  width: 100%;
  margin-top: 0.5rem;
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e5e5e5;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  overflow: hidden;
  display: none;
}
.ss-open .ss-panel { display: block; }
.ss-search-wrap { padding: 0.75rem; border-bottom: 1px solid #f5f5f5; }
.ss-search {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e5e5;
  background: #fafafa;
  outline: none;
}
.ss-list { max-height: 14rem; overflow-y: auto; padding: 0.25rem 0; }
.ss-option { padding: 0.625rem 1rem; font-size: 0.875rem; color: #404040; cursor: pointer; }
.ss-option:hover { background: #f5f5f5; }
.ss-option.ss-selected { background: #f5f5f5; font-weight: 500; color: #171717; }
.ss-empty { padding: 2rem 1rem; text-align: center; font-size: 0.875rem; color: #737373; }

/* ================= RADIO GROUP ================= */
.radio-group { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.radio-pill {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 2px solid #e5e5e5;
  cursor: pointer;
  user-select: none;
  background: #fff;
  color: #404040;
  transition: all 0.2s;
}
.radio-pill:hover { border-color: #d4d4d4; }
.radio-pill.radio-checked { border-color: #171717; background: #171717; color: #fff; }
.radio-dot {
  width: 1rem; height: 1rem; border-radius: 9999px;
  border: 2px solid #d4d4d4;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.radio-checked .radio-dot { border-color: #fff; }
.radio-dot::after {
  content: ''; width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: #fff; display: none;
}
.radio-checked .radio-dot::after { display: block; }

/* ================= FILE UPLOAD ================= */
.fu-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem;
  padding: 2rem; border-radius: 0.75rem; border: 2px dashed #d4d4d4;
  cursor: pointer; background: #fff; transition: all 0.2s;
}
.fu-drop:hover { border-color: #a3a3a3; background: #fafafa; }
.fu-drop.fu-invalid { border-color: #f87171; background: #fef2f2; }
.fu-icon { width: 3rem; height: 3rem; border-radius: 9999px; background: #f5f5f5; display: flex; align-items: center; justify-content: center; color: #a3a3a3; }
.fu-preview { position: relative; border-radius: 0.75rem; overflow: hidden; border: 2px solid #e5e5e5; }
.fu-preview img { width: 100%; height: 10rem; object-fit: cover; display: block; }
.fu-preview-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0); display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.fu-preview:hover .fu-preview-overlay { background: rgba(0,0,0,0.4); }
.fu-preview-btn { opacity: 0; cursor: pointer; padding: 0.5rem 1rem; background: rgba(255,255,255,0.9); border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; transition: opacity 0.2s; }
.fu-preview:hover .fu-preview-btn { opacity: 1; }

/* ================= MODAL ================= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(2px); }
.modal-box { position: relative; width: 100%; max-width: 28rem; background: #fff; border-radius: 1rem; box-shadow: 0 25px 50px rgba(0,0,0,0.25); border: 1px solid; }
.modal-box.modal-success { border-color: #bbf7d0; }
.modal-box.modal-error { border-color: #fecaca; }
.modal-box.modal-confirm { border-color: #e5e5e5; }
.modal-icon-wrap { display: flex; align-items: center; justify-content: center; width: 5rem; height: 5rem; border-radius: 9999px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.05); border: 1px solid #f5f5f5; margin: 0 auto 1rem; }
.modal-icon { width: 3rem; height: 3rem; }
.modal-success .modal-icon { color: #16a34a; }
.modal-error .modal-icon { color: #dc2626; }
.modal-confirm .modal-icon { color: #404040; }
.modal-title { font-size: 1.125rem; font-weight: 600; color: #171717; margin-bottom: 0.5rem; }
.modal-message { font-size: 0.875rem; color: #525252; line-height: 1.6; }
.modal-actions { display: flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 0 1.5rem 1.5rem; }
.modal-btn { flex: 1; padding: 0.625rem 1rem; font-size: 0.875rem; font-weight: 600; border-radius: 0.75rem; cursor: pointer; transition: all 0.2s; border: none; }
.modal-btn-cancel { background: #f5f5f5; color: #404040; font-weight: 500; }
.modal-btn-cancel:hover { background: #e5e5e5; }
.modal-btn-confirm { color: #fff; background: #171717; }
.modal-btn-confirm:hover { background: #262626; }
.modal-success .modal-btn-confirm { background: #16a34a; }
.modal-success .modal-btn-confirm:hover { background: #15803d; }
.modal-error .modal-btn-confirm { background: #dc2626; }
.modal-error .modal-btn-confirm:hover { background: #b91c1c; }

.spinner { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
