/* ============================================================
   Reusable component classes.
   Every component used across pages lives here.
   ============================================================ */

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: var(--radius-default);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), opacity var(--transition-fast);
  border: 1.5px solid transparent;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-orange);
  color: var(--text-on-dark);
}
.btn-primary:hover { background: var(--color-orange-hover); }

.btn-secondary {
  background: var(--color-navy);
  color: var(--text-on-dark);
}
.btn-secondary:hover { background: var(--color-navy-light); }

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}
.btn-outline:hover { background: var(--color-navy); color: var(--text-on-dark); }

.btn-outline-soft {
  background: transparent;
  color: var(--color-navy);
  border: 1px solid var(--color-border-input);
  padding: 11px 21px;
}
.btn-outline-soft:hover { background: var(--color-bg); }

.btn-teal {
  background: var(--color-teal);
  color: var(--color-navy);
}
.btn-teal:hover { background: var(--color-secondary-dark); }

.btn-amber {
  background: var(--color-amber);
  color: var(--color-navy);
}
.btn-amber:hover { background: var(--color-accent-dark); }

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: var(--text-on-dark);
}
.btn-whatsapp:hover { background: #1ebe5a /* whatsapp brand */; }

.btn-ghost {
  background: transparent;
  color: var(--color-orange);
  padding: 8px 0;
  font-weight: var(--fw-medium);
}
.btn-ghost:hover { color: var(--color-orange-hover); }

.btn-text {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 0;
}
.btn-text:hover { color: var(--color-navy); }

/* Sizes */
.btn-lg { padding: 14px 26px; font-size: var(--fs-body); }
.btn-sm { padding: 9px 18px; font-size: var(--fs-sm); border-radius: var(--radius-md); }
.btn-xs { padding: 7px 13px; font-size: var(--fs-xs); border-radius: 7px; }

.btn-icon {
  width: 40px; height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Pill buttons (rounded) */
.btn-pill { border-radius: var(--radius-pill); }

/* Full width */
.btn-block { width: 100%; }

/* Disabled state */
.btn:disabled,
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */

.field {
  margin-bottom: var(--space-md);
}

.field-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  margin-bottom: 6px;
}

.field-helper {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  margin-top: 6px;
}

.field-error {
  font-size: var(--fs-2xs);
  color: var(--color-orange);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--color-border-input);
  border-radius: 9px;
  font-size: var(--fs-sm);
  background: var(--color-surface);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px var(--tint-orange);
}

.input.is-error,
.textarea.is-error,
.select.is-error {
  border-color: var(--color-orange);
}

.input:disabled,
.textarea:disabled,
.select:disabled {
  background: var(--color-bg);
  color: var(--text-muted);
  cursor: not-allowed;
}

.input-lg { padding: 12px 14px; font-size: var(--fs-body); border-radius: var(--radius-default); }

.textarea {
  min-height: 80px;
  resize: vertical;
  line-height: var(--lh-normal);
  font-family: inherit;
}

/* Input with icon */
.input-group {
  position: relative;
}

.input-group .input { padding-left: 38px; }
.input-group .input.input-icon-right { padding-left: 12px; padding-right: 38px; }

.input-group-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-group-icon.is-right {
  left: auto;
  right: 12px;
  pointer-events: auto;
  cursor: pointer;
}

.input-kbd-hint {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: var(--fs-3xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Select chevron */
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Counter */
.field-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.field-counter .field-label { margin-bottom: 0; }
.field-counter-value {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

/* Checkbox */
.check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.check-box {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--color-border-input);
  background: var(--color-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.check-box .ti {
  font-size: 13px;
  color: var(--text-on-dark);
  opacity: 0;
}

.check.is-checked .check-box {
  background: var(--color-orange);
  border-color: var(--color-orange);
}

.check.is-checked .check-box .ti { opacity: 1; }

/* Radio */
.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.radio-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border-input);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.radio-dot::after {
  content: '';
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--color-orange);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.radio.is-selected .radio-dot { border-color: var(--color-orange); }
.radio.is-selected .radio-dot::after { opacity: 1; }

/* Toggle switch */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.toggle-track {
  width: 32px; height: 18px;
  border-radius: var(--radius-pill);
  background: var(--color-border-input);
  position: relative;
  transition: background var(--transition-default);
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--color-warm-white);
  transition: left var(--transition-default);
}

.toggle.is-on .toggle-track { background: var(--color-teal); }
.toggle.is-on .toggle-track::after { left: 16px; }

/* Tag input / chips container */
.tag-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border-input);
  border-radius: 9px;
  min-height: 50px;
}

/* File upload zone */
.upload-zone {
  border: 2px dashed var(--color-orange);
  border-radius: var(--radius-card-lg);
  padding: 28px;
  text-align: center;
  background: var(--color-surface);
  transition: background var(--transition-fast);
}

.upload-zone:hover { background: var(--color-bg); }

.upload-zone-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-card-lg);
  background: var(--tint-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.upload-zone-icon .ti { font-size: 32px; color: var(--color-orange); }

/* ============================================================
   BADGES & PILLS
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}

.badge-success { background: var(--tint-teal); color: var(--color-teal-dark); }
.badge-warning { background: var(--tint-amber); color: var(--color-amber-dark); }
.badge-error { background: var(--tint-orange); color: var(--color-orange); }
.badge-expired { background: rgba(220, 53, 69, 0.12); color: #c0392b; }
.badge-info { background: var(--tint-orange); color: var(--color-orange); }
.badge-neutral { background: var(--color-bg); color: var(--text-muted); }
.badge-dark { background: var(--color-navy); color: var(--text-on-dark); }
.badge-premium { background: rgba(255, 183, 3, 0.95); color: var(--color-navy); }
.badge-verified { background: var(--tint-teal); color: var(--color-teal-dark); }

.badge .ti { font-size: 12px; }

/* Pills (more rounded version of badge) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  background: var(--color-surface);
  color: var(--color-navy);
  border: 1px solid var(--color-border-input);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill:hover { background: var(--color-bg); }

.pill.is-active {
  background: var(--color-navy);
  color: var(--text-on-dark);
  border-color: var(--color-navy);
}

.pill-orange-active {
  background: var(--color-orange);
  color: var(--text-on-dark);
  border-color: var(--color-orange);
}

/* Tags (smaller, square-ish) */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  width: max-content;
}

.tag-orange { background: var(--tint-orange); color: var(--color-orange); }
.tag-teal { background: var(--tint-teal); color: var(--color-teal-dark); }
.tag-amber { background: var(--tint-amber); color: var(--color-amber-dark); }
.tag-navy { background: var(--tint-navy); color: var(--color-navy); }

/* Chip (used in tag input) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-orange);
  color: var(--text-on-dark);
  padding: 5px 10px 5px 12px;
  border-radius: 20px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
}

.chip-close {
  font-size: 13px;
  cursor: pointer;
  opacity: 0.85;
}
.chip-close:hover { opacity: 1; }

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card-lg);
  padding: var(--space-xl);
}

.card-sm { padding: var(--space-lg); border-radius: var(--radius-card); }
.card-lg { padding: 28px; }

.card-accent-amber { border-left: 4px solid var(--color-amber); }
.card-accent-orange { border-left: 4px solid var(--color-orange); }
.card-accent-teal { border-left: 4px solid var(--color-teal); }

.card-dark {
  background: linear-gradient(160deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  color: var(--text-on-dark);
  border: none;
  position: relative;
  overflow: hidden;
}

.card-dark-blob {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--tint-orange-strong);
}

.card-dark > * { position: relative; z-index: 2; }

.card-orange {
  background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-orange-hover) 100%);
  color: var(--text-on-dark);
  border: none;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-md);
}

.card-header-icon {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--tint-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.card-header-icon .ti { font-size: 15px; color: var(--color-orange); }

.card-header-icon-teal { background: var(--tint-teal); }
.card-header-icon-teal .ti { color: var(--color-teal-dark); }
.card-header-icon-amber { background: var(--tint-amber); }
.card-header-icon-amber .ti { color: var(--color-amber-dark); }

.card-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  margin: 0;
}

.card-subtitle {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   STAT TILES
   ============================================================ */

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 18px;
}

.stat-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.stat-card-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-icon .ti { font-size: 16px; }

.stat-card-icon-orange { background: var(--tint-orange); }
.stat-card-icon-orange .ti { color: var(--color-orange); }
.stat-card-icon-teal { background: var(--tint-teal); }
.stat-card-icon-teal .ti { color: var(--color-teal-dark); }
.stat-card-icon-amber { background: var(--tint-amber); }
.stat-card-icon-amber .ti { color: var(--color-amber-dark); }
.stat-card-icon-navy { background: var(--tint-navy); }
.stat-card-icon-navy .ti { color: var(--color-navy); }

.stat-card-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.stat-card-value {
  font-size: 26px;
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1;
}

.stat-card-delta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: var(--fs-2xs);
}

.stat-card-delta-up { color: var(--color-teal-dark); }
.stat-card-delta-down { color: var(--color-orange); }
.stat-card-delta-flat { color: var(--text-muted); }

/* ============================================================
   PROGRESS BARS
   ============================================================ */

.progress {
  height: 6px;
  background: var(--color-bg);
  border-radius: 3px;
  overflow: hidden;
}

.progress-thin { height: 4px; border-radius: 2px; }
.progress-lg { height: 8px; border-radius: 4px; }

.progress-bar {
  height: 100%;
  background: var(--color-orange);
  border-radius: inherit;
  transition: width var(--transition-slow);
}

.progress-bar-gradient {
  background: linear-gradient(90deg, var(--color-orange) 0%, var(--color-amber) 100%);
}

.progress-bar-amber { background: var(--color-amber); }
.progress-bar-teal { background: var(--color-teal); }

/* ============================================================
   AVATARS
   ============================================================ */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--color-orange);
  color: var(--text-on-dark);
  border-radius: var(--radius-card);
  font-weight: var(--fw-medium);
}

.avatar-sm { width: 32px; height: 32px; border-radius: 8px; font-size: 12px; }
.avatar-sm .ti { font-size: 16px; }

.avatar-md { width: 40px; height: 40px; border-radius: 10px; font-size: 14px; }
.avatar-md .ti { font-size: 20px; }

.avatar-lg { width: 56px; height: 56px; border-radius: var(--radius-card-lg); font-size: 18px; }
.avatar-lg .ti { font-size: 28px; }

.avatar-xl { width: 80px; height: 80px; border-radius: var(--radius-hero); font-size: 24px; }
.avatar-xl .ti { font-size: 40px; }

.avatar-2xl { width: 110px; height: 110px; border-radius: 22px; }
.avatar-2xl .ti { font-size: 56px; }

.avatar-circle { border-radius: 50% !important; }

.avatar-teal { background: var(--color-teal); color: var(--color-navy); }
.avatar-amber { background: var(--color-amber); color: var(--color-navy); }
.avatar-navy { background: var(--color-navy); color: var(--text-on-dark); }

.avatar-bordered {
  border: 3px solid var(--color-warm-white);
}

/* Avatar group / stack */
.avatar-group {
  display: inline-flex;
}
.avatar-group .avatar:not(:first-child) {
  margin-left: -8px;
  border: 2px solid var(--color-warm-white);
}

/* ============================================================
   ICON CONTAINER
   ============================================================ */

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  flex-shrink: 0;
  background: var(--tint-orange);
}
.icon-box .ti { color: var(--color-orange); }

.icon-box-sm { width: 26px; height: 26px; }
.icon-box-sm .ti { font-size: 15px; }
.icon-box-md { width: 30px; height: 30px; border-radius: 8px; }
.icon-box-md .ti { font-size: 16px; }
.icon-box-lg { width: 38px; height: 38px; border-radius: 10px; }
.icon-box-lg .ti { font-size: 22px; }
.icon-box-xl { width: 44px; height: 44px; border-radius: 12px; }
.icon-box-xl .ti { font-size: 22px; }

.icon-box-orange { background: var(--tint-orange); }
.icon-box-orange .ti { color: var(--color-orange); }
.icon-box-teal { background: var(--tint-teal); }
.icon-box-teal .ti { color: var(--color-teal-dark); }
.icon-box-amber { background: var(--tint-amber); }
.icon-box-amber .ti { color: var(--color-amber-dark); }
.icon-box-navy { background: var(--tint-navy); }
.icon-box-navy .ti { color: var(--color-navy); }

/* ============================================================
   ALERTS / TOASTS
   ============================================================ */

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-default);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.alert .ti { font-size: 17px; flex-shrink: 0; }

.alert-success {
  background: rgba(var(--rgb-secondary), 0.08);
  border-color: rgba(var(--rgb-secondary), 0.2);
}
.alert-success .ti { color: var(--color-teal-dark); }

.alert-warning {
  background: rgba(var(--rgb-accent), 0.08);
  border-color: rgba(var(--rgb-accent), 0.25);
}
.alert-warning .ti { color: var(--color-amber-dark); }

.alert-error {
  background: rgba(var(--rgb-primary), 0.08);
  border-color: rgba(var(--rgb-primary), 0.25);
}
.alert-error .ti { color: var(--color-orange); }

/* Toast (floating) */
.toast {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-teal);
  border-radius: var(--radius-default);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
}

.toast .ti { font-size: 20px; flex-shrink: 0; color: var(--color-teal); }
.toast-success { border-left-color: var(--color-teal); }
.toast-success .ti { color: var(--color-teal); }
.toast-info { border-left-color: var(--color-orange); }
.toast-info .ti { color: var(--color-orange); }
.toast-warning { border-left-color: var(--color-amber); }
.toast-warning .ti { color: var(--color-amber); }
.toast-error { border-left-color: var(--color-orange); }
.toast-error .ti { color: var(--color-orange); }

.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-primary); }
.toast-message { font-size: var(--fs-2xs); color: var(--text-muted); }

.toast-close {
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
}

/* ============================================================
   LIST ROWS
   ============================================================ */

.list-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.list-row:last-child { border-bottom: none; }

.list-row-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.list-row-action {
  color: var(--text-muted);
  cursor: pointer;
}

.list-row-action:hover { color: var(--color-navy); }

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pagination-item {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-input);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.pagination-item:hover { background: var(--color-bg); }

.pagination-item.is-active {
  background: var(--color-orange);
  color: var(--text-on-dark);
  border-color: var(--color-orange);
  font-weight: var(--fw-medium);
}

.pagination-item .ti { font-size: 14px; color: var(--text-muted); }

/* ============================================================
   TABS / TOGGLES
   ============================================================ */

.tabs {
  display: inline-flex;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-default);
  padding: 3px;
  gap: 2px;
}

.tab {
  padding: 7px 14px;
  border-radius: 7px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab.is-active {
  background: var(--color-navy);
  color: var(--text-on-dark);
  font-weight: var(--fw-medium);
}

.tab-orange.is-active {
  background: var(--color-orange);
}

/* View toggle (grid/list) */
.view-toggle {
  display: inline-flex;
  background: var(--color-surface);
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-md);
  padding: 3px;
}

.view-toggle-btn {
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
}

.view-toggle-btn.is-active {
  background: var(--color-navy);
  color: var(--text-on-dark);
}

.view-toggle-btn .ti { font-size: 14px; }

/* ============================================================
   MODAL / DIALOG
   ============================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(var(--rgb-navy), 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-lg);
}

.modal-card {
  background: var(--color-surface);
  border-radius: var(--radius-card-lg);
  padding: var(--space-xl);
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-modal);
}

.modal-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--tint-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.modal-card-icon .ti { font-size: 22px; color: var(--color-orange); }

.modal-card-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  margin-bottom: 6px;
}

.modal-card-body {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-normal);
  margin-bottom: 18px;
}

.modal-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
  text-align: center;
  padding: 48px 22px;
}

.empty-state-icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-card-lg);
  background: var(--tint-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
}
.empty-state-icon .ti { font-size: 32px; color: var(--color-orange); }

.empty-state-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state-body {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  max-width: 380px;
  margin: 0 auto 18px;
  line-height: var(--lh-normal);
}

/* ============================================================
   TOOLTIP (visual only)
   ============================================================ */
.tooltip {
  background: var(--color-navy);
  color: var(--text-on-dark);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-2xs);
  display: inline-block;
  position: relative;
}
.tooltip::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: var(--color-navy);
}

/* ============================================================
   DIVIDERS & UTILITIES
   ============================================================ */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-xl) 0;
}

.divider-dark {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   STAR RATING
   ============================================================ */

.stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--color-accent);
  font-size: 14px;
}

.stars .bi { font-size: inherit; }

/* ============================================================
   CAROUSEL (declarative: data-carousel in common.js)
   ============================================================ */

.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  position: relative;
}

.carousel-slide {
  display: none;
  opacity: 0;
  transition: opacity 400ms ease;
}

.carousel-slide.is-active {
  display: block;
  opacity: 1;
}

.carousel-slide.is-exiting {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 16px;
}

.carousel-btn:hover {
  background: var(--color-navy);
  color: var(--text-on-dark);
  border-color: var(--color-navy);
}

.carousel-dots {
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border-input);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition-fast);
}

.carousel-dot.is-active {
  background: var(--color-primary);
}

/* ============================================================
   REVIEW CARD
   ============================================================ */

.review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-2xl);
  text-align: center;
}

.review-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-3xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

.review-badge-provider {
  background: var(--tint-primary);
  color: var(--color-primary);
}

.review-badge-client {
  background: var(--tint-secondary);
  color: var(--color-teal-dark);
}

.review-quote {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-lg);
  font-style: italic;
}

.review-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.review-role {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* ============================================================
   CATEGORY CARD
   ============================================================ */

.category-card-new {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-default);
}

.category-card-new:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.category-card-new.is-active {
  border-color: var(--color-primary);
  background: var(--tint-primary);
}

.category-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.category-card-icon .bi {
  font-size: 22px;
  color: var(--text-on-dark);
}

.category-card-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  margin-bottom: 4px;
}

.category-card-count {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ============================================================
   PROVIDER CARD (detailed, for browse/search pages)
   ============================================================ */

.provider-card-detailed {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: box-shadow var(--transition-default), transform var(--transition-fast);
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.provider-card-detailed:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.provider-card-cover {
  height: 120px;
  background: var(--color-navy);
  position: relative;
  overflow: hidden;
}

.provider-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.provider-card-avatar {
  position: absolute;
  top: 78px;
  left: 16px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--color-surface);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.provider-card-avatar .bi {
  font-size: 28px;
  color: var(--text-on-dark);
}

.provider-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.provider-card-body {
  padding: 36px 16px 16px;
  flex: 1;
}

.provider-card-name {
  font-size: var(--fs-h4);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.provider-card-meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.provider-card-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-sm);
}

.provider-card-rating {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  line-height: 1;
}

.provider-card-rating--muted {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.provider-card-review-count {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-left: 2px;
}

.provider-card-bio {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.provider-card-services {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--space-sm);
}

.provider-card-view-more {
  text-decoration: none;
  transition: background var(--transition-fast);
}

.provider-card-view-more:hover {
  background: var(--color-orange);
  color: var(--text-on-dark);
}

.provider-card-footer {
  border-top: 1px solid var(--color-border-light);
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: var(--space-2xl);
}

.pagination-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.pagination-btn:hover {
  background: var(--tint-navy);
  color: var(--text-primary);
}

.pagination-btn.is-active {
  background: var(--color-primary);
  color: var(--text-on-dark);
  border-color: var(--color-primary);
}

.pagination-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pagination-ellipsis {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* ============================================================
   POST CARD
   ============================================================ */

.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  cursor: pointer;
  transition: box-shadow var(--transition-default), transform var(--transition-fast);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* ============================================================
   POST DETAIL PANEL (slide-in)
   ============================================================ */

.post-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(var(--rgb-navy), 0.5);
  z-index: 997;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-default), visibility var(--transition-default);
}

.post-detail-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.post-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 100vw;
  background: var(--color-surface);
  z-index: 998;
  transform: translateX(100%);
  transition: transform 300ms ease;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.post-detail-panel.is-open {
  transform: translateX(0);
}

/* ============================================================
   PROFILE STRENGTH CARD
   ============================================================ */

.profile-strength-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
}

.profile-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.profile-checklist-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 5px 0;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

.profile-checklist-item.done {
  color: var(--text-primary);
}

.profile-checklist-item.done .bi {
  color: var(--color-teal-dark);
  font-size: 14px;
}

.profile-checklist-item.todo .bi {
  color: var(--text-muted);
  font-size: 14px;
}

/* Spacing utilities (avoid liberal use; prefer component padding) */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.items-center { align-items: center; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.text-center { text-align: center; }
.text-right { text-align: right; }

.w-full { width: 100%; }
