// Form components: inputs, labels, selects, textareas, checkboxes, file upload

.form-group {
  display: block;
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: var(--text);
  margin-bottom: 6px;
}
.form-label .required { color: var(--red); margin-left: 2px; }
.form-help {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-control {
  display: block;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
  font-family: var(--font);
}
.form-control::placeholder { color: var(--text-disabled); }
.form-control:hover:not(:focus) { border-color: var(--text-muted); }
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-lt);
}
.form-control:disabled {
  background: var(--bg-surface-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}
.form-control.is-invalid {
  border-color: var(--red);
}
.form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px var(--red-lt);
}
.form-error {
  font-size: 11.5px;
  color: var(--red);
  margin-top: 4px;
}

textarea.form-control {
  height: auto;
  min-height: 90px;
  padding: 8px 12px;
  resize: vertical;
  line-height: 1.5;
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%239ba5b1' stroke-width='1.5'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

// Checkboxes & radios
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 0;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  margin: 0;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
  flex-shrink: 0;
  position: relative;
}
.form-check input[type="radio"] { border-radius: 50%; }
.form-check input:hover { border-color: var(--primary); }
.form-check input:checked {
  background: var(--primary);
  border-color: var(--primary);
}
.form-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -55%) rotate(45deg);
  width: 4px; height: 8px;
  border-right: 1.5px solid white;
  border-bottom: 1.5px solid white;
}
.form-check input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: white;
}
.form-check input:focus-visible {
  box-shadow: 0 0 0 3px var(--primary-lt);
}

// Form row (inline group)
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
}
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
  .form-row, .form-row.cols-3 { grid-template-columns: 1fr; }
}

// Input group (icon prefix/suffix)
.input-group {
  position: relative;
}
.input-group .form-control { padding-left: 36px; }
.input-group .input-icon {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

// Form actions row
.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color-light);
}
.form-actions.right { justify-content: flex-end; }

// ────────────────────────
//  INPUT WITH SUFFIX (e.g. .com, %, kg)
// ────────────────────────
.input-affix {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  overflow: hidden;
  transition: border-color 150ms, box-shadow 150ms;
}
.input-affix:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-lt);
}
.input-affix .form-control {
  border: 0;
  border-radius: 0;
  flex: 1;
  min-width: 0;
}
.input-affix .form-control:focus { box-shadow: none; }
.input-affix .affix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--bg-surface-secondary);
  white-space: nowrap;
  border-left: 1px solid var(--border-color);
}
.input-affix .affix.prefix {
  border-left: 0;
  border-right: 1px solid var(--border-color);
}

// ────────────────────────
//  SEGMENTED CONTROL (compact tab-like radio)
// ────────────────────────
.segmented {
  display: inline-flex;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
}
.segmented label {
  position: relative;
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
.segmented label:hover { color: var(--text); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + span,
.segmented label:has(input:checked) {
  background: var(--bg-surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 0 0 1px var(--border-translucent);
}

// ────────────────────────
//  SWITCH (toggle styled like an iOS switch)
// ────────────────────────
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 10px;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  width: 36px;
  height: 20px;
  background: var(--border-color);
  border-radius: 999px;
  position: relative;
  transition: background 150ms;
  flex-shrink: 0;
}
.switch .track::before {
  content: '';
  position: absolute;
  left: 2px; top: 2px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  transition: transform 150ms;
}
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::before { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--primary-lt); }
.switch .switch-label {
  font-size: 13px;
  color: var(--text);
}

// ────────────────────────
//  SLIDER (range)
// ────────────────────────
.slider-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.slider-row .slider-value {
  font-size: 12.5px;
  color: var(--text);
  font-weight: var(--font-weight-medium);
  min-width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
input[type="range"].slider {
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  outline: none;
}
input[type="range"].slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 0 1px var(--primary), 0 1px 3px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
input[type="range"].slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 0 1px var(--primary), 0 1px 3px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
input[type="range"].slider:focus-visible {
  box-shadow: 0 0 0 3px var(--primary-lt);
}

// ────────────────────────
//  COLOR PICKER (swatch grid)
// ────────────────────────
.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 100ms, box-shadow 100ms;
  position: relative;
}
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.active {
  border-color: var(--bg-surface);
  box-shadow: 0 0 0 2px var(--text);
}

// ────────────────────────
//  CHIP / TAG INPUT
// ────────────────────────
.tag-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  min-height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  align-items: center;
  cursor: text;
  transition: border-color 150ms, box-shadow 150ms;
}
.tag-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-lt);
}
.tag-input .tag-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 4px 2px 8px;
  background: var(--primary-lt);
  color: var(--primary);
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  border-radius: 12px;
}
.tag-input .tag-pill button {
  width: 16px; height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
  opacity: 0.65;
}
.tag-input .tag-pill button:hover { opacity: 1; background: rgba(26, 187, 156, 0.18); }
.tag-input input {
  flex: 1;
  min-width: 100px;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  padding: 4px;
}

// ────────────────────────
//  RATING STARS
// ────────────────────────
.rating {
  display: inline-flex;
  gap: var(--space-1);
}
.rating button {
  background: transparent;
  border: 0;
  padding: 2px;
  cursor: pointer;
  color: var(--border-color);
  transition: color 100ms;
}
.rating button.on,
.rating:hover button:hover,
.rating:hover button:hover ~ button { color: var(--border-color); }
.rating button.on { color: var(--yellow); }
.rating:hover button { color: var(--border-color); }
.rating:hover button:hover,
.rating button:hover ~ button.on { color: var(--yellow); }
// Cleaner version using sibling selectors — light up all preceding stars on hover:
.rating:hover button:hover ~ button { color: var(--border-color); }
.rating button svg { width: 16px; height: 16px; fill: currentColor; }

// ────────────────────────
//  SEARCH WITH SUGGESTIONS (visible card)
// ────────────────────────
.search-suggest {
  margin-top: 4px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.search-suggest-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border-color-light);
}
.search-suggest-row:last-child { border-bottom: 0; }
.search-suggest-row:hover { background: var(--bg-surface-secondary); }
.search-suggest-row .meta { margin-left: auto; font-size: 11px; color: var(--text-muted); }
.search-suggest-row mark {
  background: var(--yellow-lt);
  color: var(--text);
  padding: 0 1px;
  border-radius: 2px;
}

// ────────────────────────
//  PASSWORD STRENGTH METER
// ────────────────────────
.password-strength {
  display: flex;
  gap: var(--space-1);
  margin-top: 6px;
}
.password-strength .seg {
  flex: 1;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  transition: background 150ms;
}
.password-strength.s1 .seg:nth-child(-n+1),
.password-strength.s2 .seg:nth-child(-n+2),
.password-strength.s3 .seg:nth-child(-n+3),
.password-strength.s4 .seg { background: var(--red); }
.password-strength.s2 .seg:nth-child(-n+2) { background: var(--orange); }
.password-strength.s3 .seg:nth-child(-n+3) { background: var(--yellow); }
.password-strength.s4 .seg { background: var(--green); }
.password-strength-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}
.password-strength-label strong { color: var(--text); font-weight: var(--font-weight-medium); }

// ────────────────────────
//  OTP / PIN BOXES
// ────────────────────────
.otp-grid {
  display: flex;
  gap: var(--space-2);
}
.otp-input {
  width: 44px;
  height: 48px;
  text-align: center;
  font-family: var(--font);
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: 0;
  transition: border-color 120ms, box-shadow 120ms;
}
.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-lt);
}
.otp-input:not(:placeholder-shown) { border-color: var(--primary); }

// ────────────────────────
//  FILE INPUT (compact)
// ────────────────────────
.file-input {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  overflow: hidden;
}
.file-input-trigger {
  padding: 0 14px;
  display: flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: var(--font-weight-medium);
  color: var(--text);
  background: var(--bg-surface-secondary);
  border-right: 1px solid var(--border-color);
  cursor: pointer;
}
.file-input-name {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-input input[type="file"] { display: none; }

// ────────────────────────
//  AVATAR UPLOAD
// ────────────────────────
.avatar-upload {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
  cursor: pointer;
}
.avatar-upload .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  transition: opacity 150ms;
}
.avatar-upload:hover .overlay { opacity: 1; }
.avatar-upload .overlay svg { width: 22px; height: 22px; }

// ────────────────────────
//  STEPPER (number with +/-)
// ────────────────────────
.stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-surface);
}
.stepper button {
  width: 32px;
  background: var(--bg-surface-secondary);
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 100ms, color 100ms;
}
.stepper button:hover { background: var(--primary-lt); color: var(--primary); }
.stepper input {
  width: 56px;
  text-align: center;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  color: var(--text);
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


// ────────────────────────
//  DATE-RANGE PICKER
// ────────────────────────
.date-range { position: relative; }
.date-range input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237e8896' stroke-width='1.5'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 4v6M16 4v6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.dr-popover {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12), 0 0 0 1px var(--border-translucent);
  display: flex;
  z-index: 220;
  font-family: var(--font);
  overflow: hidden;
}
.dr-presets {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 8px 14px 14px;
  border-right: 1px solid var(--border-color-light);
  background: var(--bg-surface-secondary);
  min-width: 140px;
}
.dr-preset {
  background: transparent;
  border: 0;
  padding: 7px 12px;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-secondary);
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.dr-preset:hover { background: var(--bg-surface); color: var(--text); }
.dr-cal { padding: 14px; }
.dr-nav {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.dr-nav button {
  width: 26px; height: 26px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.dr-nav button:hover { color: var(--primary); border-color: var(--primary); }
.dr-spacer { flex: 1; }
.dr-months { display: flex; gap: 18px; }
.dr-month-head {
  font-size: 13px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
}
.dr-dow {
  display: grid;
  grid-template-columns: repeat(7, 30px);
  gap: 2px;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  text-align: center;
  margin-bottom: 4px;
}
.dr-grid { display: grid; grid-template-columns: repeat(7, 30px); gap: 2px; }
.dr-cell {
  width: 30px; height: 30px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  color: var(--text);
  border-radius: 50%;
  cursor: pointer;
  transition: background 100ms, color 100ms;
}
.dr-cell.empty { cursor: default; visibility: hidden; }
.dr-cell:hover:not(.empty) { background: var(--bg-surface-secondary); }
.dr-cell.today { font-weight: 600; color: var(--primary); }
.dr-cell.in-range {
  background: var(--primary-lt);
  color: var(--primary);
  border-radius: 0;
}
.dr-cell.preview { opacity: 0.55; }
.dr-cell.selected {
  background: var(--primary);
  color: white;
  font-weight: 600;
  border-radius: 50%;
}
.dr-cell.range-start { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.dr-cell.range-end   { border-top-left-radius: 0;  border-bottom-left-radius: 0; }
.dr-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.dr-summary { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .dr-popover { flex-direction: column; }
  .dr-presets { flex-direction: row; flex-wrap: wrap; min-width: 0; border-right: 0; border-bottom: 1px solid var(--border-color-light); padding: 10px; }
  .dr-months { flex-direction: column; gap: var(--space-4); }
}

// ────────────────────────
//  RICH TEXT EDITOR
// ────────────────────────
.rich-text {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  overflow: hidden;
  transition: border-color 150ms, box-shadow 150ms;
}
.rich-text:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-lt);
}
.rt-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-color-light);
  background: var(--bg-surface-secondary);
  flex-wrap: wrap;
}
.rt-toolbar button {
  width: 28px; height: 28px;
  border: 0;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font);
  font-size: 13px;
  transition: background 100ms, color 100ms;
}
.rt-toolbar button:hover { background: var(--bg-surface); color: var(--text); }
.rt-toolbar button:active { background: var(--primary-lt); color: var(--primary); }
.rt-toolbar code { font-family: var(--font-mono); font-size: 11px; }
.rt-sep {
  width: 1px;
  height: 18px;
  background: var(--border-color);
  margin: 0 4px;
}
.rt-editor {
  min-height: 140px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  outline: none;
}
.rt-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--text-disabled);
  pointer-events: none;
}
.rt-editor h2 { font-size: 17px; font-weight: 600; margin: 12px 0 6px; }
.rt-editor blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 12px;
  margin: 8px 0;
  color: var(--text-secondary);
}
.rt-editor pre {
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  margin: 8px 0;
  overflow-x: auto;
}
.rt-editor ul, .rt-editor ol { padding-left: 22px; margin: 6px 0; }
.rt-editor a { color: var(--primary); text-decoration: underline; }

// ────────────────────────
//  MULTI-SELECT
// ────────────────────────
.multi-select { position: relative; }
.ms-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  padding: 4px 8px 4px 4px;
  min-height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: text;
  transition: border-color 150ms, box-shadow 150ms;
}
.multi-select.open .ms-input,
.ms-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-lt);
}
.ms-chips { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.ms-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 4px 2px 8px;
  background: var(--primary-lt);
  color: var(--primary);
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  border-radius: 12px;
  white-space: nowrap;
}
.ms-chip button {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  opacity: 0.65;
}
.ms-chip button:hover { opacity: 1; background: rgba(26, 187, 156, 0.18); }
.ms-search {
  flex: 1;
  min-width: 80px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  padding: 4px 6px;
}
.ms-chev {
  margin-left: auto;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 150ms;
}
.multi-select.open .ms-chev { transform: rotate(180deg); }
.ms-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.10);
  padding: 4px;
}
.ms-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.ms-option:hover, .ms-option.active {
  background: var(--primary-lt);
  color: var(--primary);
}
.ms-empty {
  padding: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
