:root {
  --fluid-duration-xs: 150ms;
  --fluid-duration-sm: 220ms;
  --fluid-duration-md: 320ms;
  --fluid-duration-lg: 460ms;
  --fluid-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --fluid-ease-in-out: cubic-bezier(0.32, 0.72, 0, 1);
  --fluid-shadow-surface: 0 18px 34px rgba(28, 25, 23, 0.08), 0 8px 18px rgba(28, 25, 23, 0.05);
  --fluid-shadow-surface-strong: 0 24px 46px rgba(28, 25, 23, 0.12), 0 12px 24px rgba(154, 52, 18, 0.08);
  --fluid-shadow-card: 0 18px 30px rgba(28, 25, 23, 0.07), 0 8px 16px rgba(28, 25, 23, 0.04), 0 0 0 1px rgba(154, 52, 18, 0.08);
  --fluid-shadow-card-hover: 0 24px 46px rgba(28, 25, 23, 0.11), 0 12px 24px rgba(154, 52, 18, 0.08), 0 0 0 1px rgba(154, 52, 18, 0.16);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body.theme-editorial .header,
body.theme-editorial .nav-tabs,
body.theme-editorial #clientsTab .controls.streamlined,
body.theme-editorial #clientsTab .result-count-bar,
body.theme-editorial .smart-tasks-header,
body.theme-editorial .task-content-area,
body.theme-editorial .calendar-monolith,
body.theme-editorial .reports-header,
body.theme-editorial .report-panel,
body.theme-editorial .risk-heatmap-kpi,
body.theme-editorial .billing-header,
body.theme-editorial .billing-timer-strip,
body.theme-editorial .billing-stats-row,
body.theme-editorial .billing-entry-form,
body.theme-editorial .billing-entries-wrapper,
body.theme-editorial .billing-invoices-view,
body.theme-editorial .contact-header,
body.theme-editorial .contact-controls,
body.theme-editorial .contact-list,
body.theme-editorial .contact-empty,
body.theme-editorial .intake-header,
body.theme-editorial .intake-section,
body.theme-editorial .modal-content {
  transition:
    transform var(--fluid-duration-md) var(--fluid-ease-out),
    box-shadow var(--fluid-duration-md) var(--fluid-ease-out),
    border-color var(--fluid-duration-sm) var(--fluid-ease-in-out),
    background-color var(--fluid-duration-sm) var(--fluid-ease-in-out),
    opacity var(--fluid-duration-sm) ease !important;
  backface-visibility: hidden;
  transform: translateZ(0);
}

body.theme-editorial .quick-view-panel {
  transition:
    transform var(--fluid-duration-md) var(--fluid-ease-out),
    box-shadow var(--fluid-duration-md) var(--fluid-ease-out),
    border-color var(--fluid-duration-sm) var(--fluid-ease-in-out),
    background-color var(--fluid-duration-sm) var(--fluid-ease-in-out),
    opacity var(--fluid-duration-sm) ease !important;
  backface-visibility: hidden;
}

body.theme-editorial .quick-view-panel:not(.show) {
  transform: translateX(100%) translateZ(0) !important;
}

body.theme-editorial .quick-view-panel.show {
  transform: translateX(0) translateZ(0) !important;
}

body.theme-editorial .header,
body.theme-editorial .nav-tabs,
body.theme-editorial #clientsTab .controls.streamlined,
body.theme-editorial #clientsTab .result-count-bar {
  box-shadow: var(--fluid-shadow-surface) !important;
}

body.theme-editorial .controls.scrolled,
body.theme-editorial #clientsTab .controls.streamlined.scrolled {
  transform: translateY(-2px) translateZ(0);
  box-shadow: var(--fluid-shadow-surface-strong) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(249, 244, 236, 0.92)) !important;
}

body.theme-editorial .header-stat,
body.theme-editorial .nav-tab,
body.theme-editorial .sign-out-btn,
body.theme-editorial .notification-btn,
body.theme-editorial .print-urgent-btn,
body.theme-editorial .keyboard-shortcuts-btn,
body.theme-editorial .mobile-menu-toggle,
body.theme-editorial .filter-dropdown-trigger,
body.theme-editorial .add-client-inline-btn,
body.theme-editorial .view-toggle-btn,
body.theme-editorial .sort-value,
body.theme-editorial .filter-chip,
body.theme-editorial .quick-add-btn,
body.theme-editorial .reports-action-btn,
body.theme-editorial .billing-export-btn,
body.theme-editorial .billing-timer-btn,
body.theme-editorial .billing-sub-tab,
body.theme-editorial .billing-save-btn,
body.theme-editorial .billing-inv-btn,
body.theme-editorial .contact-add-btn,
body.theme-editorial .contact-import-btn,
body.theme-editorial .btn,
body.theme-editorial .btn-primary,
body.theme-editorial .btn-secondary,
body.theme-editorial .action-btn,
body.theme-editorial .filter-btn {
  transition:
    transform var(--fluid-duration-sm) var(--fluid-ease-out),
    box-shadow var(--fluid-duration-sm) var(--fluid-ease-out),
    background-color var(--fluid-duration-sm) var(--fluid-ease-in-out),
    border-color var(--fluid-duration-sm) var(--fluid-ease-in-out),
    color var(--fluid-duration-xs) ease,
    filter var(--fluid-duration-xs) ease !important;
  will-change: transform;
}

body.theme-editorial .header-stat:hover,
body.theme-editorial .nav-tab:hover,
body.theme-editorial .sign-out-btn:hover,
body.theme-editorial .notification-btn:hover,
body.theme-editorial .print-urgent-btn:hover,
body.theme-editorial .keyboard-shortcuts-btn:hover,
body.theme-editorial .mobile-menu-toggle:hover,
body.theme-editorial .filter-dropdown-trigger:hover,
body.theme-editorial .add-client-inline-btn:hover,
body.theme-editorial .view-toggle-btn:hover,
body.theme-editorial .sort-value:hover,
body.theme-editorial .filter-chip:hover,
body.theme-editorial .quick-add-btn:hover,
body.theme-editorial .reports-action-btn:hover,
body.theme-editorial .billing-export-btn:hover,
body.theme-editorial .billing-timer-btn:hover,
body.theme-editorial .billing-sub-tab:hover,
body.theme-editorial .billing-save-btn:hover,
body.theme-editorial .billing-inv-btn:hover,
body.theme-editorial .contact-add-btn:hover,
body.theme-editorial .contact-import-btn:hover,
body.theme-editorial .btn:hover,
body.theme-editorial .btn-primary:hover,
body.theme-editorial .btn-secondary:hover,
body.theme-editorial .action-btn:hover,
body.theme-editorial .filter-btn:hover {
  transform: translateY(-2px) translateZ(0);
  filter: saturate(1.03);
}

body.theme-editorial .header-stat.is-pressed,
body.theme-editorial .nav-tab.is-pressed,
body.theme-editorial .sign-out-btn.is-pressed,
body.theme-editorial .notification-btn.is-pressed,
body.theme-editorial .print-urgent-btn.is-pressed,
body.theme-editorial .keyboard-shortcuts-btn.is-pressed,
body.theme-editorial .mobile-menu-toggle.is-pressed,
body.theme-editorial .filter-dropdown-trigger.is-pressed,
body.theme-editorial .add-client-inline-btn.is-pressed,
body.theme-editorial .view-toggle-btn.is-pressed,
body.theme-editorial .sort-value.is-pressed,
body.theme-editorial .filter-chip.is-pressed,
body.theme-editorial .quick-add-btn.is-pressed,
body.theme-editorial .reports-action-btn.is-pressed,
body.theme-editorial .billing-export-btn.is-pressed,
body.theme-editorial .billing-timer-btn.is-pressed,
body.theme-editorial .billing-sub-tab.is-pressed,
body.theme-editorial .billing-save-btn.is-pressed,
body.theme-editorial .billing-inv-btn.is-pressed,
body.theme-editorial .contact-add-btn.is-pressed,
body.theme-editorial .contact-import-btn.is-pressed,
body.theme-editorial .btn.is-pressed,
body.theme-editorial .btn-primary.is-pressed,
body.theme-editorial .btn-secondary.is-pressed,
body.theme-editorial .action-btn.is-pressed,
body.theme-editorial .filter-btn.is-pressed {
  transform: translateY(1px) scale(0.985) translateZ(0) !important;
  transition-duration: 110ms !important;
}

body.theme-editorial #clientsList .client-card,
body.theme-editorial .client-task-card,
body.theme-editorial .task-item,
body.theme-editorial .task-list-row,
body.theme-editorial .matter-item,
body.theme-editorial .attention-card,
body.theme-editorial .deadline-item,
body.theme-editorial .top-client-item,
body.theme-editorial .billing-stat-card,
body.theme-editorial .risk-heatmap-kpi,
body.theme-editorial .contact-card {
  transition:
    transform var(--fluid-duration-md) var(--fluid-ease-out),
    box-shadow var(--fluid-duration-md) var(--fluid-ease-out),
    border-color var(--fluid-duration-sm) var(--fluid-ease-in-out),
    background-color var(--fluid-duration-sm) var(--fluid-ease-in-out),
    opacity var(--fluid-duration-sm) ease !important;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
}

body.theme-editorial #clientsList .client-card {
  box-shadow: var(--fluid-shadow-card) !important;
}

body.theme-editorial #clientsList .client-card:hover {
  transform: translateY(-5px) scale(1.006) translateZ(0) !important;
  box-shadow: var(--fluid-shadow-card-hover) !important;
}

body.theme-editorial #clientsList .client-card.is-pressed {
  transform: translateY(-1px) scale(0.995) translateZ(0) !important;
}

body.theme-editorial #clientsList .client-card::before,
body.theme-editorial #clientsList .client-card::after,
body.theme-editorial #clientsList .client-card .expand-indicator,
body.theme-editorial #clientsList .client-card .status-badge,
body.theme-editorial #clientsList .client-card .action-btn,
body.theme-editorial #clientsList .client-card .kebab-toggle,
body.theme-editorial #clientsList .client-card .client-name,
body.theme-editorial #clientsList .client-card .client-meta-item {
  transition:
    transform var(--fluid-duration-sm) var(--fluid-ease-out),
    box-shadow var(--fluid-duration-sm) var(--fluid-ease-out),
    border-color var(--fluid-duration-sm) var(--fluid-ease-in-out),
    background-color var(--fluid-duration-sm) var(--fluid-ease-in-out),
    opacity var(--fluid-duration-sm) ease,
    color var(--fluid-duration-xs) ease !important;
}

body.theme-editorial #clientsList .client-card:hover .expand-indicator,
body.theme-editorial #clientsList .client-card:hover .status-badge,
body.theme-editorial #clientsList .client-card:hover .action-btn,
body.theme-editorial #clientsList .client-card:hover .kebab-toggle {
  transform: translateY(-1px) scale(1.03);
}

body.theme-editorial .notification-dropdown,
body.theme-editorial .user-dropdown,
body.theme-editorial .filter-dropdown-menu,
body.theme-editorial .kebab-dropdown {
  transform-origin: top right;
  transition:
    opacity var(--fluid-duration-xs) ease,
    transform var(--fluid-duration-sm) var(--fluid-ease-out),
    visibility var(--fluid-duration-xs) ease !important;
}

body.theme-editorial .quick-add-input-wrapper,
body.theme-editorial .search-container,
body.theme-editorial .contact-search-wrap,
body.theme-editorial .billing-filter-select,
body.theme-editorial .billing-timer-select,
body.theme-editorial .form-input,
body.theme-editorial .task-assign-select,
body.theme-editorial .task-date-input,
body.theme-editorial .popover-date-input {
  transition:
    transform var(--fluid-duration-xs) var(--fluid-ease-out),
    box-shadow var(--fluid-duration-sm) var(--fluid-ease-out),
    border-color var(--fluid-duration-sm) var(--fluid-ease-in-out),
    background-color var(--fluid-duration-sm) var(--fluid-ease-in-out) !important;
}

body.theme-editorial .quick-add-input-wrapper:focus-within,
body.theme-editorial .search-container:focus-within,
body.theme-editorial .contact-search-wrap:focus-within {
  transform: translateY(-1px);
}

body.theme-editorial .tab-content {
  transform-origin: top center;
}

.fluidity-reveal {
  opacity: 0.001;
  transform: translate3d(0, 18px, 0) scale(0.992);
  transition:
    opacity var(--fluid-duration-md) var(--fluid-ease-out),
    transform var(--fluid-duration-lg) var(--fluid-ease-out) !important;
  transition-delay: var(--fluidity-delay, 0ms);
  will-change: transform, opacity;
}

.fluidity-reveal.fluidity-visible {
  opacity: 1;
  transform: none;
}

body.theme-editorial.dark-mode .header,
body.theme-editorial.dark-mode .nav-tabs,
body.theme-editorial.dark-mode #clientsTab .controls.streamlined,
body.theme-editorial.dark-mode #clientsTab .result-count-bar {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28), 0 10px 20px rgba(0, 0, 0, 0.16) !important;
}

body.theme-editorial.dark-mode #clientsTab .client-card,
body.theme-editorial.dark-mode .client-task-card,
body.theme-editorial.dark-mode .task-item,
body.theme-editorial.dark-mode .task-list-row,
body.theme-editorial.dark-mode .matter-item,
body.theme-editorial.dark-mode .attention-card,
body.theme-editorial.dark-mode .deadline-item,
body.theme-editorial.dark-mode .top-client-item,
body.theme-editorial.dark-mode .billing-stat-card,
body.theme-editorial.dark-mode .risk-heatmap-kpi,
body.theme-editorial.dark-mode .contact-card {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(201, 169, 97, 0.12) !important;
}

body.theme-editorial.dark-mode #clientsTab .client-card:hover {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.44), 0 0 0 1px rgba(201, 169, 97, 0.22) !important;
}

@media (hover: none) {
  body.theme-editorial #clientsList .client-card:hover,
  body.theme-editorial .header-stat:hover,
  body.theme-editorial .nav-tab:hover,
  body.theme-editorial .sign-out-btn:hover,
  body.theme-editorial .notification-btn:hover,
  body.theme-editorial .print-urgent-btn:hover,
  body.theme-editorial .keyboard-shortcuts-btn:hover,
  body.theme-editorial .mobile-menu-toggle:hover,
  body.theme-editorial .filter-dropdown-trigger:hover,
  body.theme-editorial .add-client-inline-btn:hover,
  body.theme-editorial .view-toggle-btn:hover,
  body.theme-editorial .sort-value:hover,
  body.theme-editorial .filter-chip:hover,
  body.theme-editorial .quick-add-btn:hover,
  body.theme-editorial .reports-action-btn:hover,
  body.theme-editorial .billing-export-btn:hover,
  body.theme-editorial .billing-timer-btn:hover,
  body.theme-editorial .billing-sub-tab:hover,
  body.theme-editorial .billing-save-btn:hover,
  body.theme-editorial .billing-inv-btn:hover,
  body.theme-editorial .contact-add-btn:hover,
  body.theme-editorial .contact-import-btn:hover,
  body.theme-editorial .btn:hover,
  body.theme-editorial .btn-primary:hover,
  body.theme-editorial .btn-secondary:hover {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fluidity-reveal,
  .fluidity-reveal.fluidity-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  body.theme-editorial .header,
  body.theme-editorial .nav-tabs,
  body.theme-editorial #clientsTab .controls.streamlined,
  body.theme-editorial #clientsTab .result-count-bar,
  body.theme-editorial #clientsList .client-card,
  body.theme-editorial .header-stat,
  body.theme-editorial .nav-tab,
  body.theme-editorial .btn,
  body.theme-editorial .btn-primary,
  body.theme-editorial .btn-secondary,
  body.theme-editorial .action-btn {
    transition-duration: 1ms !important;
  }
}
