/* ==========================================================================
   SmartWebMakers - Shared App Form Components
   Sprint D2: unifies what were two nearly-identical, independently
   maintained definitions (.admin-form-group and .portal-form-group) into
   one shared .app-form-group class, used by both admin.css and portal.css
   rather than each carrying its own copy. Loaded via tokens.css's same
   pattern - a genuine "app" layer, not marketing, not duplicated per-app.
   ========================================================================== */

.app-form-group {
  margin-bottom: var(--space-4);
}

.app-form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--color-navy);
  font-size: 0.9rem;
}

.app-form-group input,
.app-form-group select,
.app-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
}

.app-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.app-form-group input:focus,
.app-form-group select:focus,
.app-form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Reusable error state - CSS only. No current form tracks which specific
   field failed validation (errors are shown as a message banner above the
   form, not per-field), so nothing applies this class yet. Built now as
   the reusable pattern a future sprint could wire up to real field-level
   validation, not retrofitted backend logic this sprint doesn't cover. */
.app-form-group.has-error input,
.app-form-group.has-error select,
.app-form-group.has-error textarea {
  border-color: #b3261e;
}
