/* ==========================================================================
   ASDEC ONE – Enterprise Construction Command Platform
   Visual Language: High-End Project Control & Executive Management
   Primary Brand: ASDEC Builders Corporation (Official Red & Industrial Gold)
   ========================================================================== */

:root {
  /* ASDEC Brand Accents (Official ASDEC UI Standard) */
  --asdec-red: #C00000;
  --asdec-red-dark: #8B0000;
  --asdec-red-subtle: rgba(192, 0, 0, 0.08);

  --asdec-yellow: #FFD966;
  --asdec-yellow-bright: #FFD966;
  --asdec-yellow-dark: #D4A017;
  --asdec-yellow-subtle: rgba(255, 217, 102, 0.22);

  /* Executive Dark Charcoal & Slate Base */
  --asdec-charcoal: #1F2937;
  --asdec-navy: #1F2937;
  --asdec-midnight: #111827;
  --asdec-surface-dark: #182230;
  --asdec-sidebar: #131A24;
  --asdec-sidebar-hover: #1E293B;
  --asdec-sidebar-active: #243042;
  --asdec-sidebar-border: rgba(255, 255, 255, 0.08);

  /* Executive Workspace Canvas (ASDEC Standards: #FFFFFF / #F4F5F7) */
  --bg-canvas: #F4F5F7;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F8F9FA;
  --bg-light-gray: #F4F5F7;

  /* Dividers & Borders */
  --border-line: #E5E7EB;
  --border-subtle: #F0F2F5;
  --border-dark: #2A3646;
  --border-accent: #C00000;

  /* Executive Typography Colors */
  --text-main: #1F2937;
  --text-body: #374151;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --text-inverse: #FFFFFF;

  /* Standardized Status Colors (Approved=Green, Pending=Amber, Attention=Orange, Critical=Red, Draft=Gray, Informational=Blue) */
  --status-approved: #16A34A;
  --status-approved-bg: #F0FDF4;
  --status-approved-border: #BBF7D0;
  --status-approved-text: #166534;

  --status-pending: #D97706;
  --status-pending-bg: #FEF3C7;
  --status-pending-border: #FDE68A;
  --status-pending-text: #92400E;

  --status-attention: #EA580C;
  --status-attention-bg: #FFEDD5;
  --status-attention-border: #FED7AA;
  --status-attention-text: #9A3412;

  --status-critical: #DC2626;
  --status-critical-bg: #FEF2F2;
  --status-critical-border: #FECACA;
  --status-critical-text: #991B1B;

  --status-draft: #6B7280;
  --status-draft-bg: #F3F4F6;
  --status-draft-border: #E5E7EB;
  --status-draft-text: #374151;

  --status-info: #2563EB;
  --status-info-bg: #EFF6FF;
  --status-info-border: #BFDBFE;
  --status-info-text: #1E40AF;

  /* Legacy status token aliases for backward compatibility */
  --status-on-track: var(--status-approved);
  --status-on-track-bg: var(--status-approved-bg);
  --status-risk: var(--status-critical);
  --status-risk-bg: var(--status-critical-bg);

  /* 8px Spacing Grid System */
  --space-0-5: 4px;
  --space-1: 8px;
  --space-1-5: 12px;
  --space-2: 16px;
  --space-2-5: 20px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;

  /* Enterprise Radii (8-12px for cards & surfaces) */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-full: 9999px;

  /* Enterprise Card System: White background, Light border, Subtle shadow, 8-12px radius, 16-24px padding */
  --card-bg: #FFFFFF;
  --card-border: 1px solid var(--border-line);
  --card-radius: var(--radius-md);
  --card-padding: var(--space-2) var(--space-3);
  --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);

  /* Elevation */
  --shadow-flat: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-panel: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-dropdown: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

  /* Enterprise Typography System */
  --font-family-base: Inter, "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --transition-fast: 120ms ease;
  --transition-smooth: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Accessibility Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

body, button, input, select, textarea, optgroup, table, th, td {
  font-family: var(--font-family-base);
}

body {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-body);
  background-color: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Consistent Natural Enterprise Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--asdec-charcoal);
  line-height: 1.3;
  margin: 0;
  text-transform: none; /* Avoid excessive all-caps across headers */
}

h1, .page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2, .section-title {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h3, .card-title, .panel-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

h4 {
  font-size: 13px;
  font-weight: 600;
}

p, .body-text {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-body);
}

.text-secondary,
.secondary-text,
.panel-subtitle,
.kpi-subtext,
.asdec-card-subtitle {
  font-size: 13px;
  color: #667085;
  font-weight: 400;
}

/* Monospace restricted strictly to transaction IDs, PO numbers, WBS codes, cost codes, and system references */
.font-mono,
code,
pre,
.txn-id,
.po-number,
.wbs-code,
.cost-code,
.sys-ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow: hidden; /* Viewport-locked enterprise layout - window never scrolls */
}

/* Master Layout */
#app {
  display: flex;
  height: 100vh;
  width: 100vw;
  max-width: 100vw;
  overflow: hidden;
}

/* Thinner, Premium Sidebar */
.app-sidebar {
  width: 256px;
  height: 100vh;
  background-color: var(--asdec-sidebar);
  color: var(--text-inverse);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  z-index: 40;
  transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sidebar Collapsed State (Maximizes laptop workspace) */
#app.sidebar-collapsed .app-sidebar {
  width: 64px;
}

#app.sidebar-collapsed .sidebar-brand-panel {
  padding: 10px 4px;
}

#app.sidebar-collapsed .sidebar-brand-panel .asdec-logo-img {
  max-width: 38px;
  margin-bottom: 0;
}

#app.sidebar-collapsed .brand-platform-tag,
#app.sidebar-collapsed .nav-group-header,
#app.sidebar-collapsed .nav-item-left span:not(.nav-icon),
#app.sidebar-collapsed .nav-badge,
#app.sidebar-collapsed .sidebar-footer span {
  display: none;
}

#app.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
}

#app.sidebar-collapsed .nav-item-left {
  justify-content: center;
  gap: 0;
}

#app.sidebar-collapsed .sidebar-footer {
  justify-content: center;
  padding: 10px 0;
}

.sidebar-brand-panel {
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--asdec-midnight);
  text-align: center;
  flex-shrink: 0;
}

.asdec-logo-img {
  width: 100%;
  max-width: 185px;
  height: auto;
  display: block;
  margin: 0 auto 8px;
  background: transparent !important;
}

.brand-platform-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  font-weight: 700;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.platform-version-pill {
  color: var(--asdec-yellow);
  font-family: var(--font-family-base);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Sidebar Nav Groups */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-1) var(--space-1);
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

.nav-group-header,
.nav-group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: #94A3B8;
  padding: 12px 10px 4px;
  margin-top: 4px;
}

.nav-group-title:first-child {
  padding-top: 4px;
  margin-top: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  color: #CBD5E1;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background-color: var(--asdec-sidebar-hover);
  color: #FFFFFF;
}

.nav-item.active {
  background-color: var(--asdec-sidebar-active);
  color: #FFFFFF;
  font-weight: 600;
  border-left-color: var(--asdec-red);
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  width: 15px;
  height: 15px;
  opacity: 0.75;
  flex-shrink: 0;
}

.nav-item.active .nav-icon {
  opacity: 1;
  color: var(--asdec-yellow);
}

.nav-number-badge {
  font-family: var(--font-family-base);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--asdec-yellow);
}

.nav-badge {
  font-family: var(--font-family-base);
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 6px;
}

.nav-badge.danger {
  background: rgba(217, 32, 39, 0.2);
  color: #FCA5A5;
  border: 1px solid rgba(217, 32, 39, 0.4);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--asdec-midnight);
  font-size: 10px;
  color: #6C7D93;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot-green {
  width: 6px;
  height: 6px;
  background-color: #22C55E;
  border-radius: 50%;
}

/* Main Application Area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  background-color: var(--bg-canvas);
  overflow: hidden;
}

/* Unified High-End Executive Header */
.app-header {
  height: 52px;
  flex-shrink: 0;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-line);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-2);
  z-index: 50;
  gap: var(--space-1-5);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  flex: 1 1 auto;
}

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

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  color: var(--text-body);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.sidebar-toggle-btn:hover {
  background: #FFFFFF;
  border-color: var(--asdec-red);
  color: var(--asdec-red);
}

.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.breadcrumb-corp {
  font-weight: 800;
  color: var(--asdec-red);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.breadcrumb-slash {
  color: #CBD5E1;
  font-weight: 400;
  flex-shrink: 0;
}

.breadcrumb-current {
  color: var(--asdec-midnight);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

/* Sleek Compact Search */
.search-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  width: 140px;
  flex-shrink: 0;
  transition: all var(--transition-smooth);
}

.search-trigger:hover {
  border-color: #B0BAC9;
  background: #FFFFFF;
  color: var(--text-main);
}

.search-kbd {
  margin-left: auto;
  font-size: 9px;
  background: #E2E8F0;
  padding: 1px 4px;
  border-radius: 2px;
  font-family: monospace;
}

/* Presentation Mode Trigger Button */
.pres-mode-toggle {
  background: var(--asdec-midnight);
  color: var(--asdec-yellow);
  border: 1px solid rgba(245, 184, 0, 0.4);
  border-radius: var(--radius-sm);
  height: 28px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-smooth);
}

.pres-mode-toggle:hover {
  background: #000000;
  border-color: var(--asdec-yellow);
}

/* Presentation Mode / Demo Controls Dropdown Menu */
.pres-dropdown-wrapper {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.pres-dropdown-btn {
  background: var(--asdec-midnight);
  color: var(--asdec-yellow);
  border: 1px solid rgba(255, 217, 102, 0.35);
  border-radius: var(--radius-sm);
  height: 30px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-family-base);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.pres-dropdown-btn:hover {
  background: #000000;
  border-color: var(--asdec-yellow);
  color: #FFFFFF;
}

.pres-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 290px;
  background: #FFFFFF;
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
}

.pres-dropdown-menu.show {
  display: flex;
}

.pres-dropdown-header {
  padding: 6px 10px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.pres-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-main);
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: all var(--transition-fast);
}

.pres-menu-item:hover {
  background: #F8FAFC;
  border-color: var(--border-subtle);
}

.pres-menu-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 3px;
  font-size: 11px;
}

.pres-menu-item.setup .pres-menu-icon { color: #1E3A8A; }
.pres-menu-item.procure .pres-menu-icon { color: #0284C7; }
.pres-menu-item.labor .pres-menu-icon { color: #166534; }
.pres-menu-item.field .pres-menu-icon { color: #D97706; }
.pres-menu-item.cost .pres-menu-icon { color: #7C3AED; }
.pres-menu-item.ai .pres-menu-icon { color: #B45309; }
.pres-menu-item.arch .pres-menu-icon { color: var(--asdec-red); }

.pres-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

/* Header Compact Control Groups */
.header-control-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid var(--border-line);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  height: 30px;
  flex-shrink: 0;
  transition: border-color var(--transition-fast);
}

.header-control-group:hover {
  border-color: #CBD5E1;
}

.control-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.header-select {
  height: 24px;
  background: transparent;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  white-space: nowrap;
}

.project-select {
  max-width: 175px;
}

.role-select {
  max-width: 165px;
}

/* Header User Profile Badge */
.header-user-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 10px;
  background: #FFFFFF;
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  height: 30px;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-avatar {
  width: 22px;
  height: 22px;
  background: var(--asdec-midnight);
  color: var(--asdec-yellow);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid rgba(192, 0, 0, 0.4);
}

.btn-reset-demo {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-line);
  background: #FFFFFF;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.btn-reset-demo:hover {
  background: #F8FAFC;
  color: var(--asdec-red);
  border-color: #CBD5E1;
}

/* Responsive Layout Adaptations (100% Fit, Zero Left-Right Overflow) */
@media (max-width: 1380px) {
  .breadcrumb-current {
    max-width: 180px;
  }
  .project-select {
    max-width: 140px;
  }
  .role-select {
    max-width: 135px;
  }
}

@media (max-width: 1240px) {
  .breadcrumb-current {
    max-width: 140px;
  }
  .search-trigger {
    width: auto;
  }
  .search-kbd {
    display: none;
  }
  .control-label {
    display: none;
  }
  .project-select {
    max-width: 125px;
  }
  .role-select {
    max-width: 115px;
  }
  .header-user-tag span {
    display: none;
  }
  .pres-mode-toggle span {
    display: none;
  }
  .pres-mode-toggle {
    padding: 0 8px;
  }
}

@media (max-width: 1024px) {
  .app-sidebar {
    width: 64px;
  }
  .sidebar-brand-panel {
    padding: 10px 4px;
  }
  .sidebar-brand-panel .asdec-logo-img {
    max-width: 38px;
    margin-bottom: 0;
  }
  .brand-platform-tag,
  .nav-group-header,
  .nav-item-left span:not(.nav-icon),
  .nav-badge,
  .sidebar-footer span {
    display: none;
  }
  .nav-item {
    justify-content: center;
    padding: 10px 0;
  }
  .nav-item-left {
    justify-content: center;
    gap: 0;
  }
  .sidebar-footer {
    justify-content: center;
    padding: 10px 0;
  }
  .header-control-group {
    padding: 2px 4px;
  }
  .project-select {
    max-width: 110px;
  }
  .role-select {
    max-width: 95px;
  }
}

@media (max-width: 768px) {
  .search-trigger span {
    display: none;
  }
  .search-trigger {
    padding: 4px 6px;
  }
  .header-control-group:first-of-type {
    display: none;
  }
}

/* Content Viewport */
.view-content-wrapper {
  padding: var(--space-3);
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.view-content-wrapper::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.view-content-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.view-content-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

.view-content-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--border-line);
}

/* ==========================================================================
   Standardized Enterprise Card & Panel System
   White background, Light border, Subtle shadow, 8-12px radius, 16-24px padding
   ========================================================================== */
.executive-panel,
.asdec-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: var(--space-3);
  transition: box-shadow var(--transition-smooth);
}

.panel-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border-top-left-radius: var(--card-radius);
  border-top-right-radius: var(--card-radius);
}

.panel-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--asdec-charcoal);
  text-transform: none;
}

.panel-subtitle {
  font-size: 13px;
  color: #667085;
  margin-top: 2px;
  font-weight: 400;
}

.panel-body {
  padding: 16px 20px;
}

/* ==========================================================================
   Consistent Enterprise Buttons (13–14px, font-weight: 600, letter-spacing: 0)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

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

.btn-primary {
  background-color: var(--asdec-charcoal);
  color: #FFFFFF;
  border-color: var(--asdec-charcoal);
}
.btn-primary:hover {
  background-color: #111827;
  border-color: #111827;
  color: #FFFFFF;
}

.btn-red {
  background-color: var(--asdec-red);
  color: #FFFFFF;
  border-color: var(--asdec-red);
}
.btn-red:hover {
  background-color: var(--asdec-red-dark);
  border-color: var(--asdec-red-dark);
  color: #FFFFFF;
}

.btn-secondary {
  background-color: #FFFFFF;
  border-color: var(--border-line);
  color: var(--text-main);
}
.btn-secondary:hover {
  background-color: #F8FAFC;
  border-color: #CBD5E1;
  color: var(--text-main);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-line);
  color: var(--text-main);
}
.btn-outline:hover {
  background-color: var(--bg-subtle);
  border-color: var(--text-muted);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: var(--radius-xs);
}

.btn-xs {
  padding: 2px 7px;
  font-size: 10.5px;
  border-radius: var(--radius-xs);
}

/* Status Markers - Subtle Dots */
.status-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot.green { background-color: var(--status-approved); }
.dot.amber { background-color: var(--status-pending); }
.dot.orange { background-color: var(--status-attention); }
.dot.red { background-color: var(--status-critical); }
.dot.gray { background-color: var(--status-draft); }
.dot.info { background-color: var(--status-info); }

/* Architectural Progress Bars */
.progress-line-track {
  width: 100%;
  height: 5px;
  background-color: #E5E7EB;
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
  margin: 6px 0 4px;
}

.progress-line-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background-color: var(--asdec-charcoal);
  transition: width 0.3s ease;
}

.progress-line-fill.red { background-color: var(--asdec-red); }
.progress-line-fill.amber { background-color: var(--asdec-yellow-dark); }
.progress-line-fill.green { background-color: var(--status-approved); }

/* ==========================================================================
   Reusable Enterprise Table Style:
   - Sticky header
   - Proper spacing (10-14px)
   - Aligned currency/numbers
   - Subtle row hover
   - Compact status chips
   - Consistent action buttons
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--card-radius);
  border: 1px solid var(--border-line);
  background: #FFFFFF;
}

.asdec-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  text-align: left;
}

.asdec-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.asdec-table th {
  background-color: #F8FAFC;
  color: #475467;
  font-weight: 600;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-line);
  white-space: nowrap;
  user-select: none;
}

.asdec-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
  background: #FFFFFF;
}

.asdec-table tbody tr:last-child td {
  border-bottom: none;
}

.asdec-table tbody tr {
  transition: background-color var(--transition-fast);
}

.asdec-table tbody tr:hover td {
  background-color: #F8FAFC;
}

/* Aligned Currency and Number Columns - Clean Enterprise Inter Tabular Figures */
.asdec-table .amount,
.asdec-table .col-currency,
.asdec-table .col-number {
  font-family: var(--font-family-base);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "cv01" 1, "tnum" 1, "zero" 1;
  font-weight: 600;
  text-align: right;
  letter-spacing: -0.02em;
}

.asdec-table th.col-currency,
.asdec-table th.col-number,
.asdec-table th.amount {
  text-align: right;
}

.asdec-table .col-actions {
  text-align: right;
  white-space: nowrap;
}

/* ==========================================================================
   Financial & Industrial Metrics Typography (Deconstructed Enterprise Standard)
   ========================================================================== */
.financial-val {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-family-base);
  font-feature-settings: "cv01" 1, "tnum" 1, "zero" 1;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.028em;
  color: var(--asdec-charcoal);
  white-space: nowrap;
  vertical-align: baseline;
}

.financial-val .curr-sign {
  font-size: 0.78em;
  font-weight: 500;
  color: #64748B;
  margin-right: 2px;
  vertical-align: baseline;
  user-select: none;
  letter-spacing: 0;
}

.financial-val .num-prefix {
  font-size: 0.85em;
  font-weight: 600;
  margin-right: 1px;
}

.financial-val .num-int {
  font-weight: 700;
}

.financial-val .num-dec,
.financial-val .cents {
  font-size: 0.84em;
  font-weight: 500;
  opacity: 0.75;
}

.financial-val .curr-unit {
  font-size: 0.74em;
  font-weight: 600;
  color: #64748B;
  margin-left: 2px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.financial-val.positive {
  color: #16A34A;
}
.financial-val.positive .curr-sign,
.financial-val.positive .curr-unit {
  color: #15803D;
}

.financial-val.negative,
.financial-val.danger {
  color: var(--asdec-red);
}
.financial-val.negative .curr-sign,
.financial-val.negative .curr-unit {
  color: #DC2626;
}

/* Standardized Compact Status Chips / Badges */
.status-chip,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1px;
  white-space: nowrap;
  line-height: 1.2;
}

/* Standardized Status Colors across entire ERP:
   Approved = Green
   Pending = Amber
   Attention = Orange
   Critical = Red
   Draft = Gray
   Informational = Blue
*/
.pill-green,
.status-chip.approved {
  background-color: var(--status-approved-bg);
  color: var(--status-approved-text);
  border: 1px solid var(--status-approved-border);
}

.pill-gold,
.pill-amber,
.status-chip.pending {
  background-color: var(--status-pending-bg);
  color: var(--status-pending-text);
  border: 1px solid var(--status-pending-border);
}

.pill-orange,
.status-chip.attention {
  background-color: var(--status-attention-bg);
  color: var(--status-attention-text);
  border: 1px solid var(--status-attention-border);
}

.pill-red,
.status-chip.critical {
  background-color: var(--status-critical-bg);
  color: var(--status-critical-text);
  border: 1px solid var(--status-critical-border);
}

.pill-gray,
.pill-navy,
.status-chip.draft {
  background-color: var(--status-draft-bg);
  color: var(--status-draft-text);
  border: 1px solid var(--status-draft-border);
}

.pill-blue,
.status-chip.info {
  background-color: var(--status-info-bg);
  color: var(--status-info-text);
  border: 1px solid var(--status-info-border);
}

/* ==========================================================================
   Horizontal Workflow Stepper (Lifecycle Tracking)
   ========================================================================== */
.workflow-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  width: 100%;
  padding: 12px 0 6px;
}

.workflow-stepper::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 36px;
  right: 36px;
  height: 2px;
  background: var(--border-line);
  z-index: 1;
}

.workflow-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  padding: 0 8px;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 2px solid var(--border-line);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  transition: all var(--transition-fast);
}

.workflow-step.completed .step-circle {
  background: var(--status-approved);
  border-color: var(--status-approved);
  color: #FFFFFF;
}

.workflow-step.active .step-circle {
  background: #FFFFFF;
  border-color: var(--asdec-red);
  color: var(--asdec-red);
  box-shadow: 0 0 0 3px rgba(192, 0, 0, 0.15);
}

.workflow-step.pending .step-circle {
  background: #F8FAFC;
  border-color: var(--border-line);
  color: var(--text-light);
}

.step-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--asdec-charcoal);
  margin-bottom: 2px;
}

.step-owner {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-body);
}

.step-time {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-family-base);
  margin-top: 2px;
}

.step-status-chip {
  margin-top: 5px;
  display: inline-block;
}

/* Security Watermark for Confidential Screen */
.confidential-watermark-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  opacity: 0.05;
  user-select: none;
}

.watermark-row {
  display: flex;
  justify-content: space-around;
  white-space: nowrap;
  transform: rotate(-14deg);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #000000;
}

/* 21 Clickable Executive KPI Tiles & Alert Cards */
.clickable-kpi-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 92px;
  height: 100%;
  box-sizing: border-box;
  cursor: pointer;
  transition: all var(--transition-fast);
  overflow: hidden;
}

.clickable-kpi-card:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

.clickable-kpi-card.secondary {
  padding: 10px 12px;
  min-height: 78px;
}

.kpi-micro-lbl {
  font-size: 12px;
  font-weight: 500;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-bottom: 4px;
}

.clickable-kpi-card.secondary .kpi-micro-lbl {
  font-size: 11.5px;
  margin-bottom: 2px;
}

.kpi-micro-val {
  font-family: var(--font-family-base);
  font-feature-settings: "cv01" 1, "tnum" 1, "zero" 1;
  font-variant-numeric: tabular-nums lining-nums;
  font-size: 20px;
  font-weight: 700;
  color: var(--asdec-charcoal);
  letter-spacing: -0.028em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.clickable-kpi-card.secondary .kpi-micro-val {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.022em;
}

.kpi-micro-hint {
  font-size: 11px;
  color: #64748B;
  margin-top: 6px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.clickable-kpi-card.secondary .kpi-micro-hint {
  font-size: 10.5px;
  margin-top: 3px;
}

.kpi-micro-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  letter-spacing: normal;
  line-height: 1.2;
  vertical-align: middle;
}

.kpi-micro-badge.green {
  background: #ECFDF5;
  color: #059669;
}

.kpi-micro-badge.red {
  background: #FEF2F2;
  color: #DC2626;
}

/* Canonical Enterprise KPI Card System */
.kpi-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.kpi-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  color: #667085;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.kpi-value {
  font-family: var(--font-family-base);
  font-feature-settings: "cv01" 1, "tnum" 1, "zero" 1;
  font-variant-numeric: tabular-nums lining-nums;
  font-size: 24px;
  font-weight: 700;
  color: var(--asdec-charcoal);
  letter-spacing: -0.028em;
  line-height: 1.15;
}

.kpi-subtext {
  font-size: 13px;
  color: #667085;
  margin-top: 6px;
  font-weight: 400;
}

.alert-source-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.alert-source-card:hover {
  border-color: #CBD5E1;
  background: #FFFFFF;
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

.alert-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.alert-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--asdec-charcoal);
  margin-bottom: 4px;
  line-height: 1.3;
}

.alert-desc {
  font-size: 11.5px;
  color: var(--text-body);
  line-height: 1.45;
  margin-bottom: 10px;
}

.alert-action-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  margin-top: auto;
}

/* Accessibility: Respect Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

