/* =====================================================
   SahiHisab — Life System
   "The Photographer's Living Studio"

   Adds choreographed entrance animations, ambient life,
   and micro-interactions across ALL pages.

   Rules:
   - body .class specificity (no !important)
   - Prefixed keyframes: sh-life-*
   - prefers-reduced-motion compliant
   - Mobile-first 375px
   - No conflicts with dashboard-redesign.css
   ===================================================== */


/* ═══════════════════════════════════════════════════════
   0. ANIMATION CUSTOM PROPERTIES
   ═══════════════════════════════════════════════════════ */

:root {
  --sh-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --sh-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sh-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --sh-dur-fast: 200ms;
  --sh-dur-med: 350ms;
  --sh-dur-slow: 500ms;
  --sh-dur-entrance: 450ms;
  --sh-stagger: 50ms;
}


/* ═══════════════════════════════════════════════════════
   1. KEYFRAMES — ENTRANCE
   ═══════════════════════════════════════════════════════ */

@keyframes sh-life-reveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes sh-life-pop {
  from { opacity: 0; transform: scale(0.85); }
  60%  { opacity: 1; transform: scale(1.04); }
  to   { transform: scale(1); }
}

@keyframes sh-life-slide-right {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes sh-life-slide-left {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes sh-life-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes sh-life-grow-x {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes sh-life-draw-down {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}


/* ═══════════════════════════════════════════════════════
   2. KEYFRAMES — CONTINUOUS / AMBIENT
   ═══════════════════════════════════════════════════════ */

@keyframes sh-life-breathe {
  0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
  50%      { box-shadow: 0 4px 16px rgba(0,0,0,0.10); }
}

@keyframes sh-life-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

@keyframes sh-life-pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.35); }
  70%  { box-shadow: 0 0 0 8px rgba(14, 165, 233, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

@keyframes sh-life-attention {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
  50%      { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15); }
}

@keyframes sh-life-success-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
  50%      { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15); }
}

@keyframes sh-life-shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

@keyframes sh-life-icon-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-1.5px) rotate(-2deg); }
  75%      { transform: translateY(1px) rotate(1deg); }
}

@keyframes sh-life-dot-pop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(1); }
}


/* ═══════════════════════════════════════════════════════
   3. GLOBAL — CARDS & CONTAINERS
   ═══════════════════════════════════════════════════════ */

/* All cards get entrance reveal */
body .card,
body .card-glass {
  animation: sh-life-reveal var(--sh-dur-entrance) var(--sh-ease-out) both;
}

/* Stat cards — pop entrance + breathe */
body .stat-card {
  animation: sh-life-pop var(--sh-dur-entrance) var(--sh-ease-spring) both;
}

body .stats-grid .stat-card:nth-child(1) { animation-delay: 0ms; }
body .stats-grid .stat-card:nth-child(2) { animation-delay: 60ms; }
body .stats-grid .stat-card:nth-child(3) { animation-delay: 120ms; }
body .stats-grid .stat-card:nth-child(4) { animation-delay: 180ms; }
body .stats-grid .stat-card:nth-child(5) { animation-delay: 240ms; }
body .stats-grid .stat-card:nth-child(6) { animation-delay: 300ms; }

/* Stat card icon — gentle bob */
body .stat-icon {
  animation: sh-life-icon-bob 3s ease-in-out infinite;
}
body .stat-card:nth-child(2) .stat-icon { animation-delay: 0.5s; }
body .stat-card:nth-child(3) .stat-icon { animation-delay: 1s; }
body .stat-card:nth-child(4) .stat-icon { animation-delay: 1.5s; }

/* Stat card hover */
body .stat-card {
  transition: transform var(--sh-dur-fast) var(--sh-ease-out),
              box-shadow var(--sh-dur-fast) var(--sh-ease-out);
}
body .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
body .stat-card:active {
  transform: scale(0.97);
}


/* ═══════════════════════════════════════════════════════
   4. GLOBAL — BUTTONS & INTERACTIVE
   ═══════════════════════════════════════════════════════ */

/* All buttons — lift on hover, press on tap */
body .btn {
  transition: transform var(--sh-dur-fast) var(--sh-ease-out),
              box-shadow var(--sh-dur-fast) var(--sh-ease-out),
              background-color var(--sh-dur-fast) ease;
}
body .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
body .btn:active {
  transform: scale(0.95) translateY(0);
  box-shadow: none;
  transition-duration: 80ms;
}

/* Primary button — subtle glow on hover */
body .btn-primary:hover {
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.25);
}
body .btn-success:hover {
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}
body .btn-danger:hover {
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

/* Chips — hover bounce */
body .chip {
  transition: transform var(--sh-dur-fast) var(--sh-ease-spring),
              box-shadow var(--sh-dur-fast) ease;
}
body .chip:hover {
  transform: translateY(-1px) scale(1.03);
}

/* Filter pills — bounce active */
body .filter-pill {
  transition: transform var(--sh-dur-fast) var(--sh-ease-spring),
              background-color var(--sh-dur-fast) ease,
              color var(--sh-dur-fast) ease,
              box-shadow var(--sh-dur-fast) ease;
}
body .filter-pill:active {
  transform: scale(0.92);
}
body .filter-pill.active {
  animation: sh-life-pop 300ms var(--sh-ease-spring) both;
}


/* ═══════════════════════════════════════════════════════
   5. GLOBAL — FORM INPUTS
   ═══════════════════════════════════════════════════════ */

body .form-control,
body .form-select {
  transition: border-color var(--sh-dur-fast) ease,
              box-shadow var(--sh-dur-fast) ease,
              transform var(--sh-dur-fast) ease;
}
body .form-control:focus,
body .form-select:focus {
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
  transform: translateY(-1px);
}


/* ═══════════════════════════════════════════════════════
   6. GLOBAL — EMPTY STATES
   ═══════════════════════════════════════════════════════ */

body .empty-state {
  animation: sh-life-reveal 600ms var(--sh-ease-out) both;
}

/* Icon inside empty state floats gently */
body .empty-state .material-symbols-rounded,
body .empty-state span[class*="material"] {
  animation: sh-life-float 3s ease-in-out infinite;
}


/* ═══════════════════════════════════════════════════════
   7. MODALS & SHEETS — ENTRANCE
   ═══════════════════════════════════════════════════════ */

body .modal-overlay {
  animation: sh-life-fade 200ms ease both;
}

body .modal-panel {
  animation: sh-life-reveal 350ms var(--sh-ease-spring) both;
}

body .bottom-sheet-overlay {
  animation: sh-life-fade 200ms ease both;
}

body .bottom-sheet {
  animation: sh-life-reveal 350ms var(--sh-ease-spring) both;
}

/* Quick create — staggered action buttons */
body .quick-create-backdrop {
  animation: sh-life-fade 200ms ease both;
}

body .quick-create-sheet {
  animation: sh-life-reveal 300ms var(--sh-ease-spring) both;
}

body .quick-create-action {
  animation: sh-life-pop 300ms var(--sh-ease-spring) both;
}
body .quick-create-action:nth-child(1) { animation-delay: 30ms; }
body .quick-create-action:nth-child(2) { animation-delay: 60ms; }
body .quick-create-action:nth-child(3) { animation-delay: 90ms; }
body .quick-create-action:nth-child(4) { animation-delay: 120ms; }
body .quick-create-action:nth-child(5) { animation-delay: 150ms; }
body .quick-create-action:nth-child(6) { animation-delay: 180ms; }

body .quick-create-action {
  transition: transform var(--sh-dur-fast) var(--sh-ease-spring),
              box-shadow var(--sh-dur-fast) ease;
}
body .quick-create-action:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}
body .quick-create-action:active {
  transform: scale(0.92);
}


/* ═══════════════════════════════════════════════════════
   8. NOTIFICATIONS — SLIDE & GLOW
   ═══════════════════════════════════════════════════════ */

body .notif-sheet {
  animation: sh-life-slide-left 300ms var(--sh-ease-out) both;
}

body .notif-card {
  animation: sh-life-reveal var(--sh-dur-entrance) var(--sh-ease-out) both;
  transition: transform var(--sh-dur-fast) ease, background var(--sh-dur-fast) ease;
}
body .notif-card:nth-child(1) { animation-delay: 50ms; }
body .notif-card:nth-child(2) { animation-delay: 100ms; }
body .notif-card:nth-child(3) { animation-delay: 150ms; }
body .notif-card:nth-child(4) { animation-delay: 200ms; }
body .notif-card:nth-child(5) { animation-delay: 250ms; }

body .notif-card:hover {
  transform: translateX(3px);
}

/* Unread notification — attention pulse */
body .notif-card.unread {
  animation: sh-life-reveal var(--sh-dur-entrance) var(--sh-ease-out) both,
             sh-life-pulse-ring 2s ease-in-out infinite 1s;
}

/* Notification badge — bounce */
body .notif-badge {
  animation: sh-life-pop 400ms var(--sh-ease-spring) both;
}


/* ═══════════════════════════════════════════════════════
   9. GLOBAL SEARCH — CASCADE RESULTS
   ═══════════════════════════════════════════════════════ */

body .global-search-overlay {
  animation: sh-life-fade 150ms ease both;
}

body .global-search-container {
  animation: sh-life-reveal 250ms var(--sh-ease-out) both;
}

body .search-result-row {
  animation: sh-life-reveal 300ms var(--sh-ease-out) both;
  transition: transform var(--sh-dur-fast) ease, background var(--sh-dur-fast) ease;
}
body .search-result-row:nth-child(1) { animation-delay: 30ms; }
body .search-result-row:nth-child(2) { animation-delay: 60ms; }
body .search-result-row:nth-child(3) { animation-delay: 90ms; }
body .search-result-row:nth-child(4) { animation-delay: 120ms; }
body .search-result-row:nth-child(5) { animation-delay: 150ms; }
body .search-result-row:nth-child(6) { animation-delay: 180ms; }
body .search-result-row:nth-child(7) { animation-delay: 210ms; }
body .search-result-row:nth-child(8) { animation-delay: 240ms; }

body .search-result-row:hover {
  transform: translateX(4px);
}

body .search-section-label {
  animation: sh-life-slide-right 300ms var(--sh-ease-out) both;
}


/* ═══════════════════════════════════════════════════════
   10. SIDEBAR — NAV ITEMS
   ═══════════════════════════════════════════════════════ */

body .nav-item {
  transition: transform var(--sh-dur-fast) var(--sh-ease-out),
              background var(--sh-dur-fast) ease,
              padding-left var(--sh-dur-fast) ease;
  position: relative;
}
body .nav-item:hover {
  transform: translateX(3px);
}
body .nav-item:active {
  transform: scale(0.97);
}

/* Active nav item — left accent slides in */
body .nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary, #0ea5e9);
  animation: sh-life-draw-down 300ms var(--sh-ease-spring) both;
  transform-origin: top;
}

/* Section labels slide in */
body .nav-section-label {
  animation: sh-life-fade 400ms ease both;
}


/* ═══════════════════════════════════════════════════════
   11. PAGE — CALENDAR
   ═══════════════════════════════════════════════════════ */

/* Calendar grid days — cascade entrance */
body .calendar-day {
  animation: sh-life-fade 300ms var(--sh-ease-out) both;
  transition: transform var(--sh-dur-fast) ease,
              background var(--sh-dur-fast) ease,
              box-shadow var(--sh-dur-fast) ease;
}

/* Stagger rows of 7 */
body .calendar-day:nth-child(7n+1) { animation-delay: 30ms; }
body .calendar-day:nth-child(7n+2) { animation-delay: 50ms; }
body .calendar-day:nth-child(7n+3) { animation-delay: 70ms; }
body .calendar-day:nth-child(7n+4) { animation-delay: 90ms; }
body .calendar-day:nth-child(7n+5) { animation-delay: 110ms; }
body .calendar-day:nth-child(7n+6) { animation-delay: 130ms; }
body .calendar-day:nth-child(7n+7) { animation-delay: 150ms; }

/* Additional row delay — multiply by row index */
body .calendar-day:nth-child(n+8)  { animation-delay: calc(var(--sh-stagger) * 2 + 30ms); }
body .calendar-day:nth-child(n+15) { animation-delay: calc(var(--sh-stagger) * 4 + 30ms); }
body .calendar-day:nth-child(n+22) { animation-delay: calc(var(--sh-stagger) * 6 + 30ms); }
body .calendar-day:nth-child(n+29) { animation-delay: calc(var(--sh-stagger) * 8 + 30ms); }
body .calendar-day:nth-child(n+36) { animation-delay: calc(var(--sh-stagger) * 10 + 30ms); }

/* Calendar day hover — lift */
body .calendar-day:hover {
  transform: scale(1.06);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  z-index: 2;
}
body .calendar-day:active {
  transform: scale(0.95);
}

/* Today — expanding ring pulse */
body .calendar-day.today {
  animation: sh-life-fade 300ms var(--sh-ease-out) both,
             sh-life-pulse-ring 2.5s ease-in-out infinite 1s;
}

/* Booking dots — pop in */
body .calendar-dot {
  animation: sh-life-dot-pop 300ms var(--sh-ease-spring) both;
}
body .calendar-dot:nth-child(1) { animation-delay: 200ms; }
body .calendar-dot:nth-child(2) { animation-delay: 280ms; }
body .calendar-dot:nth-child(3) { animation-delay: 360ms; }

/* Day header labels */
body .calendar-day-header {
  animation: sh-life-fade 250ms ease both;
}


/* ═══════════════════════════════════════════════════════
   12. PAGE — CLIENTS
   ═══════════════════════════════════════════════════════ */

/* Client page header */
body .clients-header {
  animation: sh-life-reveal 400ms var(--sh-ease-out) both;
}

body .clients-search {
  animation: sh-life-reveal 400ms var(--sh-ease-out) 100ms both;
}

body .clients-filters {
  animation: sh-life-reveal 350ms var(--sh-ease-out) 150ms both;
}

/* Client cards — waterfall cascade */
body .client-card {
  animation: sh-life-reveal var(--sh-dur-entrance) var(--sh-ease-out) both;
  transition: transform var(--sh-dur-fast) var(--sh-ease-out),
              box-shadow var(--sh-dur-fast) ease;
}

body .clients-cards .client-card:nth-child(1)  { animation-delay: 50ms; }
body .clients-cards .client-card:nth-child(2)  { animation-delay: 100ms; }
body .clients-cards .client-card:nth-child(3)  { animation-delay: 150ms; }
body .clients-cards .client-card:nth-child(4)  { animation-delay: 200ms; }
body .clients-cards .client-card:nth-child(5)  { animation-delay: 250ms; }
body .clients-cards .client-card:nth-child(6)  { animation-delay: 300ms; }
body .clients-cards .client-card:nth-child(7)  { animation-delay: 350ms; }
body .clients-cards .client-card:nth-child(8)  { animation-delay: 400ms; }
body .clients-cards .client-card:nth-child(9)  { animation-delay: 450ms; }
body .clients-cards .client-card:nth-child(10) { animation-delay: 500ms; }

/* Client card hover — lift + avatar scale */
body .client-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
body .client-card:active {
  transform: scale(0.98);
}

body .client-card:hover .client-card-avatar,
body .client-card:hover .client-avatar {
  transform: scale(1.08);
  transition: transform var(--sh-dur-fast) var(--sh-ease-spring);
}

/* Due amounts — red attention pulse */
body .client-balance .amount.due {
  animation: sh-life-attention 2.5s ease-in-out infinite;
  border-radius: 6px;
}

/* Advance/clear — green success glow */
body .client-balance .amount.advance,
body .client-balance .amount.clear {
  animation: sh-life-success-glow 3s ease-in-out infinite;
  border-radius: 6px;
}

/* Total bar at bottom */
body .clients-total-bar {
  animation: sh-life-reveal 400ms var(--sh-ease-out) 300ms both;
}


/* ═══════════════════════════════════════════════════════
   13. PAGE — ORDERS (BOOKINGS)
   ═══════════════════════════════════════════════════════ */

/* Order cards — staggered cascade */
body .order-card {
  animation: sh-life-reveal var(--sh-dur-entrance) var(--sh-ease-out) both;
  transition: transform var(--sh-dur-fast) var(--sh-ease-out),
              box-shadow var(--sh-dur-fast) ease;
}

body .order-card:nth-child(1)  { animation-delay: 40ms; }
body .order-card:nth-child(2)  { animation-delay: 80ms; }
body .order-card:nth-child(3)  { animation-delay: 120ms; }
body .order-card:nth-child(4)  { animation-delay: 160ms; }
body .order-card:nth-child(5)  { animation-delay: 200ms; }
body .order-card:nth-child(6)  { animation-delay: 240ms; }
body .order-card:nth-child(7)  { animation-delay: 280ms; }
body .order-card:nth-child(8)  { animation-delay: 320ms; }
body .order-card:nth-child(9)  { animation-delay: 360ms; }
body .order-card:nth-child(10) { animation-delay: 400ms; }

/* Order card hover */
body .order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
body .order-card:active {
  transform: scale(0.98);
}

/* Status left border — shimmer */
body .order-card[style*="border-left"] {
  position: relative;
}


/* ═══════════════════════════════════════════════════════
   14. PAGE — QUOTATION WIZARD
   ═══════════════════════════════════════════════════════ */

/* Wizard wrap entrance */
body .wizard-wrap {
  animation: sh-life-reveal 400ms var(--sh-ease-out) both;
}

/* Stepper — steps slide in from left */
body .step-item {
  animation: sh-life-slide-right 350ms var(--sh-ease-out) both;
}
body .step-item:nth-child(1) { animation-delay: 0ms; }
body .step-item:nth-child(2) { animation-delay: 50ms; }
body .step-item:nth-child(3) { animation-delay: 100ms; }
body .step-item:nth-child(4) { animation-delay: 150ms; }
body .step-item:nth-child(5) { animation-delay: 200ms; }
body .step-item:nth-child(6) { animation-delay: 250ms; }
body .step-item:nth-child(7) { animation-delay: 300ms; }

/* Step connector — draws from left to right */
body .step-connector {
  transform-origin: left center;
  animation: sh-life-grow-x 500ms var(--sh-ease-out) 200ms both;
}

/* Step number — pop when active */
body .step-item.active .step-number,
body .step-item.completed .step-number {
  animation: sh-life-pop 300ms var(--sh-ease-spring) both;
}

/* Package grid cards — pop in */
body .package-card {
  animation: sh-life-pop 350ms var(--sh-ease-spring) both;
  transition: transform var(--sh-dur-fast) var(--sh-ease-spring),
              box-shadow var(--sh-dur-fast) ease,
              border-color var(--sh-dur-fast) ease;
}
body .package-grid .package-card:nth-child(1) { animation-delay: 50ms; }
body .package-grid .package-card:nth-child(2) { animation-delay: 120ms; }
body .package-grid .package-card:nth-child(3) { animation-delay: 190ms; }
body .package-grid .package-card:nth-child(4) { animation-delay: 260ms; }

body .package-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
body .package-card:active {
  transform: scale(0.96);
}

/* Selected package — celebration pulse */
body .package-card.selected {
  animation: sh-life-pop 300ms var(--sh-ease-spring) both,
             sh-life-success-glow 2s ease-in-out infinite 0.5s;
}

/* Addon cards — grid pop */
body .addon-card {
  animation: sh-life-pop 300ms var(--sh-ease-spring) both;
  transition: transform var(--sh-dur-fast) var(--sh-ease-spring),
              box-shadow var(--sh-dur-fast) ease;
}
body .addon-grid .addon-card:nth-child(1) { animation-delay: 30ms; }
body .addon-grid .addon-card:nth-child(2) { animation-delay: 70ms; }
body .addon-grid .addon-card:nth-child(3) { animation-delay: 110ms; }
body .addon-grid .addon-card:nth-child(4) { animation-delay: 150ms; }
body .addon-grid .addon-card:nth-child(5) { animation-delay: 190ms; }
body .addon-grid .addon-card:nth-child(6) { animation-delay: 230ms; }

body .addon-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* Addon icon — bob on hover */
body .addon-card:hover .addon-icon {
  animation: sh-life-icon-bob 0.6s var(--sh-ease-spring);
}

/* Total bar — slides up from bottom */
body .total-bar {
  animation: sh-life-reveal 400ms var(--sh-ease-spring) 300ms both;
}

/* Total amount — pulse when changes */
body .total-bar-amount {
  transition: transform var(--sh-dur-fast) var(--sh-ease-spring);
}

/* Payment split timeline */
body .split-row {
  animation: sh-life-slide-right 350ms var(--sh-ease-out) both;
}
body .split-row:nth-child(1) { animation-delay: 50ms; }
body .split-row:nth-child(2) { animation-delay: 120ms; }
body .split-row:nth-child(3) { animation-delay: 190ms; }
body .split-row:nth-child(4) { animation-delay: 260ms; }

body .split-dot {
  animation: sh-life-dot-pop 300ms var(--sh-ease-spring) both;
}

/* Wizard body content — reveal on step change */
body .wizard-body {
  animation: sh-life-fade 250ms ease both;
}

/* Wizard section titles */
body .wizard-section-title {
  animation: sh-life-slide-right 350ms var(--sh-ease-out) both;
}


/* ═══════════════════════════════════════════════════════
   15. PAGE — FINANCE
   (Finance tab-specific, complementing finance.css)
   ═══════════════════════════════════════════════════════ */

/* Finance tab content entrance */
body .finance-tab-content {
  animation: sh-life-fade 250ms ease both;
}

/* Summary cards in finance */
body .finance-summary-card,
body [class*="summary"] > .card {
  animation: sh-life-pop 400ms var(--sh-ease-spring) both;
}


/* ═══════════════════════════════════════════════════════
   16. PAGE — RENTALS
   ═══════════════════════════════════════════════════════ */

/* Rental page entrance */
body .rental-page {
  animation: sh-life-fade 300ms ease both;
}

/* Rental rows — waterfall */
body .rental-row {
  animation: sh-life-reveal var(--sh-dur-entrance) var(--sh-ease-out) both;
  transition: transform var(--sh-dur-fast) ease,
              background var(--sh-dur-fast) ease,
              box-shadow var(--sh-dur-fast) ease;
}
body .rental-list .rental-row:nth-child(1)  { animation-delay: 40ms; }
body .rental-list .rental-row:nth-child(2)  { animation-delay: 80ms; }
body .rental-list .rental-row:nth-child(3)  { animation-delay: 120ms; }
body .rental-list .rental-row:nth-child(4)  { animation-delay: 160ms; }
body .rental-list .rental-row:nth-child(5)  { animation-delay: 200ms; }
body .rental-list .rental-row:nth-child(6)  { animation-delay: 240ms; }
body .rental-list .rental-row:nth-child(7)  { animation-delay: 280ms; }
body .rental-list .rental-row:nth-child(8)  { animation-delay: 320ms; }

body .rental-row:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* Overdue rental — red attention pulse */
body .rental-status.overdue {
  animation: sh-life-attention 2s ease-in-out infinite;
  border-radius: 6px;
  padding: 2px 6px;
}

/* Active rental — gentle breathe */
body .rental-status.active {
  animation: sh-life-success-glow 3s ease-in-out infinite;
  border-radius: 6px;
  padding: 2px 6px;
}


/* ═══════════════════════════════════════════════════════
   17. PAGE — ANALYTICS
   ═══════════════════════════════════════════════════════ */

/* Analytics bar fills — grow from left */
body .analytics-bar-fill {
  transform-origin: left center;
  animation: sh-life-grow-x 800ms var(--sh-ease-out) both;
}

/* Stagger bar fills */
body .analytics-bar:nth-child(1) .analytics-bar-fill { animation-delay: 100ms; }
body .analytics-bar:nth-child(2) .analytics-bar-fill { animation-delay: 200ms; }
body .analytics-bar:nth-child(3) .analytics-bar-fill { animation-delay: 300ms; }
body .analytics-bar:nth-child(4) .analytics-bar-fill { animation-delay: 400ms; }
body .analytics-bar:nth-child(5) .analytics-bar-fill { animation-delay: 500ms; }
body .analytics-bar:nth-child(6) .analytics-bar-fill { animation-delay: 600ms; }
body .analytics-bar:nth-child(7) .analytics-bar-fill { animation-delay: 700ms; }
body .analytics-bar:nth-child(8) .analytics-bar-fill { animation-delay: 800ms; }
body .analytics-bar:nth-child(9) .analytics-bar-fill { animation-delay: 900ms; }
body .analytics-bar:nth-child(10) .analytics-bar-fill { animation-delay: 1000ms; }
body .analytics-bar:nth-child(11) .analytics-bar-fill { animation-delay: 1100ms; }
body .analytics-bar:nth-child(12) .analytics-bar-fill { animation-delay: 1200ms; }

/* Analytics bar hover */
body .analytics-bar {
  transition: transform var(--sh-dur-fast) ease;
}
body .analytics-bar:hover {
  transform: scaleY(1.05);
}


/* ═══════════════════════════════════════════════════════
   18. PAGE — COLLECT PAYMENT (PAISA VASOOL)
   ═══════════════════════════════════════════════════════ */

/* Hero — entrance zoom + glow breathe */
body .cp-hero {
  animation: sh-life-pop 500ms var(--sh-ease-spring) both;
}

body .cp-hero-glow {
  animation: sh-life-breathe 4s ease-in-out infinite;
}

body .cp-hero-icon-wrap {
  animation: sh-life-float 3s ease-in-out infinite 0.5s;
}

/* Search — slide in */
body .cp-search-wrap {
  animation: sh-life-reveal 350ms var(--sh-ease-out) 200ms both;
}

/* Client list — waterfall */
body .cp-client-row {
  animation: sh-life-reveal var(--sh-dur-entrance) var(--sh-ease-out) both;
  transition: transform var(--sh-dur-fast) var(--sh-ease-out),
              background var(--sh-dur-fast) ease;
}
body .cp-client-list .cp-client-row:nth-child(1) { animation-delay: 40ms; }
body .cp-client-list .cp-client-row:nth-child(2) { animation-delay: 80ms; }
body .cp-client-list .cp-client-row:nth-child(3) { animation-delay: 120ms; }
body .cp-client-list .cp-client-row:nth-child(4) { animation-delay: 160ms; }
body .cp-client-list .cp-client-row:nth-child(5) { animation-delay: 200ms; }
body .cp-client-list .cp-client-row:nth-child(6) { animation-delay: 240ms; }
body .cp-client-list .cp-client-row:nth-child(7) { animation-delay: 280ms; }
body .cp-client-list .cp-client-row:nth-child(8) { animation-delay: 320ms; }

body .cp-client-row:hover {
  transform: translateX(4px);
}
body .cp-client-row:active {
  transform: scale(0.98);
}

/* Client avatar — hover scale */
body .cp-client-row:hover .cp-avatar {
  transform: scale(1.1);
  transition: transform var(--sh-dur-fast) var(--sh-ease-spring);
}

/* Profile card — reveal */
body .cp-profile-card {
  animation: sh-life-reveal 400ms var(--sh-ease-out) both;
}

body .cp-profile-avatar {
  animation: sh-life-pop 400ms var(--sh-ease-spring) 100ms both;
}

/* Stats row — stagger */
body .cp-stat-item {
  animation: sh-life-pop 350ms var(--sh-ease-spring) both;
}
body .cp-stats-row .cp-stat-item:nth-child(1) { animation-delay: 50ms; }
body .cp-stats-row .cp-stat-item:nth-child(2) { animation-delay: 120ms; }
body .cp-stats-row .cp-stat-item:nth-child(3) { animation-delay: 190ms; }

/* Due stat — red attention */
body .cp-stat-due .cp-stat-value {
  animation: sh-life-attention 2.5s ease-in-out infinite;
  border-radius: 4px;
  display: inline-block;
}

/* Due cards — cascade */
body .cp-due-card {
  animation: sh-life-reveal 350ms var(--sh-ease-out) both;
  transition: transform var(--sh-dur-fast) ease,
              box-shadow var(--sh-dur-fast) ease;
}
body .cp-dues-list .cp-due-card:nth-child(1) { animation-delay: 30ms; }
body .cp-dues-list .cp-due-card:nth-child(2) { animation-delay: 70ms; }
body .cp-dues-list .cp-due-card:nth-child(3) { animation-delay: 110ms; }
body .cp-dues-list .cp-due-card:nth-child(4) { animation-delay: 150ms; }
body .cp-dues-list .cp-due-card:nth-child(5) { animation-delay: 190ms; }

body .cp-due-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Progress bars — grow animation */
body .cp-due-progress-bar {
  transform-origin: left center;
  animation: sh-life-grow-x 700ms var(--sh-ease-out) 400ms both;
}

/* All clear card — celebration */
body .cp-all-clear-card {
  animation: sh-life-pop 500ms var(--sh-ease-spring) both,
             sh-life-success-glow 2.5s ease-in-out infinite 1s;
}

body .cp-all-clear-card .cp-clear-icon {
  animation: sh-life-float 2.5s ease-in-out infinite;
}

/* Schedule pills — pop stagger */
body .cp-sched-pill {
  animation: sh-life-pop 250ms var(--sh-ease-spring) both;
  transition: transform var(--sh-dur-fast) var(--sh-ease-spring);
}
body .cp-schedule-pills .cp-sched-pill:nth-child(1) { animation-delay: 30ms; }
body .cp-schedule-pills .cp-sched-pill:nth-child(2) { animation-delay: 60ms; }
body .cp-schedule-pills .cp-sched-pill:nth-child(3) { animation-delay: 90ms; }
body .cp-schedule-pills .cp-sched-pill:nth-child(4) { animation-delay: 120ms; }
body .cp-schedule-pills .cp-sched-pill:nth-child(5) { animation-delay: 150ms; }

body .cp-sched-pill:hover {
  transform: scale(1.08);
}

/* Overdue pill — attention */
body .cp-sched-pill.overdue {
  animation: sh-life-pop 250ms var(--sh-ease-spring) both,
             sh-life-attention 2s ease-in-out infinite 0.5s;
}

/* Selected bar — slide up */
body .cp-selected-bar {
  animation: sh-life-reveal 300ms var(--sh-ease-spring) both;
}

/* Daily collection cards */
body .cp-daily-card {
  animation: sh-life-reveal 350ms var(--sh-ease-out) both;
  transition: transform var(--sh-dur-fast) ease;
}
body .cp-daily-card:nth-child(1) { animation-delay: 50ms; }
body .cp-daily-card:nth-child(2) { animation-delay: 100ms; }
body .cp-daily-card:nth-child(3) { animation-delay: 150ms; }

body .cp-daily-card:hover {
  transform: translateY(-2px);
}

body .cp-daily-icon {
  animation: sh-life-icon-bob 3s ease-in-out infinite;
}

/* Collect payment empty states */
body .cp-empty-state {
  animation: sh-life-reveal 500ms var(--sh-ease-out) both;
}

body .cp-empty-illustration {
  animation: sh-life-float 3s ease-in-out infinite;
}


/* ═══════════════════════════════════════════════════════
   19. PAGE — WALK-IN ORDERS (SEEDHI BOOKING)
   Inherits wizard animations from section 14
   ═══════════════════════════════════════════════════════ */

/* Walk-in order list items */
body .walk-in-order-card,
body .walk-in-card {
  animation: sh-life-reveal var(--sh-dur-entrance) var(--sh-ease-out) both;
  transition: transform var(--sh-dur-fast) ease,
              box-shadow var(--sh-dur-fast) ease;
}
body .walk-in-order-card:hover,
body .walk-in-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}


/* ═══════════════════════════════════════════════════════
   20. PAGE — PACKAGES
   ═══════════════════════════════════════════════════════ */

/* Package grid — inherits from section 14 quotation */
/* Addon grid — inherits from section 14 quotation */

/* Package tab buttons */
body .packages-tab-bar .btn {
  transition: transform var(--sh-dur-fast) var(--sh-ease-spring),
              background var(--sh-dur-fast) ease,
              box-shadow var(--sh-dur-fast) ease;
}


/* ═══════════════════════════════════════════════════════
   21. ASSISTANTS PAGE
   ═══════════════════════════════════════════════════════ */

/* Assistant cards — cascade */
body .assistant-card {
  animation: sh-life-reveal var(--sh-dur-entrance) var(--sh-ease-out) both;
  transition: transform var(--sh-dur-fast) var(--sh-ease-out),
              box-shadow var(--sh-dur-fast) ease;
}
body .assistant-card:nth-child(1) { animation-delay: 40ms; }
body .assistant-card:nth-child(2) { animation-delay: 90ms; }
body .assistant-card:nth-child(3) { animation-delay: 140ms; }
body .assistant-card:nth-child(4) { animation-delay: 190ms; }
body .assistant-card:nth-child(5) { animation-delay: 240ms; }
body .assistant-card:nth-child(6) { animation-delay: 290ms; }

body .assistant-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
body .assistant-card:active {
  transform: scale(0.97);
}


/* ═══════════════════════════════════════════════════════
   22. SETTINGS PAGE
   ═══════════════════════════════════════════════════════ */

/* Settings tabs — slide entrance */
body .settings-tab {
  animation: sh-life-fade 300ms ease both;
  transition: transform var(--sh-dur-fast) ease, background var(--sh-dur-fast) ease;
}

body .settings-tab:hover {
  transform: translateY(-1px);
}

/* Settings form groups — gentle cascade */
body .settings-section .form-group {
  animation: sh-life-reveal 350ms var(--sh-ease-out) both;
}
body .settings-section .form-group:nth-child(1) { animation-delay: 30ms; }
body .settings-section .form-group:nth-child(2) { animation-delay: 70ms; }
body .settings-section .form-group:nth-child(3) { animation-delay: 110ms; }
body .settings-section .form-group:nth-child(4) { animation-delay: 150ms; }
body .settings-section .form-group:nth-child(5) { animation-delay: 190ms; }

/* Toggle switch — satisfying snap */
body .toggle-track {
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
body .toggle-switch input:checked + .toggle-track {
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}


/* ═══════════════════════════════════════════════════════
   23. TOAST ENHANCEMENT
   ═══════════════════════════════════════════════════════ */

body .toast {
  animation: sh-life-slide-left 350ms var(--sh-ease-spring) both;
}


/* ═══════════════════════════════════════════════════════
   24. SKELETON LOADING — ENHANCED SHIMMER
   ═══════════════════════════════════════════════════════ */

body .skeleton {
  background: linear-gradient(
    90deg,
    var(--gray-50, #f9fafb) 25%,
    rgba(14, 165, 233, 0.04) 50%,
    var(--gray-50, #f9fafb) 75%
  );
  background-size: 200% 100%;
  animation: sh-life-shimmer 1.8s ease-in-out infinite;
}

body .skeleton-card {
  animation: sh-life-reveal 300ms var(--sh-ease-out) both,
             sh-life-shimmer 1.8s ease-in-out infinite;
  background: linear-gradient(
    90deg,
    var(--gray-50, #f9fafb) 25%,
    rgba(14, 165, 233, 0.04) 50%,
    var(--gray-50, #f9fafb) 75%
  );
  background-size: 200% 100%;
}


/* ═══════════════════════════════════════════════════════
   25. BOTTOM NAV — MOBILE TAB BAR
   ═══════════════════════════════════════════════════════ */

body .bottom-nav-item {
  transition: transform var(--sh-dur-fast) var(--sh-ease-spring),
              color var(--sh-dur-fast) ease;
}
body .bottom-nav-item:active {
  transform: scale(0.88);
}

/* Active tab — icon bob */
body .bottom-nav-item.active .material-symbols-rounded {
  animation: sh-life-icon-bob 0.4s var(--sh-ease-spring);
}

/* FAB — continuous breathe */
body .bottom-nav-fab {
  transition: transform var(--sh-dur-fast) var(--sh-ease-spring),
              box-shadow var(--sh-dur-fast) ease;
  animation: sh-life-breathe 3s ease-in-out infinite;
}
body .bottom-nav-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}
body .bottom-nav-fab:active {
  transform: scale(0.9);
}


/* ═══════════════════════════════════════════════════════
   26. HEADER — APP HEADER
   ═══════════════════════════════════════════════════════ */

body .header-icon-btn {
  transition: transform var(--sh-dur-fast) var(--sh-ease-spring),
              background var(--sh-dur-fast) ease;
}
body .header-icon-btn:hover {
  transform: scale(1.08);
}
body .header-icon-btn:active {
  transform: scale(0.9);
}


/* ═══════════════════════════════════════════════════════
   27. DARK MODE ADJUSTMENTS
   ═══════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
  body .stat-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  }
  body .client-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  }
  body .order-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  }
  body .package-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  body .btn:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  }
  body .btn-primary:hover {
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
  }
  body .skeleton,
  body .skeleton-card {
    background: linear-gradient(
      90deg,
      rgba(255,255,255,0.03) 25%,
      rgba(255,255,255,0.06) 50%,
      rgba(255,255,255,0.03) 75%
    );
    background-size: 200% 100%;
  }
  body .quick-create-action:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  }
  body .cp-due-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
}

/* Also handle manual dark mode toggle via class */
body.dark-mode .stat-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
body.dark-mode .client-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
body.dark-mode .order-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
body.dark-mode .package-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
body.dark-mode .btn:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.2); }
body.dark-mode .btn-primary:hover { box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35); }
body.dark-mode .quick-create-action:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.3); }

body.dark-mode .skeleton,
body.dark-mode .skeleton-card {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
}


/* ═══════════════════════════════════════════════════════
   28. PREFERS-REDUCED-MOTION — KILL ALL ANIMATIONS
   ═══════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}
