/* 
   ERP Integrative Case Study Simulation App - Premium Dark Charcoal & Metallic Gold Theme
   Design Ethos: Ultra-modern, stylistic, dark steel navbar & sidebar with metallic gold accents.
   Uses tactile spring transitions (cubic-bezier), gradient glows, and glass card overlays.
*/

:root {
  /* ── Primary: Sleek Sky Blue (Pastel & Modern) ────────────────── */
  --primary: #4ba3e3;          /* Vibrant Sky Blue */
  --primary-dark: #358cc8;
  --primary-glow: rgba(75, 163, 227, 0.08);
  --primary-glow-heavy: rgba(75, 163, 227, 0.18);
  --accent: #5b6c7d;           /* Modern Slate Blue accent */
  --accent-glow: rgba(91, 108, 125, 0.08);

  /* ── Sidebar / Header: Elegant Lighter Greys ─────────────────── */
  --dark-grey: #e9ecef;        /* Crisp lighter grey background */
  --dark-grey-panel: #f8f9fa;  /* Clean ultra-light grey nested panel */
  --dark-grey-border: rgba(75, 163, 227, 0.15);
  --dark-grey-text: #475569;   /* Highly legible dark slate text */

  /* ── Main content: Clean Light Greys ────────────────────────── */
  --background: #f1f5f9;       /* Premium Light Slate Grey background */
  --panel-bg: #ffffff;         /* Clean white card surface */
  --panel-border: rgba(75, 163, 227, 0.08);
  --text-main: #1e293b;        /* Deep charcoal for clean reading */
  --text-muted: #64748b;
  --border: #e2e8f0;           /* Soft border grey */

  /* ── Status Colors ────────────────────────────────────────── */
  --success: #38a169;
  --success-bg: rgba(56, 161, 105, 0.15);
  --warning: #dd6b20;
  --warning-bg: rgba(221, 107, 32, 0.15);
  --danger: #e53e3e;
  --danger-bg: rgba(229, 62, 62, 0.15);

  /* ── Elevation & Motion ──────────────────────────────────── */
  --card-shadow: 0 1px 3px rgba(0,0,0,0.03), 0 4px 14px rgba(0,0,0,0.05);
  --fluid-transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark Mode  Sleek Slate Grey with Electric Sky Blue Accents */
[data-theme="dark"] {
  --background: #0f172a;       /* Dark slate grey */
  --panel-bg: #1e293b;         /* Charcoal card surface */
  --panel-border: rgba(75, 163, 227, 0.15);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  
  /* Lighter greys relative to the dark background for high-end look */
  --dark-grey: #1e293b;
  --dark-grey-panel: #334155;
  --dark-grey-text: #cbd5e1;
}

/* Base resets with modern smooth transitions */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
  letter-spacing: -0.5px;
}

body, input, button, select, textarea {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html, body {
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  background-color: var(--background);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Dynamic Stylistic Blur Blobs in Gold */
.glow-bg-blob {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}
.glow-blob-1 {
  top: -200px;
  left: -200px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}
.glow-blob-2 {
  bottom: -200px;
  right: -200px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}
[data-theme="dark"] .glow-bg-blob {
  opacity: 0.12;
}

/* Google Material Symbols Outlined Configuration */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: 300; /* Trending thin stroke weight */
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* Header - Modern Minimalistic Dark Charcoal & Metallic Gold Navbar */
header.fiori-shell {
  background: var(--dark-grey);
  border-bottom: 2px solid var(--primary); /* Glowing sky blue bottom stripe */
  color: var(--text-main);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 100;
}

.shell-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.8px;
}

.shell-logo span {
  background: linear-gradient(135deg, var(--text-main) 20%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.shell-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Fluidic Pill Buttons with Soft Spring Transitions */
.btn-secondary {
  background: var(--panel-bg);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 9999px; /* Fluid pills */
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.01);
  transition: var(--fluid-transition);
}

.btn-secondary:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--primary-glow-heavy);
}

/* Secondary Buttons inside consistently Dark Grey sections (Header & Sidebar) */
/* Secondary Buttons inside Lighter Grey sections (Header & Sidebar) */
header.fiori-shell .btn-secondary, aside.sidebar .btn-secondary {
  background: var(--dark-grey-panel);
  color: var(--text-main);
  border: 1px solid var(--border);
}

header.fiori-shell .btn-secondary:hover, aside.sidebar .btn-secondary:hover {
  background: rgba(92, 131, 116, 0.15);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 6px 16px rgba(92, 131, 116, 0.2);
}

/* Special Reset button styling in Header */
header.fiori-shell .btn-secondary.btn-reset {
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}
header.fiori-shell .btn-secondary.btn-reset:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.2);
}

/* Fluidic Button clicks compression effect */
button:active, .btn-secondary:active, .btn-fiori-primary:active {
  transform: scale(0.95) translateY(0) !important;
}

.app-container {
  display: flex;
  flex: 1;
  height: calc(100vh - 68px);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

/* Sidebar Navigation - Consistently Styled Dark Charcoal & Metallic Gold */
aside.sidebar {
  width: 320px;
  background: var(--dark-grey);
  border-right: 1px solid var(--dark-grey-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  z-index: 10;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--dark-grey-border);
}

.student-setup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.student-setup label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary); /* Gold highlight label */
  letter-spacing: 0.8px;
}

.input-id {
  width: 100%;
  background: var(--dark-grey-panel);
  border: 1px solid var(--dark-grey-border);
  padding: 12px 16px;
  border-radius: 9999px; /* Beautifully pill shaped */
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--primary); /* Gold student ID */
  text-align: center;
  outline: none;
  transition: var(--fluid-transition);
}

.input-id:focus {
  border-color: var(--primary);
  background: var(--dark-grey);
  box-shadow: 0 0 0 4px var(--primary-glow-heavy);
}

#steps-nav-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

/* Custom Sleek Scrollbar for Sidebar */
#steps-nav-container::-webkit-scrollbar {
  width: 8px;
}
#steps-nav-container::-webkit-scrollbar-track {
  background: rgba(92, 131, 116, 0.02);
}
#steps-nav-container::-webkit-scrollbar-thumb {
  background: var(--primary); /* Metallic Gold Scroller */
  border-radius: 9999px;
}
#steps-nav-container::-webkit-scrollbar-thumb:hover {
  background: #4a6b5e; /* Darker Gold on hover */
}

.module-group {
  padding: 4px;
  margin-bottom: 16px;
}

.module-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--dark-grey-text);
  padding: 6px 12px;
  letter-spacing: 1px;
  margin-bottom: 6px;
  opacity: 0.8;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 9999px; /* Fluid pills */
  cursor: pointer;
  margin-bottom: 4px;
  font-size: 0.82rem;
  color: var(--dark-grey-text);
  font-weight: 600;
  transition: var(--fluid-transition);
  position: relative;
}

.step-item:hover {
  background: rgba(92, 131, 116, 0.1);
  color: var(--primary);
  transform: translateX(4px);
}

.step-item.active {
  background: var(--primary);
  color: #ffffff !important; /* Premium white text on sky blue */
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(75, 163, 227, 0.25);
}

.step-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--dark-grey-panel);
  flex-shrink: 0;
  transition: var(--fluid-transition);
  background: transparent;
}

.step-item.completed .step-indicator {
  background-color: var(--success);
  border-color: var(--success);
}

/* Custom Checkmark display for completed steps */
.step-item.completed::after {
  content: "verified";
  font-family: "Material Symbols Outlined";
  font-size: 14px;
  position: absolute;
  right: 16px;
  color: var(--success);
}
.step-item.completed.active::after {
  color: #17181c;
}

.step-item.active .step-indicator {
  border-color: #17181c;
  background: #17181c;
  transform: scale(1.1);
}

/* Main Dashboard & Simulator Area */
main.main-content {
  flex: 1;
  display: block;
  overflow-y: auto;
  padding: 36px 36px 140px 36px; /* High bottom padding so bottom row of dashboard displays fully */
  background-color: transparent; /* Allows blur blobs to show through */
  z-index: 10;
}

main.main-content::-webkit-scrollbar {
  width: 8px;
}
main.main-content::-webkit-scrollbar-track {
  background: rgba(92, 131, 116, 0.02);
}
main.main-content::-webkit-scrollbar-thumb {
  background: var(--primary); /* Metallic Gold Scroller */
  border-radius: 9999px;
}
main.main-content::-webkit-scrollbar-thumb:hover {
  background: #4a6b5e; /* Darker Gold on hover */
}

/* Welcome Page / Dashboard CSS */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  margin-top: 24px;
}

.card {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 24px; /* Beautifully smooth squircle curves */
  padding: 32px;
  box-shadow: var(--card-shadow);
  transition: var(--fluid-transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px -15px rgba(92, 131, 116, 0.08);
}

.welcome-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-main);
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.progress-bar-container {
  width: 100%;
  height: 10px;
  background: var(--border);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary), #4a6b5e); /* Glowing gold gradient fill */
  border-radius: 9999px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.db-values {
  margin-top: 28px;
}

.db-values-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 18px;
  color: var(--text-main);
}

.db-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.db-item {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 16px 20px;
  border-radius: 16px; /* Fluid rounded corners */
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px -4px rgba(0,0,0,0.01);
  transition: var(--fluid-transition);
}

.db-item:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 8px 20px -10px rgba(92, 131, 116, 0.2);
}

.db-item-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.6px;
}

.db-item-val {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--primary);
  word-break: break-all;
}

/* Simulator Form Work Area */
.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  flex: 1;
}

.panel-instructions {
  display: flex;
  flex-direction: column;
}

.instruction-steps {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-main);
  overflow-y: auto;
  max-height: 56vh;
  padding-right: 12px;
}

.instruction-steps::-webkit-scrollbar {
  width: 8px;
}
.instruction-steps::-webkit-scrollbar-track {
  background: rgba(92, 131, 116, 0.02);
}
.instruction-steps::-webkit-scrollbar-thumb {
  background: var(--primary); /* Metallic Gold Scroller */
  border-radius: 9999px;
}
.instruction-steps::-webkit-scrollbar-thumb:hover {
  background: #4a6b5e; /* Darker Gold on hover */
}

.instruction-step {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--background);
  border: 1px solid var(--border);
  transition: var(--fluid-transition);
}

.instruction-step:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.instruction-step-num {
  font-weight: 800;
  color: #17181c;
  flex-shrink: 0;
  background: var(--primary);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* Simulated Form Panel - Clean Glassmorphism */
.fiori-app-mock {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  box-shadow: var(--card-shadow);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--fluid-transition);
}

.fiori-app-mock:hover {
  box-shadow: 0 20px 45px -15px rgba(92, 131, 116, 0.08);
}

.fiori-app-bar {
  background: var(--panel-bg);
  border-bottom: 1px solid var(--panel-border);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fiori-app-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.fiori-app-status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--background);
  color: var(--text-muted);
}

.fiori-app-body {
  padding: 28px;
  flex: 1;
  overflow-y: auto;
}

.fiori-section {
  margin-bottom: 20px;
}

.fiori-section-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
  margin-bottom: 20px;
  letter-spacing: 0.8px;
}

.fiori-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.fiori-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Hint line below each input (SAP code / free text / cross-step reference) */
.fiori-form-group .field-hint {
  font-size: 0.72rem;
  margin-top: 2px;
  line-height: 1.4;
}

.fiori-form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Outlined Inputs with Morph Focus */
.fiori-input {
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 16px; /* Squircle inputs */
  font-size: 0.92rem;
  font-weight: 600;
  outline: none;
  background: var(--panel-bg);
  color: var(--text-main);
  transition: var(--fluid-transition);
}

.fiori-input:focus {
  border-color: var(--primary);
  background: var(--panel-bg);
  box-shadow: 0 0 0 4px var(--primary-glow-heavy);
}

.fiori-input.invalid {
  border-color: var(--danger);
  background-color: var(--danger-bg);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.fiori-actions-bar {
  background: var(--panel-bg);
  border-top: 1px solid var(--panel-border);
  padding: 20px 28px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Primary Action Buttons - Solid premium sky blue */
.btn-fiori-primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  border-radius: 9999px; /* Fluid pill */
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(75, 163, 227, 0.2);
  transition: var(--fluid-transition);
}

.btn-fiori-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(75, 163, 227, 0.35);
}

/* Beautiful fluid inline Info chips */
.fiori-help-btn {
  background: var(--success-bg);
  color: var(--success);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(16, 185, 129, 0.1);
  transition: var(--fluid-transition);
}

.fiori-help-btn:hover {
  background: var(--success);
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}


/* Validation Feedback pastel banners */
.feedback-box {
  margin-top: 18px;
  padding: 14px 20px;
  border-radius: 16px;
  font-size: 0.88rem;
  font-weight: 600;
  display: none;
}

.feedback-box.success {
  display: block;
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.feedback-box.error {
  display: block;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }
  aside.sidebar {
    width: 100%;
    height: auto;
    max-height: 280px;
    border-right: none;
    border-bottom: 1px solid var(--dark-grey-border);
  }
  .simulator-layout {
    grid-template-columns: 1fr;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Keyframes animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Business Flow Modal Styling */
.flow-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.flow-modal-content {
  background: var(--panel-bg);
  width: 90%;
  max-width: 1200px;
  height: 85vh;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
}

.flow-header {
  padding: 24px 36px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary);
  color: #ffffff;
}

.flow-body {
  padding: 36px;
  overflow-y: auto;
  flex: 1;
  background: var(--background);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.pipeline-section {
  background: var(--panel-bg);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
}

.pipeline-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-main);
}

.pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  overflow-x: auto;
  padding-bottom: 20px;
}

.flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  min-width: 120px;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.flow-node.completed {
  opacity: 1;
}

.node-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--dark-grey-panel);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.flow-node.completed .node-icon {
  background: linear-gradient(135deg, var(--primary), #4a6b5e);
  border-color: #fff;
  color: #17181c;
  box-shadow: 0 0 15px rgba(92, 131, 116, 0.5);
  transform: scale(1.1);
}

.node-label {
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-main);
}

.node-output {
  background: var(--dark-grey);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-family: monospace;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.flow-connector {
  flex: 1;
  height: 4px;
  background: var(--border);
  margin: 0 10px;
  margin-top: -30px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.flow-connector.completed {
  background: linear-gradient(90deg, var(--primary), #4a6b5e);
  box-shadow: 0 0 8px rgba(92, 131, 116, 0.4);
}

/* =========================================
   Business Flow Dashboard (BFD) - Responsive
   ========================================= */

.bfd-shell {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
}

.bfd-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* Pipelines stacked vertically */
.bfd-pipelines {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.bfd-pipeline-card {
  padding: 24px 28px;
}

.bfd-pipeline-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 20px;
}

/* Scrollable pipeline row */
.bfd-pipeline-scroll {
  overflow-x: auto;
  overflow-y: visible; /* Allow active node scale effect to show without vertical clipping */
  padding-bottom: 12px;
  /* Gold scrollbar */
}
.bfd-pipeline-scroll::-webkit-scrollbar {
  height: 6px;
}
.bfd-pipeline-scroll::-webkit-scrollbar-track {
  background: var(--border);
  border-radius: 9999px;
}
.bfd-pipeline-scroll::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 9999px;
}

.bfd-pipeline-inner {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
  padding: 18px 16px 22px 16px; /* Generous vertical padding so scale(1.05) ring never clips */
  overflow: visible;
}

/* Node */
.bfd-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 110px;
  max-width: 130px;
  cursor: pointer;
  padding: 10px 8px;
  border-radius: 16px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.bfd-node:hover {
  background: var(--primary-glow);
  transform: translateY(-4px);
}

.bfd-node.bfd-node-active {
  background: rgba(75, 163, 227, 0.15);
  box-shadow: 0 0 0 2.5px var(--primary), 0 8px 28px rgba(75, 163, 227, 0.3);
  transform: translateY(-4px) scale(1.05);
  /* Use box-shadow instead of outline so it does not clip inside a scrollable container */
}

.bfd-node-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(75, 163, 227, 0.25);
  border: 2px solid rgba(255,255,255,0.6);
  transition: box-shadow 0.3s;
}

.bfd-node:hover .bfd-node-icon,
.bfd-node.bfd-node-active .bfd-node-icon {
  box-shadow: 0 6px 22px rgba(75, 163, 227, 0.45);
}

.bfd-node-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  line-height: 1.3;
}

.bfd-node-doc {
  background: var(--primary);  /* Solid sky-blue pill — always readable on any background */
  color: #ffffff;              /* Pure white text for maximum contrast */
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-family: monospace;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

/* Connector line between nodes */
.bfd-connector {
  flex-shrink: 0;
  width: 40px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #4a6b5e);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(92, 131, 116, 0.3);
  margin-bottom: 32px; /* align with icon center vertically */
}

/* Details panel - full width, prominent */
.bfd-detail-panel {
  background: var(--panel-bg);
  border-radius: 20px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  animation: slideUp 0.3s ease-out;
}

.bfd-detail-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.bfd-detail-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
}

.bfd-detail-block {
  padding: 22px 28px;
  border-right: 1px solid var(--border);
}

.bfd-detail-block:last-child {
  border-right: none;
}

.bfd-detail-dark {
  background: var(--background);
}

.bfd-detail-label {
  color: var(--text-muted);   /* Adapts to light and dark theme */
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.bfd-detail-value {
  color: var(--text-main);    /* Theme-aware: dark charcoal in light mode, light slate in dark mode */
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}

/* Responsive: stack detail blocks on small screens */
@media (max-width: 900px) {
  .bfd-detail-body {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .bfd-detail-body {
    grid-template-columns: 1fr;
  }
  .bfd-detail-block {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
}

/* Multi-Entry Form Styles */
.fiori-form-row {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: var(--fluid-transition);
}

.fiori-form-row:hover {
  box-shadow: 0 8px 24px rgba(92, 131, 116, 0.06);
  border-color: var(--primary);
}

.fiori-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.fiori-row-title {
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-remove-row {
  border-radius: 9999px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--danger);
  color: var(--danger);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--fluid-transition);
}

.btn-remove-row:hover {
  background: var(--danger-bg);
  transform: translateY(-1px);
}

