/* ════════════════════════════════════════════════════════════════
   MASTER SPACE — Modern Form System  (forms.css)
   Premium custom form controls replacing all native OS renders.
   Mobile-first, fully accessible, dark-themed.
   ════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════
   1. FOUNDATION — Enhanced base inputs & labels
   ════════════════════════════════════════════════ */

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-label .label-required {
  color: var(--yellow);
  font-size: 0.7rem;
}

.form-input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.03);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-primary);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.25);
}

.form-input:hover:not(:focus):not(:disabled) {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
}

.form-input:focus {
  border-color: var(--yellow);
  background: rgba(255,255,255,0.04);
  box-shadow:
    0 0 0 4px rgba(245,197,24,0.12),
    inset 0 1px 3px rgba(0,0,0,0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(255,255,255,0.01);
}

/* ════════════════════════════════════════════════
   2. SELECT — Premium styled native dropdowns
   ════════════════════════════════════════════════ */

select.form-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23F5C518' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 44px;
}

select.form-input option {
  background-color: #1c1c1c !important;
  color: var(--text-primary) !important;
  padding: 10px 14px;
  font-family: var(--font-primary);
}

select.form-input option:checked {
  background-color: rgba(245,197,24,0.2) !important;
  color: var(--yellow) !important;
  font-weight: 600;
}

select.form-input option:disabled {
  color: var(--text-muted) !important;
  font-style: italic;
}

/* ════════════════════════════════════════════════
   3. TEXTAREA — Modern resize with counter support
   ════════════════════════════════════════════════ */

textarea.form-input {
  resize: vertical;
  min-height: 96px;
  max-height: 420px;
  line-height: 1.65;
  padding: 14px 16px;
}

.form-textarea-wrapper {
  position: relative;
}

.form-textarea-wrapper textarea.form-input {
  padding-bottom: 28px; /* room for counter */
}

.form-textarea-counter {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
  pointer-events: none;
  background: rgba(26,26,26,0.9);
  padding: 2px 7px;
  border-radius: 4px;
  transition: color var(--transition-fast);
}

.form-textarea-counter.near-limit { color: var(--status-pending); }
.form-textarea-counter.at-limit   { color: var(--danger); }

/* ════════════════════════════════════════════════
   4. CHECKBOX — Custom animated checkboxes
   ════════════════════════════════════════════════ */

.form-checkbox-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  position: relative;
  min-height: 44px; /* WCAG touch target */
  padding: 4px 0;
}

/* Hide native input, keep it accessible */
.form-checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* The visual box */
.form-checkbox-control {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border-light);
  background: rgba(255,255,255,0.03);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animated checkmark */
.form-checkbox-control::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 9px;
  border: 2px solid #000;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) scale(0) translateY(-1px);
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
}

/* Checked state */
.form-checkbox-input:checked + .form-checkbox-control {
  background: var(--yellow);
  border-color: var(--yellow);
  box-shadow: 0 2px 8px rgba(245,197,24,0.3);
}

.form-checkbox-input:checked + .form-checkbox-control::after {
  transform: rotate(45deg) scale(1) translateY(-1px);
  opacity: 1;
}

/* Focus ring (keyboard nav) */
.form-checkbox-input:focus-visible + .form-checkbox-control {
  box-shadow: 0 0 0 4px rgba(245,197,24,0.25);
  border-color: var(--yellow);
}

/* Hover */
.form-checkbox-wrapper:hover .form-checkbox-control {
  border-color: var(--yellow-dark);
  background: rgba(245,197,24,0.05);
}

/* Disabled */
.form-checkbox-input:disabled + .form-checkbox-control {
  opacity: 0.4;
}
.form-checkbox-wrapper:has(.form-checkbox-input:disabled) {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Label text */
.form-checkbox-label-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.form-checkbox-label-text small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 400;
}

/* Group layout */
.form-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-checkbox-group.inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
}

/* ════════════════════════════════════════════════
   5. RADIO — Custom animated radio buttons
   ════════════════════════════════════════════════ */

.form-radio-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  position: relative;
  min-height: 44px;
  padding: 4px 0;
}

.form-radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.form-radio-control {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border-light);
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.form-radio-control::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #000;
  transform: scale(0);
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.form-radio-input:checked + .form-radio-control {
  background: var(--yellow);
  border-color: var(--yellow);
  box-shadow: 0 2px 8px rgba(245,197,24,0.3);
}

.form-radio-input:checked + .form-radio-control::after {
  transform: scale(1);
}

.form-radio-input:focus-visible + .form-radio-control {
  box-shadow: 0 0 0 4px rgba(245,197,24,0.25);
  border-color: var(--yellow);
}

.form-radio-wrapper:hover .form-radio-control {
  border-color: var(--yellow-dark);
}

.form-radio-label-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-radio-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-radio-group.inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
}

/* ════════════════════════════════════════════════
   6. TOGGLE SWITCH — Premium animated toggle
   ════════════════════════════════════════════════ */

.checkbox-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  min-height: 44px;
  position: relative;
}

.checkbox-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: relative;
  width: 52px;
  height: 28px;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid var(--border-light);
  border-radius: 28px;
  flex-shrink: 0;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  background: var(--text-muted);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.checkbox-toggle input:checked + .toggle-slider {
  background: var(--yellow);
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(245,197,24,0.12), 0 0 12px rgba(245,197,24,0.2);
}

.checkbox-toggle input:checked + .toggle-slider::before {
  transform: translateY(-50%) translateX(24px);
  background: #000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.checkbox-toggle input:focus-visible + .toggle-slider {
  box-shadow: 0 0 0 4px rgba(245,197,24,0.3);
}

.toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
}

/* ════════════════════════════════════════════════
   7. MULTI-SELECT WIDGET — Replaces select[multiple]
   Fully custom list with chips & checkbox options
   ════════════════════════════════════════════════ */

.multi-select-widget {
  width: 100%;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  overflow: hidden;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.multi-select-widget:focus-within {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(245,197,24,0.12);
}

/* Chips bar — shows selected items */
.multi-select-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  min-height: 44px;
  border-bottom: 1px solid var(--border-primary);
  background: rgba(0,0,0,0.15);
  align-items: center;
}

.multi-select-chips:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

.multi-select-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 10px;
  background: rgba(245,197,24,0.12);
  color: var(--yellow);
  border: 1px solid rgba(245,197,24,0.25);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  animation: chipAppear 0.2s ease;
}

@keyframes chipAppear {
  from { transform: scale(0.7) translateY(4px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.multi-select-chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(245,197,24,0.15);
  cursor: pointer;
  font-size: 0.65rem;
  border: none;
  color: var(--yellow);
  padding: 0;
  line-height: 1;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.multi-select-chip-remove:hover {
  background: rgba(239,68,68,0.25);
  color: var(--danger);
}

/* Options list */
.multi-select-options {
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  -webkit-overflow-scrolling: touch;
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  font-size: 0.88rem;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.multi-select-option:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.multi-select-option.selected {
  color: var(--yellow);
  background: rgba(245,197,24,0.06);
  border-color: rgba(245,197,24,0.12);
}

/* Mini checkbox inside each option */
.multi-select-option-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border-light);
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 0;
  position: relative;
}

.multi-select-option-check::after {
  content: '';
  width: 4px;
  height: 7px;
  border: 1.5px solid #000;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) scale(0) translateY(-1px);
  transition: transform 0.15s ease;
  opacity: 0;
}

.multi-select-option.selected .multi-select-option-check {
  background: var(--yellow);
  border-color: var(--yellow);
}

.multi-select-option.selected .multi-select-option-check::after {
  transform: rotate(45deg) scale(1) translateY(-1px);
  opacity: 1;
}

/* Count badge */
.multi-select-count {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--yellow);
  color: #000;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Hidden native select (synced by JS, used for form submission) */
select.multi-select-native {
  display: none;
}

/* ════════════════════════════════════════════════
   8. INPUT WITH ICON — Prefixed/suffixed inputs
   ════════════════════════════════════════════════ */

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrapper .form-input {
  padding-left: 44px;
}

.input-icon-wrapper.icon-right .form-input {
  padding-left: 16px;
  padding-right: 44px;
}

.input-icon {
  position: absolute;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
  z-index: 1;
}

.input-icon-wrapper.icon-right .input-icon {
  left: auto;
  right: 14px;
}

.input-icon-wrapper:focus-within .input-icon {
  color: var(--yellow);
}

.input-icon svg {
  width: 18px;
  height: 18px;
}

/* Input with text prefix (e.g., currency, @) */
.input-prefix-wrapper {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.input-prefix-wrapper:focus-within {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(245,197,24,0.12);
}

.input-prefix-wrapper .form-input {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  flex: 1;
}

.input-prefix-wrapper .form-input:focus {
  box-shadow: none;
}

.input-prefix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: rgba(255,255,255,0.04);
  border-right: 1px solid var(--border-primary);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════
   9. VALIDATION STATES — Visual feedback
   ════════════════════════════════════════════════ */

.form-input.is-valid {
  border-color: var(--green) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2339A751' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 44px;
}

.form-input.is-valid:focus {
  box-shadow: 0 0 0 4px rgba(57,167,81,0.15);
}

.form-input.is-error {
  border-color: var(--danger) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23EF4444' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Ccircle cx='12' cy='16' r='.5' fill='%23EF4444'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 44px;
}

.form-input.is-error:focus {
  box-shadow: 0 0 0 4px rgba(239,68,68,0.15);
}

/* Selects have their own arrow, shift the icon */
select.form-input.is-valid,
select.form-input.is-error {
  background-position-x: right 40px, right 14px;
  padding-right: 68px;
}

/* Helper / hint text */
.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Animated error / success messages */
.form-error-msg {
  display: none;
  margin-top: 5px;
  font-size: 0.77rem;
  color: var(--danger);
  line-height: 1.4;
  animation: slideInUp 0.2s ease;
}

.form-error-msg.visible { display: block; }

.form-success-msg {
  display: none;
  margin-top: 5px;
  font-size: 0.77rem;
  color: var(--green);
  line-height: 1.4;
}

.form-success-msg.visible { display: block; }

/* ════════════════════════════════════════════════
   10. FILTER SELECT — Compact admin toolbar selects
   ════════════════════════════════════════════════ */

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: rgba(255,255,255,0.04);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23F5C518' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 12px;
  border: 1.5px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 0 32px 0 13px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-primary);
  outline: none;
  cursor: pointer;
  height: 40px;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.filter-select:hover {
  border-color: var(--border-light);
  background-color: rgba(255,255,255,0.07);
}

.filter-select:focus {
  border-color: var(--yellow);
  background-color: rgba(255,255,255,0.04);
  box-shadow: 0 0 0 4px rgba(245,197,24,0.12);
}

.filter-select option {
  background-color: #1c1c1c;
  color: var(--text-primary);
  font-family: var(--font-primary);
}

.custom-select-wrapper.filter-select-wrapper {
  width: auto;
  min-width: 180px;
}

.custom-select-wrapper.filter-select-wrapper .custom-select-trigger {
  height: 40px;
  font-size: 0.85rem;
  padding: 0 12px;
  background: rgba(255,255,255,0.04);
  border-color: transparent;
}

.custom-select-wrapper.filter-select-wrapper .custom-select-trigger:focus,
.custom-select-wrapper.filter-select-wrapper.open .custom-select-trigger {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245,197,24,0.12);
}

.custom-select-wrapper.filter-select-wrapper .custom-select-arrow svg {
  width: 12px;
  height: 12px;
}

/* ════════════════════════════════════════════════
   11. STYLED LISTS — Custom premium bullet points
   ════════════════════════════════════════════════ */

.styled-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.styled-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Default: glowing dot */
.styled-list li::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  margin-top: 8px;
  box-shadow: 0 0 6px rgba(245,197,24,0.5);
}

/* Chevron variant */
.styled-list--chevron li::before {
  content: '›';
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--yellow);
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 2px;
  line-height: 1.4;
}

/* Check variant (success list) */
.styled-list--check li::before {
  content: '✓';
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 2px;
  line-height: 1.5;
}

/* Cross variant (error list) */
.styled-list--cross li::before {
  content: '✕';
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 2px;
  line-height: 1.5;
}

/* Numbered list */
.styled-list--numbered {
  counter-reset: styled-counter;
}

.styled-list--numbered li {
  counter-increment: styled-counter;
}

.styled-list--numbered li::before {
  content: counter(styled-counter);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(245,197,24,0.1);
  border: 1px solid rgba(245,197,24,0.2);
  color: var(--yellow);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  margin-top: 0;
  flex-shrink: 0;
  line-height: 1;
}

/* Compact variant */
.styled-list--compact {
  gap: 2px;
}

.styled-list--compact li {
  padding: 3px 0;
  font-size: 0.85rem;
}

/* ════════════════════════════════════════════════
   12. RESPONSIVE — Mobile-first overrides
   ════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Prevent iOS auto-zoom (font-size must be >= 16px) */
  .form-input,
  select.form-input,
  textarea.form-input,
  .filter-select {
    font-size: 1rem !important;
  }

  .form-input,
  select.form-input {
    padding: 13px 14px;
  }

  select.form-input {
    padding-right: 42px;
    background-size: 14px;
  }

  /* Larger touch targets */
  .form-checkbox-wrapper,
  .form-radio-wrapper,
  .checkbox-toggle {
    min-height: 48px;
    padding: 8px 0;
  }

  /* Bigger checkbox/radio for fingertip */
  .form-checkbox-control {
    width: 22px;
    height: 22px;
    border-radius: 7px;
  }

  .form-radio-control {
    width: 22px;
    height: 22px;
  }

  .form-radio-control::after {
    width: 10px;
    height: 10px;
  }

  /* Bigger toggle knob */
  .toggle-slider {
    width: 56px;
    height: 30px;
  }

  .toggle-slider::before {
    width: 22px;
    height: 22px;
  }

  .checkbox-toggle input:checked + .toggle-slider::before {
    transform: translateY(-50%) translateX(26px);
  }

  /* Filter selects: full-width, taller touch target */
  .filter-select {
    height: 44px;
    font-size: 1rem !important;
    width: 100%;
  }

  .custom-select-wrapper.filter-select-wrapper {
    width: 100%;
  }
  
  .custom-select-wrapper.filter-select-wrapper .custom-select-trigger {
    height: 44px;
    font-size: 1rem !important;
    border-color: transparent;
  }

  /* Multi-select chips: horizontal scroll on small screens */
  .multi-select-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .multi-select-chips::-webkit-scrollbar {
    display: none;
  }

  /* Form label adjustments */
  .form-label {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  /* Inline groups become column */
  .form-radio-group.inline,
  .form-checkbox-group.inline {
    flex-direction: column;
    gap: 4px;
  }
}

/* ════════════════════════════════════════════════
   12. LIGHT THEME OVERRIDES
   ════════════════════════════════════════════════ */
html.light-theme .form-input,
html.light-theme .custom-select-trigger,
html.light-theme .form-checkbox-custom,
html.light-theme .form-radio-custom,
html.light-theme .form-file-dropzone,
html.light-theme .toggle-slider {
  background: var(--bg-input);
  border-color: var(--border-light);
  color: var(--text-primary);
  box-shadow: none;
}
html.light-theme .form-input:hover:not(:focus):not(:disabled),
html.light-theme .custom-select-trigger:hover,
html.light-theme .form-file-dropzone:hover {
  border-color: var(--border-primary);
  background: var(--bg-card-hover);
}
html.light-theme .form-input:focus,
html.light-theme .custom-select-trigger:focus,
html.light-theme .custom-select-wrapper.open .custom-select-trigger {
  background: #FFFFFF;
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px var(--yellow-glow);
}
html.light-theme select.form-input option {
  background-color: var(--bg-input) !important;
  color: var(--text-primary) !important;
}
html.light-theme .input-icon-left svg,
html.light-theme .input-icon-right svg {
  color: var(--text-secondary);
}
html.light-theme .custom-select-options {
  background: var(--bg-card);
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}
html.light-theme .custom-option:hover {
  background: var(--bg-secondary);
}
html.light-theme .multi-select-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}
