/* Global styles for the IFC viewer application - Aligned with PAGE_STYLING_GUIDE.md */

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #1e293b;
    --background-color: #f9fafb;
    --text-color: #111827;
    --border-color: #d1d5db;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    
    /* Dark mode colors - Standardized */
    --dark-bg: #0f172a;
    --dark-bg-secondary: #1e293b;
    --dark-text: #ffffff;
    --dark-text-secondary: #9ca3af;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

#app {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.viewer-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: #e8e8e8;
}

.controls {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 100;
    min-width: 280px;
    backdrop-filter: blur(10px);
}

.controls h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: var(--secondary-color);
}

.file-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.controls input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    background-color: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.controls input[type="file"]:hover {
    border-color: var(--primary-color);
}

.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.controls button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex: 1;
    min-width: 100px;
}

.controls button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.controls button:active {
    transform: translateY(0);
}

.controls button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    z-index: 200;
    backdrop-filter: blur(10px);
}

.loading h3 {
    margin: 0 0 1rem 0;
    color: var(--secondary-color);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    color: #e74c3c;
    background-color: #fadbd8;
    padding: 1rem;
    margin: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid #e74c3c;
    font-weight: 500;
}

.success {
    color: #27ae60;
    background-color: #d5f4e6;
    padding: 1rem;
    margin: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid #27ae60;
    font-weight: 500;
}

.info-panel {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 100;
    max-width: 300px;
    backdrop-filter: blur(10px);
}

.info-panel h4 {
    margin: 0 0 0.5rem 0;
    color: var(--secondary-color);
}

.info-panel p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Three.js canvas styling */
canvas {
    display: block;
    outline: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 1.4rem;
    }
    
    .controls {
        position: relative;
        top: 0;
        left: 0;
        margin: 1rem;
        min-width: auto;
    }
    
    .info-panel {
        position: relative;
        top: 0;
        right: 0;
        margin: 1rem;
        max-width: none;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .controls button {
        min-width: auto;
    }
}

/* Animation for smooth transitions */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}/* MokuLab.io Navigation and Blue/Grey Theme Styles - Consistent with hawaii.mokunet.us */

/* CSS Variables - Aligned with PAGE_STYLING_GUIDE.md */
:root {
    /* Primary Color Palette - Standardized */
    --blue-primary: #1e3a8a;
    --blue-secondary: #3b82f6;
    --blue-light: #60a5fa;
    --blue-bg: #eff6ff;
    --blue-accent: #2563eb;
    
    /* Grey/Slate Palette - Standardized for Dark Mode */
    --grey-primary: #374151;
    --grey-secondary: #6b7280;
    --grey-light: #9ca3af;
    --grey-bg: #f3f4f6;
    --grey-accent: #4b5563;
    
    /* Dark Mode Colors - Matching PAGE_STYLING_GUIDE.md */
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    
    /* Service Status Colors */
    --status-active: #059669;
    --status-development: #d97706;
    --status-planning: #2563eb;
    
    /* UI Colors - Standardized */
    --primary-blue: #1e293b;
    --secondary-blue: #3b82f6;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-light: #6b7280;
    --text-on-dark: #ffffff;
    --text-on-dark-secondary: #e5e7eb;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-light: #d1d5db;
    --shadow-light: rgba(0,0,0,0.1);
    --shadow-medium: rgba(0,0,0,0.2);
    
    /* Animation Variables */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Global Resets and Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
}

#app {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Navigation Header Styles - Ultra-Compact Tab Layout */
.mokulab-main-navigation {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 1px 3px var(--shadow-light);
    position: relative;
    z-index: 100;
}

.tab-bar {
    display: flex;
    align-items: center;
    height: 36px; /* Ultra-compact height - like VS Code tabs */
    padding: 0 1rem;
    gap: 0.5rem;
}

/* Inline Brand */
.tab-bar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-right: 1rem;
}

.tab-logo {
    height: 45px;
    width: 100px;
    border-radius: 4px;
}

.tab-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-on-dark);
    white-space: nowrap;
}

/* Horizontal Tab Container */
.tab-container {
    display: flex;
    flex: 1;
    height: 100%;
    align-items: stretch;
}

/* Ultra-Compact Horizontal Tabs */
.horizontal-tab {
    background: rgba(255,255,255,0.05);
    border-right: 1px solid rgba(255,255,255,0.1);
    padding: 0 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
    min-width: 140px;
    position: relative;
    color: var(--text-on-dark-secondary);
    font-size: 0.85rem;
}

.horizontal-tab:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.horizontal-tab:last-child {
    border-right: none;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.horizontal-tab:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-on-dark);
    transform: translateY(-1px);
}

.horizontal-tab:active {
    transform: scale(0.98);
}

.horizontal-tab.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--text-on-dark);
    border-bottom: 2px solid var(--blue-secondary);
    font-weight: 500;
}

.horizontal-tab.development {
    border-bottom: 2px solid transparent;
}

.horizontal-tab.development.active {
    background: rgba(215, 150, 6, 0.15);
    border-bottom: 2px solid var(--status-development);
}

/* Tab Content */
.h-tab-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.h-tab-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.h-tab-status {
    font-size: 0.8rem;
    opacity: 0.8;
    flex-shrink: 0;
}

/* Tab Bar Actions */
.tab-bar-actions {
    flex-shrink: 0;
    margin-left: 0.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.tab-admin-btn {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-on-dark);
    height: 32px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.tab-admin-btn:hover {
    background: rgba(59, 130, 246, 0.35);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.tab-admin-icon {
    font-size: 0.95rem;
}

.tab-admin-text {
    font-size: 0.85rem;
}

.tab-info-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-on-dark-secondary);
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-info-btn:hover {
    background: rgba(255,255,255,0.2);
    color: var(--text-on-dark);
}

.tab-info-icon {
    font-size: 0.9rem;
}

/* Legacy Tab Styles (kept for compatibility) */

.service-tab {
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-medium);
    border: 2px solid rgba(255,255,255,0.2);
    min-width: 280px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    color: var(--text-on-dark);
}

.service-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--transition-medium);
}

.service-tab:hover::before {
    left: 100%;
}

.service-tab:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    color: var(--text-on-dark);
}

.service-tab.active {
    border-color: var(--green-secondary);
    background: rgba(76, 175, 80, 0.25);
    color: var(--text-on-dark);
}

.service-tab.development {
    border-color: var(--status-development);
    background: rgba(255, 152, 0, 0.2);
    color: var(--text-on-dark);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.service-icon {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.25);
    border-radius: 8px;
    color: var(--text-on-dark);
}

.service-info {
    flex: 1;
}

.service-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-on-dark);
}

.service-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-top: 0.2rem;
    color: var(--text-on-dark-secondary);
}

.status-icon {
    font-size: 1rem;
}

.service-description {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-on-dark-secondary);
    line-height: 1.4;
}

.workflow-hint {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    font-size: 0.8rem;
    font-style: italic;
    color: var(--text-on-dark);
    border: 1px solid rgba(255,255,255,0.1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-btn {
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.4);
    color: var(--text-on-dark);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.info-btn:hover {
    background: rgba(255,255,255,0.35);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-1px);
    color: var(--text-on-dark);
}

.info-icon {
    font-size: 1.1rem;
    font-weight: bold;
}

/* Workflow Indicator */
.workflow-indicator {
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.integrated-workflow {
    text-align: center;
}

.workflow-title {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.8rem;
    display: block;
}

.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.workflow-step {
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
}

.workflow-step:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

.workflow-step.active-step {
    background: var(--green-secondary);
    border-color: var(--green-secondary);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
}

.workflow-arrow {
    color: rgba(255,255,255,0.6);
    font-size: 1.2rem;
    font-weight: bold;
}

/* Service Container Styles - Full Screen Focus */
#service-container {
    flex: 1;
    overflow: auto;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
}

.service-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.service-container.full-screen {
    height: 100%;
    max-height: none;
    padding: 0;
}

/* Compact Service Header */
.service-header.compact {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px var(--shadow-light);
    z-index: 100;
}

.service-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.service-title-bar h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
}

.service-main-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Inline Controls for Compact Layout */
.viewer-controls-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-input-compact {
    padding: 0.6rem;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 200px;
}

.primary-btn-compact,
.secondary-btn-compact {
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.primary-btn-compact {
    background: var(--green-secondary);
    color: var(--text-on-dark);
    border: none;
}

.primary-btn-compact:hover {
    background: var(--green-primary);
    transform: translateY(-1px);
}

.secondary-btn-compact {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.secondary-btn-compact:hover {
    border-color: var(--green-secondary);
    background: var(--green-bg);
}

/* Full Height Content Areas */
.viewer-container.full-height {
    flex: 1;
    height: auto;
    min-height: 0;
    margin: 0;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border-light);
    background: #f0f0f0;
}

/* Service Status Bar */
.service-status-bar {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
}

.workflow-hint-compact {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
}

/* Legacy Service Container Styles for Compatibility */
.service-container:not(.full-screen) {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100%;
}

.service-hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow-light);
}

.service-hero h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    font-weight: 700;
}

.service-hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

/* Workflow Context Indicators */
.service-workflow-context {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--green-bg) 0%, #f8f9fa 100%);
    border-radius: 12px;
    border-left: 4px solid var(--green-secondary);
}

.workflow-step-indicator {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--green-secondary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--green-primary);
    margin: 0;
}

.workflow-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex: 1;
    line-height: 1.4;
}

/* IFC Viewer Service Styles */
.viewer-controls {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px var(--shadow-light);
    margin-bottom: 2rem;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.file-input {
    width: 100%;
    padding: 1rem;
    border: 2px dashed var(--border-light);
    border-radius: 8px;
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.file-input:hover {
    border-color: var(--green-secondary);
    background: var(--green-bg);
}

.control-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.primary-btn {
    background: var(--green-secondary);
    color: var(--text-on-dark);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.primary-btn:hover {
    background: var(--green-primary);
    color: var(--text-on-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.secondary-btn {
    background: var(--bg-white);
    color: var(--text-primary);
    border: 2px solid var(--border-light);
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.secondary-btn:hover {
    border-color: var(--green-secondary);
    background: var(--green-bg);
    color: var(--green-primary);
}

.btn-icon {
    font-size: 1.1rem;
}

/* Viewer Container */
.viewer-container {
    width: 100%;
    height: 500px;
    background: var(--bg-white);
    border-radius: 12px;
    border: 2px solid var(--border-light);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* Service Status */
.service-status {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px var(--shadow-light);
    margin-bottom: 2rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.status-indicator.active .status-icon {
    color: var(--status-active);
}

.status-text {
    font-weight: 600;
    font-size: 1.1rem;
}

.service-description {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Integration Hint */
.integration-hint {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #ffeaa7;
}

.hint-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.hint-icon {
    font-size: 1.3rem;
}

.hint-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #856404;
    margin: 0;
}

.integration-hint p {
    margin: 0;
    color: #856404;
    line-height: 1.5;
}

/* bSDD Authoring Service Styles */
.development-status {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px var(--shadow-light);
    margin-bottom: 2rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.status-badge.development {
    background: rgba(255, 152, 0, 0.2);
    color: #d84315;
    border: 2px solid rgba(255, 152, 0, 0.4);
    font-weight: 700;
}

.badge-icon {
    font-size: 1.1rem;
}

.development-info h4 {
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-light);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.feature-text {
    flex: 1;
    color: var(--text-secondary);
}

/* Lifecycle Stages */
.prototype-preview {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px var(--shadow-light);
    margin-bottom: 2rem;
}

.prototype-preview h4 {
    text-align: center;
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.lifecycle-stages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    min-width: 150px;
    transition: all var(--transition-medium);
    cursor: pointer;
    border: 2px solid transparent;
}

.stage:hover {
    transform: translateY(-2px);
}

.stage.experimental {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border-color: #1976d2;
}

.stage.experimental.active {
    box-shadow: 0 0 20px rgba(25, 118, 210, 0.4);
}

.stage.development {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
    color: #ef6c00;
    border-color: #f57c00;
}

.stage.production {
    background: linear-gradient(135deg, var(--green-bg) 0%, var(--green-light) 100%);
    color: var(--green-primary);
    border-color: var(--green-secondary);
}

.stage-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stage-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.stage-desc {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.stage-arrow {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: bold;
}

/* API Integration Preview */
.api-integration-preview {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px var(--shadow-light);
    margin-bottom: 2rem;
}

.api-integration-preview h4 {
    text-align: center;
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.integration-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.integration-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    min-width: 100px;
    text-align: center;
}

.step-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.flow-arrow {
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: bold;
}

.api-status {
    text-align: center;
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.api-indicator.pending {
    font-size: 1.2rem;
}

.api-text {
    color: #856404;
    font-weight: 500;
}

/* Return Button */
.return-to-ifc {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.return-btn {
    background: var(--secondary-blue);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.return-btn:hover {
    background: var(--primary-blue);
    transform: translateY(-1px);
}

.return-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--green-secondary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* bSDD Authoring Workspace Styles */
.authoring-workspace.full-height {
    flex: 1;
    display: flex;
    overflow-y: auto;
}

.workspace-sidebar {
    width: 300px;
    background: var(--bg-white);
    border-right: 1px solid var(--border-light);
    padding: 1.5rem;
    overflow-y: auto;
}

.workspace-main {
    flex: 1;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.authoring-area {
    flex: 1;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
    max-width: 600px;
    padding: 3rem;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-light);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.placeholder-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.placeholder-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 1rem;
}

.section-header h4 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.feature-list.compact {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.feature-list.compact li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

.feature-list.compact li:last-child {
    border-bottom: none;
}

.feature-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.lifecycle-stages.compact {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stage {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 6px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    font-size: 0.9rem;
}

.stage.active {
    border-color: var(--green-secondary);
    background: var(--green-bg);
}

.stage-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stage-title {
    font-weight: 500;
}

.development-status-inline {
    display: flex;
    align-items: center;
}

.api-integration-preview {
    margin-top: 2rem;
}

.integration-flow.compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 6px;
}

.api-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-top: 1rem;
    padding: 0.8rem;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.api-indicator.pending {
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .nav-tabs {
        gap: 0.3rem;
    }
    
    .nav-tab {
        min-width: 160px;
        padding: 0.7rem 1rem;
    }
    
    .workspace-sidebar {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .tab-bar {
        height: 40px; /* Slightly taller for mobile touch targets */
        padding: 0 0.5rem;
        flex-wrap: wrap;
    }
    
    .tab-bar-brand {
        margin-right: 0.5rem;
    }
    
    .tab-title {
        font-size: 0.8rem;
    }
    
    .tab-container {
        flex-wrap: wrap;
    }
    
    .horizontal-tab {
        min-width: 120px;
        padding: 0 0.8rem;
        font-size: 0.8rem;
    }
    
    .h-tab-title {
        font-size: 0.8rem;
    }
    
    .service-title-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .viewer-controls-inline {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .file-input-compact {
        flex: 1;
        min-width: 200px;
    }
    
    .authoring-workspace.full-height {
        flex-direction: column;
    }
    
    .workspace-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        max-height: 200px;
    }
}
    
    .nav-main-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .nav-services {
        flex-direction: column;
    }
    
    .service-tab {
        min-width: auto;
    }
    
    .workflow-steps {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
    }
    
    .service-container {
        padding: 1rem;
    }
    
    .service-hero h2 {
        font-size: 2rem;
    }
    
    .control-actions {
        flex-direction: column;
    }
    
    .lifecycle-stages {
        flex-direction: column;
    }
    
    .stage-arrow {
        transform: rotate(90deg);
    }
    
    .integration-flow {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .nav-title {
        font-size: 1.2rem;
    }
    
    .nav-tab {
        min-width: 120px;
        padding: 0.6rem 0.8rem;
    }
    
    .tab-title {
        font-size: 0.85rem;
    }
    
    .tab-status {
        font-size: 0.7rem;
    }
    
    .service-hero h2 {
        font-size: 1.8rem;
    }
    
    .service-hero p {
        font-size: 1rem;
    }
}

/* Additional Accessibility & Contrast Improvements */
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"] {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

textarea:focus,
input:focus {
    outline: none;
    border-color: var(--green-secondary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Content Area Contrast */
.content-area {
    background: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.6;
}

.text-muted {
    color: var(--text-secondary) !important;
}

.text-light {
    color: var(--text-light) !important;
}

/* High contrast for important text */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

/* Error and success states */
.text-error {
    color: #c62828 !important;
}

.text-success {
    color: var(--green-primary) !important;
}

.text-warning {
    color: #d84315 !important;
}

/* Dark Theme for Green Building Authoring */
.dark-theme {
    background: #1a1a1a;
    color: #e5e5e5;
}

.dark-theme .service-header.dark {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-bottom: 1px solid #4a5568;
}

.dark-theme .service-title-bar h2 {
    color: var(--text-on-dark);
}

.dark-theme .service-main-title {
    color: var(--text-on-dark);
}

.dark-theme .status-badge.development {
    background: rgba(215, 150, 6, 0.2);
    border: 1px solid rgba(215, 150, 6, 0.4);
    color: #fbbf24;
}

/* Simplified Authoring Workspace */
.authoring-workspace-simplified.dark {
    background: var(--slate-900);
    padding: 2rem;
    min-height: 100%;
    overflow-y: auto;
}

.workspace-main-centered {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Primary Lifecycle Controls - Reduced Card Size */
.lifecycle-controls-primary {
    background: var(--slate-800);
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid var(--slate-700);
}

.section-header.dark h3 {
    color: var(--text-on-dark);
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.section-subtitle {
    color: var(--gray-400);
    margin: 0 0 1.5rem 0;
    font-size: 0.875rem;
}

/* Horizontal Lifecycle Stages */
.lifecycle-stages-horizontal {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.stage.dark {
    background: var(--slate-700);
    border: 1px solid var(--slate-600);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all var(--transition-medium);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-width: 150px;
    text-align: center;
}

.stage.dark:hover {
    background: var(--slate-600);
    border-color: var(--blue-secondary);
    transform: translateY(-2px);
}

.stage.dark.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--blue-secondary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.stage-icon {
    font-size: 1.5rem;
    display: block;
}

.stage-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stage-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-on-dark);
}

.stage-description {
    font-size: 0.75rem;
    color: var(--gray-400);
    line-height: 1.3;
}

/* Main Authoring Area - Reduced Card Size */
.authoring-area-main.dark {
    background: var(--slate-800);
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid var(--slate-700);
    text-align: center;
}

.main-content-dark {
    max-width: 600px;
    margin: 0 auto;
}

.content-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.main-content-dark h3 {
    color: var(--text-on-dark);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.main-content-dark p {
    color: var(--gray-400);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* API Integration Preview - Dark */
.api-integration-preview.dark {
    background: var(--slate-900);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--slate-700);
}

.api-integration-preview.dark h4 {
    color: var(--text-on-dark);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.integration-flow-dark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: var(--slate-700);
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--slate-600);
    min-width: 100px;
}

.step-icon {
    font-size: 1.25rem;
}

.step-text {
    font-size: 0.8rem;
    color: var(--text-on-dark);
    font-weight: 500;
}

.flow-arrow {
    color: var(--blue-secondary);
    font-size: 1.5rem;
    font-weight: bold;
}

.api-status.dark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: var(--gray-400);
    font-size: 0.875rem;
}

/* Service Status Bar - Dark */
.service-status-bar.dark {
    background: var(--slate-800);
    border-top: 1px solid var(--slate-700);
    padding: 0.875rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-indicator.development.dark {
    color: #fbbf24;
}

.workflow-hint-compact.dark {
    color: var(--gray-400);
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .lifecycle-stages-horizontal {
        flex-direction: column;
        align-items: center;
    }
    
    .stage.dark {
        min-width: 250px;
    }
    
    .integration-flow-dark {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
}
/* ========================================
    IFC Transforms - Systems Mapping Sidebar Layout
   ======================================== */

/* Transforms Workspace - Split Layout */
.transforms-workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    height: calc(100vh - 140px);
}

.viewer-main-area {
    flex: 1;
    position: relative;
    background: var(--bg-light);
    transition: margin-right 0.3s ease;
}

.iot-sidebar {
    width: 400px;
    background: var(--bg-white);
    border-left: 2px solid var(--border-light);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, width 0.3s ease;
    position: relative;
    z-index: 10;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.05);
}

.iot-sidebar.collapsed {
    transform: translateX(100%);
}

.sidebar-header {
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-secondary) 100%);
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-icon {
    font-size: 1.25rem;
}

.sidebar-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.sidebar-section {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
}

.section-header-small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.section-header-small h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-icon {
    font-size: 1.1rem;
}

.info-content, .mapping-content, .properties-content {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.empty-state {
    color: var(--gray-400);
    font-style: italic;
    margin: 0.5rem 0;
    text-align: center;
    padding: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-very-light);
}

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

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

.info-value {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: right;
    word-break: break-word;
}

.mapping-item {
    background: white;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-light);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mapping-item:hover {
    border-color: var(--blue-primary);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.1);
}

.mapping-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.mapping-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.mapping-badge {
    background: var(--blue-bg);
    color: var(--blue-primary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.mapping-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.property-set {
    margin-bottom: 1rem;
}

.property-set-header {
    background: var(--blue-bg);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--blue-primary);
    margin-bottom: 0.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.property-set-header:hover {
    background: var(--blue-secondary);
    color: white;
}

.property-list {
    padding-left: 0.5rem;
}

.property-item {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border-very-light);
}

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

.property-name {
    color: var(--text-primary);
    font-weight: 500;
}

.property-value {
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
}

@media (max-width: 1200px) {
    .iot-sidebar { width: 350px; }
}

@media (max-width: 768px) {
    .iot-sidebar {
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        width: 90%;
        max-width: 400px;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
    }
    .viewer-main-area { margin-right: 0; }
}

/* ========================================
    IFC Processing - Workspace Layout
   ======================================== */

/* Processing Workspace - Split Layout */
.processing-workspace {
    display: flex;
    flex: 1;
    overflow: auto;
    position: relative;
    min-height: 0;
}

.processing-main-area {
    flex: 1;
    position: relative;
    background: var(--slate-900);
    overflow-y: auto;
    padding: 0;
}

.processing-sidebar {
    width: 350px;
    background: var(--slate-800);
    border-left: 2px solid var(--slate-700);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.processing-sidebar.collapsed {
    width: 0;
    min-width: 0;
    border-left: none;
    overflow: hidden;
}

.ifc-processing-service .service-header.compact {
    background: var(--slate-800);
    border-bottom: 1px solid var(--slate-700);
}

.ifc-processing-service .service-title-bar h3 {
    color: var(--text-on-dark);
}

.ifc-processing-service .service-status-bar {
    background: var(--slate-800);
    border-top: 1px solid var(--slate-700);
}

.ifc-processing-service .service-status-bar .status-indicator {
    color: var(--gray-400);
}

.ifc-processing-service .service-status-bar .workflow-hint-compact {
    color: var(--gray-400);
}

@media (max-width: 1200px) {
    .processing-sidebar { width: 350px; }
}

@media (max-width: 768px) {
    .processing-sidebar {
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        width: 90%;
        max-width: 400px;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
    }
    .processing-main-area { margin-right: 0; }
}
/* MokuLab.io Info Modal Styles */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 2000;
    backdrop-filter: blur(5px);
    padding: 2rem;
    overflow-y: auto;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 16px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, var(--green-bg) 0%, #f8f9fa 100%);
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--green-primary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.modal-logo {
    font-size: 2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

/* Modal Body */
.modal-body {
    padding: 0;
}

.modal-section {
    padding: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-section:last-child {
    border-bottom: none;
}

.modal-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Service Overview Section */
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.service-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    transition: all var(--transition-medium);
    border: 2px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-light);
    transition: all var(--transition-medium);
}

.service-card.active-service::before {
    background: var(--green-secondary);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.service-card.development-service::before {
    background: var(--status-development);
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.3);
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-light);
}

.service-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.service-card .service-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--bg-light);
    color: var(--text-primary);
    box-shadow: 0 2px 8px var(--shadow-light);
    border: 1px solid var(--border-light);
}

.service-title-group {
    flex: 1;
}

.service-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.service-card .service-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.service-status.active {
    color: var(--status-active);
}

.service-status.development {
    color: var(--status-development);
}

.service-card .service-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
}

.feature-item .feature-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: var(--green-secondary);
}

/* Workflow Section */
.workflow-visualization {
    max-width: 600px;
    margin: 0 auto;
}

.workflow-step {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
    transition: all var(--transition-medium);
    border-left: 4px solid var(--border-light);
}

.workflow-step:hover {
    background: var(--bg-white);
    border-left-color: var(--green-secondary);
    transform: translateX(4px);
}

.step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.step-circle.step-1 {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
}

.step-circle.step-2 {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.step-circle.step-3 {
    background: linear-gradient(135deg, var(--green-secondary), var(--green-primary));
}

.step-circle.step-4 {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.step-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.workflow-connector {
    text-align: center;
    font-size: 2rem;
    color: var(--text-light);
    margin: 0.5rem 0;
}

/* Experimental Focus Section */
.experimental-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.experimental-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all var(--transition-medium);
    border: 2px solid transparent;
}

.experimental-item:hover {
    background: var(--bg-white);
    border-color: var(--green-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-light);
}

.experimental-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.experimental-item h4 {
    margin: 0 0 0.8rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.experimental-item p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.experimental-note {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--green-bg) 0%, #e8f5e8 100%);
    border-radius: 12px;
    border: 1px solid var(--green-light);
}

.note-icon {
    font-size: 1.5rem;
    color: var(--green-secondary);
    flex-shrink: 0;
}

.experimental-note p {
    margin: 0;
    color: var(--green-primary);
    line-height: 1.6;
}

/* Organization Section */
.organization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.org-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
    transition: all var(--transition-medium);
    border: 2px solid transparent;
}

.org-card:hover {
    background: var(--bg-white);
    border-color: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-light);
}

.org-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    flex-shrink: 0;
}

.org-content {
    flex: 1;
}

.org-content h4 {
    margin: 0 0 0.8rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.org-content p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}

.org-link {
    color: var(--secondary-blue);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color var(--transition-fast);
}

.org-link:hover {
    color: var(--primary-blue);
}

.mission-statement {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 2rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    border: 1px solid #90caf9;
}

.mission-icon {
    font-size: 1.5rem;
    color: var(--secondary-blue);
    flex-shrink: 0;
}

.mission-statement p {
    margin: 0;
    color: var(--primary-blue);
    line-height: 1.6;
    font-weight: 500;
}

/* Technical Details Section */
.tech-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.tech-column {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
}

.tech-column h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tech-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.tech-list li:last-child {
    border-bottom: none;
}

.tech-list strong {
    color: var(--text-primary);
    font-weight: 600;
}

.development-status-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #fff3cd;
    border-radius: 12px;
    border: 1px solid #ffeaa7;
}

.development-status-info .status-icon {
    font-size: 1.5rem;
    color: #856404;
    flex-shrink: 0;
}

.development-status-info p {
    margin: 0;
    color: #856404;
    line-height: 1.6;
}

/* Modal Footer */
.modal-footer {
    padding: 1.5rem 2rem;
    background: var(--bg-light);
    border-radius: 0 0 16px 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: center;
}

.modal-action-btn {
    background: linear-gradient(135deg, var(--green-secondary), var(--green-primary));
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.modal-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 1rem;
        align-items: flex-start;
    }
    
    .modal-content {
        margin-top: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-section {
        padding: 1.5rem;
    }
    
    .service-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .experimental-grid {
        grid-template-columns: 1fr;
    }
    
    .organization-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-columns {
        grid-template-columns: 1fr;
    }
    
    .org-card {
        flex-direction: column;
        text-align: center;
    }
    
    .workflow-step {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .modal-footer {
        padding: 1.5rem;
    }
    
    .modal-action-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modal-header h2 {
        font-size: 1.3rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .step-circle {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .experimental-item {
        padding: 1rem;
    }
    
    .org-card {
        padding: 1.5rem;
    }
    
    .tech-column {
        padding: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .modal-content {
        border: 2px solid;
    }
    
    .service-card {
        border: 1px solid;
    }
    
    .experimental-item {
        border: 1px solid;
    }
}/* Admin Panel Styles */

.admin-panel {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    background: #f5f5f5;
    min-height: 100%;
}

.admin-header {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-header h2 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.admin-subtitle {
    color: #666;
    margin: 0 0 1rem 0;
}

.storage-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border-radius: 6px;
    display: inline-flex;
}

.status-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.status-success { color: #28a745; }
.status-error { color: #dc3545; }
.status-warning { color: #ffc107; }

/* Admin Content */

.admin-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 1200px) {
    .admin-content {
        grid-template-columns: 1fr;
    }
}

.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-section h3 {
    margin: 0 0 1.5rem 0;
    color: #333;
}

/* Upload Form */

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group small {
    color: #666;
    font-size: 0.85rem;
}

.bucket-info {
    background: #f0f8ff;
    border-left: 3px solid #4a90e2;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.bucket-info small {
    color: #2c5aa0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-primary {
    background: #4a90e2;
    color: white;
}

.btn-primary:hover {
    background: #357abd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.upload-progress {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: #4a90e2;
    transition: width 0.3s;
}

#upload-status {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* Models Section */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h3 {
    margin: 0;
}

.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-bar input,
.filter-bar select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.filter-bar input {
    flex: 1;
}

.models-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

.model-card {
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.2s;
}

.model-card:hover {
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

.model-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.model-header h4 {
    margin: 0;
    color: #333;
}

.lod-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.lod-LOD_100 { background: #e3f2fd; color: #1976d2; }
.lod-LOD_200 { background: #f3e5f5; color: #7b1fa2; }
.lod-LOD_300 { background: #e8f5e9; color: #388e3c; }
.lod-LOD_350 { background: #fff3e0; color: #f57c00; }
.lod-LOD_400 { background: #fce4ec; color: #c2185b; }
.lod-LOD_500 { background: #e0f2f1; color: #00796b; }

.model-description {
    color: #666;
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.model-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #666;
}

.meta-icon {
    font-size: 1rem;
}

.model-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #666;
}

.model-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    background: #f0f0f0;
    color: #333;
    transition: all 0.2s;
}

.btn-small:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.btn-delete {
    background: #fee;
    color: #c00;
}

.btn-delete:hover {
    background: #fdd;
}

.empty-state,
.error-state,
.loading-text {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.error-state {
    color: #c00;
}

/* API Test Section */

.api-test-section {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.api-test-section h3 {
    color: white;
    margin: 0 0 0.5rem 0;
}

.section-description {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 1.5rem 0;
    font-size: 0.95rem;
}

.api-config-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.config-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.config-row:last-child {
    border-bottom: none;
}

.config-label {
    font-weight: 600;
    min-width: 120px;
    color: rgba(255, 255, 255, 0.9);
}

.api-config-info code {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #fff;
    font-family: 'Monaco', 'Courier New', monospace;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.status-success {
    background: #28a745;
    color: white;
}

.status-badge.status-error {
    background: #dc3545;
    color: white;
}

.status-badge.status-warning {
    background: #ffc107;
    color: #333;
}

.test-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.test-actions .btn-primary,
.test-actions .btn-secondary {
    flex: 1;
    background: white;
    color: #667eea;
}

.test-actions .btn-primary:hover,
.test-actions .btn-secondary:hover {
    background: #f8f9fa;
}

.test-results {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    color: #333;
}

.test-results h4 {
    margin: 0 0 1rem 0;
    color: #333;
}

.test-output {
    max-height: 400px;
    overflow-y: auto;
}

.test-step {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.test-step strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.test-running {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-style: italic;
}

.test-success {
    color: #28a745;
    font-weight: 500;
    margin: 0.5rem 0;
}

.test-error {
    color: #dc3545;
    font-weight: 500;
    margin: 0.5rem 0;
}

.test-warning {
    color: #ffc107;
    font-weight: 500;
    margin: 0.5rem 0;
}

.test-info {
    color: #17a2b8;
    margin: 0.5rem 0;
    font-style: italic;
}

.test-detail {
    color: #666;
    font-size: 0.9rem;
    margin: 0.25rem 0;
    padding-left: 1.5rem;
}

.test-detail code {
    background: #f0f0f0;
    padding: 0.125rem 0.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
    color: #333;
    font-family: 'Monaco', 'Courier New', monospace;
}

.test-summary {
    background: #e7f3ff;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    border-left: 4px solid #007bff;
}

.test-summary strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #007bff;
}

.test-summary p {
    margin: 0.5rem 0;
}
/* ============================================================
   PackagePanelStyles — Layer rail + brief pane for the public
   project-package viewer. Dark theme, matches the existing
   admin/sidebar palette in NavigationStyles.css without
   reaching into its selectors.
   ============================================================ */

.transforms-workspace {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

/* ------------------------------------------------------------
   Layer rail (left column)
   ------------------------------------------------------------ */

.package-layer-rail {
    width: 260px;
    min-width: 260px;
    background: #0f172a;
    border-right: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    z-index: 5;
}

.layer-rail-root {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.layer-rail-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #0b1220;
    border-bottom: 1px solid #1e293b;
}

.layer-rail-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.75rem 0.25rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.layer-rail-tab:hover:not(.active) {
    background: rgba(148, 163, 184, 0.06);
    color: #cbd5e1;
}

.layer-rail-tab.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
    background: rgba(96, 165, 250, 0.08);
}

.layer-rail-tab.muted .tab-count {
    color: #475569;
}

.layer-rail-tab .tab-label {
    font-size: 0.7rem;
}

.layer-rail-tab .tab-count {
    font-size: 0.65rem;
    font-weight: 500;
    color: #64748b;
    background: rgba(148, 163, 184, 0.08);
    padding: 1px 6px;
    border-radius: 8px;
    min-width: 1.25rem;
    text-align: center;
}

.layer-rail-tab.active .tab-count {
    color: #93c5fd;
    background: rgba(96, 165, 250, 0.15);
}

.layer-rail-search {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #1e293b;
    background: #0b1220;
}

.layer-rail-search input {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.layer-rail-search input:focus {
    border-color: #60a5fa;
}

.layer-rail-search input::placeholder {
    color: #64748b;
}

.layer-rail-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.25rem 0;
}

.layer-rail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 0.12s, border-left-color 0.12s;
    font-size: 0.82rem;
}

.layer-rail-item:hover {
    background: rgba(148, 163, 184, 0.06);
}

.layer-rail-item.selected {
    background: rgba(96, 165, 250, 0.12);
    border-left-color: #60a5fa;
}

.layer-rail-item-name {
    flex: 1;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layer-rail-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.layer-rail-empty,
.layer-rail-empty-state {
    padding: 1.25rem 0.9rem;
    color: #64748b;
    font-size: 0.78rem;
}

.layer-rail-empty-state .empty-state-title {
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
}

.layer-rail-empty-state .empty-state-message {
    color: #64748b;
    line-height: 1.5;
    font-size: 0.72rem;
}

/* ------------------------------------------------------------
   Viewer center column — keep existing .viewer-main-area rules
   from NavigationStyles.css; only override background for the
   dark chrome surrounding it.
   ------------------------------------------------------------ */

.transforms-workspace .viewer-main-area {
    flex: 1;
    min-width: 0;
}

/* ------------------------------------------------------------
   Brief pane (right column)
   ------------------------------------------------------------ */

.package-brief-pane {
    width: 320px;
    min-width: 320px;
    background: #0f172a;
    border-left: 1px solid #1e293b;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-y: auto;
    z-index: 5;
}

.brief-pane-root {
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.brief-pane-empty {
    padding: 1.5rem;
    color: #64748b;
    font-size: 0.85rem;
}

.brief-header {
    border-bottom: 1px solid #1e293b;
    padding-bottom: 0.75rem;
}

.brief-eyebrow {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #60a5fa;
    margin-bottom: 0.25rem;
}

.brief-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.3;
    word-break: break-word;
}

.brief-description {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 0.35rem;
    line-height: 1.5;
}

.brief-description.muted {
    color: #64748b;
    font-style: italic;
}

.brief-section {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.brief-section-title {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.2rem;
}

.brief-row,
.brief-layer-row,
.brief-count-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    padding: 0.15rem 0;
}

.brief-row-label,
.brief-layer-label {
    color: #94a3b8;
}

.brief-row-value,
.brief-layer-value {
    color: #e2e8f0;
    text-align: right;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brief-layer-value.muted,
.brief-count-row.muted {
    color: #64748b;
}

.brief-count-row.muted span {
    color: #64748b;
}

.brief-hint {
    font-size: 0.72rem;
    color: #64748b;
    font-style: italic;
    padding-top: 0.5rem;
    border-top: 1px dashed #1e293b;
}

.brief-footer-note {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.5;
    padding: 0.75rem;
    background: rgba(148, 163, 184, 0.04);
    border-left: 2px solid #334155;
    border-radius: 2px;
}

.brief-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #93c5fd;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    font-family: inherit;
}

.brief-action-btn:hover {
    background: rgba(96, 165, 250, 0.18);
    border-color: rgba(96, 165, 250, 0.55);
    color: #bfdbfe;
}

.brief-action-btn.active {
    background: rgba(96, 165, 250, 0.25);
    border-color: #60a5fa;
    color: #dbeafe;
}

.brief-action-btn i {
    font-size: 0.72rem;
}

/* ------------------------------------------------------------
   Storey filter select (in the service header strip)
   ------------------------------------------------------------ */

.storey-filter-label {
    color: #94a3b8;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.35rem;
}

.storey-filter-select {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: 4px;
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
    font-family: inherit;
    margin-right: 0.5rem;
    cursor: pointer;
    transition: border-color 0.15s;
}

.storey-filter-select:hover,
.storey-filter-select:focus {
    border-color: #60a5fa;
    outline: none;
}

.storey-filter-select option {
    background: #1e293b;
    color: #e2e8f0;
}

/* ------------------------------------------------------------
   Pill row — used in the zone brief card for services, members,
   classifications, and served-by references.
   ------------------------------------------------------------ */

.brief-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.brief-pill {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.18);
    white-space: nowrap;
}

.brief-pill-ref {
    background: rgba(96, 165, 250, 0.1);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.3);
    font-family: monospace;
    font-size: 0.66rem;
}

.brief-pill-classification {
    background: rgba(168, 85, 247, 0.1);
    color: #d8b4fe;
    border-color: rgba(168, 85, 247, 0.3);
    font-family: monospace;
    font-size: 0.66rem;
}

.brief-pill-mode {
    background: rgba(52, 211, 153, 0.1);
    color: #6ee7b7;
    border-color: rgba(52, 211, 153, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.66rem;
}

.brief-muted-text {
    color: #64748b;
    font-size: 0.72rem;
    font-style: italic;
}

/* ------------------------------------------------------------
   Site Context panel (occupies the center column when the
   Site tab is active; sibling of #ifc-transforms-viewer, only
   one is visible at a time).
   ------------------------------------------------------------ */

.transforms-workspace .site-context-panel {
    flex: 1;
    min-width: 0;
    position: relative;
    background: #0b1220;
    display: flex;
    flex-direction: column;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.site-context-panel gmp-map-3d {
    width: 100%;
    height: 100%;
    display: block;
}

.site-context-panel .site-context-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #1e293b;
    background: #0f172a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.site-context-panel .site-context-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
}

.site-context-panel .site-context-subtitle {
    font-size: 0.72rem;
    color: #94a3b8;
    font-family: monospace;
}

.site-context-panel .site-context-model-badge {
    font-size: 0.72rem;
    color: #fca5a5;
    background: rgba(252, 165, 165, 0.08);
    border: 1px solid rgba(252, 165, 165, 0.3);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    margin-top: 0.4rem;
    max-width: fit-content;
}

.site-context-panel .site-context-map-host {
    flex: 1;
    min-height: 0;
    position: relative;
}

.site-context-panel .site-context-fallback {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 1rem;
    text-align: center;
}

.site-context-panel .site-context-fallback-title {
    font-size: 1rem;
    font-weight: 600;
    color: #cbd5e1;
}

.site-context-panel .site-context-fallback-message {
    font-size: 0.82rem;
    color: #94a3b8;
    max-width: 460px;
    line-height: 1.5;
}

.site-context-panel .site-context-fallback-form {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 460px;
    margin-top: 0.5rem;
}

.site-context-panel .site-context-fallback-form input {
    flex: 1;
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 0.55rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s;
}

.site-context-panel .site-context-fallback-form input:focus {
    border-color: #60a5fa;
}

.site-context-panel .site-context-fallback-form button {
    background: rgba(96, 165, 250, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.4);
    color: #93c5fd;
    padding: 0.55rem 1.1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    font-family: inherit;
}

.site-context-panel .site-context-fallback-form button:hover:not(:disabled) {
    background: rgba(96, 165, 250, 0.25);
    border-color: #60a5fa;
    color: #dbeafe;
}

.site-context-panel .site-context-fallback-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.site-context-panel .site-context-fallback-error {
    font-size: 0.78rem;
    color: #f87171;
    min-height: 1.2em;
}

.site-context-panel .site-context-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    text-align: center;
    background: #0b1220;
}

.site-context-panel .site-context-error-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fca5a5;
}

.site-context-panel .site-context-error-detail {
    font-size: 0.8rem;
    color: #94a3b8;
    max-width: 500px;
    line-height: 1.5;
    font-family: monospace;
}

