/* Form controls. Validate inline as the user types, never only on submit. */
.orka-field { display: flex; flex-direction: column; gap: var(--space-2); }
.orka-field__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-secondary); }
.orka-field__hint { font-size: var(--fs-2xs); font-weight: var(--fw-medium); line-height: var(--type-caption-leading); color: var(--text-tertiary); }
.orka-field__hint--error { color: var(--error-text); }

.orka-input {
  width: 100%; min-height: 40px; padding: 0 var(--space-3);
  border-radius: var(--radius-sm); border: 1px solid var(--border-default);
  background: var(--bg-surface); color: var(--text-primary);
  font-family: var(--font-sans); font-size: var(--fs-sm); line-height: 1.5;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base);
}
.orka-input::placeholder { color: var(--text-tertiary); }
.orka-input:hover { border-color: var(--border-strong); }
.orka-input:focus { outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus); }
.orka-input[disabled] { background: var(--bg-subtle); color: var(--text-disabled); cursor: not-allowed; }
.orka-input--invalid { border-color: var(--error-solid); }
.orka-input--invalid:focus { border-color: var(--error-solid); box-shadow: 0 0 0 3px rgb(203 45 32 / 0.24); }
.orka-input--textarea { min-height: 92px; padding: var(--space-2-5) var(--space-3); resize: vertical; line-height: var(--type-body-leading); }
.orka-input--lg { min-height: 46px; font-size: var(--fs-base); border-radius: var(--radius-md); }

.orka-inputwrap { position: relative; display: flex; align-items: center; }
.orka-inputwrap__lead { position: absolute; left: var(--space-3); display: flex; color: var(--text-tertiary); pointer-events: none; }
.orka-inputwrap__lead svg { width: var(--icon-md); height: var(--icon-md); }
.orka-inputwrap--lead .orka-input { padding-left: 40px; }

/* The pane search field: full-width, 44px, lead icon, radius-md. */
.orka-search .orka-input { min-height: 44px; border-radius: var(--radius-md); font-size: var(--fs-sm); }
.orka-search .orka-inputwrap--lead .orka-input { padding-left: 42px; }

.orka-selectwrap { position: relative; display: block; }
.orka-select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; font-weight: var(--fw-medium); }
.orka-selectwrap__chev { position: absolute; right: var(--space-3); top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-tertiary); display: flex; }
.orka-selectwrap__chev svg { width: var(--icon-sm); height: var(--icon-sm); }

.orka-check { display: inline-flex; align-items: flex-start; gap: var(--space-2-5); cursor: pointer; -webkit-user-select: none; user-select: none; }
.orka-check__box, .orka-check__radio {
  position: relative; flex: none; width: 18px; height: 18px; margin-top: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-surface); border: 1.5px solid var(--border-strong); color: var(--text-on-brand);
  transition: transform var(--press-dur) var(--ease-orka), background-color var(--transition-base), border-color var(--transition-base);
}
.orka-check__box { border-radius: var(--radius-xs); }
.orka-check__radio { border-radius: 50%; }
.orka-check:hover .orka-check__box, .orka-check:hover .orka-check__radio { border-color: var(--brand); }
.orka-check:active .orka-check__box, .orka-check:active .orka-check__radio { transform: scale(var(--press-scale)); }
.orka-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.orka-check input:checked + .orka-check__box, .orka-check input:checked + .orka-check__radio { background: var(--brand); border-color: var(--brand); }
.orka-check input:focus-visible + .orka-check__box, .orka-check input:focus-visible + .orka-check__radio { box-shadow: var(--shadow-focus); }
.orka-check__mark { width: 12px; height: 12px; opacity: 0; transform: scale(0.6); transition: opacity var(--dur-fast) var(--ease-orka), transform var(--dur-fast) var(--ease-overshoot); }
.orka-check input:checked + .orka-check__box .orka-check__mark { opacity: 1; transform: scale(1); }
.orka-check__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0; transform: scale(0.5); transition: opacity var(--dur-fast) var(--ease-orka), transform var(--dur-fast) var(--ease-overshoot); }
.orka-check input:checked + .orka-check__radio .orka-check__dot { opacity: 1; transform: scale(1); }
.orka-check__text { display: flex; flex-direction: column; gap: 1px; }
.orka-check__title { font-size: var(--fs-sm); color: var(--text-primary); }
.orka-check__desc { font-size: var(--fs-2xs); line-height: var(--type-caption-leading); color: var(--text-tertiary); }
.orka-check--disabled { cursor: not-allowed; opacity: var(--opacity-38); }
.orka-check--done .orka-check__title { color: var(--text-tertiary); text-decoration: line-through; }

.orka-switch { display: inline-flex; align-items: center; gap: var(--space-2-5); cursor: pointer; -webkit-user-select: none; user-select: none; }
.orka-switch__track {
  position: relative; flex: none; width: 40px; height: 24px; border-radius: var(--radius-pill);
  background: var(--bg-muted); border: 1px solid transparent;
  transition: background-color var(--transition-base);
}
.orka-switch__thumb {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg-surface); box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-orka), width var(--dur-fast) var(--ease-orka);
}
.orka-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.orka-switch input:checked + .orka-switch__track { background: var(--brand); }
.orka-switch input:checked + .orka-switch__track .orka-switch__thumb { transform: translateX(16px); }
.orka-switch input:focus-visible + .orka-switch__track { box-shadow: var(--shadow-focus); }
/* The thumb stretches toward its travel on press — the in-between frame telegraphs the outcome. */
.orka-switch:active .orka-switch__thumb { width: 22px; }
.orka-switch input:checked:active + .orka-switch__track .orka-switch__thumb { transform: translateX(12px); }
.orka-switch--disabled { cursor: not-allowed; opacity: var(--opacity-38); }

.orka-slider { display: block; width: 100%; touch-action: none; -webkit-user-select: none; user-select: none; }
.orka-slider__readout { display: flex; justify-content: space-between; font-size: var(--fs-2xs); font-weight: var(--fw-medium); color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.orka-slider__rail { position: relative; height: 6px; margin: 10px 0; border-radius: var(--radius-pill); background: var(--bg-muted); box-shadow: var(--shadow-inset); cursor: grab; }
.orka-slider--dragging .orka-slider__rail { cursor: grabbing; }
.orka-slider__fill { position: absolute; inset: 0 auto 0 0; border-radius: var(--radius-pill); background: var(--brand); }
.orka-slider__thumb {
  position: absolute; top: 50%; width: 18px; height: 18px; margin-left: -9px;
  border-radius: 50%; background: var(--bg-surface); border: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm); transform: translateY(-50%) scale(1);
  transition: transform var(--dur-fast) var(--ease-orka), box-shadow var(--dur-fast) var(--ease-orka);
}
.orka-slider--dragging .orka-slider__thumb { transform: translateY(-50%) scale(1.18); box-shadow: var(--shadow-md); }
.orka-slider__thumb:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* Saved filters — the chip row under a pane's filter controls. */
.orka-savedfilters { display: flex; flex-direction: column; gap: var(--space-2); }
.orka-savedfilters__label { font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--type-label-tracking); text-transform: uppercase; color: var(--text-tertiary); }
.orka-savedfilters__row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
