/* ═══════════════════════════════════════════════════════════
   EMMACULATE CRM — UI Components
   Buttons, Cards, Inputs, Modals, Badges, Toasts, etc.
   Mobile-First Premium Components
   ═══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════
   BUTTONS
   ══════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 20px;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1.4;
  letter-spacing: var(--tracking-wide);
  min-height: 44px;
}

.btn:active {
  transform: scale(0.97);
}

/* Ripple effect */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

.btn .material-icons-round {
  font-size: 20px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--gradient-blue);
  color: var(--color-white);
  box-shadow: var(--shadow-blue);
}

.btn-primary:active {
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:active {
  background: var(--border-color);
}

.btn-outline {
  background: transparent;
  color: var(--color-blue);
  border: 1.5px solid var(--color-blue);
}

.btn-outline:active {
  background: var(--color-blue-50);
}

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

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

.btn-danger {
  background: var(--gradient-danger);
  color: var(--color-white);
}

.btn-success {
  background: var(--gradient-success);
  color: var(--color-white);
}

.btn-warning {
  background: var(--gradient-warning);
  color: var(--color-white);
}

.btn-sm {
  padding: 8px 14px;
  font-size: var(--text-xs);
  min-height: 36px;
  border-radius: var(--radius-md);
}

.btn-sm .material-icons-round {
  font-size: 16px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: var(--text-md);
  min-height: 52px;
  border-radius: var(--radius-xl);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-lg);
}

.btn-icon-sm {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn:disabled,
.btn.loading {
  opacity: 0.5;
  pointer-events: none;
}

.btn.loading .btn-text {
  opacity: 0;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ══════════════════════════════════
   CARDS
   ══════════════════════════════════ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px solid var(--border-light);
  transition: var(--transition-fast);
}

.card-interactive {
  cursor: pointer;
}

.card-interactive:active {
  transform: scale(0.99);
  background: var(--bg-tertiary);
}

.card-glass {
  background: var(--gradient-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-gradient {
  background: var(--gradient-card);
  border: 1px solid var(--border-light);
}

.card-flat {
  box-shadow: none;
  border: 1px solid var(--border-color);
}

/* Stat Cards */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px solid var(--border-light);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card.blue::before { background: var(--gradient-blue); }
.stat-card.green::before { background: var(--gradient-success); }
.stat-card.orange::before { background: var(--gradient-warning); }
.stat-card.red::before { background: var(--gradient-danger); }

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card .stat-icon .material-icons-round {
  font-size: 20px;
}

.stat-card.blue .stat-icon {
  background: var(--color-blue-50);
  color: var(--color-blue);
}

.stat-card.green .stat-icon {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.stat-card.orange .stat-icon {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.stat-card.red .stat-icon {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.stat-card .stat-value {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
  margin-top: var(--space-2);
}

.stat-card .stat-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-top: 2px;
}

.stat-card .stat-change {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  display: flex;
  align-items: center;
  gap: 2px;
}

.stat-card .stat-change .material-icons-round {
  font-size: 14px;
}

.stat-change.up { color: var(--color-success); }
.stat-change.down { color: var(--color-danger); }

/* ══════════════════════════════════
   INPUTS
   ══════════════════════════════════ */
.input-group {
  position: relative;
  margin-bottom: var(--space-4);
}

.input-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  min-height: 48px;
}

.input-field::placeholder {
  color: var(--text-tertiary);
}

.input-field:focus {
  border-color: var(--border-focus);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 3px var(--color-blue-50);
}

.input-field.error {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px var(--color-danger-bg);
}

.input-field.success {
  border-color: var(--color-success);
}

.input-error {
  font-size: var(--text-xs);
  color: var(--color-danger);
  margin-top: var(--space-1);
  display: flex;
  align-items: center;
  gap: 4px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon .input-field {
  padding-left: 44px;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  transition: var(--transition-fast);
}

.input-with-icon .input-icon.material-icons-round {
  font-size: 20px;
}

.input-with-icon .input-field:focus ~ .input-icon,
.input-with-icon .input-field:focus + .input-icon {
  color: var(--color-blue);
}

.input-action {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
}

.input-action .material-icons-round {
  font-size: 20px;
}

.input-action:active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Textarea */
textarea.input-field {
  min-height: 120px;
  resize: vertical;
  line-height: var(--leading-relaxed);
}

/* Select */
select.input-field {
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* Checkbox & Radio */
.checkbox-group,
.radio-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: var(--space-2) 0;
  min-height: 44px;
}

.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-blue);
  cursor: pointer;
  flex-shrink: 0;
}

/* ══════════════════════════════════
   BADGES
   ══════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: var(--tracking-wide);
  line-height: 1.4;
}

.badge-blue {
  background: var(--color-blue-50);
  color: var(--color-blue);
}

.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.badge-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.badge-danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.badge-info {
  background: var(--color-info-bg);
  color: var(--color-info);
}

.badge-gray {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

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

.badge-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: var(--font-semibold);
  border-radius: var(--radius-full);
  background: var(--color-danger);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════
   AVATAR
   ══════════════════════════════════ */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gradient-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
}

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

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

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

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

/* ══════════════════════════════════
   MODAL
   ══════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: var(--z-modal-backdrop);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-default);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-width: var(--content-max-width);
  max-height: 90vh;
  background: var(--bg-modal);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  transform: translateY(100%);
  transition: transform var(--duration-slow) var(--ease-out);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.modal-handle {
  width: 36px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-gray-300);
  margin: 10px auto;
  flex-shrink: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  gap: var(--space-3);
}

.modal-header h3 {
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.modal-close .material-icons-round {
  font-size: 20px;
}

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

.modal-body {
  padding: var(--space-4);
  overflow-y: auto;
  flex: 1;
  overscroll-behavior: contain;
}

.modal-footer {
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + var(--safe-area-bottom));
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Full-screen modal */
.modal-full .modal {
  max-height: 100vh;
  height: 100%;
  border-radius: 0;
}

/* ══════════════════════════════════
   TOAST
   ══════════════════════════════════ */
.toast-container {
  position: fixed;
  top: calc(var(--safe-area-top) + var(--space-3));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: calc(100% - var(--space-8));
  max-width: var(--content-max-width);
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  animation: fadeInDown var(--duration-slow) var(--ease-spring) forwards;
  pointer-events: auto;
  transition: var(--transition-fast);
}

.toast.removing {
  animation: fadeInDown var(--duration-normal) var(--ease-in) reverse forwards;
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon .material-icons-round {
  font-size: 20px;
}

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

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

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

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

.toast-content {
  flex: 1;
  min-width: 0;
}

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

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

.toast-dismiss {
  color: var(--text-tertiary);
  padding: 4px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.toast-dismiss .material-icons-round {
  font-size: 16px;
}

.toast-dismiss:active {
  background: var(--bg-tertiary);
}

/* ══════════════════════════════════
   TABS
   ══════════════════════════════════ */
.tabs {
  display: flex;
  gap: var(--space-1);
  background: var(--bg-tertiary);
  padding: 3px;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: 10px 16px;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: var(--font-semibold);
}

.tab .tab-count {
  padding: 1px 6px;
  font-size: 10px;
  border-radius: var(--radius-full);
  background: var(--color-blue-50);
  color: var(--color-blue);
  font-weight: var(--font-semibold);
}

.tab.active .tab-count {
  background: var(--color-blue);
  color: var(--color-white);
}

/* Scrollable tabs (pill style) */
.tabs-scroll {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.tabs-scroll::-webkit-scrollbar { display: none; }

.tab-pill {
  padding: 8px 16px;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.tab-pill .tab-count {
  padding: 1px 6px;
  font-size: 10px;
  border-radius: var(--radius-full);
  background: var(--color-blue-50);
  color: var(--color-blue);
  font-weight: var(--font-semibold);
}

.tab-pill.active {
  background: var(--color-blue);
  color: var(--color-white);
  border-color: var(--color-blue);
}

.tab-pill.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: var(--color-white);
}

/* ══════════════════════════════════
   CHIPS (Filter)
   ══════════════════════════════════ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
  min-height: 32px;
}

.chip:active {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.chip.active {
  background: var(--color-blue-50);
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.chip-remove {
  font-size: 14px;
  opacity: 0.6;
  cursor: pointer;
}

/* ══════════════════════════════════
   SKELETON LOADING
   ══════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-tertiary) 25%,
    var(--border-color) 50%,
    var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
}

.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }
.skeleton-text.long { width: 100%; }

.skeleton-circle { border-radius: var(--radius-full); }

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

.skeleton-image {
  height: 180px;
  border-radius: var(--radius-lg);
}

/* ══════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-4);
  text-align: center;
}

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

.empty-state-icon .material-icons-round {
  font-size: 32px;
}

.empty-state h3 {
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}

.empty-state p {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  max-width: 260px;
}

/* ══════════════════════════════════
   SWITCH / TOGGLE
   ══════════════════════════════════ */
.switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--color-gray-300);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-normal);
}

.switch-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  background: var(--color-white);
  border-radius: 50%;
  transition: var(--transition-normal);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.switch input:checked + .switch-slider {
  background: var(--color-blue);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

/* ══════════════════════════════════
   STAR RATING
   ══════════════════════════════════ */
.star-rating {
  display: flex;
  gap: 2px;
}

.star-rating .star {
  font-size: 18px;
  color: var(--color-gray-300);
  cursor: pointer;
  transition: var(--transition-fast);
  line-height: 1;
}

.star-rating .star.filled {
  color: var(--color-warning);
}

.star-rating .star:active {
  transform: scale(1.2);
}

/* Display only (no hover) */
.star-rating.readonly .star {
  cursor: default;
}

.star-rating.readonly .star:active {
  transform: none;
}

/* ══════════════════════════════════
   DIVIDER
   ══════════════════════════════════ */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--space-3) 0;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

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

/* ══════════════════════════════════
   SEARCH BAR
   ══════════════════════════════════ */
.search-bar {
  position: relative;
}

.search-bar .input-field {
  padding-left: 44px;
  padding-right: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  border-color: transparent;
  min-height: 44px;
}

.search-bar .input-field:focus {
  background: var(--bg-secondary);
  border-color: var(--border-focus);
}

.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-bar .search-icon.material-icons-round {
  font-size: 20px;
}

.search-bar .search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  display: none;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

.search-bar .search-clear .material-icons-round {
  font-size: 18px;
}

.search-bar .search-clear.visible {
  display: flex;
}

/* ══════════════════════════════════
   FAB (Floating Action Button)
   ══════════════════════════════════ */
.fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + var(--space-4));
  right: var(--space-4);
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--gradient-blue);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-blue);
  z-index: var(--z-sticky);
  transition: var(--transition-fast);
  cursor: pointer;
  border: none;
}

.fab .material-icons-round {
  font-size: 24px;
}

.fab:active {
  transform: scale(0.92);
}

/* ══════════════════════════════════
   LIST ITEMS
   ══════════════════════════════════ */
.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
  cursor: pointer;
  min-height: 56px;
}

.list-item:active {
  background: var(--bg-tertiary);
}

.list-item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.list-item-icon .material-icons-round {
  font-size: 20px;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

.list-item-subtitle {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}

.list-item-action {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.list-item-action.material-icons-round {
  font-size: 20px;
}

/* Section header in lists */
.list-section-header {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  padding: var(--space-3) var(--space-3) var(--space-2);
}

/* ══════════════════════════════════
   PROGRESS BAR
   ══════════════════════════════════ */
.progress-bar {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-blue);
  transition: width var(--duration-slow) var(--ease-out);
}

/* ══════════════════════════════════
   DROPDOWN / ACTION MENU
   ══════════════════════════════════ */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  padding: var(--space-1);
  z-index: var(--z-dropdown);
  opacity: 0;
  transform: translateY(-8px) scale(0.95);
  pointer-events: none;
  transition: var(--transition-fast);
}

.dropdown-menu.open {
  opacity: 1;
  transform: translateY(4px) scale(1);
  pointer-events: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 12px;
  font-size: var(--text-sm);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  min-height: 44px;
}

.dropdown-item .material-icons-round {
  font-size: 20px;
  flex-shrink: 0;
}

.dropdown-item:active {
  background: var(--bg-tertiary);
}

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

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

/* ══════════════════════════════════
   IMAGE GRID
   ══════════════════════════════════ */
.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.image-grid-item {
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.image-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-normal) var(--ease-default);
}

.image-grid-item:active img {
  transform: scale(1.03);
}

.image-grid-item .image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
  color: white;
}

.image-grid-item .image-overlay .material-icons-round {
  font-size: 24px;
}

.image-grid-item:active .image-overlay {
  opacity: 1;
}

/* ══════════════════════════════════
   CONFIRM DIALOG
   ══════════════════════════════════ */
.confirm-dialog {
  text-align: center;
  padding: var(--space-4) var(--space-2);
}

.confirm-dialog .confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
}

.confirm-dialog .confirm-icon .material-icons-round {
  font-size: 24px;
}

.confirm-dialog .confirm-icon.danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.confirm-dialog .confirm-icon.warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.confirm-dialog h3 {
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}

.confirm-dialog p {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-bottom: var(--space-6);
}

.confirm-actions {
  display: flex;
  gap: var(--space-3);
}

.confirm-actions .btn {
  flex: 1;
}