:root {
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* =======================================================
     3D Skeuomorphic Material & Color Tokens
     ======================================================= */
  --bg-body: #e6ebf3;
  --bg-canvas: #e6ebf3;
  
  /* Physical Skeuomorphic Surfaces */
  --skeuo-surface: #eff4fa;
  --skeuo-surface-card: linear-gradient(180deg, #ffffff 0%, #f9fbfd 45%, #ecf2f9 100%);
  --skeuo-surface-panel: linear-gradient(180deg, #ffffff 0%, #f7fafe 55%, #e8f0f8 100%);
  --skeuo-surface-convex: linear-gradient(180deg, #ffffff 0%, #f4f8fc 60%, #e4edf7 100%);
  --skeuo-surface-concave: linear-gradient(180deg, #dbe4ef 0%, #eaf0f8 50%, #f4f8fd 100%);
  --skeuo-surface-sidebar: linear-gradient(180deg, #f8fafc 0%, #edf3fa 50%, #e3ecf6 100%);
  --skeuo-surface-topbar: linear-gradient(180deg, #ffffff 0%, #f6f9fc 60%, #eaf0f7 100%);
  
  /* Backward-compatible token aliases */
  --neu-bg: var(--bg-body);
  --neu-surface: #ecf2f9;
  --neu-surface-convex: var(--skeuo-surface-convex);
  --neu-surface-concave: var(--skeuo-surface-concave);
  --neu-surface-gradient: var(--skeuo-surface-convex);
  --sidebar-bg: #edf3fa;
  --sidebar-border: #cbd8e8;
  --card-bg: #f8fafc;
  --card-border: #cbd8e8;
  --card-inner-border: rgba(255, 255, 255, 0.9);

  /* Calibrated 3D Skeuomorphic Physical Shadows */
  --skeuo-border-light: rgba(255, 255, 255, 0.95);
  --skeuo-border-dark: #c5d3e3;
  --skeuo-border-chamfer: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(0, 0, 0, 0.08);

  /* Elevated Physical Plate Shadows */
  --skeuo-elevation-lg: 
    0 12px 28px -4px rgba(22, 38, 64, 0.16),
    0 4px 10px -2px rgba(22, 38, 64, 0.09),
    0 1px 2px rgba(22, 38, 64, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(190, 205, 225, 0.4);

  --skeuo-elevation-md: 
    0 8px 20px -3px rgba(22, 38, 64, 0.13),
    0 3px 6px -1px rgba(22, 38, 64, 0.08),
    0 1px 2px rgba(22, 38, 64, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(190, 205, 225, 0.35);

  --skeuo-elevation-sm: 
    0 4px 10px -1px rgba(22, 38, 64, 0.10),
    0 2px 4px -1px rgba(22, 38, 64, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(190, 205, 225, 0.3);

  --skeuo-elevation-xs: 
    0 2px 5px rgba(22, 38, 64, 0.08),
    0 1px 2px rgba(22, 38, 64, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);

  /* 3D Extruded Push Button Shadows (Unpressed) */
  --skeuo-btn-primary-shadow: 
    0 4px 0 #1d4ed8,
    0 7px 14px rgba(29, 78, 216, 0.38),
    0 1px 2px rgba(0, 0, 0, 0.15),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.65),
    inset 0 -1px 1px rgba(0, 0, 0, 0.2);

  --skeuo-btn-secondary-shadow: 
    0 3px 0 #b3c2d6,
    0 5px 10px rgba(15, 23, 42, 0.10),
    0 1px 2px rgba(0, 0, 0, 0.05),
    inset 0 1.5px 0 #ffffff,
    inset 0 -1px 1px rgba(0, 0, 0, 0.08);

  /* 3D Sunken Recessed Inset Shadows (Wells & Carved Inputs) */
  --skeuo-inset-deep: 
    inset 0 3px 6px rgba(15, 23, 42, 0.15),
    inset 0 1px 2px rgba(15, 23, 42, 0.10),
    0 1px 0 #ffffff;

  --skeuo-inset-md: 
    inset 0 2px 4px rgba(15, 23, 42, 0.12),
    inset 0 1px 2px rgba(15, 23, 42, 0.08),
    0 1px 0 #ffffff;

  --skeuo-inset-sm: 
    inset 0 1.5px 3px rgba(15, 23, 42, 0.09),
    inset 0 0.5px 1px rgba(15, 23, 42, 0.06),
    0 1px 0 #ffffff;

  /* Aliased Neumorphic Shadows mapped to 3D Skeuomorphic Depth */
  --neu-raised: var(--skeuo-elevation-lg);
  --neu-raised-sm: var(--skeuo-elevation-md);
  --neu-raised-xs: var(--skeuo-elevation-sm);
  --neu-raised-lg: var(--skeuo-elevation-lg);
  --neu-raised-hover: 
    0 14px 32px -4px rgba(22, 38, 64, 0.20),
    0 6px 14px -2px rgba(22, 38, 64, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  
  --neu-inset: var(--skeuo-inset-md);
  --neu-inset-sm: var(--skeuo-inset-sm);
  --neu-inset-deep: var(--skeuo-inset-deep);
  --neu-pressed: var(--skeuo-inset-md);

  /* Typography Colors */
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  /* Accent Brand Colors */
  --primary: #2563eb;
  --primary-gradient: linear-gradient(180deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  --primary-light: #eff6ff;
  --primary-hover: #1d4ed8;
  --primary-border: #93c5fd;
  --primary-glow: rgba(37, 99, 235, 0.40);

  --success: #10b981;
  --success-gradient: linear-gradient(180deg, #34d399 0%, #10b981 50%, #059669 100%);
  --success-light: #ecfdf5;
  --success-text: #047857;

  --warning: #f59e0b;
  --warning-gradient: linear-gradient(180deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  --warning-light: #fffbeb;
  --warning-text: #b45309;

  --danger: #ef4444;
  --danger-gradient: linear-gradient(180deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
  --danger-light: #fef2f2;
  --danger-text: #b91c1c;

  --info: #0ea5e9;
  --info-gradient: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 50%, #0284c7 100%);
  --info-light: #f0f9ff;
  --info-text: #0369a1;

  --shadow-sm: var(--skeuo-elevation-xs);
  --shadow-md: var(--skeuo-elevation-sm);
  --shadow-lg: var(--skeuo-elevation-md);
  --shadow-xl: var(--skeuo-elevation-lg);
}

/* =======================================================
   Custom 3D Skeuomorphic Scrollbars
   ======================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #d8e2ee;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
  display: block !important;
}

::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #d8e2ee 0%, #e2ebf5 100%);
  border-radius: 9999px;
  margin: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), 0 1px 0 #ffffff;
  border: 1px solid #c9d7e7;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #9fb1c7 0%, #7589a3 100%);
  border-radius: 9999px;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  border-color: #ffffff;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

::-webkit-scrollbar-thumb:active {
  background: #1e40af;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

.main-wrapper,
.sidebar-content,
.table-responsive,
.modal-body {
  scrollbar-width: thin !important;
  scrollbar-color: #9fb1c7 #d8e2ee !important;
  -webkit-overflow-scrolling: touch;
}

html,
body {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.7) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(197, 214, 235, 0.4) 0%, transparent 50%),
    linear-gradient(180deg, #eaf0f8 0%, #dfe6f1 100%);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout Wrapper */
.app-layout {
  display: flex;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background-color: var(--bg-body);
}

/* =======================================================
   3D Skeuomorphic Sidebar & Control Deck
   ======================================================= */
.sidebar {
  width: 295px;
  min-width: 295px;
  flex-shrink: 0;
  background: var(--skeuo-surface-sidebar);
  border-right: 1.5px solid #cbd8e8;
  box-shadow: 
    6px 0 24px rgba(15, 23, 42, 0.08),
    inset -1px 0 0 rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  padding: 0.85rem 1.10rem;
  height: 72px;
  min-height: 72px;
  border-bottom: 1px solid #cbd8e8;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 60%, #eaf0f8 100%);
  box-sizing: border-box;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  transition: transform 0.2s ease;
  min-width: 0;
  flex: 1;
  text-shadow: 0 1px 0 #ffffff;
  white-space: nowrap;
}

.brand span {
  white-space: nowrap;
  display: inline-block;
}

.brand:hover {
  transform: scale(1.02);
}

.sidebar .brand-logo-img {
  height: 48px;
  width: auto;
  max-width: 82px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.16));
  transition: transform 0.2s ease;
}

.sidebar .brand:hover .brand-logo-img {
  transform: scale(1.05);
}

.brand-logo-img {
  height: 48px;
  width: auto;
  max-width: 82px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.16));
  transition: transform 0.2s ease;
}

.brand:hover .brand-logo-img {
  transform: scale(1.05);
}

.brand-highlight {
  color: #2563eb !important;
  font-weight: 800;
  display: inline;
}

/* Navigation Container */
.sidebar-content {
  flex: 1;
  padding: 1.30rem 0.95rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
}

.nav-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #64748b;
  text-shadow: 0 1px 0 #ffffff;
  padding: 0 0.75rem 0.45rem;
  white-space: nowrap;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.50rem;
}

/* 3D Skeuomorphic Nav Buttons */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.70rem;
  padding: 0.70rem 0.85rem;
  border-radius: 13px;
  color: #475569;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  background: transparent;
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-link > span:not(.badge-count):not(.nav-icon) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.nav-link:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 60%, #eaf1f9 100%);
  color: #0f172a;
  border-color: #cbd8e8;
  box-shadow: 
    0 3px 0 #b8c8dc,
    0 5px 10px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 #ffffff;
  transform: translateY(-1px);
}

.nav-link:active {
  transform: translateY(1px);
  box-shadow: 
    0 1px 0 #b8c8dc,
    inset 0 2px 4px rgba(15, 23, 42, 0.12);
}

/* Carved Sunken Active Nav Slot with Glowing LED Power-Strip */
.nav-link.active,
html[data-active-view="overview"] .nav-link[data-view="overview"],
html[data-active-view="proposals"] .nav-link[data-view="proposals"],
html[data-active-view="proposal_followup"] .nav-link[data-view="proposal_followup"],
html[data-active-view="events"] .nav-link[data-view="events"],
html[data-active-view="admin_users"] .nav-link[data-view="admin_users"] {
  background: linear-gradient(180deg, #dce6f2 0%, #e8f0f8 50%, #f2f7fc 100%);
  color: #1d4ed8;
  font-weight: 800;
  border: 1px solid #c2d2e4;
  box-shadow: 
    inset 0 2.5px 5px rgba(15, 23, 42, 0.14),
    inset 0 1px 2px rgba(15, 23, 42, 0.10),
    0 1px 0 #ffffff;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.nav-link.active::before,
html[data-active-view="overview"] .nav-link[data-view="overview"]::before,
html[data-active-view="proposals"] .nav-link[data-view="proposals"]::before,
html[data-active-view="proposal_followup"] .nav-link[data-view="proposal_followup"]::before,
html[data-active-view="events"] .nav-link[data-view="events"]::before,
html[data-active-view="admin_users"] .nav-link[data-view="admin_users"]::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 22%;
  bottom: 22%;
  width: 4px;
  border-radius: 6px;
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 50%, #1d4ed8 100%);
  box-shadow: 
    0 0 10px rgba(37, 99, 235, 0.8),
    0 0 3px #3b82f6,
    inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.8));
}

.nav-link:hover .nav-icon {
  transform: scale(1.12);
}

.badge-count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.20rem 0.60rem;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #edf3fa 100%);
  border: 1px solid #c8d7e8;
  box-shadow: 
    inset 0 1.5px 3px rgba(15, 23, 42, 0.10),
    0 1px 0 #ffffff;
  color: #475569;
}

.badge-count.primary {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid #1d4ed8;
  box-shadow: 
    0 2px 4px rgba(37, 99, 235, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.badge-count.emerald {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid #047857;
  box-shadow: 
    0 2px 4px rgba(16, 185, 129, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

/* Sidebar User Footer */
.sidebar-footer {
  padding: 1.05rem 1.25rem;
  border-top: 1px solid #cbd8e8;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.95);
  background: linear-gradient(180deg, #edf3fa 0%, #e4edf7 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 60%, #e2ecf7 100%);
  border: 1.5px solid #ffffff;
  box-shadow: 
    0 3px 8px rgba(15, 23, 42, 0.12),
    0 1px 0 #b3c2d6,
    inset 0 1px 0 #ffffff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.92rem;
  transition: transform 0.2s ease;
}

.user-profile:hover .user-avatar {
  transform: scale(1.06);
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 #ffffff;
}

.user-role-badge {
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* 3D Skeuomorphic Logout Button */
.btn-logout {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 60%, #e6ecf4 100%);
  border: 1px solid #c9d6e6;
  box-shadow: 
    0 3px 0 #b3c2d6,
    0 4px 8px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 #ffffff;
  padding: 0.50rem;
  border-radius: 11px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: linear-gradient(180deg, #fff1f1 0%, #fee2e2 100%);
  border-color: #fca5a5;
  color: var(--danger);
  box-shadow: 
    0 4px 0 #f87171,
    0 6px 12px rgba(239, 68, 68, 0.2),
    inset 0 1px 0 #ffffff;
  transform: translateY(-1px);
}

.btn-logout:active {
  transform: translateY(2px);
  box-shadow: 
    0 1px 0 #f87171,
    inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* =======================================================
   Main Content Area & 3D Top Navbar
   ======================================================= */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-body);
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.top-navbar {
  height: 72px;
  min-height: 72px;
  background: var(--skeuo-surface-topbar);
  border-bottom: 1.5px solid #cbd8e8;
  box-shadow: 
    0 4px 16px rgba(15, 23, 42, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.95);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  box-sizing: border-box;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 100%;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  padding: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* =======================================================
   3D Extruded Push Buttons (Physical Skeuomorphism)
   ======================================================= */
.btn-action-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--primary-gradient);
  color: #ffffff;
  border: 1px solid #1e40af;
  padding: 0.62rem 1.25rem;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--skeuo-btn-primary-shadow);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* Glass Reflection Highlight Sweep */
.btn-action-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: 13px 13px 40px 40px;
  pointer-events: none;
}

.btn-action-primary:hover {
  background: linear-gradient(180deg, #4b92ff 0%, #2563eb 50%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 
    0 5px 0 #1d4ed8,
    0 10px 20px rgba(29, 78, 216, 0.45),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.8);
}

.btn-action-primary:active {
  transform: translateY(3px);
  box-shadow: 
    0 1px 0 #1d4ed8,
    0 2px 5px rgba(29, 78, 216, 0.4),
    inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

.btn-action-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 60%, #e6edf5 100%);
  color: #334155;
  border: 1px solid #c5d3e3;
  padding: 0.62rem 1.15rem;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--skeuo-btn-secondary-shadow);
  transition: all 0.18s ease;
  position: relative;
  text-shadow: 0 1px 0 #ffffff;
}

.btn-action-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.1) 100%);
  border-radius: 13px 13px 30px 30px;
  pointer-events: none;
}

.btn-action-secondary:hover {
  color: #0f172a;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 50%, #edf3f9 100%);
  border-color: #b5c6d9;
  transform: translateY(-1px);
  box-shadow: 
    0 4px 0 #b3c2d6,
    0 8px 16px rgba(15, 23, 42, 0.12),
    inset 0 1.5px 0 #ffffff;
}

.btn-action-secondary:active {
  transform: translateY(2px);
  box-shadow: 
    0 1px 0 #b3c2d6,
    0 2px 4px rgba(15, 23, 42, 0.08),
    inset 0 1.5px 3px rgba(0, 0, 0, 0.12);
}

/* Page View Container */
.content-container {
  padding: 1.85rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.85rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  animation: skeuoFadeSlideIn 0.35s ease-out;
  flex: 1;
}

@keyframes skeuoFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =======================================================
   3D Skeuomorphic Stats & KPI Cards
   ======================================================= */
.stats-grid,
.kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1.15rem !important;
  margin-bottom: 1.25rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 1100px) {
  .stats-grid,
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .stats-grid,
  .kpi-grid {
    grid-template-columns: 1fr !important;
  }
}

.stat-card,
.kpi-card {
  background: var(--skeuo-surface-card) !important;
  border: 1.5px solid #cbd8e8 !important;
  border-radius: 20px !important;
  padding: 1rem 1.25rem 0.95rem !important;
  box-shadow: var(--skeuo-elevation-md) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.35rem !important;
  position: relative !important;
  overflow: hidden !important;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-sizing: border-box !important;
}

/* Top Chamfer Bevel Glow */
.stat-card::before,
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6) 40%, rgba(255, 255, 255, 0.1));
}

.stat-card:hover,
.kpi-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--neu-raised-hover) !important;
  border-color: #b5c7dc !important;
}

.stat-header,
.kpi-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.5rem !important;
}

.stat-title,
.kpi-title {
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  text-shadow: 0 1px 0 #ffffff !important;
}

/* 3D Jewel Icon Pods */
.stat-icon-wrapper {
  width: 36px !important;
  height: 36px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 60%, #e4edf8 100%) !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: 
    0 3px 6px rgba(15, 23, 42, 0.10),
    0 1px 0 #b3c2d6,
    inset 0 1px 0 #ffffff !important;
  transition: transform 0.25s ease !important;
}

.stat-icon-wrapper svg {
  width: 17px !important;
  height: 17px !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15)) !important;
}

.stat-card:hover .stat-icon-wrapper,
.kpi-card:hover .stat-icon-wrapper {
  transform: scale(1.10) rotate(3deg) !important;
}

.stat-icon-wrapper.primary {
  color: #2563eb !important;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%) !important;
  border-color: #bfdbfe !important;
  box-shadow: 0 3px 6px rgba(37, 99, 235, 0.20), inset 0 1px 0 #ffffff !important;
}

.stat-icon-wrapper.indigo {
  color: #4338ca !important;
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%) !important;
  border-color: #c7d2fe !important;
  box-shadow: 0 3px 6px rgba(67, 56, 202, 0.20), inset 0 1px 0 #ffffff !important;
}

.stat-icon-wrapper.emerald {
  color: #047857 !important;
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%) !important;
  border-color: #a7f3d0 !important;
  box-shadow: 0 3px 6px rgba(16, 185, 129, 0.20), inset 0 1px 0 #ffffff !important;
}

.stat-icon-wrapper.amber {
  color: #b45309 !important;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%) !important;
  border-color: #fde68a !important;
  box-shadow: 0 3px 6px rgba(245, 158, 11, 0.20), inset 0 1px 0 #ffffff !important;
}

.stat-icon-wrapper.sky {
  color: #0369a1 !important;
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%) !important;
  border-color: #bae6fd !important;
  box-shadow: 0 3px 6px rgba(14, 165, 233, 0.20), inset 0 1px 0 #ffffff !important;
}

.stat-value {
  font-family: var(--font-heading) !important;
  font-size: 1.65rem !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
  line-height: 1.1 !important;
  letter-spacing: -0.025em !important;
  margin: 0.15rem 0 0.05rem !important;
  text-shadow: 0 1px 0 #ffffff !important;
}

.stat-subtext {
  font-size: 0.76rem !important;
  color: var(--text-muted) !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  line-height: 1.25 !important;
}

/* =======================================================
   3D Skeuomorphic Panels & Data Cards
   ======================================================= */
.card-panel {
  background: var(--skeuo-surface-panel);
  border: 1.5px solid #cbd8e8;
  border-radius: 24px;
  box-shadow: var(--skeuo-elevation-lg);
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.25s ease;
}

.card-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.5) 40%, transparent);
  pointer-events: none;
}

.panel-header {
  padding: 1.35rem 1.65rem;
  border-bottom: 1px solid #cbd8e8;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.60rem;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 0 #ffffff;
}

.panel-controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* =======================================================
   Sunken 3D Carved Inputs & Dropdowns
   ======================================================= */
.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-box svg {
  position: absolute;
  left: 0.85rem;
  color: #64748b;
  pointer-events: none;
  transition: color 0.2s;
}

.search-input {
  padding: 0.55rem 0.95rem 0.55rem 2.4rem;
  border: 1.5px solid #c2d0e2;
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 500;
  outline: none;
  background: linear-gradient(180deg, #dbe4ef 0%, #ebf1f8 40%, #ffffff 100%);
  box-shadow: var(--skeuo-inset-md);
  color: var(--text-main);
  width: 220px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
  width: 270px;
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 
    inset 0 1px 2px rgba(0, 0, 0, 0.08),
    0 0 0 3px rgba(37, 99, 235, 0.20),
    0 1px 0 #ffffff;
}

.search-input:focus + svg,
.search-input-box:focus-within svg {
  color: var(--primary);
}

/* Sunken 3D Select Filter */
.select-filter {
  padding: 0.55rem 0.95rem;
  border: 1.5px solid #c2d0e2;
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 600;
  background: linear-gradient(180deg, #dbe4ef 0%, #ebf1f8 40%, #ffffff 100%);
  box-shadow: var(--skeuo-inset-md);
  color: #334155;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-filter:focus {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 
    inset 0 1px 2px rgba(0, 0, 0, 0.08),
    0 0 0 3px rgba(37, 99, 235, 0.20),
    0 1px 0 #ffffff;
}

/* =======================================================
   3D Skeuomorphic Data Tables
   ======================================================= */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  padding: 0 !important;
  margin: 0;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  background: #ffffff;
  font-family: var(--font-body);
}

/* Polished Sapphire Metallic Table Header */
.data-table th {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  padding: 0.88rem 1.05rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: none;
  letter-spacing: 0.02em;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  white-space: nowrap;
  box-shadow: 
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.data-table th:last-child {
  border-right: none;
  position: sticky;
  right: 0;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  z-index: 10;
  box-shadow: 
    -4px 0 10px rgba(0, 0, 0, 0.16),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45);
}

.th-content {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.th-sort-icon {
  font-size: 0.72rem;
  opacity: 0.85;
  display: inline-block;
  user-select: none;
}

.data-table td {
  padding: 0.90rem 1.05rem;
  font-size: 0.85rem;
  color: #334155;
  border-bottom: 1px solid #e1e9f2;
  vertical-align: middle;
  background: #ffffff;
  line-height: 1.45;
  transition: background 0.18s ease;
}

.data-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.data-table tbody tr:hover td {
  background: linear-gradient(180deg, #f0f7ff 0%, #e6f0fc 100%) !important;
}

.data-table tr:last-child td {
  border-bottom: 1px solid #cbd8e8;
}

.data-table td:last-child {
  position: sticky;
  right: 0;
  background: #ffffff;
  z-index: 5;
  box-shadow: -4px 0 10px rgba(15, 23, 42, 0.06);
  white-space: nowrap;
}

.data-table tbody tr:nth-child(even) td:last-child {
  background: #f8fafc;
}

.data-table tbody tr:hover td:last-child {
  background: linear-gradient(180deg, #f0f7ff 0%, #e6f0fc 100%) !important;
}

/* Proposal Code Link */
.prop-code-link {
  color: #2563eb;
  font-weight: 800;
  font-size: 0.86rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  display: inline-block;
  transition: all 0.18s ease;
  padding: 3px 8px;
  border-radius: 8px;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1), inset 0 1px 0 #ffffff;
}

.prop-code-link:hover {
  color: #1d4ed8;
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.2);
}

.title-dark-text {
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  font-size: 0.83rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.title-sub-text {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.pill-badge-gray {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid #cbd5e1;
  box-shadow: 
    inset 0 1px 2px rgba(15, 23, 42, 0.06),
    0 1px 0 #ffffff;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Client Row Item */
.client-cell {
  display: flex;
  align-items: center;
  gap: 0.70rem;
}

.client-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fc 60%, #e2ecf7 100%);
  border: 1px solid #c9d7e7;
  box-shadow: 
    0 2px 4px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
  color: #334155;
  flex-shrink: 0;
}

/* =======================================================
   Glossy 3D Skeuomorphic Status Badges & Physical LEDs
   ======================================================= */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.75rem;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: capitalize;
  border: 1px solid transparent;
  box-shadow: 
    0 2px 5px rgba(0, 0, 0, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.85),
    inset 0 -1px 1px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  position: relative;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Glowing Physical LED Indicator */
.status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 
    0 0 6px currentColor,
    0 0 1px #ffffff,
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.status-badge.draft {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  color: #475569;
  border-color: #cbd5e1;
}

.status-badge.submitted {
  background: linear-gradient(180deg, #eef2ff 0%, #c7d2fe 100%);
  color: #1e40af;
  border-color: #a5b4fc;
}

.status-badge.under_review {
  background: linear-gradient(180deg, #fffbeb 0%, #fde68a 100%);
  color: #b45309;
  border-color: #fcd34d;
}

.status-badge.completed,
.status-badge.won {
  background: linear-gradient(180deg, #ecfdf5 0%, #a7f3d0 100%);
  color: #047857;
  border-color: #6ee7b7;
}

.status-badge.approved,
.status-badge.scheduled {
  background: linear-gradient(180deg, #f0f9ff 0%, #bae6fd 100%);
  color: #0369a1;
  border-color: #7dd3fc;
}

.status-badge.rejected {
  background: linear-gradient(180deg, #fef2f2 0%, #fecaca 100%);
  color: #b91c1c;
  border-color: #fca5a5;
}

/* Final Outcome Decision Box */
.outcome-decision-box {
  margin: 0 1.5rem 0;
  border: 1.5px solid #cbd8e8;
  border-radius: 18px;
  padding: 1.35rem 1.60rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 60%, #edf2f8 100%);
  box-shadow: var(--skeuo-elevation-sm);
  transition: all 0.3s ease;
}

.outcome-decision-box.outcome-locked {
  opacity: 0.50;
  pointer-events: none;
  filter: grayscale(0.5);
}

.outcome-decision-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 0 #ffffff;
}

.outcome-required-tag {
  margin-left: auto;
  font-size: 0.70rem;
  font-weight: 700;
  color: #475569;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  padding: 0.22rem 0.70rem;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.outcome-description {
  font-size: 0.83rem;
  color: #64748b;
  margin: 0 0 1.10rem 0;
}

.outcome-btn-group {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* 3D Skeuomorphic Outcome Push Buttons */
.outcome-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.25rem;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
}

.outcome-btn.approved {
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 60%, #dcfce7 100%);
  color: #047857;
  border: 1px solid #86efac;
  box-shadow: 
    0 3px 0 #4ade80,
    0 5px 10px rgba(16, 185, 129, 0.18),
    inset 0 1px 0 #ffffff;
}

.outcome-btn.approved:hover,
.outcome-btn.approved.selected {
  background: linear-gradient(180deg, #ecfdf5 0%, #bbf7d0 100%);
  border-color: #22c55e;
  transform: translateY(-1px);
  box-shadow: 
    0 4px 0 #16a34a,
    0 8px 16px rgba(16, 185, 129, 0.3),
    inset 0 1.5px 0 #ffffff;
}

.outcome-btn.rejected {
  background: linear-gradient(180deg, #ffffff 0%, #fff5f5 60%, #fee2e2 100%);
  color: #b91c1c;
  border: 1px solid #fca5a5;
  box-shadow: 
    0 3px 0 #f87171,
    0 5px 10px rgba(239, 68, 68, 0.18),
    inset 0 1px 0 #ffffff;
}

.outcome-btn.rejected:hover,
.outcome-btn.rejected.selected {
  background: linear-gradient(180deg, #fef2f2 0%, #fecaca 100%);
  border-color: #ef4444;
  transform: translateY(-1px);
  box-shadow: 
    0 4px 0 #dc2626,
    0 8px 16px rgba(239, 68, 68, 0.3),
    inset 0 1.5px 0 #ffffff;
}

.outcome-btn.neutral {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 60%, #e2e8f0 100%);
  color: #475569;
  border: 1px solid #cbd5e1;
  box-shadow: 
    0 3px 0 #94a3b8,
    0 5px 10px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 #ffffff;
}

.outcome-btn.neutral:hover,
.outcome-btn.neutral.selected {
  background: linear-gradient(180deg, #f1f5f9 0%, #cbd5e1 100%);
  border-color: #64748b;
  transform: translateY(-1px);
  box-shadow: 
    0 4px 0 #475569,
    0 8px 16px rgba(15, 23, 42, 0.18),
    inset 0 1.5px 0 #ffffff;
}

.outcome-btn:active {
  transform: translateY(2px) !important;
  box-shadow: 0 1px 0 currentColor, inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.value-cell {
  font-weight: 800;
  font-size: 0.88rem;
  color: #0f172a;
  white-space: nowrap;
}

/* =======================================================
   3D Table Footer & Tactile Keypad Pagination
   ======================================================= */
.table-footer-bar {
  padding: 1rem 1.65rem;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  border-top: 1px solid #cbd8e8;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.50rem;
}

/* Physical 3D Keyboard Key Buttons */
.btn-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.60rem;
  border: 1px solid #c9d7e7;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 60%, #e2ecf7 100%);
  color: #475569;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 
    0 3px 0 #b3c2d6,
    0 4px 8px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 #ffffff;
  transition: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
  text-shadow: 0 1px 0 #ffffff;
}

.btn-page:hover:not(:disabled) {
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 
    0 4px 0 #b3c2d6,
    0 6px 12px rgba(15, 23, 42, 0.12),
    inset 0 1.5px 0 #ffffff;
}

.btn-page:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 
    0 1px 0 #b3c2d6,
    inset 0 1.5px 3px rgba(0, 0, 0, 0.12);
}

.btn-page.active {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  border-color: #1e40af;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 
    0 3px 0 #1e40af,
    0 6px 12px rgba(37, 99, 235, 0.4),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.btn-page:disabled {
  opacity: 0.40;
  cursor: not-allowed;
  box-shadow: 0 1px 0 #cbd5e1;
  background: #f1f5f9;
}

.sl-no-cell {
  font-weight: 700;
  color: #64748b;
  font-size: 0.82rem;
  text-align: center;
  width: 55px;
  white-space: nowrap;
}

/* 3D Table Buttons */
.btn-table-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  border: 1px solid #1e40af;
  border-radius: 10px;
  padding: 0.48rem 0.90rem;
  font-size: 0.80rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.40rem;
  cursor: pointer;
  box-shadow: 
    0 3px 0 #1e40af,
    0 4px 8px rgba(37, 99, 235, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.65);
  transition: all 0.16s ease;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-table-primary:hover {
  background: linear-gradient(180deg, #4b92ff 0%, #2563eb 100%);
  transform: translateY(-1px);
  box-shadow: 
    0 4px 0 #1e40af,
    0 7px 12px rgba(37, 99, 235, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.btn-table-primary:active {
  transform: translateY(2px);
  box-shadow: 
    0 1px 0 #1e40af,
    inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

.btn-table-secondary {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 60%, #e6edf5 100%);
  color: #2563eb;
  border: 1px solid #c9d7e7;
  border-radius: 10px;
  padding: 0.48rem 0.85rem;
  font-size: 0.80rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  box-shadow: 
    0 3px 0 #b3c2d6,
    0 4px 8px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 #ffffff;
  transition: all 0.16s ease;
  white-space: nowrap;
  text-shadow: 0 1px 0 #ffffff;
}

.btn-table-secondary:hover {
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  color: #1d4ed8;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 
    0 4px 0 #93c5fd,
    0 6px 12px rgba(37, 99, 235, 0.2),
    inset 0 1px 0 #ffffff;
}

.btn-table-secondary:active {
  transform: translateY(2px);
  box-shadow: 
    0 1px 0 #93c5fd,
    inset 0 1.5px 3px rgba(0, 0, 0, 0.15);
}

/* =======================================================
   3D Recessed Console Filter Tray
   ======================================================= */
.filters-row-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.35rem;
  background: linear-gradient(180deg, #dbe4f0 0%, #e9eff7 50%, #f3f7fd 100%);
  padding: 0.95rem 1.20rem;
  border-radius: 20px;
  border: 1.5px solid #cbd8e8;
  box-shadow: 
    inset 0 2.5px 6px rgba(15, 23, 42, 0.14),
    inset 0 1px 2px rgba(15, 23, 42, 0.09),
    0 1px 0 #ffffff;
  box-sizing: border-box;
}

.filter-ctrl-input {
  flex: 1 1 190px;
  min-width: 175px;
  background: linear-gradient(180deg, #dbe4ef 0%, #ebf1f8 40%, #ffffff 100%);
  border: 1.5px solid #c2d0e2;
  border-radius: 13px;
  padding: 0.55rem 0.90rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #0f172a;
  outline: none;
  height: 42px;
  box-sizing: border-box;
  box-shadow: var(--skeuo-inset-sm);
  transition: all 0.2s ease;
}

.filter-ctrl-input:focus {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 
    inset 0 1px 2px rgba(0, 0, 0, 0.08),
    0 0 0 3px rgba(37, 99, 235, 0.20),
    0 1px 0 #ffffff;
}

.btn-filter-search {
  background: var(--primary-gradient);
  color: #ffffff;
  border: 1px solid #1e40af;
  border-radius: 13px;
  padding: 0 1.35rem;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.50rem;
  box-shadow: var(--skeuo-btn-primary-shadow);
  transition: all 0.18s;
  flex: 0 0 auto;
  height: 42px;
  white-space: nowrap;
  box-sizing: border-box;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.btn-filter-search:hover {
  background: linear-gradient(180deg, #4b92ff 0%, #2563eb 100%);
  transform: translateY(-1px);
  box-shadow: 
    0 5px 0 #1d4ed8,
    0 9px 18px rgba(29, 78, 216, 0.45),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.8);
}

.btn-filter-search:active {
  transform: translateY(3px);
  box-shadow: 
    0 1px 0 #1d4ed8,
    inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

.btn-filter-clear {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 60%, #e2ecf7 100%);
  color: #0284c7;
  border: 1px solid #cbd8e8;
  border-radius: 13px;
  padding: 0 1.15rem;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--skeuo-btn-secondary-shadow);
  transition: all 0.18s;
  flex: 0 0 auto;
  height: 42px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-shadow: 0 1px 0 #ffffff;
}

.btn-filter-clear:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
  border-color: #7dd3fc;
  color: #0369a1;
  transform: translateY(-1px);
  box-shadow: 
    0 4px 0 #7dd3fc,
    0 7px 14px rgba(14, 165, 233, 0.2),
    inset 0 1.5px 0 #ffffff;
}

.btn-filter-clear:active {
  transform: translateY(2px);
  box-shadow: 
    0 1px 0 #7dd3fc,
    inset 0 1.5px 3px rgba(0, 0, 0, 0.15);
}

.table-top-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.95rem;
  font-size: 0.84rem;
  color: #64748b;
}

.entries-select {
  border: 1.5px solid #c2d0e2;
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  background: linear-gradient(180deg, #dbe4ef 0%, #ebf1f8 40%, #ffffff 100%);
  box-shadow: var(--skeuo-inset-sm);
  margin: 0 0.35rem;
  outline: none;
}

/* =======================================================
   3D Skeuomorphic Modal Dialog Console
   ======================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.25rem;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--skeuo-surface-panel);
  border-radius: 26px;
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 
    0 28px 60px -8px rgba(15, 23, 42, 0.40),
    0 14px 28px -4px rgba(15, 23, 42, 0.25),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(190, 205, 225, 0.4);
  transform: scale(0.93) translateY(16px);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1.5px solid #cbd8e8;
  position: relative;
}

.modal-overlay.open .modal-box {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1.35rem 1.75rem;
  border-bottom: 1px solid #cbd8e8;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
}

.modal-title {
  font-size: 1.20rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.015em;
  text-shadow: 0 1px 0 #ffffff;
}

.btn-close-modal {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 60%, #e6ecf4 100%);
  border: 1px solid #c9d6e6;
  box-shadow: 
    0 3px 0 #b3c2d6,
    0 4px 8px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 #ffffff;
  font-size: 1.3rem;
  color: #64748b;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.18s ease;
}

.btn-close-modal:hover {
  background: linear-gradient(180deg, #fff1f1 0%, #fee2e2 100%);
  border-color: #fca5a5;
  color: var(--danger);
  transform: scale(1.05);
}

.btn-close-modal:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #b3c2d6, inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.modal-body {
  padding: 1.50rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.20rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.modal-footer {
  padding: 1.20rem 1.75rem;
  border-top: 1px solid #cbd8e8;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.95);
  background: linear-gradient(180deg, #f8fafc 0%, #edf3fa 100%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  border-radius: 0 0 26px 26px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-label {
  font-size: 0.83rem;
  font-weight: 700;
  color: #334155;
  text-shadow: 0 1px 0 #ffffff;
}

/* Sunken 3D Form Controls */
.form-control {
  padding: 0.62rem 0.95rem;
  border: 1.5px solid #c2d0e2;
  border-radius: 13px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: #0f172a;
  outline: none;
  background: linear-gradient(180deg, #dbe4ef 0%, #ebf1f8 40%, #ffffff 100%);
  box-shadow: var(--skeuo-inset-md);
  transition: all 0.22s ease;
}

.form-control:focus {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 
    inset 0 1px 2px rgba(0, 0, 0, 0.08),
    0 0 0 3px rgba(37, 99, 235, 0.20),
    0 1px 0 #ffffff;
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

/* Views Container */
.view-section {
  display: none;
  flex-direction: column;
  gap: 1.65rem;
}

.view-section.active {
  display: flex;
  animation: skeuoFadeSlideIn 0.35s ease-out;
}

/* =======================================================
   3D Proposal 4-Step Follow-up System Styles
   ======================================================= */
.step-indicator-group {
  display: flex;
  flex-direction: column;
  gap: 0.40rem;
  min-width: 175px;
}

.step-pills-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  transition: all 0.25s ease;
  position: relative;
  box-shadow: var(--skeuo-elevation-xs);
}

.step-pill.completed {
  background: linear-gradient(180deg, #34d399 0%, #10b981 50%, #059669 100%);
  color: #ffffff;
  border: 1px solid #047857;
  box-shadow: 
    0 2px 5px rgba(16, 185, 129, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.step-pill.current {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  color: #ffffff;
  border: 1px solid #b45309;
  box-shadow: 
    0 2px 5px rgba(245, 158, 11, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.7);
  animation: pulse-step 2s infinite ease-in-out;
}

.step-pill.pending {
  background: linear-gradient(180deg, #e2e8f0 0%, #f8fafc 100%);
  color: #94a3b8;
  box-shadow: var(--skeuo-inset-sm);
  border: 1.5px dashed #cbd5e1;
}

.step-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: linear-gradient(180deg, #dbe4ef 0%, #f4f8fd 100%);
  box-shadow: var(--skeuo-inset-sm);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.20rem;
  border: 1px solid #c8d7e8;
}

.step-progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 0 8px rgba(16, 185, 129, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.step-progress-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.remark-bubble-cell {
  max-width: 230px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
  border: 1.5px solid #cbd8e8;
  box-shadow: var(--skeuo-elevation-xs);
  border-radius: 12px;
  padding: 0.55rem 0.80rem;
  font-size: 0.78rem;
  color: var(--text-main);
  line-height: 1.4;
  position: relative;
}

.remark-bubble-author {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.20rem;
  display: flex;
  align-items: center;
  gap: 0.30rem;
}

/* Modal Progress Banner & Timeline */
.modal-progress-banner {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 60%, #eaf1fa 100%);
  border: 1.5px solid #cbd8e8;
  border-radius: 18px;
  padding: 1.20rem 1.40rem;
  margin-bottom: 1.30rem;
  box-shadow: var(--skeuo-elevation-sm);
}

.modal-progress-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.70rem;
}

.modal-progress-title {
  font-size: 0.90rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-shadow: 0 1px 0 #ffffff;
}

.modal-progress-badge {
  padding: 0.22rem 0.70rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: var(--primary-gradient);
  color: #ffffff;
  border: 1px solid #1e40af;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.35);
}

.modal-progress-badge.all-done {
  background: var(--success-gradient);
  border-color: #047857;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.35);
}

.modal-progress-bar-track {
  width: 100%;
  height: 9px;
  background: linear-gradient(180deg, #dbe4ef 0%, #f4f8fd 100%);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: var(--skeuo-inset-sm);
  border: 1px solid #c8d7e8;
}

.modal-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.modal-stepper-checkpoints {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.modal-checkpoint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.30rem;
  z-index: 2;
  min-width: 60px;
}

.modal-checkpoint-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
  transition: all 0.25s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.modal-checkpoint.completed .modal-checkpoint-dot {
  background: var(--success-gradient);
  color: #ffffff;
  border: 1px solid #047857;
  box-shadow: 
    0 0 0 3px rgba(16, 185, 129, 0.25),
    0 3px 6px rgba(16, 185, 129, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.modal-checkpoint.active .modal-checkpoint-dot {
  background: var(--primary-gradient);
  color: #ffffff;
  border: 1px solid #1e40af;
  box-shadow: 
    0 0 0 4px rgba(37, 99, 235, 0.28),
    0 3px 6px rgba(37, 99, 235, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.modal-checkpoint.pending .modal-checkpoint-dot {
  background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
  color: #94a3b8;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.modal-checkpoint-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-align: center;
}

.modal-checkpoint.completed .modal-checkpoint-label {
  color: #065f46;
  font-weight: 800;
}

.modal-checkpoint.active .modal-checkpoint-label {
  color: #1e40af;
  font-weight: 800;
}

/* Connected Vertical Timeline */
.modal-timeline-container {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-top: 0.6rem;
  padding-left: 0.5rem;
}

.modal-timeline-item {
  display: flex;
  gap: 1rem;
  position: relative;
  padding-bottom: 1.5rem;
}

.modal-timeline-item:last-child {
  padding-bottom: 0.25rem;
}

.modal-timeline-line {
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 3px;
  background: #cbd5e1;
  z-index: 1;
  border-radius: 2px;
}

.modal-timeline-item.completed .modal-timeline-line {
  background: #10b981;
}

.modal-timeline-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 800;
  flex-shrink: 0;
  z-index: 2;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
  transition: all 0.25s ease;
}

.modal-timeline-item.completed .modal-timeline-node {
  background: var(--success-gradient);
  color: #ffffff;
  border: 1px solid #047857;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.modal-timeline-item.active .modal-timeline-node {
  background: #ffffff;
  color: #2563eb;
  border: 2.5px solid #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25);
}

.modal-timeline-item.future .modal-timeline-node {
  background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
  color: #94a3b8;
  border: 2px dashed #cbd5e1;
}

.modal-timeline-card {
  flex: 1;
  background: #ffffff;
  border: 1.5px solid #cbd8e8;
  border-radius: 16px;
  padding: 1rem 1.20rem;
  box-shadow: var(--skeuo-elevation-xs);
  transition: all 0.2s ease;
}

.modal-timeline-item.completed .modal-timeline-card {
  border-color: #86efac;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.modal-timeline-item.active .modal-timeline-card {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.modal-timeline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.modal-timeline-step-name {
  font-size: 0.94rem;
  font-weight: 800;
  color: #0f172a;
}

.modal-timeline-remark-bubble {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.65rem 0.90rem;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.45;
  margin-top: 0.45rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.modal-timeline-item.completed .modal-timeline-remark-bubble {
  border-color: #bbf7d0;
}

/* 3D Follow-up Step Cards */
.followup-step-card {
  background: var(--skeuo-surface-card);
  border: 1.5px solid #cbd8e8;
  border-radius: 20px;
  padding: 1.25rem 1.40rem;
  box-shadow: var(--skeuo-elevation-sm);
  transition: all 0.25s ease;
  position: relative;
}

.followup-step-card.completed {
  border-left: 6px solid #10b981;
}

.followup-step-card.current {
  border-left: 6px solid #2563eb;
  box-shadow: var(--skeuo-elevation-md);
}

.followup-step-card.future {
  border-left: 6px solid #cbd5e1;
  opacity: 0.75;
}

.followup-step-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.followup-step-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.followup-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 0.86rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: all 0.25s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.followup-step-card.completed .followup-step-num {
  background: var(--success-gradient);
  color: #ffffff;
  border: 1px solid #047857;
  box-shadow: 
    0 3px 8px rgba(16, 185, 129, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.followup-step-card.current .followup-step-num {
  background: var(--primary-gradient);
  color: #ffffff;
  border: 1px solid #1e40af;
  box-shadow: 
    0 0 0 4px rgba(37, 99, 235, 0.28),
    0 3px 8px rgba(37, 99, 235, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.followup-step-card.future .followup-step-num {
  background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
  color: #94a3b8;
  border: 2px dashed #cbd5e1;
}

.followup-step-remark-box {
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
  border: 1.5px solid #cbd8e8;
  box-shadow: var(--skeuo-inset-sm);
  border-radius: 12px;
  padding: 0.80rem 1.05rem;
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.45;
  margin-top: 0.50rem;
}

/* 3D Edit Step Box */
.edit-step-box {
  background: var(--skeuo-surface-card);
  border: 1.5px solid #cbd8e8;
  border-radius: 18px;
  padding: 1.20rem 1.35rem;
  margin-bottom: 1.10rem;
  box-shadow: var(--skeuo-elevation-xs);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.edit-step-box.step-active {
  box-shadow: 
    var(--skeuo-elevation-md),
    0 0 0 3px rgba(37, 99, 235, 0.25);
  border-color: #3b82f6;
}

.edit-step-box.step-locked {
  background: #f1f5f9;
  box-shadow: var(--skeuo-inset-sm);
  opacity: 0.75;
  user-select: none;
  position: relative;
}

.edit-step-box.step-locked input,
.edit-step-box.step-locked textarea {
  background: #e2e8f0;
  cursor: not-allowed;
  pointer-events: none;
}

.edit-step-box.step-completed-locked {
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%) !important;
  border-color: #86efac !important;
  box-shadow: var(--skeuo-elevation-xs);
  position: relative;
}

.edit-step-box.step-completed-locked .checkbox-toggle-label {
  cursor: default !important;
  color: #166534 !important;
}

.edit-step-box.step-completed-locked input[type="checkbox"] {
  cursor: not-allowed !important;
  accent-color: #16a34a !important;
}

.edit-step-box.step-completed-locked input[type="date"],
.edit-step-box.step-completed-locked textarea {
  background: #ffffff !important;
  border-color: #bbf7d0 !important;
  color: #1e293b !important;
  cursor: not-allowed !important;
  opacity: 0.95;
}

.step-completed-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
  color: #15803d;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid #86efac;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

/* Follow-up Stepper Container */
.followup-stepper-container {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 270px;
  max-width: 320px;
  padding: 0.60rem 0.80rem;
  background: #ffffff;
  border: 1.5px solid #cbd8e8;
  border-radius: 15px;
  box-shadow: var(--skeuo-elevation-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.followup-stepper-container:hover {
  border-color: #94a3b8;
  box-shadow: var(--skeuo-elevation-sm);
}

.stepper-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 800;
}

.stepper-progress-text {
  color: #334155;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stepper-progress-pct {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.stepper-progress-pct.done {
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
  color: #15803d;
  border-color: #86efac;
}

.stepper-mini-bar {
  width: 100%;
  height: 6px;
  background: linear-gradient(180deg, #dbe4ef 0%, #f4f8fd 100%);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid #c8d7e8;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.stepper-mini-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
  border-radius: 9999px;
  transition: width 0.35s ease;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.stepper-nodes-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  margin-top: 0.25rem;
  padding-top: 0.10rem;
}

.stepper-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  z-index: 2;
  cursor: default;
  min-width: 46px;
}

.stepper-node-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
}

.stepper-node.completed .stepper-node-dot {
  background: var(--success-gradient);
  color: #ffffff;
  border: 1px solid #047857;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.35);
}

.stepper-node.active .stepper-node-dot {
  background: #ffffff;
  color: #2563eb;
  border: 2.5px solid #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.stepper-node.pending .stepper-node-dot {
  background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
  color: #94a3b8;
  border: 1.5px solid #cbd5e1;
}

.stepper-node-label {
  font-size: 0.69rem;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.stepper-node.completed .stepper-node-label {
  color: #047857;
  font-weight: 800;
}

.stepper-node.active .stepper-node-label {
  color: #1d4ed8;
  font-weight: 800;
}

.stepper-connector {
  flex: 1;
  height: 2.5px;
  background: #cbd5e1;
  margin-top: 11px;
  z-index: 1;
  transition: background 0.3s ease;
}

.stepper-connector.completed {
  background: #10b981;
}

/* Dynamic Stage Stepper Themes */
.followup-stepper-container.stage-1 { border-color: #c7d2fe; }
.followup-stepper-container.stage-1 .stepper-node.completed .stepper-node-dot { background: linear-gradient(180deg, #6366f1, #4338ca); border-color: #3730a3; }
.followup-stepper-container.stage-1 .stepper-node.completed .stepper-node-label { color: #4338ca; }
.followup-stepper-container.stage-1 .stepper-connector.completed { background: #6366f1; }
.followup-stepper-container.stage-1 .stepper-progress-pct { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.followup-stepper-container.stage-1 .stepper-mini-bar-fill { background: #6366f1; }

.followup-stepper-container.stage-2 { border-color: #fed7aa; }
.followup-stepper-container.stage-2 .stepper-node.completed .stepper-node-dot { background: linear-gradient(180deg, #fb923c, #ea580c); border-color: #c2410c; }
.followup-stepper-container.stage-2 .stepper-node.completed .stepper-node-label { color: #c2410c; }
.followup-stepper-container.stage-2 .stepper-connector.completed { background: #f97316; }
.followup-stepper-container.stage-2 .stepper-progress-pct { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.followup-stepper-container.stage-2 .stepper-mini-bar-fill { background: #f97316; }

.followup-stepper-container.stage-3 { border-color: #a5f3fc; }
.followup-stepper-container.stage-3 .stepper-node.completed .stepper-node-dot { background: linear-gradient(180deg, #2ec4db, #0891b2); border-color: #0e7490; }
.followup-stepper-container.stage-3 .stepper-node.completed .stepper-node-label { color: #0e7490; }
.followup-stepper-container.stage-3 .stepper-connector.completed { background: #0891b2; }
.followup-stepper-container.stage-3 .stepper-progress-pct { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.followup-stepper-container.stage-3 .stepper-mini-bar-fill { background: #0891b2; }

.followup-stepper-container.stage-4 { border-color: #bbf7d0; }
.followup-stepper-container.stage-4 .stepper-node.completed .stepper-node-dot { background: var(--success-gradient); border-color: #047857; }
.followup-stepper-container.stage-4 .stepper-node.completed .stepper-node-label { color: #047857; }
.followup-stepper-container.stage-4 .stepper-connector.completed { background: #10b981; }
.followup-stepper-container.stage-4 .stepper-progress-pct { background: #dcfce7; color: #15803d; border-color: #86efac; }
.followup-stepper-container.stage-4 .stepper-mini-bar-fill { background: #10b981; }

.modal-progress-banner.stage-1 .modal-progress-bar-fill { background: #6366f1; }
.modal-progress-banner.stage-2 .modal-progress-bar-fill { background: #f97316; }
.modal-progress-banner.stage-3 .modal-progress-bar-fill { background: #0891b2; }
.modal-progress-banner.stage-4 .modal-progress-bar-fill { background: #10b981; }

/* Rejected Stepper Theme */
.followup-stepper-container.is-rejected {
  border-color: #fca5a5;
  background: #fffafa;
}

.stepper-node.rejected-step .stepper-node-dot {
  background: var(--danger-gradient) !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.35) !important;
}

.stepper-node.rejected-step .stepper-node-label {
  color: #dc2626 !important;
  font-weight: 800 !important;
}

.stepper-progress-pct.rejected {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}

.stepper-mini-bar-fill.rejected {
  background: #ef4444 !important;
}

.modal-progress-banner.is-rejected {
  border-color: #fca5a5 !important;
  background: #fff5f5 !important;
}

.modal-progress-banner.is-rejected .modal-progress-bar-fill {
  background: #ef4444 !important;
}

.modal-checkpoint.rejected .modal-checkpoint-dot {
  background: var(--danger-gradient) !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
}

.modal-checkpoint.rejected .modal-checkpoint-label {
  color: #dc2626 !important;
  font-weight: 800 !important;
}

.modal-timeline-item.rejected .modal-timeline-node {
  background: #ef4444 !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
}

.step-lock-notice {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #92400e;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fde68a;
  padding: 0.55rem 0.90rem;
  border-radius: 13px;
  margin-bottom: 0.90rem;
  box-sizing: border-box;
  width: 100%;
  box-shadow: var(--skeuo-elevation-xs);
}

.step-lock-notice svg {
  flex-shrink: 0;
  stroke: #b45309;
}

.edit-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}

.checkbox-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.70rem;
  cursor: pointer;
  user-select: none;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text-main);
  flex: 1;
  min-width: 200px;
}

.checkbox-toggle-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #2563eb;
}

/* =======================================================
   3D Master Management & Segmented Switch Tabs
   ======================================================= */
.master-tab-nav,
.nav-subtabs {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(180deg, #dbe4ef 0%, #e9eff7 50%, #f3f7fd 100%);
  padding: 0.38rem;
  border-radius: 16px;
  gap: 0.40rem;
  border: 1.5px solid #cbd8e8;
  box-shadow: 
    inset 0 2px 4px rgba(15, 23, 42, 0.12),
    0 1px 0 #ffffff;
}

.master-tab-btn,
.nav-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.50rem;
  padding: 0.55rem 1.20rem;
  border-radius: 11px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #475569;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.20s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-body);
  outline: none;
}

.master-tab-btn:hover,
.nav-subtab-btn:hover {
  color: #0f172a;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  box-shadow: 
    0 2px 5px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 #ffffff;
  border-color: #cbd8e8;
  transform: translateY(-1px);
}

.master-tab-btn:active,
.nav-subtab-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, 0.12);
}

/* Active 3D Raised Segmented Switch */
.master-tab-btn.active,
.nav-subtab-btn.active {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 60%, #e8f0f8 100%);
  color: var(--primary);
  border: 1px solid #c2d2e4;
  box-shadow: 
    0 3px 0 #b3c2d6,
    0 4px 10px rgba(15, 23, 42, 0.10),
    inset 0 1.5px 0 #ffffff;
  font-weight: 800;
  text-shadow: 0 1px 0 #ffffff;
}

.master-tab-btn.active svg,
.nav-subtab-btn.active svg {
  stroke: var(--primary);
  filter: drop-shadow(0 0 4px rgba(37, 99, 235, 0.45));
}

.timeline-container {
  max-height: 480px;
  overflow-y: auto;
  padding: 0.5rem 0.5rem 0.5rem 0;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  position: relative;
  padding-left: 1.85rem;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: #cbd8e8;
  border-radius: 2px;
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -1.85rem;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 3.5px solid #3b82f6;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.timeline-dot.created { border-color: #10b981; }
.timeline-dot.updated { border-color: #3b82f6; }
.timeline-dot.deactivated { border-color: #ef4444; }

.timeline-card {
  background: var(--skeuo-surface-card);
  border: 1.5px solid #cbd8e8;
  border-radius: 16px;
  padding: 1rem 1.30rem;
  box-shadow: var(--skeuo-elevation-xs);
  transition: all 0.22s ease;
}

.timeline-card:hover {
  box-shadow: var(--skeuo-elevation-sm);
  transform: translateY(-1px);
}

.timeline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.50rem;
}

.timeline-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.70rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: var(--skeuo-elevation-xs);
}

.timeline-action-badge.created {
  background: linear-gradient(180deg, #d1fae5 0%, #a7f3d0 100%);
  color: #047857;
  border: 1px solid #6ee7b7;
}

.timeline-action-badge.updated {
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.timeline-action-badge.deactivated {
  background: linear-gradient(180deg, #fee2e2 0%, #fecaca 100%);
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.timeline-meta {
  font-size: 0.76rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.timeline-detail-box {
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
  border: 1.5px solid #cbd8e8;
  box-shadow: var(--skeuo-inset-sm);
  border-radius: 11px;
  padding: 0.60rem 0.90rem;
  font-size: 0.83rem;
  color: #334155;
  margin-top: 0.55rem;
  line-height: 1.45;
}

.category-badge-client { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.category-badge-event_type { background: #fdf2f8; color: #be185d; border-color: #fbcfe8; }
.category-badge-proposal_category { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.category-badge-proposal_stage { background: #fefce8; color: #a16207; border-color: #fef08a; }

.field-autofilled {
  background-color: #eff6ff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
  transition: all 0.8s ease !important;
}

/* Mobile Hamburger Menu Toggle & Close Buttons */
.btn-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  border: 1px solid #c9d7e7;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 60%, #e2ecf7 100%);
  color: var(--text-main);
  cursor: pointer;
  box-shadow: var(--skeuo-btn-secondary-shadow);
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.btn-menu-toggle:hover {
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-menu-toggle:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #b3c2d6, inset 0 2px 4px rgba(0, 0, 0, 0.12);
}

.btn-close-sidebar {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #c9d7e7;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 60%, #e2ecf7 100%);
  box-shadow: var(--skeuo-btn-secondary-shadow);
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-close-sidebar:hover {
  background: linear-gradient(180deg, #fff1f1 0%, #fee2e2 100%);
  color: var(--danger);
  border-color: #fca5a5;
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.50);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* =======================================================
   Tablet & Mobile Responsiveness
   ======================================================= */
@media (max-width: 900px) {
  .btn-menu-toggle {
    display: inline-flex !important;
  }

  .btn-close-sidebar {
    display: inline-flex !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -330px !important;
    width: 295px !important;
    min-width: 295px !important;
    max-width: 88vw !important;
    height: 100vh !important;
    z-index: 999 !important;
    box-shadow: 12px 0 35px rgba(0, 0, 0, 0.25) !important;
    transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .sidebar.mobile-open {
    left: 0 !important;
  }

  .top-navbar {
    padding: 0 1.25rem !important;
    height: 66px !important;
    min-height: 66px !important;
  }

  .top-left {
    gap: 0.85rem !important;
  }

  .page-title {
    font-size: 1.15rem !important;
  }

  .content-container {
    padding: 1.25rem !important;
    gap: 1.35rem !important;
  }

  .stats-grid,
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  .panel-header {
    padding: 1.10rem !important;
    gap: 0.85rem !important;
  }

  .panel-controls {
    width: 100% !important;
    flex-wrap: wrap !important;
  }
}

/* Small Mobile Phones (<= 640px) */
@media (max-width: 640px) {
  .top-navbar {
    padding: 0 0.95rem !important;
  }

  .page-title {
    font-size: 1.02rem !important;
    max-width: calc(100vw - 90px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .content-container {
    padding: 0.85rem !important;
    gap: 1.10rem !important;
  }

  .stats-grid,
  .kpi-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
    margin-bottom: 1.10rem !important;
  }

  .stat-card,
  .kpi-card {
    padding: 0.85rem 1.05rem !important;
    gap: 0.30rem !important;
    border-radius: 16px !important;
  }

  .stat-value {
    font-size: 1.45rem !important;
  }

  .panel-header {
    padding: 0.95rem !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .panel-title {
    font-size: 1rem !important;
  }

  .panel-controls {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.60rem !important;
    width: 100% !important;
  }

  .search-input-box,
  .search-input {
    width: 100% !important;
  }

  .select-filter {
    width: 100% !important;
  }

  .btn-action-primary,
  .btn-action-secondary {
    width: 100% !important;
    justify-content: center !important;
  }

  .table-responsive {
    border-radius: 0 !important;
    margin: 0 !important;
  }

  .modal-box {
    max-width: 95vw !important;
    width: 95vw !important;
    margin: 0.5rem auto !important;
    border-radius: 20px !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .modal-body {
    padding: 1.10rem 0.95rem !important;
    gap: 0.95rem !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .modal-header {
    padding: 0.95rem 1.10rem !important;
  }

  .modal-footer {
    padding: 0.85rem 1.10rem !important;
    flex-direction: column-reverse !important;
    gap: 0.60rem !important;
  }

  .modal-footer button {
    width: 100% !important;
    justify-content: center !important;
  }

  .edit-step-box {
    padding: 0.95rem 0.85rem !important;
  }

  .edit-step-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.60rem !important;
  }

  .checkbox-toggle-label {
    width: 100% !important;
    min-width: unset !important;
  }

  .form-row {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .toast-container {
    top: 24px !important;
    right: 16px !important;
    left: 16px !important;
    width: auto !important;
    max-width: 100% !important;
  }

  .toast-alert {
    padding: 12px 14px 14px 12px !important;
    border-radius: 16px !important;
  }
}

/* Compact Mobile Phones (<= 480px) */
@media (max-width: 480px) {
  .filters-row-grid {
    padding: 0.75rem !important;
    gap: 0.60rem !important;
  }

  .filter-ctrl-input {
    flex: 1 1 100% !important;
    min-width: 100% !important;
  }

  .btn-filter-search,
  .btn-filter-clear {
    flex: 1 1 calc(50% - 0.35rem) !important;
  }

  .top-navbar {
    height: 58px !important;
    min-height: 58px !important;
    padding: 0 0.75rem !important;
  }

  .btn-menu-toggle {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
  }

  .page-title {
    font-size: 0.95rem !important;
    max-width: calc(100vw - 75px) !important;
  }

  .content-container {
    padding: 0.75rem 0.60rem !important;
    gap: 0.95rem !important;
  }

  .stat-card,
  .kpi-card {
    padding: 0.95rem 1rem !important;
    border-radius: 16px !important;
  }

  .stat-value {
    font-size: 1.50rem !important;
  }

  .stat-title {
    font-size: 0.82rem !important;
  }

  .panel-header {
    padding: 0.85rem 0.75rem !important;
  }

  .panel-title {
    font-size: 0.95rem !important;
  }

  .btn-action-primary,
  .btn-action-secondary {
    padding: 0.55rem 0.85rem !important;
    font-size: 0.82rem !important;
    border-radius: 12px !important;
  }

  .data-table th,
  .data-table td {
    padding: 0.65rem 0.75rem !important;
    font-size: 0.80rem !important;
  }

  .modal-box {
    max-width: 98vw !important;
    width: 98vw !important;
    margin: 0.25rem auto !important;
    border-radius: 16px !important;
  }

  .modal-header {
    padding: 0.75rem 0.85rem !important;
  }

  .modal-body {
    padding: 0.85rem 0.75rem !important;
    gap: 0.75rem !important;
  }

  .modal-footer {
    padding: 0.75rem 0.85rem !important;
  }

  .sidebar {
    width: min(285px, 85vw) !important;
  }
}

/* Extra Small Phones & Foldables (<= 360px) */
@media (max-width: 360px) {
  .top-navbar {
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 0.50rem !important;
  }

  .page-title {
    font-size: 0.88rem !important;
  }

  .content-container {
    padding: 0.50rem 0.40rem !important;
    gap: 0.75rem !important;
  }

  .stat-value {
    font-size: 1.35rem !important;
  }

  .data-table th,
  .data-table td {
    padding: 0.55rem 0.60rem !important;
    font-size: 0.75rem !important;
  }
}

/* Landscape Mobile & Short Height Viewports (<= 650px height) */
@media (max-height: 650px) {
  .top-navbar {
    height: 56px !important;
    min-height: 56px !important;
  }

  .modal-box {
    max-height: 96vh !important;
  }

  .modal-body {
    padding: 0.75rem !important;
  }

  .sidebar-header {
    padding: 0.75rem 1rem !important;
  }

  .brand-logo-img {
    height: 40px !important;
  }
}

/* =======================================================
   3D Skeuomorphic Toast Notification System
   ======================================================= */
.toast-container {
  position: fixed;
  top: 36px;
  right: 28px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 420px;
  width: calc(100vw - 56px);
}

.toast-alert {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px 16px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafe 50%, #eaf1fa 100%);
  border: 1.5px solid #cbd8e8;
  border-radius: 20px;
  box-shadow: 
    0 16px 36px -4px rgba(15, 23, 42, 0.22),
    0 6px 14px -2px rgba(15, 23, 42, 0.12),
    inset 0 1.5px 0 #ffffff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toastSlideInRight 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.toast-alert:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 20px 42px -4px rgba(15, 23, 42, 0.28),
    0 8px 18px -2px rgba(15, 23, 42, 0.16),
    inset 0 1.5px 0 #ffffff;
}

@keyframes toastSlideInRight {
  0% {
    opacity: 0;
    transform: translateX(115%) scale(0.9);
  }
  70% {
    transform: translateX(-3%) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOutRight {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
    max-height: 140px;
    margin-bottom: 0;
    padding-top: 14px;
    padding-bottom: 16px;
  }
  30% {
    transform: translateX(-8px) scale(0.98);
  }
  100% {
    opacity: 0;
    transform: translateX(120%) scale(0.9);
    max-height: 0;
    margin-bottom: -12px;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
  }
}

.toast-alert.toast-hiding {
  animation: toastSlideOutRight 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
  pointer-events: none;
}

.toast-icon-wrapper {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  box-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.10),
    inset 0 1px 0 #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.toast-content-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toast-title {
  font-family: var(--font-heading);
  font-size: 0.90rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 0 #ffffff;
}

.toast-message {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.45;
  word-break: break-word;
}

.toast-close-btn {
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  transition: all 0.2s ease;
  margin-top: 0;
  margin-right: -4px;
}

.toast-close-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-main);
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.08);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3.5px;
  width: 100%;
  animation: toastProgressBar linear forwards;
}

@keyframes toastProgressBar {
  from { width: 100%; }
  to { width: 0%; }
}

/* Toast Color Variations */
.toast-alert.toast-success .toast-icon-wrapper {
  background: linear-gradient(180deg, #ecfdf5 0%, #a7f3d0 100%);
  color: #047857;
  border-color: #6ee7b7;
  box-shadow: 0 3px 6px rgba(16, 185, 129, 0.25), inset 0 1px 0 #ffffff;
}
.toast-alert.toast-success .toast-title { color: #047857; }
.toast-alert.toast-success .toast-progress { background: linear-gradient(90deg, #34d399 0%, #10b981 100%); }

.toast-alert.toast-error .toast-icon-wrapper,
.toast-alert.toast-danger .toast-icon-wrapper {
  background: linear-gradient(180deg, #fef2f2 0%, #fecaca 100%);
  color: #b91c1c;
  border-color: #fca5a5;
  box-shadow: 0 3px 6px rgba(239, 68, 68, 0.25), inset 0 1px 0 #ffffff;
}
.toast-alert.toast-error .toast-title,
.toast-alert.toast-danger .toast-title { color: #b91c1c; }
.toast-alert.toast-error .toast-progress,
.toast-alert.toast-danger .toast-progress { background: linear-gradient(90deg, #f87171 0%, #ef4444 100%); }

.toast-alert.toast-warning .toast-icon-wrapper {
  background: linear-gradient(180deg, #fffbeb 0%, #fde68a 100%);
  color: #b45309;
  border-color: #fcd34d;
  box-shadow: 0 3px 6px rgba(245, 158, 11, 0.25), inset 0 1px 0 #ffffff;
}
.toast-alert.toast-warning .toast-title { color: #b45309; }
.toast-alert.toast-warning .toast-progress { background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%); }

.toast-alert.toast-info .toast-icon-wrapper {
  background: linear-gradient(180deg, #f0f9ff 0%, #bae6fd 100%);
  color: #0369a1;
  border-color: #7dd3fc;
  box-shadow: 0 3px 6px rgba(14, 165, 233, 0.25), inset 0 1px 0 #ffffff;
}
.toast-alert.toast-info .toast-title { color: #0369a1; }
.toast-alert.toast-info .toast-progress { background: linear-gradient(90deg, #38bdf8 0%, #0ea5e9 100%); }

/* =======================================================
   Ultra-Smooth & Fast Modern Loading Animation System
   ======================================================= */
.app-top-progress-bar {
  position: fixed;
  top: 72px;
  left: 295px;
  right: 0;
  height: 3.5px;
  width: 0%;
  z-index: 35;
  background: linear-gradient(90deg, #2563eb, #06b6d4, #3b82f6, #6366f1);
  background-size: 200% 100%;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.7), 0 0 6px rgba(6, 182, 212, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: width 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
  animation: appProgressGradient 1.5s linear infinite;
}

.app-top-progress-bar.active {
  opacity: 1;
}

.app-top-progress-bar.finished {
  width: 100% !important;
  opacity: 0;
  transition: width 0.15s ease, opacity 0.35s ease 0.1s;
}

@keyframes appProgressGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.app-loader-overlay {
  position: fixed;
  top: 72px;
  left: 295px;
  right: 0;
  bottom: 0;
  width: calc(100vw - 295px);
  height: calc(100vh - 72px);
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 235, 243, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1);
}

.app-loader-overlay.app-loader-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(1.025) translateY(-6px);
}

@media (max-width: 900px) {
  .app-top-progress-bar {
    left: 0;
    top: 72px;
  }

  .app-loader-overlay {
    left: 0;
    top: 72px;
    width: 100vw;
    height: calc(100vh - 72px);
  }
}

body.login-page .app-top-progress-bar,
.login-page #appTopProgressBar,
body:not(:has(.app-layout)) .app-top-progress-bar {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

body.login-page .app-loader-overlay,
.login-page #appPagePreloader,
.login-page #appActionLoaderOverlay,
body:not(:has(.app-layout)) .app-loader-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  background: rgba(230, 235, 243, 0.94) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
}

/* 3D Skeuomorphic Loader Card */
.app-loader-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.25rem 2.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 60%, #eaf0f8 100%);
  border-radius: 24px;
  border: 1.5px solid #cbd8e8;
  box-shadow: 
    0 24px 50px -6px rgba(15, 23, 42, 0.25),
    0 10px 20px -3px rgba(15, 23, 42, 0.15),
    inset 0 1.5px 0 #ffffff;
  text-align: center;
  max-width: 360px;
  min-width: 260px;
  user-select: none;
  animation: appCardPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes appCardPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.app-spinner-container {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.app-spinner-glow {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.30) 0%, rgba(6, 182, 212, 0) 70%);
  animation: appGlowPulse 1.4s ease-in-out infinite alternate;
}

@keyframes appGlowPulse {
  0% { transform: scale(0.85); opacity: 0.5; }
  100% { transform: scale(1.3); opacity: 0.9; }
}

.app-spinner-track {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #cbd8e8;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

.app-spinner-ring-outer {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3.5px solid transparent;
  border-top-color: #2563eb;
  border-right-color: #06b6d4;
  animation: appSpinSmooth 0.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  filter: drop-shadow(0 0 5px rgba(37, 99, 235, 0.45));
}

.app-spinner-ring-inner {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2.8px solid transparent;
  border-bottom-color: #3b82f6;
  border-left-color: #10b981;
  animation: appSpinSmoothReverse 0.65s linear infinite;
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.4));
}

.app-spinner-core {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  box-shadow: 
    0 0 10px rgba(37, 99, 235, 0.7),
    0 0 20px rgba(56, 189, 248, 0.4);
  animation: appCorePulse 0.9s ease-in-out infinite alternate;
}

@keyframes appSpinSmooth {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes appSpinSmoothReverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes appCorePulse {
  0% { transform: scale(0.78); opacity: 0.8; }
  100% { transform: scale(1.18); opacity: 1; }
}

.app-loader-text-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.app-loader-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 0 #ffffff;
}

.app-loader-subtitle {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.app-loader-dots {
  display: inline-flex;
  margin-left: 2px;
}

.app-loader-dots span {
  animation: appDotsBlink 1.4s infinite;
  opacity: 0;
}

.app-loader-dots span:nth-child(1) { animation-delay: 0.0s; }
.app-loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.app-loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes appDotsBlink {
  0%, 20% { opacity: 0; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1.5px); }
  80%, 100% { opacity: 0; transform: translateY(0); }
}

.btn-loading {
  position: relative;
  pointer-events: none !important;
  opacity: 0.85 !important;
}

.btn-spinner-icon {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: appSpinSmooth 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
  flex-shrink: 0;
}

/* Skeleton Shimmers */
.skeleton-row td {
  padding: 1.15rem 1.25rem !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #e1e9f2 !important;
  background: transparent !important;
}

.skeleton-shimmer {
  position: relative;
  overflow: hidden;
  background: #dce6f2;
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 0 #ffffff;
}

.skeleton-shimmer::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 20%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.4) 80%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: appShimmerWave 1.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  content: '';
}

@keyframes appShimmerWave {
  100% { transform: translateX(100%); }
}

.skeleton-text { height: 14px; border-radius: 6px; margin: 3px 0; }
.skeleton-title { height: 18px; width: 65%; border-radius: 6px; }
.skeleton-badge { height: 22px; width: 80px; border-radius: 9999px; margin: 0; }
.skeleton-btn { height: 28px; width: 76px; border-radius: 8px; }
.skeleton-timeline-steps { display: inline-flex; align-items: center; gap: 8px; }
.skeleton-step-dot { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }