/* ==========================================================================
   S2SS CREATIVE - OFFICIAL BRAND DESIGN SYSTEM & STYLESHEET
   Brand Colors: Official Emerald Green (#2b7a42) & Deep Navy Blue (#1b3054)
   Tagline: "Just Imagine"
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Dynamic Theme Color Tokens (Default: Green) */
  --theme-color-name: 'Green';
  --theme-primary: #2b7a42;
  --theme-primary-light: #22c55e;
  --theme-primary-dark: #1b532c;
  --theme-primary-glow: rgba(43, 122, 66, 0.35);
  --theme-primary-shadow: rgba(43, 122, 66, 0.4);
  --theme-brand-gradient: linear-gradient(135deg, #2b7a42 0%, #1b3054 100%);
  --theme-tab-active: linear-gradient(135deg, #1b3054 0%, #2b7a42 100%);
  --theme-tab-active-light: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --theme-card-preview-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(11, 17, 30, 0.95));
  --theme-card-preview-bg-light: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  --theme-accent: #22c55e;
  --theme-border-active: rgba(43, 122, 66, 0.5);
  --theme-border-active-light: rgba(43, 122, 66, 0.6);
  --theme-swatch: #22c55e;

  /* Brand Theme Palette */
  --brand-green: var(--theme-primary, #2b7a42);
  --brand-green-light: var(--theme-primary-light, #22c55e);
  --brand-green-glow: var(--theme-primary-glow, rgba(43, 122, 66, 0.35));
  
  --brand-navy: #1b3054;
  --brand-navy-dark: #0f1a2e;
  --brand-navy-glow: rgba(27, 48, 84, 0.45);

  --bg-dark: #080d1a;
  --bg-card: rgba(15, 25, 45, 0.75);
  --bg-card-hover: rgba(22, 36, 64, 0.85);
  --bg-glass: rgba(12, 20, 36, 0.7);
  --bg-input: rgba(10, 17, 32, 0.85);

  /* Accents & Gradients */
  --primary-glow: linear-gradient(135deg, var(--theme-primary, #2b7a42) 0%, var(--theme-primary-light, #22c55e) 40%, #1e3a6a 100%);
  --brand-gradient: var(--theme-brand-gradient, linear-gradient(135deg, #2b7a42 0%, #1b3054 100%));
  --accent-green: var(--theme-accent, #22c55e);
  --accent-navy: #3b82f6;
  --accent-cyan: #06b6d4;

  /* Status Colors: TO START | WIP | Completed | Approved | Cancelled */
  --status-tostart: #f59e0b;
  --status-tostart-bg: rgba(245, 158, 11, 0.15);
  
  --status-wip: #3b82f6;
  --status-wip-bg: rgba(59, 130, 246, 0.15);
  
  --status-completed: #2b7a42;
  --status-completed-bg: rgba(43, 122, 66, 0.2);
  
  --status-approved: #8b5cf6;
  --status-approved-bg: rgba(139, 92, 246, 0.15);

  --status-cancelled: #f87171;
  --status-cancelled-bg: rgba(239, 68, 68, 0.15);

  /* Text & Borders */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-active: var(--theme-border-active, rgba(43, 122, 66, 0.5));

  /* Elevation & Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.6), 0 0 20px var(--theme-primary-glow, rgba(43, 122, 66, 0.2));
  --shadow-glow: 0 0 25px var(--theme-primary-glow, rgba(34, 197, 94, 0.3));

  /* Typography */
  --font-heading: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-tagline: 'Dancing Script', cursive;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Specific Color Themes */
[data-color-theme="green"] {
  --theme-color-name: 'Green';
  --theme-primary: #2b7a42;
  --theme-primary-light: #22c55e;
  --theme-primary-dark: #1b532c;
  --theme-primary-glow: rgba(43, 122, 66, 0.35);
  --theme-primary-shadow: rgba(43, 122, 66, 0.4);
  --theme-brand-gradient: linear-gradient(135deg, #2b7a42 0%, #1b3054 100%);
  --theme-tab-active: linear-gradient(135deg, #1b3054 0%, #2b7a42 100%);
  --theme-tab-active-light: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --theme-card-preview-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(11, 17, 30, 0.95));
  --theme-card-preview-bg-light: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  --theme-accent: #22c55e;
  --theme-border-active: rgba(43, 122, 66, 0.5);
  --theme-border-active-light: rgba(43, 122, 66, 0.6);
  --theme-swatch: #22c55e;
}

[data-color-theme="blue"] {
  --theme-color-name: 'Blue';
  --theme-primary: #1d4ed8;
  --theme-primary-light: #3b82f6;
  --theme-primary-dark: #1e3a8a;
  --theme-primary-glow: rgba(59, 130, 246, 0.35);
  --theme-primary-shadow: rgba(59, 130, 246, 0.4);
  --theme-brand-gradient: linear-gradient(135deg, #1d4ed8 0%, #0f172a 100%);
  --theme-tab-active: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  --theme-tab-active-light: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  --theme-card-preview-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(11, 17, 30, 0.95));
  --theme-card-preview-bg-light: linear-gradient(180deg, #f8fafc 0%, #e0e7ff 100%);
  --theme-accent: #3b82f6;
  --theme-border-active: rgba(59, 130, 246, 0.5);
  --theme-border-active-light: rgba(37, 99, 235, 0.6);
  --theme-swatch: #0084ff;
}

[data-color-theme="purple"] {
  --theme-color-name: 'Purple';
  --theme-primary: #7e22ce;
  --theme-primary-light: #a855f7;
  --theme-primary-dark: #581c87;
  --theme-primary-glow: rgba(168, 85, 247, 0.35);
  --theme-primary-shadow: rgba(168, 85, 247, 0.4);
  --theme-brand-gradient: linear-gradient(135deg, #7e22ce 0%, #1e1b4b 100%);
  --theme-tab-active: linear-gradient(135deg, #581c87 0%, #7e22ce 100%);
  --theme-tab-active-light: linear-gradient(135deg, #7e22ce 0%, #a855f7 100%);
  --theme-card-preview-bg: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(11, 17, 30, 0.95));
  --theme-card-preview-bg-light: linear-gradient(180deg, #f8fafc 0%, #f3e8ff 100%);
  --theme-accent: #a855f7;
  --theme-border-active: rgba(168, 85, 247, 0.5);
  --theme-border-active-light: rgba(147, 51, 234, 0.6);
  --theme-swatch: #9b51e0;
}

[data-color-theme="pink"] {
  --theme-color-name: 'Pink';
  --theme-primary: #db2777;
  --theme-primary-light: #ec4899;
  --theme-primary-dark: #9d174d;
  --theme-primary-glow: rgba(236, 72, 153, 0.35);
  --theme-primary-shadow: rgba(236, 72, 153, 0.4);
  --theme-brand-gradient: linear-gradient(135deg, #db2777 0%, #4c0519 100%);
  --theme-tab-active: linear-gradient(135deg, #9d174d 0%, #db2777 100%);
  --theme-tab-active-light: linear-gradient(135deg, #db2777 0%, #ec4899 100%);
  --theme-card-preview-bg: linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(11, 17, 30, 0.95));
  --theme-card-preview-bg-light: linear-gradient(180deg, #f8fafc 0%, #fce7f3 100%);
  --theme-accent: #ec4899;
  --theme-border-active: rgba(236, 72, 153, 0.5);
  --theme-border-active-light: rgba(219, 39, 119, 0.6);
  --theme-swatch: #ff4081;
}

[data-color-theme="red"] {
  --theme-color-name: 'Red';
  --theme-primary: #dc2626;
  --theme-primary-light: #ef4444;
  --theme-primary-dark: #991b1b;
  --theme-primary-glow: rgba(239, 68, 68, 0.35);
  --theme-primary-shadow: rgba(239, 68, 68, 0.4);
  --theme-brand-gradient: linear-gradient(135deg, #dc2626 0%, #450a0a 100%);
  --theme-tab-active: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
  --theme-tab-active-light: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  --theme-card-preview-bg: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(11, 17, 30, 0.95));
  --theme-card-preview-bg-light: linear-gradient(180deg, #f8fafc 0%, #fee2e2 100%);
  --theme-accent: #ef4444;
  --theme-border-active: rgba(239, 68, 68, 0.5);
  --theme-border-active-light: rgba(220, 38, 38, 0.6);
  --theme-swatch: #ff4d4f;
}

[data-color-theme="orange"] {
  --theme-color-name: 'Orange';
  --theme-primary: #ea580c;
  --theme-primary-light: #f97316;
  --theme-primary-dark: #9a3412;
  --theme-primary-glow: rgba(249, 115, 22, 0.35);
  --theme-primary-shadow: rgba(249, 115, 22, 0.4);
  --theme-brand-gradient: linear-gradient(135deg, #ea580c 0%, #431407 100%);
  --theme-tab-active: linear-gradient(135deg, #9a3412 0%, #ea580c 100%);
  --theme-tab-active-light: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  --theme-card-preview-bg: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(11, 17, 30, 0.95));
  --theme-card-preview-bg-light: linear-gradient(180deg, #f8fafc 0%, #ffedd5 100%);
  --theme-accent: #f97316;
  --theme-border-active: rgba(249, 115, 22, 0.5);
  --theme-border-active-light: rgba(234, 88, 12, 0.6);
  --theme-swatch: #ff7a00;
}

[data-color-theme="yellow"] {
  --theme-color-name: 'Yellow';
  --theme-primary: #ca8a04;
  --theme-primary-light: #eab308;
  --theme-primary-dark: #854d0e;
  --theme-primary-glow: rgba(234, 179, 8, 0.35);
  --theme-primary-shadow: rgba(234, 179, 8, 0.4);
  --theme-brand-gradient: linear-gradient(135deg, #ca8a04 0%, #422006 100%);
  --theme-tab-active: linear-gradient(135deg, #854d0e 0%, #ca8a04 100%);
  --theme-tab-active-light: linear-gradient(135deg, #ca8a04 0%, #eab308 100%);
  --theme-card-preview-bg: linear-gradient(135deg, rgba(234, 179, 8, 0.18), rgba(11, 17, 30, 0.95));
  --theme-card-preview-bg-light: linear-gradient(180deg, #f8fafc 0%, #fef3c7 100%);
  --theme-accent: #eab308;
  --theme-border-active: rgba(234, 179, 8, 0.5);
  --theme-border-active-light: rgba(202, 138, 4, 0.6);
  --theme-swatch: #ffc107;
}

[data-color-theme="slate"] {
  --theme-color-name: 'Slate';
  --theme-primary: #475569;
  --theme-primary-light: #64748b;
  --theme-primary-dark: #1e293b;
  --theme-primary-glow: rgba(100, 116, 139, 0.35);
  --theme-primary-shadow: rgba(100, 116, 139, 0.4);
  --theme-brand-gradient: linear-gradient(135deg, #475569 0%, #0f172a 100%);
  --theme-tab-active: linear-gradient(135deg, #334155 0%, #475569 100%);
  --theme-tab-active-light: linear-gradient(135deg, #475569 0%, #64748b 100%);
  --theme-card-preview-bg: linear-gradient(135deg, rgba(100, 116, 139, 0.18), rgba(11, 17, 30, 0.95));
  --theme-card-preview-bg-light: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  --theme-accent: #64748b;
  --theme-border-active: rgba(100, 116, 139, 0.5);
  --theme-border-active-light: rgba(71, 85, 105, 0.6);
  --theme-swatch: #808080;
}



/* Disable default number input spinners/arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

/* Light Theme Token Overrides */
body.light-theme {
  --bg-dark: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.9);
  --bg-input: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-light: rgba(15, 23, 42, 0.12);
  --border-active: var(--theme-border-active-light, rgba(43, 122, 66, 0.6));

  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.1);
  --shadow-glow: 0 0 20px var(--theme-primary-glow, rgba(34, 197, 94, 0.15));

  background-image: 
    radial-gradient(circle at 10% 15%, var(--theme-primary-glow, rgba(43, 122, 66, 0.08)) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
}

body.light-theme .modal-container {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
}

body.light-theme .modal-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

body.light-theme .modal-header h2,
body.light-theme .modal-title {
  color: #0f172a !important;
}

body.light-theme #btn-toggle-edit-mode {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

body.light-theme .modal-close-btn {
  color: #0f172a !important;
}

body.light-theme .user-dropdown {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
}

body.light-theme select.modal-status-badge option {
  background: #ffffff;
  color: #0f172a;
}

body.light-theme .code-box {
  background: #f8fafc;
  color: #15803d;
  border-color: rgba(15, 23, 42, 0.15);
}

body.light-theme .welcome-date-pill {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

body.light-theme .stat-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

body.light-theme .stat-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.09);
  border-color: #cbd5e1;
}

body.light-theme .stat-footer-hint {
  border-top-color: #f1f5f9;
  color: #64748b;
}

body.light-theme .search-box input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-theme .search-shortcut-badge {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

body.light-theme .select-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-theme .btn-action-secondary {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-theme .search-filter-actions-group {
  border-left-color: #cbd5e1;
}

body.light-theme .btn-clear-filters {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.35);
  color: #dc2626;
}

body.light-theme .job-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

body.light-theme .job-card:hover {
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  border-color: #cbd5e1;
}

body.light-theme .card-image-wrapper {
  background: #f1f5f9;
}

body.light-theme .card-file-name {
  color: #0f172a;
}

body.light-theme .card-client-info {
  color: #475569;
}

body.light-theme .card-meta-item {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

body.light-theme .card-progress-bar-track {
  background: #e2e8f0;
}

body.light-theme .card-footer-info {
  border-top-color: #f1f5f9;
}

body.light-theme .card-price-value {
  color: #059669;
}

body.light-theme .card-menu-btn:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

body.light-theme .assignee-avatar-circle {
  border-color: #ffffff;
  background: #e2e8f0;
  color: #334155;
}

body.light-theme .assignee-avatar-more {
  border-color: #ffffff;
}

body.light-theme .card-category-tag {
  background: rgba(255, 255, 255, 0.9);
  color: #059669;
  border-color: rgba(5, 150, 105, 0.3);
}

body.light-theme .status-to-start { background: rgba(59, 130, 246, 0.1); color: #2563eb; border-color: rgba(59, 130, 246, 0.25); }
body.light-theme .status-wip { background: rgba(245, 158, 11, 0.1); color: #d97706; border-color: rgba(245, 158, 11, 0.25); }
body.light-theme .status-completed { background: rgba(16, 185, 129, 0.1); color: #059669; border-color: rgba(16, 185, 129, 0.25); }
body.light-theme .status-approved { background: rgba(5, 150, 105, 0.12); color: #047857; border-color: rgba(5, 150, 105, 0.3); }
body.light-theme .status-hold { background: rgba(249, 115, 22, 0.1); color: #ea580c; border-color: rgba(249, 115, 22, 0.25); }
body.light-theme .status-cancelled { background: rgba(239, 68, 68, 0.1); color: #dc2626; border-color: rgba(239, 68, 68, 0.25); }

.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.theme-sun-icon { display: none; }
.theme-moon-icon { display: block; }

body.light-theme .theme-sun-icon { display: block; color: #f59e0b; }
body.light-theme .theme-moon-icon { display: none; }

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(43, 122, 66, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(27, 48, 84, 0.35) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(34, 197, 94, 0.05) 0%, transparent 65%);
  background-attachment: fixed;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--primary-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-family: var(--font-tagline);
  color: #38bdf8;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Layout Container */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem 1.25rem 1.5rem;
}

#main-view-content {
  position: relative;
  min-height: 400px;
  padding-bottom: 0.5rem;
}

/* Navbar */
.navbar {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.5rem;
  margin-bottom: 2rem;
}

.navbar-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 800;
}

.brand-studiohub-title {
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: 0.35px;
  background: linear-gradient(135deg, #60a5fa 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 0.35rem;
  line-height: 1;
  display: inline-block;
}

body.light-theme .brand-studiohub-title {
  background: linear-gradient(135deg, #1d4ed8 0%, #059669 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.brand-logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.4));
}

.brand-title-box {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title-box .brand-main-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-title-box .brand-tagline-text {
  font-family: var(--font-tagline);
  color: #60a5fa;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0.05rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Navbar Center Search */
.nav-center-search {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 340px;
  max-width: 480px;
  margin: 0 1.25rem;
}

.nav-search-box {
  width: 100% !important;
  max-width: 100% !important;
}

.nav-search-box input {
  height: 38px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-light);
  padding: 0.45rem 2.8rem 0.45rem 2.4rem;
  font-size: 0.82rem;
  transition: all 0.25s ease;
}

body.light-theme .nav-search-box input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.nav-search-box input:focus {
  background: rgba(15, 23, 42, 0.85);
  border-color: var(--brand-green, #22c55e);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}

body.light-theme .nav-search-box input:focus {
  background: #ffffff;
  border-color: var(--brand-green, #22c55e);
}

/* Notifications Button & Popover */
.nav-notification-wrapper {
  position: relative;
}

.nav-notification-btn {
  position: relative;
}

.nav-notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  border-radius: 9999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #0f172a;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.5);
}

.nav-notifications-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 330px;
  max-width: 90vw;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nav-notifications-popover.show {
  display: flex !important;
}

body.light-theme .nav-notifications-popover {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.nav-notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.03);
}

body.light-theme .nav-notifications-header {
  background: #f8fafc;
}

.btn-clear-notifications-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.btn-clear-notifications-text:hover {
  color: #ef4444;
}

.nav-notifications-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.nav-notifications-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.nav-notification-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

.nav-notification-item:last-child {
  border-bottom: none;
}

.nav-notification-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

body.light-theme .nav-notification-item:hover {
  background: #f1f5f9;
}

.nav-notification-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.nav-notification-item-body {
  flex: 1;
  min-width: 0;
}

.nav-notification-item-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  word-break: break-word;
}

.nav-notification-item-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

@media (max-width: 900px) {
  .nav-center-search {
    display: none !important;
  }
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.sync-badge.synced {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #22c55e !important;
  border: 1px solid rgba(34, 197, 94, 0.35) !important;
}

.sync-badge.syncing {
  background: rgba(249, 115, 22, 0.15) !important;
  color: #f97316 !important;
  border: 1px solid rgba(249, 115, 22, 0.35) !important;
}

.sync-badge.unsynced {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

.sync-badge.demo {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  flex-shrink: 0;
}

.sync-circle-btn.syncing svg,
#btn-sync-status-nav.syncing svg,
.sync-circle-btn.syncing .sync-icon-svg,
#btn-sync-status-nav.syncing .sync-icon-svg,
.fa-spin {
  animation: fa-spin 0.85s linear infinite !important;
  transform-origin: 50% 50% !important;
  transform-box: fill-box !important;
  display: inline-block !important;
}

@keyframes fa-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes interlockSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes continuousRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes arrowFillSpin {
  0% {
    stroke-dasharray: 4px, 60px;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 48px, 60px;
    stroke-dashoffset: -8px;
  }
  100% {
    stroke-dasharray: 48px, 60px;
    stroke-dashoffset: -56px;
  }
}

@keyframes circleSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes popCheck {
  0% { transform: scale(0.3) rotate(-20deg); opacity: 0; }
  70% { transform: scale(1.25) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ==========================================================================
   ELEGANT FLOATING TOOLTIP & HINT SYSTEM
   ========================================================================== */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -38px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  font-family: var(--font-family);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.25s;
  z-index: 10000;
}

[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border-width: 0 5px 6px 5px;
  border-style: solid;
  border-color: transparent transparent rgba(15, 23, 42, 0.96) transparent;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.25s;
  z-index: 10001;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip Positions */
[data-tooltip-pos="top"]::after {
  bottom: auto;
  top: -38px;
  transform: translateX(-50%) translateY(-4px);
}
[data-tooltip-pos="top"]::before {
  bottom: auto;
  top: -10px;
  border-width: 6px 5px 0 5px;
  border-color: rgba(15, 23, 42, 0.96) transparent transparent transparent;
  transform: translateX(-50%) translateY(-4px);
}
[data-tooltip-pos="top"]:hover::after,
[data-tooltip-pos="top"]:hover::before {
  transform: translateX(-50%) translateY(0);
}

[data-tooltip-pos="left"]::after {
  bottom: auto;
  top: 50%;
  left: auto;
  right: calc(100% + 8px);
  transform: translateY(-50%) translateX(4px);
}
[data-tooltip-pos="left"]::before {
  bottom: auto;
  top: 50%;
  left: auto;
  right: calc(100% + 2px);
  border-width: 5px 0 5px 6px;
  border-color: transparent transparent transparent rgba(15, 23, 42, 0.96);
  transform: translateY(-50%) translateX(4px);
}
[data-tooltip-pos="left"]:hover::after,
[data-tooltip-pos="left"]:hover::before {
  transform: translateY(-50%) translateX(0);
}

/* ==========================================================================
   DASHBOARD WELCOME BANNER & STATS OVERVIEW
   ========================================================================== */
.dashboard-welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.welcome-text-col,
.welcome-banner-main {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.welcome-heading,
.welcome-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  line-height: 1.2;
}

.welcome-wave {
  display: inline-block;
  animation: waveHand 2.2s infinite ease-in-out;
  transform-origin: 70% 70%;
}

@keyframes waveHand {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
  60% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

.welcome-subtitle,
.welcome-subtitle-inline {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 500;
  opacity: 0.85;
}

.welcome-banner-meta {
  display: flex;
  align-items: center;
}

.welcome-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
}

.welcome-date-icon {
  color: var(--brand-green, #22c55e);
  font-size: 0.85rem;
}

/* Stats Overview Grid - 6 Columns in 1 Row on Desktop */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 0;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

/* Stat Card Vibrant Color Themes matching Reference Image 2 */
.stat-card-total {
  border-color: rgba(59, 130, 246, 0.28);
  background: linear-gradient(145deg, rgba(30, 58, 138, 0.16) 0%, rgba(15, 23, 42, 0.75) 100%);
}
.stat-card-total:hover {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}
.stat-card-total .stat-value { color: #60a5fa; }

.stat-card-wip {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(145deg, rgba(180, 83, 9, 0.16) 0%, rgba(15, 23, 42, 0.75) 100%);
}
.stat-card-wip:hover {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2);
}
.stat-card-wip .stat-value { color: #fbbf24; }

.stat-card-completed {
  border-color: rgba(20, 184, 166, 0.28);
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.16) 0%, rgba(15, 23, 42, 0.75) 100%);
}
.stat-card-completed:hover {
  border-color: rgba(20, 184, 166, 0.6);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.2);
}
.stat-card-completed .stat-value { color: #2dd4bf; }

.stat-card-approved {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(145deg, rgba(21, 128, 61, 0.18) 0%, rgba(15, 23, 42, 0.75) 100%);
}
.stat-card-approved:hover {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.2);
}
.stat-card-approved .stat-value { color: #4ade80; }

.stat-card-hold {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(145deg, rgba(185, 28, 28, 0.16) 0%, rgba(15, 23, 42, 0.75) 100%);
}
.stat-card-hold:hover {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.2);
}
.stat-card-hold .stat-value { color: #f87171; }

.stat-card-earned {
  border-color: rgba(139, 92, 246, 0.28);
  background: linear-gradient(145deg, rgba(109, 40, 217, 0.16) 0%, rgba(15, 23, 42, 0.75) 100%);
}
.stat-card-earned:hover {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}
.stat-card-earned .stat-value { color: #a78bfa; }

/* Light theme card adjustments */
body.light-theme .stat-card-total { background: linear-gradient(145deg, #eff6ff 0%, #ffffff 100%); border-color: rgba(59, 130, 246, 0.3); }
body.light-theme .stat-card-total .stat-value { color: #2563eb; }
body.light-theme .stat-card-wip { background: linear-gradient(145deg, #fffbeb 0%, #ffffff 100%); border-color: rgba(245, 158, 11, 0.3); }
body.light-theme .stat-card-wip .stat-value { color: #d97706; }
body.light-theme .stat-card-completed { background: linear-gradient(145deg, #f0fdfa 0%, #ffffff 100%); border-color: rgba(20, 184, 166, 0.3); }
body.light-theme .stat-card-completed .stat-value { color: #0d9488; }
body.light-theme .stat-card-approved { background: linear-gradient(145deg, #f0fdf4 0%, #ffffff 100%); border-color: rgba(34, 197, 94, 0.3); }
body.light-theme .stat-card-approved .stat-value { color: #16a34a; }
body.light-theme .stat-card-hold { background: linear-gradient(145deg, #fef2f2 0%, #ffffff 100%); border-color: rgba(239, 68, 68, 0.3); }
body.light-theme .stat-card-hold .stat-value { color: #dc2626; }
body.light-theme .stat-card-earned { background: linear-gradient(145deg, #faf5ff 0%, #ffffff 100%); border-color: rgba(139, 92, 246, 0.3); }
body.light-theme .stat-card-earned .stat-value { color: #7c3aed; }

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.stat-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.stat-purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.35); }
.stat-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }
.stat-green { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.35); }
.stat-teal { background: rgba(20, 184, 166, 0.15); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.35); }
.stat-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.35); }
.stat-red { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35); }

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.stat-value {
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.stat-footer-hint,
.stat-footer-link {
  display: none !important;
}

/* Controls Bar & View Switchers */
.controls-bar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

.view-switchers-wrapper {
  margin-bottom: 0.5rem;
}

/* Controls Bar: Search & Filters */
.search-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.search-filter-find-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.search-filter-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border-light);
}

.search-box {
  position: relative;
  flex: 1 1 220px;
  max-width: 360px;
  min-width: 170px;
}

.search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 9px;
  padding: 0.45rem 2.6rem 0.45rem 2.25rem;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
  height: 36px;
}

.search-box input:focus {
  border-color: var(--brand-green-light);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.search-shortcut-badge {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 700;
  pointer-events: none;
}

.select-input {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 9px;
  color: var(--text-primary);
  padding: 0.4rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  outline: none;
  cursor: pointer;
  height: 36px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.select-input:hover {
  border-color: var(--border-active);
}

.select-input:focus {
  border-color: var(--brand-green-light);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* Colorful Status Dropdown matching Image 5 Reference */
.select-status-colorful {
  font-weight: 800 !important;
  letter-spacing: 0.03em;
}

.select-status-colorful option {
  background: #0f172a;
  color: #f8fafc;
  padding: 0.5rem;
  font-weight: 700;
}

.select-status-colorful option.opt-status-to-start {
  color: #60a5fa;
}

.select-status-colorful option.opt-status-wip {
  color: #fbbf24;
}

.select-status-colorful option.opt-status-completed {
  color: #34d399;
}

.select-status-colorful option.opt-status-approved {
  color: #4ade80;
}

.select-status-colorful option.opt-status-hold {
  color: #f59e0b;
}

.select-status-colorful option.opt-status-cancelled {
  color: #f87171;
}

body.light-theme .select-status-colorful option {
  background: #ffffff;
  color: #0f172a;
}
body.light-theme .select-status-colorful option.opt-status-to-start { color: #2563eb; }
body.light-theme .select-status-colorful option.opt-status-wip { color: #d97706; }
body.light-theme .select-status-colorful option.opt-status-completed { color: #059669; }
body.light-theme .select-status-colorful option.opt-status-approved { color: #047857; }
body.light-theme .select-status-colorful option.opt-status-hold { color: #ea580c; }
body.light-theme .select-status-colorful option.opt-status-cancelled { color: #dc2626; }

.btn-clear-filters {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 36px;
  padding: 0 0.75rem;
  border-radius: 9px;
  border: 1px dashed rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  white-space: nowrap;
}

.btn-clear-filters:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: #ef4444;
  color: #ffffff;
}

.btn-action-primary {
  height: 36px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--theme-brand-gradient, linear-gradient(135deg, #15803d 0%, #22c55e 100%));
  color: #ffffff;
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 14px var(--theme-primary-shadow, rgba(34, 197, 94, 0.3));
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  white-space: nowrap;
}

.btn-action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px var(--theme-primary-shadow, rgba(34, 197, 94, 0.45));
  filter: brightness(1.08);
}

.btn-action-secondary {
  height: 36px;
  padding: 0.4rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
  white-space: nowrap;
}

.btn-action-secondary:hover {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

/* ==========================================================================
   JOBS LIST VIEW / TABLE VIEW COMPONENT
   ========================================================================== */
.jobs-list-container {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  margin-bottom: 2rem;
}

.jobs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.jobs-table th {
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

body.light-theme .jobs-table th {
  background: #f1f5f9;
  color: #64748b;
}

.jobs-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  transition: background 0.15s ease;
}

.job-list-row {
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.job-list-row:hover {
  background: rgba(34, 197, 94, 0.05);
}

body.light-theme .job-list-row:hover {
  background: rgba(34, 197, 94, 0.08);
}

.job-list-row:last-child td {
  border-bottom: none;
}

.list-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #0f172a;
  border: 1px solid var(--border-light);
  display: block;
}

.list-thumb-logo {
  object-fit: contain !important;
  padding: 4px !important;
  background: rgba(37, 99, 235, 0.1) !important;
}

.list-job-num {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-green);
  background: rgba(34, 197, 94, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  display: inline-block;
  white-space: nowrap;
}

.list-file-name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.list-category-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  display: inline-block;
}

body.light-theme .list-category-tag {
  background: rgba(0, 0, 0, 0.05);
}

.list-version-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-green);
  background: rgba(34, 197, 94, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

body.light-theme .list-version-tag {
  background: rgba(34, 197, 94, 0.12);
}

.list-client-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.88rem;
}

.list-status-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: static !important;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  margin: 0 !important;
}

.list-assignee-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.14);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  white-space: nowrap;
}

.list-price-val {
  font-weight: 800;
  color: #38bdf8;
  white-space: nowrap;
}

/* List View Desktop vs Mobile Display */
.list-desktop-table {
  display: table !important;
  width: 100%;
}
.list-mobile-cards {
  display: none !important;
}

@media (max-width: 768px) {
  .list-desktop-table {
    display: none !important;
  }
  .list-mobile-cards {
    display: flex !important;
    flex-direction: column;
    width: 100%;
  }

  .mobile-job-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0.95rem;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    background: transparent;
    transition: background 0.15s ease;
    width: 100%;
    box-sizing: border-box;
  }

  .mobile-job-item:last-child {
    border-bottom: none;
  }

  .mobile-job-item:active {
    background: rgba(34, 197, 94, 0.08);
  }

  .mobile-job-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    background: #0f172a;
    border: 1px solid var(--border-light);
    flex-shrink: 0;
  }

  .mobile-job-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    overflow: hidden;
  }

  .mobile-job-row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
  }

  .mobile-job-row1 .list-job-num {
    font-size: 0.74rem;
    padding: 0.12rem 0.45rem;
    flex-shrink: 0;
  }

  .mobile-job-row1 .list-status-badge {
    font-size: 0.68rem !important;
    padding: 0.2rem 0.55rem !important;
    flex-shrink: 0 !important;
  }

  .mobile-job-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
  }

  .mobile-job-row3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    width: 100%;
  }

  .mobile-job-row3 .mobile-job-tags {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
  }

  .mobile-job-ver {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-green);
    flex-shrink: 0;
  }

  .mobile-job-price {
    font-weight: 800;
    color: #38bdf8;
    font-size: 0.84rem;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .mobile-job-row4 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.74rem;
    color: var(--text-muted);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    width: 100%;
  }

  .mobile-job-client {
    color: var(--text-main);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-job-assignee {
    font-weight: 700;
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.14);
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    font-size: 0.72rem;
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.job-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  cursor: pointer;
  position: relative;
  min-height: 335px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.job-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* Card Contained Image Header Wrapper (Refined 145px height for balanced proportions) */
.card-image-wrapper {
  position: relative;
  width: 100%;
  height: 145px;
  background: #090e17;
  overflow: hidden;
  flex-shrink: 0;
}

.card-image-wrapper .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.job-card:hover .card-image {
  transform: scale(1.04);
}

/* Fallback / Logo / Lot Container */
.card-image-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--theme-card-preview-bg, linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(11, 17, 30, 0.95)));
}

.card-logo-img {
  max-height: 65px !important;
  max-width: 170px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  margin: auto !important;
  display: block;
  transition: transform 0.4s ease;
}

.job-card:hover .card-logo-img {
  transform: scale(1.03);
}

/* Floating Hover Preview Overlay */
.card-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 18, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.job-card:hover .card-hover-overlay {
  opacity: 1;
  pointer-events: auto;
}

.card-hover-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
  transform: translateY(4px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.job-card:hover .card-hover-preview-btn {
  transform: translateY(0);
}

.card-hover-preview-btn:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* Floating Badges in Image Header */
.card-category-tag {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  background: rgba(10, 17, 32, 0.82);
  backdrop-filter: blur(8px);
  color: #34d399;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid rgba(52, 211, 153, 0.35);
  z-index: 3;
}

.card-status-badge {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  z-index: 3;
  backdrop-filter: blur(8px);
}

/* 2-Layer Grouped Job Card (Stacked effect) */
.job-card-grouped {
  border-top: 3px solid #3b82f6 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 4px 4px 0 0 rgba(59, 130, 246, 0.45), 8px 8px 0 0 rgba(16, 185, 129, 0.3) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.job-card-grouped:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 5px 5px 0 0 rgba(59, 130, 246, 0.6), 10px 10px 0 0 rgba(16, 185, 129, 0.45) !important;
  border-color: #60a5fa !important;
}

.job-card-grouped.expanded {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5), 0 8px 25px rgba(59, 130, 246, 0.3) !important;
}

body.light-theme .job-card-grouped {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08), 4px 4px 0 0 rgba(59, 130, 246, 0.35), 8px 8px 0 0 rgba(16, 185, 129, 0.2) !important;
}

/* Group Badge */
.job-group-count-tag {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  color: #ffffff;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 2;
}

/* Accordion Full-Width Sub-Jobs Container */
.job-group-accordion-panel {
  grid-column: 1 / -1;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(59, 130, 246, 0.35);
  border-radius: 14px;
  padding: 1.35rem;
  margin: -0.5rem 0 0.75rem 0;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.45);
  animation: accordionSlideDown 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme .job-group-accordion-panel {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(15, 23, 42, 0.08);
}

.sub-jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

@keyframes accordionSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px) scaleY(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

/* User exact status colors: 
   1. TO START = Blue 
   2. WIP = Amber 
   3. Completed = Mint Green 
   4. Approved = Emerald Green 
   5. Cancelled = Red 
*/
/* User exact status colors (Refined, subtle pills matching reference design) */
.status-to-start { background: rgba(59, 130, 246, 0.12); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.25); }
.status-wip { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.25); }
.status-completed { background: rgba(52, 211, 153, 0.12); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.25); }
.status-approved { background: rgba(16, 185, 129, 0.12); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.25); }
.status-hold { background: rgba(249, 115, 22, 0.12); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.25); }
.status-cancelled { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.25); }

.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 5px currentColor;
  flex-shrink: 0;
}

.modal-status-badge {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: static !important;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  outline: none;
  cursor: pointer;
  text-align: center;
  text-align-last: center;
  -webkit-appearance: none;
  appearance: none;
  transition: var(--transition-fast);
}

select.modal-status-badge option {
  background: #0f172a;
  color: #f8fafc;
  font-weight: 600;
  text-align: center;
}

/* Card Body Structured Content (Compact & polished for 15-20% height reduction) */
.card-body {
  position: relative;
  z-index: 2;
  padding: 0.85rem 1rem 0.95rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.52rem;
  flex: 1 1 auto;
  background: transparent;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-file-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}

.card-menu-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.15rem;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

.card-menu-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.card-client-assignee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.card-client-info {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.card-client-info svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.card-client-name-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-assignees-stack {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.assignee-avatar-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 1.5px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: #e2e8f0;
  margin-left: -5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.assignee-avatar-circle:first-child {
  margin-left: 0;
}

.assignee-avatar-more {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  border: 1.5px solid var(--bg-card);
  color: #22c55e;
  font-size: 0.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}

/* Assignee Pill Badge with Full Name matching Image 3 Reference */
.assignee-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  border-radius: 9999px;
  padding: 0.15rem 0.55rem 0.15rem 0.2rem;
  max-width: 125px;
  transition: all 0.2s ease;
}

.assignee-pill-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.assignee-pill-badge .assignee-avatar-circle {
  margin-left: 0 !important;
  width: 20px;
  height: 20px;
  font-size: 0.58rem;
  border: none;
}

.assignee-full-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.light-theme .assignee-pill-badge {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.card-metadata-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.14rem 0.45rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.card-meta-item svg {
  color: var(--text-muted);
}

.card-progress-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0.05rem 0;
}

.card-progress-bar-track {
  flex: 1 1 auto;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.card-progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.progress-color-green {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.progress-color-amber {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.progress-color-blue {
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
}

.progress-color-purple {
  background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%);
}

.card-progress-percent,
.card-progress-pct-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 58px;
  text-align: right;
  white-space: nowrap;
}

.card-footer-info {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.card-price-container {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.card-price-label {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-price-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #34d399;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.card-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand-green, #22c55e);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.28);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.card-action-btn:hover {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.55);
  color: #34d399;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.card-action-btn.action-workspace {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.28);
}

.card-action-btn.action-workspace:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.55);
  color: #93c5fd;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

body.light-theme .card-action-btn {
  background: #f0fdf4;
  border-color: rgba(22, 163, 74, 0.35);
  color: #16a34a;
}

body.light-theme .card-action-btn.action-workspace {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.35);
  color: #2563eb;
}

body.modal-open {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none;
}

/* Modal Overlay & Dialog */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 8, 18, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
  overscroll-behavior: contain !important;
}

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

.modal-container {
  background: #0d172a;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 94vw;
  max-width: 540px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overscroll-behavior: contain !important;
}

@keyframes modalSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 23, 42, 0.95);
  backdrop-filter: blur(8px);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

/* Detail View Content */
.detail-hero {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: #080c14;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-hero-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* Detail View Grid V2 Layout */
.detail-grid-v2 {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.detail-row-paired {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  width: 100%;
}

.detail-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.detail-item.full-width {
  grid-column: 1 / -1;
  width: 100%;
}

.detail-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: 0.04em;
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-notes-box {
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.detail-notes-content {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  white-space: pre-line;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
  box-sizing: border-box;
}

.form-group > .form-input,
.form-group > .form-select,
.form-group > .form-textarea,
.form-group > div > .form-input,
.form-group > div > .form-select {
  width: 100%;
  box-sizing: border-box;
}

.lot-toolbar-select {
  width: auto;
  max-width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand-green-light);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.25);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(43, 122, 66, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline-sheet {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #34d399;
}

.btn-outline-sheet:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

/* User Profile & Menu Dropdown */
.user-menu-wrapper {
  position: relative;
  display: inline-block;
}

.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  padding: 0.3rem 0.75rem 0.3rem 0.35rem;
  border-radius: 9999px;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.user-avatar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.user-nav-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  text-align: left;
}

.user-nav-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-nav-email {
  font-size: 0.72rem;
  color: var(--text-muted);
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-nav-chevron {
  opacity: 0.65;
  margin-left: 0.15rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.user-avatar-btn:hover .user-nav-chevron {
  opacity: 1;
}

@media (max-width: 768px) {
  .user-nav-details {
    display: none !important;
  }
  .user-nav-chevron {
    display: none !important;
  }
  .user-avatar-btn {
    padding: 0.25rem !important;
    gap: 0 !important;
  }
}

/* Users Management Modal Responsive Layout */
.users-mobile-cards {
  display: none;
}

@media (max-width: 640px) {
  .users-desktop-table {
    display: none !important;
  }
  .users-mobile-cards {
    display: block !important;
    padding: 0.85rem !important;
  }
  .users-modal-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    padding: 0.9rem 1rem !important;
  }
  .users-modal-header-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
  }
  .users-modal-actions {
    display: flex !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }
  .users-modal-actions .btn {
    flex: 1 !important;
    justify-content: center !important;
    padding: 0.45rem 0.5rem !important;
    font-size: 0.8rem !important;
  }
  .desktop-only-close {
    display: none !important;
  }
  .mobile-only-close {
    display: block !important;
  }
}

.user-dropdown {
  display: none !important;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  min-width: 170px;
  padding: 0.5rem;
  z-index: 1000;
  flex-direction: column;
  gap: 0.3rem;
}

.user-dropdown.show {
  display: flex !important;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
}

.user-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.user-dropdown-danger {
  color: #f87171;
}

.user-dropdown-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Authentication Screen */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.brand-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--brand-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 900;
  margin-bottom: 1rem;
  box-shadow: 0 0 25px rgba(43, 122, 66, 0.5);
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 800;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

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

.auth-divider::before { margin-right: 1rem; }
.auth-divider::after { margin-left: 1rem; }

/* AccessKey Security & iPhone Passcode Lock Screen Styles */
.accesskey-iphone-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 28px;
  padding: 1.85rem 1.65rem 1.4rem 1.65rem;
  width: 100%;
  max-width: 340px;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
  box-sizing: border-box;
}

.accesskey-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.accesskey-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
}

.accesskey-dots-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  margin: 0.25rem 0 1.25rem 0;
}

.accesskey-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme .accesskey-dot {
  border-color: #94a3b8;
}

.accesskey-dot.filled {
  background: #10b981;
  border-color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.65);
  transform: scale(1.15);
}

.accesskey-error-msg {
  color: #f87171;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  min-height: 1.1rem;
  text-align: center;
}

/* iPhone 3x4 Keypad Grid */
.iphone-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem 1.2rem;
  width: 100%;
  max-width: 260px;
  margin: 0 auto 1.1rem auto;
}

.keypad-btn {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: all 0.12s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  margin: 0 auto;
  box-sizing: border-box;
}

body.light-theme .keypad-btn {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.keypad-btn:active, .keypad-btn.key-pressed {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  transform: scale(0.92);
}

.keypad-btn .num {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}

.keypad-btn .letters {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  line-height: 1;
  margin-top: 2px;
}

.keypad-btn-backspace {
  background: transparent !important;
  border: none !important;
  color: var(--text-muted);
}

.keypad-btn-backspace:active {
  color: #f87171 !important;
  transform: scale(0.92);
}

.keypad-btn-biometric {
  background: rgba(59, 130, 246, 0.08) !important;
  border: 1px solid rgba(59, 130, 246, 0.25) !important;
  color: #60a5fa !important;
}

body.light-theme .keypad-btn-biometric {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #2563eb !important;
}

.keypad-btn-biometric:hover {
  background: rgba(59, 130, 246, 0.18) !important;
  border-color: #3b82f6 !important;
}

.keypad-btn-biometric:active, .keypad-btn-biometric.key-pressed {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
  transform: scale(0.92);
}

.btn-biometric-pill:hover {
  background: rgba(59, 130, 246, 0.22) !important;
  border-color: #3b82f6 !important;
  transform: translateY(-1px);
}

.btn-biometric-pill:active {
  transform: scale(0.96);
}

.accesskey-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.accesskey-link-btn {
  font-size: 0.78rem;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0;
  font-weight: 500;
  transition: color 0.15s;
}

.accesskey-link-btn:hover {
  color: #60a5fa;
  text-decoration: underline;
}

.accesskey-user-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  padding: 0.35rem 0.8rem;
  margin: 0 auto 0.95rem auto;
  max-width: fit-content;
}

body.light-theme .accesskey-user-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.accesskey-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.accesskey-user-info {
  text-align: left;
}

.accesskey-user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
}

.accesskey-user-email {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.1;
}

.accesskey-numeric-input {
  transition: all 0.2s ease;
}

.accesskey-numeric-input:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
}

@keyframes accessKeyShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.shake-error {
  animation: accessKeyShake 0.4s ease-in-out;
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-lg);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.empty-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Code Display Box */
.code-box {
  background: #060913;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: monospace;
  font-size: 0.78rem;
  color: #a7f3d0;
  max-height: 220px;
  overflow-y: auto;
  white-space: pre;
}

/* Floating Action Button (FAB) for Adding New Jobs - Removed per user preference */
.fab-add-btn {
  display: none !important;
}

/* Floating Scroll to Top Button */
.scroll-to-top-btn {
  position: fixed;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.92);
  color: #34d399;
  border: 1.5px solid rgba(52, 211, 153, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 14px rgba(52, 211, 153, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(10px);
}

.scroll-to-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.scroll-to-top-btn:hover {
  background: rgba(27, 48, 84, 0.95);
  color: #ffffff;
  border-color: #34d399;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 20px rgba(52, 211, 153, 0.45);
}

.scroll-to-top-btn:active {
  transform: translateY(0) scale(0.95);
}

/* Standalone position */
.scroll-to-top-btn.standalone {
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  right: 28px;
  width: 44px;
  height: 44px;
}

/* Light Theme Support */
body.light-theme .scroll-to-top-btn {
  background: rgba(255, 255, 255, 0.95);
  color: #059669;
  border: 1.5px solid rgba(5, 150, 105, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 12px rgba(16, 185, 129, 0.2);
}

body.light-theme .scroll-to-top-btn:hover {
  background: #f0fdf4;
  color: #047857;
  border-color: #059669;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2), 0 0 16px rgba(16, 185, 129, 0.3);
}

@media (max-width: 640px) {
  .fab-add-btn {
    display: none !important;
  }
  .scroll-to-top-btn,
  .scroll-to-top-btn.standalone {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    right: 18px !important;
    width: 44px;
    height: 44px;
  }
}

/* Pull to Refresh Mobile Indicator */
.pull-refresh-box {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 50%;
  transform: translate(-50%, -70px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(43, 122, 66, 0.5);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  z-index: 10000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.pull-refresh-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #34d399;
  font-size: 0.82rem;
  font-weight: 700;
}

.pull-refresh-icon {
  transition: transform 0.2s ease;
}

.pull-refresh-box.ready .pull-refresh-icon {
  transform: rotate(180deg);
}

/* Responsive Adjustments for Mobile Web Browsers & Devices */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  .stats-grid .stat-card {
    grid-column: span 1 !important;
    padding: 0.6rem 0.5rem !important;
    gap: 0.4rem !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .stats-grid .stat-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 8px !important;
  }

  .stats-grid .stat-icon svg {
    width: 17px !important;
    height: 17px !important;
  }

  .stats-grid .stat-label {
    font-size: 0.64rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .stats-grid .stat-value {
    font-size: clamp(0.8rem, 3.4vw, 0.96rem) !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.15 !important;
  }
}

@media (max-width: 640px) {
  .app-container {
    padding: 0 0.75rem 1rem 0.75rem;
  }

  .navbar {
    padding: 0.65rem 0.85rem;
    margin-bottom: 1.25rem;
  }

  .navbar-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .brand-logo img {
    max-height: 28px;
  }

  .auth-wrapper {
    padding: 0.75rem;
  }

  .auth-card {
    width: 100%;
    max-width: 100%;
    padding: 1.75rem 1.25rem;
    box-sizing: border-box;
  }

  .controls-bar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .view-switchers-wrapper {
    width: 100% !important;
    justify-content: center !important;
    margin: 0 auto !important;
    text-align: center !important;
  }

  .view-switcher-container {
    margin: 0 auto !important;
  }

  .search-filter-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
  }

  .search-filter-find-group,
  .search-filter-actions-group {
    width: 100% !important;
  }

  .search-box {
    width: 100% !important;
    max-width: 100% !important;
  }

  .select-input {
    flex: 1 1 120px !important;
  }

  .fab-add-btn {
    width: 52px !important;
    height: 52px !important;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: 50% !important;
  }

  .fab-label,
  .fab-chevron {
    display: none !important;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  #modal-invoice-overlay {
    padding: 0.75rem 0.5rem 3rem 0.5rem !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .invoice-modal-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .invoice-modal-controls {
    margin: 0 0 0.75rem 0 !important;
  }

  .invoice-sheet-scroll-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  .modal-overlay {
    padding: 0.5rem;
  }

  .modal-container {
    width: 96vw;
    max-width: 96vw;
    max-height: 92vh;
    border-radius: var(--radius-md);
  }

  .modal-body {
    padding: 0.85rem;
  }

  .detail-row-paired {
    gap: 0.5rem;
  }

  .detail-item {
    padding: 0.65rem 0.75rem;
  }

  .refresh-text {
    display: none;
  }
}

/* ==========================================================================
   S2SS CREATIVE BRAND LOGO LOADER OVERLAY
   ========================================================================== */
.app-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 12, 20, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: auto;
}

.app-loader-overlay.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.app-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2.5rem 3rem;
  background: rgba(27, 48, 84, 0.4);
  border: 1px solid rgba(43, 122, 66, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(43, 122, 66, 0.25);
  text-align: center;
}

.logo-loader-container {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-spinner-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3.5px solid rgba(43, 122, 66, 0.2);
  border-top-color: #34d399;
  border-right-color: #22c55e;
  border-radius: 50%;
  box-sizing: border-box;
  -webkit-animation: logoSpinnerRotate 0.9s linear infinite;
  animation: logoSpinnerRotate 0.9s linear infinite;
  will-change: transform;
}

@-webkit-keyframes logoSpinnerRotate {
  0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes logoSpinnerRotate {
  0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

.logo-pulse-img {
  width: 70px;
  height: auto;
  object-fit: contain;
  -webkit-animation: logoPulseGlow 1.8s ease-in-out infinite;
  animation: logoPulseGlow 1.8s ease-in-out infinite;
  will-change: transform, filter;
  filter: drop-shadow(0 0 12px rgba(43, 122, 66, 0.5));
}

@-webkit-keyframes logoPulseGlow {
  0%, 100% {
    -webkit-transform: scale(0.94);
    transform: scale(0.94);
    filter: drop-shadow(0 0 8px rgba(43, 122, 66, 0.4));
  }
  50% {
    -webkit-transform: scale(1.08);
    transform: scale(1.08);
    filter: drop-shadow(0 0 24px rgba(52, 211, 153, 0.9));
  }
}

@keyframes logoPulseGlow {
  0%, 100% {
    -webkit-transform: scale(0.94);
    transform: scale(0.94);
    filter: drop-shadow(0 0 8px rgba(43, 122, 66, 0.4));
  }
  50% {
    -webkit-transform: scale(1.08);
    transform: scale(1.08);
    filter: drop-shadow(0 0 24px rgba(52, 211, 153, 0.9));
  }
}

.logo-loader-text {
  font-family: var(--font-tagline);
  font-size: 1.4rem;
  font-weight: 700;
  color: #60a5fa;
  letter-spacing: 0.5px;
  animation: taglineShimmer 1.8s infinite ease-in-out;
}

.logo-loader-subtext {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-top: 0.2rem;
}

@keyframes taglineShimmer {
  0%, 100% { opacity: 0.7; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

.spin-icon {
  animation: spinIcon 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spinIcon {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* App Footer Component */
.app-footer {
  margin-top: 1.25rem;
  padding: 1.1rem 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.footer-left {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-logo {
  height: 26px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.4));
}

.footer-tagline {
  font-family: var(--font-tagline);
  color: #60a5fa;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.footer-tagline .tagline-imagine {
  color: var(--theme-primary-light, #22c55e);
}

body.light-theme .footer-tagline .tagline-imagine {
  color: var(--theme-primary, #2b7a42);
}

.footer-center {
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-version-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
  opacity: 0.65;
}

.footer-right {
  flex: 1;
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-link {
  color: #34d399;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: #60a5fa;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    width: 100%;
  }

  .footer-left {
    order: 1;
    width: auto;
    flex: initial;
    justify-content: flex-start;
  }

  .footer-center {
    order: 2;
    width: auto;
    flex: initial;
    text-align: right;
    justify-content: flex-end;
  }

  .footer-right {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    text-align: center;
    margin-top: 0.35rem;
    padding-top: 0.4rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
  }
}

/* ==========================================================================
   INVOICE / BILL GENERATOR STYLES (MATCHES S2SS-Bill.pdf LAYOUT)
   ========================================================================== */

#modal-invoice-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 100002 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  overflow-y: auto !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 2rem 1rem !important;
  background: rgba(4, 8, 18, 0.92) !important;
  backdrop-filter: blur(12px) !important;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

#modal-invoice-overlay::-webkit-scrollbar,
.invoice-modal-container::-webkit-scrollbar,
.invoice-sheet::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.invoice-modal-container,
body.light-theme .invoice-modal-container {
  max-width: 820px !important;
  width: 100% !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
  border-radius: 0 !important;
  margin: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.invoice-modal-controls {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  background: rgba(15, 23, 42, 0.95);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

body.light-theme .invoice-modal-controls {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}

body.light-theme #btn-close-invoice {
  color: #0f172a !important;
}

.invoice-sheet-scroll-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

.invoice-sheet, #printable-invoice-sheet, .print-chunk-page {
  width: 760px !important;
  min-width: 760px !important;
  max-width: 760px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  border-radius: 0 !important;
  padding: 1.25rem 1.5rem 0 1.5rem !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
  font-family: var(--font-body);
  position: relative;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Ensure proper margin for multi‑page chunks */
.print-chunk-page.invoice-sheet {
  margin: 0 !important;
}

/* Prevent payment terms and footer from breaking across pages */
.inv-payment-box,
.inv-footer-banner {
  page-break-inside: avoid;
}
/* Ensure payment box and footer stay together */
.inv-payment-box {
  page-break-after: avoid;
}
.inv-footer-banner {
  page-break-before: avoid;
}
/* Ensure footer stays at bottom without extra space */
.inv-print-footer {
  margin-top: auto !important;
  flex-shrink: 0 !important;
}

/* Ensure body expands to fill available space on mobile print */
.inv-print-body {
  flex: 1 0 auto !important;
}

.inv-grid-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  margin-bottom: 0.85rem;
  box-sizing: border-box;
}

.inv-print-body {
  flex-grow: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

.inv-print-footer {
  margin-top: auto !important;
  flex-shrink: 0 !important;
  width: 100% !important;
}

.inv-footer-banner {
  background: transparent !important;
  color: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  margin: 0.6rem -1.5rem 0 -1.5rem !important;
  width: auto !important;
  box-sizing: border-box !important;
  border-radius: 0 !important;
  border: none !important;
  overflow: visible !important;
}

/* HEADER ROW */
.inv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid #2b7a42;
  padding-bottom: 0.35rem;
}

.inv-brand-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.inv-logo {
  max-height: 82px;
  width: auto;
  object-fit: contain;
}

.inv-meta-box {
  text-align: right;
}

.inv-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: #1b3054;
  letter-spacing: 1px;
  margin: 0;
  line-height: 1;
}

.inv-meta-line {
  width: 35px;
  height: 3px;
  background: #2b7a42;
  border-radius: 2px;
  margin: 0.25rem 0 0.35rem auto;
}

.inv-meta-table {
  font-size: 0.8rem;
  color: #334155;
}

.inv-meta-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}

.inv-meta-label {
  font-weight: 600;
  color: #475569;
}

.inv-meta-val {
  font-weight: 700;
  color: #0f172a;
}

/* DUAL ADDRESS CARDS: FROM | BILL TO */
.inv-addresses-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.inv-card {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  background: #f8fafc;
}

.inv-card-header {
  background: #1b3054;
  color: #ffffff;
  padding: 0.3rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.inv-card-body {
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.4;
}

.inv-company-name, .inv-client-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #2b7a42;
  margin-bottom: 0.25rem;
}

.inv-sub-tag {
  font-weight: 400;
  font-size: 0.78rem;
  color: #64748b;
}

.inv-contact-line {
  margin-bottom: 0.2rem;
}

/* LINE ITEMS TABLE */
.inv-table-wrapper {
  margin-bottom: 0.15rem !important;
}

.inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.inv-table th {
  background: #1b3054;
  color: #ffffff;
  padding: 0.6rem 0.75rem;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  border: 1px solid #1b3054;
}

.inv-table td {
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

.inv-table tr.blank-row td {
  height: 28px;
}

.inv-totals-row-theme td {
  background: #1b3054 !important;
  color: #ffffff !important;
}

/* BOTTOM SECTION: PAYMENT & TOTALS GRID */
.inv-bottom-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.inv-payment-box {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  background: #f8fafc;
  margin-bottom: 0.85rem;
}

.inv-payment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.35rem;
}

.inv-upi-details {
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.inv-upi-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.upi-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: #ffffff;
}
.upi-pill.bhim { background: #00457c; }
.upi-pill.gpay { background: #4285f4; }
.upi-pill.phonepe { background: #5f259f; }
.upi-pill.paytm { background: #00baf2; }

.inv-words-box {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  background: #ffffff;
  margin-bottom: 0.75rem;
}
.inv-words-label { font-size: 0.7rem; font-weight: 700; color: #2b7a42; }
.inv-words-val { font-size: 0.82rem; font-weight: 600; color: #0f172a; }

.inv-note-box {
  font-size: 0.75rem;
  color: #475569;
  font-style: italic;
  line-height: 1.4;
  border-left: 3px solid #2b7a42;
  padding-left: 0.6rem;
  margin-bottom: 0.5rem;
}

.inv-terms-link {
  font-size: 0.72rem;
  color: #2563eb;
  font-weight: 600;
}

/* RIGHT TOTALS & SEAL */
.inv-totals-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  margin-bottom: 1rem;
}

.inv-totals-table td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.inv-totals-table td.num-col {
  text-align: right;
  font-weight: 600;
  color: #0f172a;
}

.inv-total-row td {
  background: #1b3054 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 0.95rem !important;
}

/* AUTHORIZED DIGITAL SEAL BADGE */
.inv-seal-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.5rem;
}

.inv-seal-badge {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px double #2b7a42;
  padding: 3px;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(43, 122, 66, 0.15);
}

.seal-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid #1b3054;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
}

.seal-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  margin-bottom: 2px;
}

.seal-text-top {
  font-size: 0.55rem;
  font-weight: 800;
  color: #1b3054;
  letter-spacing: 0.5px;
}

.seal-text-sub {
  font-size: 0.45rem;
  font-weight: 700;
  color: #2b7a42;
}

.seal-tagline {
  font-family: var(--font-tagline);
  font-size: 0.65rem;
  color: #1b3054;
}

.seal-caption {
  font-size: 0.68rem;
  font-weight: 700;
  color: #2b7a42;
  margin-top: 0.35rem;
  letter-spacing: 0.5px;
}



.inv-banner-left {
  font-weight: 800;
  letter-spacing: 1px;
}

.inv-banner-center {
  font-family: var(--font-tagline);
  font-size: 1.1rem;
  color: #60a5fa;
}

.inv-banner-right {
  font-size: 0.72rem;
  color: #94a3b8;
}

.inv-banner-right span {
  color: #34d399;
  font-weight: 700;
}

#modal-invoice-overlay {
  background: rgba(4, 8, 18, 0.95);
  backdrop-filter: blur(12px);
  padding: 1.5rem 1rem 4rem 1rem;
  box-sizing: border-box;
}

body.light-theme #modal-invoice-overlay {
  background: rgba(241, 245, 249, 0.95);
  backdrop-filter: blur(12px);
  padding: 1.5rem 1rem 4rem 1rem;
  box-sizing: border-box;
}

/* PRINT MEDIA STYLES FOR CLEAN 1-PAGE PDF (FLEX LAYOUT PINNED FOOTER FOR ANY DEVICE / PAPER SIZE) */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  /* 1. Hide main app and dashboard grid to eliminate 28 duplicate pages */
  body > *:not(#modal-root):not(#printable-invoice-sheet):not(.invoice-sheet):not(.invoice-sheet-page):not(.print-chunk-page):not(#img-print-container) {
    display: none !important;
  }

  #app-root, header, nav, main, footer, .app-header, .app-nav, .dashboard-grid, .job-card, .sidebar, #modal-detail-overlay {
    display: none !important;
  }

  html, body, #modal-root, #modal-invoice-overlay, .modal-overlay, .modal-container, .invoice-modal-container, .invoice-sheet-scroll-wrapper {
    background: #ffffff !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  .invoice-modal-controls {
    display: none !important;
  }

  #printable-invoice-sheet, #printable-invoice-sheet * {
    visibility: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  .invoice-sheet, #printable-invoice-sheet {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 5mm 7mm 0 7mm !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    height: 100vh !important;
    justify-content: space-between !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    page-break-after: avoid !important;
  }

  /* 1. Print Header */
  .inv-print-header {
    flex-shrink: 0 !important;
    width: 100% !important;
  }

  .inv-header {
    margin-bottom: 0.35rem !important;
  }

  .inv-addresses-row {
    margin-bottom: 0.35rem !important;
  }

  /* 2. Print Body (Table & Amount in Words) */
  .inv-print-body {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .inv-table-wrapper {
    width: 100% !important;
    margin-bottom: 0 !important;
  }

  .inv-table {
    width: 100% !important;
    border-collapse: collapse !important;
    page-break-inside: auto !important;
  }

  .inv-table tr {
    page-break-inside: avoid !important;
  }

  .inv-table th {
    background: #1b3054 !important;
    color: #ffffff !important;
    font-size: 0.82rem !important;
    padding: 0.45rem 0.65rem !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .inv-table td {
    padding: 0.38rem 0.65rem !important;
    font-size: 0.83rem !important;
  }

  .inv-table tr.blank-row {
    display: table-row !important;
    height: 38px !important;
    min-height: 38px !important;
  }

  .inv-table tr.blank-row td {
    height: 38px !important;
    min-height: 38px !important;
  }

  .inv-totals-bar {
    background: #1b3054 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    page-break-inside: avoid !important;
  }

  /* 3. Print Footer Pinned to Bottom */
  .inv-print-footer {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    width: 100% !important;
    page-break-inside: avoid !important;
  }

  .inv-bottom-grid {
    margin-top: 0.4rem !important;
    margin-bottom: 0 !important;
  }

  .inv-footer-banner {
    margin-top: 0.4rem !important;
    margin-left: -7mm !important;
    margin-right: -7mm !important;
    margin-bottom: 0 !important;
    width: auto !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    page-break-inside: avoid !important;
  }

  .inv-card-header {
    background: #1b3054 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .inv-words-card {
    border: 1.5px solid #2b7a42 !important;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .inv-words-badge-icon {
    background: #2b7a42 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* INVOICE PREVIEW CONTAINER & AUTO-FIT SCALE WRAPPER */
.invoice-sheet-scroll-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden !important;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
  background: transparent;
}

.invoice-sheet-scroll-wrapper::-webkit-scrollbar {
  display: none !important;
  height: 0 !important;
}

@media (max-width: 768px) {
  #modal-invoice-overlay {
    padding: 0.65rem 0.35rem !important;
  }

  .invoice-modal-controls {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    padding: 0.55rem 0.75rem !important;
    gap: 0.5rem !important;
  }

  .invoice-sheet {
    width: 760px !important;
    min-width: 760px !important;
    max-width: 760px !important;
    box-sizing: border-box !important;
    transform-origin: top center !important;
    transition: transform 0.15s ease, margin-bottom 0.15s ease !important;
  }

  /* Position toast notification popup above the floating action button on mobile app */
  #toast-container {
    top: auto !important;
    bottom: 5.5rem !important;
    right: 1.25rem !important;
    left: auto !important;
    transform: none !important;
    width: calc(100% - 2.5rem) !important;
    max-width: 360px !important;
  }

  #toast-container .app-live-toast {
    animation: toastSlideInBottom 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }
}

/* Live Toast Notification Keyframe Animations */
@keyframes toastSlideInBottom {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Live Toast Notification Keyframe Animations */
@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

/* ==========================================================================
   JOB PICKER (GENERATE BILL) MODAL THEME & MOBILE RESPONSIVE STYLES
   ========================================================================== */

/* Mobile Responsive Grid Override for Job Picker Modal */
@media (max-width: 768px) {
  #job-picker-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
}

/* Light Theme Color Overrides (Changes ONLY colors when in Light Theme, 0 changes to design/layout) */
body.light-theme #modal-job-picker-overlay {
  background-color: rgba(15, 23, 42, 0.45) !important;
  background: rgba(15, 23, 42, 0.45) !important;
}

body.light-theme #modal-job-picker-overlay .job-picker-container {
  background-color: #ffffff !important;
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
}

body.light-theme #modal-job-picker-overlay .job-picker-header {
  background-color: #f8fafc !important;
  background: #f8fafc !important;
  border-bottom-color: #e2e8f0 !important;
}

body.light-theme #modal-job-picker-overlay .job-picker-header-title,
body.light-theme #modal-job-picker-overlay h2 {
  color: #0f172a !important;
}

body.light-theme #modal-job-picker-overlay .job-picker-header-sub {
  color: #64748b !important;
}

body.light-theme #modal-job-picker-overlay #btn-close-job-picker {
  color: #64748b !important;
}

body.light-theme #modal-job-picker-overlay .job-picker-search-bar {
  background-color: #f8fafc !important;
  background: #f8fafc !important;
  border-bottom-color: #e2e8f0 !important;
}

body.light-theme #modal-job-picker-overlay #input-search-picker-job {
  background-color: #ffffff !important;
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-theme #modal-job-picker-overlay #input-search-picker-job::placeholder {
  color: #94a3b8 !important;
}

body.light-theme #modal-job-picker-overlay .job-picker-card {
  background-color: #ffffff !important;
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
}

body.light-theme #modal-job-picker-overlay .job-picker-card-title {
  color: #0284c7 !important;
}

body.light-theme #modal-job-picker-overlay .job-picker-card-client {
  color: #0f172a !important;
}

body.light-theme #modal-job-picker-overlay .job-picker-card-summary,
body.light-theme #modal-job-picker-overlay .job-picker-card-label {
  color: #64748b !important;
}

/* Mobile Responsive Job Picker Modal Adjustments (Strictly Mobile Only) */
@media (max-width: 768px) {
  #modal-job-picker-overlay {
    padding: 0.65rem !important;
  }

  #modal-job-picker-overlay .job-picker-container {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 14px !important;
  }

  #modal-job-picker-overlay .job-picker-header {
    padding: 1rem 1rem !important;
  }

  #modal-job-picker-overlay .job-picker-header-title {
    font-size: 1.05rem !important;
  }

  #modal-job-picker-overlay .job-picker-search-bar {
    padding: 0.75rem 1rem !important;
  }

  #modal-job-picker-overlay .modal-body {
    padding: 0.85rem 0.85rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  #modal-job-picker-overlay #job-picker-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #modal-job-picker-overlay .job-picker-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.9rem 0.9rem !important;
  }
}

/* ==========================================================================
   JOB TRACKING DASHBOARD & VIEW SWITCHER TABS STYLES
   ========================================================================== */

/* View Switcher Container & Tabs */
.view-switcher-container {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  gap: 4px;
  flex-shrink: 0;
}

.view-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border: none !important;
  outline: none !important;
  background: transparent;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.view-switch-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.view-switch-btn.active {
  background: var(--theme-tab-active, linear-gradient(135deg, #1b3054 0%, #2b7a42 100%)) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px var(--theme-primary-shadow, rgba(43, 122, 66, 0.3)) !important;
}

.header-add-job-btn {
  background: var(--theme-brand-gradient, linear-gradient(135deg, #15803d 0%, #22c55e 100%)) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--theme-primary-shadow, rgba(34, 197, 94, 0.35)) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.header-add-job-btn:hover {
  filter: brightness(1.12) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px var(--theme-primary-shadow, rgba(34, 197, 94, 0.45)) !important;
  color: #ffffff !important;
}

.header-add-job-btn:active {
  transform: translateY(0) scale(0.98) !important;
  box-shadow: 0 2px 6px var(--theme-primary-shadow, rgba(34, 197, 94, 0.3)) !important;
}

/* Kanban Board Layout Grid */
.tracking-board-wrapper {
  width: 100%;
  margin-top: 1.25rem;
}

.tracking-board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(270px, 1fr));
  gap: 1.15rem;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1200px) {
  .tracking-board-grid {
    grid-template-columns: repeat(4, 290px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
  }
  .tracking-column {
    scroll-snap-align: start;
  }
}

@media (max-width: 640px) {
  .tracking-board-grid,
  .batch-kanban-grid {
    display: flex;
    flex-direction: column;
    overflow-x: visible;
    gap: 1rem;
  }
  .tracking-column,
  .batch-kanban-column {
    height: auto !important;
    min-height: 250px !important;
    max-height: 540px !important;
  }
}

/* Kanban Column Base (Dark Theme Default) - Container background #0d1527 */
.tracking-column {
  background: #0d1527;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 260px);
  min-height: 520px;
  overflow: hidden;
}

.tracking-column[data-stage="TO START"] { border-top: 4px solid #3b82f6; }
.tracking-column[data-stage="WIP"] { border-top: 4px solid #f59e0b; }
.tracking-column[data-stage="Completed"] { border-top: 4px solid #10b981; }
.tracking-column[data-stage="Approved"] { border-top: 4px solid #8b5cf6; }

.tracking-column-header {
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tracking-column-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-heading, sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
}

.tracking-column-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.tracking-column[data-stage="TO START"] .tracking-column-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.tracking-column[data-stage="WIP"] .tracking-column-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.tracking-column[data-stage="Completed"] .tracking-column-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.tracking-column[data-stage="Approved"] .tracking-column-badge {
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.tracking-column-body {
  padding: 0.9rem;
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.tracking-column-body::-webkit-scrollbar {
  width: 5px;
}
.tracking-column-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Kanban Card Base (Dark Theme Default) - Crisp Slate Navy Card #1e293b that pops out against #0d1527 column! */
.tracking-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.9rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
  cursor: pointer;
}

.tracking-card:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}

.tracking-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tracking-job-num {
  font-size: 0.8rem;
  font-weight: 800;
  color: #34d399;
  font-family: monospace;
  background: rgba(52, 211, 153, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.tracking-job-price {
  font-size: 0.92rem;
  font-weight: 800;
  color: #38bdf8;
}

.tracking-file-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  line-height: 1.35;
  word-break: break-word;
}

.tracking-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.tracking-detail-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #cbd5e1;
}

.tracking-detail-line.tracking-assignee {
  color: #60a5fa;
  font-weight: 700;
}

.tracking-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-stage-advance {
  flex: 1;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-stage-advance.to-wip {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-stage-advance.to-completed {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-stage-advance.to-approved {
  background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-stage-advance.approved-done {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.4);
  cursor: pointer;
}

.tracking-stage-badge-client {
  flex: 1;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  text-align: center;
}

.btn-tracking-view-detail {
  padding: 0.55rem 0.65rem;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.btn-tracking-view-detail:hover {
  background: rgba(255, 255, 255, 0.18);
}

.tracking-empty-column {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.tracking-others-section {
  margin-top: 1.5rem;
  background: rgba(15, 23, 42, 0.8);
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.tracking-others-title {
  font-weight: 700;
  color: #f87171;
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tracking-others-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* Drag and Drop Styling */
.tracking-card[draggable="true"] {
  cursor: grab;
  user-select: none;
}
.tracking-card[draggable="true"]:active {
  cursor: grabbing;
}
.tracking-card.dragging {
  opacity: 0.35 !important;
  transform: scale(0.97) !important;
  border: 2px dashed #60a5fa !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5) !important;
}
.tracking-column-body.drag-over {
  background: rgba(59, 130, 246, 0.15) !important;
  border: 2px dashed #60a5fa !important;
  border-radius: 8px;
}

/* Light Theme Assignee Box in Modal */
body.light-theme .detail-item.full-width {
  background: #f0f9ff !important;
  border-color: #bae6fd !important;
}

body.light-theme .detail-item.full-width .detail-label {
  color: #0284c7 !important;
}

body.light-theme #detail-assignee-select,
body.light-theme #edit-assignee-select {
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: #0369a1 !important;
  border-color: #93c5fd !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme #detail-assignee-select option,
body.light-theme #edit-assignee-select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Light Theme Overrides (High Contrast: Gray #e2e8f0 Column, Crisp White #ffffff Cards) */
body.light-theme .view-switcher-container {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
}

body.light-theme .view-switch-btn {
  color: #475569 !important;
}

body.light-theme .view-switch-btn.active {
  background: var(--theme-tab-active-light, linear-gradient(135deg, #059669 0%, #10b981 100%)) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px var(--theme-primary-shadow, rgba(16, 185, 129, 0.3)) !important;
}

body.light-theme .tracking-column {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06) !important;
}

body.light-theme .tracking-column-header {
  background: #e2e8f0 !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

body.light-theme .tracking-column-title {
  color: #0f172a !important;
}

body.light-theme .tracking-column-title span {
  color: #0f172a !important;
}

body.light-theme .tracking-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .tracking-card:hover {
  border-color: #2563eb !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.22) !important;
  transform: translateY(-2px) !important;
}

body.light-theme .tracking-job-num {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}

body.light-theme .tracking-job-price {
  color: #0284c7 !important;
}

body.light-theme .tracking-file-name {
  color: #0f172a !important;
}

body.light-theme .tracking-card-details {
  color: #475569 !important;
}

body.light-theme .tracking-detail-line {
  color: #334155 !important;
}

body.light-theme .tracking-empty-column {
  background: #e2e8f0 !important;
  border: 1px dashed #94a3b8 !important;
  color: #475569 !important;
}

body.light-theme .btn-tracking-view-detail {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

body.light-theme .btn-tracking-view-detail:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

body.light-theme .tracking-card-actions {
  border-top-color: #e2e8f0 !important;
}

body.light-theme .tracking-others-section {
  background: #fff5f5 !important;
  border-color: #fca5a5 !important;
}

/* ==========================================================================
   MOBILE RESPONSIVE INVOICE OVERRIDES (AT VERY END FOR HIGHEST PRIORITY CASCADE)
   ========================================================================== */
@media screen and (max-width: 768px) {
  #modal-invoice-overlay {
    padding: 0.75rem 0.5rem 3rem 0.5rem !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .invoice-modal-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .invoice-modal-controls {
    margin: 0 0 0.75rem 0 !important;
  }

  .invoice-sheet-scroll-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  .invoice-sheet, #printable-invoice-sheet, .print-chunk-page {
    width: 760px !important;
    min-width: 760px !important;
    max-width: 760px !important;
    box-sizing: border-box !important;
    margin: 0 auto 1.5rem auto !important;
    padding: 1.25rem 1.5rem 0 1.5rem !important;
  }

  .inv-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
  }

  .inv-meta-box {
    text-align: right !important;
  }

  .inv-grid-cards {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
    width: 100% !important;
  }

  .inv-card {
    box-sizing: border-box !important;
    padding: 0.75rem !important;
  }

  .inv-agency-name {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
  }

  .inv-contact-line, .inv-contact-row {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
  }

  .inv-table-wrapper {
    width: 100% !important;
  }

  .inv-table {
    width: 100% !important;
    font-size: 0.85rem !important;
  }

  .inv-table th, .inv-table td {
    padding: 0.5rem 0.35rem !important;
    font-size: 0.85rem !important;
  }
}

.invoice-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 999999 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  overflow-y: auto !important;
  padding: 1.5rem 1rem 5rem 1rem !important;
}

/* ==========================================================================
   DIRECT NATIVE VECTOR HTML / PDF PRINT MEDIA RULES
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html, body {
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    position: static !important;
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide app-root by default for invoice printing, UNLESS printing-sales-report is active */
  body:not(.printing-sales-report) #app-root,
  .invoice-modal-controls,
  .modal-close-btn,
  .inv-modal-header-controls,
  .inv-modal-footer,
  .inv-modal-actions,
  .inv-print-btn,
  .inv-close-btn {
    display: none !important;
  }

  body.printing-sales-report #app-root {
    display: block !important;
  }
  body.printing-sales-report #modal-root,
  body.printing-sales-report .navbar,
  body.printing-sales-report .controls-bar,
  body.printing-sales-report .btn-sales-subtab,
  body.printing-sales-report #btn-print-sales-report,
  body.printing-sales-report .fab-add-btn,
  body.printing-sales-report footer {
    display: none !important;
  }
  body.printing-sales-report .sales-report-container {
    padding: 10px !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  #modal-root,
  #modal-invoice-overlay,
  .modal-overlay,
  .modal-container,
  .invoice-modal-container,
  .invoice-sheet-scroll-wrapper {
    display: block !important;
    position: static !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    box-shadow: none !important;
    border: none !important;
    transform: none !important;
    zoom: 1 !important;
  }

  .inv-modal-card {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
    zoom: 1 !important;
  }

  .invoice-sheet,
  .invoice-sheet-page,
  .print-chunk-page {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    zoom: 1 !important;
    margin: 0 !important;
    padding: 1.25rem 1.5rem 0 1.5rem !important;
    border: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    overflow: hidden !important;
    page-break-after: always !important;
    break-after: page !important;
  }

  .invoice-sheet:last-child,
  .invoice-sheet-page:last-child,
  .print-chunk-page:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  .blank-row {
    display: table-row !important;
  }

  #img-print-container {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    z-index: 9999999 !important;
  }

  #img-print-container img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }
}

/* ==========================================================================
   BATCH & LOT WORKSPACE MODAL - THEME SYSTEM (DARK & LIGHT)
   ========================================================================== */

.lot-workspace-modal {
  background: #0d1527;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  color: #f8fafc;
}

.lot-workspace-header {
  background: linear-gradient(135deg, #090d16 0%, #0f172a 100%);
  border-bottom: 2px solid #10b981;
}

.lot-workspace-code-badge {
  font-size: 0.85rem;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-family: monospace;
}

.lot-workspace-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.lot-workspace-client-tag {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 600;
}

.lot-workspace-client-name {
  color: #38bdf8;
}

.lot-workspace-status-select {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 6px;
  width: auto !important;
  max-width: 170px !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
}

.lot-workspace-metrics {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border-light);
}

.lot-metric-label {
  color: var(--text-muted);
}

.lot-metric-val {
  color: #ffffff;
}

.lot-metric-imgs {
  color: #60a5fa;
}

.lot-metric-amount {
  color: #34d399;
}

.lot-metric-progress-text {
  color: #38bdf8;
}

.lot-metric-progress-track {
  background: rgba(0, 0, 0, 0.35);
}

.lot-metric-progress-fill {
  background: linear-gradient(90deg, #10b981, #38bdf8);
}

.lot-workspace-header,
.lot-workspace-metrics,
#lot-workspace-assignee-earnings,
.lot-workspace-toolbar,
.lot-workspace-footer {
  flex-shrink: 0 !important;
}

.lot-workspace-toolbar {
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-light);
  display: flex !important;
  flex-direction: column !important;
  gap: 0.65rem !important;
  flex-shrink: 0 !important;
  min-height: auto !important;
  box-sizing: border-box !important;
  padding: 0.75rem 1.5rem !important;
}

.workspace-toolbar-row-1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  width: 100%;
}

.workspace-toolbar-row-2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  width: 100%;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

body.light-theme .workspace-toolbar-row-2 {
  border-top: 1px solid #e2e8f0;
}

/* Toolbar Sections & Titles */
.workspace-toolbar-section {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0 !important;
  flex-wrap: wrap;
}

.workspace-actions-section {
  flex: 0 0 auto !important;
}

.workspace-bulk-section {
  flex: 0 0 auto !important;
  border-left: none !important;
  padding-left: 0 !important;
}

.lot-workspace-table-container {
  flex: 1 1 auto !important;
  min-height: 180px !important;
  overflow-y: auto !important;
}

.workspace-section-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Filled Add Folder Button (Image 3 match) */
.btn-lot-add-folder-fill {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 0.38rem 1.1rem !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4) !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-lot-add-folder-fill:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  box-shadow: 0 5px 16px rgba(16, 185, 129, 0.55) !important;
  transform: translateY(-1px);
}

.btn-lot-add-folder-fill:active {
  transform: translateY(0);
}

.workspace-actions-btn-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.workspace-bulk-controls-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

/* Sleek & Compact Bulk Edit Controls */
.lot-bulk-select-sleek {
  height: 32px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  padding: 0.2rem 0.55rem !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(15, 23, 42, 0.8) !important;
  color: #f1f5f9 !important;
  cursor: pointer !important;
  line-height: 1.2 !important;
  outline: none !important;
  transition: all 0.15s ease !important;
}

.lot-bulk-select-sleek:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25) !important;
}

#lot-bulk-action-assignee {
  width: 135px !important;
}

#lot-bulk-action-status {
  width: 135px !important;
}

.lot-bulk-select-version {
  width: 68px !important;
  color: #c084fc !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
  background: rgba(168, 85, 247, 0.08) !important;
  font-weight: 700 !important;
  text-align: center !important;
}

.btn-bulk-apply-sleek {
  height: 32px !important;
  background: #2563eb !important;
  border: 1px solid #1d4ed8 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  padding: 0.2rem 0.65rem !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.btn-bulk-apply-sleek:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4) !important;
}

.btn-bulk-version-sleek {
  height: 32px !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  padding: 0.2rem 0.65rem !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

body.light-theme .lot-bulk-select-sleek {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

.workspace-search-box-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.workspace-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.workspace-search-input-wrapper .search-icon {
  position: absolute;
  left: 0.65rem;
  color: var(--text-muted);
  pointer-events: none;
}

.workspace-search-input {
  width: 100% !important;
  padding-left: 2rem !important;
  padding-top: 0.32rem !important;
  padding-bottom: 0.32rem !important;
  font-size: 0.8rem !important;
  border-radius: 6px !important;
}

.workspace-filters-pills-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.workspace-filters-pills-row select {
  padding: 0.28rem 0.45rem !important;
  font-size: 0.76rem !important;
  border-radius: 6px !important;
}

.lot-toolbar-invoice-btn {
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
}

.lot-workspace-thead tr {
  background: #0f172a;
  border-bottom: 2px solid var(--border-light);
}

.lot-workspace-thead th {
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.6rem 0.4rem;
  user-select: none;
}

/* Row Styling and Selection Highlight (Matching image reference) */
.lot-workspace-table {
  border-collapse: separate;
  border-spacing: 0;
}

.lot-workspace-table th,
.lot-workspace-table td {
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lot-folder-row {
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lot-folder-row:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.lot-folder-row.row-selected {
  background-color: rgba(30, 58, 138, 0.4) !important;
  box-shadow: inset 3px 0 0 #3b82f6 !important;
}

.lot-folder-row.row-selected:hover {
  background-color: rgba(30, 58, 138, 0.52) !important;
}

.lot-folder-row input.form-input,
.lot-folder-row select.form-select {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  border-radius: 6px;
}

.lot-folder-row input.lot-input-folder-name {
  color: #60a5fa;
}

.lot-folder-row input.lot-input-rate {
  color: #34d399;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 5px;
}

.lot-folder-row .btn-drag-lot-row {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 5px;
  cursor: grab;
  padding: 0.22rem 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
  transition: all 0.15s ease;
}

.lot-folder-row .btn-drag-lot-row:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.5);
  transform: scale(1.08);
}

.lot-folder-row .btn-drag-lot-row:active {
  cursor: grabbing;
  background: rgba(56, 189, 248, 0.4);
  transform: scale(0.95);
}

/* Dragging state for row & body */
body.lot-body-dragging {
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: grabbing !important;
}

body.lot-body-dragging * {
  cursor: grabbing !important;
}

.lot-folder-row.lot-row-dragging {
  opacity: 0.6;
  background: rgba(56, 189, 248, 0.22) !important;
  outline: 2px dashed #38bdf8 !important;
  outline-offset: -2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.lot-folder-row .btn-move-lot-row-up,
.lot-folder-row .btn-move-lot-row-down {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 5px;
  cursor: pointer;
  padding: 0.22rem 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.lot-folder-row .btn-move-lot-row-up:hover:not(:disabled),
.lot-folder-row .btn-move-lot-row-down:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.22);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.45);
}

.lot-folder-row .btn-move-lot-row-up:disabled,
.lot-folder-row .btn-move-lot-row-down:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.lot-folder-row .btn-delete-lot-row {
  color: #f87171;
}

.lot-folder-row .btn-delete-lot-row:hover {
  color: #ef4444;
}

.lot-currency-symbol {
  color: var(--text-muted);
}

.lot-workspace-footer {
  background: #090d16;
  border-top: 1px solid var(--border-light);
}

.lot-autosave-badge {
  color: #34d399;
}

/* ==========================================================================
   LIGHT THEME OVERRIDES FOR LOT WORKSPACE
   ========================================================================== */
body.light-theme .lot-workspace-modal {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.15) !important;
  color: #0f172a !important;
}

body.light-theme .lot-workspace-header {
  background: #ffffff !important;
  border-bottom: 2px solid #10b981 !important;
}

body.light-theme .lot-workspace-header h2,
body.light-theme .lot-workspace-title {
  color: #0f172a !important;
}

body.light-theme .lot-workspace-code-badge {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #047857 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
}

body.light-theme .lot-workspace-client-tag {
  color: #64748b !important;
}

body.light-theme .lot-workspace-client-name {
  color: #0284c7 !important;
}

body.light-theme .lot-workspace-status-select {
  background: #ffffff !important;
  color: #047857 !important;
  border: 1.5px solid rgba(16, 185, 129, 0.4) !important;
}

body.light-theme .lot-workspace-metrics {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

body.light-theme .lot-metric-label {
  color: #64748b !important;
}

body.light-theme .lot-metric-val {
  color: #0f172a !important;
}

body.light-theme .lot-metric-imgs {
  color: #2563eb !important;
}

body.light-theme .lot-metric-amount {
  color: #059669 !important;
}

body.light-theme .lot-metric-progress-text {
  color: #0284c7 !important;
}

body.light-theme .lot-metric-progress-track {
  background: #e2e8f0 !important;
}

body.light-theme .lot-workspace-toolbar {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

body.light-theme .lot-toolbar-bulk-group {
  border-left: 1px solid #cbd5e1 !important;
}

body.light-theme .lot-toolbar-search,
body.light-theme .lot-toolbar-select {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-theme .lot-toolbar-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}

body.light-theme .lot-toolbar-btn:hover {
  background: #f1f5f9 !important;
}

body.light-theme .lot-toolbar-invoice-btn {
  background: rgba(16, 185, 129, 0.1) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  color: #047857 !important;
  font-weight: 700 !important;
}

body.light-theme .lot-toolbar-invoice-btn:hover {
  background: rgba(16, 185, 129, 0.18) !important;
}

body.light-theme .lot-workspace-table-container {
  background: #ffffff !important;
}

body.light-theme .lot-workspace-thead tr {
  background: #e2e8f0 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}

body.light-theme .lot-workspace-thead th {
  color: #1e293b !important;
  font-weight: 700 !important;
  background: #e2e8f0 !important;
}

body.light-theme .workspace-bulk-section,
body.light-theme .workspace-search-filters-section {
  border-left: 1px solid #e2e8f0 !important;
}

body.light-theme .lot-workspace-table td {
  border-bottom: 1px solid #e2e8f0 !important;
}

body.light-theme .lot-folder-row {
  background: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

body.light-theme .lot-folder-row:hover {
  background: #f8fafc !important;
}

body.light-theme .lot-folder-row.row-selected {
  background: #eff6ff !important;
  box-shadow: inset 3px 0 0 #2563eb !important;
}

body.light-theme .lot-folder-row.row-selected:hover {
  background: #dbeafe !important;
}

body.light-theme .lot-row-index {
  color: #64748b !important;
}

body.light-theme .lot-folder-row input.form-input,
body.light-theme .lot-folder-row select.form-select {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-theme .lot-folder-row input.form-input:focus,
body.light-theme .lot-folder-row select.form-select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

body.light-theme .lot-folder-row input.lot-input-folder-name {
  color: #2563eb !important;
}

body.light-theme .lot-folder-row input.lot-input-rate {
  background: rgba(16, 185, 129, 0.08) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #047857 !important;
  font-weight: 800 !important;
}

body.light-theme .lot-currency-symbol {
  color: #64748b !important;
}

body.light-theme .lot-folder-row .btn-save-lot-row {
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  color: #047857 !important;
}

body.light-theme .lot-folder-row .btn-save-lot-row:hover {
  background: rgba(16, 185, 129, 0.25) !important;
}

body.light-theme .lot-folder-row .btn-drag-lot-row {
  color: #0284c7 !important;
  background: rgba(2, 132, 199, 0.08) !important;
  border: 1px solid rgba(2, 132, 199, 0.25) !important;
}

body.light-theme .lot-folder-row .btn-drag-lot-row:hover {
  background: rgba(2, 132, 199, 0.2) !important;
  color: #0369a1 !important;
  border-color: rgba(2, 132, 199, 0.45) !important;
}

body.light-theme .lot-folder-row.lot-row-dragging {
  background: rgba(2, 132, 199, 0.12) !important;
  outline: 2px dashed #0284c7 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

body.light-theme .lot-folder-row .btn-move-lot-row-up,
body.light-theme .lot-folder-row .btn-move-lot-row-down {
  color: #0284c7 !important;
  background: rgba(2, 132, 199, 0.1) !important;
  border: 1px solid rgba(2, 132, 199, 0.3) !important;
}

body.light-theme .lot-folder-row .btn-move-lot-row-up:hover:not(:disabled),
body.light-theme .lot-folder-row .btn-move-lot-row-down:hover:not(:disabled) {
  background: rgba(2, 132, 199, 0.2) !important;
  color: #0369a1 !important;
}

body.light-theme .lot-folder-row .btn-delete-lot-row {
  color: #ef4444 !important;
}

body.light-theme .lot-folder-row .btn-delete-lot-row:hover {
  color: #dc2626 !important;
}

body.light-theme .lot-workspace-footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}

body.light-theme .lot-autosave-badge {
  color: #047857 !important;
}

body.light-theme .lot-close-btn {
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  font-weight: 600 !important;
}

body.light-theme .lot-close-btn:hover {
  background: #cbd5e1 !important;
}

/* Light Theme overrides for Batch Creation Modal */
body.light-theme #lot-job-form .form-group.full-width {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.light-theme #lot-field-bulk-folders,
body.light-theme #lot-field-bulk-categories,
body.light-theme #lot-field-bulk-imgcounts {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-theme .btn-batch-type-pill {
  background: #e2e8f0 !important;
  color: #475569 !important;
}

body.light-theme .btn-batch-type-pill.active {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

body.light-theme #lot-items-breakdown-wrapper {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.light-theme #lot-items-breakdown-wrapper thead {
  background: #e2e8f0 !important;
  color: #1e293b !important;
}

body.light-theme #lot-items-breakdown-wrapper thead th {
  color: #1e293b !important;
}

body.light-theme #lot-items-breakdown-wrapper tbody tr {
  border-bottom-color: #e2e8f0 !important;
}

body.light-theme #lot-items-breakdown-wrapper input.form-input {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-theme #lot-items-breakdown-wrapper input.row-item-rate {
  color: #047857 !important;
}

body.light-theme #lot-live-calc-box {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

body.light-theme #lot-live-calc-box span,
body.light-theme #lot-live-calc-box div {
  color: #0f172a !important;
}

body.light-theme #lot-live-calc-box #lot-calc-amount {
  color: #047857 !important;
  font-weight: 800 !important;
}

/* ==========================================
   BATCH KANBAN WORKSPACE STYLES
   ========================================== */
.batch-kanban-grid {
  display: grid;
  align-items: stretch;
  width: 100%;
}

.batch-kanban-column {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 280px);
  min-height: 520px;
  overflow: hidden;
}

.batch-kanban-column-body {
  padding: 0.5rem;
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.batch-kanban-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.batch-kanban-card:hover {
  transform: translateY(-2px);
  border-color: #3b82f6 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

.batch-kanban-column-body::-webkit-scrollbar {
  width: 5px;
}

.batch-kanban-column-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

body.light-theme .batch-kanban-card {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .batch-kanban-card:hover {
  border-color: #2563eb !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18) !important;
}

body.light-theme .batch-kanban-column-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

/* ==========================================
   ASSIGNEE FILTER BAR (Job Tracking & Workspace)
   ========================================== */
.assignee-filter-bar {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

body.light-theme .assignee-filter-bar {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.assignee-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.assignee-filter-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.assignee-filter-pill input[type="checkbox"] {
  cursor: pointer;
  accent-color: #3b82f6;
  width: 15px;
  height: 15px;
  margin: 0;
}

.assignee-filter-btn {
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.assignee-filter-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* All Select Dropdowns & Options Capital Display */
select, .form-select, .select-input, select option, .form-select option, .select-input option {
  text-transform: uppercase;
}

/* Universal Full Calendar Box Clickability across all views */
.edit-date-badge-wrapper,
.report-date-badge,
.lot-meta-date-box > div,
.edit-date-badge-wrapper *,
.report-date-badge *,
.lot-meta-date-box > div * {
  cursor: pointer !important;
}

input[type="date"] {
  cursor: pointer !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer !important;
}

.edit-date-badge-wrapper input[type="date"],
.report-date-badge input[type="date"],
.lot-meta-date-box input[type="date"],
input[type="date"][style*="opacity: 0"] {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
  z-index: 5 !important;
}

.edit-date-badge-wrapper input[type="date"]::-webkit-calendar-picker-indicator,
.report-date-badge input[type="date"]::-webkit-calendar-picker-indicator,
.lot-meta-date-box input[type="date"]::-webkit-calendar-picker-indicator,
input[type="date"][style*="opacity: 0"]::-webkit-calendar-picker-indicator {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer !important;
  opacity: 0 !important;
}

/* ==========================================================================
   THEME & COLOR PICKER STYLES (MATCHING IMAGE 3)
   ========================================================================== */
.theme-modal-container {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 30px var(--theme-primary-glow, rgba(43, 122, 66, 0.2));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme .theme-modal-container {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

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

body.light-theme .theme-modal-header {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

.theme-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.theme-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
  display: block;
}

/* Mode Switcher Buttons */
.theme-mode-toggle-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}

.theme-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

body.light-theme .theme-mode-btn {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.1);
  color: var(--text-secondary);
}

.theme-mode-btn:hover {
  border-color: var(--theme-primary-light, #22c55e);
  color: var(--text-primary);
}

.theme-mode-btn.active {
  background: var(--theme-brand-gradient, linear-gradient(135deg, #1b3054 0%, #2b7a42 100%));
  border-color: var(--theme-primary-light, #22c55e);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--theme-primary-shadow, rgba(43, 122, 66, 0.35));
}

body.light-theme .theme-mode-btn.active {
  background: var(--theme-tab-active-light, linear-gradient(135deg, #059669 0%, #10b981 100%));
  color: #ffffff;
}

/* Image 3 Theme Card Layout */
.theme-picker-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.1rem 1.25rem 0.85rem 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.light-theme .theme-picker-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.theme-picker-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.theme-picker-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
  margin-top: 8px;
}

.theme-swatches-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 8px 6px 6px 6px;
  scrollbar-width: none;
}
.theme-swatches-row::-webkit-scrollbar {
  display: none;
}

.theme-swatch-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  flex-shrink: 0;
  width: 34px;
  padding-top: 4px;
}

.theme-swatch-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
  padding: 0;
  display: block;
}

.theme-swatch-btn:hover {
  transform: scale(1.12);
}

/* Active Ring matching Image 3 */
.theme-swatch-wrapper.active .theme-swatch-btn {
  outline: 2.5px solid var(--swatch-color, #22c55e);
  outline-offset: 3px;
  transform: scale(1.04);
}

.theme-swatch-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  height: 14px;
  line-height: 14px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.theme-swatch-wrapper.active .theme-swatch-name {
  opacity: 1;
  color: var(--text-primary);
}

/* Individual Swatch Colors */
.theme-swatch-btn.swatch-blue {
  background: #0084ff;
  --swatch-color: #0084ff;
}

.theme-swatch-btn.swatch-purple {
  background: #9b51e0;
  --swatch-color: #9b51e0;
}

.theme-swatch-btn.swatch-pink {
  background: #ff4081;
  --swatch-color: #ff4081;
}

.theme-swatch-btn.swatch-red {
  background: #ff4d4f;
  --swatch-color: #ff4d4f;
}

.theme-swatch-btn.swatch-orange {
  background: #ff7a00;
  --swatch-color: #ff7a00;
}

.theme-swatch-btn.swatch-yellow {
  background: #ffc107;
  --swatch-color: #ffc107;
}

.theme-swatch-btn.swatch-green {
  background: #4caf50;
  --swatch-color: #4caf50;
}

.theme-swatch-btn.swatch-slate {
  background: #808080;
  --swatch-color: #808080;
}

/* ==========================================================================
   DYNAMIC THEME-AWARE CONTROLS & SUB-SWITCHERS
   Enforces active theme tokens across all tabs, toggles, pills, and reports
   ========================================================================== */

.btn-job-tab.active,
#tab-single-job.active,
#tab-lot-job.active {
  background: var(--theme-primary, #2b7a42) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--theme-primary-glow, rgba(43, 122, 66, 0.3)) !important;
}

.btn-sales-preset.active {
  background: var(--theme-primary, #2b7a42) !important;
  border-color: var(--theme-primary-light, #22c55e) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--theme-primary-glow, rgba(43, 122, 66, 0.25)) !important;
}

.btn-sales-subtab.active {
  background: var(--theme-primary, #2b7a42) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--theme-primary-glow, rgba(43, 122, 66, 0.3)) !important;
}

#btn-print-sales-report {
  background: var(--theme-tab-active, linear-gradient(135deg, #1b3054 0%, #2b7a42 100%)) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px var(--theme-primary-shadow, rgba(43, 122, 66, 0.35)) !important;
}

body.light-theme #btn-print-sales-report {
  background: var(--theme-tab-active-light, linear-gradient(135deg, #059669 0%, #10b981 100%)) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px var(--theme-primary-shadow, rgba(16, 185, 129, 0.35)) !important;
}

.btn-batch-type-pill.active,
#btn-batch-group-stage.active,
#btn-batch-group-assignee.active,
#btn-batch-mode-folders.active,
#btn-batch-mode-images.active {
  background: var(--theme-primary, #2b7a42) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--theme-primary-glow, rgba(43, 122, 66, 0.3)) !important;
}

.btn-bulk-apply-sleek {
  background: var(--theme-primary, #2563eb) !important;
  border-color: var(--theme-primary-dark, #1d4ed8) !important;
  color: #ffffff !important;
}

.btn-bulk-apply-sleek:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px var(--theme-primary-glow, rgba(37, 99, 235, 0.35));
}

#btn-workspace-sub-wip.active,
#btn-workspace-sub-delivered.active {
  background: var(--theme-primary, #2b7a42) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--theme-primary-glow, rgba(43, 122, 66, 0.3)) !important;
}

body.light-theme #btn-workspace-sub-wip.active,
body.light-theme #btn-workspace-sub-delivered.active {
  background: var(--theme-primary-light, #22c55e) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--theme-primary-glow, rgba(34, 197, 94, 0.3)) !important;
}

.dashboard-subview-container .view-switch-btn.active,
.tracking-groupby-container .view-switch-btn.active {
  background: var(--theme-primary, #2b7a42) !important;
  color: #ffffff !important;
}

body.light-theme .dashboard-subview-container .view-switch-btn.active,
body.light-theme .tracking-groupby-container .view-switch-btn.active {
  background: var(--theme-primary-light, #22c55e) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   Clean Material Table Pagination (Image 2 style)
   ========================================================================== */
.dashboard-grid-view-wrapper,
.dashboard-list-view-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.material-table-pagination {
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.65rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.75rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: #94a3b8;
  user-select: none;
}

body.light-theme .material-table-pagination {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  color: #475569;
}

.pagination-rows-per-page,
.pagination-range-display {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-label {
  font-size: 0.875rem;
  color: #94a3b8;
  font-weight: 500;
}

body.light-theme .pagination-label {
  color: #475569;
}

.pagination-range-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #cbd5e1;
}

body.light-theme .pagination-range-text {
  color: #334155;
}

.select-underline-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.pagination-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #f1f5f9;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.15rem 1.25rem 0.15rem 0.25rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
  line-height: 1.4;
}

body.light-theme .pagination-select {
  border-bottom-color: #cbd5e1;
  color: #0f172a;
}

.pagination-select:focus,
.pagination-select:hover {
  border-bottom-color: var(--theme-primary, #22c55e);
}

.pagination-select option {
  background: #0f172a;
  color: #f1f5f9;
}

body.light-theme .pagination-select option {
  background: #ffffff;
  color: #0f172a;
}

.select-arrow-icon {
  position: absolute;
  right: 2px;
  pointer-events: none;
  color: #94a3b8;
}

body.light-theme .select-arrow-icon {
  color: #64748b;
}

.pagination-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.mat-page-numbers-group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0 0.25rem;
}

.mat-page-num-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 0.35rem;
  border-radius: 6px;
  border: none;
  outline: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  user-select: none;
}

body.light-theme .mat-page-num-btn {
  color: #475569;
}

.mat-page-num-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

body.light-theme .mat-page-num-btn:hover:not(.active) {
  background: rgba(0, 0, 0, 0.06);
  color: #0f172a;
}

.mat-page-num-btn.active {
  background: var(--theme-brand-gradient, linear-gradient(135deg, #15803d 0%, #22c55e 100%)) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 6px var(--theme-primary-shadow, rgba(34, 197, 94, 0.35));
}

.mat-nav-dots {
  min-width: 22px;
  height: 30px;
  border: none;
  outline: none;
  background: transparent;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
  transition: color 0.18s ease;
  user-select: none;
}

.mat-nav-dots:hover {
  color: #cbd5e1;
}

body.light-theme .mat-nav-dots:hover {
  color: #0f172a;
}

.mat-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  outline: none;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.18s ease;
  padding: 0;
}

body.light-theme .mat-nav-btn {
  color: #334155;
}

.mat-nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

body.light-theme .mat-nav-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.06);
  color: #0f172a;
}

.mat-nav-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.mat-nav-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 680px) {
  .material-table-pagination {
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0.25rem;
  }
}

/* ==========================================================================
   FIREBASE REALTIME DATABASE CONSOLE (Image 1 Style)
   ========================================================================== */
.fb-tree-row:hover {
  background: rgba(255, 255, 255, 0.045);
}

body.light-theme .fb-tree-row:hover {
  background: rgba(0, 0, 0, 0.035);
}

.fb-tree-row:hover .fb-node-actions {
  opacity: 1 !important;
}

.fb-toolbar-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

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

.fb-leaf-val:hover {
  text-decoration: underline;
  filter: brightness(1.15);
}

.btn-fb-node-add:hover,
.btn-fb-leaf-edit:hover {
  background: rgba(56, 189, 248, 0.3) !important;
  transform: scale(1.08);
}

.btn-fb-node-delete:hover,
.btn-fb-leaf-delete:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  transform: scale(1.08);
}

.firebase-console-container.light-mode .fb-node-key {
  color: #1e293b !important;
}

.firebase-console-container.light-mode .fb-count-badge {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

.firebase-console-container.light-mode #fb-tree-mount {
  background: #ffffff !important;
}

.firebase-console-container.light-mode .fb-tree-children {
  border-left-color: rgba(0, 0, 0, 0.1) !important;
}

.fb-inline-val-input:focus,
#inline-new-key:focus,
#inline-new-val:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25) !important;
}

.fb-inline-add-container,
.fb-inline-del-strip {
  animation: fadeIn 0.15s ease-out;
}

.btn-fb-node-export:hover {
  background: rgba(52, 211, 153, 0.35) !important;
  transform: scale(1.08);
}

.btn-fb-node-import:hover {
  background: rgba(245, 158, 11, 0.35) !important;
  transform: scale(1.08);
}

.btn-add-nested-subchild:hover {
  background: rgba(56, 189, 248, 0.28) !important;
}

.fb-node-key {
  cursor: pointer;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.fb-node-key:hover {
  color: #38bdf8 !important;
  text-decoration: underline;
}

.fb-branch-row:hover .fb-drill-icon {
  opacity: 0.85 !important;
  transform: translateX(2px);
}

.btn-fb-node-drill:hover {
  background: rgba(56, 189, 248, 0.3) !important;
  transform: scale(1.08);
}

.fb-breadcrumb-link:hover:not(.active) {
  color: #38bdf8 !important;
  text-decoration: underline !important;
}

#btn-fb-up-level:hover,
.btn-fb-tree-up:hover {
  background: rgba(56, 189, 248, 0.28) !important;
  color: #ffffff !important;
}

.fb-toggle-chevron {
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}

.fb-toggle-chevron:hover {
  color: #38bdf8 !important;
  transform: scale(1.15);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   USERS MANAGEMENT MODAL & EDIT USER PERMISSIONS MODAL (THEMED)
   ========================================================================== */

/* User Management Modal */
.users-modal-container {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}
.users-modal-header {
  background: rgba(15, 23, 42, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}
.users-modal-body {
  background: rgba(15, 23, 42, 0.75);
}
.users-table-header-row {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.users-table-header-row th {
  color: #94a3b8;
}
.users-table-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease;
}
.users-table-row:hover {
  background: rgba(255, 255, 255, 0.04);
}
.users-user-name {
  color: #f8fafc;
}
.users-user-email {
  color: #38bdf8;
}
.users-access-scope {
  color: #94a3b8;
}
.users-action-btn-edit {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
}
.users-action-btn-edit:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}
.users-action-btn-share {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}
.users-action-btn-share:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.55);
  color: #7dd3fc;
}
.users-action-btn-delete {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}
.users-action-btn-delete:hover {
  background: rgba(239, 68, 68, 0.22);
}
.users-modal-footer {
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.users-mobile-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Light Theme Overrides for User Management Modal */
body.light-theme .users-modal-container {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18) !important;
}
body.light-theme .users-modal-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}
body.light-theme .users-modal-header .modal-title {
  color: #0f172a !important;
}
body.light-theme .users-modal-body {
  background: #ffffff !important;
}
body.light-theme .users-table-header-row {
  background: #f1f5f9 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
body.light-theme .users-table-header-row th {
  color: #475569 !important;
}
body.light-theme .users-table-row {
  border-bottom: 1px solid #f1f5f9 !important;
}
body.light-theme .users-table-row:hover {
  background: #f8fafc !important;
}
body.light-theme .users-user-name {
  color: #0f172a !important;
}
body.light-theme .users-user-email {
  color: #0284c7 !important;
}
body.light-theme .users-access-scope {
  color: #64748b !important;
}
body.light-theme .users-action-btn-edit {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}
body.light-theme .users-action-btn-edit:hover {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}
body.light-theme .users-action-btn-share {
  background: #f0f9ff !important;
  border: 1px solid #bae6fd !important;
  color: #0284c7 !important;
}
body.light-theme .users-action-btn-share:hover {
  background: #e0f2fe !important;
  border-color: #7dd3fc !important;
  color: #0369a1 !important;
}
body.light-theme .users-action-btn-delete {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #ef4444 !important;
}
body.light-theme .users-action-btn-delete:hover {
  background: #fee2e2 !important;
}
body.light-theme .users-modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}
body.light-theme .users-mobile-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
}

/* Edit User Modal & Permissions Manager (Themed) */
.edit-user-modal-container {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.edit-user-modal-header {
  background: rgba(15, 23, 42, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.edit-user-modal-footer {
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.session-expiry-badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

/* Permissions Manager Component */
.permissions-manager-wrapper {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.perm-mgr-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.perm-mgr-title {
  color: #f8fafc;
}
.perm-mgr-subtitle {
  color: #94a3b8;
}
.perm-category-tabs-list {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.perm-cat-tab-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}
.perm-cat-tab-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
}
.perm-cat-tab-item.active {
  background: rgba(56, 189, 248, 0.14) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.12);
}
.perm-cat-title {
  color: #f1f5f9;
}
.perm-cat-count {
  color: #64748b;
}
.perm-panel-header {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}
.perm-panel-title {
  color: #f8fafc;
}
.perm-panel-count {
  color: #94a3b8;
}
.btn-cat-select-all {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #34d399;
}
.btn-cat-deselect-all {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}
.perm-access-card {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.perm-access-card:hover {
  background: rgba(30, 41, 59, 0.8) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}
.perm-card-label {
  color: #f1f5f9;
}
.perm-card-desc {
  color: #94a3b8;
}
.perm-disabled-placeholder {
  background: rgba(15, 23, 42, 0.35);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}
.perm-disabled-title {
  color: #cbd5e1;
}
.perm-disabled-subtitle {
  color: #64748b;
}

/* Light Theme Overrides for Edit User & Permissions Manager */
body.light-theme .edit-user-modal-container {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18) !important;
}
body.light-theme .edit-user-modal-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}
body.light-theme .edit-user-modal-header .modal-title {
  color: #0f172a !important;
}
body.light-theme .edit-user-modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}
body.light-theme .session-expiry-badge {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #059669 !important;
}
body.light-theme .permissions-manager-wrapper {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}
body.light-theme .perm-mgr-header {
  border-bottom: 1px solid #e2e8f0 !important;
}
body.light-theme .perm-mgr-title {
  color: #0f172a !important;
}
body.light-theme .perm-mgr-subtitle {
  color: #475569 !important;
}
body.light-theme .perm-category-tabs-list {
  border-right: 1px solid #e2e8f0 !important;
}
body.light-theme .perm-cat-tab-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
body.light-theme .perm-cat-tab-item:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
body.light-theme .perm-cat-tab-item.active {
  background: #e0f2fe !important;
  border-color: #38bdf8 !important;
  color: #0284c7 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.18) !important;
}
body.light-theme .perm-cat-title {
  color: #0f172a !important;
}
body.light-theme .perm-cat-count {
  color: #64748b !important;
}
body.light-theme .perm-panel-header {
  border-bottom: 1px dashed #cbd5e1 !important;
}
body.light-theme .perm-panel-title {
  color: #0f172a !important;
}
body.light-theme .perm-panel-count {
  color: #64748b !important;
}
body.light-theme .btn-cat-select-all {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #059669 !important;
}
body.light-theme .btn-cat-deselect-all {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #dc2626 !important;
}
body.light-theme .perm-access-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
body.light-theme .perm-access-card:hover {
  background: #f8fafc !important;
  border-color: #38bdf8 !important;
}
body.light-theme .perm-card-label {
  color: #0f172a !important;
}
body.light-theme .perm-card-desc {
  color: #64748b !important;
}
body.light-theme .perm-disabled-placeholder {
  background: #ffffff !important;
  border: 1px dashed #cbd5e1 !important;
}
body.light-theme .perm-disabled-title {
  color: #1e293b !important;
}
body.light-theme .perm-disabled-subtitle {
  color: #64748b !important;
}

/* Session Expired Alert Modal */
.session-expired-container {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
}
.session-expired-icon-wrap {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
}
.session-expired-title {
  color: #f8fafc;
}
.session-expired-desc {
  color: #94a3b8;
}
body.light-theme .session-expired-container {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.22) !important;
}
body.light-theme .session-expired-icon-wrap {
  background: #fef3c7 !important;
  border: 1px solid #fde68a !important;
  color: #d97706 !important;
}
body.light-theme .session-expired-title {
  color: #0f172a !important;
}
body.light-theme .session-expired-desc {
  color: #475569 !important;
}





