/* ---------- Field wrapper ---------- */
.sp-field { display: flex; flex-direction: column; gap: 6px; }
.sp-field__label { font: var(--text-label); letter-spacing: var(--tracking-label); color: var(--ink-800); display: flex; align-items: center; gap: 6px; }
.sp-field__req { color: var(--velocity-500); }
.sp-field__hint { font: var(--text-caption); color: var(--text-muted); }
.sp-field__error { font: var(--text-caption); color: var(--red-600); display: flex; align-items: center; gap: 5px; }

/* ---------- Text inputs ---------- */
.sp-input, .sp-textarea, .sp-select__control { width: 100%; font-family: var(--font-text); font-size: 14px; letter-spacing: var(--tracking-body); color: var(--ink-900); background: var(--paper-000); border: 1px solid var(--ink-200); border-radius: var(--radius-control); transition: var(--transition-control); }
.sp-input { height: 36px; padding: 0 12px; }
.sp-input--sm { height: 30px; padding: 0 10px; font-size: 13px; }
.sp-input--lg { height: 44px; padding: 0 14px; font-size: 15px; }
.sp-textarea { padding: 10px 12px; min-height: 88px; resize: vertical; line-height: 1.5; }
.sp-input::placeholder, .sp-textarea::placeholder { color: var(--ink-400); }
.sp-input:hover:not(:disabled), .sp-textarea:hover:not(:disabled) { border-color: var(--ink-300); }
.sp-input:focus, .sp-textarea:focus { outline: none; border-color: var(--velocity-500); box-shadow: var(--ring-focus); }
.sp-input:disabled, .sp-textarea:disabled { background: var(--paper-100); color: var(--ink-400); cursor: not-allowed; }
.sp-input[aria-invalid="true"], .sp-textarea[aria-invalid="true"] { border-color: var(--red-500); }
.sp-input[aria-invalid="true"]:focus, .sp-textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--red-100); }

.sp-input-wrap { position: relative; display: flex; align-items: center; }
.sp-input-wrap .sp-icon { position: absolute; left: 11px; color: var(--ink-400); pointer-events: none; }
.sp-input-wrap--icon .sp-input { padding-left: 34px; }
.sp-input-wrap__suffix { position: absolute; right: 10px; font: var(--text-mono-s); color: var(--ink-400); }

/* ---------- Select ---------- */
.sp-select { position: relative; display: block; }
.sp-select__control { height: 36px; padding: 0 34px 0 12px; appearance: none; cursor: pointer; }
.sp-select__control:hover:not(:disabled) { border-color: var(--ink-300); }
.sp-select__control:focus { outline: none; border-color: var(--velocity-500); box-shadow: var(--ring-focus); }
.sp-select__control:disabled { background: var(--paper-100); color: var(--ink-400); cursor: not-allowed; }
.sp-select__chev { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-500); pointer-events: none; }

/* ---------- Checkbox + Radio ---------- */
.sp-check { display: inline-flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 14px; color: var(--ink-800); letter-spacing: var(--tracking-body); }
.sp-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.sp-check__box { width: 18px; height: 18px; flex: none; margin-top: 1px; border: 1.5px solid var(--ink-300); border-radius: var(--radius-xs); background: var(--paper-000); display: inline-flex; align-items: center; justify-content: center; color: transparent; transition: var(--transition-control); }
.sp-check__box--radio { border-radius: var(--radius-full); }
.sp-check:hover .sp-check__box { border-color: var(--ink-500); }
.sp-check input:checked + .sp-check__box { background: var(--velocity-500); border-color: var(--velocity-500); color: #fff; }
.sp-check input:focus-visible + .sp-check__box { box-shadow: var(--ring-focus); }
.sp-check input:disabled + .sp-check__box { background: var(--paper-200); border-color: var(--ink-200); }
.sp-check--disabled { color: var(--ink-400); cursor: not-allowed; }
.sp-check__dot { width: 7px; height: 7px; border-radius: var(--radius-full); background: currentColor; }
.sp-check__desc { display: block; font: var(--text-caption); color: var(--text-muted); margin-top: 2px; }

/* ---------- Switch ---------- */
.sp-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--ink-800); }
.sp-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.sp-switch__track { width: 40px; height: 24px; flex: none; border-radius: var(--radius-full); background: var(--ink-200); padding: 3px; transition: background-color var(--duration-fast) var(--ease-express); }
.sp-switch__knob { display: block; width: 18px; height: 18px; border-radius: var(--radius-full); background: #fff; box-shadow: var(--shadow-1); transform: translateX(0); transition: transform var(--duration-base) var(--ease-overshoot); }
.sp-switch input:checked + .sp-switch__track { background: var(--velocity-500); }
.sp-switch input:checked + .sp-switch__track .sp-switch__knob { transform: translateX(16px); }
.sp-switch input:focus-visible + .sp-switch__track { box-shadow: var(--ring-focus); }
.sp-switch--disabled { opacity: 0.45; cursor: not-allowed; }
