/* ==========================================================
   DeValWi – Projects / Dashboard UI (complete + improved)
   Brand: Volt Navy #0B1C33, Pulse Orange #FF5C00, RCE White #FFFFFF
   ========================================================== */

/* ---------- CSS Variables ---------- */
:root {
  /* Brand */
  --volt-navy: #0B1C33;
  --pulse-orange: #FF5C00;
  --rce-white: #FFFFFF;

  /* Extended Palette */
  --navy-50:  #F0F2F5;
  --navy-100: #D6DCE5;
  --navy-200: #B0BBC9;
  --navy-300: #8A9AAD;
  --navy-400: #647890;
  --navy-500: #3E5674;
  --navy-600: #2B3E57;
  --navy-700: #1F2E3F;
  --navy-800: #132127;
  --navy-900: #0A1419;

  --orange-50:  #FFF7F0;
  --orange-100: #FFEDD6;
  --orange-200: #FFD6AD;
  --orange-300: #FFBD85;
  --orange-400: #FF9E5C;
  --orange-500: #FF5C00;
  --orange-600: #E5520D;
  --orange-700: #CC471A;
  --orange-800: #B23D26;
  --orange-900: #993333;

  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  /* Status */
  --success:       #10B981;
  --success-light: #D1FAE5;
  --warning:       #F59E0B;
  --warning-light: #FEF3C7;
  --error:         #EF4444;
  --error-light:   #FEE2E2;
  --info:          #3B82F6;
  --info-light:    #DBEAFE;

  /* Shadows */
  --shadow-xs:  0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm:  0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg:  0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl:  0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

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

  /* Spacing */
  --space-xs:  .25rem;
  --space-sm:  .5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;

  /* Typography */
  --font-size-xs: .75rem;
  --font-size-sm: .875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  /* Transitions */
  --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Focus ring */
  --focus-ring: 0 0 0 3px rgba(60,125,217,.25);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--volt-navy);
  background-color: var(--gray-50);
}

/* ---------- Animations ---------- */
@keyframes fadeIn   { from {opacity:0; transform:translateY(20px)} to {opacity:1; transform:translateY(0)} }
@keyframes slideUp  { from {opacity:0; transform:translateY(40px)} to {opacity:1; transform:translateY(0)} }
@keyframes slideInRight { from {opacity:0; transform:translateX(30px)} to {opacity:1; transform:translateX(0)} }
@keyframes pulse    { 0%,100% {transform:scale(1)} 50% {transform:scale(1.05)} }
@keyframes float    { 0%,100% {transform:translateY(0)} 50% {transform:translateY(-6px)} }
@keyframes shimmer  { 0% {transform:translateX(-100%)} 100% {transform:translateX(100%)} }

.fade-in { animation: fadeIn .6s var(--transition-normal) forwards; }
.slide-up { animation: slideUp .8s var(--transition-normal) forwards; }
.slide-in-right { animation: slideInRight .6s var(--transition-normal) forwards; }
.animate-card { opacity:0; transform:translateY(30px); animation: fadeIn .6s var(--transition-normal) forwards; }
.stagger-animate { opacity:0; transform:translateY(20px); animation: fadeIn .5s var(--transition-normal) forwards; }
.pulse-button { animation: pulse 2s infinite; }

/* ---------- Page Header ---------- */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-2xl);
  padding: var(--space-xl);
  border-bottom: 2px solid var(--gray-200);
  background: linear-gradient(135deg, var(--rce-white) 0%, var(--navy-50) 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  width: 100%;
}
.page-header-content { flex: 1; }

.page-title {
  display: flex; align-items: center; gap: var(--space-md);
  font-size: var(--font-size-4xl); font-weight: 800; color: var(--volt-navy);
  margin: 0 0 var(--space-sm) 0; line-height: 1.2;
}
.title-icon {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--pulse-orange), var(--orange-600));
  border-radius: var(--radius-lg); color: var(--rce-white);
  box-shadow: var(--shadow-md);
}
.page-subtitle { font-size: var(--font-size-lg); color: var(--gray-600); margin: 0; font-weight: 400; text-align: left; }
.page-header-actions { display: flex; gap: var(--space-md); align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-size-sm); font-weight: 600;
  border-radius: var(--radius-lg); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: all var(--transition-normal);
  position: relative; overflow: hidden; white-space: nowrap;
  background: var(--rce-white); color: var(--gray-700);
  box-shadow: var(--shadow-sm);
}
.btn::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left var(--transition-normal);
}
.btn:hover::before { left: 100%; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-primary {
  background: linear-gradient(135deg, var(--pulse-orange), var(--orange-600));
  color: var(--rce-white); border-color: var(--pulse-orange);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--orange-600), var(--orange-700)); box-shadow: var(--shadow-lg); }

.btn-secondary { background: var(--rce-white); color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--navy-50); border-color: var(--navy-200); box-shadow: var(--shadow-md); }

.btn-outline { background: transparent; color: var(--volt-navy); border-color: var(--navy-300); }
.btn-outline:hover { background: var(--volt-navy); color: var(--rce-white); border-color: var(--volt-navy); }

.btn-sm { padding: var(--space-sm) var(--space-md); font-size: var(--font-size-xs); }

.btn-icon {
  display: grid; place-items: center; width: 36px; height: 36px;
  padding: 0; background: var(--gray-100); border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); color: var(--gray-600); cursor: pointer; transition: all var(--transition-fast);
}
.btn-icon:hover { background: var(--pulse-orange); color: var(--rce-white); border-color: var(--pulse-orange); transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ---------- Notifications (used by window.showNotification) ---------- */
.notification {
  position: fixed; top: 20px; right: 20px; z-index: 20000;
  max-width: 400px; background: white; border-radius: 8px;
  box-shadow: var(--shadow-xl); overflow: hidden;
}
.notification-content { padding: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.notification-message { flex: 1; font-size: .875rem; color: #374151; }
.notification-close { background: none; border: none; font-size: 1.25rem; color: #9CA3AF; cursor: pointer; line-height: 1; }
.notification-close:hover { color: #6B7280; }
.notification-info    { border-left: 4px solid #3B82F6; }
.notification-success { border-left: 4px solid var(--success); }
.notification-warning { border-left: 4px solid var(--warning); }
.notification-error   { border-left: 4px solid var(--error); }

/* ---------- Overview / Cards ---------- */
.projects-overview { margin-bottom: var(--space-2xl); width: 100%; }
.overview-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-xl); width: 100%; }

.overview-card {
  position: relative; background: var(--rce-white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl); padding: var(--space-xl);
  display: flex; align-items: center; gap: var(--space-lg);
  transition: all var(--transition-normal); overflow: hidden; box-shadow: var(--shadow-sm);
}
.overview-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--pulse-orange), var(--orange-600));
  transform: scaleX(0); transform-origin: left; transition: transform var(--transition-normal);
}
.overview-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); border-color: var(--orange-200); }
.overview-card:hover::before { transform: scaleX(1); }

.card-background-pattern {
  position: absolute; top: -50%; right: -50%; width: 100px; height: 100px;
  background: radial-gradient(circle, var(--orange-100) 0%, transparent 70%); border-radius: 50%;
  opacity: .5; transition: all var(--transition-slow);
}
.overview-card:hover .card-background-pattern { transform: scale(1.5); opacity: .8; }

.card-icon {
  width: 64px; height: 64px; background: linear-gradient(135deg, var(--pulse-orange), var(--orange-600));
  border-radius: var(--radius-xl); display: grid; place-items: center; color: var(--rce-white); flex-shrink: 0; box-shadow: var(--shadow-lg); z-index: 2;
}
.card-content { flex: 1; position: relative; z-index: 2; }
.card-number { font-size: var(--font-size-3xl); font-weight: 800; color: var(--volt-navy); margin: 0 0 var(--space-xs) 0; line-height: 1; }
.card-label  { font-size: var(--font-size-sm); color: var(--gray-600); margin: 0 0 var(--space-xs) 0; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.card-trend { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--font-size-xs); }
.trend-indicator { padding: 2px 6px; border-radius: var(--radius-full); font-weight: 600; font-size: var(--font-size-xs); }
.trend-indicator.positive { background: var(--success-light); color: var(--success); }
.trend-indicator.neutral  { background: var(--gray-200); color: var(--gray-600); }
.trend-text { color: var(--gray-500); font-size: var(--font-size-xs); }

/* ---------- Projects Content Shell ---------- */
.projects-content {
  background: var(--rce-white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); overflow: visible; width: 100%;
}

/* ---------- Tabs ---------- */
.tab-navigation {
  position: relative; display: flex; border-bottom: 1px solid var(--gray-200);
  padding: 0 var(--space-xl); background: var(--gray-50);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0; overflow: hidden;
}
.tab-slider {
  position: absolute; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--pulse-orange), var(--orange-600));
  border-radius: var(--radius-full); transition: all var(--transition-normal); width: 120px; left: var(--space-xl);
}
.tab-btn {
  display: flex; align-items: center; gap: var(--space-sm); background: none; border: none;
  padding: var(--space-lg) var(--space-xl); font-size: var(--font-size-sm); font-weight: 600;
  color: var(--gray-600); cursor: pointer; transition: all var(--transition-fast);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; position: relative;
}
.tab-btn.active { color: var(--pulse-orange); background: var(--rce-white); }
.tab-btn:hover { color: var(--volt-navy); background: var(--navy-50); }
.tab-icon { display: grid; place-items: center; }
.tab-count { background: var(--gray-200); color: var(--gray-600); padding: 2px 8px; border-radius: var(--radius-full); font-size: var(--font-size-xs); font-weight: 700; min-width: 20px; text-align: center; }
.tab-btn.active .tab-count { background: var(--orange-100); color: var(--pulse-orange); }

.tab-content { min-height: 600px; }
.tab-pane { display: none; padding: var(--space-xl); animation: fadeIn .5s var(--transition-normal); }
.tab-pane.active { display: block; }

/* ---------- Content Header ---------- */
.content-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-xl); gap: var(--space-lg); }
.search-box { position: relative; flex: 1; max-width: none; }
.search-icon { position: absolute; left: var(--space-md); top: 50%; transform: translateY(-50%); color: var(--gray-400); pointer-events: none; }
.search-input {
  width: 100%; padding: var(--space-md) var(--space-md) var(--space-md) 40px;
  border: 2px solid var(--gray-200); border-radius: var(--radius-lg); font-size: var(--font-size-sm);
  background: var(--gray-50); transition: all var(--transition-fast);
}
.search-input:focus { outline: none; border-color: var(--pulse-orange); background: var(--rce-white); box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.1); }
.filter-sort { display: flex; gap: var(--space-md); }
.sort-select { padding: var(--space-md); border: 2px solid var(--gray-200); border-radius: var(--radius-lg); font-size: var(--font-size-sm); background: var(--rce-white); color: var(--gray-700); cursor: pointer; transition: all var(--transition-fast); }
.sort-select:focus { outline: none; border-color: var(--pulse-orange); box-shadow: 0 0 0 3px rgba(255,92,0,.1); }

/* ---------- Projects Grid / Cards ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: var(--space-xl); }
.projects-grid:has(.empty-state) {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}
.project-card {
  background: var(--rce-white); border: 2px solid var(--gray-200); border-radius: var(--radius-xl);
  overflow: visible; transition: all var(--transition-normal); position: relative; box-shadow: var(--shadow-sm); z-index: 1;
}
.project-card.dropdown-open { z-index: 999; }
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--pulse-orange), var(--orange-600));
  transform: scaleX(0); transform-origin: left; transition: transform var(--transition-normal);
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2xl); border-color: var(--orange-200); }
.project-card:hover::before { transform: scaleX(1); }
.project-card.shared { border-color: var(--info); background: linear-gradient(135deg, var(--rce-white) 0%, var(--info-light) 100%); }

.shared-indicator {
  position: absolute; top: var(--space-md); right: var(--space-md);
  background: var(--info); color: var(--rce-white); padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full); font-size: var(--font-size-xs); font-weight: 700; display: flex; align-items: center; gap: var(--space-xs); z-index: 2;
}
.project-card-header { padding: var(--space-xl) var(--space-xl) var(--space-md); display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-md); overflow: hidden; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.project-info { flex: 1; }
.project-title { font-size: var(--font-size-lg); font-weight: 700; color: var(--volt-navy); margin: 0 0 var(--space-sm) 0; line-height: 1.3; }
.project-meta-inline { display: flex; align-items: center; gap: var(--space-md); }
.meta-item { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--font-size-xs); color: var(--gray-500); font-weight: 500; }
.project-status-badge { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs) var(--space-md); font-size: var(--font-size-xs); font-weight: 700; border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; animation: pulse 2s infinite; }
.status-active { background: var(--success-light); color: var(--success); }
.status-active .status-dot { background: var(--success); }
.status-draft { background: var(--warning-light); color: var(--warning); }
.status-draft .status-dot { background: var(--warning); }
.status-completed { background: var(--info-light); color: var(--info); }
.status-completed .status-dot { background: var(--info); }
.status-archived { background: var(--gray-200); color: var(--gray-600); }
.status-archived .status-dot { background: var(--gray-500); }

.project-card-body { padding: 0 var(--space-xl) var(--space-xl); overflow: hidden; }
.project-description { color: var(--gray-600); line-height: 1.6; margin: 0 0 var(--space-lg) 0; font-size: var(--font-size-sm); }
.project-progress { margin-bottom: var(--space-lg); }
.progress-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-sm); }
.progress-label { font-size: var(--font-size-xs); font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: .5px; }
.progress-percentage { font-size: var(--font-size-xs); font-weight: 700; color: var(--pulse-orange); }
.progress-bar { height: 6px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--pulse-orange), var(--orange-600)); border-radius: var(--radius-full); transition: width var(--transition-slow); animation: shimmer 2s infinite; background-size: 200% 100%; }
.project-card-footer { padding: var(--space-md) var(--space-xl) var(--space-xl); border-top: 1px solid var(--gray-100); background: var(--gray-50); overflow: visible; position: relative; z-index: 1; }
.project-actions { display: flex; justify-content: space-between; align-items: center; }

/* Dropdown */
.dropdown { position: relative; overflow: visible; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0; background: var(--rce-white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); box-shadow: 0 10px 40px rgba(0,0,0,.15); padding: var(--space-sm);
  min-width: 160px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all var(--transition-fast); z-index: 999999; margin-top: 0;
}
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); font-size: var(--font-size-sm); color: var(--gray-700); text-decoration: none; border-radius: var(--radius-md); transition: all var(--transition-fast); }
.dropdown-item:hover { background: var(--gray-100); color: var(--volt-navy); }
.dropdown-item.text-danger { color: var(--error); }
.dropdown-item.text-danger:hover { background: var(--error-light); color: var(--error); }

/* ---------- Templates Grid ---------- */
.templates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-xl); }
.template-card {
  background: var(--rce-white); border: 2px solid var(--gray-200); border-radius: var(--radius-xl);
  padding: var(--space-xl); text-align: center; transition: all var(--transition-normal);
  position: relative; overflow: hidden; box-shadow: var(--shadow-sm);
}
.template-card::before {
  content: ''; position: absolute; top: -50%; right: -50%; width: 100px; height: 100px;
  background: radial-gradient(circle, var(--navy-100) 0%, transparent 70%); border-radius: 50%; opacity: .5; transition: all var(--transition-slow);
}
.template-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: var(--volt-navy); }
.template-card:hover::before { transform: scale(1.5); opacity: .8; }
.template-card.featured { border-color: var(--pulse-orange); background: linear-gradient(135deg, var(--rce-white) 0%, var(--orange-50) 100%); }
.template-badge { position: absolute; top: var(--space-md); right: var(--space-md); background: var(--pulse-orange); color: var(--rce-white); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-full); font-size: var(--font-size-xs); font-weight: 700; }
.template-icon { width: 80px; height: 80px; background: linear-gradient(135deg, var(--volt-navy), var(--navy-700)); border-radius: var(--radius-xl); display: grid; place-items: center; color: var(--rce-white); margin: 0 auto var(--space-lg); box-shadow: var(--shadow-lg); position: relative; z-index: 2; }
.template-title { font-size: var(--font-size-xl); font-weight: 700; color: var(--volt-navy); margin: 0 0 var(--space-md) 0; position: relative; z-index: 2; }
.template-description { color: var(--gray-600); line-height: 1.6; margin: 0 0 var(--space-lg) 0; font-size: var(--font-size-sm); position: relative; z-index: 2; }
.template-tags { display: flex; justify-content: center; gap: var(--space-sm); margin-bottom: var(--space-lg); flex-wrap: wrap; }
.tag { background: var(--navy-100); color: var(--navy-700); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-full); font-size: var(--font-size-xs); font-weight: 600; }

/* ---------- Activity Timeline ---------- */
.activity-timeline { position: relative; padding-left: var(--space-xl); }
.activity-timeline::before { content: ''; position: absolute; left: 20px; top: 0; bottom: 0; width: 2px; background: var(--gray-200); }
.activity-item { position: relative; margin-bottom: var(--space-xl); padding-left: var(--space-xl); }
.activity-timeline-marker { position: absolute; left: -28px; top: 0; }
.activity-dot { width: 12px; height: 12px; background: var(--pulse-orange); border-radius: 50%; border: 3px solid var(--rce-white); box-shadow: var(--shadow-md); }
.activity-content { background: var(--rce-white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-sm); }
.activity-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--space-sm); gap: var(--space-md); }
.activity-title { font-size: var(--font-size-base); font-weight: 600; color: var(--volt-navy); margin: 0; }
.activity-time { font-size: var(--font-size-xs); color: var(--gray-500); font-weight: 500; white-space: nowrap; }
.activity-description { color: var(--gray-600); margin: 0 0 var(--space-sm) 0; line-height: 1.6; }
.activity-project { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--font-size-xs); color: var(--gray-500); background: var(--gray-100); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-md); width: fit-content; }

/* ---------- Empty States ---------- */
.empty-state { 
  text-align: center; 
  padding: var(--space-2xl); 
  color: var(--gray-500);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.empty-state-illustration { 
  margin: 0 auto var(--space-lg); 
  animation: float 6s ease-in-out infinite;
  display: flex;
  justify-content: center;
  align-items: center;
}
.empty-state h3 { 
  font-size: var(--font-size-xl); 
  font-weight: 700; 
  color: var(--gray-700); 
  margin: 0 0 var(--space-md) 0; 
}
.empty-state p { 
  color: var(--gray-500); 
  margin: 0 0 var(--space-lg) 0; 
  max-width: 400px; 
  margin-left: auto; 
  margin-right: auto; 
  line-height: 1.6; 
}

/* ---------- Floating Action Button ---------- */
.fab-container { position: fixed; bottom: var(--space-xl); right: var(--space-xl); z-index: 1000; }
.fab {
  width: 60px; height: 60px; background: linear-gradient(135deg, var(--pulse-orange), var(--orange-600)); color: var(--rce-white);
  border: none; border-radius: 50%; box-shadow: var(--shadow-xl); cursor: pointer; display: grid; place-items: center;
  transition: all var(--transition-normal); animation: float 4s ease-in-out infinite;
}
.fab:hover { transform: scale(1.1) translateY(-2px); box-shadow: var(--shadow-2xl); }

/* ==========================================================
   MODALS (Edit / Delete / Message)
   - Header & Footer sticky
   - Body scrollable
   ========================================================== */

/* Overlay */
.modal-overlay {
  position: fixed; 
  inset: 0;
  background: rgba(11, 28, 51, 0.8);
  display: none; 
  align-items: center; 
  justify-content: center;
  z-index: 15000; 
  backdrop-filter: blur(8px);
  opacity: 0; 
  visibility: hidden; 
  transition: opacity .2s ease, visibility .2s ease;
}
.modal-overlay.show,
.modal-overlay[aria-hidden="false"] {
  display: flex !important; 
  align-items: center !important; 
  justify-content: center !important;
  opacity: 1 !important; 
  visibility: visible !important; 
  pointer-events: auto !important;
}
/* Ensure all direct children (modals) are centered */
.modal-overlay > * {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Dialog */
.enhanced-modal,
.delete-modal,
.message-modal {
  background: var(--rce-white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  max-width: 900px;
  width: calc(100% - 2rem);
  max-height: 90vh;
  overflow: hidden;
  transform: translateY(20px) scale(.95);
  transition: transform .3s ease, opacity .3s ease;
  margin: var(--space-lg) auto;  /* auto for horizontal centering */
  display: flex;
  flex-direction: column;       /* allow sticky header/footer */
  position: relative;            /* ensure proper positioning */
}
.modal-overlay.show .enhanced-modal,
.modal-overlay.show .delete-modal,
.modal-overlay.show .message-modal { transform: translateY(0) scale(1); }

/* Header (sticky) */
.modal-header {
  padding: var(--space-xl);
  border-bottom: 1px solid var(--gray-200);
  display: flex; justify-content: space-between; align-items: flex-start;
  background: linear-gradient(135deg, var(--navy-50) 0%, var(--rce-white) 100%);
  position: sticky; top: 0; z-index: 2;
}
.modal-title-section { display: flex; align-items: flex-start; gap: var(--space-lg); }
.modal-icon {
  width: 48px; height: 48px; border-radius: var(--radius-lg);
  display: grid; place-items: center; color: var(--rce-white);
  background: linear-gradient(135deg, var(--pulse-orange), var(--orange-600));
  box-shadow: var(--shadow-md);
}
.modal-title-section h2 { font-size: var(--font-size-2xl); font-weight: 700; color: var(--volt-navy); margin: 0 0 var(--space-xs) 0; }
.modal-title-section p  { color: var(--gray-600); margin: 0; font-size: var(--font-size-sm); }
.modal-close {
  background: var(--gray-100); 
  border: none; 
  width: 40px; 
  height: 40px; 
  border-radius: var(--radius-lg);
  color: var(--gray-500); 
  cursor: pointer; 
  display: flex; 
  place-items: center; 
  transition: all var(--transition-fast);
  font-size: 1.5rem;
  justify-content: center;
}
.modal-close:hover { background: var(--error-light); color: var(--error); transform: scale(1.06); }

/* Body (scrollable content area) */
.modal-body {
  padding: var(--space-xl);
  max-height: calc(90vh - 140px);
  overflow-y: auto;
  background: var(--volt-navy); /* dark body to match DVP table */
}

/* Footer (sticky) */
.modal-footer {
  padding: var(--space-xl);
  border-top: 1px solid var(--gray-200);
  display: flex; gap: var(--space-md); justify-content: flex-end;
  background: var(--gray-50);
  position: sticky; bottom: 0; z-index: 2;
}

/* Delete / Message header variants */
.modal-header-danger { background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); border-bottom: 2px solid var(--error); }
.modal-header-success { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); border-bottom: 2px solid var(--success); }
.modal-header-warning { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); border-bottom: 2px solid #f59e0b; }
.modal-icon-danger   { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); box-shadow: 0 4px 12px rgba(239,68,68,.3); }
.modal-icon-success  { background: linear-gradient(135deg, #10B981 0%, #059669 100%); box-shadow: 0 4px 12px rgba(5,150,105,.3); }
.modal-icon-warning  { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); box-shadow: 0 4px 12px rgba(245,158,11,.3); }

/* Delete modal content */
.delete-modal { max-width: 520px; }
.delete-modal-content { padding: .5rem 0; }
.delete-warning { font-size: 1.125rem; color: var(--gray-100); margin-bottom: 1.5rem; }
.delete-warning strong { color: var(--error); }
.delete-details { font-size: .938rem; font-weight: 500; color: var(--gray-200); margin-bottom: .75rem; }
.delete-list { list-style: none; padding: 0; margin: 0; }
.delete-list li {
  padding: .625rem 1rem; margin-bottom: .5rem; background: var(--error-light); border-left: 3px solid var(--error);
  border-radius: 6px; font-size: .875rem; color: var(--gray-700);
}
.delete-list li::before {
  content: '×'; display: inline-block; width: 20px; height: 20px; background: var(--error); color: white;
  border-radius: 50%; text-align: center; line-height: 20px; font-weight: bold; margin-right: .75rem; font-size: 1rem;
}
.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white; border: none;
  padding: .75rem 1.5rem; border-radius: 8px; font-size: .938rem; font-weight: 600; cursor: pointer; transition: .2s ease; display: inline-flex; align-items: center; gap: .5rem;
}
.btn-danger:hover { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(239,68,68,.3); }

/* Message modal content */
.message-modal { max-width: 520px; }
.message-modal-content { padding: .5rem 0; }
.modal-message { font-size: 1.125rem; color: var(--navy-100); margin-bottom: 1.5rem; }
.message-list { list-style: none; padding: 0; margin: 0; }
.message-list li {
  padding: .625rem 1rem; margin-bottom: .5rem; background: var(--success-light); border-left: 3px solid var(--success);
  border-radius: 6px; font-size: .875rem; color: var(--gray-700);
}

/* ==========================================================
   Enhanced Forms (used in Edit Test modal)
   ========================================================== */

.enhanced-form { display: flex; flex-direction: column; gap: var(--space-lg); }
.form-row { display: flex; gap: var(--space-lg); }
.form-group { flex: 1; display: flex; flex-direction: column; gap: 6px; }

/* Brighter labels (on dark modal body) */
.enhanced-form .form-group label { color: #e7edf5; font-weight: 600; letter-spacing: .2px; opacity: .98; }

/* Input appearance – consistent across types */
.enhanced-form .form-control,
.enhanced-form input[type="text"],
.enhanced-form input[type="number"] {
  height: 42px;
  border-radius: 10px;
  border: 1px solid #24384d;
  background: #0f2640;
  color: #ffffff;
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
  width: 100%;
  font-size: var(--font-size-sm);
}
.enhanced-form .form-control::placeholder { color: #a8b3c0; opacity: .85; }
.enhanced-form .form-control:focus { outline: none; border-color: #3c7dd9; box-shadow: var(--focus-ring); }

/* Read-only (e.g., unique_id) */
.enhanced-form .form-control[readonly] { color: #c7d2de; background: #102a47; }

/* Two-column grid helper */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 680px) { .form-grid { grid-template-columns: 1fr; } }

/* Details (Advanced fields) */
.enhanced-form details { margin-top: 10px; }
.enhanced-form summary { color: #e7edf5; cursor: pointer; font-weight: 700; list-style: none; }
.enhanced-form summary::-webkit-details-marker { display: none; }

/* File Upload */
.file-upload-area {
  border: 2px dashed var(--gray-300); border-radius: var(--radius-lg); padding: var(--space-2xl);
  text-align: center; cursor: pointer; transition: all var(--transition-fast); background: var(--gray-50);
  display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center;
}
.file-upload-area:hover { border-color: var(--pulse-orange); background: var(--orange-50); }
.file-upload-area.dragover { border-color: var(--pulse-orange); background: rgba(255, 92, 0, 0.08); box-shadow: inset 0 0 0 1px rgba(255,92,0,0.15); }
.file-upload-area svg { color: var(--gray-400); margin-bottom: var(--space-md); }
.file-upload-area .upload-visual { width: 64px; height: 64px; border-radius: 50%; background: rgba(15, 38, 64, 0.05); display: grid; place-items: center; margin-bottom: 4px; }
.file-upload-area .upload-text { display: flex; flex-direction: column; gap: 4px; color: var(--gray-600); }
.file-upload-area .upload-text strong { color: var(--volt-navy); font-size: 1rem; }
.file-upload-area .upload-summary { font-size: 0.85rem; color: var(--gray-500); }
.file-types { font-size: var(--font-size-xs); color: var(--gray-500); }

.import-validation { margin-top: 16px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 16px; }
.import-validation p { margin: 0 0 12px 0; color: #94a3b8; font-size: 0.9rem; }
.import-validation-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.import-validation-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.06); background: rgba(15,38,64,0.3); transition: border-color .2s ease; }
.import-validation-list li .check-icon { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; background: rgba(255,255,255,0.08); color: #cbd5f5; }
.import-validation-list li .check-title { font-weight: 600; color: #e7edf5; }
.import-validation-list li .check-desc { font-size: 0.85rem; color: #94a3b8; }
.import-validation-list li.is-valid { border-color: rgba(34,197,94,0.6); background: rgba(34,197,94,0.08); }
.import-validation-list li.is-valid .check-icon { background: rgba(34,197,94,0.15); color: #22c55e; }
.import-validation-list li.is-error { border-color: rgba(248,113,113,0.6); background: rgba(248,113,113,0.08); }
.import-validation-list li.is-error .check-icon { background: rgba(248,113,113,0.15); color: #f87171; }
.import-validation-list li.is-warning { border-color: rgba(251,191,36,0.6); background: rgba(251,191,36,0.08); }
.import-validation-list li.is-warning .check-icon { background: rgba(251,191,36,0.15); color: #fbbf24; }
.import-validation-list li.optional::after { content: 'Optional'; margin-left: auto; font-size: 0.75rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.08em; }

/* Export Modal - Radio and Checkbox Options */
.radio-option:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(249, 115, 22, 0.3) !important;
  transform: translateY(-1px);
}
.radio-option input[type="radio"]:checked + span {
  color: #f97316;
}
.checkbox-option:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(249, 115, 22, 0.3) !important;
  transform: translateY(-1px);
}
.checkbox-option input[type="checkbox"]:checked ~ div > div:first-child {
  color: #f97316;
}

/* ==========================================================
   Mode Selection (used elsewhere but kept here)
   ========================================================== */

.mode-selection { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); margin: var(--space-md) 0; }
.mode-card {
  position: relative; background: var(--rce-white); border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl); padding: var(--space-lg); cursor: pointer; transition: all var(--transition-normal); overflow: hidden;
}
.mode-card:hover { border-color: var(--pulse-orange); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.mode-card.selected { border-color: var(--pulse-orange); background: linear-gradient(135deg, rgba(255,92,0,.05) 0%, var(--rce-white) 100%); box-shadow: var(--shadow-xl); }
.mode-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--pulse-orange); transform: scaleX(0); transform-origin: left; transition: transform var(--transition-normal); }
.mode-card:hover::before, .mode-card.selected::before { transform: scaleX(1); }
.mode-card-icon { display: grid; place-items: center; width: 60px; height: 60px; background: linear-gradient(135deg, var(--volt-navy) 0%, rgba(11, 28, 51, .8) 100%); border-radius: var(--radius-lg); margin-bottom: var(--space-md); color: var(--rce-white); transition: all var(--transition-normal); }
.mode-card:hover .mode-card-icon { background: linear-gradient(135deg, var(--pulse-orange) 0%, rgba(255, 92, 0, .8) 100%); transform: scale(1.05); }
.mode-card-content h3 { font-size: 1.25rem; font-weight: 700; color: var(--volt-navy); margin-bottom: var(--space-sm); }
.mode-card-content p { color: var(--gray-600); font-size: .875rem; line-height: 1.5; margin-bottom: var(--space-md); }
.mode-features { display: flex; flex-direction: column; gap: var(--space-xs); }
.feature-item { display: flex; align-items: center; gap: var(--space-xs); font-size: .875rem; color: var(--gray-700); }
.feature-item svg { color: var(--pulse-orange); flex-shrink: 0; }
.mode-card-badge { position: absolute; top: var(--space-md); right: var(--space-md); background: linear-gradient(135deg, var(--pulse-orange) 0%, rgba(255,92,0,.8) 100%); color: var(--rce-white); font-size: .75rem; font-weight: 600; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: .5px; animation: pulse 2s infinite; }

/* Back button used in headers */
.back-button {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--gray-100); border: none; border-radius: var(--radius-lg);
  color: var(--gray-600); cursor: pointer; transition: all var(--transition-fast); margin-right: var(--space-md);
}
.back-button:hover { background: var(--pulse-orange); color: var(--rce-white); transform: translateX(-2px); }

/* ==========================================================
   Draft Projects Section
   ========================================================== */
.drafts-section { margin-bottom: 2rem; }
.section-header { margin-bottom: 1.5rem; }
.section-title { font-size: 1.5rem; font-weight: 600; color: var(--volt-navy); margin-bottom: .5rem; display: flex; align-items: center; }
.section-subtitle { color: #6b7280; margin: 0; }
.drafts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.draft-card { background: white; border-radius: 12px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,.1); border: 1px solid #e5e7eb; transition: all .3s ease; }
.draft-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.draft-card-header { margin-bottom: 1rem; }
.draft-title { font-size: 1.125rem; font-weight: 600; color: var(--volt-navy); margin: 0 0 .5rem 0; }
.draft-meta { display: flex; gap: 1rem; font-size: .875rem; color: #6b7280; }
.draft-step { background: var(--pulse-orange); color: white; padding: .25rem .5rem; border-radius: 4px; font-weight: 500; }
.draft-description { font-size: .875rem; color: #6b7280; margin-bottom: 1rem; line-height: 1.5; }
.draft-progress { margin-bottom: 1.5rem; }
.progress-text { font-size: .875rem; color: #6b7280; }
.draft-actions { display: flex; gap: .75rem; }
.btn-primary.btn-sm { background: var(--pulse-orange); color: #fff; }
.btn-primary.btn-sm:hover { background: #e5540a; transform: translateY(-1px); }
.btn-secondary.btn-sm { background: #f3f4f6; color: #6b7280; border: 1px solid #d1d5db; }
.btn-secondary.btn-sm:hover { background: #e5e7eb; color: #374151; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1024px) {
  .page-header { flex-direction: column; gap: var(--space-lg); align-items: stretch; }
  .overview-cards { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
  .projects-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 768px) {
  .page-title { font-size: var(--font-size-3xl); }
  .page-header-actions { flex-direction: column; align-items: stretch; }
  .overview-cards { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .templates-grid { grid-template-columns: 1fr; }
  .tab-navigation { overflow-x: auto; padding: 0 var(--space-md); }
  .tab-btn { white-space: nowrap; padding: var(--space-md); }
  .tab-content { padding: var(--space-lg); }
  .content-header { flex-direction: column; align-items: stretch; }
  .search-box { max-width: none; }
  .form-row { flex-direction: column; }
  .mode-selection { grid-template-columns: 1fr; gap: var(--space-sm); }
  .mode-card { padding: var(--space-md); }
  .mode-card-icon { width: 50px; height: 50px; }
  .mode-card-content h3 { font-size: 1.125rem; }
}
@media (max-width: 480px) {
  .overview-card { flex-direction: column; text-align: center; padding: var(--space-lg); }
  .card-icon { width: 48px; height: 48px; }
  .project-card-footer { padding: var(--space-md); }
  .project-actions { flex-direction: column; gap: var(--space-sm); }
  .activity-timeline { padding-left: var(--space-lg); }
  .activity-item { padding-left: var(--space-md); }
  .activity-timeline-marker { left: -20px; }
}

/* ==========================================================
   Utilities & Print
   ========================================================== */
.modal-overlay[aria-hidden="false"] .enhanced-modal,
.modal-overlay[aria-hidden="false"] .delete-modal,
.modal-overlay[aria-hidden="false"] .message-modal {
  transform: translateY(0) scale(1);
}

@media print {
  .fab-container,
  .modal-overlay,
  .page-header-actions,
  .notification { display: none !important; }
  .projects-content { box-shadow: none; border: 1px solid var(--gray-300); }
  .project-card { break-inside: avoid; margin-bottom: var(--space-lg); }
}


/* Advanced fields affordance */
.adv-details { margin-top: 12px; }
.adv-summary {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; cursor: pointer; user-select: none;
  color: #e7edf5; font-weight: 700;
}
.adv-summary .chev { transition: transform .2s ease; opacity: .9; }
.adv-details[open] .adv-summary .chev { transform: rotate(180deg); }
.adv-summary .adv-hint {
  margin-left: auto; font-weight: 500; font-size: 12px; color: #a8b3c0; opacity: .9;
}
.adv-grid { margin-top: 10px; }

/* Light invalid feedback ring */
.form-control:invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .15);
}

/* ===== Group Editor (gm-*) — paste at END of CSS ===== */

/* Make the modal use sticky header/footer and a scrollable body */
.gm-modal { max-height: 90vh; display:flex; flex-direction:column; }
.gm-header { position: sticky; top: 0; z-index: 5; background: linear-gradient(135deg, var(--navy-50) 0%, var(--rce-white) 100%); }
.gm-body   { padding: var(--space-xl); overflow-y:auto; background: #0f1b2d; } /* dark body */
.gm-footer { position: sticky; bottom: 0; z-index: 5; background: var(--gray-50); }

/* Section cards */
.gm-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid #24364b;
  border-radius: 12px;
  padding: .9rem;
  margin-bottom: 1rem;
}
.gm-card-head { display:flex; align-items:center; justify-content:space-between; gap:.75rem; margin-bottom:.5rem; }
.gm-section-title { font-size:1rem; font-weight:600; margin:0; color:#f0f3f9; }

/* Inputs on the dark background */
.gm-grid { display:grid; gap:.75rem 1rem; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
.gm-card .form-group label { color:#cfe0f3; }
.gm-card .form-control {
  background:#172840; border:1px solid #2b3e59; color:#e6edf3;
  border-radius:8px; padding:6px 10px;
}
.gm-card .form-control[readonly] { color:#b9c7d6; background:#13243a; }

/* Advanced details */
.gm-adv .adv-summary { display:flex; align-items:center; gap:.5rem; cursor:pointer; color:#cfe0f3; }
.gm-adv .adv-hint { color:#9cb3cc; margin-left:auto; }

/* Toolbars */
.gm-tools { display:flex; align-items:center; gap:.5rem; }
.gm-search {
  background:#13243a; border:1px solid #2b3e59; color:#e6edf3;
  border-radius:8px; padding:6px 10px; min-width:220px;
}

/* Tables */
.gm-table-scroll { border:1px solid #24364b; border-radius:8px; overflow:auto; max-height:260px; }
.gm-table { width:100%; border-collapse:collapse; font-size:.875rem; color:#e6edf3; }
.gm-table th, .gm-table td { padding:8px 10px; border-bottom:1px solid #24364b; white-space:nowrap; }
.gm-table thead { position:sticky; top:0; background:var(--navy-700); z-index:1; }
.gm-table .is-num { text-align:right; font-variant-numeric: tabular-nums; }

/* Small bits */
.badge { display:inline-block; background:#1e3a5f; color:#fff; border-radius:9999px; padding:2px 8px; font-size:.75rem; margin-left:.4rem; }
.btn[disabled], .btn.disabled, .btn.is-disabled { opacity:.6; cursor:not-allowed; pointer-events:none; }

/* If something still looks washed out, force contrast (quick fix) */
.gm-table th, .gm-table td { color:#e6edf3 !important; }

/* ===================================================================== */
/* ===== DVP-ONLY SKIN (scoped) =========================================
   Applies only when #appLayout has the .dvp-mode class. Safe elsewhere.
======================================================================== */

/* Sidebar shell */
.app-layout.dvp-mode #appSidebar {
  background: #ffffff;
  border-right: 1px solid #E6EEF7;
  box-shadow: 0 0 32px rgba(11, 28, 51, 0.04);
  color: #0B1C33;
  overflow: hidden;
}

/* Content wrapper */
.app-layout.dvp-mode #appSidebar .dvp-side-nav {
  padding: 16px;
}

/* Section heading */
.app-layout.dvp-mode #appSidebar .dvp-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin: 16px 0 10px;
  color: #0B1C33;
}

/* Containers */
.app-layout.dvp-mode #appSidebar .dvp-links,
.app-layout.dvp-mode #appSidebar .dvp-actions {
  display: grid;
  gap: 8px;
}

/* === Sidebar Buttons – base (gilt für Back, All Projects, Save, …) === */
.app-layout.dvp-mode #appSidebar .dvp-side-nav .btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;

  padding: 10px 14px;
  border-radius: 12px;

  background: #FFFFFF;
  border: 1px solid #D6E0EA;
  color: #0B1C33;

  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;

  box-shadow: 0 2px 4px rgba(11, 28, 51, 0.03);
  transition: transform .06s ease, box-shadow .12s ease, background .12s ease;
}

/* Icon inside sidebar buttons */
.app-layout.dvp-mode #appSidebar .dvp-side-nav .btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Hover / active */
.app-layout.dvp-mode #appSidebar .dvp-side-nav .btn:hover {
  background: #F7FAFD;
  box-shadow: 0 2px 8px rgba(11, 28, 51, .06);
}

.app-layout.dvp-mode #appSidebar .dvp-side-nav .btn:active {
  transform: translateY(1px);
}

/* Primary (Add) */
.app-layout.dvp-mode #appSidebar .dvp-side-nav .btn-primary {
  background: #FF6B00;
  border-color: #E75C00;
  color: #fff;
  box-shadow: 0 3px 10px rgba(255, 107, 0, 0.35);
}

.app-layout.dvp-mode #appSidebar .dvp-side-nav .btn-primary:hover {
  background: #e55100;
}

/* Danger (Delete) */
.app-layout.dvp-mode #appSidebar .dvp-side-nav .btn-danger {
  background: #FFF6F6;
  border-color: #F2C2C2;
  color: #8B1E1E;
}

.app-layout.dvp-mode #appSidebar .dvp-side-nav .btn-danger:hover {
  background: #FFECEC;
}

/* Disabled state */
.btn-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Share Project Modal Styles */
.user-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
}

.user-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  border-bottom: 1px solid var(--gray-200);
}

.user-result-item:last-child {
  border-bottom: none;
}

.user-result-item:hover {
  background-color: var(--gray-50);
}

.user-result-item .user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.user-result-item .user-info strong {
  color: var(--volt-navy);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.user-result-item .user-email {
  color: var(--gray-600);
  font-size: var(--font-size-xs);
}

.user-result-item svg {
  color: var(--pulse-orange);
  flex-shrink: 0;
}

.search-no-results,
.search-error {
  padding: 16px;
  text-align: center;
  color: var(--gray-500);
  font-size: var(--font-size-sm);
}

.selected-users-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  padding: 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
}

.no-selected-users {
  color: var(--gray-500);
  font-size: var(--font-size-sm);
  font-style: italic;
}

.selected-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
}

.selected-user-chip .user-name {
  color: var(--volt-navy);
  font-weight: 500;
}

.selected-user-chip .user-email {
  color: var(--gray-600);
  font-size: var(--font-size-xs);
}

.remove-user-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.remove-user-btn:hover {
  background: var(--gray-200);
  color: var(--error);
}

/* Form group spacing in modal */
.modal-body .form-group {
  margin-bottom: var(--space-lg);
  position: relative;
}

.modal-body .form-group:last-child {
  margin-bottom: 0;
}

.modal-body label {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--volt-navy);
  font-weight: 500;
  font-size: var(--font-size-sm);
}

.modal-body .form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.modal-body .form-control:focus {
  outline: none;
  border-color: var(--pulse-orange);
  box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.1);
}

.modal-body select.form-control {
  cursor: pointer;
}

/* License Required Styles */
.license-required {
  position: relative;
  opacity: 0.65;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.license-required.disabled {
  background: var(--gray-300) !important;
  color: var(--gray-500) !important;
  border-color: var(--gray-300) !important;
}

.license-required .license-icon {
  color: #F59E0B;
  vertical-align: middle;
  margin-left: 4px;
  filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.4));
}

.btn.license-required {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.btn.license-required:hover {
  opacity: 0.85;
  background: var(--gray-400) !important;
}

.btn.license-required:active {
  opacity: 0.9;
}

.dropdown-item.license-required {
  opacity: 0.65;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.dropdown-item.license-required:hover {
  opacity: 0.85;
  background: var(--gray-100) !important;
}

/* Share Project Modal Improvements */
.share-project-modal {
  /* Uses .enhanced-modal base styles with border-radius and shadow */
}

.share-project-modal .modal-icon {
  /* Icon already styled by base .modal-icon class */
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
}

.share-project-modal .form-group label {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  color: var(--gray-100);
  font-weight: 600;
  font-size: var(--font-size-sm);
}

.share-project-modal .form-group label svg {
  color: var(--pulse-orange);
}

.user-count-badge {
  display: inline-block;
  background: var(--pulse-orange);
  color: white;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
  vertical-align: middle;
}

.share-project-modal .form-group small {
  color: var(--gray-400);
  font-size: 0.75rem;
  margin-top: 6px;
  display: block;
  line-height: 1.4;
}

.selected-users-list {
  min-height: 120px;
  max-height: 300px;
  overflow-y: auto;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.selected-users-list:has(.selected-user-chip) {
  border-color: rgba(255, 255, 255, 0.3);
  border-style: solid;
  background: rgba(255, 255, 255, 0.08);
  align-items: stretch;
  justify-content: flex-start;
}

.no-selected-users {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--gray-400);
  width: 100%;
}

.selected-user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.selected-user-chip:last-child {
  margin-bottom: 0;
}

.selected-user-chip:hover {
  border-color: var(--pulse-orange);
  background: rgba(255, 92, 0, 0.1);
  box-shadow: 0 4px 8px rgba(255, 92, 0, 0.2);
  transform: translateY(-1px);
}

.user-chip-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pulse-orange) 0%, #E5520D 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.user-chip-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.user-chip-info .user-name {
  color: var(--gray-100);
  font-weight: 600;
  font-size: var(--font-size-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip-info .user-email {
  color: var(--gray-400);
  font-size: var(--font-size-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.remove-user-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: var(--gray-400);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.remove-user-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--error);
  color: var(--error);
  transform: scale(1.1);
}

/* Delete Project Modal Styles */
.delete-project-warning-box {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #FFF5F5;
  border: 2px solid #FEE2E2;
  border-radius: var(--radius-md);
  margin: 16px 0;
}

.delete-project-warning-box svg {
  color: #DC2626;
  flex-shrink: 0;
  margin-top: 2px;
}

.delete-project-warning-box .delete-details-title {
  margin: 0 0 8px 0;
  color: #991B1B;
  font-weight: 600;
  font-size: var(--font-size-sm);
}

.delete-project-list {
  margin: 0;
  padding-left: 20px;
  color: #7F1D1D;
  font-size: var(--font-size-sm);
}

.delete-project-list li {
  margin-bottom: 4px;
}

.delete-project-list li:last-child {
  margin-bottom: 0;
}

.delete-warning-final {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #FEE2E2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-md);
}

.delete-warning-final svg {
  flex-shrink: 0;
}


