/* ==========================================================================
   Elos - Component Styles
   Cards, buttons, badges, inputs, modals, tables, toasts, and more.
   ========================================================================== */

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-light);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.card-header h3,
.card-header h4 {
  margin: 0;
}

.card-body {
  flex: 1;
}

.card-body p {
  color: var(--text-secondary);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  margin-top: var(--space-md);
  border-top: 1px solid var(--border);
}

.card-flat {
  border-color: transparent;
  background: var(--bg-secondary);
}

.card-flat:hover {
  border-color: var(--border-light);
  box-shadow: none;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn i,
.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Primary */
.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 0 16px var(--accent-light);
  color: #ffffff;
}

/* Secondary */
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
  color: var(--text-primary);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Danger */
.btn-danger {
  background: var(--error);
  color: #ffffff;
  border-color: var(--error);
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 0 16px var(--error-light);
  color: #ffffff;
}

/* Success */
.btn-success {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

.btn-success:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

/* Sizes */
.btn-sm {
  padding: 6px 12px;
  font-size: var(--font-size-xs);
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: var(--font-size-base);
  border-radius: var(--radius);
}

.btn-icon {
  padding: 10px;
  width: 40px;
  height: 40px;
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
  padding: 6px;
}

.btn-icon.btn-lg {
  width: 48px;
  height: 48px;
  padding: 12px;
}

/* Button group */
.btn-group {
  display: flex;
  gap: var(--space-sm);
}

/* Loading state */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius-full);
  white-space: nowrap;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
  border-color: transparent;
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
  border-color: transparent;
}

.badge-error {
  background: var(--error-light);
  color: var(--error);
  border-color: transparent;
}

.badge-info {
  background: var(--info-light);
  color: var(--info);
  border-color: transparent;
}

.badge-accent {
  background: var(--accent-light);
  color: var(--accent);
  border-color: transparent;
}

.badge-accent-secondary {
  background: var(--accent-secondary-light);
  color: var(--accent-secondary);
  border-color: transparent;
}

/* Dot variant */
.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ==========================================================================
   Inputs, Textarea, Select
   ========================================================================== */

.input,
.textarea,
.select {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  outline: none;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--border-light);
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.input.is-error,
.textarea.is-error,
.select.is-error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px var(--error-light);
}

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

.input:disabled,
.textarea:disabled,
.select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-primary);
}

.textarea {
  resize: vertical;
  min-height: 100px;
}

.select {
  appearance: none;
  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='%238b8b9e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.input-sm {
  padding: 7px 10px;
  font-size: var(--font-size-xs);
}

/* Input group (icon + input) */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.input-group .input-icon svg,
.input-group .input-icon i {
  width: 16px;
  height: 16px;
}

.input-group .input {
  padding-left: 40px;
}

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

.input-group-right .input {
  padding-left: 14px;
  padding-right: 40px;
}

/* Form group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-md);
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.form-label .required {
  color: var(--error);
  margin-left: 2px;
}

.form-hint {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.form-error {
  font-size: var(--font-size-xs);
  color: var(--error);
}

/* Checkbox & Radio */
.checkbox,
.radio {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.checkbox input,
.radio input {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  background: var(--bg-tertiary);
  transition: var(--transition);
  flex-shrink: 0;
  cursor: pointer;
}

.checkbox input {
  border-radius: var(--radius-xs);
}

.radio input {
  border-radius: 50%;
}

.checkbox input:checked,
.radio input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox input:checked {
  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='white' stroke-width='3' 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: center;
}

.radio input:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Ccircle cx='4' cy='4' r='4' fill='white'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.toggle input {
  appearance: none;
  width: 44px;
  height: 24px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.toggle input::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--text-muted);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: var(--transition);
}

.toggle input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle input:checked::before {
  transform: translateX(20px);
  background: #ffffff;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.98);
  transition: var(--transition);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: var(--font-size-xl);
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border-top: 1px solid var(--border);
}

.modal-sm { max-width: 400px; }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1000px; }

/* ==========================================================================
   Table
   ========================================================================== */

.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  padding: 12px 16px;
  text-align: left;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Striped */
.table-striped tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

/* Sortable header */
th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover {
  color: var(--text-secondary);
}

th.sort-asc::after {
  content: ' \2191';
}

th.sort-desc::after {
  content: ' \2193';
}

/* ==========================================================================
   Pagination
   ========================================================================== */

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

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  cursor: pointer;
}

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

.pagination-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

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

/* ==========================================================================
   Toast
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: 14px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 320px;
  max-width: 420px;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease forwards;
}

.toast.removing {
  animation: toastSlideOut 0.25s ease forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.toast-message {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}

.toast-close {
  flex-shrink: 0;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.toast-close:hover {
  color: var(--text-primary);
}

.toast-success {
  border-left: 3px solid var(--success);
}

.toast-success .toast-icon {
  color: var(--success);
}

.toast-error {
  border-left: 3px solid var(--error);
}

.toast-error .toast-icon {
  color: var(--error);
}

.toast-warning {
  border-left: 3px solid var(--warning);
}

.toast-warning .toast-icon {
  color: var(--warning);
}

.toast-info {
  border-left: 3px solid var(--info);
}

.toast-info .toast-icon {
  color: var(--info);
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  color: var(--text-muted);
}

.empty-state-icon svg,
.empty-state-icon i {
  width: 32px;
  height: 32px;
}

.empty-state h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-sm);
}

.empty-state p {
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: var(--space-lg);
}

/* ==========================================================================
   Stats Card
   ========================================================================== */

.stats-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  transition: var(--transition);
}

.stats-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-light);
}

.stats-card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats-card-value {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stats-card-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.stats-card-trend {
  font-size: var(--font-size-xs);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
}

.stats-card-trend.up {
  color: var(--success);
}

.stats-card-trend.down {
  color: var(--error);
}

.stats-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border-radius: var(--radius);
  color: var(--accent);
  flex-shrink: 0;
}

.stats-card-icon svg,
.stats-card-icon i {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   Chips
   ========================================================================== */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: var(--transition-fast);
}

.chip:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

.chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.chip-remove:hover {
  background: var(--error-light);
  color: var(--error);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.chip-active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

/* ==========================================================================
   Avatar
   ========================================================================== */

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

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

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: var(--font-size-xs);
}

.avatar-md {
  width: 40px;
  height: 40px;
  font-size: var(--font-size-sm);
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: var(--font-size-lg);
}

.avatar-xl {
  width: 80px;
  height: 80px;
  font-size: var(--font-size-2xl);
}

.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  border: 2px solid var(--bg-secondary);
  margin-left: -8px;
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}

/* ==========================================================================
   Dropdown
   ========================================================================== */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 200px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  padding: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: var(--transition-fast);
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 8px 12px;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
}

.dropdown-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.dropdown-item svg,
.dropdown-item i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.dropdown-item:hover svg,
.dropdown-item:hover i {
  color: var(--text-secondary);
}

.dropdown-item-danger {
  color: var(--error);
}

.dropdown-item-danger:hover {
  background: var(--error-light);
  color: var(--error);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ==========================================================================
   Tabs
   ========================================================================== */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.tab {
  padding: 12px 20px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  margin-bottom: -1px;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Pill tabs */
.tabs-pill {
  border-bottom: none;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
}

.tabs-pill .tab {
  border-bottom: none;
  border-radius: var(--radius-sm);
  margin-bottom: 0;
}

.tabs-pill .tab-active {
  background: var(--accent);
  color: #ffffff;
}

/* ==========================================================================
   Search Bar
   ========================================================================== */

.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 var(--space-md);
  transition: var(--transition);
}

.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-bar-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.search-bar-icon svg,
.search-bar-icon i {
  width: 18px;
  height: 18px;
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  outline: none;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar .btn {
  margin: 4px 0;
  margin-right: -8px;
}

/* ==========================================================================
   Skeleton Loading
   ========================================================================== */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 25%,
    var(--bg-hover) 50%,
    var(--bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 14px;
  width: 80%;
  margin-bottom: var(--space-sm);
}

.skeleton-text:last-child {
  width: 60%;
  margin-bottom: 0;
}

.skeleton-title {
  height: 24px;
  width: 50%;
  margin-bottom: var(--space-md);
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-card {
  height: 160px;
  border-radius: var(--radius);
}

.skeleton-btn {
  height: 40px;
  width: 120px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Divider
   ========================================================================== */

.divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider:empty::after {
  display: none;
}

.divider:empty {
  height: 1px;
  background: var(--border);
}

.divider:empty::before {
  display: none;
}

/* ==========================================================================
   Alert / Callout
   ========================================================================== */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.alert-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-icon svg,
.alert-icon i {
  width: 18px;
  height: 18px;
}

.alert-success {
  background: var(--success-light);
  border-color: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.alert-warning {
  background: var(--warning-light);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.alert-error {
  background: var(--error-light);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.alert-info {
  background: var(--info-light);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--info);
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.progress {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.progress-bar-success {
  background: var(--success);
}

.progress-bar-warning {
  background: var(--warning);
}

.progress-bar-error {
  background: var(--error);
}

/* ==========================================================================
   Tooltip (CSS only, data-tooltip attr)
   ========================================================================== */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: var(--transition-fast);
  z-index: var(--z-tooltip);
}

[data-tooltip]:hover::after {
  opacity: 1;
}
