/* ROS & Franchise Platform - Design System Styling (Premium Dark Mode & Glassmorphism) */

:root {
  --bg-app: #0b0f19;
  --bg-sidebar: #0f172a;
  --bg-surface: rgba(30, 41, 59, 0.45);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  
  /* Accent Colors */
  --accent-blue: #3b82f6;
  --accent-blue-glow: rgba(59, 130, 246, 0.3);
  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.3);
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.3);
  --accent-crimson: #ef4444;
  --accent-crimson-glow: rgba(239, 68, 68, 0.3);

  --font-primary: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Outfit', sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
}

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

/* Login Screen UI styling */
.login-overlay-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.login-box {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo i {
  font-size: 3rem;
  color: var(--accent-blue);
  text-shadow: 0 0 20px var(--accent-blue-glow);
  margin-bottom: 12px;
}

.login-logo h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.login-logo span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-logout:hover {
  color: var(--accent-crimson) !important;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Simulation Wizard Bar */
.simulation-wizard-bar {
  background: rgba(30, 41, 59, 0.7);
  border-bottom: 2px solid var(--accent-blue);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.wizard-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wizard-tag {
  color: var(--accent-blue);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.wizard-header h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
}

.wizard-steps-indicator {
  display: flex;
  gap: 16px;
  align-items: center;
}

.w-step {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  transition: var(--transition-smooth);
}

.w-step.active {
  opacity: 1;
}

.w-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--bg-app);
  border: 2.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.w-step.active .w-num {
  border-color: var(--accent-blue);
  background-color: var(--accent-blue);
  color: #fff;
  box-shadow: 0 0 8px var(--accent-blue-glow);
}

.w-label {
  font-size: 0.75rem;
  font-weight: 600;
}

.wizard-control-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: rgba(15, 23, 42, 0.4);
  padding: 8px 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  max-width: 480px;
}

.wizard-instruction {
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.3;
}


/* Sidebar Styling */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 16px;
  flex-shrink: 0;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 24px 12px;
  border-bottom: 1px solid var(--border-color);
}

.logo-icon {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.logo-text h1 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.nav-item i {
  font-size: 1.1rem;
  width: 24px;
}

.nav-item:hover, .nav-item.active {
  color: #fff;
  background-color: var(--bg-surface);
}

.nav-item.active {
  border-left: 3px solid var(--accent-blue);
}

.badge {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  background-color: var(--accent-crimson);
  color: #fff;
}

/* Connection Widget */
.connection-status-widget {
  background-color: rgba(30, 41, 59, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.status-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-indicator-dot.online {
  background-color: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

.status-indicator-dot.offline {
  background-color: var(--accent-crimson);
  box-shadow: 0 0 10px var(--accent-crimson);
}

.status-details {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.status-label {
  font-size: 0.8rem;
  font-weight: 600;
}

.status-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.btn-toggle-offline {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.btn-toggle-offline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* User Profile */
.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-blue);
}

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

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Top Control Bar */
.top-bar {
  height: 80px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.header-title h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.header-title .subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.context-switchers {
  display: flex;
  gap: 16px;
}

.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.select-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.context-select {
  background-color: var(--bg-app);
  color: #fff;
  border: 1px solid var(--border-color);
  padding: 10px 16px 10px 36px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  min-width: 180px;
}

.context-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Viewport for Panels */
.panel-viewport {
  flex-grow: 1;
  padding: 32px;
  overflow-y: auto;
  position: relative;
}

.panel-section {
  display: none;
  flex-direction: column;
  gap: 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.panel-section.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* Premium Buttons */
.btn {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-block {
  display: flex;
  width: 100%;
  justify-content: center;
}

.btn-primary-glow {
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-blue-glow);
}

.btn-primary-glow:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary-glow {
  background-color: var(--bg-surface);
  color: #fff;
  border: 1px solid var(--border-color);
}

.btn-secondary-glow:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.btn-danger-glow {
  background-color: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger-glow:hover {
  background-color: rgba(239, 68, 68, 0.3);
}

/* 1. DASHBOARD STYLING */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.telemetry-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  backdrop-filter: blur(10px);
}

.card-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.card-icon.blue { background-color: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.card-icon.green { background-color: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.card-icon.amber { background-color: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.card-icon.crimson { background-color: rgba(239, 68, 68, 0.15); color: var(--accent-crimson); }

.card-data {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.card-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.card-trend {
  font-size: 0.7rem;
  font-weight: 600;
}

.card-trend.up { color: var(--accent-green); }
.card-trend.optimal { color: var(--accent-blue); }
.card-trend.warning { color: var(--accent-amber); }

.dashboard-body-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.dashboard-chart-card, .dashboard-alert-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
}

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

.card-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill {
  background-color: var(--accent-blue-glow);
  color: var(--accent-blue);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
}

/* Premium Table */
.premium-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.premium-table th {
  padding: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.premium-table td {
  padding: 16px 12px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.status-pill {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-pill.success { background-color: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.status-pill.warning { background-color: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.status-pill.danger { background-color: rgba(239, 68, 68, 0.15); color: var(--accent-crimson); }

/* Alert Section */
.alert-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 350px;
  overflow-y: auto;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.alert-item.danger {
  background-color: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.alert-item.danger i {
  color: var(--accent-crimson);
  font-size: 1.1rem;
  margin-top: 2px;
}

.alert-item.empty-state {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
}

.alert-item.empty-state i {
  font-size: 2rem;
  margin-bottom: 12px;
}

.alert-item-title {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.alert-item-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 2. POS STYLING */
.operating-model-banner {
  background-color: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 12px 20px;
  border-radius: var(--border-radius-md);
  font-size: 0.85rem;
}

.pos-layout {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 20px;
  height: 60vh;
}

.pos-catalog-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-filters {
  display: flex;
  gap: 8px;
}

.filter-btn {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  overflow-y: auto;
  padding-right: 4px;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 180px;
  position: relative;
}

.product-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

.product-card.sold-out {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.product-img-placeholder {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.product-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.product-price {
  font-family: var(--font-display);
  color: var(--accent-blue);
  font-weight: 700;
  font-size: 0.95rem;
}

.ats-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
}

.ats-badge.in-stock { background-color: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.ats-badge.out-of-stock { background-color: rgba(239, 68, 68, 0.15); color: var(--accent-crimson); }

/* POS Cart */
.pos-cart-area {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pos-customer-selector {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background-color: rgba(255, 255, 255, 0.02);
  padding: 10px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pos-customer-selector label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.crm-select-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crm-points-badge {
  background-color: var(--accent-amber-glow);
  color: var(--accent-amber);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 12px;
}


.order-id-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: monospace;
}

.pos-table-selector {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pos-table-selector label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 8px;
}

.cart-empty i { font-size: 2.5rem; }

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item-title {
  font-size: 0.85rem;
  font-weight: 600;
}

.cart-item-price {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cart-qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.cart-summary {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.summary-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-display);
}

.cart-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}

/* 3. KDS STATION STYLING */
.kds-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 16px 24px;
  border-radius: var(--border-radius-md);
}

.kds-stations-filters {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.station-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.station-tab.active, .station-tab:hover {
  background-color: var(--bg-app);
  color: #fff;
  border: 1px solid var(--border-color);
}

.kds-legend {
  display: flex;
  gap: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.green { background-color: var(--accent-green); }
.legend-dot.amber { background-color: var(--accent-amber); }
.legend-dot.red { background-color: var(--accent-crimson); }

.kds-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  overflow-y: auto;
  max-height: 60vh;
}

.kds-empty-state {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px;
  color: var(--text-muted);
  gap: 12px;
}

.kds-empty-state i { font-size: 3rem; color: var(--accent-green); }

.kds-card {
  background-color: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 320px;
  transition: var(--transition-smooth);
}

.kds-card.sla-warning { border-color: var(--accent-amber); }
.kds-card.sla-danger { border-color: var(--accent-crimson); }

.kds-card-header {
  padding: 12px 16px;
  background-color: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kds-card-header.sla-warning { background-color: rgba(245, 158, 11, 0.08); }
.kds-card-header.sla-danger { background-color: rgba(239, 68, 68, 0.08); }

.kds-order-type {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.1);
}

.kds-timer {
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: 700;
}

.kds-card-body {
  padding: 16px;
  flex-grow: 1;
  overflow-y: auto;
}

.kds-item-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.kds-item-qty {
  font-weight: 700;
  color: var(--accent-blue);
  margin-right: 8px;
}

.kds-card-footer {
  padding: 12px;
  border-top: 1px solid var(--border-color);
}

/* 4. RECIPE & INVENTORY (HPP ENGINE) */
.inventory-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr;
  gap: 20px;
}

.inventory-card-col {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  max-height: 450px;
}

.inventory-table-wrapper {
  overflow-y: auto;
  flex-grow: 1;
}

.logger-box {
  background-color: #05070c;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  font-family: monospace;
  font-size: 0.75rem;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-item {
  line-height: 1.4;
}

.log-item.system { color: var(--accent-blue); }
.log-item.event { color: var(--accent-green); }
.log-item.alert { color: var(--accent-crimson); }
.log-time { color: var(--text-muted); margin-right: 6px; }

/* Recipe BOM Node Tree Visualizer */
.recipe-visualizer-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  margin-top: 20px;
}

.recipe-selector-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.recipe-selector-panel label {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Tree Nodes CSS visual representation */
.node-tree-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background-color: rgba(0,0,0,0.15);
  border-radius: var(--border-radius-md);
}

.tree-root {
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.tree-branches {
  display: flex;
  justify-content: center;
  gap: 40px;
  width: 100%;
}

.tree-node-leaf {
  background-color: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  text-align: center;
  min-width: 130px;
  position: relative;
}

.tree-node-leaf::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 50%;
  width: 2px;
  height: 30px;
  background-color: var(--border-color);
}

.leaf-qty {
  font-size: 0.75rem;
  color: var(--accent-green);
  font-weight: 700;
  display: block;
  margin-top: 4px;
}

/* 5. FRANCHISE B2B & SUPPLY CHAIN */
.supply-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.supply-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
}

.po-form-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.premium-input {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--border-radius-md);
  outline: none;
  font-family: var(--font-primary);
  font-size: 0.85rem;
}

.premium-input:focus {
  border-color: var(--border-focus);
}

.supply-pipeline-visual {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.supply-pipeline-visual h4 {
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.pipeline-steps {
  display: flex;
  justify-content: space-between;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  transition: var(--transition-smooth);
}

.step.active {
  opacity: 1;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-app);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.step.active .step-dot {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
  box-shadow: 0 0 10px var(--accent-blue-glow);
}

.step span {
  font-size: 0.75rem;
  font-weight: 600;
}

/* Royalty statement box styling */
.royalty-calculator-box {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.royalty-result {
  background-color: rgba(0,0,0,0.15);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.statement-summary {
  width: 100%;
}

.statement-summary h4 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--accent-blue);
}

.calc-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

/* Dialog / Modal styling */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(8px);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  width: 500px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
}

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.opname-input-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.opname-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  align-items: center;
  gap: 12px;
}

.opname-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.opname-theo-qty {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 6. INTERACTIVE VIDEO FAQ & DEMO CENTER */
.video-faq-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.faq-tab-bar {
  display: flex;
  gap: 12px;
  background-color: var(--bg-surface);
  padding: 8px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  overflow-x: auto;
}

.faq-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.faq-tab-btn.active, .faq-tab-btn:hover {
  background-color: var(--bg-app);
  color: #fff;
  border: 1px solid var(--border-color);
}

.video-demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.video-demo-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.video-demo-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-blue);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.video-thumbnail-container {
  position: relative;
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumbnail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(15, 23, 42, 0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.video-demo-card:hover .video-thumbnail-overlay {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(15, 23, 42, 0.7) 100%);
}

.video-play-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--accent-blue-glow);
  transition: var(--transition-smooth);
  animation: pulse-glow 2.5s infinite;
}

.video-demo-card:hover .video-play-btn {
  transform: scale(1.1);
  background-color: #2563eb;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.video-role-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #3b82f6;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.video-duration {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-family: monospace;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.video-info-box {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.video-title {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
}

.video-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* FAQ Accordion */
.faq-accordion-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  margin-top: 12px;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

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

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
}

.faq-question:hover {
  color: var(--accent-blue);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  margin-top: 12px;
  transition: max-height 0.5s ease-in-out;
}

.faq-icon-arrow {
  transition: var(--transition-smooth);
  font-size: 0.8rem;
}

.faq-item.open .faq-icon-arrow {
  transform: rotate(180deg);
  color: var(--accent-blue);
}

