/* ==========================================================================
   isolatERP - Core Design System & Premium Styling Schema
   Theme: Obsidian Dark Space Cyber (Harmonious Cyan, Indigo & Lavender Glows)
   ========================================================================== */

/* 1. Global Variables & Design Tokens */
:root {
  --font-primary: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;

  /* Premium Obsidian Color Palette */
  --bg-deep: #07090e;
  --bg-slate: #0d111d;
  --bg-glass: rgba(15, 20, 35, 0.6);
  --bg-card: rgba(25, 30, 50, 0.45);
  
  --border-light: rgba(255, 255, 255, 0.05);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-active: rgba(99, 102, 241, 0.3);

  /* Primary Gradients */
  --gradient-indigo-cyan: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-purple-pink: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --gradient-dark: linear-gradient(180deg, #090d16 0%, #05070a 100%);
  
  /* Cyber Accent Colors */
  --accent-indigo: #6366f1;
  --accent-cyan: #06b6d4;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  
  --text-white: #ffffff;
  --text-primary: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
  
  --shadow-neon-indigo: 0 0 15px rgba(99, 102, 241, 0.25);
  --shadow-neon-cyan: 0 0 15px rgba(6, 118, 212, 0.25);
  --shadow-dark: 0 12px 40px rgba(0, 0, 0, 0.5);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

/* 2. Reset & Root Setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

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

a {
  color: inherit;
  text-decoration: none;
}

input, button {
  font-family: inherit;
  outline: none;
  border: none;
}

/* 3. Immersive Glowing Ambient Backgrounds */
.glow-bg {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
  mix-blend-mode: screen;
}

.glow-1 {
  width: 450px;
  height: 450px;
  background-color: var(--accent-indigo);
  top: 15%;
  left: 10%;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background-color: var(--accent-cyan);
  bottom: 10%;
  right: 15%;
}

.glow-3 {
  width: 350px;
  height: 350px;
  background-color: var(--accent-purple);
  top: 50%;
  left: 60%;
  opacity: 0.1;
}

/* 4. Core Layout Structure */
.app-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100vh;
  width: 100vw;
  position: relative;
  z-index: 1;
  background: rgba(5, 7, 10, 0.4);
}

/* Glassmorphic Panel Base Styles */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-dark);
}

/* 5. Left Sidebar Section */
.sidebar {
  display: flex;
  flex-direction: column;
  background: rgba(10, 14, 26, 0.75);
  border-right: 1px solid var(--border-light);
  padding: 24px 20px;
  height: 100%;
  overflow-y: auto;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  background: var(--gradient-indigo-cyan);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: 20px;
  box-shadow: var(--shadow-neon-indigo);
}

.brand-icon-anim {
  animation: pulseRotate 6s linear infinite;
}

@keyframes pulseRotate {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.08) rotate(180deg); }
  100% { transform: scale(1) rotate(360deg); }
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-white);
}

.brand-text .highlight {
  background: var(--gradient-indigo-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text .version-tag {
  display: inline-block;
  font-size: 10px;
  color: var(--accent-cyan);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* User Tier & Onboarding Card */
.user-tier-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  position: relative;
  width: 44px;
  height: 44px;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.avatar .online-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  border: 2px solid var(--bg-slate);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.user-info h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-white);
}

.user-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.2px;
}

.tier-personal {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.tier-premium {
  background: rgba(168, 85, 247, 0.12);
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.3);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.1);
}

.upgrade-btn {
  width: 100%;
  background: var(--gradient-indigo-cyan);
  color: var(--text-white);
  font-size: 12px;
  font-weight: 600;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-neon-indigo);
}

.upgrade-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

/* Sidebar Menu Shortcuts */
.sidebar-menu {
  flex-grow: 1;
  margin-bottom: 24px;
}

.menu-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  padding-left: 8px;
}

.sidebar-menu ul {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 6px;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  position: relative;
}

.sidebar-menu li a i {
  font-size: 16px;
  transition: transform 0.2s ease;
}

.sidebar-menu li.active a,
.sidebar-menu li a:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-menu li.active a {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--border-active);
}

.sidebar-menu li.active a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 4px;
  background: var(--gradient-indigo-cyan);
  border-radius: 0 4px 4px 0;
}

.sidebar-menu li a:hover i {
  transform: scale(1.1);
}

.alert-count {
  margin-left: auto;
  font-size: 10px;
  background-color: var(--accent-rose);
  color: var(--text-white);
  padding: 2px 6px;
  border-radius: 20px;
  font-weight: 700;
  box-shadow: 0 0 8px var(--accent-rose);
}

/* Referral Program Box */
.referral-box {
  padding: 14px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.referral-box h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-white);
}

.referral-box p {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
}

.referral-input-group {
  display: flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-medium);
}

.referral-input-group input {
  background: rgba(0, 0, 0, 0.3);
  color: var(--accent-cyan);
  font-family: monospace;
  font-weight: 700;
  padding: 6px 10px;
  font-size: 11px;
  flex-grow: 1;
  text-align: center;
}

.referral-input-group button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white);
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.referral-input-group button:hover {
  background: rgba(99, 102, 241, 0.2);
}

.referral-stats {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-dark);
}

.referral-stats strong {
  color: var(--text-primary);
}

/* 6. Main Workspace Layout */
.main-workspace {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px;
  overflow: hidden;
  gap: 20px;
}

/* App Header styling */
.app-header {
  height: 70px;
  border-radius: var(--radius-lg);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-white);
}

.subdomain-tag {
  font-size: 11px;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.system-monitor {
  display: flex;
  align-items: center;
  gap: 24px;
  border-right: 1px solid var(--border-light);
  padding-right: 20px;
}

.monitor-gauge {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.monitor-gauge .gauge-label {
  font-size: 9px;
  color: var(--text-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gauge-bar {
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.gauge-fill {
  height: 100%;
  border-radius: 4px;
}

.pulse-green {
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
  animation: pulseGlow 1.5s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  from { opacity: 0.75; }
  to { opacity: 1; }
}

.monitor-gauge .gauge-value {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-emerald);
}

.tenant-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-purple);
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  padding: 2px 8px;
  border-radius: 6px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border-light);
}

.icon-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-cyan);
  border-color: var(--border-active);
  transform: translateY(-1px);
}

.notifications-btn {
  position: relative;
}

.notifications-btn .dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background-color: var(--accent-rose);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-rose);
}

/* 7. Grid Core Workspace */
.workspace-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  flex-grow: 1;
  gap: 20px;
  overflow: hidden;
}

/* 8. Left Column: Chat Command Center */
.chat-command-center {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.01);
}

.ai-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-status h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-white);
}

.pulse-ring {
  width: 8px;
  height: 8px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 10px var(--accent-cyan);
}

.pulse-ring::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  animation: ripple 2s infinite ease-out;
  left: 0;
  top: 0;
}

@keyframes ripple {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(3.5); opacity: 0; }
}

.nlp-sentiment {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.sentiment-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
}

.badge-neutral {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.badge-happy {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Chat Message History Feed */
.chat-feed {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  display: flex;
  gap: 12px;
  max-width: 90%;
  animation: messageFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.message.ai {
  align-self: flex-start;
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}

.message.ai .msg-avatar {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.message.user .msg-avatar {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-indigo);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.msg-body {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
}

.message.ai .msg-body {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-top-left-radius: 2px;
}

.message.user .msg-body {
  background: var(--gradient-indigo-cyan);
  color: var(--text-white);
  border-top-right-radius: 2px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.msg-body p {
  margin-bottom: 8px;
}

.msg-body p:last-child {
  margin-bottom: 0;
}

.msg-body strong {
  color: var(--text-white);
}

/* Suggestive Quick-prompts Scroller */
.quick-prompts-container {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-prompts-container .label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-prompts-scroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.quick-prompts-scroller::-webkit-scrollbar {
  height: 4px;
}

.quick-prompts-scroller::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.prompt-pill {
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prompt-pill:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-white);
  border-color: var(--border-active);
  transform: scale(1.02);
}

/* Form Input Area */
.chat-input-form {
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--border-light);
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  transition: all 0.25s;
}

.input-wrapper:focus-within {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.02);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

.voice-btn {
  background: transparent;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.voice-btn:hover {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.08);
}

.chat-input-form input {
  flex-grow: 1;
  background: transparent;
  color: var(--text-white);
  font-size: 13px;
  padding: 10px 12px;
}

.chat-input-form input::placeholder {
  color: var(--text-dark);
}

.send-btn {
  background: var(--gradient-indigo-cyan);
  color: var(--text-white);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  box-shadow: var(--shadow-neon-cyan);
}

.send-btn:hover {
  transform: scale(1.06);
  filter: brightness(1.1);
}

/* 9. Right Column: Multi-Cascade Desktop */
.cascade-workspace {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px;
  height: 100%;
}

.cascade-workspace::-webkit-scrollbar {
  height: 10px;
}

.cascade-workspace::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  border: 2px solid var(--bg-slate);
}

/* Empty State Styling */
.empty-workspace-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: auto;
  max-width: 440px;
  padding: 40px;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.empty-icon-box {
  width: 76px;
  height: 76px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-muted);
  margin-bottom: 20px;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.empty-workspace-state h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 10px;
}

.empty-workspace-state p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.demo-hints {
  display: flex;
  gap: 12px;
}

.hint-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-light);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 100px;
}

.hint-card i {
  font-size: 16px;
}

.hint-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.text-cyan { color: var(--accent-cyan); }
.text-yellow { color: var(--accent-amber); }
.text-purple { color: var(--accent-purple); }
.text-emerald { color: var(--accent-emerald); }

/* 10. Sliding Cascade Window Panels */
.cascade-card {
  width: 480px;
  height: 100%;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideInCascade 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
  transition: transform 0.25s, opacity 0.25s, width 0.3s;
}

@keyframes slideInCascade {
  from { opacity: 0; transform: translateX(50px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.cascade-card.minimized {
  width: 60px;
  overflow: hidden;
}

.cascade-card.minimized .card-body, 
.cascade-card.minimized .card-footer {
  display: none;
}

.cascade-card.minimized .card-header {
  transform: rotate(90deg) translate(0, -60px);
  transform-origin: top left;
  width: 100%;
  white-space: nowrap;
}

/* Window Header Bar */
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  font-size: 15px;
}

.card-title h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white);
}

.card-title .card-subtext {
  font-size: 10px;
  color: var(--text-dark);
  font-weight: 500;
}

.window-controls {
  display: flex;
  gap: 6px;
}

.win-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}

.win-btn:hover {
  opacity: 0.8;
}

.btn-close { background-color: var(--accent-rose); }
.btn-min { background-color: var(--accent-amber); }
.btn-expand { background-color: var(--accent-emerald); }

/* Window Content Body */
.card-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(13, 17, 29, 0.35);
}

.card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.15);
  font-size: 11px;
  color: var(--text-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 11. High Fidelity Mock Modules Inner Styles */

/* PREDICTIVE FINANCE MODULE */
.finance-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metric-pill {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  padding: 12px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-pill span {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-dark);
  font-weight: 600;
}

.metric-pill h5 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
}

.text-green { color: var(--accent-emerald) !important; }
.text-rose { color: var(--accent-rose) !important; }

/* Financial Chart using Canvas & CSS elements */
.chart-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.chart-header-panel h6 {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.chart-legend {
  display: flex;
  gap: 8px;
  font-size: 9px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.canvas-container {
  height: 120px;
  position: relative;
}

/* Custom CSS Bar Chart fallback/mock for robust rendering */
.css-chart {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 100%;
  padding-top: 10px;
}

.chart-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 14%;
  height: 100%;
  justify-content: flex-end;
}

.bar-stack {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  height: 80%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.bar-fill-actual {
  background: var(--accent-cyan);
  width: 100%;
  transition: height 0.6s ease;
}

.bar-fill-predicted {
  background: var(--accent-purple);
  width: 100%;
  opacity: 0.7;
  transition: height 0.6s ease;
}

.chart-bar-col span {
  font-size: 9px;
  color: var(--text-dark);
  font-weight: 600;
}

/* SMART INVENTORY MODULE */
.stock-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stock-item {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item-details h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
}

.item-details span {
  font-size: 10px;
  color: var(--text-muted);
}

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

.status-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-low {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-ok {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.reorder-btn {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
  font-size: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.reorder-btn:hover {
  background: var(--gradient-indigo-cyan);
  color: var(--text-white);
  border-color: transparent;
  box-shadow: var(--shadow-neon-cyan);
}

/* HOST ADMIN CONSOLE MODULE */
.admin-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-action-row {
  display: flex;
  gap: 8px;
}

.admin-card {
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: var(--radius-md);
  padding: 14px;
}

.admin-card h5 {
  font-size: 13px;
  font-weight: 600;
  color: #d8b4fe;
  margin-bottom: 6px;
}

.admin-card p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.admin-btn {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #e9d5ff;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-btn:hover {
  background: var(--gradient-purple-pink);
  color: var(--text-white);
  border-color: transparent;
}

/* 12. Interactive Form & Dynamic Onboarding UI */
.onboard-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.form-group label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group input, .form-group select {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  padding: 8px 12px;
  font-size: 12px;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--accent-cyan);
}

/* Responsive Scaling details */
@media (max-width: 1200px) {
  .app-container {
    grid-template-columns: 70px 1fr;
  }
  .sidebar-menu li span, 
  .brand-text, 
  .version-tag,
  .user-tier-card,
  .referral-box {
    display: none !important;
  }
}


/* ==========================================================================
   isolatERP Proactive Guidance UI Additions (2030 Interface Design)
   ========================================================================== */

/* A. Moving Guidance Ticker */
.guidance-ticker-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 2px;
  overflow: hidden;
  height: 42px;
}

.ticker-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border-right: 1px solid var(--border-medium);
  padding-right: 16px;
}

.ticker-wrap {
  overflow: hidden;
  flex-grow: 1;
}

.ticker-scroll {
  display: flex;
  white-space: nowrap;
  animation: tickerSlide 35s linear infinite;
  gap: 60px;
}

.ticker-item {
  font-size: 11.5px;
  color: var(--text-primary);
  display: inline-block;
}

.ticker-item strong {
  color: var(--accent-cyan);
}

@keyframes tickerSlide {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* B. Floating Input Prompt Hint Caption */
.floating-hint-caption {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.15);
  padding: 6px 14px;
  border-radius: 20px 20px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 20px;
  animation: pulseFaint 2s ease-in-out infinite alternate;
  border-bottom: none;
}

@keyframes pulseFaint {
  from { opacity: 0.8; transform: translateY(1px); }
  to { opacity: 1; transform: translateY(-1px); }
}

/* C. Proactive First-Time Onboarding Flying Modal overlay */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 10, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-card {
  width: 800px;
  max-width: 90%;
  padding: 40px;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: onboardFlyIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}

@keyframes onboardFlyIn {
  from { opacity: 0; transform: translateY(40px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.onboarding-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.onboarding-header h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.5px;
}

.onboarding-header .subtitle {
  font-size: 13px;
  color: var(--accent-cyan);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.onboarding-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.onboarding-body p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .onboarding-grid {
    grid-template-columns: 1fr;
    max-height: 300px;
    overflow-y: auto;
  }
  .onboarding-card {
    padding: 24px;
  }
}

.onboard-grid-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  padding: 20px 16px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboard-grid-card i {
  font-size: 24px;
  transition: transform 0.25s;
}

.onboard-grid-card h5 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
}

.onboard-grid-card p {
  font-size: 10.5px;
  color: var(--text-dark);
  line-height: 1.4;
  margin: 0;
}

.onboard-grid-card:hover {
  background: rgba(99, 102, 241, 0.06);
  border-color: var(--border-active);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.onboard-grid-card:hover i {
  transform: scale(1.15) rotate(5deg);
}

.onboarding-footer {
  display: flex;
  justify-content: center;
}

/* Guided Journey Stepper (Chat Sidebar Header Area) */
.guided-journey-tracker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 14px;
  gap: 4px;
  margin-bottom: 4px;
}

.journey-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.journey-step .step-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  font-size: 9px;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  transition: all 0.3s;
}

.journey-step .step-txt {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s;
}

/* Step States */
.journey-step.active {
  background: rgba(6, 182, 212, 0.06);
  border-color: rgba(6, 182, 212, 0.2);
}

.journey-step.active .step-icon {
  background: var(--accent-cyan);
  color: var(--bg-deep);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

.journey-step.active .step-txt {
  color: var(--accent-cyan);
}

.journey-step.completed {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.15);
}

.journey-step.completed .step-icon {
  background: var(--accent-emerald);
  color: var(--text-white);
  border-color: var(--accent-emerald);
}

.journey-step.completed .step-txt {
  color: var(--accent-emerald);
}

.journey-step:hover {
  background: rgba(255, 255, 255, 0.03);
}

.journey-line {
  flex-grow: 1;
  height: 1px;
  background: var(--border-light);
  max-width: 30px;
}

/* Flight Path Flowchart (Empty Workspace Interactive Deck) */
.guided-flight-path {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  padding: 10px;
  width: 100%;
}

@media (max-width: 768px) {
  .guided-flight-path {
    flex-direction: column;
    gap: 16px;
  }
  .flight-arrow {
    transform: rotate(90deg);
  }
}

.flight-node {
  width: 125px;
  background: rgba(15, 20, 35, 0.7);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-dark);
}

.flight-node .node-badge {
  position: absolute;
  top: -8px;
  background: #0d111d;
  border: 1px solid var(--border-light);
  font-size: 8px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s;
}

.flight-node .node-icon {
  font-size: 18px;
  margin-bottom: 2px;
}

.flight-node h5 {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0;
}

.flight-node .node-action {
  font-size: 9px;
  font-weight: 600;
  color: var(--accent-cyan);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.flight-node:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}

.flight-node:hover .node-badge {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.flight-arrow {
  font-size: 12px;
  color: var(--text-dark);
  animation: arrowPulse 1.5s infinite ease-in-out;
}

@keyframes arrowPulse {
  0% { opacity: 0.4; transform: translateX(-2px); }
  50% { opacity: 1; transform: translateX(2px); }
  100% { opacity: 0.4; transform: translateX(-2px); }
}

/* Auxiliary Systems Grid */
.aux-systems-title {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 24px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
  width: 100%;
  text-align: left;
}

.aux-systems-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  text-align: left;
}

@media (max-width: 900px) {
  .aux-systems-grid {
    grid-template-columns: 1fr;
  }
}

.aux-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-light);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
}

.aux-card i {
  font-size: 16px;
}

.aux-card h6 {
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 2px;
}

.aux-card p {
  font-size: 9.5px;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.3;
}

.aux-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-medium);
  transform: translateX(3px);
}
