/* Ouro Matrix Design System - Minimalist Light Bauhaus Edition */
/* Inspired by international typographic style & modern art museum aesthetics */

:root {
    /* Color Palette - Bauhaus & Displaay Minimalist */
    --bg-paper: #f1f3f6;           /* 手工質感亮灰暖白紙張底色 */
    --nav-bg: rgba(241, 243, 246, 0.95);
    --text-primary: #0f172a;       /* 前衛高冷深炭黑 */
    --text-secondary: #0f172a;     /* 亮色下全部文字使用高對比深炭黑 */
    --text-muted: #475569;         /* 灰黑色輔助字 (slate-600) */
    --border-color: #0f172a;       /* 1.2px 純黑實線邊框 */
    
    /* Functional Brand Colors */
    --accent-color: #0f172a;       /* 主焦點色退為純黑，與 Displaay 風格高度一致 */
    --accent-light-active: #1e293b;
    --accent-blue-brand: #2563eb;  /* 保留克萊因藍作為少數點綴標籤 (tech-tag) */
    --morandi-blue-text: #0f172a;
    --terminal-text: #047857;
    
    /* Modern Light Flat-Grid style */
    --glass-bg: #ffffff;                        /* 純白紙質卡片背景 */
    --glass-border: #0f172a;                    /* 純黑 1.2px 實線框 */
    --glass-shadow: 4px 4px 0px #0f172a;        /* 經典 Displaay 扁平立體投影，完全無 blur */
    --blur-strength: 0px;                       /* 扁平風格不需要模糊 */
    
    /* Layout & Animation */
    --max-width: 1100px;
    --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); /* 更快、更硬朗的過渡 */

    /* Adaptive Component Variables */
    --decoder-header-bg: #ffffff;
    --decoder-body-bg: #ffffff;
    --input-bg: #ffffff;
    --input-bg-focus: #ffffff;
    --cae-box-bg: #ffffff;
    --modal-overlay-bg: rgba(15, 23, 42, 0.4);
    --tooltip-bg: #ffffff;
    --cae-core-glow: radial-gradient(circle, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    --cae-active-step-bg: #f1f3f6;
    --axin-overlay-bg: rgba(15, 23, 42, 0.5);
    --axin-modal-bg: #ffffff;
    --axin-terminal-bg: #fff5f5;
    --axin-terminal-border: #0f172a;
    --axin-terminal-text: #991b1b;
}

/* Base resets & Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-paper);
    color: var(--text-secondary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                color 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 現代亮色包浩斯紙張質感背景 (僅在亮色模式下啟用) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--bg-paper);
    /* 疊加一層極其細微的噪點以實現高檔手工紙張質感 */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.008'/%3E%3C/svg%3E");
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    opacity: 1;
}

/* 暗色模式下隱藏亮色背景，露出原本的科技微晶底色與噪點 */
body.dark-theme::before {
    opacity: 0;
}

/* Dark Theme Variables Override (方案 A - 暗黑賽博科技風，用於技術沙盒) */
body.dark-theme {
    --bg-paper: #0b0f19;                 /* 深藍黑色夜空背景 */
    --nav-bg: rgba(11, 15, 25, 0.75);    /* 導覽列深色 */
    --text-primary: #f8fafc;             /* 亮白色文字 */
    --text-secondary: #cbd5e1;           /* 淺灰色內文 */
    --text-muted: #94a3b8;               /* 灰藍色輔助字 */
    --border-color: rgba(56, 189, 248, 0.2); /* 青色透明邊框 */
    --accent-color: #38bdf8;             /* 改為科技發光青藍 */
    --accent-light-active: #0ea5e9;      /* 青色 active/hover */
    --morandi-blue-text: #c084fc;        /* 網頁青紫漸層 */
    --terminal-text: #a7f3d0;            /* 暗色模式下亮薄荷綠終端字 */
    
    --glass-bg: rgba(15, 23, 42, 0.65);        /* 深色半透毛玻璃 */
    --glass-border: rgba(56, 189, 248, 0.25);   /* 發光青色反光邊框 */
    --glass-shadow: 0 15px 50px -10px rgba(0, 0, 0, 0.4);

    --decoder-header-bg: #0f172a;        /* slate-900 */
    --decoder-body-bg: #020617;          /* slate-950 */
    --input-bg: rgba(15, 23, 42, 0.6);   /* slate-900 transparent */
    --input-bg-focus: rgba(15, 23, 42, 0.95); /* slate-900 dark focus */
    --cae-box-bg: #0f172a;               /* slate-900 */
    --modal-overlay-bg: rgba(11, 15, 25, 0.75);
    --tooltip-bg: rgba(15, 23, 42, 0.95);
    --cae-core-glow: radial-gradient(circle, rgba(56, 189, 248, 0.5) 0%, rgba(56, 189, 248, 0) 70%);
    --cae-active-step-bg: rgba(56, 189, 248, 0.15);
    --axin-overlay-bg: rgba(11, 15, 25, 0.9);
    --axin-modal-bg: #0f172a;
    --axin-terminal-bg: rgba(239, 68, 68, 0.1);
    --axin-terminal-border: rgba(239, 68, 68, 0.2);
    --axin-terminal-text: #fca5a5;

    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.015'/%3E%3C/svg%3E") !important;

    /* Technical Sandbox Variables */
    --accent-blue: #38bdf8;
    --accent-purple: #c084fc;
    --accent-pink: #f472b6;
    --accent-green: #4ade80;
    
    --c-rgba-192-132-252-0_3: rgba(192, 132, 252, 0.3);
    --c-hex-fff: #fff;
    --c-hex-020617: #020617;
    --c-rgba-148-163-184-0_3: rgba(148, 163, 184, 0.3);
    --c-rgba-192-132-252-0_5: rgba(192, 132, 252, 0.5);
    --c-rgba-56-189-248-0_05: rgba(56, 189, 248, 0.05);
    --c-rgba-5-5-8-0_7: rgba(5, 5, 8, 0.7);
    --c-rgba-56-189-248-0_5: rgba(56, 189, 248, 0.5);
    --c-rgba-30-41-59-0_4: rgba(30, 41, 59, 0.4);
    --c-rgba-255-255-255-0_06: rgba(255,255,255,0.06);
    --c-rgba-0-0-0-0_4: rgba(0, 0, 0, 0.4);
    --c-rgba-56-189-248-0_1: rgba(56, 189, 248, 0.1);
}

/* Typography & Headers - Bold Bauhaus Style */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* 頂部極簡明亮導覽列 */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4rem;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.glass-nav .logo {
    font-size: 1.44rem;
    font-weight: 900;              /* 更厚重的字體 */
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.04em;       /* 原本緊湊字距 */
    position: relative;
    transition: var(--transition-smooth); /* 使用 transition 漸變 */
}

.glass-nav .logo::after {
    content: ".";
    color: var(--accent-blue-brand); /* 預設為鮮艷的克萊因藍 */
    transition: var(--transition-smooth);
}

.glass-nav .logo:hover {
    letter-spacing: 0.12em;        /* Hover 時優雅展開 (Displaay 字體特色) */
    color: var(--accent-blue-brand); /* 微微變為克萊因藍 */
}

.glass-nav .logo:hover::after {
    color: var(--text-primary);     /* 點點變為純黑反轉 */
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
}

/* Hide hamburger menu by default on desktop */
.glass-nav .hamburger {
    display: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a.active {
    color: var(--accent-color);
    font-weight: 600;
}

/* 亮色模式下導覽列啟動標示 (克萊因藍細線) */
.nav-links a.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

body.dark-theme .nav-links a.active::after {
    background-color: var(--accent-blue);
}

/* Layout container */
.container {
    max-width: var(--max-width);
    margin: 120px auto 4rem auto;
    padding: 0 2rem;
    z-index: 1;
    position: relative;
}

/* SPA Views */
.spa-view {
    display: none;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.spa-view.active {
    display: flex;
    flex-direction: column;
}

/* Hero section with extreme bold typography and negative space */
.hero {
    text-align: center;
    padding: 4.5rem 0 3.5rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

/* Button & Action items - Bauhaus Contrast */
.action-btn {
    display: inline-block;
    background-color: #0f172a; /* 亮色下預設使用高冷炭黑 */
    color: #ffffff; 
    border: 1.2px solid #0f172a;
    padding: 0.55rem 1.4rem;  /* 大幅縮小 */
    font-size: 0.85rem;       /* 更精緻 */
    font-weight: 700;
    border-radius: 4px;       /* 4px 微圓角 */
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
    letter-spacing: 0.5px;
    box-shadow: 3px 3px 0px #0f172a; /* 扁平投影 */
}

.action-btn:hover {
    background-color: var(--accent-blue-brand); /* Hover 時使用克萊因藍亮點點綴 */
    color: #ffffff;
    border-color: var(--accent-blue-brand);
    box-shadow: 0px 0px 0px #0f172a;
    transform: translate(3px, 3px); /* 配合 3px 投影點擊下壓動態 */
}

/* Outline button - High contrast black frame in light mode */
.outline-btn {
    background-color: transparent;
    color: #0f172a; 
    border: 1.2px solid #0f172a; 
    padding: 0.55rem 1.4rem;  /* 大幅縮小 */
    font-size: 0.85rem;       /* 更精緻 */
    font-weight: 700;
    border-radius: 4px;       /* 4px 微圓角 */
    margin-left: 0;
    box-shadow: 3px 3px 0px #0f172a; /* 增加完全相同的 3px 扁平投影以平衡重量感 */
    transition: var(--transition-smooth);
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.outline-btn:hover {
    background-color: #0f172a; /* Hover 時變為實心純黑背景，與實心按鈕形成對比 */
    border-color: #0f172a;
    color: #ffffff; 
    box-shadow: 0px 0px 0px #0f172a;
    transform: translate(3px, 3px); /* 保持一致的下壓對齊動態 */
}

/* Dark theme overrides for buttons (Cyber style) */
body.dark-theme .action-btn {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #0b0f19;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.2);
}

body.dark-theme .action-btn:hover {
    background-color: #0ea5e9;
    border-color: #0ea5e9;
    color: #0b0f19;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

body.dark-theme .outline-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(248, 250, 252, 0.30);
    color: var(--text-primary);
}

body.dark-theme .outline-btn:hover {
    background-color: var(--text-primary); /* 亮白色 */
    border-color: var(--text-primary);
    color: var(--bg-paper); /* 深藍黑 */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.btn-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem; /* 緊湊的桌機端按鈕間距 */
}

/* Grid & Cards - Sharp borders, Light shadows, no wood texture */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
}

.glass-card {
    background-color: var(--glass-bg);
    border: 1.2px solid var(--glass-border);
    border-radius: 4px; /* 從 12px 縮減至 4px，保留微圓角 */
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translate(-4px, -4px); /* 扁平立體上浮 */
    box-shadow: 8px 8px 0px #0f172a;   /* 前衛黑色粗實影 */
    border-color: #0f172a;
}

body.dark-theme .glass-card {
    border-radius: 12px; /* 暗色科技沙盒保留其大圓角 */
}

body.dark-theme .glass-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.15);
    transform: translateY(-5px); /* 暗色下保持原本浮起 */
}

/* Tech tag styling - Clean Modern SaaS look */
.tech-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-color);
    background-color: #eff6ff; /* 極淡莫蘭迪藍 */
    border: 1px solid #dbeafe;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-theme .tech-tag {
    color: var(--accent-blue);
    background-color: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.glass-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.glass-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.glass-card ul {
    list-style: none;
    margin-top: 1rem;
}

.glass-card li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.2rem;
}

.glass-card li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

body.dark-theme .glass-card li::before {
    color: var(--accent-blue);
}

/* Intro specific styles */
#view-intro.active {
    display: grid !important;
    grid-template-columns: 280px 1fr; /* 左側標題固定，右側卡片自適應 */
    gap: 3.5rem; /* 優化雙欄網格大氣呼吸間距 */
    align-items: flex-start;
    margin-top: 2rem;
}

#view-intro .hero {
    text-align: left;
    padding: 0;
    margin: 0;
    max-width: 100%;
}

#view-intro .hero h1 {
    font-size: 3.5rem;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.intro-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 0;
}

/* Intro card style overrides */
.intro-card {
    margin-bottom: 0;
}

.intro-card {
    border-left: 4px solid var(--text-primary); /* 純黑左實線 */
    border-top: 1.2px solid #0f172a;
    border-right: 1.2px solid #0f172a;
    border-bottom: 1.2px solid #0f172a;
    border-radius: 0 4px 4px 0; /* 精緻微圓角 */
    box-shadow: var(--glass-shadow);
}

body.dark-theme .intro-card {
    border-left-color: var(--accent-blue);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0 12px 12px 0; /* 暗色科技沙盒保留其大圓角 */
    box-shadow: none;
}

.intro-card h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Contact layout */
.contact-container {
    max-width: 600px;
    margin: 3rem auto;
    text-align: center;
}

/* ========================================================================== */
/* CORE ENGINE VIEW (技術沙盒) - 暗色主題，硬核科技風                          */
/* ========================================================================== */

#view-core-engine {
    width: 100%;
}

.gradient-text {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--morandi-blue-text) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

body.dark-theme .gradient-text {
    background: linear-gradient(135deg, #38bdf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-panel {
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    margin-bottom: 2rem;
    padding: 2.5rem;
    transition: var(--transition-smooth);
}

/* Cyber Toggle button */
.cyber-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.cyber-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cyber-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.cyber-toggle .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.cyber-toggle input:checked + .slider {
    background-color: var(--accent-color);
}

.cyber-toggle input:checked + .slider:before {
    transform: translateX(24px);
}

/* Section elements in Sandbox */
.section-block {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* UWM Interactive Cards */
.uwm-card {
    padding: 2rem;
    border-radius: 12px;
    text-align: left;
    transition: var(--transition-smooth);
    border: 1px solid var(--glass-border);
}

.uwm-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

body.dark-theme .uwm-card .card-icon {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent-blue);
}

.uwm-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.uwm-card .subtitle {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.uwm-card.active-mode {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.15);
    background-color: rgba(37, 99, 235, 0.02);
}

body.dark-theme .uwm-card.active-mode {
    border-color: var(--accent-blue);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.2);
    background-color: rgba(56, 189, 248, 0.02);
}

/* Decoder (Interactive Terminal Console) */
.decoder-box {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
}

.decoder-header {
    background-color: var(--decoder-header-bg);
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.decoder-dots {
    display: flex;
    gap: 0.4rem;
}

.decoder-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #cbd5e1;
}

.decoder-dot.red { background-color: #ef4444; }
.decoder-dot.yellow { background-color: #f59e0b; }
.decoder-dot.green { background-color: #10b981; }

.decoder-title {
    font-size: 0.8rem;
    font-family: monospace;
    font-weight: 700;
    color: var(--text-muted);
}

.decoder-body {
    background-color: var(--decoder-body-bg);
    padding: 1.5rem;
    min-height: 250px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    overflow-y: auto;
}

.decoder-line {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.decoder-input-line {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 1rem;
}

.prompt-symbol {
    color: var(--accent-color);
    font-weight: 800;
    margin-right: 0.8rem;
}

body.dark-theme .prompt-symbol {
    color: var(--accent-blue);
}

.decoder-input {
    flex-grow: 1;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.6rem 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-smooth);
}

.decoder-input:focus {
    border-color: var(--accent-color);
    background: var(--input-bg-focus);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.1);
}

body.dark-theme .decoder-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

/* Semantic Memory Network Graph */
.graph-container {
    width: 100%;
    height: 450px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--decoder-body-bg);
    position: relative;
    overflow: hidden;
}

/* 8D Debugger Box */
.cae-box {
    background-color: var(--cae-box-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.cae-steps-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.cae-step {
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--decoder-body-bg);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition-smooth);
}

.cae-step.active {
    background-color: var(--cae-active-step-bg);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.1);
}

body.dark-theme .cae-step.active {
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.cae-step-num {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.cae-step-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Modals & Popups (Axin overlay) */
.axin-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--modal-overlay-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.axin-overlay.active {
    opacity: 1;
    visibility: visible;
}

.axin-modal {
    background-color: var(--axin-modal-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 650px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    transform: scale(0.9);
    transition: var(--transition-smooth);
}

.axin-overlay.active .axin-modal {
    transform: scale(1);
}

.axin-title {
    font-size: 1.5rem;
    color: #dc2626; /* 亮紅色警示 */
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

body.dark-theme .axin-title {
    color: #f87171;
}

.axin-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.axin-terminal {
    background-color: var(--axin-terminal-bg);
    border: 1px solid var(--axin-terminal-border);
    padding: 1.2rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--axin-terminal-text);
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Custom Interactive Cursor (Klein Blue) */
.custom-cursor {
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--accent-color);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference;
}

body.dark-theme .custom-cursor {
    border-color: var(--accent-blue);
}

.custom-cursor.hover {
    width: 40px;
    height: 40px;
    background-color: rgba(37, 99, 235, 0.1);
    border-color: var(--accent-color);
}

body.dark-theme .custom-cursor.hover {
    background-color: rgba(56, 189, 248, 0.15);
    border-color: var(--accent-blue);
}

/* Background Animated Canvas */
#bg-canvas {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
    pointer-events: none;
    opacity: 0.4;
}

body.dark-theme #bg-canvas {
    opacity: 0.25;
}

/* Footer & Copyright */
.footer-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .glass-nav {
        padding: 0 2rem;
    }
    .glass-nav .hamburger {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--text-primary);
        user-select: none;
    }
    .nav-links {
        display: none; /* Hide nav links by default on mobile */
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--nav-bg);
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem 2rem;
        gap: 1rem;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    }
    /* Show nav links when checkbox is toggled */
    #menu-toggle:checked ~ .glass-nav .nav-links {
        display: flex;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .cae-steps-container {
        grid-template-columns: 1fr;
    }
    .btn-group {
        flex-direction: column;
        gap: 1rem;
    }
    .outline-btn {
        margin-left: 0;
    }

    /* Intro grid mobile fallback */
    #view-intro.active {
        display: flex !important;
        flex-direction: column;
        gap: 2rem;
    }
    #view-intro .hero {
        text-align: center;
    }
    #view-intro .cta-action-card {
        width: 100% !important;
        max-width: 100%;
        align-self: stretch !important;
    }
}

/* ========================================================================== */
/* 🚀 BUG FIXES: CAE, UWM & 8D Simulator Highlights                           */
/* ========================================================================== */

/* 1. CAE Energy Core Animations */
.cae-energy-core {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0px;
    height: 0px;
    border-radius: 50%;
    background: var(--cae-core-glow);
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.15);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
    pointer-events: none;
}

/* 2. CAE Step Active states */
.glass-card.active-step {
    transform: translateY(-8px);
    background-color: var(--cae-active-step-bg) !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.1) !important;
}

body.dark-theme .glass-card.active-step {
    border-color: var(--accent-purple) !important;
    box-shadow: 0 0 25px rgba(192, 132, 252, 0.35) !important;
    background-color: rgba(192, 132, 252, 0.1) !important;
}

/* 3. Simulator & Card Glow Highlights (Light Mode & Dark Mode) */
.highlight-sim, .highlight-uwm {
    transform: translateY(-5px);
    background: #ffffff !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.18) !important;
}

body.dark-theme .highlight-sim {
    border-color: var(--accent-pink) !important;
    box-shadow: 0 0 30px rgba(244, 114, 182, 0.35) !important;
    background: rgba(244, 114, 182, 0.1) !important;
}

body.dark-theme .highlight-uwm {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.35) !important;
    background: rgba(56, 189, 248, 0.1) !important;
}

/* ========================================================================== */
/* ✒️ Avantt-Inspired High-Contrast Typography Updates                       */
/* ========================================================================== */
h1 {
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

h2 {
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero h1 {
    font-size: 4.2rem;
    letter-spacing: -0.05em;
    margin-bottom: 2rem;
}

/* ========================================================================== */
/* 🌡️ Scroll Reveal & Card Glow Animation Rules                              */
/* ========================================================================== */
.reveal-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-element.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Card Glow effect tracking mouse */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(15, 23, 42, 0.04), transparent 40%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.5s ease;
    opacity: 0;
}
.glass-card:hover::before {
    opacity: 1;
}

body.dark-theme .glass-card::before {
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(56, 189, 248, 0.08), transparent 40%);
}


/* ========================================================================== */
/* 🏡 Smart Occupational Health Platform Scoped Styles (Warm Cream Flat-UI)   */
/* ========================================================================== */

#view-nurse-platform {
    --bg-cream: #fbf8f3;            /* 暖杏色底色 */
    --text-charcoal: #2d3748;       /* 深炭黑內文 */
    --text-cream-muted: #4a5568;    /* 輔助灰色字 */
    --border-cream: #cbd5e1;        /* 溫暖灰框線 */
    --card-bg-cream: #ffffff;       /* 純白卡片背景 */
    --accent-olive: #65a30d;        /* 橄欖綠主焦點色 */
    --accent-olive-hover: #4d7c0f;  /* 橄欖綠 Hover */
    --accent-amber: #d97706;        /* 溫慢琥珀色（警告色） */
    
    background-color: var(--bg-cream);
    color: var(--text-charcoal);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-cream);
    border-radius: 8px;
    box-shadow: 0 10px 30px -10px rgba(46, 37, 26, 0.05);
    margin-bottom: 4rem;
}

#view-nurse-platform h2, 
#view-nurse-platform h3, 
#view-nurse-platform h4 {
    color: var(--text-charcoal);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

/* Platform cards in new style */
#view-nurse-platform .platform-card {
    background-color: var(--card-bg-cream);
    border: 1px solid var(--border-cream);
    border-radius: 8px;
    padding: 1.8rem;
    box-shadow: 0 4px 15px -3px rgba(46, 37, 26, 0.03);
    margin-bottom: 1.5rem;
}

#view-nurse-platform .panel-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.8rem;
    margin-bottom: 1.2rem;
}

#view-nurse-platform .panel-icon {
    font-size: 1.5rem;
}

/* Banner Grid for Import & Dispatch */
.banner-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
}

/* Drag drop upload zone */
.upload-zone {
    border: 2px dashed var(--border-cream);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background-color: #fafaf9;
    transition: all 0.25s ease;
}

.upload-zone.dragover, .upload-zone:hover {
    border-color: var(--accent-olive);
    background-color: #f7fee7;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.upload-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-charcoal);
}

.upload-subtitle {
    font-size: 0.8rem;
    color: var(--text-cream-muted);
    margin-bottom: 1rem;
}

/* Survey options checkboxes */
.survey-dispatch {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.survey-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1rem 0;
}

.survey-options label {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
}

.survey-options input[type="checkbox"] {
    accent-color: var(--accent-olive);
    width: 16px;
    height: 16px;
}

/* Cream button style */
.cream-btn {
    display: inline-block;
    padding: 0.55rem 1.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.cream-btn.primary {
    background-color: var(--accent-olive);
    color: #ffffff;
}

.cream-btn.primary:hover {
    background-color: var(--accent-olive-hover);
}

.cream-btn.outline {
    background-color: transparent;
    border-color: var(--border-cream);
    color: var(--text-charcoal);
}

.cream-btn.outline:hover {
    background-color: #f5f5f4;
    border-color: var(--text-charcoal);
}

.cream-btn.small {
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* Loading & Success messages */
.status-msg {
    margin-top: 1rem;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    display: none;
}

.status-msg.loading {
    display: block;
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    font-family: monospace;
}

.status-msg.success {
    display: block;
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Progress bar */
.action-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.progress-bar-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.progress-bar {
    height: 8px;
    background-color: var(--accent-olive);
    border-radius: 4px;
    width: 0;
    transition: width 0.15s linear;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-cream-muted);
    font-family: monospace;
}

/* Grids */
.dashboard-grid-2col {
    display: grid;
    grid-template-columns: 1.12fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Custom Cream Tables */
.table-scroll {
    overflow-x: auto;
}

.cream-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 0.88rem;
}

.cream-table th {
    background-color: #fafaf9;
    border-bottom: 2px solid var(--border-cream);
    padding: 0.8rem;
    text-align: left;
    font-weight: 700;
}

.cream-table td {
    padding: 0.8rem;
    border-bottom: 1px solid #f1f5f9;
}

.cream-table tbody tr {
    transition: background-color 0.15s ease;
}

.cream-table tbody tr:hover {
    background-color: #f7fee7;
}

.cream-table tbody tr.active-row {
    background-color: #f0fdf4;
    border-left: 4px solid var(--accent-olive);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-high {
    background-color: #fee2e2;
    color: #ef4444;
}

.badge-medium {
    background-color: #ffedd5;
    color: #f97316;
}

.badge-low {
    background-color: #f5f5f4;
    color: #78716c;
}

/* Scheduler & To-Do Forms */
.scheduler-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.scheduler-form {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-cream-muted);
}

.cream-input {
    background-color: #ffffff;
    border: 1px solid var(--border-cream);
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    font-size: 0.88rem;
    outline: none;
    color: var(--text-charcoal);
    transition: border-color 0.25s ease;
}

.cream-input:focus {
    border-color: var(--accent-olive);
}

/* Todo items list */
.todo-list-container h3 {
    font-size: 0.95rem;
    color: var(--text-charcoal);
    margin-bottom: 0.8rem;
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 180px;
    overflow-y: auto;
}

.todo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fafaf9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
}

.todo-title {
    font-size: 0.82rem;
    color: var(--text-charcoal);
}

.todo-desc {
    font-size: 0.75rem;
    color: var(--text-cream-muted);
}

.todo-check-btn {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: var(--accent-olive);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.todo-check-btn:hover {
    background-color: var(--accent-olive);
    color: #ffffff;
}

/* Tabs inside bottom panel */
.bottom-panel {
    padding: 0 !important;
    overflow: hidden;
}

.panel-tabs {
    display: flex;
    background-color: #fafaf9;
    border-bottom: 1px solid var(--border-cream);
}

.tab-btn {
    padding: 1rem 1.8rem;
    font-size: 0.9rem;
    font-weight: 700;
    background: transparent;
    border: none;
    border-right: 1px solid var(--border-cream);
    cursor: pointer;
    color: var(--text-cream-muted);
    transition: all 0.2s ease;
}

.tab-btn:hover, .tab-btn.active {
    background-color: #ffffff;
    color: var(--accent-olive);
}

.tab-btn.active {
    border-bottom: 2px solid var(--accent-olive);
}

.tab-content {
    display: none;
    padding: 1.8rem;
}

.tab-content.active {
    display: block;
}

/* Case History Grid layout */
.case-history-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr 1fr;
    gap: 1.8rem;
}

.employee-meta-panel {
    border-right: 1px solid #f1f5f9;
    padding-right: 1.5rem;
}

.meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.meta-details {
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
}

.meta-details p {
    margin-bottom: 0.4rem;
}

.text-alert {
    color: #dc2626;
    font-weight: bold;
}

/* Timeline */
.consultation-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    max-height: 180px;
    overflow-y: auto;
    padding-left: 0.5rem;
}

.timeline-item {
    position: relative;
    padding-left: 1.2rem;
    border-left: 1.5px solid var(--border-cream);
    font-size: 0.82rem;
    padding-bottom: 0.5rem;
}

.timeline-dot {
    position: absolute;
    left: -5.5px;
    top: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--accent-olive);
    border: 1.5px stroke #fff;
}

.timeline-time {
    color: var(--text-cream-muted);
    margin-bottom: 0.2rem;
}

/* Trend Chart */
.trend-chart-panel {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.svg-chart-container {
    width: 100%;
    height: 190px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    font-size: 0.78rem;
    color: var(--text-cream-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-color {
    width: 12px;
    height: 6px;
    border-radius: 3px;
    display: inline-block;
}

.legend-color.sbp { background-color: #b45309; }
.legend-color.dbp { background-color: #65a30d; }

/* Survey detail list */
.survey-detail-panel {
    border-left: 1px solid #f1f5f9;
    padding-left: 1.5rem;
}

.survey-detail-list {
    list-style: none;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    font-size: 0.85rem;
}

.survey-detail-list li {
    padding: 0.6rem;
    background-color: #fafaf9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

/* Statistics Reports layout */
.reports-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    min-height: 250px;
}

.reports-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-right: 1px solid #f1f5f9;
    padding-right: 1rem;
}

.report-select-btn {
    text-align: left;
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-cream-muted);
    transition: all 0.2s ease;
}

.report-select-btn:hover {
    background-color: #f5f5f4;
    color: var(--text-charcoal);
}

.report-select-btn.active {
    background-color: #f7fee7;
    border-color: #d9f99d;
    color: var(--accent-olive);
}

.report-view-panel {
    padding: 0.5rem;
}

.report-header {
    margin-bottom: 1.2rem;
}

.report-header p {
    font-size: 0.88rem;
    color: var(--text-cream-muted);
}

/* ========================================================================== */
/* 🤖 AI Smart Mapping Modal Styles                                            */
/* ========================================================================== */
.cream-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(45, 55, 72, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.cream-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cream-modal-card {
    background-color: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    width: 95%;
    max-width: 580px;
    box-shadow: 0 20px 40px -15px rgba(46, 37, 26, 0.15);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cream-modal-overlay.active .cream-modal-card {
    transform: translateY(0);
}

.cream-modal-header {
    background-color: #fafaf9;
    border-bottom: 1px solid #cbd5e1;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cream-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.cream-modal-body {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.ai-log-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.8rem;
    color: #475569;
    margin-top: 0.8rem;
    max-height: 150px;
    overflow-y: auto;
    line-height: 1.4;
}

.ai-log-entry {
    margin-bottom: 0.4rem;
}

.ai-log-entry.fix {
    color: #b45309;
}

.ai-log-entry.success {
    color: #15803d;
}

.cream-modal-footer {
    background-color: #fafaf9;
    border-top: 1px solid #cbd5e1;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

/* Modal Button Color Overrides to prevent white-on-white scoping issues */
.cream-modal-card .cream-btn.primary {
    background-color: #65a30d !important;
    color: #ffffff !important;
}

.cream-modal-card .cream-btn.primary:hover {
    background-color: #4d7c0f !important;
}

.cream-modal-card .cream-btn.outline {
    background-color: transparent !important;
    border-color: #cbd5e1 !important;
    color: #2d3748 !important;
}

.cream-modal-card .cream-btn.outline:hover {
    background-color: #f5f5f4 !important;
    border-color: #2d3748 !important;
}

/* ========================================================================== */
/* 🧠 AI Workload & Exposure Index, Co-Pilot, and Reasoning Console Styles     */
/* ========================================================================== */

.ai-exposure-card {
    background: linear-gradient(135deg, #fefbf6 0%, #fafaf9 100%);
    border: 1px solid #e2e8f0;
    border-left: 4px solid #65a30d;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.ai-exposure-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 0.78rem;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.ai-copilot-container {
    background-color: #fafaf9;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.ai-copilot-header {
    background-color: #f5f5f4;
    border-bottom: 1px solid #cbd5e1;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: bold;
    color: #4a5568;
}

.ai-copilot-chat {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.ai-bubble {
    max-width: 90%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.82rem;
    line-height: 1.45;
    position: relative;
}

.ai-bubble-agent {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #064e3b;
    align-self: flex-start;
    border-top-left-radius: 2px;
}

.ai-reasoning-console {
    background-color: #1e1e1e;
    border: 1px solid #334155;
    border-radius: 6px;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    color: #34d399;
    padding: 0.8rem;
    margin-top: 0.8rem;
    font-size: 0.75rem;
    line-height: 1.45;
    display: none;
    max-height: 180px;
    overflow-y: auto;
    text-align: left;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
}

.ai-console-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.76rem;
    color: #2563eb;
    font-weight: 500;
    text-decoration: underline;
    margin-top: 0.5rem;
}

.ai-console-toggle:hover {
    color: #1d4ed8;
}

.compliance-disclaimer {
    font-size: 0.72rem;
    color: #94a3b8;
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    border-top: 1px dashed #cbd5e1;
    line-height: 1.5;
}

/* ========================================================================== */
/* SaaS Left Navigation Sidebar & View Layout Scopes                          */
/* ========================================================================== */
.nurse-dashboard-layout {
    display: flex;
    min-height: 800px;
    background-color: var(--bg-cream);
    border-radius: 8px;
    overflow: hidden;
}

.nurse-sidebar {
    width: 250px;
    background-color: #ffffff;
    border-right: 1px solid var(--border-cream);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 1.5rem 1rem;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 1.5rem;
}

.sidebar-logo .logo-icon {
    font-size: 2rem;
}

.sidebar-logo h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-charcoal);
}

.sidebar-logo p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-cream-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.8rem 1rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-cream-muted);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.sidebar-nav-item:hover {
    background-color: #fafaf9;
    color: var(--text-charcoal);
}

.sidebar-nav-item.active {
    background-color: #f7fee7;
    color: var(--accent-olive);
    border-left-color: var(--accent-olive);
}

.nurse-main-content {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
    background-color: var(--bg-cream);
}

.nurse-subview {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nurse-subview.active {
    display: block;
    opacity: 1;
}

/* Updated Ouro AI Copilot Panel Styles */
.ai-copilot-container {
    background-color: #ffffff;
    border: 1px solid var(--border-cream);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(46, 37, 26, 0.03);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-copilot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.8rem;
    font-weight: 700;
    color: var(--text-charcoal);
    font-size: 0.95rem;
}

.ai-copilot-recommendation-box {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 1.2rem;
    color: #14532d;
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: left;
}

.ai-copilot-recommendation-box h4 {
    color: #14532d !important;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ai-copilot-recommendation-box ul {
    margin: 0.5rem 0;
    padding-left: 1.2rem;
}

.ai-copilot-recommendation-box li {
    margin-bottom: 0.4rem;
}

.ai-copilot-recommendation-box strong {
    color: #166534;
}

.ai-copilot-btn-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.ai-copilot-btn-group .cream-btn {
    flex: 1;
    font-size: 0.82rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
}

.ai-copilot-btn-group .cream-btn.primary {
    background-color: #65a30d;
    color: #ffffff;
    border: none;
}

.ai-copilot-btn-group .cream-btn.primary:hover {
    background-color: #4d7c0f;
}

.ai-copilot-btn-group .cream-btn.outline {
    background-color: #ffffff;
    border: 1px solid var(--border-cream);
    color: var(--text-charcoal);
}

.ai-copilot-btn-group .cream-btn.outline:hover {
    background-color: #fafaf9;
    border-color: var(--text-charcoal);
}

/* Floating Action Card Hover Transitions */
.cta-action-card .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.25);
    filter: brightness(1.1);
}
.cta-action-card .outline-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
    color: var(--text-primary) !important;
}
body.dark-theme .cta-action-card .outline-btn:hover {
    background: rgba(255, 255, 255, 0.02);
}
/* Layout Switcher Accordion Styles */
#intro-cards-container.layout-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}
#intro-cards-container.layout-accordion .intro-card {
    display: block;
    padding: 1.2rem 1.5rem;
}
#intro-cards-container.layout-accordion .intro-card .accordion-icon {
    display: inline-block !important;
    transition: transform 0.3s;
}
#intro-cards-container.layout-accordion .intro-card.active .accordion-icon {
    transform: rotate(180deg);
}
#intro-cards-container.layout-accordion .intro-card .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, margin-top 0.3s;
    margin-top: 0;
    opacity: 0;
}
#intro-cards-container.layout-accordion .intro-card.active .accordion-content {
    max-height: 800px;
    margin-top: 1rem;
    opacity: 1;
}
