/* ==========================================================================
   CLICK ENTREGAS — Components (Premium Organic Glassmorphism)
   ========================================================================== */

/* --------------------------------------------------------------------------
   BUTTONS — Organic Premium Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-weight: var(--font-weight-semibold); font-size: var(--font-size-sm);
  padding: var(--space-3) var(--space-6); border-radius: var(--radius-2xl);
  border: var(--border-width-thin) solid transparent; white-space: nowrap;
  transition: all var(--transition-normal); cursor: pointer;
  text-decoration: none; line-height: 1;
  position: relative; overflow: hidden;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }

/* Primary — Brand Gradient */
.btn--primary {
  background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-600));
  color: var(--color-brand-contrast); border-color: transparent;
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(255, 107, 0, 0.4);
  color: var(--color-brand-contrast); text-decoration: none;
}
.btn--primary:active:not(:disabled) { transform: translateY(0) scale(0.98); }

/* Secondary — Glassmorphism */
.btn--secondary {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--color-text-primary);
  border-color: var(--glass-border);
  box-shadow: var(--shadow-glass);
}
.btn--secondary:hover:not(:disabled) {
  background: var(--glass-bg-strong);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glass-strong);
  text-decoration: none;
}
.btn--secondary:active:not(:disabled) { transform: translateY(0) scale(0.98); }

/* Ghost — Minimal */
.btn--ghost {
  background: transparent; color: var(--color-text-primary); border-color: transparent;
}
.btn--ghost:hover:not(:disabled) {
  background: var(--color-bg-tertiary);
  text-decoration: none;
}
.btn--ghost:active:not(:disabled) { transform: scale(0.98); }

/* Outline — Brand Border */
.btn--outline {
  background: transparent; color: var(--color-brand-600); border-color: var(--color-brand-500);
}
.btn--outline:hover:not(:disabled) {
  background: var(--color-brand-50);
  color: var(--color-brand-700);
  text-decoration: none;
}

/* Danger */
.btn--danger {
  background: linear-gradient(135deg, var(--color-error-500), var(--color-error-600));
  color: white; border-color: transparent;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.3);
}
.btn--danger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(239, 68, 68, 0.4);
  text-decoration: none;
}

/* Success */
.btn--success {
  background: linear-gradient(135deg, var(--color-success-500), var(--color-success-600));
  color: white; border-color: transparent;
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.3);
}
.btn--success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(34, 197, 94, 0.4);
  text-decoration: none;
}

/* Sizes */
.btn--sm { padding: var(--space-2) var(--space-4); font-size: var(--font-size-xs); border-radius: var(--radius-xl); }
.btn--lg { padding: var(--space-4) var(--space-8); font-size: var(--font-size-base); border-radius: var(--radius-3xl); }
.btn--xl { padding: var(--space-5) var(--space-10); font-size: var(--font-size-lg); border-radius: var(--radius-3xl); }
.btn--block { width: 100%; }
.btn--icon-only { padding: var(--space-3); border-radius: var(--radius-full); }
.btn--icon-only.btn--sm { padding: var(--space-2); }
.btn--icon-only.btn--lg { padding: var(--space-4); }

/* Button Group */
.btn-group { display: inline-flex; gap: var(--space-2); }
.btn-group .btn { border-radius: var(--radius-xl); }
.btn-group .btn:first-child:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group .btn:last-child:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.btn-group .btn:not(:first-child):not(:last-child) { border-radius: 0; }

/* --------------------------------------------------------------------------
   CARDS — Glassmorphism Organic Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--border-width-thin) solid var(--glass-border);
  border-radius: var(--radius-3xl);
  overflow: hidden;
  transition: all var(--transition-slow);
  box-shadow: var(--shadow-glass);
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-glass-strong);
  transform: translateY(-4px);
}
.card--elevated { box-shadow: var(--shadow-glass-strong); }
.card--elevated:hover { box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15); }
.card--interactive { cursor: pointer; }
.card--interactive:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }

.card__header { padding: var(--space-6); border-bottom: var(--border-width-thin) solid var(--glass-border); display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.card__body { padding: var(--space-6); }
.card__footer { padding: var(--space-4) var(--space-6); border-top: var(--border-width-thin) solid var(--glass-border); background: var(--glass-bg); display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3); }
.card__media { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.card__title { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); margin-bottom: var(--space-1); }
.card__subtitle { font-size: var(--font-size-sm); color: var(--color-text-secondary); }
.card__description { font-size: var(--font-size-sm); color: var(--color-text-secondary); line-height: var(--line-height-relaxed); }
.card__meta { display: flex; flex-wrap: wrap; gap: var(--space-3); font-size: var(--font-size-sm); color: var(--color-text-tertiary); }
.card__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

.card--compact .card__header, .card--compact .card__body, .card--compact .card__footer { padding: var(--space-4); }

/* Feature Card */
.feature-card {
  padding: var(--space-6);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--border-width-thin) solid var(--glass-border);
  border-radius: var(--radius-3xl);
  transition: all var(--transition-slow);
  height: 100%;
  box-shadow: var(--shadow-glass);
}
.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-glass-strong);
  transform: translateY(-8px);
}
.feature-card__icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.15), rgba(0, 212, 170, 0.15));
  color: var(--color-brand-500);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
  flex-shrink: 0;
  border: 1px solid rgba(255, 107, 0, 0.2);
}
.feature-card__icon svg { width: 32px; height: 32px; }
.feature-card__title { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); margin-bottom: var(--space-2); }
.feature-card__description { font-size: var(--font-size-sm); color: var(--color-text-secondary); line-height: var(--line-height-relaxed); margin: 0; }

/* --------------------------------------------------------------------------
   BADGES / TAGS / STATUS — Organic
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold);
  padding: var(--space-1) var(--space-2); border-radius: var(--radius-full);
  white-space: nowrap;
}
.badge--primary { background: rgba(255, 107, 0, 0.15); color: var(--color-brand-700); border: 1px solid rgba(255, 107, 0, 0.2); }
.badge--success { background: rgba(34, 197, 94, 0.15); color: var(--color-success-700); border: 1px solid rgba(34, 197, 94, 0.2); }
.badge--warning { background: rgba(245, 158, 11, 0.15); color: var(--color-warning-600); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge--error { background: rgba(239, 68, 68, 0.15); color: var(--color-error-700); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge--info { background: rgba(59, 130, 246, 0.15); color: var(--color-info-600); border: 1px solid rgba(59, 130, 246, 0.2); }
.badge--neutral { background: var(--glass-bg); color: var(--color-text-secondary); border: 1px solid var(--glass-border); backdrop-filter: var(--glass-blur); }
.badge--outline { background: transparent; border: 1px solid currentColor; }
.badge--dot::before { content: ''; width: 6px; height: 6px; border-radius: var(--radius-full); background: currentColor; }

/* Delivery Status Badges */
.status-badge { @extend .badge; }
.status-badge--available { @extend .badge--success; }
.status-badge--accepted { background: rgba(59, 130, 246, 0.15); color: var(--color-info-600); border: 1px solid rgba(59, 130, 246, 0.2); }
.status-badge--in_transit { @extend .badge--warning; }
.status-badge--delivered { @extend .badge--success; }
.status-badge--cancelled { @extend .badge--error; }
.status-badge--pending { @extend .badge--neutral; }

/* --------------------------------------------------------------------------
   AVATAR — Organic
   -------------------------------------------------------------------------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--color-brand-100), var(--color-brand-200)); color: var(--color-brand-700); font-weight: var(--font-weight-semibold); font-size: var(--font-size-sm); overflow: hidden; 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--lg { width: 56px; height: 56px; font-size: var(--font-size-base); }
.avatar--xl { width: 80px; height: 80px; font-size: var(--font-size-xl); }
.avatar-group { display: inline-flex; }
.avatar-group .avatar { margin-left: -8px; border: 2px solid var(--color-bg-primary); }
.avatar-group .avatar:first-child { margin-left: 0; }
.avatar-group .avatar:focus-visible { z-index: 1; }

/* --------------------------------------------------------------------------
   INPUTS & FORM COMPONENTS — Organic Glass
   -------------------------------------------------------------------------- */
.field { margin-bottom: var(--space-5); }
.field--inline { display: flex; align-items: flex-end; gap: var(--space-4); }
.field--inline > * { flex: 1; }
.field__label { display: block; font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); color: var(--color-text-primary); margin-bottom: var(--space-2); }
.field__label--required::after { content: ' *'; color: var(--color-error-500); }
.field__input-wrapper { position: relative; }
.field__icon { position: absolute; left: var(--space-3); top: 50%; transform: translateY(-50%); color: var(--color-text-tertiary); pointer-events: none; width: 20px; height: 20px; }
.field__input--with-icon { padding-left: var(--space-10); }
.field__input--with-suffix { padding-right: var(--space-10); }
.field__suffix { position: absolute; right: var(--space-3); top: 50%; transform: translateY(-50%); color: var(--color-text-tertiary); font-size: var(--font-size-sm); }
.field__hint { font-size: var(--font-size-xs); color: var(--color-text-tertiary); margin-top: var(--space-1); }
.field__error { font-size: var(--font-size-xs); color: var(--color-error-600); margin-top: var(--space-1); display: flex; align-items: center; gap: var(--space-1); }

.input-group { display: flex; }
.input-group > * { border-radius: 0; }
.input-group > *:first-child { border-top-left-radius: var(--radius-lg); border-bottom-left-radius: var(--radius-lg); }
.input-group > *:last-child { border-top-right-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }
.input-group .btn { border-radius: 0; }
.input-group .btn:first-child { border-top-left-radius: var(--radius-lg); border-bottom-left-radius: var(--radius-lg); }
.input-group .btn:last-child { border-top-right-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }

.checkbox, .radio { display: flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.checkbox input, .radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox__box, .radio__box { width: 20px; height: 20px; border: 2px solid var(--color-border-medium); border-radius: var(--radius-sm); background: var(--color-bg-primary); display: flex; align-items: center; justify-content: center; transition: all var(--transition-fast); flex-shrink: 0; }
.checkbox__box::after { content: ''; width: 10px; height: 10px; background: var(--color-brand-500); clip-path: polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%); transform: scale(0); transition: transform var(--transition-fast); }
.radio__box { border-radius: var(--radius-full); }
.radio__box::after { content: ''; width: 8px; height: 8px; background: var(--color-brand-500); border-radius: var(--radius-full); transform: scale(0); transition: transform var(--transition-fast); }
.checkbox input:checked + .checkbox__box, .radio input:checked + .radio__box { border-color: var(--color-brand-500); }
.checkbox input:checked + .checkbox__box::after, .radio input:checked + .radio__box::after { transform: scale(1); }
.checkbox input:focus-visible + .checkbox__box, .radio input:focus-visible + .radio__box { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.checkbox__label, .radio__label { font-size: var(--font-size-sm); color: var(--color-text-primary); line-height: var(--line-height-relaxed); }

.switch { position: relative; display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track { width: 48px; height: 28px; background: var(--color-border-medium); border-radius: var(--radius-full); transition: background var(--transition-fast); position: relative; }
.switch__thumb { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; background: white; border-radius: var(--radius-full); box-shadow: var(--shadow-md); transition: transform var(--transition-fast); }
.switch input:checked + .switch__track { background: var(--color-brand-500); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.switch__label { font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); color: var(--color-text-primary); }

.file-upload { border: 2px dashed var(--color-border-medium); border-radius: var(--radius-2xl); padding: var(--space-8); text-align: center; transition: all var(--transition-fast); cursor: pointer; background: var(--glass-bg); backdrop-filter: var(--glass-blur); }
.file-upload:hover, .file-upload.drag-over { border-color: var(--color-brand-500); background: rgba(255, 107, 0, 0.08); }
.file-upload input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.file-upload__icon { width: 48px; height: 48px; margin: 0 auto var(--space-4); color: var(--color-text-tertiary); }
.file-upload__text { font-size: var(--font-size-base); color: var(--color-text-secondary); margin-bottom: var(--space-1); }
.file-upload__hint { font-size: var(--font-size-sm); color: var(--color-text-tertiary); }
.file-upload__preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: var(--space-3); margin-top: var(--space-4); text-align: left; }
.file-upload__preview-item { position: relative; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; }
.file-upload__preview-item img { width: 100%; height: 100%; object-fit: cover; }
.file-upload__preview-remove { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: var(--radius-full); background: rgba(0,0,0,0.6); color: white; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--transition-fast); }
.file-upload__preview-item:hover .file-upload__preview-remove { opacity: 1; }

.otp-inputs { display: flex; gap: var(--space-2); justify-content: center; }
.otp-inputs input { width: 48px; height: 56px; text-align: center; font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); border-radius: var(--radius-lg); border: 2px solid var(--color-border-medium); }
.otp-inputs input:focus { border-color: var(--color-brand-500); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand-500) 20%, transparent); }
.otp-inputs input.filled { border-color: var(--color-brand-500); background: var(--color-brand-50); }

/* --------------------------------------------------------------------------
   MODAL / DRAWER — Glassmorphism
   -------------------------------------------------------------------------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: var(--z-index-modal-backdrop); display: flex; align-items: center; justify-content: center; padding: var(--space-4); opacity: 0; visibility: hidden; transition: opacity var(--transition-normal), visibility var(--transition-normal); }
.modal-backdrop--open { opacity: 1; visibility: visible; }
.modal { background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--radius-4xl); max-width: 520px; width: 100%; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; transform: scale(0.95); transition: transform var(--transition-normal); box-shadow: var(--shadow-glass-strong); }
.modal-backdrop--open .modal { transform: scale(1); }
.modal__header { padding: var(--space-6); border-bottom: var(--border-width-thin) solid var(--glass-border); display: flex; align-items: center; justify-content: space-between; }
.modal__title { font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); }
.modal__close { width: 40px; height: 40px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; color: var(--color-text-tertiary); transition: all var(--transition-fast); }
.modal__close:hover { background: var(--glass-bg); color: var(--color-text-primary); }
.modal__body { padding: var(--space-6); overflow-y: auto; flex: 1; }
.modal__footer { padding: var(--space-4) var(--space-6); border-top: var(--border-width-thin) solid var(--glass-border); display: flex; justify-content: flex-end; gap: var(--space-3); background: var(--glass-bg); }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 420px; background: var(--color-bg-primary); z-index: var(--z-index-modal); transform: translateX(100%); transition: transform var(--transition-normal); box-shadow: var(--shadow-2xl); display: flex; flex-direction: column; }
.drawer--open { transform: translateX(0); }
.drawer__header { padding: var(--space-4); border-bottom: var(--border-width-thin) solid var(--color-border-light); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--color-bg-primary); z-index: 1; }
.drawer__body { flex: 1; overflow-y: auto; padding: var(--space-4); }
.drawer__footer { padding: var(--space-4); border-top: var(--border-width-thin) solid var(--color-border-light); background: var(--color-bg-secondary); position: sticky; bottom: 0; }

/* --------------------------------------------------------------------------
   TOAST / NOTIFICATION — Organic
   -------------------------------------------------------------------------- */
.toast-container { position: fixed; bottom: var(--space-6); right: var(--space-6); z-index: var(--z-index-toast); display: flex; flex-direction: column; gap: var(--space-3); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4); background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--radius-2xl); box-shadow: var(--shadow-glass-strong); min-width: 280px; max-width: 420px; pointer-events: auto; animation: slideInRight var(--transition-normal) ease-out; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
.toast--success { border-left: 4px solid var(--color-success-500); }
.toast--error { border-left: 4px solid var(--color-error-500); }
.toast--warning { border-left: 4px solid var(--color-warning-500); }
.toast--info { border-left: 4px solid var(--color-info-500); }
.toast__icon { flex-shrink: 0; width: 24px; height: 24px; color: var(--color-text-tertiary); }
.toast--success .toast__icon { color: var(--color-success-500); }
.toast--error .toast__icon { color: var(--color-error-500); }
.toast--warning .toast__icon { color: var(--color-warning-500); }
.toast--info .toast__icon { color: var(--color-info-500); }
.toast__content { flex: 1; }
.toast__title { font-weight: var(--font-weight-semibold); font-size: var(--font-size-sm); color: var(--color-text-primary); margin-bottom: var(--space-1); }
.toast__message { font-size: var(--font-size-sm); color: var(--color-text-secondary); line-height: var(--line-height-relaxed); }
.toast__close { flex-shrink: 0; width: 24px; height: 24px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; color: var(--color-text-tertiary); }
.toast__close:hover { background: var(--glass-bg); color: var(--color-text-primary); }

/* --------------------------------------------------------------------------
   DROPDOWN — Organic
   -------------------------------------------------------------------------- */
.dropdown { position: relative; display: inline-block; }
.dropdown__trigger { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-lg); font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); color: var(--color-text-primary); background: var(--glass-bg); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); cursor: pointer; transition: all var(--transition-fast); }
.dropdown__trigger:hover { border-color: rgba(255,255,255,0.2); background: var(--glass-bg-strong); }
.dropdown__trigger:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.dropdown__menu { position: absolute; top: calc(100% + var(--space-2)); right: 0; min-width: 200px; background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--radius-2xl); box-shadow: var(--shadow-glass-strong); padding: var(--space-2); z-index: var(--z-index-dropdown); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all var(--transition-fast); }
.dropdown--open .dropdown__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown__item { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); font-size: var(--font-size-sm); color: var(--color-text-primary); text-decoration: none; transition: background var(--transition-fast); }
.dropdown__item:hover { background: var(--glass-bg-strong); text-decoration: none; }
.dropdown__item--danger { color: var(--color-error-600); }
.dropdown__item--danger:hover { background: rgba(239, 68, 68, 0.1); }
.dropdown__divider { height: 1px; background: var(--glass-border); margin: var(--space-2) 0; }
.dropdown__item-icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--color-text-tertiary); }

/* --------------------------------------------------------------------------
   TABS — Organic
   -------------------------------------------------------------------------- */
.tabs { border-bottom: 1px solid var(--color-border-light); }
.tabs__list { display: flex; gap: var(--space-1); overflow-x: auto; padding-bottom: calc(var(--border-width-thin) * -1); margin-bottom: calc(var(--border-width-thin) * -1); }
.tabs__trigger { padding: var(--space-3) var(--space-4); font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); color: var(--color-text-secondary); background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: all var(--transition-fast); white-space: nowrap; position: relative; }
.tabs__trigger:hover { color: var(--color-text-primary); }
.tabs__trigger--active { color: var(--color-brand-600); border-bottom-color: var(--color-brand-500); }
.tabs__panel { display: none; padding: var(--space-6) 0; animation: fadeIn var(--transition-normal); }
.tabs__panel--active { display: block; }

/* --------------------------------------------------------------------------
   ACCORDION — Organic
   -------------------------------------------------------------------------- */
.accordion { border: 1px solid var(--color-border-light); border-radius: var(--radius-2xl); overflow: hidden; }
.accordion__item { border-bottom: 1px solid var(--color-border-light); }
.accordion__item:last-child { border-bottom: none; }
.accordion__trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); background: var(--color-bg-primary); font-size: var(--font-size-base); font-weight: var(--font-weight-medium); color: var(--color-text-primary); text-align: left; cursor: pointer; transition: background var(--transition-fast); }
.accordion__trigger:hover { background: var(--color-bg-secondary); }
.accordion__trigger:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: -2px; }
.accordion__icon { width: 24px; height: 24px; color: var(--color-text-tertiary); flex-shrink: 0; transition: transform var(--transition-fast); }
.accordion__item--open .accordion__icon { transform: rotate(180deg); }
.accordion__content { padding: 0 var(--space-5); max-height: 0; overflow: hidden; transition: max-height var(--transition-normal), padding var(--transition-normal); }
.accordion__content-inner { padding-bottom: var(--space-5); color: var(--color-text-secondary); line-height: var(--line-height-relaxed); }

/* --------------------------------------------------------------------------
   TOOLTIP — Organic
   -------------------------------------------------------------------------- */
.tooltip { position: relative; display: inline-block; }
.tooltip__content { position: absolute; bottom: calc(100% + var(--space-2)); left: 50%; transform: translateX(-50%); background: var(--color-neutral-900); color: white; font-size: var(--font-size-xs); font-weight: var(--font-weight-medium); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; transition: all var(--transition-fast); z-index: var(--z-index-tooltip); }
.tooltip__content::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--color-neutral-900); }
.tooltip:hover .tooltip__content, .tooltip:focus-within .tooltip__content { opacity: 1; visibility: visible; }
.tooltip--top .tooltip__content { bottom: auto; top: calc(100% + var(--space-2)); }
.tooltip--top .tooltip__content::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--color-neutral-900); }

/* --------------------------------------------------------------------------
   PROGRESS / STEPPER — Organic
   -------------------------------------------------------------------------- */
.progress { height: 8px; background: var(--color-bg-tertiary); border-radius: var(--radius-full); overflow: hidden; }
.progress__bar { height: 100%; background: linear-gradient(135deg, var(--color-brand-500), var(--color-accent-500)); border-radius: var(--radius-full); transition: width var(--transition-slow) ease-out; }
.progress--sm { height: 4px; }
.progress--lg { height: 12px; }

.stepper { display: flex; align-items: center; }
.stepper__item { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.stepper__item:not(:last-child)::after { content: ''; position: absolute; top: 12px; left: 50%; width: 100%; height: 2px; background: var(--color-border-light); z-index: 0; }
.stepper__step { width: 24px; height: 24px; border-radius: var(--radius-full); border: 2px solid var(--color-border-medium); background: var(--color-bg-primary); display: flex; align-items: center; justify-content: center; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-text-tertiary); z-index: 1; transition: all var(--transition-normal); }
.stepper__item--active .stepper__step { border-color: var(--color-brand-500); background: var(--color-brand-500); color: white; box-shadow: var(--shadow-brand); }
.stepper__item--completed .stepper__step { border-color: var(--color-success-500); background: var(--color-success-500); color: white; }
.stepper__item--completed::after { background: var(--color-success-500); }
.stepper__label { margin-top: var(--space-2); font-size: var(--font-size-xs); color: var(--color-text-tertiary); text-align: center; white-space: nowrap; }
.stepper__item--active .stepper__label { color: var(--color-brand-600); font-weight: var(--font-weight-medium); }
.stepper__item--completed .stepper__label { color: var(--color-success-600); }

/* --------------------------------------------------------------------------
   TABLE — Organic
   -------------------------------------------------------------------------- */
.table-wrapper { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); }
.table th, .table td { padding: var(--space-3) var(--space-4); text-align: left; border-bottom: 1px solid var(--color-border-light); }
.table th { font-weight: var(--font-weight-semibold); color: var(--color-text-secondary); font-size: var(--font-size-xs); text-transform: uppercase; letter-spacing: 0.05em; background: var(--color-bg-secondary); white-space: nowrap; }
.table td { color: var(--color-text-primary); }
.table tbody tr { transition: background var(--transition-fast); }
.table tbody tr:hover { background: var(--color-bg-secondary); }
.table--striped tbody tr:nth-child(even) { background: var(--color-bg-secondary); }
.table--striped tbody tr:hover { background: var(--color-bg-tertiary); }

/* --------------------------------------------------------------------------
   PAGINATION — Organic
   -------------------------------------------------------------------------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-1); }
.pagination__btn { width: 40px; height: 40px; border-radius: var(--radius-xl); display: flex; align-items: center; justify-content: center; font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); color: var(--color-text-secondary); border: 1px solid var(--color-border-light); background: var(--color-bg-primary); transition: all var(--transition-fast); }
.pagination__btn:hover:not(:disabled) { border-color: var(--color-brand-500); color: var(--color-brand-600); }
.pagination__btn:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.pagination__btn--active { background: var(--color-brand-500); border-color: var(--color-brand-500); color: white; cursor: default; }
.pagination__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination__ellipsis { padding: var(--space-2); color: var(--color-text-tertiary); }

/* --------------------------------------------------------------------------
   ALERT / BANNER — Organic
   -------------------------------------------------------------------------- */
.alert { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-2xl); border: 1px solid transparent; }
.alert__icon { flex-shrink: 0; width: 24px; height: 24px; margin-top: 2px; }
.alert__content { flex: 1; }
.alert__title { font-weight: var(--font-weight-semibold); margin-bottom: var(--space-1); }
.alert__message { font-size: var(--font-size-sm); line-height: var(--line-height-relaxed); }
.alert--success { background: rgba(34, 197, 94, 0.1); border-color: var(--color-success-500); color: var(--color-success-700); }
.alert--success .alert__icon { color: var(--color-success-500); }
.alert--error { background: rgba(239, 68, 68, 0.1); border-color: var(--color-error-500); color: var(--color-error-700); }
.alert--error .alert__icon { color: var(--color-error-500); }
.alert--warning { background: rgba(245, 158, 11, 0.1); border-color: var(--color-warning-500); color: var(--color-warning-600); }
.alert--warning .alert__icon { color: var(--color-warning-500); }
.alert--info { background: rgba(59, 130, 246, 0.1); border-color: var(--color-info-500); color: var(--color-info-700); }
.alert--info .alert__icon { color: var(--color-info-500); }
.alert--dismissible { position: relative; padding-right: var(--space-10); }
.alert__dismiss { position: absolute; top: var(--space-4); right: var(--space-4); width: 24px; height: 24px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; color: inherit; opacity: 0.6; transition: opacity var(--transition-fast); }
.alert__dismiss:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }

/* --------------------------------------------------------------------------
   LOADING / SPINNER — Organic
   -------------------------------------------------------------------------- */
.spinner { width: 24px; height: 24px; border: 2px solid var(--color-border-light); border-top-color: var(--color-brand-500); border-radius: var(--radius-full); animation: spin 0.8s linear infinite; }
.spinner--sm { width: 16px; height: 16px; border-width: 1.5px; }
.spinner--lg { width: 40px; height: 40px; border-width: 3px; }
.spinner--inline { display: inline-block; vertical-align: middle; margin-right: var(--space-2); }

.loading-overlay { position: absolute; inset: 0; background: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; z-index: var(--z-index-sticky); border-radius: inherit; }
[data-theme="dark"] .loading-overlay { background: rgba(10,10,10,0.8); }

/* --------------------------------------------------------------------------
   EMPTY STATE — Organic
   -------------------------------------------------------------------------- */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--space-16) var(--space-6); text-align: center; }
.empty-state__icon { width: 80px; height: 80px; color: var(--color-text-tertiary); margin-bottom: var(--space-6); opacity: 0.5; }
.empty-state__title { font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); margin-bottom: var(--space-2); }
.empty-state__description { color: var(--color-text-secondary); max-width: 320px; margin-bottom: var(--space-6); }
.empty-state__action { margin-top: var(--space-2); }

/* --------------------------------------------------------------------------
   BREADCRUMB — Organic
   -------------------------------------------------------------------------- */
.breadcrumb { display: flex; align-items: center; gap: var(--space-2); font-size: var(--font-size-sm); flex-wrap: wrap; }
.breadcrumb__item { display: flex; align-items: center; gap: var(--space-2); color: var(--color-text-tertiary); }
.breadcrumb__item:not(:last-child)::after { content: '/'; color: var(--color-text-tertiary); }
.breadcrumb__link { color: var(--color-text-secondary); transition: color var(--transition-fast); }
.breadcrumb__link:hover { color: var(--color-brand-600); }
.breadcrumb__current { color: var(--color-text-primary); font-weight: var(--font-weight-medium); pointer-events: none; }

/* --------------------------------------------------------------------------
   TAG INPUT — Organic
   -------------------------------------------------------------------------- */
.tag-input { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-2); border: 1px solid var(--color-border-medium); border-radius: var(--radius-lg); background: var(--color-bg-primary); transition: border-color var(--transition-fast); }
.tag-input:focus-within { border-color: var(--color-border-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-border-focus) 20%, transparent); }
.tag-input__tag { display: inline-flex; align-items: center; gap: var(--space-1); background: rgba(255, 107, 0, 0.1); color: var(--color-brand-700); padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); }
.tag-input__tag-remove { width: 18px; height: 18px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; color: inherit; opacity: 0.7; transition: opacity var(--transition-fast), background var(--transition-fast); }
.tag-input__tag-remove:hover { opacity: 1; background: color-mix(in srgb, currentColor 15%, transparent); }
.tag-input__input { flex: 1; min-width: 120px; border: none; outline: none; background: transparent; padding: var(--space-1) 0; font-size: var(--font-size-sm); }