/* ==========================================================================
   NEXUS ERP AI - Premium Design System (styles.css)
   ========================================================================== */

/* Custom CSS Variables & Design Tokens */
:root {
    /* Color Palette */
    --color-bg-base: #070814;
    --color-bg-panel: rgba(12, 14, 38, 0.45);
    
    --color-primary: #8b5cf6;       /* Radiant Violet */
    --color-primary-rgb: 139, 92, 246;
    --color-accent: #06b6d4;        /* Electric Cyan */
    --color-accent-rgb: 6, 182, 212;
    --color-pink: #ec4899;          /* Cyber Pink */
    --color-pink-rgb: 236, 72, 153;
    
    --color-success: #10b981;       /* Emerald Success */
    --color-success-rgb: 16, 185, 129;
    --color-warning: #f59e0b;       /* Amber Warning */
    --color-warning-rgb: 245, 158, 11;
    --color-danger: #ef4444;        /* Crimson Danger */
    --color-danger-rgb: 239, 68, 68;
    
    /* Glassmorphism Specs */
    --glass-bg: rgba(13, 16, 44, 0.45);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --glass-blur: 16px;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Animation Speeds */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s ease;
}

/* Alternate Themes (Applied via JS) */
body.cyber-matrix {
    --color-bg-base: #030a05;
    --color-bg-panel: rgba(5, 20, 10, 0.45);
    --color-primary: #10b981;
    --color-primary-rgb: 16, 185, 129;
    --color-accent: #22c55e;
    --color-accent-rgb: 34, 197, 94;
    --glass-bg: rgba(6, 24, 12, 0.5);
    --glass-border: rgba(34, 197, 94, 0.15);
    --glass-border-hover: rgba(34, 197, 94, 0.3);
}

body.luminous-violet {
    --color-bg-base: #0b0718;
    --color-bg-panel: rgba(25, 14, 50, 0.45);
    --color-primary: #d946ef;
    --color-primary-rgb: 217, 70, 239;
    --color-accent: #a855f7;
    --color-accent-rgb: 168, 85, 247;
    --glass-bg: rgba(23, 12, 48, 0.45);
    --glass-border: rgba(217, 70, 239, 0.12);
    --glass-border-hover: rgba(217, 70, 239, 0.25);
}

/* ==========================================================================
   1. Reset & Global Layout Rules
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--color-bg-base);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    transition: background-color var(--transition-slow);
}

/* Custom Premium Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* ==========================================================================
   2. Glassmorphic Style utilities
   ========================================================================== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: border-color var(--transition-fast), background-color var(--transition-normal);
}

.glass:hover {
    border-color: var(--glass-border-hover);
}

/* Glowing Border Accent Triggers */
.glowing-border-violet {
    border-color: rgba(var(--color-primary-rgb), 0.3) !important;
    box-shadow: 0 8px 32px 0 rgba(var(--color-primary-rgb), 0.15);
}
.glowing-border-cyan {
    border-color: rgba(var(--color-accent-rgb), 0.3) !important;
    box-shadow: 0 8px 32px 0 rgba(var(--color-accent-rgb), 0.15);
}

/* Glowing text indicators */
.text-glow-cyan {
    color: var(--color-accent) !important;
    text-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.6);
}
.text-glow-violet {
    color: var(--color-primary) !important;
    text-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.6);
}

/* Background Glowing Orbs */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
    transition: opacity var(--transition-slow), transform 0.1s ease-out;
}
.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.4) 0%, rgba(0,0,0,0) 70%);
    top: -150px;
    left: -100px;
    animation: orb-float-slow 25s infinite alternate ease-in-out;
}
.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(var(--color-accent-rgb), 0.3) 0%, rgba(0,0,0,0) 70%);
    bottom: -100px;
    right: -100px;
    animation: orb-float-slow 30s infinite alternate-reverse ease-in-out;
}
.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(var(--color-pink-rgb), 0.25) 0%, rgba(0,0,0,0) 70%);
    top: 30%;
    left: 45%;
    animation: orb-float-mid 18s infinite alternate ease-in-out;
}

@keyframes orb-float-slow {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.15); }
    100% { transform: translate(-30px, 80px) scale(0.95); }
}
@keyframes orb-float-mid {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-80px, -60px) rotate(180deg) scale(1.2); }
}

/* ==========================================================================
   3. Main Application Container & Layout Grid
   ========================================================================== */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   4. Sidebar Panel Styling
   ========================================================================== */
.sidebar {
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    z-index: 10;
    border-radius: 0 24px 24px 0;
    border-left: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 45px;
}
.brand-logo {
    width: 45px;
    height: 45px;
}
.logo-svg {
    width: 100%;
    height: 100%;
}
.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-logo-img {
    width: 120%;
    height: 120%;
    object-fit: contain;
    mix-blend-mode: screen; /* This removes the black background, leaving only the glowing logo! */
    transform: scale(1.3) translateX(-5px);
}
.brand-name h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 1.3rem;
    background: linear-gradient(120deg, #ffffff, var(--color-primary), var(--color-accent), var(--color-pink), #ffffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: colorSweep 8s linear infinite;
}

@keyframes colorSweep {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.brand-name span {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--color-accent);
    text-shadow: 0 0 8px rgba(var(--color-accent-rgb), 0.4);
    display: block;
    margin-top: -3px;
}

/* Nav Menu Links */
.sidebar-nav {
    flex: 1;
}
.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: none;
    border: none;
    color: var(--text-secondary);
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 4px;
    height: 20px;
    background: var(--color-accent);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.8);
    transition: transform var(--transition-fast);
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    color: #ffffff;
    background: rgba(var(--color-primary-rgb), 0.15);
    border: 1px solid rgba(var(--color-primary-rgb), 0.25);
}
.nav-link.active::before {
    transform: translateY(-50%) scaleY(1);
    background: var(--color-primary);
    box-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.8);
}

.nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
    transition: transform var(--transition-fast);
}
.nav-link:hover .nav-icon {
    transform: translateX(2px);
    opacity: 1;
}

/* AI Indicator Glow */
.ai-pulse-dot {
    position: absolute;
    right: 18px;
    width: 8px;
    height: 8px;
    background-color: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-accent);
    animation: pulse-beacon 1.8s infinite;
}

@keyframes pulse-beacon {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px var(--color-accent); }
    100% { transform: scale(0.9); opacity: 0.6; }
}

/* User Operator Footer */
.sidebar-footer {
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
    margin-top: auto;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}
.profile-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}
.avatar-initials {
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}
.status-indicator-pulse {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: var(--color-success);
    border: 2px solid var(--color-bg-base);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--color-success);
    animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--color-success-rgb), 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(var(--color-success-rgb), 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--color-success-rgb), 0); }
}
.profile-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.role-badge {
    font-size: 0.7rem;
    color: var(--color-accent);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ==========================================================================
   5. Main Content Panel & Top Header
   ========================================================================== */
.main-content {
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    overflow-y: auto;
    height: 100vh;
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 30px;
    border-radius: 20px;
    z-index: 100;
}
.header-welcome h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.header-welcome p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Premium Search Pill */
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 30px;
    width: 260px;
    border-color: rgba(255, 255, 255, 0.05);
}
.search-icon {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.4);
}
.search-box input {
    background: none;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    width: 100%;
}
.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
.search-shortcut {
    font-size: 0.75rem;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.4);
    font-family: monospace;
}

/* AI Pulse Analyzer widget */
.ai-pulse-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px;
    border-radius: 30px;
}
.pulse-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
}
.pulse-value {
    font-weight: 700;
    font-size: 0.9rem;
    font-family: var(--font-heading);
}
.pulse-visual-graph {
    display: flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 14px;
    width: 25px;
}
.pulse-visual-graph .bar {
    width: 3px;
    height: 100%;
    background-color: var(--color-accent);
    border-radius: 10px;
    transform-origin: bottom;
}
.animate-bar-1 { animation: pulse-bar-h 1.2s infinite ease-in-out; }
.animate-bar-2 { animation: pulse-bar-h 0.8s infinite 0.2s ease-in-out; }
.animate-bar-3 { animation: pulse-bar-h 1.4s infinite 0.1s ease-in-out; }
.animate-bar-4 { animation: pulse-bar-h 1.0s infinite 0.3s ease-in-out; }

@keyframes pulse-bar-h {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

/* Button & Icon Styling */
.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    color: #ffffff;
    position: relative;
    transition: transform var(--transition-fast), border var(--transition-fast);
}
.icon-btn:hover {
    transform: translateY(-2px);
    border-color: var(--color-accent);
}
.icon-btn svg {
    width: 20px;
    height: 20px;
}
.notification-trigger {
    position: relative;
}
.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background-color: var(--color-pink);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-pink);
}

/* Notification Drawer Dropdown */
.notification-panel {
    position: absolute;
    right: 0;
    top: 55px;
    width: 360px;
    border-radius: 16px;
    padding: 18px;
    z-index: 500;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    pointer-events: none;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}
.notification-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.panel-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}
.text-btn {
    background: none;
    border: none;
    color: var(--color-accent);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.notification-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
}
.notification-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    transition: background-color var(--transition-fast);
    cursor: pointer;
}
.notification-item:hover {
    background: rgba(255, 255, 255, 0.03);
}
.notify-icon-shell {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notify-icon-shell.info { background: rgba(var(--color-accent-rgb), 0.15); color: var(--color-accent); }
.notify-icon-shell.success { background: rgba(var(--color-success-rgb), 0.15); color: var(--color-success); }
.notify-icon-shell.warning { background: rgba(var(--color-warning-rgb), 0.15); color: var(--color-warning); }

.notify-content p {
    font-size: 0.8rem;
    line-height: 1.4;
}
.notify-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

/* ==========================================================================
   6. General Tab & Views Handling
   ========================================================================== */
.tab-view {
    display: none;
    animation: fade-slide-in 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.tab-view.active {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@keyframes fade-slide-in {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   7. AI Recommendation Insights Banner
   ========================================================================== */
.insight-banner {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 24px 30px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}
.insight-banner::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 250px;
    height: 100%;
    background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.1) 0%, rgba(0,0,0,0) 80%);
    pointer-events: none;
}
.banner-icon-container {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(var(--color-primary-rgb), 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.banner-icon-container svg {
    width: 28px;
    height: 28px;
}
.insight-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.65rem;
    font-weight: 800;
    background: rgba(var(--color-primary-rgb), 0.2);
    color: var(--color-primary);
    border-radius: 30px;
    letter-spacing: 1px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
    margin-bottom: 8px;
}
.banner-content h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.banner-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 800px;
}
.banner-actions {
    display: flex;
    gap: 15px;
    margin-top: 18px;
}

/* ==========================================================================
   8. KPI Cards Grid Layout
   ========================================================================== */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.kpi-card {
    padding: 22px 24px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
    position: relative;
    overflow: hidden;
}

/* Card glow enhancements on hover */
.kpi-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
}

.hover-float:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kpi-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}
.kpi-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
}
.kpi-icon-wrapper svg {
    width: 16px;
    height: 16px;
}

.kpi-body {
    margin-top: 15px;
}
.kpi-value {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.kpi-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 4px;
}
.inline-icon {
    width: 12px;
    height: 12px;
}
.muted {
    font-weight: 400;
    color: var(--text-muted);
}

/* Embedded Sparklines */
.kpi-sparkline {
    height: 38px;
    margin-top: 15px;
    width: 100%;
}
.sparkline-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Core Brand Accent Colors */
.text-emerald { color: var(--color-success); }
.text-violet { color: var(--color-primary); }
.text-amber { color: var(--color-warning); }
.text-cyan { color: var(--color-accent); }

/* ==========================================================================
   9. Analytics Grid: Custom Graphs & System Autopilot Registry
   ========================================================================== */
.analytics-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}

.chart-card {
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.chart-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}
.chart-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.chart-legends {
    display: flex;
    gap: 15px;
}
.legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.bg-cyan { background-color: var(--color-accent); box-shadow: 0 0 8px var(--color-accent); }
.bg-violet { background-color: var(--color-primary); box-shadow: 0 0 8px var(--color-primary); }

.chart-body {
    height: 300px;
    width: 100%;
    position: relative;
}

/* System Autopilot scrolling feed */
.feed-card {
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 14px;
}
.feed-header h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
}
.status-indicator-live {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-success);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(var(--color-success-rgb), 0.1);
    padding: 3px 8px;
    border-radius: 30px;
    text-transform: uppercase;
}
.glowing-dot-green {
    width: 6px;
    height: 6px;
    background: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-success);
    animation: pulse-green 1.5s infinite;
}

.feed-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 290px;
    overflow-y: auto;
}
.feed-item {
    display: flex;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.feed-item:last-child {
    border: none;
    padding-bottom: 0;
}
.feed-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}
.feed-icon.success { background-color: var(--color-success); box-shadow: 0 0 6px var(--color-success); }
.feed-icon.violet { background-color: var(--color-primary); box-shadow: 0 0 6px var(--color-primary); }
.feed-icon.warning { background-color: var(--color-warning); box-shadow: 0 0 6px var(--color-warning); }

.feed-details {
    display: flex;
    flex-direction: column;
}
.feed-details p {
    font-size: 0.8rem;
    line-height: 1.4;
}
.feed-details span {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ==========================================================================
   10. Dynamic Modules Views (Ledgers, Inventory, HR grids)
   ========================================================================== */
.inner-tabs-container {
    display: flex;
    padding: 6px;
    border-radius: 12px;
    align-self: flex-start;
    gap: 4px;
}
.inner-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px 18px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: color var(--transition-fast), background var(--transition-fast);
}
.inner-tab:hover {
    color: #ffffff;
}
.inner-tab.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.module-content {
    display: none;
    flex-direction: column;
    gap: 20px;
    animation: fade-slide-in 0.4s ease;
}
.module-content.active {
    display: flex;
}

.module-action-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.panel-info h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}
.panel-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.panel-badge-group {
    display: flex;
    gap: 8px;
}

/* Data Ledger Tables styling */
.table-container {
    border-radius: 16px;
    overflow: hidden;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}
.data-table th {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--glass-border);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}
.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    vertical-align: middle;
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}
.data-table tbody tr {
    transition: background-color var(--transition-fast);
}
.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 700;
}
.badge-success { background: rgba(var(--color-success-rgb), 0.12); color: var(--color-success); border: 1px solid rgba(var(--color-success-rgb), 0.2); }
.badge-warning { background: rgba(var(--color-warning-rgb), 0.12); color: var(--color-warning); border: 1px solid rgba(var(--color-warning-rgb), 0.2); }
.badge-danger { background: rgba(var(--color-danger-rgb), 0.12); color: var(--color-danger); border: 1px solid rgba(var(--color-danger-rgb), 0.2); }
.badge-primary { background: rgba(var(--color-primary-rgb), 0.12); color: var(--color-primary); border: 1px solid rgba(var(--color-primary-rgb), 0.2); }

/* Automated Tick Verification indicator */
.ai-verify-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(var(--color-accent-rgb), 0.08);
    color: var(--color-accent);
    border: 1px solid rgba(var(--color-accent-rgb), 0.15);
}
.ai-verify-pill svg {
    width: 10px;
    height: 10px;
}

/* ==========================================================================
   11. Smart Overlay Drawers (forms input)
   ========================================================================== */
.form-drawer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%) scale(0.96);
    width: 460px;
    z-index: 1000;
    border-radius: 24px;
    padding: 30px;
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}
.form-drawer.open {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
.drawer-header h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
}
.icon-btn-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}
.icon-btn-close:hover {
    color: #ffffff;
}

.drawer-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}
.form-group input, .form-group select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    color: #ffffff;
    font-family: var(--font-body);
    outline: none;
    font-size: 0.85rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-group input:focus, .form-group select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 8px rgba(var(--color-primary-rgb), 0.35);
}

/* ==========================================================================
   12. Full-scale Premium AI Assistant Panel (Nexus AI Chat Room)
   ========================================================================== */
.nexus-chat-container {
    height: calc(100vh - 200px);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--glass-border);
}
.avatar-rotating-container {
    width: 44px;
    height: 44px;
    position: relative;
}
.nexus-neural-logo {
    width: 100%;
    height: 100%;
}
.nexus-neural-logo.spinning {
    animation: spin 30s linear infinite;
}
@keyframes spin {
    100% { transform: rotate(360deg); }
}

.chat-header-info h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
}
.pulsing-text {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.pulse-dot-cyan {
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--color-accent);
    animation: pulse-cyan 1.8s infinite;
}
@keyframes pulse-cyan {
    0% { transform: scale(0.95); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.6; }
}

.chat-control-status {
    margin-left: auto;
}

/* Chat content body scroll */
.chat-body-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-msg {
    display: flex;
    gap: 14px;
    max-width: 75%;
}
.chat-msg.ai-msg {
    align-self: flex-start;
}
.chat-msg.user-msg {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.msg-avatar .avatar-nexus {
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.msg-bubble {
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 0.85rem;
    line-height: 1.5;
}
.ai-msg .msg-bubble {
    border-top-left-radius: 4px;
    background-color: rgba(255, 255, 255, 0.02);
}
.user-msg .msg-bubble {
    border-top-right-radius: 4px;
    background-color: rgba(var(--color-primary-rgb), 0.12);
    border-color: rgba(var(--color-primary-rgb), 0.25);
}

.msg-bubble p {
    margin-bottom: 8px;
}
.msg-bubble p:last-child {
    margin-bottom: 0;
}

/* Inline typing anim */
.typing-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 6px 12px;
}
.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
    opacity: 0.4;
    animation: typing-dot-bounce 1s infinite alternate;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-dot-bounce {
    0% { transform: translateY(0); opacity: 0.4; }
    100% { transform: translateY(-4px); opacity: 1; }
}

/* Suggestion Capsules under chat */
.chat-suggestions {
    display: flex;
    gap: 10px;
    padding: 10px 24px;
    background: rgba(0, 0, 0, 0.15);
    overflow-x: auto;
}
.suggestion-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    font-family: monospace;
    white-space: nowrap;
    transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.suggestion-tag:hover {
    color: #ffffff;
    border-color: var(--color-accent);
    background: rgba(var(--color-accent-rgb), 0.08);
}

/* Chat Command Input Bar */
.chat-input-bar {
    display: flex;
    padding: 16px 24px;
    gap: 15px;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    border-radius: 0;
}
.chat-input-bar input {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    outline: none;
    border-radius: 12px;
    padding: 12px 18px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.88rem;
    transition: border-color var(--transition-fast);
}
.chat-input-bar input:focus {
    border-color: var(--color-accent);
}

/* ==========================================================================
   13. Global Settings & Controls Adjusters (Sliders, Swappers)
   ========================================================================== */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.settings-card {
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.settings-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

/* Custom Theme Picker Capsules */
.theme-picker-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.theme-picker-container label {
    font-size: 0.7rem;
}
.theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.theme-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-body);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.theme-btn:hover {
    color: #ffffff;
    border-color: var(--glass-border-hover);
}
.theme-btn.active {
    color: #ffffff;
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.08);
}
.theme-preview {
    width: 100%;
    height: 24px;
    border-radius: 6px;
}
.nebula-bg { background: linear-gradient(135deg, #070814 0%, #170c30 100%); }
.matrix-bg { background: linear-gradient(135deg, #030a05 0%, #06180c 100%); }
.violet-bg { background: linear-gradient(135deg, #0b0718 0%, #2f125a 100%); }

/* Sliders */
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.slider-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-accent);
}
.custom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    outline: none;
}
.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 6px var(--color-primary);
    cursor: pointer;
    transition: transform var(--transition-fast);
}
.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Toggle Switches */
.switch-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.switch-group:last-of-type {
    border: none;
    padding-bottom: 0;
}
.switch-info h4 {
    font-size: 0.88rem;
    font-weight: 600;
}
.switch-info p {
    font-size: 0.75rem;
    margin-top: 2px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    flex-shrink: 0;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    transition: background-color var(--transition-fast);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform var(--transition-fast);
}
input:checked + .toggle-slider {
    background-color: var(--color-success);
}
input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* ==========================================================================
   14. Button system definitions
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.btn:active {
    transform: scale(0.98);
}
.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, rgba(var(--color-primary-rgb), 0.8) 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(var(--color-primary-rgb), 0.25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.9) 0%, rgba(var(--color-primary-rgb), 0.7) 100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.btn-glow:hover {
    box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.6);
}

/* ==========================================================================
   15. Toast Manager Alerts system
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.82rem;
    animation: toast-in 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes toast-in {
    0% { transform: translateY(20px) scale(0.95); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ==========================================================================
   16. Fluid Responsive Layout structures
   ========================================================================== */
@media (max-width: 1200px) {
    .app-container {
        grid-template-columns: 240px 1fr;
    }
    .metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .analytics-layout {
        grid-template-columns: 1fr;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none; /* In production a responsive drawer fits here */
    }
    .main-content {
        padding: 15px;
    }
    .main-header {
        padding: 15px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .header-welcome h1 {
        font-size: 1.4rem;
    }
    .header-controls {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
    }
    .search-box {
        width: 100%;
        order: -1;
    }
    .ai-pulse-panel {
        display: none !important;
    }
    .metric-grid {
        grid-template-columns: 1fr;
    }
    .insight-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    .banner-content {
        width: 100%;
        overflow-wrap: break-word;
    }
    .banner-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .banner-actions button {
        width: 100%;
    }
    .form-drawer {
        width: calc(100vw - 30px);
    }
    
    /* Lock Screen Fixes for mobile */
    .lock-card {
        padding: 20px 15px;
        max-width: 95%;
        max-height: 85dvh;
        overflow-y: auto;
    }
    .lock-icon-wrapper {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }
    .lock-brand {
        margin-bottom: 15px;
    }
    .lock-logo-svg {
        width: 45px;
        height: 45px;
    }
    .lock-brand h2 {
        font-size: 1.1rem;
    }
    .lock-card h3 {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }
    .lock-card p {
        margin-bottom: 15px;
    }
    .lock-form .input-group {
        margin-bottom: 12px;
    }
    .btn-demo {
        margin-top: 10px;
    }
}

/* ==========================================================================
   17. Corporate Vision & Animated Pipeline Flowchart Styling
   ========================================================================== */
.vision-banner {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 24px 30px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}
.vision-banner::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 250px;
    height: 100%;
    background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.1) 0%, rgba(0,0,0,0) 80%);
    pointer-events: none;
}

.pipeline-card {
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.pipeline-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 20px 10px;
    overflow-x: auto;
}
.pipeline-node {
    flex: 1;
    min-width: 150px;
    padding: 18px 16px;
    border-radius: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.pipeline-node:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
}
.pipeline-node.active {
    border-color: rgba(var(--color-accent-rgb), 0.4);
    box-shadow: 0 0 20px rgba(var(--color-accent-rgb), 0.2);
    background: rgba(var(--color-accent-rgb), 0.05);
}
.node-icon-shell {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
}
.node-icon-shell svg {
    width: 20px;
    height: 20px;
}
.pipeline-node h4 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
}
.node-status {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pipeline-arrow {
    width: 50px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    position: relative;
    flex-shrink: 0;
}
.pulse-laser {
    position: absolute;
    top: -2px;
    left: 0;
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-accent);
    animation: laser-pulse 2.5s infinite linear;
}
@keyframes laser-pulse {
    0% { left: 0%; }
    100% { left: 100%; }
}
@keyframes laser-pulse-rtl {
    0% { right: 0%; }
    100% { right: 100%; }
}

.vision-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.vision-card {
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.vision-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
}
.vision-card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}
.vision-feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.vision-feature-list li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    padding-left: 20px;
}
.vision-feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background-color: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--color-primary);
}
.vision-feature-list li strong {
    font-size: 0.88rem;
    font-weight: 600;
}

.tech-spec-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.tech-card {
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: transform 0.3s ease;
}
.tech-card:hover {
    transform: translateY(-4px);
}
.tech-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tech-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
}
.tech-body h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.tech-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.4;
}
.tech-spec-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tech-spec-list li {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tech-spec-list li::before {
    content: '⚡';
    font-size: 0.72rem;
    color: var(--color-accent);
}

/* ==========================================================================
   18. Complete Right-To-Left (RTL) Arabic Override Specifications
   ========================================================================== */
body.rtl {
    font-family: 'Cairo', 'Tajawal', var(--font-body);
    direction: rtl;
}
body.rtl h1, body.rtl h2, body.rtl h3, body.rtl h4, body.rtl h5, body.rtl h6 {
    font-family: 'Cairo', 'Tajawal', var(--font-heading);
}

/* Sidebar Flip */
body.rtl .sidebar {
    border-radius: 24px 0 0 24px;
    border-left: 1px solid var(--glass-border);
    border-right: none;
}
body.rtl .nav-link {
    text-align: right;
}
body.rtl .nav-link::before {
    left: auto;
    right: 0;
    border-radius: 4px 0 0 4px;
}
body.rtl .nav-link:hover .nav-icon {
    transform: translateX(-2px);
}
body.rtl .ai-pulse-dot {
    right: auto;
    left: 18px;
}
body.rtl .status-indicator-pulse {
    right: auto;
    left: 0;
}

/* Table Text Alignment */
body.rtl .data-table {
    text-align: right;
}
body.rtl .data-table th {
    text-align: right;
}

/* Notification panel alignment */
body.rtl .notification-panel {
    right: auto;
    left: 0;
}

/* Chat Bubbles Flip */
body.rtl .ai-msg .msg-bubble {
    border-top-left-radius: 18px;
    border-top-right-radius: 4px;
}
body.rtl .user-msg .msg-bubble {
    border-top-right-radius: 18px;
    border-top-left-radius: 4px;
}

/* Suggestion Capsules */
body.rtl .chat-msg.user-msg {
    flex-direction: row-reverse;
}

/* Laser Direction RTL */
body.rtl .pulse-laser {
    left: auto;
    right: 0;
    animation: laser-pulse-rtl 2.5s infinite linear;
}

/* Vision Card bullets */
body.rtl .vision-feature-list li {
    padding-left: 0;
    padding-right: 20px;
}
body.rtl .vision-feature-list li::before {
    left: auto;
    right: 0;
}

/* Toast container positioning */
body.rtl .toast-container {
    right: auto;
    left: 30px;
}

/* Language switch button spin on hover */
.lang-switcher button {
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    color: var(--color-accent);
    border-color: rgba(var(--color-accent-rgb), 0.3);
}
.lang-switcher button:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

@media (max-width: 1200px) {
    .tech-spec-grid {
        grid-template-columns: 1fr;
    }
    .vision-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   PORTAL AUTH LOCK SCREEN STYLING (styles.css extension)
   ========================================================================== */
.lock-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(5, 6, 15, 0.88);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.lock-screen-overlay.authenticated {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
}

.lock-card {
    width: 100%;
    max-width: 440px;
    padding: 40px 30px;
    text-align: center;
    border-radius: 20px;
}
.lock-card.shake {
    animation: cardShake 0.4s ease-in-out;
}
@keyframes cardShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.lock-icon-wrapper {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
}
.lock-icon-wrapper.unlocked {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

@keyframes unlockShackle {
    0% { transform: translateY(0) rotate(0); }
    100% { transform: translateY(-4px) rotate(-18deg); }
}
.lock-icon-wrapper.unlocked #lock-shackle {
    animation: unlockShackle 0.4s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: right bottom;
}

.lock-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    gap: 2px;
}
.lock-logo-svg {
    width: 44px;
    height: 44px;
    margin-bottom: 6px;
}
.lock-brand h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(120deg, #ffffff, var(--color-primary), var(--color-accent), var(--color-pink), #ffffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: colorSweep 8s linear infinite;
}
.lock-brand span {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--color-accent);
    text-shadow: 0 0 8px rgba(var(--color-accent-rgb), 0.4);
}

.lock-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #fff;
    letter-spacing: 0.5px;
}
.lock-card p {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 25px;
    line-height: 1.5;
}

.lock-form {
    text-align: left;
}
body.rtl .lock-form {
    text-align: right;
}

.lock-form .input-group {
    margin-bottom: 18px;
}
.lock-form .input-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.lock-form .input-group input {
    width: 100%;
    padding: 11px 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 0.88rem;
    transition: all 0.25s ease;
}
.lock-form .input-group input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.15);
}

.btn-block {
    width: 100%;
    justify-content: center;
}
.btn-demo {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #475569;
}
.btn-demo:hover {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.error-message {
    display: none;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.05);
}

/* ==========================================================================
   DEMO MODE VISUAL SYSTEM
   ========================================================================== */

/* ── Top Banner ─────────────────────────────────────────────────────────── */
.demo-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    height: 38px;
    background: linear-gradient(90deg,
        rgba(234, 88, 12, 0.95) 0%,
        rgba(251, 146, 60, 0.92) 40%,
        rgba(234, 88, 12, 0.95) 100%);
    border-bottom: 1px solid rgba(251, 146, 60, 0.5);
    box-shadow: 0 2px 20px rgba(234, 88, 12, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* animated scan-line shimmer across the banner */
.demo-banner-pulse {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.12) 50%,
        transparent 60%
    );
    background-size: 200% 100%;
    animation: demoBannerScan 3s linear infinite;
    pointer-events: none;
}
@keyframes demoBannerScan {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.demo-banner-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1;
    padding: 0 20px;
}
.demo-banner-icon {
    color: #fff;
    opacity: 0.9;
    flex-shrink: 0;
    animation: demoBannerIconPulse 2s ease-in-out infinite;
}
@keyframes demoBannerIconPulse {
    0%, 100% { opacity: 0.7; transform: scale(1);   }
    50%       { opacity: 1;   transform: scale(1.15); }
}
.demo-banner-text {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* push the entire app down so the banner doesn't overlap */
body.demo-active .app-container {
    padding-top: 38px;
}

/* ── Sidebar Badge ───────────────────────────────────────────────────────── */
.demo-sidebar-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(234, 88, 12, 0.15);
    border: 1px solid rgba(234, 88, 12, 0.4);
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fb923c;
    box-shadow: 0 0 8px rgba(234, 88, 12, 0.2);
    animation: demoBadgePulse 2.5s ease-in-out infinite;
}
@keyframes demoBadgePulse {
    0%, 100% { box-shadow: 0 0 8px rgba(234, 88, 12, 0.2); }
    50%       { box-shadow: 0 0 16px rgba(234, 88, 12, 0.5); }
}
.demo-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fb923c;
    animation: demoDotBlink 1.2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes demoDotBlink {
    0%, 100% { opacity: 1;   transform: scale(1);    }
    50%       { opacity: 0.3; transform: scale(0.6);  }
}

/* ── Demo-active sidebar accent ─────────────────────────────────────────── */
body.demo-active .sidebar {
    border-color: rgba(234, 88, 12, 0.2);
    box-shadow: inset -2px 0 0 rgba(234, 88, 12, 0.25),
                var(--glass-shadow);
}

/* ── Fixed corner watermark ─────────────────────────────────────────────── */
body.demo-active::after {
    content: "DEMO";
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 9999;
    font-family: var(--font-heading);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: rgba(251, 146, 60, 0.25);
    pointer-events: none;
    transform: rotate(-30deg);
}
body.rtl.demo-active::after {
    right: auto;
    left: 22px;
    transform: rotate(30deg);
}
