/* ==========================================================================
   Apple-Inspired Design System for M&E System (ທສວ / ທສຕ)
   Inspired by Apple (https://www.apple.com/th/)
   Default: Dark Mode | Toggleable to Light Mode
   ========================================================================== */

:root {
  --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Noto Sans Lao', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);

  /* Apple Brand Colors */
  --apple-blue: #2997ff;
  --apple-blue-hover: #0077ed;
  --apple-green: #30d158;
  --apple-green-bg: rgba(48, 209, 88, 0.15);
  --apple-amber: #ffd60a;
  --apple-amber-bg: rgba(255, 214, 10, 0.15);
  --apple-orange: #ff9f0a;
  --apple-orange-bg: rgba(255, 159, 10, 0.16);
  --apple-purple: #a78bfa;
  --apple-purple-bg: rgba(167, 139, 250, 0.16);
  --apple-red: #ff453a;
  --apple-red-bg: rgba(255, 69, 58, 0.15);
}

/* ==========================================================================
   DARK THEME (Default)
   ========================================================================== */
body.dark-theme {
  color-scheme: dark;
  --bg-main: #0a0d18;
  --bg-surface: #0f1526;
  --bg-surface-glass: rgba(14, 20, 35, 0.82);
  --bg-surface-elevated: #151d32;
  --bg-subtle: rgba(255, 255, 255, 0.05);
  --bg-hover: rgba(255, 255, 255, 0.08);
  --bg-card: #0f1526;

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-accent: rgba(56, 189, 248, 0.45);

  --card-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --card-glow: 0 0 35px -5px rgba(56, 189, 248, 0.18);
  --nav-glass: rgba(10, 14, 26, 0.85);
  --table-highlight: rgba(56, 189, 248, 0.08);

  --accent-cyan: #38bdf8;
  --accent-blue: #60a5fa;
  --accent-glow: rgba(56, 189, 248, 0.4);

  background-color: #0a0d18;
  background-image: 
    radial-gradient(circle at 85% 15%, rgba(37, 99, 235, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 10% 85%, rgba(99, 102, 241, 0.16) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.6) 0%, #060911 100%);
  background-attachment: fixed;
}

/* ==========================================================================
   LIGHT THEME (Toggleable - Luxury SaaS Apple Design)
   ========================================================================== */
body.light-theme {
  color-scheme: light;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-glass: rgba(255, 255, 255, 0.85);
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-card: #ffffff;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.14);
  --border-accent: rgba(0, 113, 227, 0.35);

  --card-shadow: 0 10px 30px -4px rgba(15, 23, 42, 0.06), 0 2px 8px -2px rgba(15, 23, 42, 0.04);
  --card-glow: 0 0 28px -4px rgba(0, 113, 227, 0.15);
  --nav-glass: rgba(255, 255, 255, 0.85);
  --table-highlight: rgba(0, 113, 227, 0.05);

  --apple-blue: #0071e3;
  --apple-blue-hover: #0077ed;
  --apple-green: #16a34a;
  --apple-green-bg: rgba(22, 163, 74, 0.12);
  --apple-amber: #d97706;
  --apple-amber-bg: rgba(217, 119, 6, 0.12);
  --apple-orange: #ea580c;
  --apple-orange-bg: rgba(234, 88, 12, 0.12);
  --apple-purple: #7c3aed;
  --apple-purple-bg: rgba(124, 58, 237, 0.12);
  --apple-red: #dc2626;
  --apple-red-bg: rgba(220, 38, 38, 0.12);

  --accent-cyan: #0284c7;
  --accent-blue: #0071e3;
  --accent-glow: rgba(0, 113, 227, 0.25);

  background-color: #f8fafc !important;
  background-image: 
    radial-gradient(circle at 85% 15%, rgba(0, 113, 227, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 10% 85%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
  background-attachment: fixed;
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.55;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  min-height: 100vh;
}

/* ==========================================================================
   NAVIGATION (Apple Nav Bar)
   ========================================================================== */
.apple-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--nav-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.nav-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--apple-blue), #5e5ce6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(41, 151, 255, 0.3);
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: contain;
  background: #ffffff;
  padding: 1.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.brand-logo-img:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(41, 151, 255, 0.4);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-primary);
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Segmented Navigation Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
  border: 1px solid var(--border-subtle);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

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

.nav-tab.active {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-accent {
  background: linear-gradient(135deg, var(--apple-blue), #64d2ff);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  margin-left: 2px;
}

/* Nav Actions & Theme Toggle */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.apple-btn-secondary {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.apple-btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-medium);
}

.apple-btn-primary {
  background: var(--apple-blue);
  border: none;
  color: #fff;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 10px rgba(41, 151, 255, 0.3);
}

.apple-btn-primary:hover {
  background: var(--apple-blue-hover);
  transform: scale(1.01);
}

.apple-btn-primary.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

/* Apple-style Theme Toggle Switch */
.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.toggle-track {
  width: 58px;
  height: 30px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: 15px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  transition: background var(--transition-fast);
}

.icon-moon, .icon-sun {
  font-size: 12px;
  z-index: 1;
  user-select: none;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: var(--bg-surface-elevated);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-fast);
}

body.light-theme .toggle-thumb {
  transform: translateX(27px);
}

/* ==========================================================================
   SUBHEADER BANNER
   ========================================================================== */
.sub-banner {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
}

.sub-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--apple-green);
  box-shadow: 0 0 8px var(--apple-green);
  animation: livePulse 2s infinite;
}

@keyframes livePulse {
  0% { transform: scale(1); opacity: 1; box-shadow: 0 0 4px var(--apple-green); }
  50% { transform: scale(1.25); opacity: 0.8; box-shadow: 0 0 10px var(--apple-green); }
  100% { transform: scale(1); opacity: 1; box-shadow: 0 0 4px var(--apple-green); }
}

.live-dot.syncing {
  background-color: var(--apple-orange);
  box-shadow: 0 0 8px var(--apple-orange);
}

.drive-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--apple-blue);
  background: rgba(41, 151, 255, 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.drive-badge.excel-badge {
  color: var(--apple-green);
  background: rgba(52, 199, 89, 0.12);
  border: 1px solid rgba(52, 199, 89, 0.25);
  font-weight: 500;
}

/* ==========================================================================
   MAIN CONTAINER & PANELS
   ========================================================================== */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.view-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view-panel.active {
  display: block;
}

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

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px 0 10px;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   METRICS GRID (Apple KPI Cards)
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.metric-card {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
}

.metric-card.accent-card {
  border-color: rgba(48, 209, 88, 0.35);
}

.metric-card.premium-card {
  border-color: var(--border-accent);
  box-shadow: var(--card-glow);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.metric-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.metric-icon-badge {
  font-size: 16px;
}

.badge-green {
  background: var(--apple-green-bg);
  color: var(--apple-green);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.metric-value {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.metric-footnote {
  font-size: 12px;
  color: var(--text-secondary);
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.metric-number {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  line-height: 1.15;
}

.metric-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  opacity: 0.9;
}

.metric-trend {
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.metric-trend.info {
  color: var(--text-secondary);
}

.metric-trend.success {
  color: var(--apple-green);
  font-weight: 600;
}

.metric-trend.warning {
  color: var(--apple-orange);
  font-weight: 600;
}

.overview-duration-section {
  margin-bottom: 32px;
}

.text-accent {
  color: var(--apple-blue);
}

.text-emerald {
  color: var(--apple-green);
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.content-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 860px) {
  .content-grid-2 {
    grid-template-columns: 1fr;
  }
}

.apple-card {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.card-header-clean {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.tag-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

/* Status Breakdown & Bars */
.bar-chart-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bar-row-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.bar-province-name {
  font-weight: 500;
  color: var(--text-primary);
}

.bar-amount-label {
  font-weight: 600;
  color: var(--apple-blue);
}

.bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--apple-blue), #64d2ff);
  transition: width 0.8s ease-out;
}

.status-progress-bar {
  display: flex;
  height: 12px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--bg-subtle);
}

.seg-green { background-color: var(--apple-green); }
.seg-amber { background-color: var(--apple-amber); }
.seg-red { background-color: var(--apple-red); }

.status-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.dot-green, .dot-amber, .dot-red {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-green { background-color: var(--apple-green); }
.dot-amber { background-color: var(--apple-amber); }
.dot-red { background-color: var(--apple-red); }

.quick-callout {
  display: flex;
  gap: 12px;
  background: var(--bg-subtle);
  border-left: 3px solid var(--apple-blue);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ==========================================================================
   APPROVED PROJECT CARDS
   ========================================================================== */
.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--apple-blue);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.btn-link:hover {
  text-decoration: underline;
}

.approved-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.approved-item-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.approved-item-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
}

.app-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.app-code-pill {
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--apple-blue);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.app-badge-done {
  font-size: 11px;
  font-weight: 600;
  color: var(--apple-green);
  background: var(--apple-green-bg);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.app-proj-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.app-proj-owner {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.app-card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.app-budget-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--apple-blue);
}

.app-budget-sub {
  font-size: 10px;
  color: var(--text-secondary);
}

/* ==========================================================================
   VIEW 2: BUDGET UTILIZATION VIEW
   ========================================================================== */
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.category-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--apple-blue);
  display: block;
  margin-bottom: 6px;
}

.panel-heading {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.panel-subheading {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 780px;
}

.panel-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Budget Spotlight Card */
.budget-spotlight-card {
  background: linear-gradient(135deg, rgba(41, 151, 255, 0.12), rgba(18, 18, 20, 0.7));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  margin-bottom: 32px;
  box-shadow: var(--card-glow);
}

@media (max-width: 860px) {
  .budget-spotlight-card {
    grid-template-columns: 1fr;
  }
}

.spotlight-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--apple-blue);
  margin-bottom: 12px;
}

.spotlight-amount {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.spotlight-amount .currency {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-secondary);
}

.spotlight-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.spotlight-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  justify-content: center;
  border-left: 1px solid var(--border-subtle);
  padding-left: 28px;
}

@media (max-width: 860px) {
  .spotlight-stats {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border-subtle);
    padding-top: 20px;
  }
}

.s-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.s-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.s-stat-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.apple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.apple-table th {
  padding: 14px 16px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-medium);
  white-space: nowrap;
}

.apple-table td {
  padding: 14px 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.apple-table tr:hover td {
  background: var(--bg-hover);
}

.highlight-col {
  background: var(--table-highlight);
  font-weight: 600;
}

.table-total-row td {
  border-top: 2px solid var(--border-medium);
  border-bottom: none;
  padding: 18px 16px;
  font-size: 14px;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-bold { font-weight: 700; }
.text-muted { color: var(--text-secondary); }

/* Status Chips */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.status-chip.success {
  background: var(--apple-green-bg);
  color: var(--apple-green);
}

.status-chip.warning {
  background: var(--apple-amber-bg);
  color: var(--apple-amber);
}

.status-chip.danger {
  background: var(--apple-red-bg);
  color: var(--apple-red);
}

.status-chip.info {
  background: rgba(41, 151, 255, 0.15);
  color: var(--apple-blue);
}

/* ==========================================================================
   VIEW 3: PROJECTS FILTER BAR & CARDS
   ========================================================================== */
.filter-glass-bar {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.search-input-wrap {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-secondary);
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 10px 38px 10px 42px;
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-input-wrap input:focus {
  border-color: var(--apple-blue);
}

.clear-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.apple-select {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 9px 14px;
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.apple-select:focus {
  border-color: var(--apple-blue);
}

.apple-select option,
.apple-select optgroup,
.form-select option,
.form-select optgroup {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
}

.list-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.view-mode-toggle {
  display: flex;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  padding: 2px;
  border: 1px solid var(--border-subtle);
}

.view-btn {
  background: transparent;
  border: none;
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.view-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-weight: 600;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-medium);
}

.p-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.p-code {
  font-size: 13px;
  font-weight: 700;
  color: var(--apple-blue);
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.p-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 8px;
}

.p-owner {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.4;
}

.p-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.p-tag {
  font-size: 11px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.p-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.p-budget-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.p-budget-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   VIEW 4: M&E EVALUATIONS
   ========================================================================== */
.evaluations-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.eval-card {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--card-shadow);
}

.eval-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.eval-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.eval-meta {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.eval-scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.score-box {
  background: var(--bg-subtle);
  padding: 14px;
  border-radius: var(--radius-md);
}

.score-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.score-badge {
  font-size: 14px;
  font-weight: 700;
  color: var(--apple-green);
}

.env-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  background: var(--bg-subtle);
  padding: 18px;
  border-radius: var(--radius-md);
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-primary);
}

/* ==========================================================================
   VIEW 5: GOOGLE DRIVE VIEW
   ========================================================================== */
.gdrive-hero-card {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--card-shadow);
}

.gdrive-status-header {
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 28px;
  margin-bottom: 28px;
}

@media (max-width: 860px) {
  .gdrive-status-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.gdrive-logo-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.gdrive-status-info {
  flex: 1;
}

.gdrive-status-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.gdrive-path {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  word-break: break-all;
}

.gdrive-path code {
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--apple-blue);
}

.sync-status-tags {
  display: flex;
  gap: 8px;
}

.gdrive-folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.folder-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.folder-icon {
  font-size: 28px;
}

.folder-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.folder-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.folder-file-tag {
  font-size: 11px;
  font-family: monospace;
  color: var(--apple-blue);
  background: rgba(41, 151, 255, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  width: fit-content;
}

/* ==========================================================================
   MODAL DIALOG (Apple Sheet Modal)
   ========================================================================== */
.apple-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.apple-modal-card {
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--apple-blue);
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

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

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

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
}

.modal-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--apple-blue);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
}

.modal-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}

@media (max-width: 600px) {
  .modal-fields-grid {
    grid-template-columns: 1fr;
  }
}

.modal-field {
  display: flex;
  flex-direction: column;
}

.modal-field-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.modal-field-val {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-word;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   VIEW 6: DATA ENTRY FORM (Apple Form Styles)
   ========================================================================== */
.form-card-section {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.form-section-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--apple-blue);
  background: rgba(41, 151, 255, 0.12);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.form-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px 22px;
}

.form-grid-col2 {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .form-grid-col2 {
    grid-column: span 1;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

.form-label .required {
  color: var(--apple-red);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--apple-blue);
  background: var(--bg-surface-elevated);
  box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.15);
}

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

.form-hint {
  font-size: 11px;
  color: var(--apple-blue);
  font-weight: 500;
  min-height: 16px;
}

.form-actions-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.mt-24 { margin-top: 24px; }

/* ==========================================================================
   TIMELINE & DURATION TRACKING (ຂາເຂົ້າ ທສວ ຫາ ຂໍ້ຕົກລົງ ລມຕ)
   ========================================================================== */

.subnav-segmented {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  margin-top: 14px;
}

.subnav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.subnav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.subnav-tab.active {
  background: var(--apple-blue);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(41, 151, 255, 0.35);
}

.sub-tab-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

.subnav-tab:not(.active) .sub-tab-badge {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.timeline-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(16px);
}

.timeline-project-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card);
}

.tpc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.tpc-title-area {
  flex: 1;
}

.tpc-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 6px 0 4px;
  line-height: 1.4;
}

.tpc-owner {
  font-size: 13px;
  color: var(--text-secondary);
}

.tpc-duration-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  flex-shrink: 0;
}

.tpc-duration-badge.fast {
  background: rgba(52, 199, 89, 0.12);
  border-color: rgba(52, 199, 89, 0.3);
  color: var(--apple-green);
}

.tpc-duration-badge.medium {
  background: rgba(41, 151, 255, 0.12);
  border-color: rgba(41, 151, 255, 0.3);
  color: var(--apple-blue);
}

.tpc-duration-badge.long {
  background: rgba(255, 159, 10, 0.12);
  border-color: rgba(255, 159, 10, 0.3);
  color: var(--apple-orange);
}

.tpc-badge-icon {
  font-size: 20px;
}

.tpc-duration-val {
  font-size: 18px;
  font-weight: 700;
  display: block;
}

.tpc-duration-sub {
  font-size: 12px;
  opacity: 0.9;
}

/* Timeline Stepper Component (High-Contrast Apple Design) */
.timeline-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 18px;
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow-x: auto;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 170px;
  z-index: 2;
  flex-shrink: 0;
}

.step-node-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 2px solid var(--apple-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-node:hover .step-node-icon {
  transform: scale(1.1);
}

.step-node.completed .step-node-icon {
  background: linear-gradient(135deg, #0071e3, #5e5ce6);
  border-color: #2997ff;
}

.step-node.success .step-node-icon {
  background: linear-gradient(135deg, #34c759, #30d158);
  border-color: #34c759;
}

.step-node-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
}

.step-node-date {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", monospace;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.3px;
}

body.light-theme .step-node-date {
  background: rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
}

/* Central Stepper Connector Track with Hero Badge */
.step-connector {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 16px;
  min-width: 170px;
  height: 48px;
}

.step-connector::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: linear-gradient(90deg, #2997ff, #30d158);
  border-radius: 2px;
  z-index: 1;
  box-shadow: 0 0 12px rgba(41, 151, 255, 0.45);
}

/* Prominent Hero Duration Badge */
.step-duration-hero {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #18181b;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 0 1.5px rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  border: 2px solid transparent;
}

.step-duration-hero:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7);
}

.step-duration-hero.fast {
  border-color: #34c759;
  background: linear-gradient(135deg, rgba(52, 199, 89, 0.22), #151518);
  box-shadow: 0 4px 22px rgba(52, 199, 89, 0.35), 0 0 0 1px rgba(52, 199, 89, 0.4);
}

.step-duration-hero.medium {
  border-color: #2997ff;
  background: linear-gradient(135deg, rgba(41, 151, 255, 0.22), #151518);
  box-shadow: 0 4px 22px rgba(41, 151, 255, 0.35), 0 0 0 1px rgba(41, 151, 255, 0.4);
}

.step-duration-hero.long {
  border-color: #ff9f0a;
  background: linear-gradient(135deg, rgba(255, 159, 10, 0.22), #151518);
  box-shadow: 0 4px 22px rgba(255, 159, 10, 0.35), 0 0 0 1px rgba(255, 159, 10, 0.4);
}

body.light-theme .step-duration-hero {
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
}

body.light-theme .step-duration-hero.fast {
  background: linear-gradient(135deg, rgba(52, 199, 89, 0.15), #ffffff);
}

body.light-theme .step-duration-hero.medium {
  background: linear-gradient(135deg, rgba(41, 151, 255, 0.15), #ffffff);
}

body.light-theme .step-duration-hero.long {
  background: linear-gradient(135deg, rgba(255, 159, 10, 0.15), #ffffff);
}

.sdh-icon {
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.sdh-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.sdh-main {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.1;
  color: #ffffff;
  white-space: nowrap;
}

body.light-theme .sdh-main {
  color: #1d1d1f;
}

.fast .sdh-main {
  color: #34c759;
}

.medium .sdh-main {
  color: #2997ff;
}

.long .sdh-main {
  color: #ff9f0a;
}

.sdh-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  opacity: 0.95;
  white-space: nowrap;
  margin-top: 3px;
}

.step-duration-hero.small {
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.sdh-mini {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.tpc-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

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

.days-bar-container {
  width: 100%;
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

.days-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* ==========================================================================
   DRAG & DROP EXCEL OVERLAY & EXCEL BADGE INTERACTION
   ========================================================================== */
.drag-drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.drop-card {
  background: var(--bg-card);
  border: 2px dashed var(--apple-blue);
  border-radius: 24px;
  padding: 50px 70px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  transform: scale(1.02);
  transition: transform 0.2s ease;
}

.drop-icon {
  font-size: 56px;
  margin-bottom: 16px;
  display: inline-block;
  animation: pulseDrop 1.6s ease-in-out infinite;
}

@keyframes pulseDrop {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.1); }
}

.drop-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.drop-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

.excel-badge {
  transition: all 0.2s ease;
}

.excel-badge:hover {
  background: rgba(0, 113, 227, 0.18) !important;
  border-color: var(--apple-blue) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   SAAS PROJECT MANAGEMENT DASHBOARD STYLES (UNIFIED LUXURY DESIGN)
   - Dark Luxury SaaS applied to body.dark-theme
   - Apple Luxury Light Mode applied to body.light-theme
   - Full feature & component parity across both themes
   ========================================================================== */

/* 1. SHARED STRUCTURAL & LAYOUT RULES */
.brand-cube-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.luxury-tabs {
  border-radius: 999px;
  padding: 4px;
}

.luxury-tabs .nav-tab {
  font-size: 13px;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: 999px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.saas-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0071e3, #5e5ce6);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-notif-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notif-badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: #ff453a;
  border-radius: 50%;
}

/* Executive Dashboard Canvas */
.saas-dashboard-layout {
  display: block;
  width: 100%;
  margin-bottom: 24px;
  position: relative;
}

.saas-sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.saas-card {
  border-radius: 18px;
  padding: 18px 20px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.saas-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.saas-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.saas-title-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.saas-count-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
}

.saas-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.saas-icon-btn {
  background: transparent;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.18s ease;
}

.saas-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saas-task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.saas-checkbox-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.saas-checkbox-wrap input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.saas-custom-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.saas-task-content {
  flex: 1;
  min-width: 0;
}

.saas-task-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saas-task-sub {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.saas-tag-badge.red {
  background: rgba(255, 69, 58, 0.18);
  color: #ff453a;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.saas-activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.saas-activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.squircle-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.saas-act-info {
  flex: 1;
}

.saas-act-title {
  font-size: 12px;
  font-weight: 600;
}

.saas-act-time {
  font-size: 11px;
}

.saas-quick-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.saas-dock-btn {
  border-radius: 14px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.saas-dock-label {
  font-size: 11px;
  font-weight: 500;
}

.saas-main-canvas {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.saas-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.saas-main-heading {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.saas-main-subheading {
  font-size: 12px;
  margin-top: 2px;
}

.saas-pill-btn-action {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.saas-overview-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sync-spin-icon {
  display: inline-block;
  transition: transform 0.2s ease;
}

.sync-spin-icon.spinning,
.spinning .sync-spin-icon {
  animation: spinIcon 1s linear infinite;
}

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

.saas-btn-luxury-sync {
  background: linear-gradient(135deg, #059669, #0284c7);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.saas-btn-luxury-sync:hover {
  background: linear-gradient(135deg, #10b981, #0ea5e9);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.45), 0 0 14px rgba(14, 165, 233, 0.35);
}

.saas-btn-luxury-sync:active {
  transform: translateY(0) scale(0.98);
}

.saas-btn-luxury-outline {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.saas-btn-luxury-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.saas-file-badge-btn {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #34d399;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.saas-file-badge-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.25);
  transform: translateY(-1px);
}

.badge-action-pill {
  background: rgba(52, 211, 153, 0.2);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.saas-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1100px) {
  .saas-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .saas-metrics-row {
    grid-template-columns: 1fr;
  }
}

.saas-stat-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.saas-stat-label {
  font-size: 12.5px;
  font-weight: 600;
}

.saas-stat-val {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 4px 0 10px;
  line-height: 1.15;
}

.kpi-icon-pill {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.saas-stat-card:hover .kpi-icon-pill,
.metric-card:hover .kpi-icon-pill {
  transform: scale(1.06);
}

.kpi-sub-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.kpi-mini-progress-wrap {
  margin-top: auto;
}

.kpi-mini-progress-track {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 6px;
}

.kpi-mini-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.kpi-mini-progress-meta {
  font-size: 11px;
  font-weight: 600;
}

.kpi-me-donut-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.kpi-me-subtext {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.saas-sparkline-wrap {
  width: 100%;
  margin-top: auto;
}

.saas-sparkline-svg {
  width: 100%;
  height: 48px;
  overflow: visible;
}

.saas-sparkline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 500;
  margin-top: 4px;
}

.saas-minibars-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 58px;
  padding: 0 4px;
  gap: 8px;
  margin-top: auto;
}

.saas-minibar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
}

.saas-minibar {
  width: 100%;
  max-width: 16px;
  border-radius: 5px 5px 3px 3px;
  transition: all 0.3s ease;
}

.saas-minibar-col span {
  font-size: 9.5px;
  font-weight: 600;
}

.saas-donut-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.saas-donut-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.donut-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.saas-milestones-card {
  padding: 18px 22px;
}

.saas-dropdown-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.saas-milestone-subwrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 16px;
}

.saas-milestone-title {
  font-size: 15px;
  font-weight: 700;
}

.saas-milestone-sub {
  font-size: 12px;
  margin-top: 2px;
}

.saas-milestone-pct {
  font-size: 14px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.saas-stepper-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saas-step-track {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
}

.saas-step-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.saas-step-thumb {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.saas-step-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.saas-trend-card {
  padding: 18px 20px 14px;
}

.saas-trend-chart-inner {
  display: flex;
  gap: 12px;
  width: 100%;
}

.saas-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 10px;
  height: 140px;
  padding-bottom: 20px;
}

.saas-chart-canvas-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.saas-trend-svg {
  width: 100%;
  height: 130px;
  overflow: visible;
}

.saas-x-axis {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  padding: 6px 4px 0;
}

.saas-pending-float-card {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 250px;
  border-radius: 16px;
  padding: 14px 16px;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.saas-pending-float-card.collapsed {
  transform: translateY(calc(100% - 44px));
  opacity: 0.85;
}

.saas-pending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.saas-pending-title {
  font-size: 13px;
  font-weight: 700;
}

.saas-pending-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saas-pending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.saas-pending-text {
  flex: 1;
  min-width: 0;
}

.saas-p-title {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saas-p-sub {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saas-check-badge {
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.saas-info-badge {
  font-size: 11px;
}

.saas-expand-btn {
  position: absolute;
  bottom: -40px;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.saas-secondary-data-section {
  margin-top: 16px;
}

/* ==========================================================================
   2. SPECIFIC DARK LUXURY SAAS STYLES (Strictly body.dark-theme ONLY)
   ========================================================================== */
body.dark-theme .luxury-saas-nav {
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-theme .brand-cube-badge {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(37, 99, 235, 0.3));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
}

body.dark-theme .brand-cube-badge:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

body.dark-theme .brand-badge-pill {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

body.dark-theme .luxury-tabs {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-theme .luxury-tabs .nav-tab {
  color: #94a3b8;
}

body.dark-theme .luxury-tabs .nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

body.dark-theme .luxury-tabs .nav-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

body.dark-theme .luxury-tabs .nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 2px;
  background: #38bdf8;
  border-radius: 2px;
  box-shadow: 0 0 6px #38bdf8;
}

body.dark-theme .saas-user-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

body.dark-theme .saas-user-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
}

body.dark-theme .nav-notif-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #cbd5e1;
}

body.dark-theme .nav-notif-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

body.dark-theme .notif-badge-dot {
  box-shadow: 0 0 8px #f87171;
}

body.dark-theme .saas-card {
  background: rgba(14, 20, 35, 0.78);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.dark-theme .saas-card:hover {
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.55), 0 0 24px -6px rgba(56, 189, 248, 0.15);
}

body.dark-theme .saas-title-text,
body.dark-theme .saas-main-heading,
body.dark-theme .saas-stat-val,
body.dark-theme .saas-milestone-title,
body.dark-theme .saas-pending-title {
  color: #ffffff;
}

body.dark-theme .saas-main-subheading,
body.dark-theme .saas-stat-label,
body.dark-theme .saas-count-badge,
body.dark-theme .saas-act-time,
body.dark-theme .saas-dock-label,
body.dark-theme .saas-sparkline-labels,
body.dark-theme .saas-minibar-col span,
body.dark-theme .saas-x-axis,
body.dark-theme .saas-y-axis {
  color: #94a3b8;
}

body.dark-theme .saas-count-badge {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .saas-icon-btn {
  color: #94a3b8;
}

body.dark-theme .saas-icon-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .saas-task-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}

body.dark-theme .saas-task-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
}

body.dark-theme .saas-task-item.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dark-theme .saas-task-name {
  color: #f1f5f9;
}

body.dark-theme .saas-task-sub {
  color: #64748b;
}

body.dark-theme .saas-custom-checkbox {
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.03);
}

body.dark-theme .saas-checkbox-wrap:hover .saas-custom-checkbox {
  border-color: #38bdf8;
}

body.dark-theme .saas-checkbox-wrap input:checked ~ .saas-custom-checkbox {
  background: #3b82f6;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

body.dark-theme .saas-checkbox-wrap input:checked ~ .saas-custom-checkbox::after {
  content: '✓';
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

body.dark-theme .squircle-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

body.dark-theme .saas-activity-item:hover .squircle-icon {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

body.dark-theme .saas-act-title {
  color: #e2e8f0;
}

body.dark-theme .saas-dock-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

body.dark-theme .saas-dock-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.35);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

body.dark-theme .saas-pill-btn-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

body.dark-theme .saas-pill-btn-action:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

body.dark-theme .saas-excel-sync-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.22));
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

body.dark-theme .saas-excel-sync-btn:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(6, 182, 212, 0.35));
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35), 0 0 12px rgba(52, 211, 153, 0.25);
  transform: translateY(-1px);
}

body.dark-theme .luxury-saas-sub-banner,
body.dark-theme .luxury-dark-sub-banner {
  background: rgba(10, 15, 29, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

body.dark-theme .luxury-saas-sub-banner .banner-text,
body.dark-theme .luxury-dark-sub-banner .banner-text {
  color: #94a3b8;
  font-size: 12px;
}

body.dark-theme .saas-minibar {
  background: rgba(56, 189, 248, 0.25);
}

body.dark-theme .saas-minibar.active {
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

body.dark-theme .saas-minibar-col:hover .saas-minibar {
  background: #38bdf8;
  transform: scaleY(1.06);
}

body.dark-theme .donut-label {
  color: #ffffff;
}

body.dark-theme .saas-dropdown-pill {
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-theme .saas-dropdown-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

body.dark-theme .saas-milestone-sub {
  color: #64748b;
}

body.dark-theme .saas-milestone-pct {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

body.dark-theme .saas-step-track {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .saas-step-fill {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

body.dark-theme .saas-step-thumb {
  border: 3px solid #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
}

body.dark-theme .saas-step-labels {
  color: #64748b;
}

body.dark-theme .saas-step-labels span.active {
  color: #94a3b8;
}

body.dark-theme .saas-pending-float-card {
  background: rgba(18, 24, 40, 0.88);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(56, 189, 248, 0.15);
}

body.dark-theme .saas-pending-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-theme .saas-pending-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(56, 189, 248, 0.2);
}

body.dark-theme .saas-p-title {
  color: #f1f5f9;
}

body.dark-theme .saas-p-sub {
  color: #64748b;
}

body.dark-theme .saas-check-badge {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
}

body.dark-theme .saas-info-badge {
  color: #94a3b8;
}

body.dark-theme .saas-expand-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

body.dark-theme .saas-expand-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: #38bdf8;
}

body.dark-theme .apple-card,
body.dark-theme .metric-card,
body.dark-theme .budget-spotlight-card,
body.dark-theme .gdrive-hero-card {
  background: rgba(14, 20, 35, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px);
}

body.dark-theme .apple-table th {
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-theme .apple-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

body.dark-theme .apple-table tr:hover td {
  background: rgba(56, 189, 248, 0.06);
}

body.dark-theme .filter-glass-bar {
  background: rgba(14, 20, 35, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
}

body.dark-theme .apple-select,
body.dark-theme .form-select {
  color-scheme: dark;
  background-color: rgba(15, 23, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
}

body.dark-theme .apple-select:hover,
body.dark-theme .form-select:hover {
  background-color: rgba(21, 29, 50, 0.95);
  border-color: rgba(56, 189, 248, 0.4);
}

body.dark-theme .apple-select:focus,
body.dark-theme .form-select:focus {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.2);
}

body.dark-theme .apple-select option,
body.dark-theme .apple-select optgroup,
body.dark-theme .form-select option,
body.dark-theme .form-select optgroup {
  background-color: #0f1526;
  color: #f8fafc;
}

body.dark-theme .project-card {
  background: rgba(14, 20, 35, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
}

body.dark-theme .project-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.15);
}

body.dark-theme .apple-modal-card {
  background: rgba(14, 20, 36, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.15);
  backdrop-filter: blur(32px);
}

/* ==========================================================================
   3. LUXURY SAAS LIGHT MODE STYLES (body.light-theme)
   ========================================================================== */
body.light-theme .luxury-saas-nav {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

body.light-theme .luxury-saas-sub-banner,
body.light-theme .luxury-dark-sub-banner {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

body.light-theme .luxury-saas-sub-banner .banner-text,
body.light-theme .luxury-dark-sub-banner .banner-text {
  color: #475569;
  font-size: 12px;
}

body.light-theme .brand-cube-badge {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.12), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(0, 113, 227, 0.25);
  box-shadow: 0 2px 10px rgba(0, 113, 227, 0.1);
}

body.light-theme .brand-badge-pill {
  background: rgba(0, 113, 227, 0.1);
  color: #0071e3;
  border: 1px solid rgba(0, 113, 227, 0.25);
}

body.light-theme .saas-excel-sync-btn {
  background: linear-gradient(135deg, #10b981, #0284c7);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}

body.light-theme .saas-excel-sync-btn:hover {
  background: linear-gradient(135deg, #059669, #0369a1);
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35), 0 0 12px rgba(14, 165, 233, 0.25);
  transform: translateY(-1px);
}

body.light-theme .luxury-tabs {
  background: #e8e8ed;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-theme .luxury-tabs .nav-tab {
  color: #6e6e73;
}

body.light-theme .luxury-tabs .nav-tab:hover {
  color: #1d1d1f;
}

body.light-theme .luxury-tabs .nav-tab.active {
  background: #ffffff;
  color: #1d1d1f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.light-theme .luxury-tabs .nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 2px;
  background: #0071e3;
  border-radius: 2px;
}

body.light-theme .saas-user-pill {
  background: #f0f0f2;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
}

body.light-theme .saas-user-pill:hover {
  background: #e2e8f0;
  border-color: rgba(0, 113, 227, 0.35);
}

body.light-theme .nav-notif-btn {
  background: #f0f0f2;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #6e6e73;
}

body.light-theme .nav-notif-btn:hover {
  background: #e2e8f0;
  color: #0071e3;
}

body.light-theme .saas-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.light-theme .saas-card:hover {
  border-color: rgba(0, 113, 227, 0.25);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

body.light-theme .saas-title-text,
body.light-theme .saas-main-heading,
body.light-theme .saas-stat-val,
body.light-theme .saas-milestone-title,
body.light-theme .saas-pending-title,
body.light-theme .saas-p-title,
body.light-theme .donut-label {
  color: #1d1d1f;
}

body.light-theme .saas-main-subheading,
body.light-theme .saas-stat-label,
body.light-theme .saas-count-badge,
body.light-theme .saas-act-time,
body.light-theme .saas-dock-label,
body.light-theme .saas-sparkline-labels,
body.light-theme .saas-minibar-col span,
body.light-theme .saas-x-axis,
body.light-theme .saas-y-axis,
body.light-theme .saas-milestone-sub,
body.light-theme .saas-p-sub {
  color: #6e6e73;
}

body.light-theme .saas-count-badge {
  background: #f0f0f2;
}

body.light-theme .saas-icon-btn {
  color: #6e6e73;
}

body.light-theme .saas-icon-btn:hover {
  color: #1d1d1f;
  background: #f0f0f2;
}

body.light-theme .saas-task-item {
  background: #f5f5f7;
  border: 1px solid transparent;
}

body.light-theme .saas-task-item:hover {
  background: #e8e8ed;
}

body.light-theme .saas-task-item.active {
  background: rgba(0, 113, 227, 0.08);
  border-color: rgba(0, 113, 227, 0.3);
}

body.light-theme .saas-task-name {
  color: #1d1d1f;
}

body.light-theme .saas-task-sub {
  color: #86868b;
}

body.light-theme .saas-custom-checkbox {
  border: 1.5px solid rgba(0, 0, 0, 0.25);
  background: #ffffff;
}

body.light-theme .saas-checkbox-wrap:hover .saas-custom-checkbox {
  border-color: #0071e3;
}

body.light-theme .saas-checkbox-wrap input:checked ~ .saas-custom-checkbox {
  background: #0071e3;
  border-color: #0071e3;
}

body.light-theme .saas-checkbox-wrap input:checked ~ .saas-custom-checkbox::after {
  content: '✓';
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

body.light-theme .squircle-icon {
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
}

body.light-theme .saas-act-title {
  color: #1d1d1f;
}

body.light-theme .saas-dock-btn {
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
}

body.light-theme .saas-dock-btn:hover {
  background: rgba(0, 113, 227, 0.08);
  border-color: rgba(0, 113, 227, 0.3);
  color: #0071e3;
}

body.light-theme .saas-pill-btn-action {
  background: #0071e3;
  color: #ffffff;
  border: none;
}

body.light-theme .saas-pill-btn-action:hover {
  background: #0077ed;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
}

body.light-theme .saas-btn-luxury-sync {
  background: linear-gradient(135deg, #059669, #0284c7);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

body.light-theme .saas-btn-luxury-sync:hover {
  background: linear-gradient(135deg, #10b981, #0ea5e9);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4), 0 0 14px rgba(14, 165, 233, 0.3);
  transform: translateY(-1px) scale(1.02);
}

body.light-theme .saas-btn-luxury-outline {
  background: #ffffff;
  color: #334155;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.light-theme .saas-btn-luxury-outline:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: rgba(0, 113, 227, 0.4);
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.15);
  transform: translateY(-1px);
}

body.light-theme .saas-file-badge-btn {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #047857;
}

body.light-theme .saas-file-badge-btn:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: #10b981;
  color: #065f46;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
  transform: translateY(-1px);
}

body.light-theme .badge-action-pill {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

body.light-theme .saas-sparkline-svg path:last-of-type {
  stroke: #0071e3 !important;
}

body.light-theme #sparkline-grad stop:first-child {
  stop-color: #0071e3;
  stop-opacity: 0.35;
}

body.light-theme #sparkline-grad stop:last-child {
  stop-color: #0071e3;
  stop-opacity: 0;
}

body.light-theme .donut-bg {
  stroke: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .donut-fg {
  stroke: #0071e3 !important;
}

body.light-theme .saas-minibar {
  background: rgba(0, 113, 227, 0.18);
}

body.light-theme .saas-minibar.active {
  background: linear-gradient(180deg, #0071e3, #0284c7);
  box-shadow: 0 0 10px rgba(0, 113, 227, 0.35);
}

body.light-theme .saas-minibar-col:hover .saas-minibar {
  background: #0071e3;
  transform: scaleY(1.06);
}

body.light-theme .saas-dropdown-pill {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .saas-dropdown-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.light-theme .saas-milestone-pct {
  color: #0071e3;
  background: rgba(0, 113, 227, 0.1);
  border: 1px solid rgba(0, 113, 227, 0.2);
}

body.light-theme .saas-step-track {
  background: #e2e8f0;
}

body.light-theme .saas-step-fill {
  background: linear-gradient(90deg, #0071e3, #0284c7);
  box-shadow: 0 0 10px rgba(0, 113, 227, 0.3);
}

body.light-theme .saas-step-thumb {
  border: 3px solid #0071e3;
  box-shadow: 0 1px 6px rgba(0, 113, 227, 0.4);
}

body.light-theme .saas-step-labels {
  color: #64748b;
}

body.light-theme .saas-step-labels span.active {
  color: #0f172a;
}

body.light-theme .saas-pending-float-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

body.light-theme .saas-pending-item {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

body.light-theme .saas-pending-item:hover {
  background: #f1f5f9;
  border-color: rgba(0, 113, 227, 0.25);
}

body.light-theme .saas-check-badge {
  color: #0071e3;
  background: rgba(0, 113, 227, 0.12);
}

body.light-theme .saas-info-badge {
  color: #64748b;
}

body.light-theme .saas-expand-btn {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #475569;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

body.light-theme .saas-expand-btn:hover {
  background: #f1f5f9;
  color: #0071e3;
  border-color: #0071e3;
}

body.light-theme .apple-card,
body.light-theme .metric-card,
body.light-theme .budget-spotlight-card,
body.light-theme .gdrive-hero-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.light-theme .folder-box {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-theme .folder-box:hover {
  background: #ffffff;
  border-color: #0071e3;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.12);
}

body.light-theme .apple-table th {
  background: #f8fafc;
  color: #475569;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .apple-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-theme .apple-table tr:hover td {
  background: rgba(0, 113, 227, 0.04);
}

body.light-theme .filter-glass-bar {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(20px);
}

body.light-theme .apple-select,
body.light-theme .form-select {
  color-scheme: light;
  background-color: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.1);
  color: #0f172a;
}

body.light-theme .apple-select:hover,
body.light-theme .form-select:hover {
  background-color: #e2e8f0;
  border-color: rgba(0, 113, 227, 0.35);
}

body.light-theme .apple-select:focus,
body.light-theme .form-select:focus {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

body.light-theme .apple-select option,
body.light-theme .apple-select optgroup,
body.light-theme .form-select option,
body.light-theme .form-select optgroup {
  background-color: #ffffff;
  color: #0f172a;
}

body.light-theme .project-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

body.light-theme .project-card:hover {
  border-color: rgba(0, 113, 227, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

body.light-theme .timeline-project-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

body.light-theme .step-node-icon {
  background: #ffffff;
  border: 2px solid #0071e3;
  color: #0071e3;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.15);
}

body.light-theme .step-node.completed .step-node-icon {
  background: linear-gradient(135deg, #0071e3, #5e5ce6);
  border-color: #0071e3;
  color: #ffffff;
}

body.light-theme .step-node.success .step-node-icon {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border-color: #16a34a;
  color: #ffffff;
}

body.light-theme .step-duration-hero {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .apple-modal-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15), 0 0 30px rgba(0, 113, 227, 0.08);
  backdrop-filter: blur(32px);
}

/* ==========================================================================
   4. ENHANCED DASHBOARD REPORT COLOR SYSTEM (Dark & Light Themes)
   ========================================================================== */

/* Shared Card Top Accent Strip */
.saas-stat-card::before,
.metric-card.duration-card-blue::before,
.metric-card.duration-card-green::before,
.metric-card.duration-card-orange::before,
.metric-card.duration-card-amber::before,
.dashboard-report-card::before,
.approved-item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 18px 18px 0 0;
  opacity: 0.92;
  pointer-events: none;
}

.metric-card,
.dashboard-report-card,
.approved-item-card {
  position: relative;
  overflow: hidden;
}

/* Top Accent Colors */
.kpi-theme-blue::before,
.duration-card-blue::before,
.report-theme-blue::before {
  background: linear-gradient(90deg, #0ea5e9, #3b82f6);
}

.kpi-theme-green::before,
.duration-card-green::before,
.report-theme-emerald::before,
.approved-item-card::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.kpi-theme-amber::before,
.duration-card-amber::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.kpi-theme-purple::before {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.duration-card-orange::before {
  background: linear-gradient(90deg, #f97316, #fb923c);
}

/* ---------- DARK MODE: DASHBOARD REPORT CARDS ---------- */
body.dark-theme .kpi-theme-blue,
body.dark-theme .duration-card-blue {
  background: linear-gradient(155deg, rgba(14, 32, 62, 0.92) 0%, rgba(12, 20, 38, 0.88) 100%);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(56, 189, 248, 0.14);
}

body.dark-theme .kpi-theme-blue:hover,
body.dark-theme .duration-card-blue:hover {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 28px -6px rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

body.dark-theme .kpi-theme-green,
body.dark-theme .duration-card-green {
  background: linear-gradient(155deg, rgba(10, 38, 32, 0.92) 0%, rgba(12, 20, 36, 0.88) 100%);
  border-color: rgba(52, 211, 153, 0.32);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(52, 211, 153, 0.14);
}

body.dark-theme .kpi-theme-green:hover,
body.dark-theme .duration-card-green:hover {
  border-color: rgba(52, 211, 153, 0.62);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 28px -6px rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}

body.dark-theme .kpi-theme-amber,
body.dark-theme .duration-card-amber {
  background: linear-gradient(155deg, rgba(40, 29, 13, 0.9) 0%, rgba(13, 20, 36, 0.88) 100%);
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(251, 191, 36, 0.14);
}

body.dark-theme .kpi-theme-amber:hover,
body.dark-theme .duration-card-amber:hover {
  border-color: rgba(251, 191, 36, 0.58);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 28px -6px rgba(245, 158, 11, 0.28);
  transform: translateY(-2px);
}

body.dark-theme .kpi-theme-purple {
  background: linear-gradient(155deg, rgba(31, 19, 54, 0.92) 0%, rgba(13, 20, 36, 0.88) 100%);
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(167, 139, 250, 0.14);
}

body.dark-theme .kpi-theme-purple:hover {
  border-color: rgba(167, 139, 250, 0.6);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 28px -6px rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

body.dark-theme .duration-card-orange {
  background: linear-gradient(155deg, rgba(44, 24, 14, 0.9) 0%, rgba(14, 20, 36, 0.88) 100%);
  border-color: rgba(251, 146, 60, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(251, 146, 60, 0.14);
}

body.dark-theme .duration-card-orange:hover {
  border-color: rgba(251, 146, 60, 0.58);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 28px -6px rgba(249, 115, 22, 0.28);
  transform: translateY(-2px);
}

/* Dark Mode KPI Numbers */
body.dark-theme .kpi-val-blue {
  color: #38bdf8;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

body.dark-theme .kpi-val-green {
  color: #34d399;
  text-shadow: 0 0 20px rgba(52, 211, 153, 0.25);
}

body.dark-theme .kpi-val-amber {
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.25);
}

body.dark-theme .kpi-val-purple {
  color: #c4b5fd;
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.25);
}

body.dark-theme .kpi-val-orange {
  color: #fb923c;
  text-shadow: 0 0 20px rgba(251, 146, 60, 0.25);
}

/* Dark Mode Icon Pills & Badges */
body.dark-theme .kpi-icon-pill.icon-blue {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.18);
}

body.dark-theme .kpi-icon-pill.icon-green {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.18);
}

body.dark-theme .kpi-icon-pill.icon-amber {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.18);
}

body.dark-theme .kpi-icon-pill.icon-purple {
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.38);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.18);
}

body.dark-theme .kpi-icon-pill.icon-orange {
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(251, 146, 60, 0.35);
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.18);
}

body.dark-theme .badge-green {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.42);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

body.dark-theme .kpi-mini-progress-track {
  background: rgba(52, 211, 153, 0.14);
}

body.dark-theme .kpi-mini-progress-fill {
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.45);
}

body.dark-theme .kpi-mini-progress-meta {
  color: #6ee7b7;
}

body.dark-theme .kpi-theme-amber .saas-minibar {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.85), rgba(245, 158, 11, 0.35));
}

body.dark-theme .kpi-theme-amber .saas-minibar.active {
  background: linear-gradient(180deg, #fde047, #f59e0b);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.55);
}

body.dark-theme .kpi-theme-amber .saas-minibar-col:hover .saas-minibar {
  background: linear-gradient(180deg, #fde047, #f59e0b);
  transform: scaleY(1.06);
}

body.dark-theme .kpi-theme-purple .donut-bg {
  stroke: rgba(167, 139, 250, 0.18) !important;
}

body.dark-theme .kpi-theme-purple .donut-fg {
  stroke: #a78bfa !important;
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.5));
}

body.dark-theme .kpi-theme-purple .donut-label {
  color: #f5f3ff;
}

body.dark-theme .metric-trend.success {
  color: #34d399;
}

body.dark-theme .metric-trend.warning {
  color: #fb923c;
}

body.dark-theme .metric-trend.info {
  color: #7dd3fc;
}

/* Dark Mode Report Cards & Province Bars */
body.dark-theme .dashboard-report-card.report-theme-blue {
  background: linear-gradient(160deg, rgba(14, 24, 46, 0.9) 0%, rgba(12, 18, 34, 0.86) 100%);
  border-color: rgba(56, 189, 248, 0.22);
}

body.dark-theme .dashboard-report-card.report-theme-emerald {
  background: linear-gradient(160deg, rgba(12, 28, 34, 0.9) 0%, rgba(12, 18, 34, 0.86) 100%);
  border-color: rgba(52, 211, 153, 0.22);
}

body.dark-theme .tag-pill-blue {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

body.dark-theme .tag-pill-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

body.dark-theme .bar-track {
  background: rgba(255, 255, 255, 0.08);
  height: 10px;
}

body.dark-theme .bar-row:nth-child(1) .bar-fill {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

body.dark-theme .bar-row:nth-child(2) .bar-fill {
  background: linear-gradient(90deg, #059669, #34d399);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.35);
}

body.dark-theme .bar-row:nth-child(3) .bar-fill {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.35);
}

body.dark-theme .bar-row:nth-child(n+4) .bar-fill {
  background: linear-gradient(90deg, #d97706, #fbbf24);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

body.dark-theme .bar-row:nth-child(1) .bar-amount-label { color: #38bdf8; }
body.dark-theme .bar-row:nth-child(2) .bar-amount-label { color: #34d399; }
body.dark-theme .bar-row:nth-child(3) .bar-amount-label { color: #c4b5fd; }
body.dark-theme .bar-row:nth-child(n+4) .bar-amount-label { color: #fbbf24; }

body.dark-theme .legend-item {
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

body.dark-theme .legend-item.legend-green strong { color: #34d399; }
body.dark-theme .legend-item.legend-amber strong { color: #fbbf24; }
body.dark-theme .legend-item.legend-red strong { color: #f87171; }

body.dark-theme .quick-callout {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-left: 3px solid #38bdf8;
  color: #cbd5e1;
}

body.dark-theme .quick-callout strong {
  color: #e0f2fe;
}

body.dark-theme .approved-item-card {
  background: linear-gradient(160deg, rgba(14, 24, 44, 0.88) 0%, rgba(12, 18, 34, 0.84) 100%);
  border-color: rgba(52, 211, 153, 0.22);
}

body.dark-theme .approved-item-card:hover {
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.5), 0 0 24px -6px rgba(16, 185, 129, 0.25);
}

body.dark-theme .app-code-pill {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.28);
}

body.dark-theme .app-badge-done {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

body.dark-theme .app-budget-val {
  color: #34d399;
}

/* ---------- LIGHT MODE: DASHBOARD REPORT CARDS ---------- */
body.light-theme .kpi-theme-blue,
body.light-theme .duration-card-blue {
  background: linear-gradient(155deg, #ffffff 0%, #eff6ff 100%);
  border-color: rgba(2, 132, 199, 0.24);
  box-shadow: 0 8px 24px -4px rgba(2, 132, 199, 0.1), 0 2px 6px rgba(15, 23, 42, 0.04);
}

body.light-theme .kpi-theme-blue:hover,
body.light-theme .duration-card-blue:hover {
  border-color: rgba(2, 132, 199, 0.5);
  box-shadow: 0 12px 30px -4px rgba(2, 132, 199, 0.18);
  transform: translateY(-2px);
}

body.light-theme .kpi-theme-green,
body.light-theme .duration-card-green {
  background: linear-gradient(155deg, #ffffff 0%, #ecfdf5 100%);
  border-color: rgba(22, 163, 74, 0.26);
  box-shadow: 0 8px 24px -4px rgba(22, 163, 74, 0.1), 0 2px 6px rgba(15, 23, 42, 0.04);
}

body.light-theme .kpi-theme-green:hover,
body.light-theme .duration-card-green:hover {
  border-color: rgba(22, 163, 74, 0.52);
  box-shadow: 0 12px 30px -4px rgba(22, 163, 74, 0.18);
  transform: translateY(-2px);
}

body.light-theme .kpi-theme-amber,
body.light-theme .duration-card-amber {
  background: linear-gradient(155deg, #ffffff 0%, #fffbeb 100%);
  border-color: rgba(217, 119, 6, 0.26);
  box-shadow: 0 8px 24px -4px rgba(217, 119, 6, 0.1), 0 2px 6px rgba(15, 23, 42, 0.04);
}

body.light-theme .kpi-theme-amber:hover,
body.light-theme .duration-card-amber:hover {
  border-color: rgba(217, 119, 6, 0.52);
  box-shadow: 0 12px 30px -4px rgba(217, 119, 6, 0.18);
  transform: translateY(-2px);
}

body.light-theme .kpi-theme-purple {
  background: linear-gradient(155deg, #ffffff 0%, #f5f3ff 100%);
  border-color: rgba(124, 58, 237, 0.24);
  box-shadow: 0 8px 24px -4px rgba(124, 58, 237, 0.1), 0 2px 6px rgba(15, 23, 42, 0.04);
}

body.light-theme .kpi-theme-purple:hover {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 12px 30px -4px rgba(124, 58, 237, 0.18);
  transform: translateY(-2px);
}

body.light-theme .duration-card-orange {
  background: linear-gradient(155deg, #ffffff 0%, #fff7ed 100%);
  border-color: rgba(234, 88, 12, 0.26);
  box-shadow: 0 8px 24px -4px rgba(234, 88, 12, 0.1), 0 2px 6px rgba(15, 23, 42, 0.04);
}

body.light-theme .duration-card-orange:hover {
  border-color: rgba(234, 88, 12, 0.52);
  box-shadow: 0 12px 30px -4px rgba(234, 88, 12, 0.18);
  transform: translateY(-2px);
}

/* Light Mode KPI Numbers */
body.light-theme .kpi-val-blue {
  color: #0369a1;
}

body.light-theme .kpi-val-green {
  color: #15803d;
}

body.light-theme .kpi-val-amber {
  color: #b45309;
}

body.light-theme .kpi-val-purple {
  color: #6d28d9;
}

body.light-theme .kpi-val-orange {
  color: #c2410c;
}

/* Light Mode Icon Pills & Badges */
body.light-theme .kpi-icon-pill.icon-blue {
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(2, 132, 199, 0.25);
}

body.light-theme .kpi-icon-pill.icon-green {
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.25);
}

body.light-theme .kpi-icon-pill.icon-amber {
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

body.light-theme .kpi-icon-pill.icon-purple {
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

body.light-theme .kpi-icon-pill.icon-orange {
  background: rgba(234, 88, 12, 0.12);
  border: 1px solid rgba(234, 88, 12, 0.25);
}

body.light-theme .badge-green {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.28);
}

body.light-theme .kpi-mini-progress-track {
  background: rgba(22, 163, 74, 0.14);
}

body.light-theme .kpi-mini-progress-fill {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

body.light-theme .kpi-mini-progress-meta {
  color: #15803d;
}

body.light-theme .kpi-theme-amber .saas-minibar {
  background: linear-gradient(180deg, #f59e0b, #fcd34d);
}

body.light-theme .kpi-theme-amber .saas-minibar.active {
  background: linear-gradient(180deg, #d97706, #f59e0b);
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.35);
}

body.light-theme .kpi-theme-amber .saas-minibar-col:hover .saas-minibar {
  background: linear-gradient(180deg, #b45309, #f59e0b);
  transform: scaleY(1.06);
}

body.light-theme .kpi-theme-purple .donut-bg {
  stroke: rgba(124, 58, 237, 0.15) !important;
}

body.light-theme .kpi-theme-purple .donut-fg {
  stroke: #7c3aed !important;
}

body.light-theme .kpi-theme-purple .donut-label {
  color: #4c1d95;
}

body.light-theme .metric-trend.success {
  color: #15803d;
}

body.light-theme .metric-trend.warning {
  color: #c2410c;
}

body.light-theme .metric-trend.info {
  color: #0369a1;
}

/* Light Mode Report Cards & Province Bars */
body.light-theme .dashboard-report-card.report-theme-blue {
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(2, 132, 199, 0.2);
}

body.light-theme .dashboard-report-card.report-theme-emerald {
  background: linear-gradient(160deg, #ffffff 0%, #f7fef9 100%);
  border-color: rgba(22, 163, 74, 0.2);
}

body.light-theme .tag-pill-blue {
  background: rgba(2, 132, 199, 0.1);
  color: #0369a1;
  border-color: rgba(2, 132, 199, 0.22);
}

body.light-theme .tag-pill-emerald {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.22);
}

body.light-theme .bar-track {
  background: #e2e8f0;
  height: 10px;
}

body.light-theme .bar-row:nth-child(1) .bar-fill {
  background: linear-gradient(90deg, #0071e3, #0ea5e9);
}

body.light-theme .bar-row:nth-child(2) .bar-fill {
  background: linear-gradient(90deg, #16a34a, #10b981);
}

body.light-theme .bar-row:nth-child(3) .bar-fill {
  background: linear-gradient(90deg, #7c3aed, #8b5cf6);
}

body.light-theme .bar-row:nth-child(n+4) .bar-fill {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}

body.light-theme .bar-row:nth-child(1) .bar-amount-label { color: #0369a1; }
body.light-theme .bar-row:nth-child(2) .bar-amount-label { color: #15803d; }
body.light-theme .bar-row:nth-child(3) .bar-amount-label { color: #6d28d9; }
body.light-theme .bar-row:nth-child(n+4) .bar-amount-label { color: #b45309; }

body.light-theme .legend-item {
  padding: 7px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: #334155;
}

body.light-theme .legend-item.legend-green strong { color: #15803d; }
body.light-theme .legend-item.legend-amber strong { color: #b45309; }
body.light-theme .legend-item.legend-red strong { color: #dc2626; }

body.light-theme .quick-callout {
  background: #eff6ff;
  border: 1px solid rgba(2, 132, 199, 0.18);
  border-left: 3px solid #0071e3;
  color: #334155;
}

body.light-theme .quick-callout strong {
  color: #0f172a;
}

body.light-theme .approved-item-card {
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(22, 163, 74, 0.2);
}

body.light-theme .approved-item-card:hover {
  border-color: rgba(0, 113, 227, 0.45);
  box-shadow: 0 12px 28px rgba(0, 113, 227, 0.12);
}

body.light-theme .app-code-pill {
  background: rgba(0, 113, 227, 0.1);
  color: #0071e3;
  border: 1px solid rgba(0, 113, 227, 0.22);
}

body.light-theme .app-badge-done {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.25);
}

body.light-theme .app-budget-val {
  color: #059669;
}

/* Status Progress Bar Richer Gradients */
.seg-green {
  background: linear-gradient(90deg, #16a34a, #34d399);
}

.seg-amber {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.seg-red {
  background: linear-gradient(90deg, #dc2626, #fb7185);
}

body.dark-theme .dot-green { box-shadow: 0 0 8px rgba(52, 211, 153, 0.7); }
body.dark-theme .dot-amber { box-shadow: 0 0 8px rgba(251, 191, 36, 0.7); }
body.dark-theme .dot-red { box-shadow: 0 0 8px rgba(248, 113, 113, 0.7); }

/* ==========================================================================
   5. LUXURY PROJECTS TABLE VIEW (View 3 Default - Dark & Light Themes)
   ========================================================================== */
.projects-table-card {
  padding: 0 !important;
  overflow: hidden;
  position: relative;
}

.projects-table-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0ea5e9, #3b82f6, #10b981);
  z-index: 2;
  pointer-events: none;
}

.projects-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.projects-luxury-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.projects-luxury-table thead th {
  padding: 16px 15px 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.15px;
  white-space: nowrap;
}

.projects-luxury-table tbody td {
  padding: 14px 15px;
  vertical-align: middle;
  line-height: 1.45;
}

.projects-table-row {
  cursor: pointer;
  transition: background-color 0.16s ease;
}

.tbl-idx {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 600;
}

.tbl-code-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.tbl-proj-cell {
  min-width: 260px;
  max-width: 390px;
}

.tbl-proj-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 3px;
}

.tbl-proj-owner {
  font-size: 12px;
  line-height: 1.4;
}

.tbl-province-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
}

.tbl-sector-text {
  font-size: 12.5px;
  line-height: 1.4;
  min-width: 130px;
  max-width: 185px;
}

.projects-luxury-table .status-chip {
  white-space: nowrap;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.tbl-budget-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tbl-budget-amount {
  font-size: 13.5px;
  font-weight: 700;
}

.tbl-budget-sub {
  font-size: 10.5px;
  font-weight: 500;
  margin-top: 2px;
}

.tbl-view-btn {
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

/* ---------- DARK MODE TABLE STYLING ---------- */
body.dark-theme .projects-table-card {
  background: rgba(12, 18, 34, 0.86);
  border: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

body.dark-theme .projects-luxury-table thead th {
  background: rgba(15, 25, 48, 0.96);
  color: #cbd5e1;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

body.dark-theme .projects-luxury-table tbody td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

body.dark-theme .projects-luxury-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

body.dark-theme .projects-luxury-table tbody tr:hover td {
  background: rgba(56, 189, 248, 0.085);
}

body.dark-theme .projects-luxury-table tbody tr.row-approved td:first-child {
  box-shadow: inset 3px 0 0 #34d399;
}

body.dark-theme .tbl-idx {
  color: #64748b;
}

body.dark-theme .tbl-code-pill {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.28);
}

body.dark-theme .tbl-code-pill.approved {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
}

body.dark-theme .tbl-proj-title {
  color: #f1f5f9;
}

body.dark-theme .tbl-proj-owner {
  color: #94a3b8;
}

body.dark-theme .tbl-province-pill {
  background: rgba(255, 255, 255, 0.055);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

body.dark-theme .tbl-sector-text {
  color: #cbd5e1;
}

body.dark-theme .status-chip.success {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

body.dark-theme .status-chip.warning {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

body.dark-theme .status-chip.danger {
  background: rgba(248, 113, 113, 0.14);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.28);
}

body.dark-theme .status-chip.muted-pending {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

body.dark-theme .tbl-budget-amount {
  color: #e2e8f0;
}

body.dark-theme .tbl-budget-amount.approved {
  color: #34d399;
}

body.dark-theme .tbl-budget-sub {
  color: #64748b;
}

body.dark-theme .tbl-view-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

body.dark-theme .projects-table-row:hover .tbl-view-btn,
body.dark-theme .tbl-view-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #e0f2fe;
  border-color: rgba(56, 189, 248, 0.5);
}

body.dark-theme .view-mode-toggle {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .view-btn.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.26), rgba(37, 99, 235, 0.28));
  color: #e0f2fe;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2);
}

/* ---------- LIGHT MODE TABLE STYLING ---------- */
body.light-theme .projects-table-card {
  background: #ffffff;
  border: 1px solid rgba(2, 132, 199, 0.18);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

body.light-theme .projects-luxury-table thead th {
  background: #f1f5f9;
  color: #334155;
  border-bottom: 1px solid rgba(15, 23, 42, 0.09);
}

body.light-theme .projects-luxury-table tbody td {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

body.light-theme .projects-luxury-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

body.light-theme .projects-luxury-table tbody tr:hover td {
  background: rgba(0, 113, 227, 0.055);
}

body.light-theme .projects-luxury-table tbody tr.row-approved td:first-child {
  box-shadow: inset 3px 0 0 #16a34a;
}

body.light-theme .tbl-idx {
  color: #94a3b8;
}

body.light-theme .tbl-code-pill {
  background: rgba(0, 113, 227, 0.09);
  color: #0071e3;
  border: 1px solid rgba(0, 113, 227, 0.22);
}

body.light-theme .tbl-code-pill.approved {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.28);
}

body.light-theme .tbl-proj-title {
  color: #0f172a;
}

body.light-theme .tbl-proj-owner {
  color: #64748b;
}

body.light-theme .tbl-province-pill {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

body.light-theme .tbl-sector-text {
  color: #475569;
}

body.light-theme .status-chip.success {
  background: rgba(22, 163, 74, 0.11);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.24);
}

body.light-theme .status-chip.warning {
  background: rgba(217, 119, 6, 0.11);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.24);
}

body.light-theme .status-chip.danger {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.22);
}

body.light-theme .status-chip.muted-pending {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid rgba(15, 23, 42, 0.1);
}

body.light-theme .tbl-budget-amount {
  color: #0f172a;
}

body.light-theme .tbl-budget-amount.approved {
  color: #059669;
}

body.light-theme .tbl-budget-sub {
  color: #64748b;
}

body.light-theme .tbl-view-btn {
  background: #f8fafc;
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

body.light-theme .projects-table-row:hover .tbl-view-btn,
body.light-theme .tbl-view-btn:hover {
  background: #0071e3;
  color: #ffffff;
  border-color: #0071e3;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
}

body.light-theme .view-mode-toggle {
  background: #e2e8f0;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .view-btn.active {
  background: #ffffff;
  color: #0071e3;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

/* ==========================================================================
   6. ALTERNATING PROJECT REPORT TONES (View 4 Timeline & Field Evaluations)
   ========================================================================== */
.timeline-project-card,
.eval-card {
  position: relative;
  overflow: hidden;
}

.timeline-project-card::before,
.eval-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  border-radius: 20px 0 0 20px;
  pointer-events: none;
}

/* Left Vertical Accent Stripes per Tone */
.project-tone-0.timeline-project-card::before,
.project-tone-0.eval-card::before {
  background: linear-gradient(180deg, #38bdf8, #2563eb);
}

.project-tone-1.timeline-project-card::before,
.project-tone-1.eval-card::before {
  background: linear-gradient(180deg, #a78bfa, #7c3aed);
}

.project-tone-2.timeline-project-card::before,
.project-tone-2.eval-card::before {
  background: linear-gradient(180deg, #34d399, #059669);
}

.project-tone-3.timeline-project-card::before,
.project-tone-3.eval-card::before {
  background: linear-gradient(180deg, #fbbf24, #d97706);
}

/* ---------- DARK MODE: ALTERNATING PROJECT CARDS ---------- */
/* Tone 0: Sky Blue / Sapphire */
body.dark-theme .timeline-project-card.project-tone-0,
body.dark-theme .eval-card.project-tone-0 {
  background: linear-gradient(145deg, rgba(13, 31, 62, 0.9) 0%, rgba(11, 18, 34, 0.88) 100%);
  border-color: rgba(56, 189, 248, 0.32);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(56, 189, 248, 0.14);
}

body.dark-theme .timeline-project-card.project-tone-0:hover,
body.dark-theme .eval-card.project-tone-0:hover {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.56), 0 0 28px -6px rgba(56, 189, 248, 0.28);
}

body.dark-theme .project-tone-0 .modal-tag {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

body.dark-theme .project-tone-0 .timeline-stepper,
body.dark-theme .project-tone-0 .score-box,
body.dark-theme .project-tone-0 .env-checklist {
  background: rgba(56, 189, 248, 0.055);
  border: 1px solid rgba(56, 189, 248, 0.16);
}

/* Tone 1: Royal Violet / Indigo */
body.dark-theme .timeline-project-card.project-tone-1,
body.dark-theme .eval-card.project-tone-1 {
  background: linear-gradient(145deg, rgba(32, 19, 58, 0.9) 0%, rgba(15, 17, 36, 0.88) 100%);
  border-color: rgba(167, 139, 250, 0.32);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(167, 139, 250, 0.14);
}

body.dark-theme .timeline-project-card.project-tone-1:hover,
body.dark-theme .eval-card.project-tone-1:hover {
  border-color: rgba(167, 139, 250, 0.6);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.56), 0 0 28px -6px rgba(139, 92, 246, 0.28);
}

body.dark-theme .project-tone-1 .modal-tag {
  background: rgba(167, 139, 250, 0.16);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.36);
}

body.dark-theme .project-tone-1 .timeline-stepper,
body.dark-theme .project-tone-1 .score-box,
body.dark-theme .project-tone-1 .env-checklist {
  background: rgba(167, 139, 250, 0.055);
  border: 1px solid rgba(167, 139, 250, 0.16);
}

/* Tone 2: Emerald / Teal */
body.dark-theme .timeline-project-card.project-tone-2,
body.dark-theme .eval-card.project-tone-2 {
  background: linear-gradient(145deg, rgba(10, 38, 33, 0.9) 0%, rgba(11, 19, 32, 0.88) 100%);
  border-color: rgba(52, 211, 153, 0.32);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(52, 211, 153, 0.14);
}

body.dark-theme .timeline-project-card.project-tone-2:hover,
body.dark-theme .eval-card.project-tone-2:hover {
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.56), 0 0 28px -6px rgba(16, 185, 129, 0.28);
}

body.dark-theme .project-tone-2 .modal-tag {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

body.dark-theme .project-tone-2 .timeline-stepper,
body.dark-theme .project-tone-2 .score-box,
body.dark-theme .project-tone-2 .env-checklist {
  background: rgba(52, 211, 153, 0.05);
  border: 1px solid rgba(52, 211, 153, 0.16);
}

/* Tone 3: Warm Amber / Gold */
body.dark-theme .timeline-project-card.project-tone-3,
body.dark-theme .eval-card.project-tone-3 {
  background: linear-gradient(145deg, rgba(40, 27, 13, 0.9) 0%, rgba(14, 19, 34, 0.88) 100%);
  border-color: rgba(251, 191, 36, 0.32);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(251, 191, 36, 0.14);
}

body.dark-theme .timeline-project-card.project-tone-3:hover,
body.dark-theme .eval-card.project-tone-3:hover {
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.56), 0 0 28px -6px rgba(245, 158, 11, 0.28);
}

body.dark-theme .project-tone-3 .modal-tag {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

body.dark-theme .project-tone-3 .timeline-stepper,
body.dark-theme .project-tone-3 .score-box,
body.dark-theme .project-tone-3 .env-checklist {
  background: rgba(251, 191, 36, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.16);
}

/* Dark Mode Comparison Table Alternating Rows */
body.dark-theme .timeline-comp-row.project-tone-0 td { background: rgba(56, 189, 248, 0.035); }
body.dark-theme .timeline-comp-row.project-tone-1 td { background: rgba(167, 139, 250, 0.035); }
body.dark-theme .timeline-comp-row.project-tone-2 td { background: rgba(52, 211, 153, 0.035); }
body.dark-theme .timeline-comp-row.project-tone-3 td { background: rgba(251, 191, 36, 0.035); }

body.dark-theme .timeline-comp-row.project-tone-0 td:first-child { box-shadow: inset 3px 0 0 #38bdf8; }
body.dark-theme .timeline-comp-row.project-tone-1 td:first-child { box-shadow: inset 3px 0 0 #a78bfa; }
body.dark-theme .timeline-comp-row.project-tone-2 td:first-child { box-shadow: inset 3px 0 0 #34d399; }
body.dark-theme .timeline-comp-row.project-tone-3 td:first-child { box-shadow: inset 3px 0 0 #fbbf24; }

/* ---------- LIGHT MODE: ALTERNATING PROJECT CARDS ---------- */
/* Tone 0: Sky Blue / Sapphire */
body.light-theme .timeline-project-card.project-tone-0,
body.light-theme .eval-card.project-tone-0 {
  background: linear-gradient(150deg, #ffffff 0%, #eff6ff 100%);
  border-color: rgba(2, 132, 199, 0.26);
  box-shadow: 0 8px 26px -4px rgba(2, 132, 199, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
}

body.light-theme .timeline-project-card.project-tone-0:hover,
body.light-theme .eval-card.project-tone-0:hover {
  border-color: rgba(2, 132, 199, 0.52);
  box-shadow: 0 12px 32px -4px rgba(2, 132, 199, 0.2);
}

body.light-theme .project-tone-0 .modal-tag {
  background: rgba(2, 132, 199, 0.11);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.26);
}

body.light-theme .project-tone-0 .timeline-stepper,
body.light-theme .project-tone-0 .score-box,
body.light-theme .project-tone-0 .env-checklist {
  background: rgba(2, 132, 199, 0.045);
  border: 1px solid rgba(2, 132, 199, 0.14);
}

/* Tone 1: Royal Violet / Indigo */
body.light-theme .timeline-project-card.project-tone-1,
body.light-theme .eval-card.project-tone-1 {
  background: linear-gradient(150deg, #ffffff 0%, #f5f3ff 100%);
  border-color: rgba(124, 58, 237, 0.24);
  box-shadow: 0 8px 26px -4px rgba(124, 58, 237, 0.11), 0 2px 6px rgba(15, 23, 42, 0.04);
}

body.light-theme .timeline-project-card.project-tone-1:hover,
body.light-theme .eval-card.project-tone-1:hover {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 12px 32px -4px rgba(124, 58, 237, 0.19);
}

body.light-theme .project-tone-1 .modal-tag {
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
  border: 1px solid rgba(124, 58, 237, 0.25);
}

body.light-theme .project-tone-1 .timeline-stepper,
body.light-theme .project-tone-1 .score-box,
body.light-theme .project-tone-1 .env-checklist {
  background: rgba(124, 58, 237, 0.045);
  border: 1px solid rgba(124, 58, 237, 0.14);
}

/* Tone 2: Emerald / Teal */
body.light-theme .timeline-project-card.project-tone-2,
body.light-theme .eval-card.project-tone-2 {
  background: linear-gradient(150deg, #ffffff 0%, #ecfdf5 100%);
  border-color: rgba(22, 163, 74, 0.26);
  box-shadow: 0 8px 26px -4px rgba(22, 163, 74, 0.11), 0 2px 6px rgba(15, 23, 42, 0.04);
}

body.light-theme .timeline-project-card.project-tone-2:hover,
body.light-theme .eval-card.project-tone-2:hover {
  border-color: rgba(22, 163, 74, 0.52);
  box-shadow: 0 12px 32px -4px rgba(22, 163, 74, 0.19);
}

body.light-theme .project-tone-2 .modal-tag {
  background: rgba(22, 163, 74, 0.11);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.25);
}

body.light-theme .project-tone-2 .timeline-stepper,
body.light-theme .project-tone-2 .score-box,
body.light-theme .project-tone-2 .env-checklist {
  background: rgba(22, 163, 74, 0.045);
  border: 1px solid rgba(22, 163, 74, 0.14);
}

/* Tone 3: Warm Amber / Gold */
body.light-theme .timeline-project-card.project-tone-3,
body.light-theme .eval-card.project-tone-3 {
  background: linear-gradient(150deg, #ffffff 0%, #fffbeb 100%);
  border-color: rgba(217, 119, 6, 0.26);
  box-shadow: 0 8px 26px -4px rgba(217, 119, 6, 0.11), 0 2px 6px rgba(15, 23, 42, 0.04);
}

body.light-theme .timeline-project-card.project-tone-3:hover,
body.light-theme .eval-card.project-tone-3:hover {
  border-color: rgba(217, 119, 6, 0.52);
  box-shadow: 0 12px 32px -4px rgba(217, 119, 6, 0.19);
}

body.light-theme .project-tone-3 .modal-tag {
  background: rgba(217, 119, 6, 0.11);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

body.light-theme .project-tone-3 .timeline-stepper,
body.light-theme .project-tone-3 .score-box,
body.light-theme .project-tone-3 .env-checklist {
  background: rgba(217, 119, 6, 0.045);
  border: 1px solid rgba(217, 119, 6, 0.14);
}

/* Light Mode Comparison Table Alternating Rows */
body.light-theme .timeline-comp-row.project-tone-0 td { background: rgba(2, 132, 199, 0.035); }
body.light-theme .timeline-comp-row.project-tone-1 td { background: rgba(124, 58, 237, 0.035); }
body.light-theme .timeline-comp-row.project-tone-2 td { background: rgba(22, 163, 74, 0.035); }
body.light-theme .timeline-comp-row.project-tone-3 td { background: rgba(217, 119, 6, 0.035); }

body.light-theme .timeline-comp-row.project-tone-0 td:first-child { box-shadow: inset 3px 0 0 #0284c7; }
body.light-theme .timeline-comp-row.project-tone-1 td:first-child { box-shadow: inset 3px 0 0 #7c3aed; }
body.light-theme .timeline-comp-row.project-tone-2 td:first-child { box-shadow: inset 3px 0 0 #16a34a; }
body.light-theme .timeline-comp-row.project-tone-3 td:first-child { box-shadow: inset 3px 0 0 #d97706; }

/* ==========================================================================
   7. BUDGET TABLE ALTERNATING LIGHT-DARK ZEBRA STYLING (View 2)
   ========================================================================== */
.text-nowrap {
  white-space: nowrap !important;
}

.budget-table-wrap {
  border-radius: 14px;
  overflow-x: auto;
}

.budget-zebra-table {
  border-collapse: separate;
  border-spacing: 0;
}

.budget-zebra-table thead th {
  padding: 15px 14px;
  font-size: 12.5px;
  font-weight: 700;
}

.budget-zebra-table tbody td {
  padding: 14px;
}

.budget-zebra-row {
  cursor: pointer;
  transition: background-color 0.16s ease;
}

.budget-zebra-table .view-detail-btn {
  padding: 6px 14px;
  white-space: nowrap;
}

/* Dark Mode: Clear Alternating Light & Dark Rows */
body.dark-theme .budget-table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-theme .budget-zebra-table thead th {
  background: rgba(15, 25, 48, 0.96);
  color: #cbd5e1;
  border-bottom: 1px solid rgba(56, 189, 248, 0.22);
}

body.dark-theme .budget-zebra-table thead th.highlight-col {
  background: rgba(16, 46, 74, 0.95);
  color: #7dd3fc;
}

body.dark-theme .budget-zebra-table tbody tr:nth-child(odd) td {
  background: rgba(255, 255, 255, 0.055);
}

body.dark-theme .budget-zebra-table tbody tr:nth-child(even) td {
  background: rgba(6, 10, 22, 0.65);
}

body.dark-theme .budget-zebra-table tbody tr:nth-child(odd) td.highlight-col {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
}

body.dark-theme .budget-zebra-table tbody tr:nth-child(even) td.highlight-col {
  background: rgba(56, 189, 248, 0.06);
  color: #7dd3fc;
}

body.dark-theme .budget-zebra-table tbody tr:hover td {
  background: rgba(56, 189, 248, 0.13);
}

body.dark-theme .budget-zebra-table tbody tr:hover td.highlight-col {
  background: rgba(56, 189, 248, 0.22);
}

body.dark-theme .budget-zebra-table tfoot .table-total-row td {
  background: rgba(15, 25, 48, 0.9);
  border-top: 2px solid rgba(56, 189, 248, 0.28);
}

body.dark-theme .budget-zebra-table tfoot .table-total-row td.highlight-col {
  background: rgba(16, 48, 78, 0.92);
  color: #34d399;
}

/* Light Mode: Clear Alternating Light & Muted-Darker Rows */
body.light-theme .budget-table-wrap {
  border: 1px solid rgba(15, 23, 42, 0.09);
}

body.light-theme .budget-zebra-table thead th {
  background: #e2e8f0;
  color: #1e293b;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

body.light-theme .budget-zebra-table thead th.highlight-col {
  background: #dbeafe;
  color: #0369a1;
}

body.light-theme .budget-zebra-table tbody tr:nth-child(odd) td {
  background: #ffffff;
}

body.light-theme .budget-zebra-table tbody tr:nth-child(even) td {
  background: #edf2f7;
}

body.light-theme .budget-zebra-table tbody tr:nth-child(odd) td.highlight-col {
  background: rgba(0, 113, 227, 0.05);
  color: #0071e3;
}

body.light-theme .budget-zebra-table tbody tr:nth-child(even) td.highlight-col {
  background: rgba(0, 113, 227, 0.11);
  color: #0369a1;
}

body.light-theme .budget-zebra-table tbody tr:hover td {
  background: rgba(0, 113, 227, 0.09);
}

body.light-theme .budget-zebra-table tbody tr:hover td.highlight-col {
  background: rgba(0, 113, 227, 0.16);
}

body.light-theme .budget-zebra-table tfoot .table-total-row td {
  background: #f1f5f9;
  border-top: 2px solid rgba(0, 113, 227, 0.25);
}

body.light-theme .budget-zebra-table tfoot .table-total-row td.highlight-col {
  background: #dbeafe;
  color: #059669;
}

/* ==========================================================================
   8. APPLE-INSPIRED FLUID RESPONSIVE LAYOUT SYSTEM
      Auto-adapts seamlessly across Mobile, Tablet, Laptop, Desktop & 4K/Ultrawide
   ========================================================================== */
:root {
  --container-max: 100%;
  --page-gutter: clamp(14px, 2.2vw, 36px);
  --section-gap: clamp(18px, 2vw, 28px);
  --grid-gap: clamp(14px, 1.4vw, 22px);
  --card-pad: clamp(16px, 1.5vw, 26px);
  --text-display: clamp(1.4rem, 1.05rem + 1.25vw, 2.1rem);
  --text-heading: clamp(1.18rem, 0.96rem + 0.85vw, 1.65rem);
  --text-subhead: clamp(0.84rem, 0.8rem + 0.2vw, 0.97rem);
  --text-kpi: clamp(1.5rem, 1.22rem + 1vw, 2.1rem);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  overflow-x: clip;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- Full-Bleed Frosted Apple Sticky Header ---------- */
.apple-nav,
.luxury-saas-nav {
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  transition: background var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.apple-nav.is-scrolled {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
}

body.light-theme .apple-nav.is-scrolled {
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.nav-content {
  width: 100%;
  max-width: 100% !important;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  min-height: 66px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 1.4vw, 20px);
}

.nav-brand {
  flex-shrink: 0;
}

.nav-tabs,
.luxury-tabs {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.nav-tabs::-webkit-scrollbar,
.luxury-tabs::-webkit-scrollbar {
  display: none;
}

.nav-actions {
  flex-shrink: 0;
  gap: clamp(8px, 1vw, 12px);
}

/* ---------- Full-Bleed Adaptive Sub-Banner ---------- */
.sub-banner-inner {
  width: 100%;
  max-width: 100% !important;
  margin: 0 auto;
  padding: 9px var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.banner-left {
  min-width: 0;
  flex: 1 1 320px;
}

.banner-left .banner-text {
  line-height: 1.45;
}

.banner-right {
  flex-shrink: 0;
}

/* ---------- Fluid Main Container ---------- */
.main-container {
  width: 100%;
  max-width: 100% !important;
  margin: 0 auto;
  padding: clamp(18px, 2vw, 32px) var(--page-gutter) clamp(48px, 5vw, 80px);
}

/* ---------- Fluid Typography & Section Headers ---------- */
.panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: clamp(20px, 2.2vw, 32px);
}

.panel-title-area {
  flex: 1 1 360px;
  min-width: 0;
}

.panel-heading {
  font-size: var(--text-display);
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.panel-subheading {
  font-size: var(--text-subhead);
  max-width: min(820px, 100%);
  line-height: 1.55;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.saas-overview-header {
  flex-wrap: wrap;
  gap: 12px 20px;
}

.saas-main-heading {
  font-size: var(--text-heading);
  line-height: 1.25;
}

.saas-main-subheading {
  font-size: clamp(0.78rem, 0.74rem + 0.15vw, 0.88rem);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}

/* ---------- Fluid Grids & Cards (All Views) ---------- */
.saas-metrics-row {
  gap: var(--grid-gap);
}

.saas-card,
.saas-stat-card {
  padding: var(--card-pad);
}

.saas-stat-val {
  font-size: var(--text-kpi);
  font-variant-numeric: tabular-nums;
}

.metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: var(--grid-gap);
}

.metric-number {
  font-variant-numeric: tabular-nums;
}

.content-grid-2 {
  gap: var(--grid-gap);
}

.approved-cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: var(--grid-gap);
}

.projects-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: var(--grid-gap);
}

.evaluations-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: var(--grid-gap);
}

.gdrive-folders-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--grid-gap);
}

/* ---------- Budget Spotlight Responsive Scaling ---------- */
.budget-spotlight-card {
  padding: clamp(20px, 2.4vw, 36px);
  gap: clamp(18px, 2.2vw, 32px);
}

.spotlight-amount {
  font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.85rem);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.spotlight-amount .currency {
  font-size: clamp(0.95rem, 0.85rem + 0.45vw, 1.25rem);
}

/* ---------- Filter Bar Responsive Layout (View 3) ---------- */
.filter-glass-bar {
  padding: clamp(12px, 1.4vw, 18px);
  gap: 12px;
}

.search-input-wrap {
  flex: 1 1 320px;
  min-width: min(100%, 240px);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.list-meta-bar {
  flex-wrap: wrap;
  gap: 10px 16px;
}

/* ---------- Tables: Spacious on Wide Screens, Touch-Smooth on Small Screens ---------- */
.table-responsive,
.projects-table-scroll,
.budget-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.projects-luxury-table thead th,
.budget-zebra-table thead th {
  padding: clamp(12px, 1.2vw, 17px) clamp(12px, 1.2vw, 18px);
  font-size: clamp(11.5px, 0.72rem + 0.1vw, 13px);
}

.projects-luxury-table tbody td,
.budget-zebra-table tbody td {
  padding: clamp(12px, 1.1vw, 16px) clamp(12px, 1.2vw, 18px);
}

.tbl-proj-cell {
  min-width: 240px;
  max-width: none;
}

.tbl-proj-title {
  font-size: clamp(13px, 0.78rem + 0.12vw, 14.5px);
}

.tbl-proj-owner {
  font-size: clamp(11.5px, 0.7rem + 0.08vw, 12.8px);
}

.tbl-sector-text {
  min-width: 130px;
  max-width: none;
}

.tbl-budget-amount {
  font-size: clamp(13px, 0.78rem + 0.12vw, 14.5px);
}

/* ---------- Evaluations Subnav & GDrive Safe Wrapping ---------- */
.subnav-segmented {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
}

.subnav-segmented::-webkit-scrollbar {
  display: none;
}

.subnav-tab {
  white-space: nowrap;
  flex-shrink: 0;
}

.gdrive-hero-card {
  padding: clamp(18px, 2.2vw, 34px);
}

.gdrive-path,
.gdrive-path code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sync-status-tags {
  flex-wrap: wrap;
}

/* ---------- Responsive Modal (Desktop Centered -> Mobile Apple Sheet) ---------- */
.apple-modal-overlay {
  padding: clamp(12px, 2vw, 24px);
}

.apple-modal-card {
  width: min(94vw, 880px);
  max-width: 100%;
  max-height: 90dvh;
}

/* ==========================================================================
   BREAKPOINT 1: Ultrawide & 4K Displays (>= 1600px)
   Give spacious editorial breathing room like apple.com
   ========================================================================== */
@media (min-width: 1600px) {
  .nav-content {
    min-height: 70px;
  }

  .nav-tab {
    font-size: 13.5px;
    padding: 8px 18px;
  }

  .timeline-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .approved-cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ==========================================================================
   BREAKPOINT 2: Compact Desktop & Landscape Tablet (<= 1180px)
   Clean 2-row Apple glass navigation so tabs never clip or wrap awkwardly
   ========================================================================== */
@media (max-width: 1180px) {
  .nav-content {
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    row-gap: 10px;
  }

  .nav-brand {
    order: 1;
  }

  .nav-actions {
    order: 2;
  }

  .nav-tabs,
  .luxury-tabs {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    justify-content: flex-start;
    padding: 4px;
    scroll-snap-type: x proximity;
  }

  .nav-tab {
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  .content-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   BREAKPOINT 3: Tablet Portrait (<= 900px)
   ========================================================================== */
@media (max-width: 900px) {
  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-actions {
    width: 100%;
  }

  .filter-glass-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrap {
    flex: 1 1 auto;
    width: 100%;
  }

  .filter-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .filter-group .apple-select,
  .filter-group button {
    width: 100%;
  }

  .budget-spotlight-card {
    grid-template-columns: 1fr;
  }

  .spotlight-stats {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border-subtle);
    padding-top: 18px;
  }

  .gdrive-status-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .gdrive-actions,
  .gdrive-actions .apple-btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   BREAKPOINT 4: Mobile Phones (<= 640px)
   Apple iOS-inspired compact header, touch-friendly controls & bottom sheet modal
   ========================================================================== */
@media (max-width: 640px) {
  .nav-content {
    padding: 8px 14px;
    row-gap: 8px;
  }

  .brand-logo-img {
    width: 32px;
    height: 32px;
  }

  .brand-title {
    font-size: 14.5px;
  }

  .brand-badge-pill {
    font-size: 10px;
    padding: 2px 7px;
  }

  /* Compact sync button on mobile: keep icon + concise look */
  #saas-header-reload-btn {
    padding: 7px 11px;
    font-size: 12px;
  }

  #saas-header-reload-btn span:not(.sync-spin-icon) {
    display: none;
  }

  .nav-tab {
    font-size: 12.5px;
    padding: 8px 13px;
    min-height: 36px;
  }

  .sub-banner-inner {
    padding: 8px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .banner-left {
    flex: none;
    width: 100%;
  }

  .banner-right,
  .saas-file-badge-btn {
    width: 100%;
    justify-content: space-between;
  }

  .saas-file-badge-btn > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .saas-overview-header-actions,
  .saas-btn-luxury-sync {
    width: 100%;
    justify-content: center;
  }

  .panel-actions {
    flex-direction: column;
  }

  .panel-actions button {
    width: 100%;
    justify-content: center;
  }

  .filter-group {
    grid-template-columns: 1fr;
  }

  .list-meta-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .view-mode-toggle {
    width: 100%;
  }

  .view-mode-toggle .view-btn {
    flex: 1;
    justify-content: center;
    padding: 7px 12px;
  }

  .s-stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .tpc-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-header-clean {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Apple iOS Bottom Sheet Modal on Mobile */
  .apple-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .apple-modal-card {
    width: 100%;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 12px);
  }

  .toast-container {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  .toast {
    width: 100%;
  }
}


