/* =====================================================
   SahiHisab — Complete Design System
   Sea Blue + White | Glass Effects | Mobile-First
   Photography & Event Studio SaaS
   ===================================================== */

/* ─────────────────────────────────────────────────────
   DESIGN TOKENS
   ───────────────────────────────────────────────────── */

:root {
  /* ── Core HSL Palette ── */
  --background: hsl(200, 40%, 96%);
  --foreground: hsl(210, 50%, 10%);
  --primary: hsl(200, 80%, 44%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(200, 30%, 94%);
  --secondary-foreground: hsl(210, 50%, 20%);
  --muted: hsl(210, 20%, 94%);
  --muted-foreground: hsl(210, 15%, 45%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(210, 50%, 10%);
  --border: hsl(210, 25%, 88%);
  --destructive: hsl(0, 72%, 51%);
  --success: hsl(142, 70%, 45%);
  --warning: hsl(38, 92%, 50%);

  /* ── Extended Sea Blue Scale ── */
  --primary-50: hsl(200, 80%, 97%);
  --primary-100: hsl(200, 70%, 92%);
  --primary-200: hsl(200, 65%, 85%);
  --primary-300: hsl(200, 70%, 72%);
  --primary-400: hsl(200, 75%, 56%);
  --primary-500: hsl(200, 80%, 44%);
  --primary-600: hsl(200, 85%, 37%);
  --primary-700: hsl(200, 85%, 30%);
  --primary-800: hsl(200, 80%, 24%);
  --primary-900: hsl(200, 75%, 18%);
  --primary-950: hsl(205, 80%, 10%);

  /* ── Glass & Glow ── */
  --glass-bg: hsla(0, 0%, 100%, 0.72);
  --glass-border: hsla(210, 25%, 88%, 0.5);
  --glass-blur: blur(16px);
  --glow-primary: hsla(200, 90%, 50%, 0.15);
  --glow-subtle: hsla(200, 40%, 85%, 0.5);

  /* ── Semantic ── */
  --surface: var(--card);
  --surface-muted: var(--muted);
  --text-primary: var(--foreground);
  --text-secondary: var(--muted-foreground);
  --text-muted: hsl(210, 15%, 62%);
  --border-light: hsl(210, 25%, 92%);

  /* ── Status Tints ── */
  --success-light: hsl(142, 60%, 93%);
  --warning-light: hsl(38, 90%, 93%);
  --danger-light: hsl(0, 70%, 95%);
  --info-light: var(--primary-50);

  /* ── Event Colors ── */
  --event-wedding: #C8973E;
  --event-engagement: #D4638F;
  --event-birthday: #7C3AED;
  --event-corporate: hsl(200, 80%, 44%);
  --event-other: hsl(160, 60%, 45%);
  --event-pre-wedding: #F472B6;
  --event-reception: #D4A853;

  /* ── Event Dot Shapes (Accessibility) ── */
  --dot-size: 5px;

  /* ── Missing Semantic Tokens ── */
  --text-tertiary: #94a3b8;
  --danger: var(--destructive);
  --gray-50: hsl(210, 20%, 98%);
  --gray-100: hsl(210, 20%, 96%);
  --gray-200: hsl(210, 20%, 92%);
  --gray-300: hsl(210, 15%, 84%);
  --primary-light: var(--primary-100);
  --hover: hsla(0, 0%, 0%, 0.06);
  --info: hsl(200, 80%, 44%);
  --card-bg: var(--card);

  /* ── Spacing ── */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  --space-4xl: 48px;

  /* ── Radius ── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-xs: 0 1px 2px hsla(210, 40%, 20%, 0.03);
  --shadow-sm: 0 1px 3px hsla(210, 40%, 20%, 0.04),
    0 1px 2px hsla(210, 40%, 20%, 0.03);
  --shadow-md: 0 4px 8px hsla(210, 40%, 20%, 0.04),
    0 2px 4px hsla(210, 40%, 20%, 0.03);
  --shadow-lg: 0 10px 20px hsla(210, 40%, 20%, 0.05),
    0 4px 8px hsla(210, 40%, 20%, 0.03);
  --shadow-xl: 0 20px 40px hsla(210, 40%, 20%, 0.06),
    0 8px 16px hsla(210, 40%, 20%, 0.03);
  --shadow-glow: 0 4px 24px hsla(200, 90%, 50%, 0.12);
  --shadow-card: 0 1px 3px hsla(210, 30%, 20%, 0.04),
    0 0 0 1px hsla(210, 25%, 88%, 0.6);

  /* ── Transitions ── */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Typography ── */
  --font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* ── Layout ── */
  --sidebar-width: 260px;
  --header-height: 60px;
  --bottom-nav-height: 78px;
  --total-bar-height: 64px;
  --content-max-width: 1200px;
}


/* ─────────────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100dvh;
  overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--primary);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--foreground);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}


/* ─────────────────────────────────────────────────────
   LAYOUT — App Shell
   ───────────────────────────────────────────────────── */

.app-shell {
  display: flex;
  min-height: 100dvh;
}


/* ─────────────────────────────────────────────────────
   SIDEBAR (Desktop)
   ───────────────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-width);
  background: var(--primary-950);
  color: var(--primary-foreground);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Hidden on desktop, shown on mobile via media query */
.sidebar-close-btn {
  display: none;
}

.sidebar-brand {
  padding: var(--space-2xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  border-bottom: 1px solid hsla(0, 0%, 100%, 0.06);
}

.sidebar-brand .brand-icon {
  width: 42px;
  height: 42px;
  background: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 2px 10px hsla(200, 90%, 50%, 0.3);
}

.sidebar-brand h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: white;
}

.sidebar-brand small {
  font-size: 0.7rem;
  opacity: 0.4;
  font-weight: 400;
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-lg) var(--space-md);
}

.nav-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: hsla(0, 0%, 100%, 0.28);
  padding: var(--space-lg) var(--space-md) var(--space-sm);
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  color: hsla(0, 0%, 100%, 0.55);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
  position: relative;
}

.nav-item:hover {
  background: hsla(0, 0%, 100%, 0.06);
  color: white;
}

.nav-item.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 24px var(--glow-primary);
}

.nav-item .material-symbols-rounded {
  font-size: 1.25rem;
  font-variation-settings: 'FILL' 0;
}

.nav-item.active .material-symbols-rounded {
  font-variation-settings: 'FILL' 1;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--destructive);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}


/* ─────────────────────────────────────────────────────
   MAIN CONTENT AREA
   ───────────────────────────────────────────────────── */

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}


/* ─────────────────────────────────────────────────────
   HEADER — Glass Effect
   ───────────────────────────────────────────────────── */

.app-header {
  height: var(--header-height);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-2xl);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: var(--space-lg);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-left .page-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.4rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-nav-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.header-nav-btn:hover:not(:disabled) {
  background: var(--secondary);
  color: var(--primary);
}

.header-nav-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.header-nav-btn .material-symbols-rounded {
  font-size: 1.2rem;
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

.header-icon-btn:hover {
  background: var(--secondary);
  color: var(--text-primary);
}

.header-icon-btn .notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--destructive);
  border-radius: 50%;
  border: 2px solid var(--card);
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary-100);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}


/* ─────────────────────────────────────────────────────
   PAGE CONTENT
   ───────────────────────────────────────────────────── */

.page-content {
  flex: 1;
  padding: var(--space-2xl);
  max-width: var(--content-max-width);
  width: 100%;
  margin: 0 auto;
}


/* ─────────────────────────────────────────────────────
   BOTTOM NAVIGATION — Glass (Mobile)
   ───────────────────────────────────────────────────── */

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: hsla(0, 0%, 100%, 0.92);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  min-width: 56px;
}

.bottom-nav-item .material-symbols-rounded {
  font-size: 1.5rem;
  font-variation-settings: 'FILL' 0;
  transition: all var(--transition-fast);
}

.bottom-nav-item.active {
  color: var(--primary);
  position: relative;
}

.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}

.bottom-nav-item.active .material-symbols-rounded {
  font-variation-settings: 'FILL' 1;
}

/* ── Center FAB in bottom nav ── */
.bottom-nav-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 4px 16px hsla(200, 80%, 44%, 0.35),
    0 2px 4px hsla(200, 80%, 44%, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.bottom-nav-fab .material-symbols-rounded {
  font-size: 1.75rem;
  font-variation-settings: 'FILL' 1;
  color: white;
}

.bottom-nav-fab:active {
  transform: translateY(-50%) scale(0.92);
  box-shadow: 0 2px 8px hsla(200, 80%, 44%, 0.3);
}

.bottom-nav-fab.open .material-symbols-rounded {
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}

.bottom-nav-fab .material-symbols-rounded {
  transition: transform 0.25s ease;
}

/* Hide center FAB when total bar is visible */
body:has(.total-bar.visible) .bottom-nav-fab {
  display: none;
}

/* ── Quick Create Bottom Sheet ── */
.quick-create-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.quick-create-backdrop.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.quick-create-sheet {
  position: fixed;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  /* above floating tabbar + safe area */
  left: 14px;
  right: 14px;
  background: var(--card-bg, #fff);
  border-radius: var(--radius-xl);
  z-index: 1001;
  padding: var(--space-md) var(--space-lg) var(--space-xl);
  transform: translateY(calc(100% + 84px));
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.3s ease;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}

.quick-create-sheet.open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.quick-create-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--text-muted);
  opacity: 0.3;
  margin: 0 auto var(--space-lg);
}

.quick-create-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.quick-create-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-md);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  cursor: pointer;
  min-height: 100px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.15s ease;
}

.quick-create-action:active {
  transform: scale(0.96);
  background: var(--primary-50, rgba(59, 130, 246, 0.08));
}

.quick-create-action .material-symbols-rounded {
  font-size: 2.5rem;
  font-variation-settings: 'FILL' 1;
}

.quick-create-action span:last-child {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.2;
}


/* ─────────────────────────────────────────────────────
   CARDS — Glass & Solid
   ───────────────────────────────────────────────────── */

.card {
  background: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

.card-padded {
  padding: var(--space-xl);
}

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

.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.card-body {
  padding: var(--space-xl);
}


/* ─────────────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
  line-height: 1.4;
  min-height: 48px;
}

.btn .material-symbols-rounded {
  font-size: 1.1rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 1px 3px hsla(200, 80%, 44%, 0.2);
}

.btn-primary:hover {
  background: var(--primary-600);
  box-shadow: 0 4px 24px var(--glow-primary);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--primary-100);
  color: var(--primary-700);
}

.btn-secondary:hover {
  background: var(--primary-200);
}

.btn-outline {
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  background: var(--card);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}

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

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

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

.btn-danger:hover {
  background: hsl(0, 72%, 44%);
}

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

.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  min-height: 40px;
  border-radius: var(--radius-sm);
}

.btn-outline.btn-sm {
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1rem;
  min-height: 52px;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

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


/* ─────────────────────────────────────────────────────
   FORM CONTROLS
   ───────────────────────────────────────────────────── */

.form-group {
  margin-bottom: var(--space-xl);
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.01em;
}

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

.form-control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: var(--space-md) var(--space-lg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--foreground);
  background: var(--card);
  transition: all var(--transition-fast);
  min-height: 48px;
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(200, 80%, 44%, 0.1);
}

.form-control:invalid:not(:placeholder-shown) {
  border-color: var(--destructive);
}

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

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* Search Input */
.search-input-wrapper {
  position: relative;
}

.search-input-wrapper .material-symbols-rounded {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.15rem;
}

.search-input-wrapper .form-control {
  padding-left: 40px;
}

/* Select */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%236B7785' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* Toggle Switch */
.toggle-switch {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.toggle-switch input {
  display: none;
}

.toggle-track {
  width: 46px;
  height: 26px;
  background: var(--border);
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.toggle-switch input:checked+.toggle-track {
  background: var(--primary);
}

.toggle-switch input:checked+.toggle-track::after {
  transform: translateX(20px);
}


/* ─────────────────────────────────────────────────────
   CHIPS / TAGS
   ───────────────────────────────────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.chip-primary {
  background: var(--primary-100);
  color: var(--primary-700);
}

.chip-success {
  background: var(--success-light);
  color: hsl(142, 70%, 30%);
}

.chip-warning {
  background: var(--warning-light);
  color: hsl(30, 80%, 30%);
}

.chip-danger {
  background: var(--danger-light);
  color: hsl(0, 72%, 38%);
}

.chip-info {
  background: var(--primary-50);
  color: var(--primary-700);
}


/* ─────────────────────────────────────────────────────
   MODAL & BOTTOM SHEET
   ───────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: hsla(205, 80%, 10%, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

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

.modal-panel {
  background: var(--card);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: min(520px, 92vw);
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.96) translateY(8px);
  transition: transform var(--transition-spring);
}

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

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

.modal-header h3 {
  font-size: 1.08rem;
}

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

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

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

.modal-footer {
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
}

/* Bottom Sheet (Mobile) */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: hsla(205, 80%, 10%, 0.45);
  backdrop-filter: blur(6px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.bottom-sheet-overlay.open {
  opacity: 1;
  visibility: visible;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  max-height: 85dvh;
  overflow-y: auto;
  z-index: 1101;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-sheet.open {
  transform: translateY(0);
}

.bottom-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: var(--space-md) auto var(--space-sm);
}


/* ─────────────────────────────────────────────────────
   TOAST / SNACKBAR
   ───────────────────────────────────────────────────── */

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

.toast {
  background: var(--foreground);
  color: white;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  pointer-events: auto;
  transform: translateX(120%);
  transition: transform var(--transition-normal);
  max-width: 400px;
}

.toast.show {
  transform: translateX(0);
}

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

.toast.toast-warning {
  background: var(--warning);
  color: hsl(30, 80%, 10%);
}

.toast.toast-danger {
  background: var(--destructive);
}

.toast.toast-info {
  background: var(--primary);
}


/* ─────────────────────────────────────────────────────
   WIZARD STEPPER (Quotation Engine)
   ───────────────────────────────────────────────────── */

.wizard-stepper {
  display: flex;
  align-items: center;
  overflow-x: auto;
  padding: var(--space-lg) var(--space-xl);
  gap: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border-light);
  scrollbar-width: none;
}

.wizard-stepper::-webkit-scrollbar {
  display: none;
}

.step-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
  padding: var(--space-xs);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--muted);
  color: var(--muted-foreground);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.step-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.step-connector {
  width: 20px;
  height: 2px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 var(--space-xs);
  border-radius: 1px;
  transition: background var(--transition-fast);
}

.step-item.active .step-number {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px hsla(200, 80%, 44%, 0.12);
}

.step-item.active .step-label {
  color: var(--primary);
}

.step-item.completed .step-number {
  background: var(--success);
  color: white;
}

.step-item.completed .step-label {
  color: var(--foreground);
}

.step-item.completed+.step-connector {
  background: var(--success);
}

/* Wizard Content */
.wizard-body {
  padding: var(--space-2xl);
  flex: 1;
  overflow-y: auto;
  animation: fadeSlideIn 280ms ease;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wizard-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.wizard-section-desc {
  font-size: 0.88rem;
  color: var(--muted-foreground);
  margin-bottom: var(--space-2xl);
}

.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-2xl);
  background: var(--card);
  border-top: 1px solid var(--border-light);
}


/* ─────────────────────────────────────────────────────
   FLOATING TOTAL BAR — Fixed positioning
   Uses display:none/flex (not transform) to avoid ghost bar
   ───────────────────────────────────────────────────── */

.total-bar {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--total-bar-height);
  background: var(--primary-950);
  color: white;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-2xl);
  z-index: 90;
  box-shadow: 0 -4px 24px hsla(205, 80%, 10%, 0.15);
}

.total-bar.visible {
  display: flex;
}

.total-bar-amount {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.total-bar-amount small {
  font-size: 0.75rem;
  opacity: 0.5;
  font-weight: 400;
  margin-right: var(--space-xs);
}

.total-bar .btn {
  background: var(--card);
  color: var(--primary-950);
  font-weight: 700;
}

.total-bar.ping .total-bar-amount {
  animation: pricePing 400ms ease;
}

@keyframes pricePing {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
    color: var(--primary-300);
  }

  100% {
    transform: scale(1);
  }
}


/* ─────────────────────────────────────────────────────
   PACKAGE CARDS
   ───────────────────────────────────────────────────── */

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.package-card {
  background: var(--card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.package-card:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.package-card.selected {
  border-color: var(--primary);
  background: var(--primary-50);
  box-shadow: 0 0 0 3px hsla(200, 80%, 44%, 0.1);
}

.package-card.selected::after {
  content: '';
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-size: 16px;
  background-position: center;
  background-repeat: no-repeat;
}

.package-name {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.package-price {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-md);
}

.package-price small {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

.package-features {
  list-style: none;
}

.package-features li {
  font-size: 0.82rem;
  color: var(--muted-foreground);
  padding: var(--space-xs) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.package-features li .material-symbols-rounded {
  font-size: 1rem;
  color: var(--success);
}


/* ─────────────────────────────────────────────────────
   ADD-ON TOGGLES
   ───────────────────────────────────────────────────── */

.addon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
}

.addon-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.addon-card:hover {
  border-color: var(--primary-300);
}

.addon-card.active {
  border-color: var(--primary);
  background: var(--primary-50);
}

.addon-icon {
  width: 44px;
  height: 44px;
  background: var(--muted);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.addon-card.active .addon-icon {
  background: var(--primary-100);
  color: var(--primary);
}

.addon-info {
  flex: 1;
  min-width: 0;
}

.addon-name {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.addon-price {
  font-size: 0.78rem;
  color: var(--muted-foreground);
}


/* ─────────────────────────────────────────────────────
   ITINERARY ROWS
   ───────────────────────────────────────────────────── */

.itinerary-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.itinerary-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--space-md);
  align-items: end;
  padding: var(--space-lg);
  background: var(--muted);
  border-radius: var(--radius-md);
  position: relative;
}

.itinerary-row .remove-row {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  margin-bottom: 4px;
}

.itinerary-row .remove-row:hover {
  color: var(--destructive);
  background: var(--danger-light);
}


/* ─────────────────────────────────────────────────────
   EXPENSE INPUTS
   ───────────────────────────────────────────────────── */

.expense-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-light);
}

.expense-row:last-child {
  border-bottom: none;
}

.expense-label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-weight: 500;
}

.expense-label .material-symbols-rounded {
  color: var(--text-muted);
}

.expense-input {
  width: 140px;
  text-align: right;
}

@media (max-width: 380px) {
  .expense-input {
    width: 100px;
    font-size: 0.9rem;
  }
}


/* ─────────────────────────────────────────────────────
   PAYMENT PLAN
   ───────────────────────────────────────────────────── */

.plan-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.plan-card {
  padding: var(--space-xl);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.plan-card:hover {
  border-color: var(--primary-300);
}

.plan-card.selected {
  border-color: var(--primary);
  background: var(--primary-50);
}

.plan-card-title {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: var(--space-xs);
}

.plan-card-desc {
  font-size: 0.78rem;
  color: var(--muted-foreground);
}

.split-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.split-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--muted);
  border-radius: var(--radius-md);
}

.split-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.split-info {
  flex: 1;
}

.split-label {
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.split-amount {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}


/* ─────────────────────────────────────────────────────
   REVIEW SUMMARY
   ───────────────────────────────────────────────────── */

.review-section {
  margin-bottom: var(--space-2xl);
}

.review-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-light);
}

.validity-pill {
  padding: 8px 18px;
  border-radius: var(--radius-full, 999px);
  border: 1.5px solid var(--border, #E5E7EB);
  background: var(--card);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  color: var(--text-primary);
  transition: all 0.15s;
}

.validity-pill-active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  font-size: 0.88rem;
}

.review-row .label {
  color: var(--muted-foreground);
}

.review-row .value {
  font-weight: 600;
  text-align: right;
}

.review-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  background: var(--primary-50);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
  border: 1px solid var(--primary-200);
}

.review-total .label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-700);
}

.review-total .value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}


/* ─────────────────────────────────────────────────────
   DASHBOARD
   ───────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.stat-card {
  background: var(--card);
  background: linear-gradient(135deg, var(--card) 0%, color-mix(in srgb, var(--card) 90%, var(--primary) 10%) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border-light);
  border: 1px solid color-mix(in srgb, var(--border-light) 80%, transparent 20%);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  transition: all var(--transition-fast);
  position: relative;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  pointer-events: none;
  border-radius: inherit;
  clip-path: inset(0 0 0 0 round var(--radius-xl));
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.4rem;
}

.stat-icon.blue {
  background: var(--primary-100);
  color: var(--primary);
}

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

.stat-icon.amber {
  background: var(--warning-light);
  color: var(--warning);
}

.stat-icon.red {
  background: var(--danger-light);
  color: var(--destructive);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

/* Quick Actions */
.quick-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
}

.quick-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
  box-shadow: 0 4px 24px var(--glow-primary);
  transform: translateY(-1px);
}

.quick-action-btn .material-symbols-rounded {
  font-size: 1.05rem;
  color: var(--primary);
}


/* ─────────────────────────────────────────────────────
   CALENDAR
   ───────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────
   CALENDAR — Redesigned (3D Sea Blue)
   ───────────────────────────────────────────────────── */

/* 3D Shadow tokens */
:root {
  --cal-shadow-3d:
    0 2px 4px rgba(14, 165, 233, 0.10),
    0 6px 12px rgba(14, 165, 233, 0.14),
    0 14px 28px rgba(14, 165, 233, 0.12),
    0 1px 0px rgba(255, 255, 255, 0.6) inset;
  --cal-shadow-3d-strong:
    0 4px 8px rgba(14, 165, 233, 0.14),
    0 10px 20px rgba(14, 165, 233, 0.18),
    0 20px 40px rgba(14, 165, 233, 0.14),
    0 1px 0px rgba(255, 255, 255, 0.8) inset;
  --cal-shadow-selected:
    0 1px 2px rgba(14, 165, 233, 0.12),
    0 0 0 2px rgba(14, 165, 233, 0.25),
    inset 0 2px 4px rgba(14, 165, 233, 0.10);
  --cal-shine: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 50%);
}

[data-theme="dark"] {
  --cal-shadow-3d:
    0 2px 4px rgba(56, 189, 248, 0.08),
    0 6px 12px rgba(56, 189, 248, 0.10),
    0 14px 28px rgba(0, 0, 0, 0.25),
    0 1px 0px rgba(56, 189, 248, 0.08) inset;
  --cal-shadow-3d-strong:
    0 4px 8px rgba(56, 189, 248, 0.10),
    0 10px 20px rgba(56, 189, 248, 0.14),
    0 20px 40px rgba(0, 0, 0, 0.30),
    0 1px 0px rgba(56, 189, 248, 0.12) inset;
  --cal-shadow-selected:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 0 0 2px rgba(56, 189, 248, 0.30),
    inset 0 2px 4px rgba(0, 0, 0, 0.15);
  --cal-shine: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(56, 189, 248, 0) 50%);
}

/* Card */
body .cal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: calFadeUp 0.45s ease both;
}

/* Header */
body .cal-header {
  padding: 18px 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body .cal-month-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

body .cal-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

body .cal-nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: hsla(200, 80%, 44%, 0.08);
}

body .cal-nav-btn:active {
  transform: scale(0.9);
}

body .cal-month-label {
  min-width: 150px;
  text-align: center;
  user-select: none;
}

body .cal-month-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

body .cal-month-year {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 1px;
}

body .cal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

body .cal-today-btn {
  padding: 7px 18px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px hsla(200, 80%, 44%, 0.3);
}

body .cal-today-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px hsla(200, 80%, 44%, 0.3);
}

/* View Toggle */
body .cal-views {
  display: flex;
  gap: 2px;
  padding: 14px 18px 0;
}

body .cal-view-btn {
  flex: 1;
  padding: 7px 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

body .cal-view-btn:hover {
  color: var(--text-secondary);
  background: var(--muted);
}

body .cal-view-btn.active {
  background: hsla(200, 80%, 44%, 0.08);
  color: var(--primary);
}

body .cal-view-btn .material-symbols-rounded {
  font-size: 16px;
}

/* Legend */
body .cal-legend {
  display: flex;
  gap: 5px;
  padding: 12px 18px 0;
  flex-wrap: wrap;
}

body .cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px 3px 6px;
  border-radius: var(--radius-full);
  font-size: 0.66rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  user-select: none;
}

body .cal-legend-item:hover {
  border-color: currentColor;
}

body .cal-legend-dimmed {
  opacity: 0.3;
}

body .cal-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(14, 165, 233, 0.18);
  flex-shrink: 0;
}

/* Grid */
body .cal-grid-wrap {
  padding: 10px 10px 14px;
}

body .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  border-radius: var(--radius-sm);
  overflow: visible;
}

body .cal-day-header {
  padding: 7px 2px;
  text-align: center;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body .cal-sun {
  color: var(--destructive);
  opacity: 0.7;
}

/* ── 3D Cell ── */
body .cal-cell {
  position: relative;
  min-height: 54px;
  padding: 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  animation: calCellPop 0.3s ease both;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, background 0.15s;
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
  background: var(--card);
  border: 1px solid var(--border);
}

body .cal-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--cal-shine);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
  z-index: 1;
}

body .cal-cell:hover::before {
  opacity: 1;
}

body .cal-cell:hover {
  transform: translateY(-6px) scale(1.08) rotateX(6deg) rotateY(-2deg);
  box-shadow: var(--cal-shadow-3d-strong);
  z-index: 5;
  border-color: var(--primary);
  background: var(--muted);
}

body .cal-cell:active {
  transform: translateY(-2px) scale(1.02) rotateX(2deg);
  box-shadow: var(--cal-shadow-3d);
  transition-duration: 0.08s;
}

body .cal-other {
  opacity: 0.18;
  pointer-events: none;
  border-color: transparent;
  background: transparent;
}

body .cal-other::before {
  display: none;
}

body .cal-today {
  background: var(--primary-50);
  border-color: var(--primary);
  box-shadow: 0 2px 8px hsla(200, 80%, 44%, 0.3);
}

body .cal-today:hover {
  box-shadow: var(--cal-shadow-3d-strong), 0 0 0 2px hsla(200, 80%, 44%, 0.3);
}

body .cal-selected {
  background: hsla(200, 80%, 44%, 0.08);
  border-color: var(--primary);
  box-shadow: var(--cal-shadow-selected);
  transform: translateY(1px) scale(0.98);
}

body .cal-selected::before {
  opacity: 0;
}

body .cal-selected:hover {
  transform: translateY(0) scale(1.0);
  box-shadow: var(--cal-shadow-selected);
}

/* Heat */
body .cal-heat-1 {
  background: var(--primary-50);
}

body .cal-heat-2 {
  background: var(--primary-100);
}

body .cal-heat-3 {
  background: var(--primary-200);
}

body .cal-heat-4 {
  background: var(--primary-300);
}

body .cal-cell-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 2px;
  position: relative;
  z-index: 2;
}

body .cal-today .cal-cell-num {
  background: var(--primary);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  box-shadow: 0 3px 10px hsla(200, 80%, 44%, 0.3);
  animation: calTodayPulse 2.5s ease-in-out infinite;
}

body .cal-cell-dots {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  margin-top: auto;
  position: relative;
  z-index: 2;
}

body .cal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(14, 165, 233, 0.18);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}

body .cal-cell:hover .cal-dot {
  transform: scale(1.6) translateY(-1px);
}

body .cal-cell-overflow {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 6px;
}

body .cal-cell-events {
  display: none;
  flex-direction: column;
  gap: 1px;
  margin-top: 2px;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

body .cal-event-chip {
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1.15;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

body .cal-chip-more {
  color: var(--text-muted);
}

/* ── Agenda ── */
body .cal-agenda {
  padding: 4px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body .cal-agenda-empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
}

body .cal-agenda-empty .material-symbols-rounded {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
}

body .cal-agenda-group {
  animation: calFadeUp 0.35s ease both;
}

body .cal-agenda-date {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 8px 0 5px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

body .cal-today-badge {
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

body .cal-agenda-item {
  display: flex;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
}

body .cal-agenda-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px hsla(200, 80%, 44%, 0.12);
  transform: translateY(-2px);
}

body .cal-agenda-bar {
  width: 4px;
  flex-shrink: 0;
}

body .cal-agenda-body {
  flex: 1;
  padding: 10px 12px;
}

body .cal-agenda-title {
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--text);
  margin-bottom: 3px;
}

body .cal-agenda-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

body .cal-agenda-meta .material-symbols-rounded {
  font-size: 13px;
  color: var(--text-muted);
}

body .cal-agenda-amount {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--success);
}

/* ── Upcoming Strip ── */
body .cal-upcoming {
  margin-top: 14px;
  animation: calFadeUp 0.5s 0.2s ease both;
}

body .cal-upcoming-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

body .cal-upcoming-title .material-symbols-rounded {
  font-size: 17px;
  color: var(--primary);
}

body .cal-upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

body .cal-upcoming-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

body .cal-upcoming-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px hsla(200, 80%, 44%, 0.10);
  transform: translateX(3px);
}

body .cal-upcoming-badge {
  width: 40px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body .cal-upcoming-badge .day {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

body .cal-upcoming-badge .ms {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.7;
}

body .cal-upcoming-info {
  flex: 1;
  min-width: 0;
}

body .cal-upcoming-info .title {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body .cal-upcoming-info .client {
  font-size: 0.68rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body .cal-upcoming-amt {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--success);
  flex-shrink: 0;
}

/* ── Side Panel (Desktop) ── */
body .cal-side-panel {
  width: 0;
  overflow: hidden;
  flex-shrink: 0;
  border-left: 0px solid var(--border);
  padding: 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s, border-width 0.3s, opacity 0.25s;
  opacity: 0;
}

body .cal-panel-open {
  width: 270px;
  padding: 18px;
  border-left-width: 1px;
  opacity: 1;
}

body .cal-panel-inner {
  min-width: 234px;
  animation: calFadeUp 0.25s ease both;
}

body .cal-side-date {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
}

body .cal-side-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

body .cal-side-ev {
  padding: 11px;
  border-radius: var(--radius-sm);
  background: var(--muted);
  border: 1px solid var(--border);
  margin-bottom: 7px;
  cursor: pointer;
  transition: all 0.25s ease;
  animation: calFadeUp 0.25s ease both;
}

body .cal-side-ev:hover {
  border-color: var(--primary);
  background: hsla(200, 80%, 44%, 0.08);
}

body .cal-side-ev-type {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  font-size: 0.65rem;
  font-weight: 600;
}

body .cal-side-ev-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

body .cal-side-ev-title {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 3px;
}

body .cal-side-ev-client {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

body .cal-side-ev-info {
  font-size: 0.7rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 1px;
}

body .cal-side-ev-info .material-symbols-rounded {
  font-size: 12px;
}

/* ── Bottom Sheet (Mobile) ── */
body .cal-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: calFadeIn 0.2s ease;
}

body .cal-sheet {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 420px;
  max-height: 70vh;
  overflow-y: auto;
  animation: calSheetUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

body .cal-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 12px auto 0;
}

body .cal-sheet-head {
  padding: 14px 20px 4px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

body .cal-sheet-sub {
  padding: 0 20px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

body .cal-sheet-content {
  padding: 10px 20px 24px;
}

body .cal-sheet-event {
  display: flex;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 7px;
  cursor: pointer;
  transition: all 0.15s;
}

body .cal-sheet-event:hover {
  border-color: var(--primary);
}

body .cal-sheet-bar {
  width: 4px;
  flex-shrink: 0;
}

body .cal-sheet-body {
  flex: 1;
  padding: 10px 12px;
}

body .cal-sheet-type {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  font-size: 0.66rem;
  font-weight: 600;
}

body .cal-sheet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

body .cal-sheet-client {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text);
}

body .cal-sheet-meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 3px;
}

body .cal-sheet-meta .material-symbols-rounded {
  font-size: 13px;
}

body .cal-sheet-amount {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--success);
}

/* Desktop layout */
body .cal-desktop {
  display: flex;
}

body .cal-desktop .cal-main {
  flex: 1;
}

body .cal-desktop .cal-side-panel {
  display: block;
}

body .cal-desktop .cal-cell {
  min-height: 80px;
  padding: 5px 6px;
}

body .cal-desktop .cal-cell-events {
  display: flex;
}

body .cal-desktop .cal-grid-wrap {
  padding: 10px 14px 14px;
}

/* ── Calendar Animations ── */
@keyframes calFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes calCellPop {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(6px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes calTodayPulse {

  0%,
  100% {
    box-shadow: 0 3px 10px hsla(200, 80%, 44%, 0.3);
  }

  50% {
    box-shadow: 0 3px 18px hsla(200, 80%, 44%, 0.3), 0 0 0 6px hsla(200, 80%, 44%, 0.08);
  }
}

@keyframes calFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes calSheetUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}


/* ─────────────────────────────────────────────────────
   CLIENT LIST / CRM
   ───────────────────────────────────────────────────── */

.client-list {
  display: flex;
  flex-direction: column;
}

.client-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.client-row:hover {
  background: var(--muted);
}

.client-row:active {
  transform: scale(0.98);
  background: var(--primary-50);
  background: color-mix(in srgb, var(--card) 95%, var(--primary) 5%);
}

.client-row:last-child {
  border-bottom: none;
}

.client-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary-100);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.client-info {
  flex: 1;
  min-width: 0;
}

.client-name {
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-phone {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-balance {
  text-align: right;
  flex-shrink: 0;
}

.client-balance .amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
}

.client-balance .amount.due {
  color: var(--destructive);
}

.client-balance .amount.advance {
  color: var(--success);
}

.client-balance .amount.clear {
  color: var(--text-muted);
}

.client-balance .balance-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* ─────────────────────────────────────────────────────
   UTILITIES
   ───────────────────────────────────────────────────── */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--muted-foreground);
}

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

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--destructive);
}

.text-sm {
  font-size: 0.82rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-lg {
  font-size: 1.1rem;
}

.fw-500 {
  font-weight: 500;
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}

.mt-2xl {
  margin-top: var(--space-2xl);
}

.mb-sm {
  margin-bottom: var(--space-sm);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

.mb-2xl {
  margin-bottom: var(--space-2xl);
}

.d-flex {
  display: flex;
}

.d-grid {
  display: grid;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

.hidden {
  display: none !important;
}

/* .sr-only moved to a11y.css */

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-4xl) var(--space-2xl);
}

.empty-state .material-symbols-rounded {
  font-size: 3rem;
  color: var(--border);
  margin-bottom: var(--space-lg);
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Guided Empty States (with CTA button) */
.empty-state-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}

.empty-state-cta .material-symbols-rounded {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0;
}

/* Welcome Screen (new users) */
.dash-welcome {
  padding: 24px 16px;
  max-width: 480px;
  margin: 0 auto;
}

.dash-welcome-header {
  text-align: center;
  margin-bottom: 32px;
}

.dash-welcome-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.dash-welcome-header p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.dash-welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.dash-welcome-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--card);
  cursor: pointer;
  text-align: left;
  transition: transform 0.1s, box-shadow 0.15s;
  min-height: 72px;
}

.dash-welcome-btn:active {
  transform: scale(0.98);
}

.dash-welcome-btn-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-welcome-btn-icon .material-symbols-rounded {
  font-size: 1.6rem;
}

.dash-welcome-btn-text h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.dash-welcome-btn-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
}

.dash-welcome-footer {
  text-align: center;
  padding: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
}

/* Jaldi Order Section */
.jaldi-section {
  margin-bottom: var(--space-lg);
  padding: 0;
}

.jaldi-section h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  padding: 0 4px;
}

.jaldi-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.jaldi-pills::-webkit-scrollbar {
  display: none;
}

.jaldi-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--card);
  cursor: pointer;
  min-width: 80px;
  flex-shrink: 0;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.jaldi-pill:active {
  background: var(--primary-50, rgba(14, 165, 233, 0.08));
  border-color: var(--primary);
}

.jaldi-pill .material-symbols-rounded {
  font-size: 1.4rem;
}

.jaldi-pill span:last-child {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.2;
  white-space: nowrap;
}

/* Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

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

.spinner-overlay {
  position: absolute;
  inset: 0;
  background: hsla(0, 0%, 100%, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: inherit;
}

/* Rupee */
.rupee::before {
  content: '₹';
}


/* ─────────────────────────────────────────────────────
   COLLECT PAYMENT (Paisa Vasool) — Redesigned
   ───────────────────────────────────────────────────── */

/* ── Page container ── */
.cp-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 0 120px;
}

/* ── Hero header with gradient ── */
.cp-hero {
  position: relative;
  padding: 24px 16px 20px;
  margin-bottom: 4px;
  overflow: hidden;
}

.cp-hero-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, hsla(142, 70%, 45%, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cp-hero-content {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.cp-hero-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--success) 0%, hsl(160, 60%, 40%) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px hsla(142, 70%, 45%, 0.25);
}

.cp-hero-icon-wrap .material-symbols-rounded {
  font-size: 1.6rem;
  color: #fff;
}

.cp-hero-title {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
  color: var(--foreground);
}

.cp-hero-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  color: var(--text-secondary);
  margin: 3px 0 0;
}

/* ── Search bar ── */
.cp-search-wrap {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  min-height: 52px;
  gap: 10px;
  transition: border-color .25s, box-shadow .25s, background .25s;
}

.cp-search-wrap:focus-within {
  border-color: var(--border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  background: var(--card);
}

.cp-search-icon {
  font-size: 1.35rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: color .25s;
}

.cp-search-wrap:focus-within .cp-search-icon {
  color: var(--text-primary);
}

.cp-search-input {
  flex: 1;
  border: none;
  background: none;
  padding: 14px 0;
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  outline: none;
  color: var(--foreground);
  min-width: 0;
}

.cp-search-input::placeholder {
  color: var(--text-secondary);
  opacity: .55;
  font-weight: 400;
}

.cp-search-clear {
  background: var(--secondary);
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 50%;
  display: flex;
  width: 32px;
  height: 32px;
  min-width: 32px;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}

.cp-search-clear:hover {
  background: var(--danger);
  color: #fff;
}

.cp-search-clear:active {
  transform: scale(.9);
}

.cp-search-clear .material-symbols-rounded {
  font-size: 1rem;
}

/* ── Body ── */
.cp-body {
  min-height: 200px;
  padding: 0 16px;
}

/* ── Loading state with dots ── */
.cp-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 56px 0;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
}

.cp-loading-dots {
  display: flex;
  gap: 6px;
}

.cp-loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: cpDotPulse .6s ease-in-out infinite alternate;
}

.cp-loading-dots span:nth-child(2) {
  animation-delay: .15s;
}

.cp-loading-dots span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes cpDotPulse {
  0% {
    opacity: .3;
    transform: scale(.8);
  }

  100% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* ── Empty state ── */
.cp-empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}

.cp-empty-illustration {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.cp-empty-illustration .material-symbols-rounded {
  font-size: 2.4rem;
  color: var(--text-muted);
}

.cp-empty-illustration.cp-empty-nope .material-symbols-rounded {
  color: var(--warning);
}

.cp-error .cp-empty-illustration .material-symbols-rounded {
  color: var(--danger);
}

.cp-empty-title {
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0 0 4px;
}

.cp-empty-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Section label ── */
.cp-section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-secondary);
  padding: 12px 4px 6px;
}

/* ── Client search results ── */
.cp-client-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cp-client-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  border-radius: 14px;
  background: var(--card);
  border: 1.5px solid transparent;
  transition: all .2s;
  animation: cpFadeUp .3s ease-out both;
}

.cp-client-row:hover {
  background: var(--primary-50);
  border-color: var(--primary-100);
}

.cp-client-row:active {
  transform: scale(.98);
}

@keyframes cpFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex-shrink: 0;
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: .88rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cp-client-info {
  flex: 1;
  min-width: 0;
}

.cp-client-name {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  color: var(--foreground);
}

.cp-client-phone {
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  color: var(--text-secondary);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cp-client-arrow {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cp-client-arrow .material-symbols-rounded {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* ── Profile card (after selecting client) ── */
.cp-profile-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px hsla(210, 20%, 50%, 0.06);
}

.cp-profile-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.cp-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cp-profile-info {
  flex: 1;
}

.cp-profile-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--foreground);
}

.cp-profile-phone {
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  color: var(--text-secondary);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cp-back-btn {
  background: var(--gray-50);
  border: 1.5px solid var(--border);
  width: 40px;
  height: 40px;
  min-width: 40px;
  cursor: pointer;
  color: var(--foreground);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  flex-shrink: 0;
}

.cp-back-btn:hover {
  background: var(--border);
}

.cp-back-btn:active {
  transform: scale(.92);
}

.cp-back-btn .material-symbols-rounded {
  font-size: 1.15rem;
}

/* ── Stats row ── */
.cp-stats-row {
  display: flex;
  gap: 8px;
}

.cp-stat-item {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  text-align: center;
}

.cp-stat-due {
  background: hsla(0, 72%, 51%, 0.06);
}

.cp-stat-credit {
  background: hsla(142, 70%, 45%, 0.06);
}

.cp-stat-last {
  background: var(--gray-50);
}

.cp-stat-label {
  font-family: 'DM Sans', sans-serif;
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.cp-stat-value {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
}

.cp-stat-due .cp-stat-value {
  color: var(--danger);
}

.cp-stat-credit .cp-stat-value {
  color: var(--success);
}

.cp-stat-last .cp-stat-value {
  color: var(--foreground);
  font-size: .92rem;
}

.cp-stat-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: .68rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

/* ── All clear card ── */
.cp-all-clear-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: hsla(142, 70%, 45%, 0.06);
  border: 1.5px solid hsla(142, 70%, 45%, 0.15);
  border-radius: 16px;
  margin-bottom: 16px;
}

.cp-clear-icon .material-symbols-rounded {
  font-size: 2.4rem;
  color: var(--success);
}

.cp-clear-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  color: var(--success);
  margin: 0;
}

.cp-clear-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  color: var(--text-secondary);
  margin: 2px 0 0;
}


/* ─────────────────────────────────────────────────────
   WALK-IN ORDERS — Wizard & Cards
   ───────────────────────────────────────────────────── */

/* Wizard fixed bottom nav */
.wi-wizard-nav {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  background: var(--card);
  border-top: 1px solid var(--border-light);
  z-index: 20;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

/* Item rows */
.wi-item-row {
  padding: 10px;
  margin-bottom: 8px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border-light);
}

.wi-item-top {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.wi-item-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.wi-item-field label {
  display: block;
  margin-bottom: 2px;
}

/* Progressive disclosure expand section */
.wi-item-expand-toggle {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Per-item status pill (tap target) */
.wi-item-status-pill {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: opacity 0.15s;
}

/* Order card payment row */
.wi-card-payment {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.wi-card-amount {
  font-size: 0.88rem;
}

.wi-card-paid {
  color: var(--success);
}

.wi-card-due {
  color: var(--danger);
  font-weight: 600;
}

/* Filter tabs horizontal scroll */
.wi-filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: var(--space-lg);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  mask-image: linear-gradient(to right, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, black 92%, transparent);
}

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

/* Detail modal action buttons */
.wi-detail-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: flex-end;
  flex-wrap: wrap;
}


/* ─────────────────────────────────────────────────────
   RESPONSIVE — Mobile (<= 768px)
   ───────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1050;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  /* Sidebar close button — mobile only */
  .sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    margin-left: auto;
    -webkit-tap-highlight-color: transparent;
  }

  .sidebar-close-btn:active {
    background: var(--hover);
    transform: scale(0.92);
  }

  /* Sidebar backdrop overlay for mobile */
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1049;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .sidebar-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .main-content {
    margin-left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .bottom-nav {
    display: block;
    height: var(--bottom-nav-height);
  }

  .bottom-nav-item span:last-child {
    font-size: 0.75rem;
  }

  .bottom-nav-fab {
    width: 48px;
    height: 48px;
  }

  .page-content {
    padding: var(--space-lg);
    padding-bottom: calc(var(--bottom-nav-height) + var(--space-xl));
  }

  .total-bar {
    left: 0;
    bottom: var(--bottom-nav-height);
  }

  /* Wizard */
  .wizard-stepper {
    padding: var(--space-md) var(--space-lg);
  }

  /* Walk-in wizard nav sits above bottom-nav */
  .wi-wizard-nav {
    left: 0;
    bottom: var(--bottom-nav-height);
    padding: 10px 16px;
  }

  /* Detail modal: stack action buttons 2-per-row */
  .wi-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .wi-detail-actions .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.82rem;
    min-height: 44px;
    padding: 8px 10px;
  }

  /* Primary action spans full width */
  .wi-detail-actions .btn-primary {
    grid-column: 1 / -1;
  }

  .step-label {
    display: none;
  }

  .step-item.active .step-label {
    display: block;
  }

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

  .wizard-footer {
    padding: var(--space-md) var(--space-lg);
  }

  /* Grids */
  .dash-grid {
    grid-template-columns: 1fr !important;
  }

  .dash-grid>.card[style*="grid-row:1/3"],
  .dash-grid>#miniCalendarSlot,
  .dash-grid>.card[style*="grid-row:2"] {
    grid-row: auto !important;
    grid-column: auto !important;
  }

  #miniCalendarSlot {
    order: 1;
  }

  .dash-grid>.card[style*="grid-row:1/3"] {
    order: 0;
  }

  .dash-grid>.card[style*="grid-row:2"] {
    order: 2;
  }

  .package-grid {
    grid-template-columns: 1fr;
  }

  .addon-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .itinerary-row {
    grid-template-columns: 1fr;
  }

  .plan-options {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Calendar */
  .dash-grid .card .calendar-grid {
    overflow-x: auto;
  }

  /* Phase 6 Calendar Widget Mobile Fixes */
  .mini-cal-day,
  .mini-cal-empty {
    min-width: 40px;
    min-height: 40px;
  }

  .mini-cal-daynum {
    font-size: 12px;
    line-height: 1;
  }

  .calendar-day {
    min-height: 48px;
    padding: var(--space-xs);
  }

  .calendar-day .day-number {
    font-size: 0.75rem;
  }

  /* Toast */
  .toast-container {
    top: auto;
    bottom: calc(var(--bottom-nav-height) + var(--space-xl));
    right: var(--space-lg);
    left: var(--space-lg);
  }

  .toast {
    max-width: 100%;
  }

  /* Modal → Bottom Sheet on mobile */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-panel {
    border-radius: 16px 16px 0 0;
    max-height: 90dvh;
    max-width: 100%;
    transform: translateY(100%);
    transition: transform var(--transition-slow);
    padding-bottom: env(safe-area-inset-bottom);
  }

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

  /* Drag handle indicator for bottom sheet modal */
  .modal-header::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto var(--space-md);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
  }

  .modal-header {
    position: relative;
    padding: var(--space-md) var(--space-lg);
    padding-top: calc(var(--space-xl) + 8px);
  }

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

  .modal-footer {
    padding: var(--space-md) var(--space-lg);
    padding-bottom: calc(var(--space-md) + var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  }

  /* Header */
  .app-header {
    padding: 0 var(--space-lg);
  }

  /* Mobile font size overrides */
  .form-label {
    font-size: 0.85rem;
  }

  .stat-label {
    font-size: 0.82rem;
  }

  .form-hint {
    font-size: 0.78rem;
  }
}


/* ─────────────────────────────────────────────────────
   RESPONSIVE — Small Mobile (<= 480px)
   ───────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: var(--space-sm);
  }

  .stat-card {
    padding: var(--space-md);
  }

  .stat-icon {
    width: 40px;
    height: 40px;
  }

  .stat-icon .material-symbols-rounded {
    font-size: 1.15rem;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .plan-options {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    padding-bottom: var(--space-sm);
    /* Scroll snap for horizontal quick actions */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-right: var(--space-2xl);
  }

  .quick-actions::-webkit-scrollbar {
    display: none;
  }

  /* Scroll snap on each quick action card */
  .quick-action-btn {
    scroll-snap-align: start;
    min-width: 100px;
    flex-shrink: 0;
    font-size: 0.75rem;
    padding: 8px;
  }

  /* Calendar day cells — minimum 44px touch target */
  .calendar-day {
    min-height: 44px;
  }

  .calendar-day .day-number {
    font-size: 0.75rem;
  }

  /* Calendar event dots — larger on small mobile */
  .calendar-dot {
    width: 6px;
    height: 6px;
  }

  /* Modal footer buttons stack vertically on very small screens */
  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }

  /* Client rows tighter */
  .client-row {
    padding: var(--space-md) var(--space-lg);
  }

  /* Card header/body tighter */
  .card-header {
    padding: var(--space-md) var(--space-lg);
  }

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

  /* Quick create sheet compact */
  .quick-create-action {
    padding: var(--space-md);
    min-height: 44px;
  }

  .quick-create-action span:last-child {
    font-size: 0.8rem;
  }

  /* Form groups tighter */
  .form-group {
    margin-bottom: var(--space-md);
  }

  .form-control {
    min-height: 44px;
    padding: var(--space-sm) var(--space-md);
  }

  /* Small mobile font size overrides */
  .form-label {
    font-size: 0.85rem;
  }

  .stat-label {
    font-size: 0.82rem;
  }

  .form-hint {
    font-size: 0.78rem;
  }

  /* Walk-in: item rows stack qty/rate tighter */
  .wi-item-bottom {
    grid-template-columns: 70px 1fr 80px;
    gap: 6px;
  }

  /* Walk-in: detail actions full stack on tiny screens */
  .wi-detail-actions {
    grid-template-columns: 1fr;
  }

  .wi-detail-actions .btn-primary {
    grid-column: auto;
  }

  /* Walk-in: card payment info wraps cleanly */
  .wi-card-payment {
    gap: 6px;
    font-size: 0.78rem;
  }
}


/* ─────────────────────────────────────────────────────
   RESPONSIVE — Ultra-Small Phones (<= 360px)
   ───────────────────────────────────────────────────── */

@media (max-width: 360px) {
  .page-content {
    padding: var(--space-md) !important;
  }

  .modal-panel {
    max-width: 96vw;
  }

  .modal-overlay {
    padding: var(--space-md);
  }

  /* Stack quick-create grid to 2 columns */
  .quick-create-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Stat cards tighter */
  .stat-card-mobile {
    padding: 10px;
    gap: 8px;
  }

  .stat-card-mobile-value {
    font-size: 1rem;
  }

  /* Finance stat cards */
  .finance-stats-grid {
    gap: 6px;
  }

  .finance-stat-card {
    padding: 10px;
  }

  .finance-stat-value {
    font-size: 1.05rem;
  }

  /* Total bar tighter */
  .total-bar {
    padding: 0 var(--space-lg);
  }

  .total-bar-amount {
    font-size: 1.1rem;
  }
}


/* ─────────────────────────────────────────────────────
   RESPONSIVE — Tablet (769px - 1024px)
   Collapsed icon-only sidebar
   ───────────────────────────────────────────────────── */

@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar {
    width: 72px;
  }

  .sidebar .sidebar-brand h1,
  .sidebar .sidebar-brand small,
  .sidebar .nav-section-label,
  .sidebar .step-label,
  .sidebar .nav-item span:not(.material-symbols-rounded):not(.badge) {
    display: none;
  }

  .sidebar .sidebar-brand {
    justify-content: center;
    padding: var(--space-lg);
  }

  .sidebar .nav-item {
    justify-content: center;
    padding: var(--space-md);
  }

  .main-content {
    margin-left: 72px;
  }

  .total-bar {
    left: 72px;
  }

  .wi-wizard-nav {
    left: 72px;
  }
}


/* ─────────────────────────────────────────────────────
   PRINT
   ───────────────────────────────────────────────────── */

@media print {

  .sidebar,
  .bottom-nav,
  .app-header,
  .total-bar,
  .wizard-footer,
  .wi-wizard-nav {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
  }

  .page-content {
    padding: 0 !important;
    max-width: 100% !important;
  }

  body {
    background: white;
  }
}


/* ── Mini Calendar (Dashboard) ─────────────────────── */
.mini-calendar-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--border);
  box-sizing: border-box;
  max-width: 100%;
  overflow: visible;
}

body .color-legend-card {
  padding: 12px;
}

.legend-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.color-legend-card .legend-item {
  padding: 4px 0;
  font-size: 0.8rem;
}

.color-legend-card .legend-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
}

.mini-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.mini-cal-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.mini-cal-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.mini-cal-nav:hover {
  background: var(--primary);
  color: #fff;
}

.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  box-sizing: border-box;
}

.mini-cal-dayname {
  text-align: center;
  font-size: clamp(8px, 1.1vw, 11px);
  font-weight: 600;
  color: var(--text-tertiary);
  padding: 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mini-cal-day,
.mini-cal-empty {
  aspect-ratio: 1 / 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.mini-cal-day {
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  position: relative;
}

.mini-cal-day:hover {
  background: hsla(200, 80%, 44%, 0.08);
  transform: scale(1.05);
}

.mini-cal-day.today {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
}

.mini-cal-day.today:hover {
  background: var(--primary-dark, hsl(200, 80%, 36%));
}

.mini-cal-day.has-events {
  font-weight: 600;
}

.mini-cal-daynum {
  font-size: clamp(9px, 1.5vw, 13px);
  line-height: 1;
  font-weight: 600;
}

.mini-cal-dots {
  display: flex;
  gap: 2px;
  position: absolute;
  bottom: 2px;
}

.mini-cal-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}


/* ── Day Popup Events ─────────────────────────────── */
.day-popup-event {
  transition: background 0.15s, transform 0.1s;
}

.day-popup-event:hover {
  background: hsla(200, 80%, 44%, 0.06) !important;
  transform: translateX(4px);
}

/* Limit day popup event list to scrollable area */
.modal-body:has(.day-popup-event) {
  max-height: 60vh;
  overflow-y: auto;
}

/* Limit visible dots on calendar day to 3 with overflow indicator */
.calendar-day .calendar-dot:nth-child(n+4) {
  display: none;
}

.calendar-day .calendar-dots-overflow {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
}

/* Mini-calendar: limit dots to 3 */
.mini-cal-dots .mini-cal-dot:nth-child(n+4) {
  display: none;
}


/* ── Tooltip System (? icons with Hindi text) ──────── */
.tooltip-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  vertical-align: middle;
  /* Prevent tooltip from stretching grid rows or breaking layout */
  flex-shrink: 0;
  line-height: 0;
}

/* Ensure form-group labels stay inline-flex when tooltip is appended */
.form-group label {
  display: inline-flex !important;
  align-items: center;
  gap: 0;
}

.tooltip-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  flex-shrink: 0;
  transition: background 0.15s;
}

.tooltip-icon:hover {
  background: var(--primary-dark, hsl(200, 80%, 36%));
}

.tooltip-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary, #1a1a2e);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  width: max-content;
  max-width: 240px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1100;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: var(--font-family);
}

.tooltip-icon::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text-primary, #1a1a2e);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1100;
}

.tooltip-icon:hover::after,
.tooltip-icon:hover::before,
.tooltip-icon:focus::after,
.tooltip-icon:focus::before,
.tooltip-icon.tooltip-active::after,
.tooltip-icon.tooltip-active::before {
  opacity: 1;
  visibility: visible;
}


/* ── Plan Cards ───────────────────────────────────── */
.plans-section {
  margin-top: var(--space-2xl);
  text-align: center;
}

.plans-section h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
}

.plans-grid .plan-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.plans-grid .plan-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.plans-grid .plan-card.recommended {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.plan-card .plan-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.plan-card .plan-price {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin: var(--space-sm) 0;
}

.plan-card .plan-price small {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-tertiary);
}

.plan-card .plan-features {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: left;
}

.plan-card .plan-features li {
  padding: 3px 0;
}

.plan-card .plan-features li::before {
  content: '\2713  ';
  color: var(--success);
  font-weight: 700;
}

.plan-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-badge.trial {
  background: hsl(38, 92%, 90%);
  color: hsl(38, 92%, 35%);
}

.plan-badge.starter {
  background: hsl(200, 80%, 90%);
  color: hsl(200, 80%, 30%);
}

.plan-badge.pro {
  background: hsl(142, 70%, 90%);
  color: hsl(142, 70%, 30%);
}

.plan-badge.business {
  background: hsl(270, 70%, 90%);
  color: hsl(270, 70%, 30%);
}


/* ── Mobile Enhancements ──────────────────────────── */
@media (max-width: 768px) {
  .mini-cal-day {
    min-height: 40px;
  }

  .mini-cal-daynum {
    font-size: 0.7rem;
  }

  .mini-cal-dot {
    width: 3px;
    height: 3px;
  }

  .tooltip-icon::after {
    left: auto;
    right: 0;
    transform: none;
    max-width: 200px;
  }

  .tooltip-icon::before {
    left: auto;
    right: 8px;
    transform: none;
  }

  .plans-grid {
    grid-template-columns: 1fr;
  }

  /* Fix stat card overflow */
  .stat-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Quick actions scroll indicator */
  .quick-actions {
    position: relative;
  }

  .quick-actions::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 32px;
    background: linear-gradient(to right, transparent, var(--background));
    pointer-events: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  }
}

@media (max-width: 480px) {
  .mini-cal-day {
    min-height: 36px;
  }

  .mini-cal-dayname {
    font-size: 0.75rem;
  }

  .plan-card {
    padding: var(--space-md);
  }

  .plan-card .plan-price {
    font-size: 1.1rem;
  }

  /* Profile menu plan info */
  .profile-plan-info {
    padding: var(--space-md);
  }
}

/* Total bar + bottom nav stacking — smooth transition instead of jarring hide */
@media (max-width: 768px) {
  .bottom-nav {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.25s ease;
  }

  body:has(.total-bar.visible) .bottom-nav {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
  }
}


/* ── Skip Button (Quotation optional steps) ────────── */
.skip-step-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 10px 20px;
  min-height: 44px;
  min-width: 44px;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.skip-step-btn:hover {
  color: var(--text-secondary);
}


/* ── Subtle Animations ────────────────────────────── */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dash-card,
.mini-calendar-card {
  animation: fadeSlideUp 0.35s ease-out both;
}

.stats-grid>.stat-card,
.plans-grid>.plan-card {
  animation: fadeSlideUp 0.35s ease-out both;
}

.dash-card:nth-child(1) {
  animation-delay: 0s;
}

.dash-card:nth-child(2) {
  animation-delay: 0.06s;
}

.dash-card:nth-child(3) {
  animation-delay: 0.12s;
}

.dash-card:nth-child(4) {
  animation-delay: 0.18s;
}


/* ============================================
   SETTINGS PAGE
   ============================================ */
.settings-page {
  padding: var(--space-lg);
  max-width: 640px;
  margin: 0 auto;
}

.settings-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: var(--space-xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
}

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

.settings-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  min-height: 48px;
  min-width: 72px;
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  border: 1.5px solid var(--border);
  transition: var(--transition-fast);
}

.settings-tab .material-symbols-rounded {
  font-size: 1.25rem;
  line-height: 1;
}

.settings-tab.active {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: 0 4px 12px hsla(200, 90%, 50%, 0.25);
  transform: translateY(-1px);
}

.settings-section {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--border);
}

.settings-section .btn-block {
  margin-top: var(--space-lg);
  min-height: 52px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
  letter-spacing: 0.01em;
}

.settings-section h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: var(--space-lg);
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section h3 .material-symbols-rounded {
  font-size: 1.3rem;
  color: var(--primary);
}

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

.setting-row:last-child {
  border-bottom: none;
}

.setting-label {
  font-size: 1rem;
  color: var(--foreground);
  font-weight: 500;
}

.setting-label small {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 3px;
  font-weight: 400;
}

/* Settings Logo Upload */
.settings-logo-wrap {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.settings-logo-frame {
  position: relative;
  display: inline-flex;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, var(--primary), var(--success));
}

.settings-logo-frame img {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--card);
  border: 3px solid var(--card);
}

.settings-logo-initial {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 2.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--card);
  font-family: var(--font-display);
}

.settings-logo-frame .settings-logo-edit {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.settings-logo-label {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Settings Theme Card */
.settings-theme-card {
  margin-bottom: var(--space-lg);
  padding: var(--space-lg);
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.settings-theme-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-md);
}

.settings-theme-header .material-symbols-rounded {
  font-size: 1.4rem;
  color: var(--primary);
}

.settings-theme-header h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--foreground);
}

.settings-theme-header p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Settings Language Buttons */
.settings-lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.settings-lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 12px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.settings-lang-btn .lang-script {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}

.settings-lang-btn .lang-name {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.settings-lang-btn .lang-check {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 1.1rem;
  color: var(--primary);
  display: none;
}

.settings-lang-btn.active {
  border-color: var(--primary);
  background: var(--primary-50, hsla(200, 90%, 50%, 0.08));
}

.settings-lang-btn.active .lang-check {
  display: block;
}

/* Settings Toggle Switch (scoped to avoid conflict with addon .toggle-switch) */
.settings-section .toggle-switch {
  position: relative;
  width: 56px;
  height: 30px;
  display: inline-block;
  flex-shrink: 0;
}

.settings-section .toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition-fast);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.settings-section .toggle-switch input:checked+.toggle-slider {
  background: var(--success);
}

.settings-section .toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(26px);
}

/* GST Fields slide-down */
.gst-fields {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.gst-fields.visible {
  max-height: 400px;
}

/* ============================================
   RENTAL MODULE
   ============================================ */
.rental-page {
  padding: var(--space-lg);
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
}

.inventory-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--border);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.inventory-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.inventory-card .item-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.inventory-card .item-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.inventory-card .item-rate {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.inventory-card .item-qty {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--primary-50);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: var(--space-sm);
}

.inventory-card .item-qty.low {
  background: hsl(38, 92%, 95%);
  color: var(--warning);
}

.inventory-card .item-qty.out {
  background: hsl(0, 72%, 95%);
  color: var(--destructive);
}

.rental-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.rental-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition-fast);
}

.rental-row:hover {
  border-color: var(--primary);
}

.rental-row .rental-info {
  flex: 1;
  min-width: 0;
}

.rental-row .rental-number {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary);
}

.rental-row .rental-client {
  font-size: 0.85rem;
  color: var(--foreground);
}

.rental-row .rental-dates {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.rental-status {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rental-status.active {
  background: hsl(200, 80%, 92%);
  color: var(--primary);
}

.rental-status.returned {
  background: hsl(142, 70%, 92%);
  color: var(--success);
}

.rental-status.overdue {
  background: hsl(0, 72%, 93%);
  color: var(--destructive);
}

.rental-status.cancelled {
  background: var(--secondary);
  color: var(--text-secondary);
}

/* Mini-Bill Print Styles */
.mini-bill {
  font-family: var(--font-family);
  max-width: 400px;
  margin: 0 auto;
}

.mini-bill-header {
  text-align: center;
  padding-bottom: var(--space-md);
  border-bottom: 2px dashed var(--border);
  margin-bottom: var(--space-md);
}

.mini-bill-header h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.mini-bill table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: var(--space-md) 0;
}

.mini-bill th {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.mini-bill td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

.mini-bill .bill-totals {
  border-top: 2px solid var(--foreground);
  padding-top: var(--space-sm);
}

.mini-bill .bill-totals .row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.85rem;
}

.mini-bill .bill-totals .grand {
  font-weight: 700;
  font-size: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}

@media print {
  .mini-bill {
    max-width: 100%;
  }

  .modal-footer,
  .app-header,
  .sidebar,
  .bottom-nav {
    display: none !important;
  }
}


/* ============================================
   UPGRADE BANNER
   ============================================ */
.upgrade-banner {
  background: linear-gradient(135deg, var(--primary-50), hsl(38, 92%, 95%));
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  margin: var(--space-lg) 0;
}

.upgrade-banner h3 {
  font-family: var(--font-display);
  color: var(--primary-700);
  margin-bottom: var(--space-sm);
}

.upgrade-banner p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

/* ============================================
   RESPONSIVE — Mobile fixes for new features
   ============================================ */
@media (max-width: 768px) {
  .settings-page {
    padding: var(--space-md);
  }

  .settings-tabs {
    gap: 4px;
  }

  .settings-tab {
    padding: 8px 10px;
    min-width: 56px;
    font-size: 0.75rem;
  }

  .settings-section {
    padding: var(--space-lg);
  }

  .theme-toggle-group {
    width: 100%;
  }

  .settings-lang-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .rental-row {
    flex-wrap: wrap;
  }

  .setting-row {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .inventory-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
}


/* =====================================================
   MOBILE UX COMPREHENSIVE FIXES
   All mobile layout, touch, safe-area, and UX fixes
   ===================================================== */


/* ── 1. iOS Form Input Zoom Prevention ──────────────
   iOS Safari zooms in when font-size < 16px on focus.
   Force 16px on all form inputs on mobile.
   ─────────────────────────────────────────────────── */
@media (max-width: 768px) {

  .form-control,
  select,
  textarea,
  .form-select,
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="date"],
  input[type="time"],
  input[type="url"],
  input[type="search"] {
    font-size: 16px !important;
  }
}


/* ── 2. Wizard Stepper Mobile UX ────────────────────
   Gradient fade on edges to indicate scrollability.
   On <480px: hide all labels, smaller step numbers.
   ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .wizard-stepper {
    position: relative;
    /* Gradient fade on edges to hint scrollable content */
    mask-image: linear-gradient(to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%);
    -webkit-mask-image: linear-gradient(to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%);
    padding: var(--space-xs);
    gap: 0;
  }

  .step-number {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  .step-label {
    display: none !important;
  }

  .step-connector {
    width: 12px;
    margin: 0 2px;
  }

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

  .wizard-footer {
    padding: var(--space-md) var(--space-lg);
  }
}


/* ── 3. Quick Actions — Left Fade Indicator ─────────
   Adds left-side gradient fade for scroll awareness.
   ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .quick-actions {
    position: relative;
  }

  .quick-actions::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to left, transparent, var(--background));
    pointer-events: none;
    z-index: 1;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  }
}


/* ── 4. Package/Addon Card Grid — Compact on Phones ─
   Keep 1 col on very small, allow 2 cols on wider phones.
   ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .package-card {
    padding: var(--space-lg);
  }

  .package-price {
    font-size: 1.2rem;
  }

  .addon-card {
    padding: var(--space-md);
  }
}

/* Allow 2 cols on phones wider than 400px */
@media (min-width: 400px) and (max-width: 480px) {
  .package-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .package-card {
    padding: var(--space-md);
  }

  .package-name {
    font-size: 0.88rem;
  }

  .package-price {
    font-size: 1.05rem;
    margin-bottom: var(--space-sm);
  }

  .package-features li {
    font-size: 0.75rem;
    padding: 2px 0;
  }
}


/* ── 5. Table Responsiveness ────────────────────────
   Horizontal scroll wrapper for any table on mobile.
   Add .table-responsive wrapper around tables in JS/HTML.
   ─────────────────────────────────────────────────── */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: -ms-autohiding-scrollbar;
  margin: 0 calc(-1 * var(--space-lg));
  padding: 0 var(--space-lg);
}

.table-responsive table {
  min-width: 500px;
}

@media (max-width: 768px) {
  .table-responsive {
    margin: 0;
    padding: 0;
  }

  .table-responsive table {
    min-width: 100%;
  }
}

/* Mini-bill scroll on mobile */
@media (max-width: 768px) {
  .mini-bill {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mini-bill table {
    min-width: 340px;
  }
}


/* ── 6. Touch Feedback ──────────────────────────────
   Active/pressed states for touch devices using
   @media (hover: none) to target touch-only devices.
   ─────────────────────────────────────────────────── */
@media (hover: none) {

  /* Cards — subtle press-in */
  .card:active,
  .stat-card:active,
  .package-card:active,
  .addon-card:active,
  .plan-card:active,
  .inventory-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  /* Buttons — press effect */
  .btn:active,
  .quick-action-btn:active {
    transform: scale(0.96);
    opacity: 0.85;
    transition: transform 0.1s ease, opacity 0.1s ease;
  }

  /* Bottom nav items */
  .bottom-nav-item:active {
    transform: scale(0.9);
    transition: transform 0.1s ease;
  }

  /* Sidebar nav items */
  .nav-item:active {
    background: hsla(0, 0%, 100%, 0.1);
  }

  /* Client rows */
  .client-row:active {
    background: var(--primary-50);
    transition: background 0.1s ease;
  }

  /* Rental rows */
  .rental-row:active {
    background: var(--primary-50);
    transition: background 0.1s ease;
  }

  /* Calendar day cells */
  .calendar-day:active,
  .mini-cal-day:active {
    background: var(--primary-100);
    transition: background 0.1s ease;
  }

  /* Settings tab */
  .settings-tab:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  /* Remove desktop hover transforms that feel odd on touch */
  .stat-card:hover,
  .package-card:hover,
  .inventory-card:hover {
    transform: none;
  }
}


/* ── 7. Safe Area Handling ──────────────────────────
   Ensure env(safe-area-inset-bottom) on all
   fixed-position bottom elements (notch/gesture bar).
   ─────────────────────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .total-bar {
    padding-bottom: env(safe-area-inset-bottom);
  }

  @media (max-width: 768px) {
    .modal-panel {
      padding-bottom: env(safe-area-inset-bottom);
    }

    .wizard-footer {
      padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
    }

    .total-bar {
      bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    }
  }
}


/* ── 8. Text Overflow / Truncation ──────────────────
   Single-line ellipsis for names, titles in tight spaces.
   Multi-line clamp for descriptions.
   ─────────────────────────────────────────────────── */
.package-name,
.addon-name,
.plan-card-title,
.plan-name,
.rental-client,
.rental-number,
.item-name,
.setting-label,
.stat-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Multi-line truncation (2 lines max) for descriptions */
.wizard-section-desc,
.plan-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Event titles in calendar — single-line truncation */
.calendar-day .event-title,
.day-popup-event .event-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ── 9. Floating Action Button (FAB) ────────────────
   Old standalone FAB replaced by center nav FAB.
   Kept hidden for backward compatibility.
   ─────────────────────────────────────────────────── */
.fab {
  display: none !important;
}


/* ── 10. Smooth Transitions & Animations ────────────
   GPU-accelerated transitions for sidebar, modal, pages.
   ─────────────────────────────────────────────────── */

/* Page content fade-in */
.page-content {
  animation: pageFadeIn 0.25s ease-out;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* GPU hints for animated elements */
@media (max-width: 768px) {
  .modal-panel {
    will-change: transform;
  }

  .modal-overlay {
    will-change: opacity;
  }

  .sidebar {
    will-change: transform;
  }
}


/* ── 11. Login/Register Page Mobile ─────────────────
   Auth card full-width on small phones with margin.
   Plan comparison to 1 column, buttons full-width.
   ─────────────────────────────────────────────────── */
@media (max-width: 480px) {

  .auth-card,
  .login-card,
  .register-card {
    max-width: 100%;
    margin-left: 16px;
    margin-right: 16px;
    border-radius: var(--radius-xl);
  }

  .auth-card .btn,
  .login-card .btn,
  .register-card .btn {
    width: 100%;
  }
}


/* ── 12. Mini Calendar Dots — Larger on Small Mobile ─ */
@media (max-width: 480px) {
  .mini-cal-dot {
    width: 5px;
    height: 5px;
  }

  .mini-cal-day {
    min-height: 40px;
  }
}


/* ── 13. Itinerary/Expense Compact on Small Mobile ── */
@media (max-width: 480px) {
  .itinerary-row {
    padding: var(--space-md);
    gap: var(--space-sm);
  }

  .expense-input {
    width: 100px;
  }

  .split-row {
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-md);
  }
}


/* ── 14. Bottom Nav & Header Touch Targets ──────────
   Ensure all nav items meet 44/48px minimum touch target.
   ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .bottom-nav-item {
    min-height: 48px;
    min-width: 48px;
    justify-content: center;
  }

  .quick-create-action {
    min-height: 48px;
    min-width: 48px;
  }

  .header-icon-btn {
    width: 44px;
    height: 44px;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
  }
}


/* ── 15. Calendar Day-Header on Small Screens ───────
   Shorter day names, smaller padding on <480px.
   ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .calendar-day-header {
    font-size: 0.75rem;
    padding: var(--space-sm);
  }
}


/* ── 16. Toast — Safe Area Aware ────────────────────
   Ensure toast sits above bottom nav + safe area.
   ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .toast-container {
    bottom: calc(var(--bottom-nav-height) + var(--space-xl) + env(safe-area-inset-bottom, 0px));
  }
}


/* ── 17. Profile/Account Menu Mobile ────────────────
   Full-width dropdown on very small screens.
   ─────────────────────────────────────────────────── */
@media (max-width: 480px) {

  .profile-menu,
  .account-menu {
    width: auto;
    left: 16px;
    right: 16px;
  }
}

/* ─────────────────────────────────────────────────────
   18. SMART HINTS & AUTOCOMPLETE
   ───────────────────────────────────────────────────── */

/* Hint dropdown (positioned below input) */
.sh-hints-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 50;
  background: var(--card, #fff);
  border: 1px solid var(--border-light, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  margin-top: 4px;
  overflow: hidden;
  animation: shHintsFadeIn 150ms ease;
}

@keyframes shHintsFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sh-hints-header {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted, #999);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 12px 4px;
}

.sh-hints-item {
  padding: 10px 12px;
  font-size: 0.88rem;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: background 100ms ease;
  border-bottom: 1px solid var(--gray-50, #f9fafb);
}

.sh-hints-item:last-child {
  border-bottom: none;
}

.sh-hints-item:hover,
.sh-hints-item:active {
  background: var(--primary-50, #f0f7ff);
}

/* Amount hint (shown below amount input) */
.sh-amount-hint {
  font-size: 0.75rem;
  color: var(--text-muted, #999);
  padding: 4px 2px;
  font-style: italic;
}

/* Recent clients chip section */
.sh-recent-section {
  margin-bottom: var(--space-lg, 16px);
}

.sh-recent-header {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #999);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.sh-recent-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.sh-recent-chips::-webkit-scrollbar {
  display: none;
}

.sh-recent-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  background: var(--gray-50, #f9fafb);
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: var(--radius-full, 999px);
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  transition: all 150ms ease;
  flex-shrink: 0;
}

.sh-recent-chip:hover,
.sh-recent-chip:active {
  background: var(--primary-50, #f0f7ff);
  border-color: var(--primary-300, #7cc4e8);
}

.sh-chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-100, #d0e8f5);
  color: var(--primary-600, #1a6e9c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sh-chip-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary, #1a2b3c);
}

/* Category hint chip row (for city, payment mode, etc.) */
.sh-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.sh-quick-chip {
  padding: 6px 12px;
  background: var(--gray-50, #f9fafb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-full, 999px);
  cursor: pointer;
  font-size: 0.78rem;
  min-height: 32px;
  display: flex;
  align-items: center;
  transition: all 100ms ease;
}

.sh-quick-chip:hover,
.sh-quick-chip:active {
  background: var(--primary-50, #f0f7ff);
  border-color: var(--primary-300, #7cc4e8);
}

@media (max-width: 480px) {
  .sh-hints-dropdown {
    border-radius: var(--radius-sm, 6px);
  }
}

/* ─── Status Badge Pulse (for overdue) ───────────────── */
@keyframes shBadgePulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.sh-badge-pulse {
  animation: shBadgePulse 1.5s ease-in-out infinite;
}

/* ─── Aaj Ka Summary Card ────────────────────────────── */

/* ─── Phone Lookup Indicator ─────────────────────────── */
.phone-lookup-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-md, 12px);
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 6px;
}

.phone-lookup-status.found {
  background: var(--success-light, #dcfce7);
  color: var(--success, #22c55e);
}

.phone-lookup-status.not-found {
  background: var(--warning-light, #fef3c7);
  color: var(--warning, #f59e0b);
}

.phone-lookup-status button {
  margin-left: auto;
  min-height: 36px;
}


/* ─────────────────────────────────────────────────────
   ADDITIONAL MOBILE OVERFLOW FIXES
   ───────────────────────────────────────────────────── */

/* Modal on very small screens — prevent viewport overflow */
@media (max-width: 480px) {

  .modal-content,
  .sh-modal-content {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Review rows stack vertically on small phones */
  .review-row {
    flex-direction: column;
    gap: 2px;
  }

  .review-row .value {
    text-align: left;
  }
}

/* ─────────────────────────────────────────────────────
   19. ANALYTICS BARS (CSS-only charts)
   ───────────────────────────────────────────────────── */

.analytics-bar {
  width: 100%;
  height: 20px;
  background: var(--muted, #f1f5f9);
  border-radius: 10px;
  overflow: hidden;
}

.analytics-bar-fill {
  height: 100%;
  border-radius: 10px;
  min-width: 0;
  transition: width 0.5s ease;
}

/* Ensure main content is not hidden behind bottom nav */
@media (max-width: 768px) {
  .main-content {
    padding-bottom: 80px !important;
  }
}

/* ── Page Content Entrance Animation ──────────────── */
.page-content>*:first-child {
  animation: fadeSlideUp 0.3s ease-out both;
}

/* ── Loading Skeleton ─────────────────────────────── */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--gray-200) 50%, var(--border-light) 75%);
  background: linear-gradient(90deg, var(--border-light) 25%, color-mix(in srgb, var(--border-light) 60%, transparent 40%) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

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

.skeleton-row {
  height: 56px;
  margin-bottom: 8px;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 14px;
  width: 60%;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 30%;
}

.skeleton-text.long {
  width: 85%;
}

/* ── Notification Badge ── */
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--destructive);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--card);
  pointer-events: none;
}

/* ── Notification Sheet ── */
.notif-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.notif-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.notif-sheet {
  position: fixed;
  z-index: 1002;
  background: var(--card);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}

.notif-sheet.open {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .notif-sheet {
    top: 56px;
    bottom: auto;
    left: auto;
    right: 16px;
    width: 400px;
    max-height: 70vh;
    border-radius: var(--radius-xl);
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.2s, opacity 0.2s;
  }

  .notif-sheet.open {
    transform: translateY(0);
    opacity: 1;
  }
}

.notif-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}

.notif-sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px 24px;
  flex: 1;
}

.notif-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--border-light, var(--border));
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background 0.15s;
  min-height: 48px;
}

.notif-card:hover {
  background: var(--gray-50, var(--secondary));
}

.notif-card:last-child {
  border-bottom: none;
}

.notif-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-card-icon .material-symbols-rounded {
  font-size: 1.2rem;
}

/* Unread notification styling */
.notif-card.unread {
  background: var(--primary-50, #EBF5FB);
  border-left: 3px solid var(--primary);
}

.notif-card.unread .notif-card-icon {
  background: var(--primary);
  color: white;
}

/* ── Global Search Overlay ── */
.global-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.global-search-overlay.open {
  opacity: 1;
}

.global-search-container {
  width: 100%;
  height: 100%;
  background: var(--card);
  display: flex;
  flex-direction: column;
  padding: 16px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
}

@media (min-width: 768px) {
  .global-search-container {
    width: 560px;
    max-height: 70vh;
    height: auto;
    border-radius: var(--radius-2xl);
    margin-top: 80px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  }
}

.global-search-results {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.search-result-section {
  margin-bottom: 16px;
}

.search-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 8px 4px 4px;
}

.search-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
  min-height: 48px;
}

.search-result-row:hover {
  background: var(--gray-50, var(--secondary));
}

.search-result-row:active {
  background: var(--gray-100, var(--muted));
}


/* =====================================================
   PHASE 5 — ACCESSIBILITY & POLISH (T38-T50)
   ===================================================== */


/* ── T38: Focus-Visible Styles for Keyboard Navigation ──
   Shows a clear focus ring ONLY for keyboard users
   (not mouse/touch) using :focus-visible.
   ─────────────────────────────────────────────────────── */

/* (Base :focus-visible is in a11y.css — these extend it for specific elements) */

/* Buttons — pill/rounded focus ring */
.btn:focus-visible,
.quick-action-btn:focus-visible,
.quick-create-action:focus-visible,
.bottom-nav-item:focus-visible,
.bottom-nav-fab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px hsla(200, 80%, 44%, 0.15);
}

/* Nav items in sidebar — light ring for dark bg */
.nav-item:focus-visible {
  outline: 2px solid hsla(0, 0%, 100%, 0.7);
  outline-offset: 2px;
}

/* Form controls — enhance existing focus */
.form-control:focus-visible {
  outline: none;
  /* Uses existing box-shadow ring */
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(200, 80%, 44%, 0.15);
}

/* Cards — subtle ring */
.card:focus-visible,
.stat-card:focus-visible,
.package-card:focus-visible,
.addon-card:focus-visible,
.plan-card:focus-visible,
.inventory-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* Header buttons */
.header-icon-btn:focus-visible,
.header-nav-btn:focus-visible,
.menu-toggle:focus-visible,
.modal-close:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-full);
}

/* Skip to content: styles in a11y.css (.skip-to-content) */


/* ── T39: Color Contrast Fixes ─────────────────────────
   Ensure text meets WCAG AA 4.5:1 contrast ratio.
   ─────────────────────────────────────────────────────── */

/* Muted text was too light — darken */
:root {
  --text-muted-accessible: hsl(210, 15%, 50%);
}

.form-hint,
.text-muted,
.stat-label,
.addon-price,
.plan-card-desc,
.form-label,
.balance-label,
.aaj-summary-label {
  color: var(--text-muted-accessible);
}

/* Warning toast text needs contrast on yellow bg */
.toast.toast-warning {
  color: hsl(30, 80%, 15%);
}

/* Calendar other-month days — increase opacity for readability */
.calendar-day.other-month {
  opacity: 0.45;
}

/* Nav section labels in sidebar — brighter for dark bg */
.nav-section-label {
  color: hsla(0, 0%, 100%, 0.40);
}


/* ── T40: Touch Target Minimums (44px) ─────────────────
   Ensure all interactive elements meet 44×44px minimum.
   ─────────────────────────────────────────────────────── */

/* Small buttons need minimum size */
.btn-sm {
  min-height: 44px;
  min-width: 44px;
}

/* Chip buttons when clickable */
.chip[onclick],
.chip[role="button"],
a.chip {
  min-height: 32px;
  padding: var(--space-sm) var(--space-md);
}

/* Settings toggle */
.toggle-switch {
  min-height: 44px;
}

/* Remove row button */
.itinerary-row .remove-row {
  min-width: 44px;
  min-height: 44px;
}

/* Calendar nav buttons */
.mini-cal-nav {
  min-width: 44px;
  min-height: 44px;
}


/* ── T42: Disabled Button Styles ───────────────────────
   Clear visual distinction for disabled buttons.
   ─────────────────────────────────────────────────────── */

.btn:disabled,
.btn.disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(30%);
  box-shadow: none;
  transform: none !important;
}

/* Disabled form controls */
.form-control:disabled,
.form-select:disabled,
textarea:disabled {
  opacity: 0.5;
  background: var(--muted);
  cursor: not-allowed;
}

/* Double-submit protection — loading state */
.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
}

.btn-secondary.is-loading::after,
.btn-outline.is-loading::after,
.btn-ghost.is-loading::after {
  color: var(--primary);
}


/* ── T43: Print Stylesheet (Enhanced) ──────────────────
   Clean printing for quotations, invoices, reports.
   ─────────────────────────────────────────────────────── */

@media print {

  /* Hide all non-content UI */
  .sidebar,
  .bottom-nav,
  .app-header,
  .total-bar,
  .wizard-footer,
  .wizard-stepper,
  .toast-container,
  .modal-overlay,
  .quick-create-backdrop,
  .quick-create-sheet,
  .notif-sheet-backdrop,
  .notif-sheet,
  .global-search-overlay,
  .sidebar-backdrop,
  .skip-link,
  .fab,
  .header-icon-btn,
  .btn-ghost,
  .no-print {
    display: none !important;
  }

  /* Reset layout */
  .main-content {
    margin-left: 0 !important;
    padding-bottom: 0 !important;
  }

  .page-content {
    padding: 0 !important;
    max-width: 100% !important;
  }

  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
    line-height: 1.4;
  }

  /* Cards without shadows */
  .card,
  .stat-card,
  .review-total {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    break-inside: avoid;
  }

  /* Links show URL */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  a[href^="#"]::after,
  a[href^="javascript"]::after {
    content: none;
  }

  /* Page breaks */
  .review-section,
  .card {
    break-inside: avoid;
  }

  h2,
  h3,
  h4 {
    break-after: avoid;
  }

  /* Remove animations */
  * {
    animation: none !important;
    transition: none !important;
  }
}


/* ── T44: Z-Index Scale (Standardized) ─────────────────
   Documented z-index layers:
   1    — default content
   10   — spinner-overlay
   50   — sticky header, hint dropdowns
   90   — total-bar
   99   — sidebar-backdrop
   100  — sidebar
   999  — floating-tabbar (dashboard-mobile.css)
   1000 — quick-create-backdrop, notif-sheet-backdrop
   1001 — quick-create-sheet, global-search-overlay
   1100 — modal-overlay, bottom-sheet-overlay, tooltips
   1101 — bottom-sheet
   2000 — toast-container
   9999 — skip-link
   ─────────────────────────────────────────────────────── */
/* Modal/bottom-sheet (1100) now properly stacks above
   quick-create (1001) and floating-tabbar (999). */


/* ── T45: Colorblind-Safe Status Colors ────────────────
   Add shape/pattern indicators alongside color to
   help colorblind users distinguish statuses.
   ─────────────────────────────────────────────────────── */

/* Status chips: prepend shape indicator via ::before */
.chip-success::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.chip-warning::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid currentColor;
  flex-shrink: 0;
}

.chip-danger::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: currentColor;
  flex-shrink: 0;
}

/* Rental status badges — distinct shapes */
.rental-status.active::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 4px;
}

.rental-status.returned::before {
  content: '\2713';
  margin-right: 4px;
  font-weight: 700;
}

.rental-status.overdue::before {
  content: '!';
  margin-right: 4px;
  font-weight: 700;
}

.rental-status.cancelled::before {
  content: '\2715';
  margin-right: 4px;
}

/* Calendar dots — already have different shapes (circle, square, triangle) via border-radius.
   Enforced via .calendar-dot.wedding = circle, .engagement = rounded-square, .birthday = ring,
   .corporate = square, .other = diamond. */


/* ── T46: Landscape Layout Fixes ───────────────────────
   Optimize layout when phone is rotated landscape.
   ─────────────────────────────────────────────────────── */

@media (max-height: 500px) and (orientation: landscape) {

  /* Reduce header height */
  .app-header {
    height: 48px;
  }

  /* Compact bottom nav */
  .bottom-nav {
    height: 48px;
  }

  .bottom-nav-item span:last-child {
    display: none;
    /* Hide labels in landscape */
  }

  .bottom-nav-fab {
    width: 40px;
    height: 40px;
    transform: translateY(-40%);
  }

  /* Modal — full width in landscape */
  .modal-panel {
    max-height: 85dvh;
    border-radius: var(--radius-lg);
  }

  /* Reduce page padding */
  .page-content {
    padding: var(--space-md);
    padding-bottom: 56px;
  }

  /* Stats grid — more columns in landscape */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  /* Wizard — smaller stepper */
  .wizard-stepper {
    padding: var(--space-sm) var(--space-md);
  }

  .wizard-body {
    padding: var(--space-md);
  }
}


/* ── T50: Bottom Nav Height Consistency ────────────────
   Ensure bottom nav is always exactly var(--bottom-nav-height)
   and page content accounts for it on mobile.
   ─────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .bottom-nav {
    height: var(--bottom-nav-height);
    min-height: var(--bottom-nav-height);
    max-height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  }

  /* Consistent page content bottom padding */
  .page-content {
    padding-bottom: calc(var(--bottom-nav-height) + var(--space-lg) + env(safe-area-inset-bottom, 0px));
  }
}


/* ─────────────────────────────────────────────────────
   T75: DARK MODE SUPPORT
   ───────────────────────────────────────────────────── */

/* Dark mode via .dark-mode class (manual toggle) */
:root.dark-mode,
body.dark-mode {
  --background: hsl(210, 30%, 8%);
  --foreground: hsl(210, 20%, 90%);
  --card: hsl(210, 25%, 12%);
  --card-foreground: hsl(210, 20%, 90%);
  --border: hsl(210, 20%, 20%);
  --muted: hsl(210, 20%, 16%);
  --muted-foreground: hsl(210, 15%, 55%);
  --secondary: hsl(210, 25%, 16%);
  --secondary-foreground: hsl(210, 20%, 85%);
  --glass-bg: hsla(210, 25%, 12%, 0.85);
  --glass-border: hsla(210, 20%, 25%, 0.5);
  --glow-primary: hsla(200, 90%, 50%, 0.1);
  --glow-subtle: hsla(200, 40%, 20%, 0.5);
  --surface: var(--card);
  --surface-muted: var(--muted);
  --text-primary: var(--foreground);
  --text-secondary: hsl(210, 15%, 55%);
  --text-muted: hsl(210, 15%, 42%);
  --text-tertiary: hsl(210, 12%, 40%);
  --border-light: hsl(210, 20%, 18%);
  --primary-50: hsl(200, 40%, 12%);
  --primary-100: hsl(200, 35%, 16%);
  --primary-200: hsl(200, 30%, 22%);
  --primary-light: var(--primary-100);
  --gray-50: hsl(210, 20%, 10%);
  --gray-100: hsl(210, 20%, 12%);
  --gray-200: hsl(210, 20%, 16%);
  --gray-300: hsl(210, 15%, 22%);
  --hover: hsla(0, 0%, 100%, 0.06);
  --card-bg: var(--card);
  --success-light: hsl(142, 30%, 14%);
  --warning-light: hsl(38, 40%, 14%);
  --danger-light: hsl(0, 30%, 14%);
  --info-light: var(--primary-50);
  color-scheme: dark;
}

/* Dark mode via system preference (when theme is 'system') */
@media (prefers-color-scheme: dark) {
  :root:not(.light-mode) {
    --background: hsl(210, 30%, 8%);
    --foreground: hsl(210, 20%, 90%);
    --card: hsl(210, 25%, 12%);
    --card-foreground: hsl(210, 20%, 90%);
    --border: hsl(210, 20%, 20%);
    --muted: hsl(210, 20%, 16%);
    --muted-foreground: hsl(210, 15%, 55%);
    --secondary: hsl(210, 25%, 16%);
    --secondary-foreground: hsl(210, 20%, 85%);
    --glass-bg: hsla(210, 25%, 12%, 0.85);
    --glass-border: hsla(210, 20%, 25%, 0.5);
    --glow-primary: hsla(200, 90%, 50%, 0.1);
    --glow-subtle: hsla(200, 40%, 20%, 0.5);
    --surface: var(--card);
    --surface-muted: var(--muted);
    --text-primary: var(--foreground);
    --text-secondary: hsl(210, 15%, 55%);
    --text-muted: hsl(210, 15%, 42%);
    --text-tertiary: hsl(210, 12%, 40%);
    --border-light: hsl(210, 20%, 18%);
    --primary-50: hsl(200, 40%, 12%);
    --primary-100: hsl(200, 35%, 16%);
    --primary-200: hsl(200, 30%, 22%);
    --primary-light: var(--primary-100);
    --gray-50: hsl(210, 20%, 10%);
    --gray-100: hsl(210, 20%, 12%);
    --gray-200: hsl(210, 20%, 16%);
    --gray-300: hsl(210, 15%, 22%);
    --hover: hsla(0, 0%, 100%, 0.06);
    --card-bg: var(--card);
    --success-light: hsl(142, 30%, 14%);
    --warning-light: hsl(38, 40%, 14%);
    --danger-light: hsl(0, 30%, 14%);
    --info-light: var(--primary-50);
    color-scheme: dark;
  }
}

/* Theme toggle button group styling */
.theme-toggle-group {
  display: flex;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.theme-toggle-group button {
  flex: 1;
  padding: 10px 16px;
  min-height: 44px;
  border: none;
  background: var(--muted);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.theme-toggle-group button.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.theme-toggle-group button:not(:last-child) {
  border-right: 1px solid var(--border);
}


/* ── T26: Inline Field Validation Errors ─────────────
   Shows error message below the input field.
   ─────────────────────────────────────────────────────── */

.sh-field-error {
  color: var(--destructive);
  font-size: 0.78rem;
  margin-top: 4px;
  font-weight: 500;
  line-height: 1.3;
}

.form-control.field-error,
.form-select.field-error {
  border-color: var(--destructive);
  box-shadow: 0 0 0 2px hsla(0, 72%, 51%, 0.12);
}

.form-control.field-error:focus,
.form-select.field-error:focus {
  border-color: var(--destructive);
  box-shadow: 0 0 0 3px hsla(0, 72%, 51%, 0.15);
}


/* ── T34: Lazy Loading Fade-in ───────────────────────
   Smooth appearance when lazy-loaded images arrive.
   JS adds .loaded class via onload; transition handles the fade.
   ─────────────────────────────────────────────────────── */

img[loading="lazy"] {
  transition: opacity 0.3s ease;
}

/* ── Package Accordion ────────────────────────────── */
.pkg-accordion {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pkg-acc-section {
  transition: all .2s ease;
}

.pkg-acc-header:hover {
  filter: brightness(.97);
}

/* ── Pagination Component ──────────────────────────── */
.sh-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.sh-pg-btn {
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--card-bg, #fff);
  color: var(--text);
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.sh-pg-btn:hover:not(.disabled):not(.active) {
  background: var(--primary-light, #e8f0fe);
  border-color: var(--primary);
}

.sh-pg-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}

.sh-pg-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sh-pg-dots {
  padding: 0 4px;
  color: var(--text-light);
}

.sh-pg-info {
  font-size: 12px;
  color: var(--text-light);
  margin-left: 8px;
}


/* =====================================================
   MOBILE HORIZONTAL OVERFLOW FIXES
   Fix actual sizing issues — no overflow-x:clip band-aids
   ===================================================== */

@media (max-width: 768px) {

  /* Long text truncation */
  .stat-value,
  .finance-stat-value {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .activity-row .client-phone {
    max-width: 100%;
    overflow: visible;
    white-space: normal;
    font-size: 0.8rem;
  }

  .wi-card-meta {
    max-width: 100%;
    overflow: hidden;
  }

  /* Phase 9 Calendar Widget Mobile Fixes */
  body .dash-grid .card .calendar-grid,
  body .dash-grid .card,
  body .mini-calendar-card {
    overflow: visible;
    width: 99%;
  }

  /* Phase 12 Calendar + Legend Mobile Stacking */
  body .hide-mobile,
  body .calendar-legend-wrap {
    flex-direction: column;
  }

  body #miniCalendarSlot,
  body .color-legend-card {
    width: 100%;
  }

  body #miniCalendarSlot {
    order: 1;
  }

  body .color-legend-card {
    order: 2;
  }

  body .mini-cal-day,
  body .mini-cal-empty {
    aspect-ratio: 1 / 1;
    min-width: 0;
    min-height: 0;
  }

  /* Phase 13 Final 375px Sub-element Polish */
  body .mini-calendar-card {
    padding: 8px;
  }

  body .color-legend-card .legend-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
  }

  body .activity-row {
    padding-right: 8px;
  }

  body .activity-time {
    flex-shrink: 0;
    font-size: 0.7rem;
    white-space: nowrap;
  }
}

/* ─────────────────────────────────────────────────────
   PHASE 8 — QUICK ACTIONS ENTRANCE ANIMATIONS
   ───────────────────────────────────────────────────── */

.quick-actions {
  margin-top: 24px;
}

@keyframes gentleFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(14, 165, 233, 0.0);
  }
}

.quick-action-btn {
  animation: gentleFloat 2.5s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-action-btn:hover {
  animation: pulseGlow 0.6s ease-out;
  transform: translateY(-4px);
}

.quick-action-btn:nth-child(1) {
  animation-delay: 0.0s;
}

.quick-action-btn:nth-child(2) {
  animation-delay: 0.2s;
}

.quick-action-btn:nth-child(3) {
  animation-delay: 0.4s;
}

.quick-action-btn:nth-child(4) {
  animation-delay: 0.6s;
}

.quick-action-btn:nth-child(5) {
  animation-delay: 0.8s;
}

.quick-action-btn:nth-child(6) {
  animation-delay: 1.0s;
}

/* ─── Collect Payment: Installment Schedule Pills ─── */
.cp-schedule-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.cp-sched-loading {
  font-size: 0.72rem;
  color: var(--text-muted, #9ca3af);
}

.cp-sched-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
}

.cp-sched-pill.paid {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.cp-sched-pill.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.cp-sched-pill.overdue {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

/* ─── Collect Payment: Daily Collection Summary ─── */
.cp-daily-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, hsl(200, 80%, 18%) 0%, hsl(220, 60%, 12%) 100%);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 16px;
  color: #fff;
  box-shadow: 0 4px 20px hsla(200, 80%, 20%, 0.25);
}

.cp-daily-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: hsla(0, 0%, 100%, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cp-daily-icon .material-symbols-rounded {
  font-size: 1.4rem;
  color: hsl(142, 70%, 60%);
}

.cp-daily-content {
  flex: 1;
}

.cp-daily-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.65;
  margin-bottom: 4px;
}

.cp-daily-total {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.cp-daily-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cp-daily-pill {
  background: hsla(0, 0%, 100%, 0.1);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  display: flex;
  gap: 5px;
  align-items: center;
}

.cp-daily-pill .material-symbols-rounded {
  font-size: 0.85rem;
  opacity: 0.7;
}

.cp-daily-pill strong {
  font-weight: 700;
}

/* ─── Dues Section ─── */
.cp-dues-section {
  margin-top: 8px;
  margin-bottom: 16px;
}

.cp-section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 10px;
}

.cp-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  color: var(--foreground);
}

.cp-section-title .material-symbols-rounded {
  font-size: 1.15rem;
  color: var(--primary);
}

.cp-dues-badge {
  background: var(--danger);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  min-width: 24px;
  text-align: center;
}

/* ─── Dues list & cards ─── */
.cp-dues-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cp-select-all-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: 14px;
  margin-bottom: 4px;
  font-size: 0.88rem;
}

.cp-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
}

.cp-checkbox-label input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--primary);
  cursor: pointer;
}

.cp-dues-total-badge {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-weight: 800;
  font-size: .95rem;
  color: var(--danger);
}

/* Individual due card */
.cp-due-card {
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--card);
  transition: all .2s;
  animation: cpFadeUp .3s ease-out both;
}

.cp-due-card:has(input:checked) {
  border-color: var(--primary);
  background: hsla(200, 80%, 44%, 0.04);
  box-shadow: 0 0 0 3px hsla(200, 80%, 44%, 0.06);
}

.cp-due-card-ob {
  border: 1.5px dashed var(--warning);
  background: hsla(38, 92%, 50%, 0.04);
}

.cp-due-card-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  cursor: pointer;
  width: 100%;
}

.cp-due-cb-wrap {
  flex-shrink: 0;
}

.cp-due-cb-wrap input[type="checkbox"] {
  width: 24px;
  height: 24px;
  min-width: 24px;
  accent-color: var(--primary);
  cursor: pointer;
}

.cp-due-type-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cp-due-type-icon .material-symbols-rounded {
  font-size: 1.15rem;
}

.cp-due-details {
  flex: 1;
  min-width: 0;
}

.cp-due-name {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-due-date {
  font-family: 'DM Sans', sans-serif;
  font-size: .72rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}

.cp-due-progress-wrap {
  margin-top: 5px;
}

.cp-due-progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 3px;
  width: 100%;
  max-width: 120px;
}

.cp-due-progress-bar {
  height: 100%;
  border-radius: 2px;
  transition: width .6s ease-out;
}

.cp-due-progress-text {
  font-family: 'DM Sans', sans-serif;
  font-size: .72rem;
  color: var(--text-secondary);
}

.cp-due-waived {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
  font-size: .72rem;
  color: var(--warning);
  font-weight: 500;
}

.cp-due-amount-col {
  text-align: right;
  flex-shrink: 0;
}

.cp-due-balance-amt {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-weight: 800;
  color: var(--danger);
  font-size: .95rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 70px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.cp-due-baaki-label {
  font-family: 'DM Sans', sans-serif;
  font-size: .65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .3px;
}

.cp-inline-edit {
  width: 80px;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
  padding: 6px 8px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--card);
  color: var(--foreground);
}

/* ─── Payment form card ─── */
.cp-pay-card {
  margin-top: 16px;
  padding: 18px;
  background: var(--card);
  border-radius: 20px;
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 12px hsla(210, 20%, 50%, 0.06);
}

.cp-pay-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  color: var(--foreground);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.cp-pay-card-header .material-symbols-rounded {
  font-size: 1.2rem;
  color: var(--primary);
}

/* Selected summary bar */
.cp-selected-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--primary-50);
  border-radius: 12px;
  border: 1px solid var(--primary-100);
}

.cp-sel-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cp-sel-info .material-symbols-rounded {
  font-size: 1rem;
  color: var(--primary);
}

.cp-sel-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.cp-sel-amount {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
}

/* Credit toggle */
.cp-credit-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  cursor: pointer;
  background: hsla(142, 70%, 45%, 0.06);
  border-radius: 12px;
  border: 1px solid hsla(142, 70%, 45%, 0.12);
}

.cp-credit-toggle input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--success);
  cursor: pointer;
}

.cp-credit-toggle-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: var(--success);
}

/* Amount input with prefix */
.cp-amount-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--gray-50);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 0 4px 0 0;
  margin-bottom: 12px;
  transition: border-color .2s, box-shadow .2s;
}

.cp-amount-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px hsla(200, 80%, 44%, 0.08);
}

.cp-amount-prefix {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-secondary);
  padding: 12px 6px 12px 16px;
  flex-shrink: 0;
  user-select: none;
}

.cp-amount-field {
  flex: 1;
  border: none;
  background: none;
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  padding: 14px 10px;
  outline: none;
  color: var(--foreground);
  min-width: 0;
}

.cp-amount-field::placeholder {
  color: var(--text-muted);
  opacity: .5;
}

/* Quick chips */
.cp-quick-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.cp-quick-chip {
  padding: 8px 14px;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cp-quick-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cp-quick-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.cp-quick-chip.cp-chip-full {
  border-color: var(--success);
  color: var(--success);
  font-weight: 700;
}

.cp-quick-chip.cp-chip-full:hover,
.cp-quick-chip.cp-chip-full.active {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

/* Mode picker pills */
.cp-mode-label {
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.cp-mode-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.cp-mode-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card);
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
}

.cp-mode-pill .material-symbols-rounded {
  font-size: 1rem;
}

.cp-mode-pill:hover {
  border-color: var(--primary-200);
  color: var(--primary);
}

.cp-mode-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px hsla(200, 80%, 44%, 0.2);
}

.cp-mode-pill.active .material-symbols-rounded {
  color: #fff;
}

/* Form row */
.cp-form-row {
  display: flex;
  gap: 10px;
  margin-bottom: var(--space-sm);
}

.cp-date-input {
  font-family: 'DM Sans', sans-serif;
}

/* Media section */
.cp-media-section {
  margin-top: 8px;
  margin-bottom: 8px;
}

.cp-media-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Submit button */
.cp-submit-btn {
  width: 100%;
  margin-top: 14px;
  padding: 16px;
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--success) 0%, hsl(160, 60%, 40%) 100%);
  color: #fff;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 14px hsla(142, 70%, 45%, 0.25);
  min-height: 52px;
}

.cp-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px hsla(142, 70%, 45%, 0.3);
}

.cp-submit-btn:active {
  transform: translateY(0);
}

.cp-submit-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.cp-submit-btn .material-symbols-rounded {
  font-size: 1.2rem;
}

.cp-btn-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid hsla(0, 0%, 100%, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  margin: 0 auto;
}

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

/* Auto note */
.cp-auto-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 10px;
  padding: 8px 12px;
  background: hsla(38, 92%, 50%, 0.06);
  border-radius: 10px;
}

.cp-auto-note .material-symbols-rounded {
  font-size: .85rem;
  color: var(--warning);
}

/* ─── Sticky footer ─── */
.cp-sticky-footer {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px hsla(0, 0%, 0%, 0.08);
  z-index: 90;
  transform: translateY(100%);
  opacity: 0;
  transition: transform .25s, opacity .25s;
}

.cp-sticky-footer.cp-sticky-visible {
  transform: translateY(0);
  opacity: 1;
}

.cp-sticky-info {
  flex: 1;
}

.cp-sticky-clearing {
  font-family: 'DM Sans', sans-serif;
  font-size: .75rem;
  color: var(--text-secondary);
}

.cp-sticky-amount {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--foreground);
}

.cp-sticky-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--success) 0%, hsl(160, 60%, 40%) 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px hsla(142, 70%, 45%, 0.2);
}

.cp-sticky-btn .material-symbols-rounded {
  font-size: 1.1rem;
}

/* ─── Receipt redesign ─── */
.cp-receipt-hero {
  text-align: center;
  padding: 24px 0 16px;
}

.cp-receipt-check-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: hsla(142, 70%, 45%, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.cp-receipt-check-icon {
  font-size: 2.5rem;
  color: var(--success);
}

.cp-receipt-amount-big {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--foreground);
  margin-bottom: 4px;
}

.cp-receipt-client-name {
  font-family: 'DM Sans', sans-serif;
  font-size: .92rem;
  color: var(--text-secondary);
}

.cp-receipt-num {
  font-family: 'DM Sans', sans-serif;
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.cp-receipt-allocs {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: 12px;
}

.cp-receipt-alloc-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.cp-receipt-alloc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
}

.cp-receipt-alloc-row strong {
  margin-left: auto;
  color: var(--success);
  font-weight: 700;
}

.cp-receipt-credit-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
}

.cp-receipt-credit-add {
  background: hsla(142, 70%, 45%, 0.08);
  color: var(--success);
}

.cp-receipt-credit-add .material-symbols-rounded {
  color: var(--success);
}

.cp-receipt-credit-used {
  background: hsla(38, 92%, 50%, 0.08);
  color: var(--warning);
}

.cp-receipt-credit-used .material-symbols-rounded {
  color: var(--warning);
}

/* ─── Payment History Timeline ─── */
.cp-history-section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.cp-history-loading {
  padding: 24px 0;
  display: flex;
  justify-content: center;
}

.cp-history-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
}

.cp-history-empty .material-symbols-rounded {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
  opacity: .35;
}

.cp-history-empty p {
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
  margin: 0;
}

.cp-history-timeline {
  position: relative;
  padding-left: 24px;
}

.cp-history-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
}

.cp-history-item {
  position: relative;
  margin-bottom: 10px;
  animation: cpFadeUp .3s ease-out both;
}

.cp-history-dot {
  position: absolute;
  left: -20px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--card);
  box-shadow: 0 0 0 2px hsla(142, 70%, 45%, 0.2);
}

.cp-history-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
}

.cp-history-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.cp-history-amt {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--success);
}

.cp-history-mode {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: .78rem;
  color: var(--text-secondary);
  background: var(--gray-50);
  padding: 3px 10px;
  border-radius: 999px;
}

.cp-history-mode .material-symbols-rounded {
  font-size: .85rem;
}

.cp-history-date {
  font-family: 'DM Sans', sans-serif;
  font-size: .75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.cp-history-notes {
  font-family: 'DM Sans', sans-serif;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* ─── Mobile responsive for Collect Payment ─── */
@media (max-width: 480px) {
  .cp-hero {
    padding: 16px 16px 16px;
  }

  .cp-form-row {
    flex-direction: column;
    gap: 6px;
  }

  .cp-form-row .form-group {
    flex: 1 1 100%;
  }

  .cp-due-card-inner {
    padding: 12px 10px;
    gap: 8px;
  }

  .cp-due-cb-wrap input[type="checkbox"] {
    width: 26px;
    height: 26px;
    min-width: 26px;
  }

  .cp-checkbox-label input[type="checkbox"] {
    width: 26px;
    height: 26px;
  }

  .cp-select-all-row {
    padding: 12px;
  }

  .cp-submit-btn {
    min-height: 52px;
    font-size: 1.05rem;
  }

  .cp-stats-row {
    flex-wrap: wrap;
  }

  .cp-stat-item {
    min-width: calc(50% - 4px);
  }

  .cp-mode-pill {
    padding: 10px 12px;
    font-size: .8rem;
  }

  .cp-sticky-footer {
    bottom: 56px;
  }
}

/* Desktop: constrain CP form width */
@media (min-width: 768px) {
  .cp-page {
    max-width: 600px;
    margin: 0 auto;
  }

  .cp-sticky-footer {
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    border-radius: 16px 16px 0 0;
  }

  .cp-sticky-footer.cp-sticky-visible {
    transform: translateX(-50%) translateY(0);
  }
}

@media (min-width: 1024px) {
  .cp-page {
    max-width: 640px;
  }
}

/* ─────────────────────────────────────────────────────
   COLLECT PAYMENT — Redesign Overrides (Sea Blue)
   ───────────────────────────────────────────────────── */

/* Hide old hero — replaced by compact search */
body .cp-hero {
  display: none;
}

/* Clear button inside search box */
body .cp-search-box .cp-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

/* Search section */
body .cp-search-section {
  padding: 12px 16px 4px;
}

body .cp-search-box {
  position: relative;
}

body .cp-search-box .cp-search-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--card);
  font-size: 0.92rem;
  color: var(--text);
  outline: none;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(14, 165, 233, 0.06);
}

body .cp-search-box .cp-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15), 0 1px 3px rgba(14, 165, 233, 0.06);
}

body .cp-search-box .cp-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 20px;
  pointer-events: none;
  transition: color 0.2s;
}

body .cp-search-box .cp-search-input:focus~.cp-search-icon,
body .cp-search-box .cp-search-input:focus+.cp-search-icon {
  color: var(--primary);
}

/* Compact profile card */
body .cp-profile-compact {
  margin: 8px 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(14, 165, 233, 0.06);
}

body .cp-stats-compact {
  display: flex;
  gap: 8px;
}

body .cp-stats-compact .cp-stat-item {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  border-radius: 10px;
  background: var(--background, #F4F8FB);
  border: none;
  min-width: 0;
}

body .cp-stats-compact .cp-stat-value {
  font-size: clamp(0.72rem, 2.5vw, 0.92rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2px;
}

body .cp-stats-compact .cp-stat-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Due cards — compact 3D */
body .cp-due-card {
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 6px;
  box-shadow: 0 1px 3px rgba(14, 165, 233, 0.06);
  transition: all 0.2s ease;
}

body .cp-due-card:hover {
  border-color: var(--primary);
}

body .cp-due-card:has(input:checked) {
  border-color: var(--primary);
  background: rgba(14, 165, 233, 0.04);
}

/* Daily summary card — compact */
body .cp-daily-card {
  margin: 8px 0;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(16, 185, 129, 0.15);
  background: rgba(16, 185, 129, 0.04);
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.06);
}

/* Recent payments section */
body .cp-recent-section {
  margin: 10px 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(14, 165, 233, 0.06);
  overflow: hidden;
}

body .cp-recent-head {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  padding: 12px 14px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

body .cp-recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border-light, #f1f5f9);
  cursor: pointer;
  transition: background 0.15s;
  animation: calFadeUp 0.3s ease both;
}

body .cp-recent-item:hover {
  background: rgba(14, 165, 233, 0.04);
}

body .cp-recent-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body .cp-recent-icon .material-symbols-rounded {
  font-size: 1rem;
}

body .cp-recent-info {
  flex: 1;
  min-width: 0;
}

body .cp-recent-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

body .cp-recent-meta {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 1px;
}

body .cp-recent-amt {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* Payment form card — tighter */
body .cp-pay-card {
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(14, 165, 233, 0.06);
  padding: 14px;
}

/* Mode pills — wrap nicely */
body .cp-mode-picker {
  flex-wrap: wrap;
}

body .cp-mode-pill {
  border-radius: 999px;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  transition: all 0.2s;
}

body .cp-mode-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

/* Submit button — green */
body .cp-submit-btn {
  background: var(--success);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  border-radius: 14px;
}

body .cp-submit-btn:hover {
  filter: brightness(1.05);
}

/* Sticky footer */
body .cp-sticky-footer {
  border-radius: 0;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

/* Client results — 3D cards */
body .cp-client-row {
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(14, 165, 233, 0.06);
  transition: all 0.2s;
}

body .cp-client-row:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.08), 0 6px 12px rgba(14, 165, 233, 0.10);
}

/* ═════════════════════════════════════════════════════
   CLIENTS & ASSISTANTS — Redesigned Pages
   ═════════════════════════════════════════════════════ */

.clients-page,
.assistants-page {
  padding: 0 0 80px;
}

.clients-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}

.clients-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.clients-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 16px;
  padding: 10px 14px;
  background: var(--gray-50);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.clients-search input {
  border: none;
  background: none;
  outline: none;
  flex: 1;
  font-size: 16px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-primary);
}

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

.clients-filters {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.clients-filters::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill.active {
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}

.filter-pill:hover {
  border-color: var(--text-primary);
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
  padding: 0 5px;
}

.clients-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  margin: 4px 16px 8px;
}

.clients-cards {
  padding: 0 16px;
}

/* ─── Client / Assistant Card ──────────────────────── */
.client-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s;
}

.client-card:active {
  transform: scale(0.98);
}

.client-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.client-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-100);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  font-family: 'DM Sans', sans-serif;
  flex-shrink: 0;
}

.client-card-info {
  flex: 1;
  min-width: 0;
}

.client-card-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.client-card-phone {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  gap: 4px;
}

.client-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.client-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
}

.client-badge.due {
  background: #FEF2F2;
  color: var(--danger);
}

.client-badge.clear {
  background: #F0FDF4;
  color: var(--success);
}

.client-badge.vip {
  background: #FFF7ED;
  color: #f59e0b;
}

.client-badge.upcoming {
  background: #EFF6FF;
  color: var(--primary);
}

.client-card-progress {
  margin-bottom: 10px;
}

.progress-bar-bg {
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--success);
  border-radius: 3px;
  transition: width 0.3s;
}

.progress-text {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-family: 'DM Sans', sans-serif;
}

.client-card-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.client-quick-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 11px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  color: var(--success);
  cursor: pointer;
  min-height: 36px;
  transition: background 0.1s;
}

.client-quick-action .material-symbols-rounded {
  font-size: 16px;
}

.client-quick-action:active {
  background: var(--gray-50);
}

.client-quick-action.wa {
  color: #25D366;
}

.client-quick-action.collect {
  color: var(--primary);
}

.client-card-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
  font-size: 12px;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
}

.client-card-total .total-amount {
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
}

/* ─── Assistant specific ───────────────────────────── */
.asst-type-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid;
  font-family: 'DM Sans', sans-serif;
}

.asst-stats-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.asst-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-secondary);
}

.asst-stat.green {
  color: var(--success);
}

.asst-stat.blue {
  color: var(--primary);
}

/* ─── Detail Page ──────────────────────────────────── */
.client-detail-page {
  padding: 0 0 80px;
}

.detail-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 10;
}

.detail-back-btn,
.detail-edit-btn {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: var(--gray-50);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.detail-nav-title {
  flex: 1;
  font-weight: 700;
  font-size: 18px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-primary);
}

.detail-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px 16px;
  gap: 4px;
}

.detail-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 8px;
}

.detail-avatar {
  width: 64px;
  height: 64px;
  border-radius: 32px;
  background: var(--primary-100);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  font-family: 'DM Sans', sans-serif;
}

.detail-avatar-img {
  width: 64px;
  height: 64px;
  border-radius: 32px;
  object-fit: cover;
  display: block;
}

.detail-avatar-camera {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--card, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  margin: -8px -8px 0 0;
}

.client-card-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.detail-name {
  font-weight: 800;
  font-size: 20px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-sub {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  gap: 4px;
}

.detail-since {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
}

.detail-money-row {
  display: flex;
  gap: 8px;
  padding: 0 16px;
  margin-bottom: 12px;
}

.money-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  border-radius: 14px;
  background: var(--gray-50);
  gap: 4px;
}

.money-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
}

.money-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  word-break: break-all;
}

.detail-actions-row {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
}

.detail-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 56px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
}

.detail-action-btn .material-symbols-rounded {
  font-size: 20px;
}

.detail-action-btn.green {
  background: #F0FDF4;
  color: var(--success);
}

.detail-action-btn.wa {
  background: #F0FDF4;
  color: #25D366;
}

.detail-action-btn.blue {
  background: #EFF6FF;
  color: var(--primary);
}

.detail-action-btn.orange {
  background: #FFF7ED;
  color: #f59e0b;
}

.detail-action-btn:active {
  opacity: 0.7;
}

.detail-divider {
  height: 8px;
  background: var(--gray-50);
}

.detail-section {
  padding: 16px 20px;
}

.detail-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  margin: 0 0 12px;
}

.detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-empty {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  padding: 8px 0;
}

/* Timeline */
.detail-timeline {
  position: relative;
  padding-left: 24px;
}

.timeline-item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 28px;
  width: 2px;
  bottom: 0;
  background: var(--gray-100);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  left: -24px;
  margin-right: -12px;
}

.timeline-content {
  flex: 1;
}

.timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
}

.timeline-sub {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
}

.timeline-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-family: 'DM Sans', sans-serif;
}

/* Detail item cards (bookings, orders, rentals, tasks) */
.detail-item-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 8px;
}

.detail-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.detail-item-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
}

.detail-item-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-family: 'DM Sans', sans-serif;
}

.detail-item-badge {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}

.detail-item-money {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
}

/* ═══════════════════════════════════════════════
   PAYMENT HISTORY CARDS — Client Detail View
   ═══════════════════════════════════════════════ */

.ph-card {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light, var(--border));
  overflow: hidden;
  margin-bottom: var(--space-md);
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ph-card:active {
  transform: scale(0.985);
}

@media (hover: hover) {
  body .ph-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
  }
}

/* Status Accent — left border */
.ph-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.ph-card[data-status="success"]::before {
  background: var(--success);
}

.ph-card[data-status="partial"]::before {
  background: var(--warning);
}

.ph-card[data-status="overdue"]::before {
  background: var(--danger);
}

.ph-card[data-status="credit"]::before {
  background: var(--primary);
}

.ph-card-inner {
  padding: var(--space-md);
  padding-left: calc(var(--space-md) + 4px);
}

/* Top Row: amount + mode stamp */
.ph-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: 10px;
}

.ph-amount-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ph-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.ph-card[data-status="credit"] .ph-amount {
  color: var(--primary);
}

.ph-amount-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Payment Mode Stamp */
.ph-mode-stamp {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  border: 1.5px solid var(--border);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.ph-mode-stamp .material-symbols-rounded {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Source Row */
.ph-source-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-light, var(--border));
}

.ph-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}

.ph-source-badge .material-symbols-rounded {
  font-size: 0.85rem;
}

.ph-source-badge[data-source="booking"] {
  background: hsl(217, 80%, 94%);
  color: hsl(217, 70%, 45%);
}

.ph-source-badge[data-source="order"] {
  background: hsl(270, 60%, 94%);
  color: hsl(270, 55%, 50%);
}

.ph-source-badge[data-source="rental"] {
  background: hsl(200, 70%, 93%);
  color: hsl(200, 70%, 40%);
}

.ph-source-badge[data-source="opening_balance"] {
  background: var(--warning-light);
  color: hsl(38, 80%, 35%);
}

.ph-source-badge[data-source="multi"] {
  background: var(--gray-100, var(--gray-50));
  color: var(--text-secondary);
}

body.dark-mode .ph-source-badge[data-source="booking"] {
  background: hsl(217, 50%, 18%);
  color: hsl(217, 70%, 65%);
}

body.dark-mode .ph-source-badge[data-source="order"] {
  background: hsl(270, 40%, 18%);
  color: hsl(270, 55%, 70%);
}

body.dark-mode .ph-source-badge[data-source="rental"] {
  background: hsl(200, 50%, 16%);
  color: hsl(200, 60%, 60%);
}

body.dark-mode .ph-source-badge[data-source="opening_balance"] {
  color: hsl(38, 80%, 65%);
}

.ph-source-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

/* Detail Grid */
.ph-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.ph-detail-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ph-detail-item .material-symbols-rounded {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ph-detail-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.ph-detail-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Status Pill */
.ph-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ph-status-pill .material-symbols-rounded {
  font-size: 0.8rem;
}

.ph-status-pill[data-pill="success"] {
  background: var(--success-light);
  color: var(--success);
}

.ph-status-pill[data-pill="partial"] {
  background: var(--warning-light);
  color: hsl(38, 80%, 35%);
}

.ph-status-pill[data-pill="overdue"] {
  background: var(--danger-light);
  color: var(--danger);
}

.ph-status-pill[data-pill="credit"] {
  background: var(--primary-50);
  color: var(--primary);
}

body.dark-mode .ph-status-pill[data-pill="partial"] {
  color: hsl(38, 80%, 60%);
}

/* Allocation Breakdown (multi-source) */
.ph-allocations {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light, var(--border));
}

.ph-alloc-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.ph-alloc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.ph-alloc-row+.ph-alloc-row {
  border-top: 1px dotted var(--border-light, var(--border));
}

.ph-alloc-source {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.ph-alloc-source .material-symbols-rounded {
  font-size: 0.85rem;
}

.ph-alloc-amt {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Quick Actions */
.ph-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light, var(--border));
}

.ph-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.ph-action-btn:active {
  transform: scale(0.9);
}

.ph-action-btn .material-symbols-rounded {
  font-size: 1.05rem;
}

.ph-action-btn[data-act="receipt"] {
  background: var(--primary-50);
  color: var(--primary);
}

.ph-action-btn[data-act="whatsapp"] {
  background: hsl(142, 50%, 93%);
  color: #25D366;
}

.ph-action-btn[data-act="edit"] {
  background: var(--gray-50);
  color: var(--text-secondary);
}

body.dark-mode .ph-action-btn[data-act="whatsapp"] {
  background: hsl(142, 30%, 14%);
}

/* Note */
.ph-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.ph-note .material-symbols-rounded {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 1px;
}

/* Payment Summary Header */
.ph-summary {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light, var(--border));
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  position: relative;
  overflow: hidden;
}

.ph-summary::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at top right, hsla(200, 80%, 44%, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.ph-summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.ph-summary-stat {
  text-align: center;
  padding: var(--space-sm) var(--space-xs);
  border-radius: var(--radius-sm);
}

.ph-summary-stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
}

.ph-summary-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.ph-summary-stat[data-stat="paid"] {
  background: var(--success-light);
}

.ph-summary-stat[data-stat="paid"] .ph-summary-stat-value {
  color: var(--success);
}

.ph-summary-stat[data-stat="due"] {
  background: var(--danger-light);
}

.ph-summary-stat[data-stat="due"] .ph-summary-stat-value {
  color: var(--danger);
}

.ph-summary-stat[data-stat="total"] {
  background: var(--gray-50);
}

.ph-summary-stat[data-stat="total"] .ph-summary-stat-value {
  color: var(--text-primary);
}

/* Progress Bar */
.ph-progress-bar-track {
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.ph-progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--success) 0%, hsl(142, 65%, 50%) 100%);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.ph-progress-bar-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, hsla(0, 0%, 100%, 0.3));
  border-radius: 0 4px 4px 0;
}

.ph-progress-label {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Date Group Separator */
.ph-date-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  margin-top: var(--space-sm);
}

.ph-date-group-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ph-date-group-line {
  flex: 1;
  height: 1px;
  background: var(--border-light, var(--border));
}

/* Filter Chips */
.ph-filter-chips {
  display: flex;
  gap: 4px;
}

.ph-filter-chip {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'DM Sans', sans-serif;
}

.ph-filter-chip:active {
  transform: scale(0.95);
}

body .ph-filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* List Header */
.ph-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-sm);
}

.ph-list-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ph-list-title .material-symbols-rounded {
  font-size: 1.1rem;
  color: var(--primary);
}

/* Staggered Entry Animation */
@keyframes phSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ph-card {
  animation: phSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ph-card:nth-child(1) {
  animation-delay: 50ms;
}

.ph-card:nth-child(2) {
  animation-delay: 100ms;
}

.ph-card:nth-child(3) {
  animation-delay: 150ms;
}

.ph-card:nth-child(4) {
  animation-delay: 200ms;
}

.ph-card:nth-child(5) {
  animation-delay: 250ms;
}

.ph-card:nth-child(6) {
  animation-delay: 300ms;
}

/* Responsive */
@media (min-width: 768px) {
  .ph-action-btn {
    width: 40px;
    height: 40px;
  }

  .ph-amount {
    font-size: 1.85rem;
  }

  .ph-summary-stat-value {
    font-size: 1.4rem;
  }
}

@media (max-width: 374px) {
  .ph-amount {
    font-size: 1.4rem;
  }

  .ph-details {
    grid-template-columns: 1fr;
  }

  .ph-summary-stat-value {
    font-size: 1rem;
  }
}

/* Task money breakdown */
.asst-task-money {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.task-money-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-money-label {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
}

.task-money-value {
  font-size: 16px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-primary);
}

/* Negotiation — Counter offer card */
.neg-countered-card {
  border-color: #8b5cf6;
  border-width: 2px;
}

.neg-counter-box {
  margin-top: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: #8b5cf608;
  border: 1px dashed #8b5cf640;
}

.neg-counter-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #8b5cf6;
}

.neg-counter-amounts {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.neg-counter-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.neg-counter-label {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
}

.neg-counter-value {
  font-size: 16px;
  font-weight: 800;
  color: #8b5cf6;
  font-family: 'DM Sans', sans-serif;
}

.neg-counter-diff {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: currentColor;
  -webkit-background-clip: text;
  background: #00000008;
  margin-left: auto;
}

.neg-counter-reason {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-style: italic;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 8px;
}

.neg-counter-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.neg-btn {
  flex: 1;
  min-height: 44px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
}

.neg-btn-accept {
  background: var(--success);
  color: #fff;
}

.neg-btn-accept:active {
  opacity: 0.85;
}

.neg-btn-decline {
  background: #FEE2E2;
  color: #991B1B;
}

.neg-btn-decline:active {
  opacity: 0.85;
}

.neg-task-footer {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* Performance row */
.perf-row {
  display: flex;
  gap: 8px;
}

.perf-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  gap: 6px;
}

.perf-box.green {
  background: #F0FDF4;
}

.perf-box.red {
  background: #FEF2F2;
}

.perf-box.blue {
  background: #EFF6FF;
}

.perf-value {
  font-size: 20px;
  font-weight: 800;
  font-family: 'DM Sans', sans-serif;
}

.perf-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
}

/* Notes */
.detail-notes {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #FFFBEB;
  font-size: 16px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-primary);
  resize: vertical;
}

.detail-notes:focus {
  outline: none;
  border-color: var(--primary);
}

.detail-danger-zone {
  padding: 16px 20px;
  text-align: center;
}

/* ─── Desktop overrides for client/assistant pages ─── */
@media (min-width: 768px) {
  .client-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
}

@media (min-width: 1024px) {
  .clients-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .client-detail-page {
    max-width: 700px;
    margin: 0 auto;
  }

  .clients-page,
  .assistants-page {
    max-width: 900px;
    margin: 0 auto;
  }
}

@media (min-width: 1200px) {
  .clients-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── Voice Recorder Widget ─────────────────────────── */
@keyframes sh-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.sh-voice-widget audio {
  display: none;
}

/* ─── File Attach Widget ────────────────────────────── */
.sh-file-widget img {
  transition: opacity 0.2s;
}

.sh-file-widget img:hover {
  opacity: 0.8;
}

/* ─── Tour Overlay ─────────────────────────────────── */
/* ─────────────────────────────────────────────────────
   ONBOARDING TOUR v3 — Full-screen swipeable cards
   Big skip button, 4 steps, value-first, zero confusion
   ───────────────────────────────────────────────────── */

.sh-tour {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #fff;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.25s ease;
  --t-bg: #0ea5e9;
}

.sh-tour.t-in {
  opacity: 1;
}

.sh-tour.t-out {
  opacity: 0;
  pointer-events: none;
}

/* ─── Skip Tour — BIG, obvious, always visible ─── */
body .t-skip {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 18px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.06);
  color: #64748b;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  min-height: 44px;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

body .t-skip:active {
  background: rgba(0, 0, 0, 0.12);
  color: #1e293b;
}

/* ─── Slides container ─── */
body .t-slides {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ─── Individual slide ─── */
body .t-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 24px;
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

body .t-slide.t-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

body .t-slide.t-left {
  opacity: 0;
  transform: translateX(-60px);
}

body .t-slide.t-right {
  opacity: 0;
  transform: translateX(60px);
}

/* ─── Card inside slide ─── */
body .t-card {
  text-align: center;
  max-width: 340px;
  width: 100%;
}

/* ─── Icon circle ─── */
body .t-icon-circle {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  animation: tIconFloat 3s ease-in-out infinite;
}

body .t-icon-circle .material-symbols-rounded {
  font-size: 42px;
  color: #fff;
}

@keyframes tIconFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

/* ─── Title ─── */
body .t-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  margin: 0 0 12px;
}

/* ─── Description ─── */
body .t-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* ─── Bottom area: progress + nav ─── */
body .t-bottom {
  padding: 16px 24px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  background: #fff;
}

/* ─── Progress bar ─── */
body .t-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

body .t-progress-track {
  flex: 1;
  height: 5px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

body .t-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
}

body .t-progress-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  flex-shrink: 0;
  min-width: 24px;
  text-align: right;
}

/* ─── Nav buttons ─── */
body .t-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

body .t-btn-back {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

body .t-btn-back:active {
  border-color: #cbd5e1;
  color: #1e293b;
}

body .t-btn-back .material-symbols-rounded {
  font-size: 22px;
}

body .t-btn-next {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  border-radius: 14px;
  border: none;
  background: var(--primary, #0ea5e9);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

body .t-btn-next:active {
  transform: scale(0.98);
}

/* ─── Dark mode ─── */
body.dark-mode .sh-tour {
  background: var(--background, #0f172a);
}

body.dark-mode .t-skip {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .t-title {
  color: #f1f5f9;
}

body.dark-mode .t-desc {
  color: #94a3b8;
}

body.dark-mode .t-bottom {
  background: var(--background, #0f172a);
}

body.dark-mode .t-progress-track {
  background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .t-progress-label {
  color: rgba(255, 255, 255, 0.3);
}

body.dark-mode .t-btn-back {
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
}

/* ─────────────────────────────────────────────────────
   MOBILE DETAIL MODAL FIX — 375px Optimized
   Booking, Walk-in, Rental detail modals
   ───────────────────────────────────────────────────── */

@media (max-width: 767px) {

  /* ── Modal body padding tighter on mobile ── */
  .modal-body {
    padding: var(--space-md);
  }

  /* ── Review rows: stack label/value vertically ── */
  .modal-body .review-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: var(--space-sm) 0;
    font-size: 0.92rem;
  }

  .modal-body .review-row .label {
    font-size: 0.82rem;
    color: var(--muted-foreground);
    font-weight: 500;
  }

  .modal-body .review-row .value {
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    word-break: break-word;
    max-width: 100%;
  }

  /* ── Review section titles: larger and bolder ── */
  .modal-body .review-section-title {
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
  }

  /* ── Review sections: tighter margin ── */
  .modal-body .review-section {
    margin-bottom: var(--space-lg);
  }

  /* ── Amount values: large bold readable ── */
  .modal-body .review-row .value[style*="fontWeight"] {
    font-size: 1rem;
  }

  /* ── Cards inside modal body: proper padding ── */
  .modal-body .card,
  .modal-body .card-padded {
    padding: var(--space-md);
    border-radius: var(--radius-md);
  }

  /* ── Payment schedule cards: readable ── */
  .modal-body .card-padded.mb-sm {
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
  }

  /* ── Tables inside modals: compact but readable ── */
  .modal-body table {
    font-size: 0.88rem;
  }

  .modal-body table th,
  .modal-body table td {
    padding: 8px 6px;
    font-size: 0.85rem;
  }

  /* ── Booking detail footer: stack vertically ── */
  .booking-detail-footer {
    flex-direction: column;
    gap: 8px;
  }

  .booking-detail-footer .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    font-size: 0.9rem;
  }

  /* ── Walk-in detail actions: already handled by wi-detail-actions grid,
       but ensure min sizes ── */
  .wi-detail-actions .btn {
    min-height: 48px;
    font-size: 0.85rem;
    padding: 10px 12px;
  }

  /* ── Rental detail footer: stack vertically ── */
  .rental-detail-footer {
    flex-direction: column;
    gap: 8px;
    justify-content: stretch;
  }

  .rental-detail-footer .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    font-size: 0.9rem;
  }

  /* ── Status badges inside modals: 44px tap targets ── */
  .modal-body .sh-badge-pulse,
  .modal-body span[style*="border-radius:var(--radius-full)"] {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  /* ── Item status pills: tappable ── */
  .modal-body .wi-item-status-pill {
    min-height: 36px;
    min-width: 44px;
    padding: 6px 14px;
    font-size: 0.82rem;
  }

  /* ── Settlement section: proper spacing ── */
  .modal-body div[style*="border: 2px dashed"],
  .modal-body div[style*="border:1px dashed"],
  .modal-body div[style*="border:2px dashed"] {
    padding: var(--space-md);
    margin-top: var(--space-md);
  }

  .modal-body div[style*="dashed"] .form-control {
    min-height: 48px;
    font-size: 1rem;
  }

  .modal-body div[style*="dashed"] .btn {
    min-height: 48px;
    font-size: 0.95rem;
  }

  /* ── Prevent horizontal overflow in modal ── */
  .modal-body {
    overflow-x: hidden;
    word-break: break-word;
  }

  .modal-body>div {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* ── Items table scroll container ── */
  .modal-body div[style*="overflowX"] {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  /* ── Quick action buttons (Call/WhatsApp/Pay) inside booking detail ── */
  .modal-body div[style*="display: flex"][style*="gap: 8px"]>a,
  .modal-body div[style*="display: flex"][style*="gap: 8px"]>div[style*="cursor: pointer"] {
    min-height: 48px;
    font-size: 0.88rem;
    border-radius: var(--radius-md);
  }

  /* ── Payment history rows: stack on mobile ── */
  .modal-body div[style*="borderBottom: 1px solid"] {
    flex-wrap: wrap;
    gap: 4px;
  }

  /* ── Task action buttons: wrap nicely ── */
  .modal-body .btn-sm {
    min-height: 40px;
    font-size: 0.82rem;
    padding: 8px 12px;
  }

  /* ── Ensure all text meets 16px equivalent readability ── */
  .modal-body p,
  .modal-body span,
  .modal-body div {
    line-height: 1.45;
  }

  /* ── Notes textarea in booking detail ── */
  .modal-body textarea.form-control {
    min-height: 80px;
    font-size: 0.95rem;
  }

  /* ── Terms & Conditions: readable ── */
  .modal-body details summary {
    font-size: 0.88rem;
    padding: var(--space-sm) 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .modal-body details pre {
    font-size: 0.85rem;
    line-height: 1.5;
  }
}

/* ═══════════════════════════════════════════════════════
   Mere Kaam — Staff Tasks Page
   ═══════════════════════════════════════════════════════ */
.mk-page {
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.mk-header {
  margin-bottom: 16px;
}

.mk-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.mk-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.mk-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.mk-tab {
  padding: 8px 16px;
  border-radius: var(--radius-full, 9999px);
  border: 1.5px solid var(--border);
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.mk-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.mk-badge {
  background: var(--danger);
  color: white;
  border-radius: 50%;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
  line-height: 16px;
}

.mk-tab.active .mk-badge {
  background: rgba(255, 255, 255, 0.3);
}

/* Task Cards */
.mk-card {
  background: var(--card);
  border-radius: var(--radius-md, 12px);
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid var(--border);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
}

.mk-card.status-pending {
  border-left-color: var(--warning);
}

.mk-card.status-accepted {
  border-left-color: var(--success);
}

.mk-card.status-in_progress {
  border-left-color: var(--primary);
}

.mk-card.status-completed {
  border-left-color: var(--border);
  opacity: 0.7;
}

.mk-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.mk-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.mk-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mk-role-badge {
  background: var(--gray-50, #f9fafb);
  border: 1px solid var(--border);
  border-radius: var(--radius-full, 9999px);
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.mk-card-amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.mk-card-footer {
  margin-top: 4px;
}

.mk-action-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-md, 12px);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  transition: opacity 0.15s;
}

.mk-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mk-action-btn:active:not(:disabled) {
  opacity: 0.8;
}

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

.mk-btn-shuru {
  background: var(--primary);
  color: white;
}

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

.mk-status-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-full, 9999px);
  font-size: 13px;
  font-weight: 600;
}

.mk-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-secondary);
}

.mk-empty .material-symbols-rounded {
  font-size: 48px;
  display: block;
  margin: 0 auto 12px;
  opacity: 0.4;
}

.mk-empty p {
  font-size: 16px;
  margin: 0;
}

.mk-complete-modal textarea {
  resize: vertical;
  min-height: 80px;
}

/* Dark mode overrides */
.dark-mode .mk-role-badge {
  background: rgba(255, 255, 255, 0.06);
  color: var(--primary);
}

.dark-mode .mk-tab.active .mk-badge {
  background: rgba(255, 255, 255, 0.25);
}

/* ─── Studio Signature Pad ─── */
#sigCanvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ─── Smart Client Reminders ─── */
.reminder-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.3s, max-height 0.3s;
}
.reminder-card:last-child { border-bottom: none; }
.reminder-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.reminder-icon .material-symbols-rounded { font-size: 1.3rem; }
.reminder-info { flex: 1; min-width: 0; }
.reminder-occasion {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}
.reminder-client {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reminder-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.reminder-countdown {
  background: var(--warning-light, #FEF3C7);
  color: var(--warning, #f59e0b);
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  margin-left: 4px;
}
.reminder-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.reminder-wa-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.15s;
}
.reminder-wa-btn:hover { transform: scale(1.08); }
.reminder-wa-btn .material-symbols-rounded { font-size: 1.2rem; }
.reminder-dismiss-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.reminder-dismiss-btn:hover { color: var(--danger); background: var(--danger-light, #FEF2F2); }
.reminder-dismiss-btn .material-symbols-rounded { font-size: 1rem; }
.reminder-badge {
  background: #ec4899;
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: 1px;
}