/* ==========================================================================
   CHEFS CULINAR - GKT NextGen Enterprise Design System
   Corporate Identity: Deep Navy (#002B5C), Royal Blue (#004B99), White & Gold
   Catalog Aesthetic: 2025 Großküchentechnik B2B Standards
   ========================================================================== */

:root {
    /* CHEFS CULINAR Core Brand Palette */
    --chefs-navy: #002b5c;
    --chefs-navy-dark: #001f42;
    --chefs-blue: #004b99;
    --chefs-royal: #005696;
    --chefs-bright-blue: #0073e6;
    --chefs-cyan: #009fe3;
    --chefs-gold: #d97706;
    --chefs-gold-light: #f59e0b;
    --chefs-green: #059669;
    --chefs-green-light: #10b981;
    --chefs-red: #dc2626;
    --chefs-purple: #6d28d9;

    /* Theme: Light Defaults (Clean B2B Editorial) */
    --bg-main: var(--surface-app-bg, #f4f6f9);
    --bg-card: var(--surface-card, #ffffff);
    --bg-card-hover: var(--surface-card-hover, #f8fafc);
    --bg-sidebar: var(--surface-sidebar, #ffffff);
    --border-color: var(--border-subtle, #e2e8f0);
    --border-subtle: var(--border-strong, #cbd5e1);
    --border-focus: var(--border-interactive, var(--chefs-blue));
    
    --text-main: var(--text-primary, #0f172a);
    --text-secondary: var(--text-secondary, #334155);
    --text-muted: var(--text-muted, #64748b);
    --text-bright: var(--text-brand, #004b99);

    /* Unified Typography */
    --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-code: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

    /* Spacing & Radii */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Subtle Shadows for High-End B2B Feel */
    --shadow-sm: 0 1px 2px 0 rgba(0, 43, 92, 0.04);
    --shadow-md: 0 4px 12px -2px rgba(0, 43, 92, 0.06), 0 2px 4px -1px rgba(0, 43, 92, 0.03);
    --shadow-lg: 0 10px 25px -4px rgba(0, 43, 92, 0.08), 0 4px 6px -2px rgba(0, 43, 92, 0.03);
    --shadow-card: 0 2px 8px rgba(0, 43, 92, 0.05);
}

/* Dark Theme Overrides */
body.dark-theme {
    --bg-main: var(--surface-app-bg, #0b1326);
    --bg-card: var(--surface-card, #131e36);
    --bg-card-hover: var(--surface-card-hover, #1c2b4a);
    --bg-sidebar: var(--surface-sidebar, #0f182e);
    --border-color: var(--border-subtle, rgba(255, 255, 255, 0.12));
    --border-subtle: var(--border-strong, rgba(255, 255, 255, 0.20));
    --text-main: var(--text-primary, #f8fafc);
    --text-secondary: var(--text-secondary, #cbd5e1);
    --text-muted: var(--text-muted, #94a3b8);
    --text-bright: var(--text-brand, #38bdf8);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* Modern Thin Scrollbars (Replaces chunky native OS scrollbars) */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
*::-webkit-scrollbar-track {
    background: transparent;
}
*::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}
body.dark-theme * {
    scrollbar-color: #475569 transparent;
}
body.dark-theme *::-webkit-scrollbar-thumb {
    background-color: #475569;
}

body.dark-theme .top-bar {
    background-color: #0d1527;
    border-bottom: 1px solid var(--border-color);
    border-top: 3px solid var(--chefs-cyan);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-theme .brand-logo-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
}

body.dark-theme .brand-title-row h1 {
    color: #ffffff;
}

body.dark-theme .badge-v {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-theme .brand-text .subtitle {
    color: #94a3b8;
}

body.dark-theme .status-pill {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

body.dark-theme .status-pill strong {
    color: #38bdf8;
}

body.dark-theme .currency-selector-box {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

body.dark-theme .currency-selector-box select {
    color: #ffffff;
}

body.dark-theme .currency-selector-box select option {
    background-color: #0f172a;
    color: #ffffff;
}

body.dark-theme .active-project-badge {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-theme .active-project-badge .proj-id {
    color: var(--chefs-cyan);
}

body.dark-theme .active-project-badge .proj-name {
    color: #ffffff;
}

/* Base Reset & Universal Typography Rules */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    height: 100dvh;
    min-height: 100%;
    min-height: -webkit-fill-available;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Ensure Tabular Numbers Everywhere for Metrics, Prices & Technical Data */
.font-mono, 
.metric-value, 
.item-price, 
.stat-val, 
.stat-value, 
.roi-value, 
.cost-row strong, 
.cost-total-row strong,
.data-table td,
.item-spec-table td {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    letter-spacing: -0.01em;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    height: var(--app-dvh, 100dvh);
    max-height: var(--app-dvh, 100dvh);
    min-height: 0;
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
}

/* ==========================================================================
   Top Navigation Header - CHEFS CULINAR Clean AI Studio
   ========================================================================== */
.top-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 8px 24px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    border-top: 3px solid var(--chefs-navy);
    color: var(--text-main);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    z-index: 100;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-self: start;
}

.brand-logo-card {
    background: transparent;
    padding: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    border: none;
    height: 32px;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.brand-logo-card:hover {
    opacity: 0.9;
}

.brand-logo-img {
    height: 28px;
    width: auto;
    max-width: 170px;
    display: block;
    object-fit: contain;
}

.brand-studio-divider {
    width: 1px;
    height: 18px;
    background-color: #cbd5e1;
}

.brand-studio-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.studio-name {
    font-family: 'Montserrat', 'Plus Jakarta Sans', var(--font-sans);
    font-size: 14.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #005192;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    transform: translateY(2.5px);
}

body.dark-theme .studio-name {
    color: #38bdf8;
}

.badge-env {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-dev {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.badge-stage {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.2);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

.collab-avatars-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    transition: all 0.15s ease;
}

.collab-avatars-badge:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

body.dark-theme .collab-avatars-badge {
    background: #1e293b;
    border-color: #334155;
}

.collab-avatars-badge .avatar-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #ffffff;
}

.collab-avatars-badge .av-blue { background: #0284c7; }
.collab-avatars-badge .av-green { background: #16a34a; }
.collab-avatars-badge .av-gold { background: #d97706; }

.collab-avatars-badge .live-count {
    font-size: 11px;
    font-weight: 700;
    color: #0f172a;
    margin-left: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

body.dark-theme .collab-avatars-badge .live-count {
    color: #34d399;
}

.btn-revision-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-revision-badge:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

body.dark-theme .btn-revision-badge {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-icon:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.active-project-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
}

.active-project-badge:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.active-project-badge .proj-id {
    font-size: 11px;
    font-weight: 700;
    color: var(--chefs-royal);
}

.active-project-badge .proj-name {
    font-size: 11px;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1e293b;
    font-weight: 600;
}

/* ==========================================================================
   Main Navigation Tabs (Continuous CHEFS CULINAR Deep Navy Bar)
   ========================================================================== */
.main-tabs {
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, #002b5c 0%, #003e85 100%);
    border-bottom: 1px solid rgba(0, 20, 45, 0.4);
    padding: 0 12px;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 2px 8px rgba(0, 43, 92, 0.15);
    flex-shrink: 0;
    min-height: 50px;
    height: 50px;
    z-index: 10;
    box-sizing: border-box;
}

body.dark-theme .main-tabs {
    background: linear-gradient(135deg, #001733 0%, #002244 100%);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 100%;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
}

.tab-btn i {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13.5px;
    transition: color 0.15s ease, transform 0.15s ease;
}

.tab-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
    border-bottom-color: rgba(255, 255, 255, 0.35);
}

.tab-btn:hover i {
    color: #ffffff;
}

.tab-btn.active {
    color: #ffffff;
    border-bottom-color: #38bdf8;
    background-color: rgba(255, 255, 255, 0.12);
    font-weight: 700;
    box-shadow: inset 0 -2px 6px rgba(56, 189, 248, 0.22);
}

.tab-btn.active i {
    color: #ffffff;
}

body.dark-theme .tab-btn.active {
    color: #ffffff;
    border-bottom-color: #38bdf8;
    background-color: rgba(255, 255, 255, 0.12);
}

.tab-badge {
    font-size: 10.5px;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    background-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    line-height: 1.2;
    transition: all 0.15s ease;
}

.tab-badge.blue {
    background-color: rgba(56, 189, 248, 0.25);
    color: #e0f2fe;
    border-color: rgba(56, 189, 248, 0.45);
}

.tab-badge.green {
    background-color: rgba(52, 211, 153, 0.22);
    color: #d1fae5;
    border-color: rgba(52, 211, 153, 0.4);
}

.tab-badge.purple {
    background-color: rgba(192, 132, 252, 0.25);
    color: #f3e8ff;
    border-color: rgba(192, 132, 252, 0.4);
}

.tab-btn:hover .tab-badge,
.tab-btn.active .tab-badge {
    border-color: rgba(255, 255, 255, 0.45);
}

.tab-btn.active .tab-badge.blue {
    background-color: rgba(56, 189, 248, 0.35);
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.6);
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 20px 24px;
    flex: 1;
}

.tab-content.active {
    display: block;
}

/* Common Layouts & Grid Containers - High-End Enterprise Standards (Dynamic Full-Width) */
.catalog-layout, .autocad-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    width: 100%;
    margin: 0;
}

.catalog-layout > .protocol-hero-banner,
.autocad-layout > .protocol-hero-banner {
    grid-column: 1 / -1;
}

.hkl-layout, .calc-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    margin: 0;
}

.hkl-layout > .protocol-hero-banner,
.calc-layout > .protocol-hero-banner {
    grid-column: 1 / -1;
}

.sap-layout, .import-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    margin: 0;
}

.protocol-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    margin: 0;
}

.catalog-sidebar, .acad-sidebar {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.catalog-main, .acad-main-viewport {
    flex: 1;
    min-width: 0;
}

.filter-card, .retrofit-card, .sidebar-block, .panel-card, .protocol-card, .sap-card, .import-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--shadow-card);
}

.calc-panel {
    flex: 1;
}

/* ==========================================================================
   Form Controls & Filters
   ========================================================================== */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 8px 10px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    font-size: 13px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--chefs-blue);
    box-shadow: 0 0 0 2px rgba(0, 75, 153, 0.15);
}

.form-select-sm, .form-input-sm {
    padding: 5px 8px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 8px 10px 8px 32px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 13px;
}

.category-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pill-btn {
    padding: 5px 10px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.pill-btn:hover {
    background-color: #e2e8f0;
    color: var(--chefs-navy);
}

.pill-btn.active {
    background-color: var(--chefs-navy);
    color: #ffffff;
    border-color: var(--chefs-navy);
}

.range-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.range-row span {
    font-size: 12px;
    color: var(--text-muted);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

/* ==========================================================================
   Buttons & Actions
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 13px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary { 
    background-color: var(--chefs-navy); 
    color: #ffffff; 
    border-color: var(--chefs-navy);
}
.btn-primary:hover { 
    background-color: var(--chefs-blue); 
    border-color: var(--chefs-blue);
}

.btn-success { background-color: var(--chefs-green); color: #ffffff; }
.btn-success:hover { background-color: #047857; }

.btn-purple { background-color: var(--chefs-purple); color: #ffffff; }
.btn-purple:hover { background-color: #5b21b6; }

.btn-outline { 
    background-color: transparent; 
    border-color: var(--border-subtle); 
    color: var(--text-secondary); 
}
.btn-outline:hover { 
    background-color: var(--bg-card-hover); 
    color: var(--chefs-navy);
    border-color: var(--chefs-navy);
}

.btn-outline-danger { background-color: transparent; border-color: #fca5a5; color: var(--chefs-red); }
.btn-outline-danger:hover { background-color: #fee2e2; }

.btn-outline-success { background-color: transparent; border-color: #86efac; color: var(--chefs-green); }
.btn-outline-success:hover { background-color: #dcfce7; }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.12); border: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.btn-icon:hover { background: rgba(255, 255, 255, 0.2); }
.btn-text { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 12px; }
.btn-text:hover { color: var(--chefs-navy); }

/* ==========================================================================
   Catalog Top Bar & Grid
   ========================================================================== */
.catalog-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.results-info {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.results-info span {
    font-weight: 800;
    color: var(--chefs-navy);
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ==========================================================================
   2025 GKT Catalog Equipment Cards (Editorial Style)
   ========================================================================== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.item-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--chefs-royal);
}

.item-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #fafbfc;
    border-bottom: 1px solid #f1f5f9;
}

.mfg-badge {
    font-size: 10px;
    font-weight: 700;
    color: var(--chefs-navy);
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.item-art-nr {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.item-img-box {
    height: 160px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.item-img-box img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.item-card:hover .item-img-box img {
    transform: scale(1.03);
}

.energy-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

.item-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--chefs-navy);
    margin-bottom: 8px;
    line-height: 1.35;
}

body.dark-theme .item-title {
    color: #ffffff;
}

/* 2-Column Catalog Specification Table */
.item-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-bottom: 10px;
}

.item-spec-table tr {
    border-bottom: 1px solid #f1f5f9;
}

body.dark-theme .item-spec-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.item-spec-table td {
    padding: 3px 0;
}

.item-spec-table td.spec-lbl {
    color: var(--text-muted);
    font-weight: 500;
    width: 44%;
}

.item-spec-table td.spec-val {
    color: var(--text-secondary);
    font-weight: 600;
    text-align: right;
}

body.dark-theme .item-spec-table td.spec-val {
    color: #e2e8f0;
}

.item-stock-row {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    padding-top: 6px;
}

.item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
}

.price-container {
    display: flex;
    flex-direction: column;
}

.price-uvp {
    font-size: 10px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.item-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--chefs-navy);
}

body.dark-theme .item-price {
    color: var(--chefs-cyan);
}

/* ==========================================================================
   CAD & BIM Viewport (Tab 2)
   ========================================================================== */
.acad-main-viewport {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    min-height: 640px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.viewport-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background-color: #fafbfc;
    border-bottom: 1px solid var(--border-color);
}

body.dark-theme .viewport-toolbar {
    background-color: #131e36;
}

.btn-toggle {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.btn-toggle.active {
    background-color: var(--chefs-navy);
    color: #ffffff;
    border-color: var(--chefs-navy);
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background-color: var(--border-color);
}

.toolbar-spacer {
    flex: 1;
}

.gewerke-toggles {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gewerke-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.gewerke-btn.active {
    background-color: #f1f5f9;
    border-color: var(--chefs-navy);
    color: var(--chefs-navy);
}

body.dark-theme .gewerke-btn.active {
    background-color: #1c2b4a;
    color: var(--chefs-cyan);
}

/* 2D Canvas Workspace */
.canvas-container {
    flex: 1;
    position: relative;
    background-color: #0f172a;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 25px 25px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 560px;
}

.cad-grid-workspace {
    position: relative;
    width: 1000px;
    height: 560px;
    background-color: #1e293b;
    border: 1px solid #475569;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.placed-block {
    position: absolute;
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    border: 2px solid #38bdf8;
    border-radius: var(--radius-sm);
    color: #ffffff;
    cursor: grab;
    user-select: none;
    display: flex;
    flex-direction: column;
    padding: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.placed-block:active { cursor: grabbing; }
.placed-block.selected { border-color: var(--chefs-gold-light); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.4); }
.placed-block.collision-warning { border-color: #ef4444 !important; animation: flashBorder 1.5s infinite; }

@keyframes flashBorder {
    0%, 100% { border-color: #ef4444; }
    50% { border-color: #ffffff; }
}

.block-title {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.block-spec {
    font-size: 10px;
    color: #94a3b8;
}

/* Sockets */
.socket-badge {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    font-size: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.socket-badge.strom { background-color: #eab308; }
.socket-badge.wasser { background-color: #0284c7; }
.socket-badge.abwasser { background-color: #64748b; }
.socket-badge.gas { background-color: #ef4444; }

/* Palette List */
.palette-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
}

.palette-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: grab;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.palette-item:hover {
    border-color: var(--chefs-navy);
    background-color: #e2e8f0;
}

.palette-item img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Plan Stats */
.plan-stats-card .stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 5px 0;
    border-bottom: 1px dashed var(--border-color);
}

/* AI Rule Banner */
.ai-rule-banner {
    background: #fffbeb;
    border-bottom: 2px solid var(--chefs-gold-light);
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #92400e;
    transition: all 0.25s ease;
}

.ai-rule-banner.danger {
    background: #fef2f2 !important;
    border-bottom: 2px solid #ef4444 !important;
    color: #991b1b !important;
}

.ai-rule-banner.danger .rule-icon {
    color: #dc2626 !important;
    animation: pulseHazardIcon 1.2s infinite ease-in-out;
}

.ai-rule-banner.warning {
    background: #fffbeb !important;
    border-bottom: 2px solid #f59e0b !important;
    color: #92400e !important;
}

.ai-rule-banner.warning .rule-icon {
    color: #d97706 !important;
}

.ai-rule-banner .rule-icon { font-size: 20px; color: var(--chefs-gold-light); }
.ai-rule-banner .rule-text p { font-size: 12px; margin: 0; }

@keyframes pulseHazardIcon {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.85; }
}

/* Red pulsating border for clashing CAD blocks */
.placed-block.hazard-clash {
    outline: 2px solid #ef4444 !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.75) !important;
    animation: hazardBlockBlink 1.4s infinite ease-in-out !important;
}

@keyframes hazardBlockBlink {
    0%, 100% { box-shadow: 0 0 14px rgba(239, 68, 68, 0.9); outline-color: #dc2626; }
    50% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.35); outline-color: #f87171; }
}

.hazard-badge {
    position: absolute;
    top: -10px;
    right: -8px;
    background: #dc2626;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
    z-index: 99;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.35);
    letter-spacing: 0.5px;
}

/* EU F-Gas Refrigerant Traffic Light Badges */
.eco-badge-green {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

.eco-badge-yellow {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

.eco-badge-red {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fca5a5 !important;
    animation: pulseHazardIcon 2s infinite ease-in-out;
}

/* 3D WebGL Stage */
.viewport-3d-container {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 560px;
    background-color: #d9e3ed;
    overflow: hidden;
}

body.dark-theme .viewport-3d-container {
    background-color: #0a0e17;
}

.stage-3d {
    width: 100%;
    height: 100%;
    min-height: 560px;
    display: block;
}

.controls-overlay-3d {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.overlay-pill {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #f1f5f9;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   VDI 2052, TCO & Engineering Panels (Tab 3)
   ========================================================================== */
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.results-dashboard-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.metric-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.metric-card.highlight-blue {
    border-color: var(--chefs-royal);
    background-color: rgba(0, 86, 150, 0.04);
}

.metric-card.highlight-green {
    border-color: var(--chefs-green);
    background-color: rgba(5, 150, 105, 0.04);
}

.metric-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.metric-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--chefs-navy);
    margin: 3px 0;
}

body.dark-theme .metric-value { color: var(--chefs-cyan); }

.metric-sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* Recommendations Card & Check List */
.hkl-recommendations {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
}

body.dark-theme .hkl-recommendations {
    background: #181d26;
    border-color: #334155;
}

.hkl-recommendations h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--chefs-navy);
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-theme .hkl-recommendations h4 {
    color: #f1f5f9;
}

.check-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.check-list li {
    list-style: none !important;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    line-height: 1.45;
    color: #334155;
}

body.dark-theme .check-list li {
    color: #cbd5e1;
}

.check-list li i {
    color: #10b981;
    margin-top: 2px;
    font-size: 13px;
    flex-shrink: 0;
}

/* TCO Comparison */
.tco-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
}

.tco-column {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.tco-column.optimized {
    border-color: var(--chefs-green);
    background-color: rgba(5, 150, 105, 0.03);
}

.tco-column h5 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--chefs-navy);
}

body.dark-theme .tco-column h5 { color: #ffffff; }

.tco-cost-breakdown .cost-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 5px 0;
    border-bottom: 1px dashed var(--border-color);
}

.cost-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    padding-top: 8px;
    margin-top: 6px;
    border-top: 2px solid var(--border-color);
}

.roi-highlight-banner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background-color: var(--chefs-navy);
    color: #ffffff;
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 14px;
}

.roi-stat .roi-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    display: block;
}

.roi-stat .roi-value {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
}

/* ==========================================================================
   Leasing & Deckungsbeitrag (Tab 4)
   ========================================================================== */
.leasing-result-banner {
    background: rgba(0, 43, 92, 0.03);
    border: 1px solid var(--chefs-royal);
    border-radius: var(--radius-sm);
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.leasing-stat .stat-lbl {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}

.leasing-stat .stat-val {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
}

/* ==========================================================================
   Digitale Inbetriebnahme & Protokoll (Tab 5) - High-End Suite
   ========================================================================== */
.protocol-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin: 0;
}

/* 1. Hero Certificate Header Banner (Fokus-Bright-Design) */
.protocol-hero-banner {
    background: #ffffff;
    color: var(--text-main, #0f172a);
    border-radius: var(--radius-md, 8px);
    padding: 18px 24px;
    min-height: 80px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color, #e2e8f0);
    position: relative;
    overflow: hidden;
}

.protocol-hero-banner::after {
    display: none;
}

.hero-cert-left {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.cert-shield-badge {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: #f0f7ff !important;
    color: #004b99 !important;
    border: 1px solid #bae6fd;
    border-radius: var(--radius-md, 6px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: none;
    flex-shrink: 0;
}

.cert-title-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.cert-title-info h2 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 3px 0;
    color: #002b5c;
    line-height: 1.25;
}

.cert-title-info .subtitle {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    max-width: 900px;
    line-height: 1.35;
}

.protocol-hero-banner .btn-outline-white {
    background: #ffffff;
    color: #002b5c;
    border: 1px solid #cbd5e1;
}

.protocol-hero-banner .btn-outline-white:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.cert-tag-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.cert-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.cert-pill.gold {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.cert-pill.blue {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.cert-pill.green {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.cert-pill.cyan {
    background: #cffafe;
    color: #0e7490;
    border: 1px solid #67e8f9;
}

.cert-pill.purple {
    background: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #d8b4fe;
}

/* Dark Hero Banners: translucent pills with light text */
.protocol-hero-banner .cert-pill.gold {
    background: rgba(245, 158, 11, 0.25);
    color: #fef3c7;
    border: 1px solid rgba(245, 158, 11, 0.5);
}

.protocol-hero-banner .cert-pill.blue {
    background: rgba(0, 159, 227, 0.25);
    color: #e0f2fe;
    border: 1px solid rgba(0, 159, 227, 0.5);
}

.protocol-hero-banner .cert-pill.green {
    background: rgba(16, 185, 129, 0.25);
    color: #d1fae5;
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.protocol-hero-banner .cert-pill.cyan {
    background: rgba(6, 182, 212, 0.25);
    color: #cffafe;
    border: 1px solid rgba(6, 182, 212, 0.5);
}

.protocol-hero-banner .cert-pill.purple {
    background: rgba(168, 85, 247, 0.25);
    color: #f3e8ff;
    border: 1px solid rgba(168, 85, 247, 0.5);
}

/* Dark Theme Overrides */
body.dark-theme .cert-pill.gold {
    background: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.4);
}

body.dark-theme .cert-pill.blue {
    background: rgba(2, 132, 199, 0.2);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
}

body.dark-theme .cert-pill.green {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.4);
}

body.dark-theme .cert-pill.cyan {
    background: rgba(8, 145, 178, 0.2);
    color: #22d3ee;
    border-color: rgba(34, 211, 238, 0.4);
}

body.dark-theme .cert-pill.purple {
    background: rgba(147, 51, 234, 0.2);
    color: #c084fc;
    border-color: rgba(192, 132, 252, 0.4);
}

.hero-cert-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    z-index: 1;
    flex-shrink: 0;
}

.btn-outline-white {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 9px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    transform: translateY(-1px);
}

.btn-gold {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(217, 119, 6, 0.35);
    transition: all 0.2s ease;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(217, 119, 6, 0.45);
}

/* 2. KPI Quality & Status Bar */
.protocol-kpi-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.kpi-cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-cert-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.kpi-info {
    display: flex;
    flex-direction: column;
}

.kpi-lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.kpi-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    margin: 2px 0 1px 0;
}

.kpi-sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* 3. Protocol Panels Common Header */
.protocol-panel, .protocol-signatures-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.panel-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.panel-section-header .sec-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--chefs-navy);
}

body.dark-theme .panel-section-header .sec-title {
    color: #ffffff;
}

.panel-section-header .sec-title h3,
.panel-section-header .sec-title label {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

/* Metadata Grid */
.protocol-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.meta-field-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-field-card label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-field-card .form-input {
    background: var(--bg-card);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-main);
}

/* 4. Inspection Checklist Grid (2x2) */
.protocol-inspection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.checklist-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.checklist-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.chk-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chk-badge {
    width: 24px;
    height: 24px;
    background: var(--chefs-blue);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.chk-header-title h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.status-pill-small {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-pill-small.green {
    background: rgba(16, 185, 129, 0.12);
    color: var(--chefs-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.check-item-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 8px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.check-item-row:last-child {
    border-bottom: none;
}

.check-item-row:hover {
    background: #f8fafc;
    border-radius: 4px;
}

.check-item-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--chefs-green);
    cursor: pointer;
    flex-shrink: 0;
}

.check-item-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
}

.check-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.check-item-head strong {
    font-size: 12px;
    color: var(--text-main);
}

.item-status-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
}

.item-status-tag.ok {
    background: rgba(5, 150, 105, 0.12);
    color: var(--chefs-green);
    border: 1px solid rgba(5, 150, 105, 0.25);
}

.check-item-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* 5. Service Schedule Timeline Grid */
.service-schedule-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.schedule-item-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.sch-badge-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.bg-success-light { background: rgba(16, 185, 129, 0.12); }
.bg-blue-light { background: rgba(0, 75, 153, 0.12); }
.bg-gold-light { background: rgba(217, 119, 6, 0.12); }
.text-gold { color: var(--chefs-gold); }

.sch-content {
    display: flex;
    flex-direction: column;
}

.sch-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.sch-val {
    font-size: 14px;
    font-weight: 800;
    margin: 2px 0 1px 0;
}

.sch-sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* 6. Signature Studio Cards */
.signatures-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sig-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sig-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sig-title-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.sig-timestamp {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.sig-canvas-wrapper {
    position: relative;
    background: #ffffff;
    border: 1px dashed var(--chefs-blue);
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 140px;
}

.sig-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
    cursor: crosshair;
    position: relative;
    z-index: 2;
    touch-action: none;
}

.canvas-watermark {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 11px;
    color: rgba(0, 43, 92, 0.25);
    font-weight: 600;
    pointer-events: none;
    z-index: 1;
}

.sig-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sig-guidance {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-sig-clear {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.btn-sig-clear:hover {
    background: rgba(220, 38, 38, 0.08);
    border-color: var(--chefs-red);
    color: var(--chefs-red);
}

/* ==========================================================================
   Data Tables (SAP BOM, WinDelta, etc.)
   ========================================================================== */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th {
    background-color: #fafbfc;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    color: var(--chefs-navy);
    border-bottom: 2px solid var(--border-color);
}

.data-table th.col-numeric {
    text-align: right;
}

body.dark-theme .data-table th {
    background-color: #131e36;
    color: #ffffff;
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.data-table td.col-numeric {
    text-align: right;
    font-variant-numeric: tabular-nums lining-nums;
    font-family: var(--font-family-mono, var(--font-code));
    font-weight: 600;
}

.data-table tbody tr:hover {
    background-color: var(--bg-card-hover);
}

.json-viewer-box {
    background-color: #0f172a;
    border-radius: var(--radius-sm);
    padding: 14px;
    color: #e2e8f0;
}

.json-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--chefs-cyan);
    margin-bottom: 6px;
}

.json-code {
    font-family: var(--font-code);
    font-size: 11px;
    line-height: 1.45;
    max-height: 320px;
    overflow: auto;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--chefs-royal);
    border-radius: var(--radius-md);
    background-color: rgba(0, 86, 150, 0.02);
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.drop-zone:hover {
    background-color: rgba(0, 86, 150, 0.05);
    border-color: var(--chefs-navy);
}

.drop-icon {
    font-size: 40px;
    color: var(--chefs-royal);
    margin-bottom: 10px;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    max-width: 680px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--chefs-navy);
}

body.dark-theme .modal-header h3 { color: #ffffff; }

.modal-body {
    padding: 20px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
}

.btn-close:hover { color: var(--chefs-red); }

/* Utility Classes */
.text-primary { color: var(--chefs-navy); }
.text-success { color: var(--chefs-green); }
.text-danger { color: var(--chefs-red); }
.text-warning { color: var(--chefs-gold); }
.text-info { color: var(--chefs-cyan); }
.text-purple { color: var(--chefs-purple); }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 18px; }

.sub-nav-bar {
    display: inline-flex;
    align-items: center;
    background: #e2e8f0;
    border-radius: var(--radius-md, 8px);
    padding: 3px;
    gap: 3px;
    margin-bottom: 14px;
    border: 1px solid #cbd5e1;
    flex-wrap: wrap;
}

body.dark-theme .sub-nav-bar {
    background: #1e293b;
    border-color: #334155;
}

.sub-nav-bar button,
.sub-nav-bar .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: none !important;
    background: transparent;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow: none;
}

.sub-nav-bar button:hover,
.sub-nav-bar .btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.7);
}

.sub-nav-bar button.active,
.sub-nav-bar button.btn-primary,
.sub-nav-bar .btn.active,
.sub-nav-bar .btn.btn-primary {
    background: #ffffff !important;
    color: #002b5c !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-weight: 700;
}

body.dark-theme .sub-nav-bar button {
    color: #94a3b8;
}

body.dark-theme .sub-nav-bar button.active,
body.dark-theme .sub-nav-bar button.btn-primary,
body.dark-theme .sub-nav-bar .btn.active,
body.dark-theme .sub-nav-bar .btn.btn-primary {
    background: #334155 !important;
    color: #38bdf8 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.export-actions-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1.5px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

/* Print Media Query */
@media print {
    .top-bar, .main-tabs, .protocol-actions, .header-actions, .hero-cert-actions, .btn-sig-clear {
        display: none !important;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .tab-content {
        display: block !important;
        padding: 0 !important;
    }
    .protocol-hero-banner {
        background: #002b5c !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        padding: 16px 20px !important;
    }
    .protocol-panel, .checklist-card, .sig-card, .kpi-cert-card, .schedule-item-card {
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   13. GOOGLE AI STUDIO COPILOT & PERSISTENT SIDEBAR STYLING
   ========================================================================== */
.studio-body {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    background-color: var(--bg-main);
    position: relative;
}

.studio-ai-panel {
    --ai-panel-w: 430px;
    width: var(--ai-panel-w);
    min-width: var(--ai-panel-w);
    max-width: var(--ai-panel-w);
    height: 100%;
    max-height: 100%;
    min-height: 100%;
    background-color: #f1f5f9; /* Distinct Slate-100 sidebar background */
    border-right: none;
    display: flex;
    flex-direction: column;
    z-index: 40;
    transition: min-width 0.15s ease, max-width 0.15s ease;
    box-shadow: 4px 0 16px rgba(0, 43, 92, 0.06);
    flex-shrink: 0;
    overflow: hidden;
}

body.dark-theme .studio-ai-panel {
    background-color: #090e1a;
    border-right: none;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.45);
}

.studio-ai-splitter {
    width: 2px;
    background: #cbd5e1;
    cursor: col-resize;
    transition: background 0.15s ease;
    user-select: none;
    touch-action: none;
    position: relative;
    z-index: 45;
    flex-shrink: 0;
}

.studio-ai-splitter:hover,
.studio-ai-splitter.dragging {
    background: #009fe3 !important;
}

.studio-ai-splitter::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -4px;
    right: -4px;
    cursor: col-resize;
    z-index: 46;
}

body.dark-theme .studio-ai-splitter {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-theme .studio-ai-splitter:hover,
body.dark-theme .studio-ai-splitter.dragging {
    background: #0284c7 !important;
}

.studio-ai-panel.collapsed {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
}

.studio-ai-panel.collapsed .ai-panel-header .ai-brand-titles,
.studio-ai-panel.collapsed .ai-header-tools #aiCollapseBtn,
.studio-ai-panel.collapsed .ai-mode-selector-bar,
.studio-ai-panel.collapsed .ai-panel-scroll-content,
.studio-ai-panel.collapsed .ai-panel-footer {
    display: none !important;
}

.studio-ai-panel.collapsed .ai-collapsed-rail {
    display: flex;
}

/* AI Studio Header (Continuous Unified 50px Command Bar) */
.ai-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    min-height: 50px;
    height: 50px;
    background: linear-gradient(135deg, #001f42 0%, #002b5c 100%);
    color: #ffffff;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(0, 20, 45, 0.4);
    box-sizing: border-box;
}

body.dark-theme .ai-panel-header {
    background: linear-gradient(135deg, #001226 0%, #001f42 100%);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.ai-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-brand-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

/* Sleek High-Tech CHEFS CULINAR AI Copilot Avatar (White porcelain, navy border, gold stars) */
.gkt-ai-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 43, 92, 0.16), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
    border: 2px solid #002b5c !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.gkt-ai-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(0, 43, 92, 0.28) !important;
    border-color: #004b99 !important;
}

.gkt-ai-avatar svg {
    width: 34px !important;
    height: 34px !important;
    filter: drop-shadow(0 1px 2px rgba(0, 43, 92, 0.12));
}

.ai-brand-titles {
    display: flex;
    flex-direction: column;
}

.ai-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-title-row h3 {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

body.dark-theme .ai-title-row h3 {
    color: #ffffff;
}

.ai-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.ai-header-tools {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-tool-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ai-tool-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

body.dark-theme .ai-tool-btn {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

body.dark-theme .ai-tool-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* AI Persona / System Context Selector */
.ai-mode-selector-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #e2e8f0;
    border-bottom: 1px solid #cbd5e1;
    font-size: 11px;
    color: #334155;
    font-weight: 600;
    flex-shrink: 0;
}

body.dark-theme .ai-mode-selector-bar {
    background: #090e1a;
    border-bottom-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.ai-mode-select {
    flex: 1;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: 11px;
    color: #0f172a;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.dark-theme .ai-mode-select {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.ai-mode-select:focus {
    border-color: var(--chefs-blue);
    box-shadow: 0 0 0 2px rgba(0, 75, 153, 0.15);
}

/* Collapsed Mini Rail Trigger */
.ai-collapsed-rail {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    height: 100%;
}

.ai-expand-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #004b99 0%, #002b5c 100%);
    color: #f59e0b;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 43, 92, 0.3);
    transition: transform 0.15s ease;
}

.ai-expand-btn span {
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    margin-top: 1px;
}

.ai-expand-btn:hover {
    transform: scale(1.05);
}

.ai-rail-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ai-rail-icon-btn:hover {
    background: #e0f2fe;
    color: var(--chefs-blue);
    border-color: var(--chefs-blue);
}

body.dark-theme .ai-rail-icon-btn {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

body.dark-theme .ai-rail-icon-btn:hover {
    background: #27354f;
    color: var(--chefs-cyan);
}

/* Scroll Content */
.ai-panel-scroll-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-kpi-minibar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    flex-shrink: 0;
}

.ai-kpi-mini-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 5px 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

body.dark-theme .ai-kpi-mini-card {
    background: #131e36;
    border-color: rgba(255, 255, 255, 0.1);
}

.ai-kpi-mini-card i {
    font-size: 11px;
    flex-shrink: 0;
}

.ai-kpi-mini-card .mini-lbl {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.1;
    font-weight: 500;
}

.ai-kpi-mini-card .mini-val {
    display: block;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
}

/* Quick Starter Scenarios */
.ai-scenarios-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 8px 10px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

body.dark-theme .ai-scenarios-section {
    background: #131e36;
    border-color: rgba(255, 255, 255, 0.1);
}

.ai-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

.ai-starter-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.ai-starter-list .ai-starter-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 5px 7px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ai-starter-list .ai-starter-card:hover {
    border-color: var(--chefs-blue);
    background: #f0f7ff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

body.dark-theme .ai-starter-list .ai-starter-card {
    background: #0f182e;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .ai-starter-list .ai-starter-card:hover {
    background: #1e293b;
    border-color: var(--chefs-cyan);
}

.ai-starter-list .ai-starter-card .starter-icon {
    width: 28px;
    height: 28px;
    background: var(--badge-blue-bg, #e0f2fe);
    color: var(--badge-blue-text, var(--chefs-blue));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.ai-starter-list .ai-starter-card .starter-icon.icon-gold {
    background: var(--badge-gold-bg, rgba(217, 119, 6, 0.12));
    color: var(--badge-gold-text, #d97706);
}

.ai-starter-list .ai-starter-card .starter-icon.icon-blue {
    background: var(--badge-blue-bg, rgba(2, 132, 199, 0.12));
    color: var(--badge-blue-text, #0284c7);
}

.ai-starter-list .ai-starter-card .starter-icon.icon-pink {
    background: var(--badge-pink-bg, rgba(219, 39, 119, 0.12));
    color: var(--badge-pink-text, #db2777);
}

.ai-starter-list .ai-starter-card .starter-icon.icon-purple {
    background: var(--badge-purple-bg, rgba(124, 58, 237, 0.12));
    color: var(--badge-purple-text, #7c3aed);
}

.ai-starter-list .ai-starter-card .starter-icon.icon-green {
    background: var(--badge-green-bg, rgba(22, 163, 74, 0.12));
    color: var(--badge-green-text, #16a34a);
}

.ai-starter-list .ai-starter-card .starter-icon.icon-orange {
    background: var(--badge-orange-bg, rgba(234, 88, 12, 0.12));
    color: var(--badge-orange-text, #ea580c);
}

body.dark-theme .ai-starter-list .ai-starter-card .starter-icon.icon-gold {
    background: var(--badge-gold-bg, rgba(217, 119, 6, 0.25));
    color: var(--badge-gold-text, #fbbf24);
}

body.dark-theme .ai-starter-list .ai-starter-card .starter-icon.icon-blue {
    background: var(--badge-blue-bg, rgba(2, 132, 199, 0.25));
    color: var(--badge-blue-text, #38bdf8);
}

body.dark-theme .ai-starter-list .ai-starter-card .starter-icon.icon-pink {
    background: var(--badge-pink-bg, rgba(219, 39, 119, 0.25));
    color: var(--badge-pink-text, #f472b6);
}

body.dark-theme .ai-starter-list .ai-starter-card .starter-icon.icon-purple {
    background: var(--badge-purple-bg, rgba(124, 58, 237, 0.25));
    color: var(--badge-purple-text, #a78bfa);
}

body.dark-theme .ai-starter-list .ai-starter-card .starter-icon.icon-green {
    background: var(--badge-green-bg, rgba(22, 163, 74, 0.25));
    color: var(--badge-green-text, #4ade80);
}

body.dark-theme .ai-starter-list .ai-starter-card .starter-icon.icon-orange {
    background: var(--badge-orange-bg, rgba(234, 88, 12, 0.25));
    color: var(--badge-orange-text, #fb923c);
}

.ai-starter-list .ai-starter-card .starter-info strong {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main, var(--chefs-navy));
    margin-bottom: 2px;
}

body.dark-theme .ai-starter-list .ai-starter-card .starter-info strong {
    color: var(--text-main, #f8fafc);
}

.ai-starter-list .ai-starter-card .starter-info span {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.35;
}

/* Chat Feed */
.ai-chat-feed-wrapper {
    flex: 1;
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

.ai-chat-feed {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 14px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

body.dark-theme .ai-chat-feed {
    background: #0d1527;
    border-color: rgba(255, 255, 255, 0.1);
}

.ai-chat-message {
    display: flex;
    gap: 10px;
    max-width: 100%;
}

.ai-chat-message.ai-role {
    align-self: flex-start;
}

.ai-chat-message.user-role {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-avatar-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--chefs-navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.user-role .msg-avatar-icon {
    background: var(--chefs-blue);
}

.msg-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: calc(100% - 40px);
}

.msg-sender {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.user-role .msg-sender {
    text-align: right;
}

.msg-text {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.ai-chat-message.ai-role .msg-text {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid var(--chefs-royal);
}

body.dark-theme .ai-chat-message.ai-role .msg-text {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.12);
    border-left-color: var(--chefs-cyan);
}

.user-role .msg-text {
    background: #002b5c;
    color: #ffffff;
    border-color: #002b5c;
}

/* Plan Result Card inside AI Bubble */
.ai-plan-result-card {
    background: #ffffff;
    border: 1.5px solid #93c5fd;
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0, 43, 92, 0.08);
}

body.dark-theme .ai-plan-result-card {
    background: #1e293b;
    border-color: #3b82f6;
}

.ai-plan-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ai-plan-title-row strong {
    font-size: 13px;
    color: var(--chefs-navy);
}

body.dark-theme .ai-plan-title-row strong {
    color: #f8fafc;
}

.ai-items-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 8px 0;
}

.ai-item-tag {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

body.dark-theme .ai-item-tag {
    background: #334155;
    border-color: #475569;
}

.ai-metrics-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    background: #f8fafc;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 8px 0;
    font-size: 11px;
}

body.dark-theme .ai-metrics-row {
    background: #0f172a;
}

.ai-metrics-row div span {
    display: block;
    color: var(--text-muted);
    font-size: 10px;
}

.ai-metrics-row div strong {
    font-size: 12px;
    color: var(--chefs-navy);
}

body.dark-theme .ai-metrics-row div strong {
    color: #38bdf8;
}

/* AI Prompt Input Footer & Chips */
.ai-panel-footer {
    padding: 10px 14px;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 25;
}

body.dark-theme .ai-panel-footer {
    background: #0f172a;
    border-top-color: rgba(255, 255, 255, 0.1);
}

.ai-prompt-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.ai-prompt-chips::-webkit-scrollbar {
    display: none;
}

.prompt-chip {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-full);
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.prompt-chip i {
    font-size: 10px;
    color: var(--chefs-blue);
}

.prompt-chip:hover {
    background: #e0f2fe;
    color: var(--chefs-blue);
    border-color: var(--chefs-blue);
    transform: translateY(-1px);
}

body.dark-theme .prompt-chip {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

body.dark-theme .prompt-chip:hover {
    background: #27354f;
    color: var(--chefs-cyan);
}

.ai-panel-footer .ai-chat-input-container {
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.chat-input-bar {
    display: flex;
    gap: 8px;
}

.chat-input-bar input {
    flex: 1;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 9px 12px;
    font-size: 12px;
    background: #f8fafc;
    color: var(--text-primary);
    outline: none;
    transition: all 0.15s ease;
}

.chat-input-bar input:focus {
    border-color: var(--chefs-royal);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 75, 153, 0.12);
}

body.dark-theme .chat-input-bar input {
    background: #090e1a;
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

body.dark-theme .chat-input-bar input:focus {
    background: #131e36;
    border-color: var(--chefs-cyan);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.ai-footer-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

/* PDF Tender Upload Button */
.btn-pdf-upload {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-md);
    color: #dc2626;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-pdf-upload:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

body.dark-theme .btn-pdf-upload {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.15);
    color: #f87171;
}

body.dark-theme .btn-pdf-upload:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fca5a5;
}

/* Drag and Drop Overlay for Tender PDFs */
.ai-chat-drop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 43, 92, 0.88);
    backdrop-filter: blur(4px);
    border: 2px dashed #38bdf8;
    border-radius: var(--radius-md);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    pointer-events: none;
    animation: pulseOverlay 1.5s infinite alternate ease-in-out;
}

@keyframes pulseOverlay {
    0% { border-color: #38bdf8; background: rgba(0, 43, 92, 0.85); }
    100% { border-color: #f59e0b; background: rgba(0, 43, 92, 0.94); }
}

.ai-chat-drop-overlay .drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.ai-chat-drop-overlay .drop-content strong {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.ai-chat-drop-overlay .drop-content span {
    font-size: 11px;
    color: #cbd5e1;
}

/* File Staging Badge */
.ai-file-badge-container {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.ai-file-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 11px;
    color: #991b1b;
}

body.dark-theme .ai-file-badge {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.ai-file-name {
    font-weight: 600;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-file-size {
    font-size: 10px;
    color: #64748b;
    background: rgba(0, 0, 0, 0.05);
    padding: 1px 5px;
    border-radius: 4px;
}

body.dark-theme .ai-file-size {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.1);
}

.ai-file-remove {
    background: transparent;
    border: none;
    color: #991b1b;
    cursor: pointer;
    padding: 0 2px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.ai-file-remove:hover {
    color: #dc2626;
    transform: scale(1.15);
}

/* Tender Result Card inside Chat */
.ai-tender-result-card {
    background: #ffffff;
    border: 1.5px solid #0284c7;
    border-radius: 8px;
    padding: 14px;
    margin-top: 12px;
    box-shadow: 0 4px 16px rgba(0, 43, 92, 0.08);
}

body.dark-theme .ai-tender-result-card {
    background: #1e293b;
    border-color: #38bdf8;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.ai-tender-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

body.dark-theme .ai-tender-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.ai-tender-title strong {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: var(--chefs-navy);
}

body.dark-theme .ai-tender-title strong {
    color: #f8fafc;
}

.ai-tender-subtitle {
    font-size: 11px;
    color: var(--text-muted);
}

.ai-tender-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: #f8fafc;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
    font-size: 11px;
}

body.dark-theme .ai-tender-meta-grid {
    background: #0f172a;
}

.ai-tender-meta-grid div span {
    display: block;
    color: var(--text-muted);
    font-size: 10px;
}

.ai-tender-meta-grid div strong {
    color: var(--chefs-navy);
    font-size: 12px;
}

body.dark-theme .ai-tender-meta-grid div strong {
    color: #38bdf8;
}

.ai-tender-table-wrapper {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 12px;
}

body.dark-theme .ai-tender-table-wrapper {
    border-color: rgba(255, 255, 255, 0.1);
}

.ai-tender-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    text-align: left;
}

.ai-tender-table th {
    background: #f1f5f9;
    color: #475569;
    padding: 6px 8px;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 2;
}

body.dark-theme .ai-tender-table th {
    background: #090e1a;
    color: #94a3b8;
}

.ai-tender-table td {
    padding: 6px 8px;
    border-top: 1px solid #e2e8f0;
    color: #1e293b;
}

body.dark-theme .ai-tender-table td {
    border-top-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.ai-tender-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

/* ==========================================================================
   Studio Main Workspace & Tabs
   ========================================================================== */
.studio-workspace {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--bg-main);
}

.studio-tabs {
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    flex-shrink: 0;
    z-index: 10;
}

.studio-tab-panes {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    scrollbar-gutter: stable;
}

.studio-tab-panes > .tab-content {
    padding: 16px 20px;
    display: none;
}

.studio-tab-panes > .tab-content.active {
    display: block;
}

.studio-tab-panes > #autocad-tab,
.studio-tab-panes > #planer-tab {
    padding: 0 !important;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    display: none;
}

.studio-tab-panes > #autocad-tab.active,
.studio-tab-panes > #planer-tab.active {
    display: flex;
    flex-direction: column;
}

#autocad-tab .studio-planner-container {
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
}

/* Responsive Overrides */
@media (max-width: 1100px) {
    .studio-ai-panel {
        width: 360px;
        min-width: 360px;
        max-width: 360px;
    }
}

@media (max-width: 860px) {
    .studio-body {
        flex-direction: column;
    }
    .studio-ai-panel {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: 380px;
    }
}


/* ==========================================================================
   Autodesk Revit / AutoCAD MEP GroÃŸkÃ¼chentechnik Add-In Theme & Viewport
   ========================================================================== */
.revit-workspace-container {
    display: flex;
    flex-direction: column;
    background: #2b313e;
    border-radius: var(--radius-lg);
    border: 1px solid #1e232d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    color: #e2e8f0;
    width: 100%;
    margin: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Maximized Fullscreen Window Mode */
.revit-workspace-container.is-maximized {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
    z-index: 99999 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.revit-workspace-container.is-maximized .revit-body-layout {
    height: calc(100vh - 175px) !important;
    max-height: none !important;
}

.revit-workspace-container.is-maximized .revit-dock-left,
.revit-workspace-container.is-maximized .revit-dock-right {
    max-height: none !important;
    height: 100% !important;
}

/* Minimized Titlebar-Only Mode */
.revit-workspace-container.is-minimized .revit-ribbon,
.revit-workspace-container.is-minimized .revit-body-layout,
.revit-workspace-container.is-minimized .revit-status-bar {
    display: none !important;
}

.revit-workspace-container.is-minimized {
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-md) !important;
}

/* 1. Revit Titlebar */
.revit-titlebar {
    background: #181d26;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =========================================================================
   CHEFS CULINAR GKT 2D/3D BIM WEB-STUDIO (Modern 4-Zone UI)
   ========================================================================= */

.studio-planner-container,
.revit-workspace-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 54px);
    width: 100%;
    background: #f8fafc;
    overflow: hidden;
}

body.dark-theme .studio-planner-container,
body.dark-theme .revit-workspace-container {
    background: #0f172a;
}

/* 1. Global Studio Bar (Top Header 44px) */
.studio-global-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    background: #ffffff;
    border-bottom: 1px solid #cbd5e1;
    gap: 12px;
    flex-shrink: 0;
    z-index: 40;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

body.dark-theme .studio-global-bar {
    background: #1e293b;
    border-bottom-color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.studio-bar-left,
.studio-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 12px;
}

body.dark-theme .project-pill {
    background: #0f172a;
    border-color: #334155;
}

.project-title {
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.2px;
}

body.dark-theme .project-title {
    color: #f8fafc;
}

.project-badge {
    background: #e2e8f0;
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

body.dark-theme .project-badge {
    background: #334155;
    color: #94a3b8;
}

.history-controls {
    display: flex;
    align-items: center;
    gap: 2px;
}

.studio-icon-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 13px;
}

.studio-icon-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

body.dark-theme .studio-icon-btn {
    color: #94a3b8;
}

body.dark-theme .studio-icon-btn:hover {
    background: #334155;
    border-color: #475569;
    color: #ffffff;
}

.studio-bar-divider {
    width: 1px;
    height: 20px;
    background: #cbd5e1;
    margin: 0 4px;
}

body.dark-theme .studio-bar-divider {
    background: #475569;
}

/* Studio Dropdowns */
.studio-dropdown {
    position: relative;
    display: inline-block;
}

.studio-dropdown-trigger .chevron-icon {
    font-size: 10px;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.studio-dropdown.open .chevron-icon {
    transform: rotate(180deg);
}

.studio-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 240px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 6px;
    z-index: 100;
    animation: dropdownFadeIn 0.15s ease;
}

.studio-dropdown-menu.dropdown-menu-right {
    left: auto;
    right: 0;
}

.studio-dropdown.open .studio-dropdown-menu {
    display: block;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

body.dark-theme .studio-dropdown-menu {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.dropdown-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    padding: 6px 10px 4px 10px;
}

body.dark-theme .dropdown-header {
    color: #94a3b8;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

body.dark-theme .dropdown-divider {
    background: #334155;
}

.dropdown-item {
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.dropdown-item i {
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.dropdown-item div {
    display: flex;
    flex-direction: column;
}

.dropdown-item strong {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
}

body.dark-theme .dropdown-item strong {
    color: #f1f5f9;
}

.dropdown-item span {
    font-size: 11px;
    color: #64748b;
}

body.dark-theme .dropdown-item span {
    color: #94a3b8;
}

.dropdown-item:hover {
    background: #f1f5f9;
}

body.dark-theme .dropdown-item:hover {
    background: #2d3748;
}

.dropdown-item.highlight-purple:hover {
    background: #faf5ff;
}

body.dark-theme .dropdown-item.highlight-purple:hover {
    background: rgba(147, 51, 234, 0.15);
}

/* 2. Contextual Canvas Toolbar (Above Drawing Canvas, 38px) */
.canvas-context-toolbar {
    display: flex;
    align-items: center;
    padding: 4px 12px;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    background: #f8fafc;
    border-bottom: 1px solid #cbd5e1;
    gap: 10px;
    flex-shrink: 0;
    z-index: 20;
}

body.dark-theme .canvas-context-toolbar {
    background: #141b26;
    border-bottom-color: #263142;
}

.canvas-bar-divider {
    width: 1px;
    height: 18px;
    background: #cbd5e1;
    margin: 0 4px;
}

body.dark-theme .canvas-bar-divider {
    background: #334155;
}

/* Segmented View Switcher (2D / 3D / BIM) */
.studio-segmented-control {
    display: inline-flex;
    background: #e2e8f0;
    padding: 2px;
    border-radius: 6px;
    gap: 2px;
    border: 1px solid #cbd5e1;
    flex-shrink: 0;
}

body.dark-theme .studio-segmented-control {
    background: #0f172a;
    border-color: #334155;
}

.studio-segment-btn {
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.studio-segment-btn:hover {
    color: #0f172a;
}

body.dark-theme .studio-segment-btn {
    color: #94a3b8;
}

body.dark-theme .studio-segment-btn:hover {
    color: #ffffff;
}

.studio-segment-btn.active {
    background: #ffffff;
    color: #004b99;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

body.dark-theme .studio-segment-btn.active {
    background: #1e293b;
    color: #38bdf8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Compact Select Controls */
.studio-control-compact {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px 8px;
    flex-shrink: 0;
}

body.dark-theme .studio-control-compact {
    background: #1e293b;
    border-color: #334155;
}

.studio-select-sm {
    background: transparent;
    border: none;
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    outline: none;
}

body.dark-theme .studio-select-sm {
    color: #e2e8f0;
}

/* 3. Floating MEP Layer HUD (Bottom-Left over Canvas) */
.mep-floating-hud {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 20px;
    padding: 4px 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 30;
}

body.dark-theme .mep-floating-hud {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hud-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

body.dark-theme .hud-label {
    color: #94a3b8;
}

.mep-pill-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.mep-pill-btn:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.05);
}

body.dark-theme .mep-pill-btn {
    color: #94a3b8;
}

body.dark-theme .mep-pill-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.mep-pill-btn.active {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #004b99;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.dark-theme .mep-pill-btn.active {
    background: #0f172a;
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Studio Action Buttons */
.studio-tool-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    height: 32px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.studio-tool-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.studio-tool-btn:active {
    transform: translateY(0);
}

body.dark-theme .studio-tool-btn {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.dark-theme .studio-tool-btn:hover {
    background: #283548;
    border-color: #475569;
    color: #ffffff;
}

/* Primary CTA Button */
.studio-tool-btn-primary {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    border-color: #003366;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 64, 133, 0.3);
}

.studio-tool-btn-primary:hover {
    background: linear-gradient(135deg, #0069d9 0%, #004c9e 100%);
    border-color: #004085;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 64, 133, 0.4);
}

body.dark-theme .studio-tool-btn-primary {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border-color: #0284c7;
    color: #ffffff !important;
}

body.dark-theme .ribbon-btn-large:hover {
    background: #2c3547;
    border-color: #0073e6;
    color: #ffffff;
}

body.dark-theme .ribbon-btn-large.active {
    background: linear-gradient(135deg, rgba(0, 115, 230, 0.25) 0%, rgba(0, 75, 153, 0.35) 100%);
    border-color: #0073e6;
    color: #ffffff;
}

.ribbon-btn-large.highlight-green {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.ribbon-btn-large.highlight-green:hover {
    background: #dcfce7;
    border-color: #22c55e;
}

body.dark-theme .ribbon-btn-large.highlight-green {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.08);
}

body.dark-theme .ribbon-btn-large.highlight-green:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

.ribbon-icon-wrap {
    font-size: 20px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ribbon-btn-large span {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

.ribbon-btn-large span small {
    font-size: 9px;
    color: #64748b;
    font-weight: 500;
}

body.dark-theme .ribbon-btn-large span small {
    color: #94a3b8;
}

.panel-tools-vertical {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tool-row-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #334155;
}

body.dark-theme .tool-row-compact {
    color: #cbd5e1;
}

.tool-row-compact label {
    margin: 0;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.revit-select-sm {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 3px;
    outline: none;
}

body.dark-theme .revit-select-sm {
    background: #181d26;
    border-color: #3b4455;
    color: #ffffff;
}

.gewerke-toggles-ribbon {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.gewerke-toggles-ribbon .gewerke-btn {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.gewerke-toggles-ribbon .gewerke-btn:hover {
    background: #f1f5f9;
    color: var(--chefs-navy);
}

.gewerke-toggles-ribbon .gewerke-btn.active {
    background: #004b99;
    border-color: #004b99;
    color: #ffffff;
}

body.dark-theme .gewerke-toggles-ribbon .gewerke-btn {
    background: #1e2430;
    border-color: #3b4455;
    color: #94a3b8;
}

body.dark-theme .gewerke-toggles-ribbon .gewerke-btn:hover {
    background: #2a3344;
    color: #ffffff;
}

body.dark-theme .gewerke-toggles-ribbon .gewerke-btn.active {
    background: #004b99;
    border-color: #0073e6;
    color: #ffffff;
}

.ribbon-btn-compact {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    padding: 5px 10px;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.ribbon-btn-compact:hover {
    background: #f1f5f9;
    color: var(--chefs-navy);
    border-color: #004b99;
}

body.dark-theme .ribbon-btn-compact {
    background: #1e2430;
    border-color: #3b4455;
    color: #cbd5e1;
}

body.dark-theme .ribbon-btn-compact:hover {
    background: #2a3344;
    color: #ffffff;
}

/* 3. Revit / Studio Main Layout */
.revit-body-layout {
    --dock-left-w: 280px;
    --dock-right-w: 360px;
    --splitter-w: 6px;

    display: grid;
    grid-template-columns: var(--dock-left-w) var(--splitter-w) minmax(320px, 1fr) var(--splitter-w) var(--dock-right-w);
    grid-template-areas: "dockL splitL center splitR dockR";
    grid-template-rows: 100%;
    background: #f8fafc;
    flex: 1;
    height: calc(100vh - 54px - 48px);
    max-height: calc(100vh - 54px - 48px);
    overflow: hidden;
}

body.dark-theme .revit-body-layout {
    background: #181d26;
}

/* Left & Right Docks */
.revit-dock-left {
    grid-area: dockL;
    min-width: 0;
    background: #ffffff;
    border-right: 1px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    overflow-y: auto;
    height: 100%;
}

.revit-splitter-left {
    grid-area: splitL;
    cursor: col-resize;
    background: #cbd5e1;
    transition: background 0.15s ease;
    user-select: none;
    touch-action: none;
    position: relative;
    z-index: 20;
    width: var(--splitter-w);
}

.revit-splitter-left:hover,
.revit-splitter-left.dragging {
    background: #004b99 !important;
}

.revit-splitter-left::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -5px;
    right: -5px;
    cursor: col-resize;
    z-index: 22;
}

body.dark-theme .revit-splitter-left {
    background: #334155;
}

body.dark-theme .revit-splitter-left:hover,
body.dark-theme .revit-splitter-left.dragging {
    background: #0284c7 !important;
}

.revit-center-viewport {
    grid-area: center;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    contain: layout paint style;
    height: 100%;
}

.revit-splitter-right {
    grid-area: splitR;
    cursor: col-resize;
    background: #cbd5e1;
    transition: background 0.15s ease;
    user-select: none;
    touch-action: none;
    position: relative;
    z-index: 20;
    width: var(--splitter-w);
}

.revit-splitter-right:hover,
.revit-splitter-right.dragging {
    background: #004b99 !important;
}

.revit-splitter-right::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -5px;
    right: -5px;
    cursor: col-resize;
    z-index: 22;
}

body.dark-theme .revit-splitter-right {
    background: #334155;
}

body.dark-theme .revit-splitter-right:hover,
body.dark-theme .revit-splitter-right.dragging {
    background: #0284c7 !important;
}

/* Global Resizing Safety */
body.is-resizing-splitter,
body.is-resizing-splitter * {
    user-select: none !important;
    -webkit-user-select: none !important;
}

body.is-resizing-splitter iframe,
body.is-resizing-splitter canvas,
body.is-resizing-splitter svg {
    pointer-events: none !important;
}

body.is-resizing-splitter .revit-splitter-left,
body.is-resizing-splitter .revit-splitter-right,
body.is-resizing-splitter .studio-ai-splitter {
    pointer-events: auto !important;
}

.revit-dock-right {
    grid-area: dockR;
    min-width: 0;
    background: #ffffff;
    border-left: 1px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    overflow-y: auto;
    height: 100%;
}

body.dark-theme .revit-dock-left {
    background: #1f2532;
    border-right-color: #141820;
}

body.dark-theme .revit-dock-right {
    background: #1f2532;
    border-left-color: #141820;
}

.revit-panel-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

body.dark-theme .revit-panel-card {
    background: #262e3d;
    border-color: #353f52;
}

.revit-dock-header {
    background: #f1f5f9;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--chefs-navy);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
}

body.dark-theme .revit-dock-header {
    background: #1c222d;
    color: #cbd5e1;
    border-bottom-color: #353f52;
}

/* Tree View */
.revit-tree-view {
    padding: 8px;
    font-size: 11px;
}

.tree-node {
    margin-bottom: 6px;
}

.tree-label {
    color: #004b99;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
}

body.dark-theme .tree-label {
    color: #93c5fd;
}

.tree-children {
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 2px;
}

.tree-item {
    color: #475569;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.1s ease;
}

.tree-item:hover {
    background: #e2e8f0;
    color: #0f172a;
}

body.dark-theme .tree-item {
    color: #94a3b8;
}

body.dark-theme .tree-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.tree-item.active {
    background: #004b99;
    color: #ffffff;
    font-weight: 600;
}

/* Palette inside Revit Dock - Full Height Flex */
.revit-dock-left .palette-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
}

.revit-dock-left .palette-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: grab;
    transition: all 0.15s ease;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.revit-dock-left .palette-item:hover {
    background: #f8fafc;
    border-color: #004b99;
    box-shadow: 0 3px 8px rgba(0, 75, 153, 0.08);
    transform: translateY(-1px);
}

body.dark-theme .revit-dock-left .palette-item {
    background: #1e293b;
    border-color: #334155;
    color: #ffffff;
}

body.dark-theme .revit-dock-left .palette-item:hover {
    background: #283548;
    border-color: #38bdf8;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.revit-dock-left .family-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

body.dark-theme .revit-dock-left .family-icon-box {
    background: #0f172a;
}

.revit-dock-left .family-title {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-theme .revit-dock-left .family-title {
    color: #f1f5f9;
}

.revit-dock-left .family-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-theme .revit-dock-left .family-meta {
    color: #94a3b8;
}

.revit-dock-left .mfg-tag {
    font-weight: 600;
    color: #004b99;
}

body.dark-theme .revit-dock-left .mfg-tag {
    color: #38bdf8;
}

.revit-dock-left .add-palette-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    background: transparent;
    color: #64748b;
    font-size: 11px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.revit-dock-left .add-palette-btn:hover {
    background: #004b99;
    border-color: #004b99;
    color: #ffffff;
}

body.dark-theme .revit-dock-left .add-palette-btn {
    border-color: #475569;
    color: #94a3b8;
}

body.dark-theme .revit-dock-left .add-palette-btn:hover {
    background: #38bdf8;
    border-color: #38bdf8;
    color: #0f172a;
}

/* 4. Center Viewport Workspace (Revit Clean Architectural Canvas) */
.revit-center-viewport {
    background: #f8fafc;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.dark-theme .revit-center-viewport {
    background: #141820;
}

.revit-center-viewport .canvas-container {
    background: #f1f5f9;
    position: relative;
    flex: 1;
    min-height: 580px;
    display: flex;
    flex-direction: column;
}

body.dark-theme .revit-center-viewport .canvas-container {
    background: #10141b;
}

.revit-center-viewport .cad-grid-workspace {
    flex: 1;
    position: relative;
    background-color: #ffffff;
    background-image: 
        radial-gradient(circle, #cbd5e1 1px, transparent 1px),
        linear-gradient(to right, #f1f5f9 1px, transparent 1px),
        linear-gradient(to bottom, #f1f5f9 1px, transparent 1px);
    background-size: 20px 20px, 100px 100px, 100px 100px;
    overflow: hidden;
    cursor: crosshair;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 16px rgba(0, 43, 92, 0.04);
}

body.dark-theme .revit-center-viewport .cad-grid-workspace {
    background-color: #0e1219;
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    border-color: #475569;
}

/* Revit Block in Bright Canvas */
.placed-block {
    position: absolute;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #004b99;
    border-radius: var(--radius-sm);
    color: #0f172a;
    cursor: grab;
    user-select: none;
    display: flex;
    flex-direction: column;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0, 43, 92, 0.12);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.placed-block:hover {
    box-shadow: 0 6px 16px rgba(0, 75, 153, 0.25);
    border-color: #0073e6;
}

.placed-block.selected {
    border-color: #009fe3 !important;
    box-shadow: 0 0 0 3px rgba(0, 159, 227, 0.35), 0 8px 24px rgba(0, 75, 153, 0.25) !important;
    z-index: 50;
}

/* 8-Point CAD Interactive Resize Handles */
.resize-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffffff;
    border: 1.5px solid #0073e6;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.35);
    z-index: 60;
    box-sizing: border-box;
    display: none;
    pointer-events: all;
    touch-action: none;
}

.placed-block.selected .resize-handle {
    display: block;
}

.resize-handle.rh-nw { top: -4px; left: -4px; cursor: nwse-resize; }
.resize-handle.rh-ne { top: -4px; right: -4px; cursor: nesw-resize; }
.resize-handle.rh-se { bottom: -4px; right: -4px; cursor: nwse-resize; }
.resize-handle.rh-sw { bottom: -4px; left: -4px; cursor: nesw-resize; }
.resize-handle.rh-n  { top: -4px; left: 50%; margin-left: -4px; cursor: ns-resize; }
.resize-handle.rh-s  { bottom: -4px; left: 50%; margin-left: -4px; cursor: ns-resize; }
.resize-handle.rh-e  { top: 50%; right: -4px; margin-top: -4px; cursor: ew-resize; }
.resize-handle.rh-w  { top: 50%; left: -4px; margin-top: -4px; cursor: ew-resize; }

.resize-handle:hover {
    background: #0073e6;
    transform: scale(1.3);
}

/* Draggable Revit Dock Splitters */
.revit-splitter {
    cursor: col-resize;
    position: relative;
    z-index: 30;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #cbd5e1;
    touch-action: none;
    user-select: none;
}

body.dark-theme .revit-splitter {
    background: #232936;
}

.revit-splitter:hover, .revit-splitter.dragging {
    background: #009fe3 !important;
}

.revit-splitter::after {
    content: '';
    position: absolute;
    inset: 0 -4px;
}

/* CAD Zoom / Pan Transform Container */
.cad-transform-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
    will-change: transform;
}

/* Room Dimension Stepper Buttons */
.dim-step-btn {
    background: rgba(0, 75, 153, 0.12);
    border: 1px solid rgba(0, 75, 153, 0.25);
    color: var(--chefs-navy);
    font-weight: 800;
    font-size: 13px;
    width: 22px;
    height: 22px;
    line-height: 1;
    border-radius: var(--radius-sm, 4px);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
    transition: all 0.15s ease;
    vertical-align: middle;
}

.dim-step-btn:hover {
    background: #004b99;
    color: #ffffff;
    transform: scale(1.1);
}

body.dark-theme .dim-step-btn {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

body.dark-theme .dim-step-btn:hover {
    background: #0073e6;
    color: #ffffff;
}

/* Interactive Properties Inputs */
.revit-prop-input {
    width: 60px;
    padding: 3px 5px;
    font-size: 11px;
    font-family: inherit;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    background: #ffffff;
    color: #0f172a;
    text-align: right;
    font-weight: 700;
}

body.dark-theme .revit-prop-input {
    background: #181d26;
    border-color: #3b4455;
    color: #ffffff;
}

.revit-prop-input:focus {
    outline: none;
    border-color: #0073e6;
    box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.2);
}

.revit-prop-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    padding: 6px 8px;
    background: #f1f5f9;
    border-radius: 4px;
}

body.dark-theme .revit-prop-actions {
    background: #181d26;
}

/* Model Variant Popup Menu */
.type-selector-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    display: none;
}

body.dark-theme .type-selector-menu {
    background: #1e2430;
    border-color: #3b4455;
}

.type-option-item {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.1s ease;
    border-bottom: 1px solid #f1f5f9;
}

body.dark-theme .type-option-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.type-option-item:hover {
    background: #f1f5f9;
    color: #004b99;
}

body.dark-theme .type-option-item:hover {
    background: #2a3344;
    color: #38bdf8;
}

.block-title {
    font-size: 11px;
    font-weight: 700;
    color: #002b5c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-theme .block-title {
    color: #ffffff;
}

.block-spec {
    font-size: 10px;
    color: #64748b;
}

body.dark-theme .block-spec {
    color: #94a3b8;
}

/* Revit ViewCube & Compass */
.revit-viewcube {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 74px;
    height: 74px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    user-select: none;
}

body.dark-theme .revit-viewcube {
    background: rgba(28, 34, 45, 0.94);
    border-color: #353f52;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.viewcube-compass {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.compass-n, .compass-e, .compass-s, .compass-w {
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.15s ease;
    user-select: none;
}

.compass-n:hover, .compass-e:hover, .compass-s:hover, .compass-w:hover {
    color: #004b99 !important;
    font-weight: 900 !important;
    transform: scale(1.2);
}

body.dark-theme .compass-n:hover, body.dark-theme .compass-e:hover, body.dark-theme .compass-s:hover, body.dark-theme .compass-w:hover {
    color: #38bdf8 !important;
}

.compass-n {
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 800;
    color: #004b99;
}

body.dark-theme .compass-n {
    color: #38bdf8;
}

.compass-e {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
}

.compass-s {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
}

.compass-w {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
}

.viewcube-box {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid #94a3b8;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.15s ease;
}

.viewcube-box:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    border-color: #003366;
    box-shadow: 0 2px 6px rgba(0, 64, 133, 0.3);
}

.viewcube-box:hover .cube-top {
    color: #ffffff;
}

.cube-face {
    font-size: 11px;
    font-weight: 800;
    color: #334155;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

body.dark-theme .viewcube-box {
    background: linear-gradient(135deg, #2d3748 0%, #1e293b 100%);
    border-color: #475569;
}

body.dark-theme .cube-face {
    color: #e2e8f0;
}

.revit-nav-bar {
    position: absolute;
    top: 95px;
    right: 32px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 20;
}

body.dark-theme .revit-nav-bar {
    background: #232936;
    border-color: #3b4455;
}

.nav-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: #475569;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.1s ease;
}

.nav-btn:hover {
    background: #f1f5f9;
    color: var(--chefs-navy);
}

.nav-btn.active {
    background: #004b99 !important;
    color: #ffffff !important;
}

body.dark-theme .nav-btn {
    color: #cbd5e1;
}

body.dark-theme .nav-btn:hover {
    background: #353f52;
    color: #ffffff;
}

body.dark-theme .nav-btn.active {
    background: #0284c7 !important;
    color: #ffffff !important;
}

/* Revit Dimension Chains (Top & Left) */
.revit-dimension-top {
    position: absolute;
    top: 6px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    pointer-events: none;
    transition: width 0.2s ease, left 0.2s ease;
}

.revit-dimension-top .dim-line {
    flex: 1;
    height: 1px;
    background: #94a3b8;
    position: relative;
}

.revit-dimension-top .dim-line::before,
.revit-dimension-top .dim-line::after {
    content: '';
    position: absolute;
    top: -4px;
    width: 1px;
    height: 9px;
    background: #64748b;
}
.revit-dimension-top .dim-line:first-child::before { left: 0; }
.revit-dimension-top .dim-line:last-child::after { right: 0; }

.revit-dimension-left {
    position: absolute;
    left: 6px;
    width: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 30;
    pointer-events: none;
    transition: height 0.2s ease, top 0.2s ease;
}

.revit-dimension-left .dim-line {
    flex: 1;
    width: 1px;
    background: #94a3b8;
    position: relative;
}

.revit-dimension-left .dim-line::before,
.revit-dimension-left .dim-line::after {
    content: '';
    position: absolute;
    left: -4px;
    height: 1px;
    width: 9px;
    background: #64748b;
}
.revit-dimension-left .dim-line:first-child::before { top: 0; }
.revit-dimension-left .dim-line:last-child::after { bottom: 0; }

.dim-label {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    color: #334155;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    user-select: none;
}

.dim-label strong {
    color: #004b99;
    font-family: var(--font-mono);
}

.dim-desc {
    color: #64748b;
    font-size: 10px;
    font-weight: 500;
}

body.dark-theme .dim-label {
    background: rgba(30, 41, 59, 0.95);
    border-color: #475569;
    color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

body.dark-theme .dim-label strong {
    color: #38bdf8;
}

body.dark-theme .dim-desc {
    color: #94a3b8;
}

/* Revit UCS Coordinate Cross */
.revit-ucs-icon {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 38px;
    height: 38px;
    z-index: 25;
    pointer-events: none;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.revit-ucs-icon:hover {
    opacity: 1;
}

.revit-view-control-bar {
    height: 28px;
    background: #f1f5f9;
    border-top: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    font-size: 11px;
    color: #475569;
}

body.dark-theme .revit-view-control-bar {
    background: #181d26;
    border-top-color: #28303f;
    color: #94a3b8;
}

/* Type Selector */
.revit-type-selector {
    background: #f1f5f9;
    border-bottom: 1px solid #cbd5e1;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

body.dark-theme .revit-type-selector {
    background: #1c222d;
    border-bottom-color: #353f52;
}

.revit-params-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    table-layout: auto;
}

.revit-params-table th {
    background: #f1f5f9;
    color: var(--chefs-navy);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 8px;
    border-bottom: 1px solid #cbd5e1;
    text-align: left;
    white-space: nowrap;
}

body.dark-theme .revit-params-table th {
    background: #1e2532;
    color: #93c5fd;
    border-bottom-color: #353f52;
}

.revit-params-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    line-height: 1.35;
}

body.dark-theme .revit-params-table td {
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

.revit-params-table .p-name {
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
    padding-right: 10px;
    font-size: 11px;
}

body.dark-theme .revit-params-table .p-name {
    color: #94a3b8;
}

.revit-params-table .p-val {
    color: #0f172a;
    font-weight: 600;
    text-align: right;
    font-size: 11px;
    white-space: normal;
    word-break: normal;
}

body.dark-theme .revit-params-table .p-val {
    color: #ffffff;
}

.revit-status-bar {
    background: #f1f5f9;
    border-top: 1px solid #cbd5e1;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #475569;
}

body.dark-theme .revit-status-bar {
    background: #141820;
    border-top-color: #232936;
    color: #94a3b8;
}

/* ==========================================================================
   BIM Kaulquappe & OpenBIM IFC Inspektor Viewport
   ========================================================================== */
.viewport-bim-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    min-height: 580px;
    overflow-y: auto;
}

body.dark-theme .viewport-bim-container {
    background: #0f172a;
}

.bim-kaulquappe-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #cbd5e1;
    flex-wrap: wrap;
    gap: 10px;
}

body.dark-theme .bim-kaulquappe-header {
    background: #1e293b;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.bim-badge-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bim-brand-pill {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

body.dark-theme .bim-brand-pill {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}

.bim-status-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bim-status-pill.green { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.bim-status-pill.blue { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.bim-status-pill.purple { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }

body.dark-theme .bim-status-pill.green { background: rgba(34, 197, 94, 0.15); color: #4ade80; border-color: rgba(34, 197, 94, 0.3); }
body.dark-theme .bim-status-pill.blue { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border-color: rgba(56, 189, 248, 0.3); }
body.dark-theme .bim-status-pill.purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; border-color: rgba(168, 85, 247, 0.3); }

.bim-inspector-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    flex: 1;
    min-height: 520px;
}

.bim-tree-panel {
    background: #f8fafc;
    border-right: 1px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

body.dark-theme .bim-tree-panel {
    background: #131e36;
    border-right-color: rgba(255, 255, 255, 0.1);
}

.bim-props-panel {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

body.dark-theme .bim-props-panel {
    background: #0f172a;
}

.bim-panel-title {
    padding: 10px 14px;
    background: #f1f5f9;
    border-bottom: 1px solid #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    color: var(--chefs-navy);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.dark-theme .bim-panel-title {
    background: #1e293b;
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.bim-entity-list {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bim-entity-item {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    transition: all 0.15s ease;
}

.bim-entity-item:hover {
    background: #f1f5f9;
    border-color: #004b99;
}

body.dark-theme .bim-entity-item {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .bim-entity-item:hover {
    background: #27354f;
    border-color: #38bdf8;
}

.bim-entity-item.active {
    background: #eff6ff;
    border-color: #004b99;
    color: #004b99;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 75, 153, 0.1);
}

body.dark-theme .bim-entity-item.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #38bdf8;
}

.bim-psets-container {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bim-pset-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

body.dark-theme .bim-pset-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

.bim-pset-header {
    padding: 8px 12px;
    background: #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    color: var(--chefs-navy);
    display: flex;
    align-items: center;
    gap: 6px;
}

body.dark-theme .bim-pset-header {
    background: #0f172a;
    color: #93c5fd;
}

.bim-pset-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.bim-pset-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #e2e8f0;
}

body.dark-theme .bim-pset-table td {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.bim-pset-table tr:last-child td {
    border-bottom: none;
}

.bim-pset-table .pset-key {
    color: #64748b;
    width: 38%;
    font-weight: 500;
}

body.dark-theme .bim-pset-table .pset-key {
    color: #94a3b8;
}

.bim-pset-table .pset-val {
    color: #0f172a;
    font-weight: 600;
}

body.dark-theme .bim-pset-table .pset-val {
    color: #ffffff;
}

/* CAD Block Professional Vector Styles */
.cad-pro-block {
    position: absolute;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 249, 255, 0.96) 100%);
    border: 1.5px solid #005696;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 43, 92, 0.12);
    cursor: move;
    user-select: none;
    z-index: 15;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    overflow: visible;
    box-sizing: border-box;
}

.cad-pro-block:hover {
    box-shadow: 0 4px 14px rgba(0, 75, 153, 0.22);
    border-color: #0073e6;
    z-index: 20;
}

.cad-pro-block.selected {
    border-color: #d97706 !important;
    box-shadow: 0 0 0 2px #f59e0b, 0 4px 14px rgba(217, 119, 6, 0.3) !important;
    z-index: 25;
}

body.dark-theme .cad-pro-block {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(30, 41, 59, 0.96) 100%);
    border-color: #38bdf8;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

body.dark-theme .cad-pro-block:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 0 1px #38bdf8;
    border-color: #60a5fa;
}

body.dark-theme .cad-pro-block.selected {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px #ef4444, 0 0 16px rgba(239, 68, 68, 0.5) !important;
}

.cad-block-vector {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    shape-rendering: geometricPrecision;
}

/* CAD Block Context Controls (Clean floating toolbar on hover/select) */
.block-controls {
    position: absolute;
    top: -28px;
    right: 0;
    display: none;
    align-items: center;
    gap: 3px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    z-index: 70;
    pointer-events: auto;
}

body.dark-theme .block-controls {
    background: #1e293b;
    border-color: #475569;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.cad-pro-block:hover .block-controls,
.cad-pro-block.selected .block-controls {
    display: flex;
}

.block-controls button {
    background: transparent;
    border: none;
    color: #475569;
    font-size: 11px;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
}

.block-controls button:hover {
    background: #f1f5f9;
    color: var(--chefs-blue);
}

.block-controls button.text-danger:hover {
    background: #fee2e2;
    color: #ef4444;
}

body.dark-theme .block-controls button {
    color: #cbd5e1;
}

body.dark-theme .block-controls button:hover {
    background: #334155;
    color: #38bdf8;
}

body.dark-theme .block-controls button.text-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* CAD Architectural Annotation Overlay */
.cad-overlay-meta {
    position: absolute;
    bottom: 2px;
    left: 3px;
    right: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    z-index: 20;
    gap: 3px;
    overflow: hidden;
}

.cad-pos-pill {
    background: #004b99;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 3px;
    border-radius: 2px;
    font-family: var(--font-mono);
    letter-spacing: 0.2px;
    line-height: 1.2;
    flex-shrink: 0;
}

body.dark-theme .cad-pos-pill {
    background: #0284c7;
}

.cad-name-label {
    font-size: 8px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

body.dark-theme .cad-name-label {
    color: #f1f5f9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.cad-dim-tag {
    font-size: 10px;
    color: #64748b;
    font-family: var(--font-mono);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

body.dark-theme .cad-dim-tag {
    color: #94a3b8;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Responsive block sizes for small/compact items (e.g. Brita filter, small sockets) */
.cad-pro-block.size-sm .cad-name-label {
    display: none;
}

.cad-pro-block.size-xs .cad-overlay-meta {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    bottom: auto;
    left: auto;
    right: auto;
}

.cad-pro-block.size-xs .cad-name-label,
.cad-pro-block.size-xs .cad-dim-tag {
    display: none;
}

/* Revit BIM Family Item Styling in Dock (Theme Responsive) */
.cad-family-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: grab;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.cad-family-item:hover {
    background: #f8fafc;
    border-color: #004b99;
    box-shadow: 0 3px 8px rgba(0, 75, 153, 0.08);
    transform: translateY(-1px);
}

body.dark-theme .cad-family-item {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .cad-family-item:hover {
    background: #283548 !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.family-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

body.dark-theme .family-icon-box {
    background: #0f172a;
    border-color: #334155;
}

.family-title {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-theme .family-title {
    color: #f1f5f9;
}

.family-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-theme .family-meta {
    color: #94a3b8;
}

/* ==========================================================================
   2D / 3D BIM Switcher & 3D HUD Visualizer Styles
   ========================================================================== */
.viewport-mode-switcher {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    background: #181d26;
    border: 1px solid #353f52;
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 3px;
    z-index: 30;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.mode-switch-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.mode-switch-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.mode-switch-btn.active {
    background: #004b99;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 75, 153, 0.4);
}

/* 3D Viewport HUD Topbar */
.viewport-3d-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 560px;
    overflow: hidden;
}

.bim-hud-topbar {
    position: absolute;
    top: 14px;
    left: 170px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 25;
    pointer-events: none;
}

.hud-group {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(24, 29, 38, 0.9);
    backdrop-filter: blur(4px);
    border: 1px solid #353f52;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: auto;
}

.hud-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    margin-right: 4px;
}

.hud-btn {
    background: #1e2430;
    border: 1px solid #3b4455;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.hud-btn:hover {
    background: #2a3344;
    color: #ffffff;
    border-color: #0073e6;
}

.hud-btn.active {
    background: #004b99;
    color: #ffffff;
    border-color: #009fe3;
}

.hud-badges {
    display: flex;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 0;
}

.bim-hud-badge {
    background: rgba(24, 29, 38, 0.9);
    border: 1px solid #353f52;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #cbd5e1;
}

.stage-3d {
    width: 100%;
    height: 100%;
}

.controls-overlay-3d {
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 25;
    pointer-events: none;
}

.controls-overlay-3d > * {
    pointer-events: auto;
}

/* 3D BIM Viewport Mode Switcher & HUD Topbar */
.viewport-mode-switcher-bar {
    background: #181d26;
    border-bottom: 1px solid #28303f;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 25;
}

.mode-switch-group {
    display: flex;
    background: #10141b;
    border: 1px solid #2d3748;
    border-radius: 4px;
    padding: 2px;
    gap: 2px;
}

.mode-switch-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.mode-switch-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.mode-switch-btn.active {
    background: #004b99;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 75, 153, 0.4);
}

.viewport-meta-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #94a3b8;
    font-family: var(--font-mono);
}

.bim-hud-topbar {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 6px 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.hud-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hud-label {
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
}

.hud-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.hud-btn:hover {
    background: #334155;
    color: #ffffff;
}

.hud-btn.active {
    background: #0073e6;
    border-color: #38bdf8;
    color: #ffffff;
}

.hud-badge {
    background: rgba(0, 159, 227, 0.15);
    border: 1px solid rgba(0, 159, 227, 0.3);
    color: #38bdf8;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.viewport-3d-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 560px;
    overflow: hidden;
}

.stage-3d {
    width: 100%;
    height: 100%;
    display: block;
}

/* ==========================================================================
   Header Mode Switcher (Experten-Studio vs. Kunden-Studio)
   ========================================================================== */
.mode-switch-container {
    display: flex;
    background: #e2e8f0;
    padding: 3px;
    border-radius: var(--radius-full);
    border: 1px solid #cbd5e1;
    gap: 4px;
    justify-self: center;
}

body.dark-theme .mode-switch-container {
    background: #1e293b;
    border-color: #334155;
}

.mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    background: transparent;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mode-btn:hover {
    color: #004b99;
    background: rgba(255, 255, 255, 0.7);
}

body.dark-theme .mode-btn {
    color: #94a3b8;
}

body.dark-theme .mode-btn:hover {
    color: #38bdf8;
    background: rgba(255, 255, 255, 0.08);
}

.mode-btn.active {
    background: #004b99 !important; /* CHEFS CULINAR Königsblau */
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 75, 153, 0.35);
}

body.dark-theme .mode-btn.active {
    background: #0284c7 !important;
    color: #ffffff !important;
}

.mode-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 1px 7px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.mode-tag.expert {
    background: #f1f5f9;
    color: #475569;
}

.mode-tag.customer {
    background: #f1f5f9;
    color: #475569;
}

.mode-btn.active .mode-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 1px 7px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

/* ==========================================================================
   Customer Self-Service Studio Layout & Components
   ========================================================================== */
.customer-studio-body {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    background: #f8fafc;
    overflow: hidden;
}

body.dark-theme .customer-studio-body {
    background: #0b1120;
}

/* Left Wizard Panel */
.cust-wizard-panel {
    --cust-panel-w: 480px;
    width: var(--cust-panel-w);
    min-width: var(--cust-panel-w);
    max-width: var(--cust-panel-w);
    flex-shrink: 0;
    background: #ffffff;
    border-right: 1px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    box-shadow: 4px 0 16px rgba(0, 43, 92, 0.04);
    z-index: 10;
    transition: min-width 0.15s ease, max-width 0.15s ease;
}

.cust-wizard-panel.collapsed {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
}

.cust-wizard-panel.collapsed .cust-wizard-header,
.cust-wizard-panel.collapsed .ai-panel-header .ai-brand-titles,
.cust-wizard-panel.collapsed #custWizardView,
.cust-wizard-panel.collapsed #custPromptView {
    display: none !important;
}

body.dark-theme .cust-wizard-panel {
    background: #111827;
    border-right-color: rgba(255, 255, 255, 0.1);
}

.cust-wizard-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #002b5c 0%, #004b99 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.wizard-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.cust-wizard-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
}

.cust-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
}

/* Dual-Mode Switcher Tabs (Express-Planer vs. KI-Fachberater) */
.cust-panel-tabs-bar {
    display: flex;
    background: #e2e8f0;
    padding: 3px;
    margin: 8px 12px 6px 12px;
    border-radius: 8px;
    gap: 4px;
    flex-shrink: 0;
}

.cust-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cust-tab-btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.5);
}

.cust-tab-btn.active {
    background: #ffffff;
    color: #004b99;
    box-shadow: 0 1px 3px rgba(0, 43, 92, 0.12);
}

.cust-tab-btn.active i {
    color: #004b99;
}

body.dark-theme .cust-panel-tabs-bar {
    background: #1e293b;
}

body.dark-theme .cust-tab-btn {
    color: #94a3b8;
}

body.dark-theme .cust-tab-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .cust-tab-btn.active {
    background: #0f172a;
    color: #38bdf8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

body.dark-theme .cust-tab-btn.active i {
    color: #38bdf8;
}

/* Referenz-Konzepte Full Cards (Dedicated Tab View) */
.cust-preset-card-full:hover {
    border-color: #004b99 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 43, 92, 0.08);
}

body.dark-theme #custPresetsView {
    background: #0f172a !important;
}

body.dark-theme .cust-preset-card-full {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

body.dark-theme .cust-preset-card-full:hover {
    border-color: #38bdf8 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-theme .cust-preset-card-full strong {
    color: #f8fafc !important;
}

body.dark-theme .cust-preset-card-full div {
    color: #cbd5e1;
}

/* Step-by-Step Stepper Bar */
.cust-stepper-bar {
    display: flex;
    background: #f1f5f9;
    padding: 6px 12px;
    border-bottom: 1px solid #e2e8f0;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

.step-nav-pill {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 6px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.step-nav-pill .step-dot {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-nav-pill.active {
    background: #ffffff;
    color: #004b99;
    border-color: #cbd5e1;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.step-nav-pill.active .step-dot {
    background: #004b99;
    color: #ffffff;
}

.step-nav-pill.completed .step-dot {
    background: #10b981;
    color: #ffffff;
}

.cust-prompt-view-container,
#custPromptView {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.cust-wizard-view-container {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    max-height: 48vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    transition: max-height 0.2s ease;
}

.cust-wizard-view-container.collapsed {
    max-height: 80px !important;
    overflow: hidden !important;
}

.cust-wizard-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.cust-wizard-toggle-header:hover {
    background: #f1f5f9;
}

body.dark-theme .cust-wizard-toggle-header {
    background: #1e293b;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .cust-wizard-toggle-header span {
    color: #f8fafc !important;
}

.cust-wizard-toggle-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cust-wizard-toggle-right .btn-wizard-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: #004b99;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

body.dark-theme .cust-wizard-toggle-right .btn-wizard-toggle {
    color: #38bdf8;
}

body.dark-theme .cust-wizard-view-container {
    background: #111827;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.cust-steps-container {
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.cust-step-card {
    background: #ffffff;
    border: none;
    border-radius: 0;
    padding: 0;
}

.wizard-step-footer {
    display: flex;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.cust-wizard-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.cust-wizard-summary:hover {
    background: #f1f5f9;
}

.summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.summary-chip {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-full);
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-summary-edit {
    border: none;
    background: transparent;
    color: #004b99;
    font-size: 13px;
    cursor: pointer;
    padding: 4px;
}

body.dark-theme .cust-step-card {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.08);
}

.step-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--chefs-navy);
}

body.dark-theme .step-label {
    color: #f8fafc;
}

.step-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--chefs-royal);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tile Grid */
.cust-tile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.cust-tile-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.cust-tile {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-primary);
}

.cust-tile i {
    font-size: 18px;
    color: var(--chefs-blue);
}

.cust-tile span {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

.cust-tile:hover {
    border-color: var(--chefs-blue);
    background: #f0f7ff;
    transform: translateY(-1px);
}

.cust-tile.active {
    border-color: var(--chefs-royal);
    background: #e0f2fe;
    color: var(--chefs-navy);
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(0, 75, 153, 0.2);
}

body.dark-theme .cust-tile {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.12);
    color: #e5e7eb;
}

body.dark-theme .cust-tile:hover {
    background: #1e293b;
    border-color: var(--chefs-cyan);
}

body.dark-theme .cust-tile.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #ffffff;
}

.cust-tile.small {
    padding: 8px 4px;
}

.cust-tile.small i {
    font-size: 15px;
}

.cust-tile.small span {
    font-size: 11px;
}

/* Meals Selector */
.cust-meals-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.meals-val-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

.meals-val-display span {
    font-size: 26px;
    font-weight: 900;
    color: var(--chefs-navy);
    font-family: var(--font-mono);
}

body.dark-theme .meals-val-display span {
    color: var(--chefs-cyan);
}

.meals-val-display small {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.cust-slider {
    width: 100%;
    accent-color: var(--chefs-royal);
    cursor: pointer;
}

.meals-quick-pills {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.meal-pill {
    flex: 1;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.meal-pill:hover {
    border-color: var(--chefs-blue);
    background: #f0f7ff;
}

.meal-pill.active {
    background: var(--chefs-navy);
    color: #ffffff;
    border-color: var(--chefs-navy);
}

body.dark-theme .meal-pill {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}

body.dark-theme .meal-pill.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

/* Radio Group */
.cust-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cust-radio-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cust-radio-card input {
    margin-top: 3px;
    accent-color: var(--chefs-royal);
}

.cust-radio-card strong {
    display: block;
    font-size: 11px;
    color: var(--chefs-navy);
}

.cust-radio-card span {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.3;
}

.cust-radio-card:hover {
    background: #f0f7ff;
    border-color: var(--chefs-blue);
}

.cust-radio-card.active {
    background: #e0f2fe;
    border-color: var(--chefs-royal);
}

body.dark-theme .cust-radio-card {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-theme .cust-radio-card strong {
    color: #f8fafc;
}

body.dark-theme .cust-radio-card.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
}

/* Google AI Studio Style Generous Chat Space */
.cust-chat-studio-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    overflow: hidden;
}

.cust-chat-studio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.chat-agent-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #002b5c;
}

.chat-model-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e0f2fe;
    color: #0284c7;
}

.chat-clear-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 12px;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.chat-clear-btn:hover {
    color: #004b99;
    background: #f1f5f9;
}

.cust-chat-studio-container,
#custChatStudioContainer {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: #ffffff;
}

body.dark-theme .cust-chat-studio-container,
body.dark-theme #custChatStudioContainer {
    background: #0f172a;
}

.cust-chat-messages {
    flex: 1;
    min-height: 60px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-msg {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    max-width: 90%;
}

.chat-msg.bot {
    align-self: flex-start;
}

.chat-msg.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #004b99;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.chat-msg.user .msg-avatar {
    background: #0284c7;
}

.msg-bubble {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 11px;
    line-height: 1.45;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.msg-bubble strong {
    color: #002b5c;
}

.chat-msg.user .msg-bubble {
    background: #004b99;
    color: #ffffff;
    border-color: #004b99;
}

.chat-msg.user .msg-bubble strong {
    color: #ffffff;
}

/* Inline Action Buttons inside Chat Messages (Google AI Studio Paradigm) */
.chat-action-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
}

.btn-chat-action {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 700;
    color: var(--chefs-navy);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.btn-chat-action:hover {
    background: #eef6ff;
    border-color: var(--chefs-blue);
    color: var(--chefs-blue);
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0, 43, 92, 0.1);
}

body.dark-theme .chat-action-pills {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .btn-chat-action {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.15);
    color: #f8fafc;
}

body.dark-theme .btn-chat-action:hover {
    background: #283548;
    border-color: var(--chefs-cyan);
    color: #38bdf8;
}

/* ==========================================================================
   AI THINKING & PLANNING PIPELINE INDICATOR (Google AI Studio Paradigm)
   ========================================================================== */
.gkt-thinking-bubble {
    background: linear-gradient(135deg, #f8fafc 0%, #f0fdf4 100%) !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    min-width: 260px;
    box-shadow: 0 2px 8px rgba(0, 43, 92, 0.06) !important;
}

body.dark-theme .gkt-thinking-bubble {
    background: linear-gradient(135deg, #1e293b 0%, #0f2438 100%) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #f1f5f9 !important;
}

.thinking-header {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    color: #002b5c;
    margin-bottom: 5px;
}

body.dark-theme .thinking-header {
    color: #38bdf8;
}

.thinking-brain-pulse {
    display: inline-flex;
    animation: thinkingPulse 1.6s ease-in-out infinite;
}

@keyframes thinkingPulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.18); opacity: 1; filter: drop-shadow(0 0 5px rgba(2, 132, 199, 0.5)); }
}

.thinking-dots {
    display: inline-flex;
    gap: 3px;
    margin-left: 2px;
}

.thinking-dots span {
    width: 3.5px;
    height: 3.5px;
    background: #0284c7;
    border-radius: 50%;
    animation: thinkingDot 1.2s infinite ease-in-out both;
}

.thinking-dots span:nth-child(1) { animation-delay: -0.32s; }
.thinking-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes thinkingDot {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

.thinking-step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #475569;
    padding-top: 3px;
    transition: all 0.25s ease;
}

body.dark-theme .thinking-step-indicator {
    color: #94a3b8;
}

.thinking-step-text {
    font-weight: 500;
}

/* Collapsible Thinking Process Summary */
.thinking-summary-details {
    margin-bottom: 8px;
    font-size: 10.5px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 8px;
    transition: all 0.2s ease;
}

body.dark-theme .thinking-summary-details {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

.thinking-summary-details summary {
    cursor: pointer;
    color: #64748b;
    font-weight: 600;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: none;
}

.thinking-summary-details summary::-webkit-details-marker {
    display: none;
}

body.dark-theme .thinking-summary-details summary {
    color: #94a3b8;
}

.thinking-summary-label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.summary-arrow {
    font-size: 9px;
    transition: transform 0.2s ease;
}

.thinking-summary-details[open] .summary-arrow {
    transform: rotate(180deg);
}

.thinking-summary-content {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: #475569;
}

body.dark-theme .thinking-summary-content {
    border-top-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.thinking-summary-step {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cust-prompt-chips {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding: 7px 12px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.cust-prompt-chips::-webkit-scrollbar {
    height: 4px;
}

.cust-prompt-chips::-webkit-scrollbar-track {
    background: transparent;
}

.cust-prompt-chips::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.cust-chip {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-full);
    padding: 4px 10px;
    font-size: 10.5px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    user-select: none;
}

.cust-chip:hover {
    border-color: #004b99;
    color: #004b99;
    background: #eef6ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 75, 153, 0.12);
}

.cust-chip:active {
    transform: translateY(0);
}

.chat-action-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-action-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.16) !important;
}

body.dark-theme .cust-prompt-chips {
    background: #1e293b;
    border-top-color: #334155;
}

body.dark-theme .cust-chip {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark-theme .cust-chip:hover {
    background: #1e3a8a;
    border-color: #3b82f6;
    color: #ffffff;
}

body.dark-theme .chat-action-card {
    background: #1e293b !important;
    border-color: #38bdf8 !important;
}

.cust-chat-input-row,
.cust-chat-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 30;
    width: 100%;
    box-sizing: border-box;
}

body.dark-theme .cust-chat-input-row,
body.dark-theme .cust-chat-input-bar {
    background: #0f172a;
    border-top-color: rgba(255, 255, 255, 0.1);
}

.cust-chat-input-row input,
.cust-chat-input-bar input,
#custChatInput {
    flex: 1;
    min-width: 0;
    border: 1.5px solid #cbd5e1;
    border-radius: 22px;
    padding: 9px 16px;
    font-size: 11.5px;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.cust-chat-input-row input:focus,
.cust-chat-input-bar input:focus,
#custChatInput:focus {
    border-color: #004b99;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 75, 153, 0.1);
}

body.dark-theme .cust-chat-input-row input,
body.dark-theme .cust-chat-input-bar input,
body.dark-theme #custChatInput {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

body.dark-theme .cust-chat-input-row input:focus,
body.dark-theme .cust-chat-input-bar input:focus,
body.dark-theme #custChatInput:focus {
    border-color: #38bdf8;
    background: #1e293b;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.cust-chat-input-row button,
.cust-chat-input-bar button,
.cust-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #002b5c;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cust-voice-btn {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

.cust-voice-btn:hover {
    background: #e2e8f0 !important;
    color: #004b99 !important;
    border-color: #004b99 !important;
    transform: scale(1.05);
}

.cust-voice-btn.recording {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #dc2626 !important;
    animation: voicePulse 1.2s infinite;
}

@keyframes voicePulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); transform: scale(1.08); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); transform: scale(1); }
}

body.dark-theme .cust-voice-btn {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

body.dark-theme .cust-voice-btn:hover {
    background: #334155 !important;
    color: #38bdf8 !important;
}

.cust-chat-input-row button,
.cust-chat-input-bar button,
.cust-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 43, 92, 0.15);
}

.cust-chat-input-row button:hover,
.cust-chat-input-bar button:hover,
.cust-send-btn:hover {
    background: #004b99;
    transform: scale(1.06);
    box-shadow: 0 3px 6px rgba(0, 43, 92, 0.25);
}

body.dark-theme .cust-send-btn {
    background: #0284c7;
}

body.dark-theme .cust-send-btn:hover {
    background: #38bdf8;
    color: #0f172a;
}

/* Right Showroom Panel */
.cust-showroom-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px 24px;
    gap: 16px;
}

.showroom-top-bar,
.cust-showroom-top {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.showroom-title h2,
.cust-showroom-top h2 {
    font-size: 19px;
    font-weight: 800;
    color: var(--chefs-navy);
    margin: 0;
    line-height: 1.25;
}

body.dark-theme .showroom-title h2,
body.dark-theme .cust-showroom-top h2 {
    color: #f8fafc;
}

.showroom-title p {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.4;
}

.showroom-actions {
    display: flex;
    gap: 8px;
}

/* 3D Showroom Stage */
.cust-3d-stage-container {
    height: 380px;
    min-height: 340px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 43, 92, 0.06);
}

body.dark-theme .cust-3d-stage-container {
    background: linear-gradient(135deg, #0f172a 0%, #060a12 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

.cust-stage-3d {
    width: 100%;
    height: 100%;
    display: block;
}

.cust-stage-overlay-controls {
    position: absolute;
    bottom: 12px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.overlay-pill.green {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(16, 185, 129, 0.4);
    color: #4ade80;
    font-weight: 600;
}

/* Equipment Cards Section */
.cust-equipment-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

body.dark-theme .cust-equipment-section {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.08);
}

.cust-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cust-section-title h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--chefs-navy);
}

body.dark-theme .cust-section-title h4 {
    color: #f8fafc;
}

.cust-equipment-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 1200px) {
    .cust-equipment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.cust-equip-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cust-equip-card:hover {
    border-color: var(--chefs-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 43, 92, 0.08);
}

.cust-equip-card.active-highlight {
    border-color: var(--chefs-blue) !important;
    background: #e0f2fe !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.4), 0 8px 16px rgba(0, 43, 92, 0.12);
    transform: translateY(-3px);
}

body.dark-theme .cust-equip-card {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.08);
}

.cust-equip-img {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cust-equip-img img {
    max-height: 65px;
    max-width: 100%;
    object-fit: contain;
}

.cust-equip-info strong {
    display: block;
    font-size: 12px;
    color: var(--chefs-navy);
    line-height: 1.2;
    margin-bottom: 2px;
}

body.dark-theme .cust-equip-info strong {
    color: #f8fafc;
}

.cust-equip-info span {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
}

.cust-equip-benefit {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

body.dark-theme .cust-equip-benefit {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Economic & Leasing Bottom Bar - High-End B2B Cockpit */
.cust-economic-bar {
    display: grid;
    grid-template-columns: 1.15fr 1.35fr 1.65fr 1.35fr;
    gap: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    box-shadow: 0 4px 20px -2px rgba(0, 43, 92, 0.08), 0 2px 6px -1px rgba(0, 43, 92, 0.04);
    align-items: stretch;
    margin-top: 14px;
}

body.dark-theme .cust-economic-bar {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 1200px) {
    .cust-economic-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}
@media (max-width: 768px) {
    .cust-economic-bar {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

.eco-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 18px;
    border-right: 1px solid #edf2f7;
}

.eco-stat-card:first-child {
    padding-left: 4px;
}

.eco-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.eco-lbl-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.eco-lbl-icon {
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
}
.eco-lbl-icon.navy { background: #eff6ff; color: #004b99; }
.eco-lbl-icon.green { background: #f0fdf4; color: #059669; }
.eco-lbl-icon.blue { background: #f0f9ff; color: #0284c7; }

.eco-lbl {
    font-size: 11.5px;
    color: #475569;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.eco-val {
    font-size: 20px;
    font-weight: 800;
    color: var(--chefs-navy);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 2px 0 4px 0;
}

body.dark-theme .eco-val {
    color: #f8fafc;
}

.eco-stat-card.highlight-green .eco-val {
    color: #059669;
}

.eco-stat-card.highlight-blue .eco-val {
    color: #004b99;
}

body.dark-theme .eco-stat-card.highlight-blue .eco-val {
    color: #38bdf8;
}

.eco-sub-text {
    font-size: 11px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1.35;
}

.eco-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 10.5px;
    font-weight: 600;
    color: #004b99;
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.eco-action-btn:hover {
    background: #004b99;
    color: #ffffff;
    border-color: #004b99;
}

.eco-pill-green {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ecfdf5;
    color: #047857;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #a7f3d0;
}

.eco-kickback-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #bae6fd;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    white-space: nowrap;
}

.eco-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 3px 8px;
    border-radius: 6px;
}

.eco-slider-label {
    font-size: 10.5px;
    color: #475569;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.cust-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 9999px;
    background: #cbd5e1;
    outline: none;
    transition: background 0.15s;
    cursor: pointer;
}
.cust-slider:hover {
    background: #94a3b8;
}
.cust-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #004b99;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.12s ease;
}
.cust-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #0062c4;
}
.cust-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #004b99;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.12s ease;
}

.eco-slider-value {
    font-size: 11px;
    font-weight: 800;
    color: #002b5c;
    min-width: 52px;
    text-align: right;
    white-space: nowrap;
}

.eco-cta-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding-left: 18px;
}

.btn-eco-lead {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff !important;
    background: linear-gradient(135deg, #002b5c 0%, #004b99 100%);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 43, 92, 0.22);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-eco-lead:hover {
    background: linear-gradient(135deg, #003673 0%, #0056b3 100%);
    box-shadow: 0 6px 18px rgba(0, 43, 92, 0.32);
    transform: translateY(-1px);
}
.btn-eco-lead:active {
    transform: translateY(0);
}

.eco-cta-subtext {
    margin-top: 5px;
    font-size: 10.5px;
    color: #64748b;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.pulse-glow {
    animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
}

.modal-card.modal-md {
    max-width: 640px;
}

/* ==========================================================================
   Customer Studio: Mode Switcher (Prompt-Planer vs 4-Schritt Assistent)
   ========================================================================== */
.cust-panel-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f1f5f9;
    padding: 4px;
    border-bottom: 1px solid #e2e8f0;
    gap: 4px;
    flex-shrink: 0;
}

.cust-panel-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.cust-panel-tab:hover {
    color: var(--chefs-navy);
}

.cust-panel-tab.active {
    background: #ffffff;
    color: var(--chefs-navy);
    box-shadow: 0 1px 3px rgba(0, 43, 92, 0.08);
}

body.dark-theme .cust-panel-tabs {
    background: #0f172a;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .cust-panel-tab {
    color: #94a3b8;
}

body.dark-theme .cust-panel-tab.active {
    background: #1e293b;
    color: #f8fafc;
}

/* ==========================================================================
   Customer Studio: Referenz-Konzepte als Prompt-Vorlagen (2-Col Clean Grid)
   ========================================================================== */
.cust-preset-section {
    padding: 10px 14px 8px 14px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.cust-preset-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--chefs-navy);
}

.cust-preset-hint {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
}

.cust-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.cust-preset-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    width: 100%;
}

.cust-preset-card:hover {
    background: #f0f7ff;
    border-color: var(--chefs-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 81, 146, 0.08);
}

.cust-preset-card.active {
    background: #eef6ff;
    border-color: var(--chefs-navy);
    box-shadow: 0 0 0 1px var(--chefs-navy);
}

.preset-card-icon {
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.preset-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.preset-card-body strong {
    font-size: 11px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preset-card-body span {
    font-size: 9.5px;
    color: var(--text-muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cust-preset-card.active .preset-card-body strong {
    color: var(--chefs-navy);
}

body.dark-theme .cust-preset-section {
    background: #111827;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .cust-preset-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .cust-preset-card:hover {
    background: #283548;
    border-color: var(--chefs-cyan);
}

body.dark-theme .cust-preset-card.active {
    background: rgba(2, 132, 199, 0.15);
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px #38bdf8;
}

body.dark-theme .preset-card-icon {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .preset-card-body strong {
    color: #f8fafc;
}

body.dark-theme .cust-preset-section-header {
    color: #f8fafc;
}

/* Fallback legacy support for .cust-preset-pill */
.cust-preset-pill.active {
    border-color: var(--chefs-navy);
}

/* ==========================================================================
   SAP PS Project & Customer Hierarchy Modal (Enterprise Standard)
   ========================================================================== */
.project-hierarchy-modal-card {
    max-width: 1040px !important;
    width: 95% !important;
    max-height: 90vh !important;
    height: 860px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 43, 92, 0.35) !important;
    border: 1.5px solid #cbd5e1 !important;
    padding: 0 !important;
}

.hierarchy-filter-toolbar {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 18px;
    flex-shrink: 0;
}

.hierarchy-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f1f5f9;
}

.hierarchy-customer-node {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    flex-shrink: 0 !important;
    min-height: fit-content !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.hierarchy-customer-node:hover {
    border-color: #94a3b8 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.hierarchy-node-header {
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.hierarchy-node-header:hover {
    filter: brightness(0.98);
}

.hierarchy-node-content {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.sub-customer-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-hierarchy-card {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 14px !important;
    box-shadow: none !important;
}

.project-hierarchy-card:hover {
    border-color: #0284c7 !important;
    background: #f0f9ff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.12) !important;
}

.project-hierarchy-card.active-project {
    background: #f0fdf4 !important;
    border-color: #16a34a !important;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25) !important;
}

body.dark-theme .project-hierarchy-modal-card {
    background: #0f172a !important;
    border-color: #334155 !important;
}

body.dark-theme .hierarchy-filter-toolbar {
    background: #1e293b;
    border-color: #334155;
}

body.dark-theme .hierarchy-scroll-container {
    background: #090d16;
}

body.dark-theme .hierarchy-customer-node {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .hierarchy-node-content {
    background: #1e293b;
    border-color: #334155;
}

body.dark-theme .sub-customer-block {
    background: #0f172a;
    border-color: #334155;
}

body.dark-theme .project-hierarchy-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .project-hierarchy-card:hover {
    background: #1e3a5f !important;
    border-color: #38bdf8 !important;
}

/* ==========================================================================
   NEXTGEN GKT STUDIO INNOVATION SUITE (D & T ENVIRONMENTS)
   ========================================================================== */

/* 1. Environment Badge & Tier Selector */
.env-badge-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(2, 132, 199, 0.12);
    border: 1px solid rgba(2, 132, 199, 0.3);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #0284c7;
    margin-left: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.env-badge-group:hover {
    background: rgba(2, 132, 199, 0.2);
    border-color: #0284c7;
}
.env-badge-tag {
    padding: 1px 4px;
    border-radius: 4px;
    text-transform: uppercase;
    font-family: monospace;
    font-size: 10px;
}
.env-badge-tag.dev { background: #3b82f6; color: white; }
.env-badge-tag.staging { background: #f59e0b; color: white; }
.env-badge-tag.prod { background: #10b981; color: white; }

/* 2. 3D First-Person Walkthrough Mode HUD */
.walkthrough-hud-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    z-index: 50;
}
.walkthrough-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}
.walkthrough-crosshair::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 3px;
    background: #38bdf8;
    border-radius: 50%;
}
.walkthrough-control-guide {
    align-self: center;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 20px;
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
}
.walkthrough-key-badge {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
}

/* 3. HACCP Spaghetti Flow & Zone Visualizer */
.haccp-legend-card {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.haccp-path-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.haccp-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.haccp-warning-badge {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #f87171;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 4. BAFA Subsidy & Peak Load Cards */
.bafa-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.bafa-kpi-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}
.bafa-kpi-val {
    font-size: 20px;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', monospace;
    display: block;
    margin-top: 4px;
}
.bafa-kpi-val.green { color: #059669; }
.bafa-kpi-val.gold { color: #d97706; }
.bafa-kpi-val.blue { color: #0284c7; }

.load-curve-bar-container {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 140px;
    background: #f1f5f9;
    padding: 10px 8px 0;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}
.load-curve-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}
.load-curve-bar {
    width: 100%;
    background: #3b82f6;
    border-radius: 3px 3px 0 0;
    transition: height 0.3s ease;
}
.load-curve-bar.peak { background: #ef4444; }
.load-curve-bar.moderate { background: #f59e0b; }
.load-curve-hour {
    font-size: 9px;
    font-family: monospace;
    color: #64748b;
    margin-top: 4px;
}

/* 5. Print & High-End Magazine Exposé Styling */
.expose-page-sheet {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 32px 36px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    color: #1e293b;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    position: relative;
    box-sizing: border-box;
}

.expose-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #002b5c;
    padding-bottom: 14px;
    margin-bottom: 20px;
}

.expose-page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
    margin-top: 24px;
    font-size: 11px;
    color: #64748b;
}

.expose-pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
}

@media print {
    body {
        background: white !important;
        color: black !important;
        overflow: visible !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .top-bar, .main-tabs, .studio-ai-panel, .revit-ribbon-bar, .revit-dock-left, .revit-dock-right, .controls-overlay-3d,
    .modal-backdrop:not(#exposeModal), .expose-nav-bar, .modal-header, .expose-pagination-bar, .btn-close {
        display: none !important;
    }
    #exposeModal {
        display: block !important;
        position: static !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }
    #exposeModal .modal-card {
        max-width: 100% !important;
        width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    #exposeModal .modal-body {
        max-height: none !important;
        overflow: visible !important;
        padding: 0 !important;
        background: transparent !important;
    }
    .expose-print-page, .expose-page-sheet {
        page-break-after: always !important;
        break-after: page !important;
        width: 100% !important;
        min-height: 270mm !important;
        height: auto !important;
        padding: 16mm 18mm !important;
        margin: 0 0 20mm 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        background: #ffffff !important;
    }
    .expose-page-sheet:last-child {
        page-break-after: avoid !important;
        break-after: avoid !important;
        margin-bottom: 0 !important;
    }
}

/* ========================================================================== */
/* Photorealistic Highlight Visualization & Studio Cockpit Styling            */
/* ========================================================================== */

.cust-highlight-toolbar {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #cbd5e1;
    border-radius: 24px;
    padding: 4px;
    box-shadow: 0 10px 25px -5px rgba(0, 43, 92, 0.15);
    z-index: 25;
    transition: all 0.2s ease;
}

.cust-atmosphere-group {
    display: none;
    align-items: center;
    gap: 4px;
}

.cust-atmo-label {
    font-size: 11px;
    font-weight: 700;
    color: #002b5c;
    margin-right: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.atmo-pill {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.atmo-pill:hover {
    background: #f1f5f9;
    border-color: #004b99;
    color: #002b5c;
}

.atmo-pill.active {
    background: linear-gradient(135deg, #002b5c, #004b99);
    border-color: #002b5c;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 43, 92, 0.25);
}

body.dark-theme .cust-highlight-toolbar {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-theme .cust-atmo-label {
    color: #cbd5e1;
}

body.dark-theme .atmo-pill {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

body.dark-theme .atmo-pill:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

body.dark-theme .atmo-pill.active {
    background: linear-gradient(135deg, #004b99, #0284c7);
    border-color: #38bdf8;
    color: #ffffff;
}

.btn-highlight-magic {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    border: 1px solid #fbbf24;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 24px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transition: all 0.2s ease;
}

.btn-highlight-magic:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
    transform: translateY(-1px);
}

.highlight-gold-btn {
    border-color: rgba(245, 158, 11, 0.45) !important;
    background: rgba(245, 158, 11, 0.12) !important;
}

.highlight-gold-btn:hover {
    background: rgba(245, 158, 11, 0.25) !important;
    border-color: #f59e0b !important;
}

/* Loading Overlay for Highlight Render */
.highlight-render-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    border-radius: inherit;
    animation: fadeIn 0.2s ease;
}

.loading-glass-card {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 28px 36px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
}

.loading-spinner-ring {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px auto;
    border: 3px solid rgba(56, 189, 248, 0.2);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-glass-card h4 {
    color: #f8fafc;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px 0;
}

.loading-glass-card p {
    font-size: 13px;
    margin: 0 0 16px 0;
}

.loading-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.loading-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #f59e0b);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Expert High-End Fotostudio Flyout */
.expert-studio-flyout {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 350px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 55;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
    animation: slideInRight 0.22s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.studio-flyout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.studio-flyout-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.studio-flyout-title h4 {
    color: #f8fafc;
    font-size: 14px;
    font-weight: 700;
    margin: 0;
}

.flyout-subtitle {
    font-size: 11px;
    color: #94a3b8;
}

.flyout-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s ease;
}

.flyout-close-btn:hover {
    color: #ffffff;
}

.studio-flyout-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.studio-form-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.studio-sec-label {
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lens-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.lens-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 8px 6px;
    color: #e2e8f0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all 0.15s ease;
}

.lens-btn strong {
    font-size: 13px;
    font-family: monospace;
}

.lens-btn span {
    font-size: 11px;
    color: #94a3b8;
}

.lens-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.lens-btn.active {
    background: linear-gradient(135deg, rgba(0, 75, 153, 0.7), rgba(14, 165, 233, 0.7));
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.atmo-selector-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.atmo-radio-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.atmo-radio-card:hover {
    background: rgba(255, 255, 255, 0.09);
}

.atmo-radio-card input {
    margin-top: 3px;
}

.atmo-card-content strong {
    display: block;
    font-size: 12px;
    color: #f1f5f9;
}

.atmo-card-content small {
    display: block;
    font-size: 11px;
    color: #94a3b8;
}

.studio-toggle-row, .studio-select-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #cbd5e1;
}

.studio-actions-card {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================================================== */
/* Before/After Wipe-Slider Modal - CHEFS CULINAR Bright Design               */
/* ========================================================================== */

.wipe-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.wipe-modal-window {
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    width: 95vw;
    max-width: 1140px;
    box-shadow: 0 25px 65px -12px rgba(0, 43, 92, 0.25), 0 0 0 1px rgba(0, 43, 92, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wipe-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.wipe-modal-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.wipe-modal-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.3);
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.wipe-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #002b5c;
    letter-spacing: -0.01em;
}

.wipe-modal-sub {
    font-size: 12.5px;
    color: #64748b;
    font-weight: 500;
}

.wipe-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wipe-badge-source {
    font-size: 11.5px;
    font-weight: 600;
    color: #004b99;
    background: rgba(0, 75, 153, 0.08);
    border: 1px solid rgba(0, 75, 153, 0.22);
    padding: 5px 12px;
    border-radius: 20px;
}

.wipe-close-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 15px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.wipe-close-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* The Wipe Stage Viewport (16:9 Aspect Ratio Container) */
.wipe-stage-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: calc(85vh - 165px);
    background: #f1f5f9;
    overflow: hidden;
    user-select: none;
    touch-action: none;
    cursor: ew-resize;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wipe-pane-under, .wipe-pane-over {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.wipe-pane-under img, .wipe-pane-over img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f8fafc;
    display: block;
    pointer-events: none;
}

.wipe-pane-over {
    clip-path: inset(0 50% 0 0);
    transition: none;
}

.wipe-view-tag {
    position: absolute;
    top: 16px;
    padding: 7px 16px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
}

.wipe-view-tag.left {
    left: 16px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 43, 92, 0.15);
    color: #002b5c;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.wipe-view-tag.right {
    right: 16px;
    background: linear-gradient(135deg, #002b5c 0%, #004b99 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 43, 92, 0.28);
}

/* Divider Line & Handle */
.wipe-divider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(0, 43, 92, 0.35);
    pointer-events: none;
    transform: translateX(-50%);
}

.wipe-divider-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #004b99, #0073e6);
    border: 2.5px solid #ffffff;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 6px 18px rgba(0, 43, 92, 0.35);
    cursor: ew-resize;
    pointer-events: auto;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.wipe-divider-knob:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 8px 24px rgba(0, 75, 153, 0.5);
}

/* Modal Footer */
.wipe-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    gap: 16px;
    flex-wrap: wrap;
}

.wipe-meta-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 500;
    color: #334155;
}

.wipe-meta-info i {
    color: #004b99;
}

.wipe-separator {
    color: #cbd5e1;
}

.wipe-mode-switcher {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
}

.wipe-mode-switcher .atmo-pill {
    background: transparent;
    border: none;
    color: #475569;
    padding: 4px 10px;
    font-size: 11.5px;
}

.wipe-mode-switcher .atmo-pill.active {
    background: #ffffff;
    color: #002b5c;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.wipe-footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wipe-footer-actions .btn-outline {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #002b5c;
    font-weight: 600;
    font-size: 12.5px;
}

.wipe-footer-actions .btn-outline:hover {
    background: #f1f5f9;
    border-color: #004b99;
    color: #004b99;
}

.wipe-footer-actions .btn-primary {
    background: linear-gradient(135deg, #002b5c 0%, #004b99 100%);
    border: 1px solid #002b5c;
    color: #ffffff;
    font-weight: 600;
    font-size: 12.5px;
    box-shadow: 0 2px 6px rgba(0, 43, 92, 0.2);
}

.wipe-footer-actions .btn-primary:hover {
    background: #002b5c;
    box-shadow: 0 4px 12px rgba(0, 43, 92, 0.3);
}

/* Dark theme overrides for wipe modal */
body.dark-theme .wipe-modal-window {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85);
}

body.dark-theme .wipe-modal-header {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .wipe-modal-header h3 {
    color: #f8fafc;
}

body.dark-theme .wipe-modal-sub {
    color: #94a3b8;
}

body.dark-theme .wipe-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

body.dark-theme .wipe-stage-viewport {
    background: #090d16;
}

body.dark-theme .wipe-pane-under img,
body.dark-theme .wipe-pane-over img {
    background: #090d16;
}

body.dark-theme .wipe-modal-footer {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .wipe-meta-info {
    color: #cbd5e1;
}

body.dark-theme .wipe-footer-actions .btn-outline {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f8fafc;
}

body.dark-theme .wipe-footer-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: #38bdf8;
    color: #38bdf8;
}

/* =============================================================================
   IN-STAGE WIPE-SLIDER VIEWPORT (IN-PLACE COMPARISON IN ACTIVE 3D WINDOW)
   ============================================================================= */
.in-stage-wipe-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 50 !important;
    background: #0f172a;
    overflow: hidden;
    user-select: none;
    touch-action: none;
    overscroll-behavior: contain;
    cursor: ew-resize;
    animation: fadeInWipe 0.22s ease-out;
}

@property --wipe-pan-x {
    syntax: '<length>';
    inherits: true;
    initial-value: 0px;
}
@property --wipe-pan-y {
    syntax: '<length>';
    inherits: true;
    initial-value: 0px;
}
@property --wipe-zoom {
    syntax: '<number>';
    inherits: true;
    initial-value: 1;
}

@keyframes fadeInWipe {
    from { opacity: 0; transform: scale(0.995); }
    to { opacity: 1; transform: scale(1); }
}

.cust-3d-stage-container.in-stage-wipe-active {
    height: 62vh;
    min-height: 560px;
    max-height: 760px;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cust-3d-stage-container.in-stage-wipe-active .cust-highlight-toolbar,
.cust-3d-stage-container.in-stage-wipe-active .cust-stage-overlay-controls {
    display: none !important;
}

.in-stage-pane-under, .in-stage-pane-over {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.in-stage-pane-under img, .in-stage-pane-over img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0b0f17;
    display: block;
    pointer-events: none;
    transform-origin: center center;
    transform: scale(var(--wipe-zoom, 1)) translate(var(--wipe-pan-x, 0px), var(--wipe-pan-y, 0px));
    transition: transform 0.05s ease-out;
}

.in-stage-wipe-overlay.fit-cover .in-stage-pane-under img,
.in-stage-wipe-overlay.fit-cover .in-stage-pane-over img {
    object-fit: cover;
}

.in-stage-pane-over {
    clip-path: inset(0 50% 0 0);
    transition: none;
}

.in-stage-wipe-overlay .wipe-view-tag {
    position: absolute;
    bottom: 16px;
    top: auto;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
    z-index: 18;
}

.in-stage-wipe-overlay .wipe-view-tag.left {
    left: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 43, 92, 0.2);
    color: #002b5c;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.in-stage-wipe-overlay .wipe-view-tag.right {
    right: 16px;
    background: linear-gradient(135deg, #002b5c 0%, #004b99 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 43, 92, 0.35);
}

.in-stage-wipe-topbar {
    position: absolute;
    top: 12px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 55 !important;
    gap: 8px;
}

.in-stage-topbar-left, .in-stage-topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
}

.in-stage-source-badge {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8fafc;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.in-stage-zoom-controls {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    padding: 2px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.in-stage-zoom-badge {
    color: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.in-stage-zoom-badge:hover {
    color: #38bdf8;
}

.in-stage-btn {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.in-stage-btn:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-1px);
}

.in-stage-btn-close {
    background: linear-gradient(135deg, #002b5c, #004b99);
    border-color: #38bdf8;
    color: #ffffff;
}

.in-stage-btn-close:hover {
    background: linear-gradient(135deg, #003875, #005bb5);
    border-color: #7dd3fc;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}

.btn-ultra-4k {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    border: 1px solid #fbbf24 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.btn-ultra-4k:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: #fde68a !important;
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.65), 0 4px 14px rgba(0, 0, 0, 0.35) !important;
    transform: translateY(-1px) scale(1.02);
}

.btn-ultra-4k:disabled {
    opacity: 0.85;
    cursor: wait !important;
    transform: none !important;
}

.text-amber {
    color: #fbbf24 !important;
}

.in-stage-atmo-pills {
    display: inline-flex;
    gap: 4px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(10px);
    padding: 2px 4px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.in-stage-atmo-pills .atmo-pill {
    padding: 3px 8px;
    font-size: 10.5px;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-weight: 600;
}

.in-stage-atmo-pills .atmo-pill.active {
    background: #004b99;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 75, 153, 0.4);
}

/* =============================================================================
   SCHNELL-PLANER (2D VOR-ORT-PLANUNG) & VOR-ORT-FOTO ENGINE (KUNDEN-STUDIO)
   ============================================================================= */
.cust-view-switcher-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 10px;
    margin-bottom: 12px;
    gap: 12px;
    flex-wrap: wrap;
}

.cust-view-tabs {
    display: flex;
    gap: 6px;
    align-items: center;
}

.cust-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    box-sizing: border-box;
    padding: 0 14px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cust-view-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.cust-view-btn.active {
    background: #002b5c;
    border-color: #002b5c;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 43, 92, 0.25);
}

.cust-view-btn.active .text-cyan {
    color: #38bdf8 !important;
}

.cust-view-btn.active .text-gold {
    color: #fbbf24 !important;
}

.cust-view-switcher-bar .showroom-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.cust-view-switcher-bar .showroom-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    box-sizing: border-box;
    padding: 0 13px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.cust-view-switcher-bar .showroom-actions .btn-outline {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.cust-view-switcher-bar .showroom-actions .btn-outline:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.cust-view-switcher-bar .showroom-actions .btn-primary {
    background: #002b5c;
    border: 1px solid #002b5c;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 43, 92, 0.2);
}

.cust-view-switcher-bar .showroom-actions .btn-primary:hover {
    background: #004b99;
    border-color: #004b99;
    color: #ffffff;
}

.cust-view-badge {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cust-quick-planner-container {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-shrink: 0 !important;
    min-height: 860px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.qp-toolbar {
    height: 42px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    gap: 10px;
    flex-shrink: 0;
}

.qp-left, .qp-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qp-main-layout {
    display: grid;
    grid-template-columns: 210px 1fr 230px;
    height: 520px;
    min-height: 480px;
    flex-shrink: 0;
    overflow: hidden;
}

.qp-palette {
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.qp-palette-header {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.qp-palette-items {
    padding: 8px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qp-item-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.12s ease;
}

.qp-item-card:hover {
    border-color: #0284c7;
    background: #f0f9ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.12);
}

.qp-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #002b5c;
    flex-shrink: 0;
}

.qp-item-info {
    flex: 1;
    min-width: 0;
}

.qp-item-name {
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.qp-item-meta {
    font-size: 11px;
    color: #64748b;
    display: block;
}

.qp-canvas-viewport {
    position: relative;
    background: #e2e8f0;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.qp-empty-dropzone {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px dashed #94a3b8;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    z-index: 5;
    transition: all 0.15s ease;
    text-align: center;
    padding: 20px;
}

.qp-empty-dropzone:hover {
    border-color: #0284c7;
    background: rgba(240, 249, 255, 0.95);
}

.qp-empty-dropzone * {
    pointer-events: none;
}

.qp-empty-dropzone.drag-active,
.qp-canvas-viewport.drag-active {
    border-color: #0284c7 !important;
    background: rgba(224, 242, 254, 0.96) !important;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.25) !important;
    transform: scale(1.005);
}

.qp-canvas-board {
    position: relative;
    width: 1000px;
    height: 650px;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.qp-canvas-bg-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.qp-blocks-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.qp-placed-block {
    position: absolute;
    border: 1.5px solid #94a3b8;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    border-radius: 5px;
    cursor: grab;
    user-select: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 6px;
    transition: all 0.15s ease;
    box-sizing: border-box;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 6px rgba(15, 23, 42, 0.08);
}

.qp-placed-block:hover {
    border-color: #0284c7;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 50%, #e0f2fe 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 6px 14px rgba(2, 132, 199, 0.2);
    transform: translateY(-1px);
    z-index: 5;
}

.qp-placed-block.selected {
    border: 2px solid #0052cc;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.35), 0 8px 20px rgba(0, 43, 92, 0.2);
    z-index: 10;
}

.dark-theme .qp-placed-block {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #475569;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 3px 6px rgba(0, 0, 0, 0.4);
}

.dark-theme .qp-placed-block.selected {
    border-color: #38bdf8;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 0 0 0 3.5px rgba(56, 189, 248, 0.35);
}

.qp-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 2px;
}

.qp-cat-badge {
    font-size: 8.5px;
    font-weight: 700;
    color: #ffffff;
    padding: 1px 4px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.qp-block-kw {
    font-size: 8.5px;
    font-weight: 700;
    color: #b45309;
    background: #fef3c7;
    padding: 1px 4px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.qp-block-title {
    font-size: 10.5px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.dark-theme .qp-block-title {
    color: #f1f5f9;
}

.qp-block-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
}

.qp-block-dim-tag {
    font-size: 9px;
    font-weight: 600;
    color: #475569;
    background: rgba(255, 255, 255, 0.9);
    padding: 1px 4px;
    border-radius: 2px;
    border: 1px solid rgba(203, 213, 225, 0.6);
}

.dark-theme .qp-block-dim-tag {
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.8);
    border-color: #334155;
}

.qp-properties-dock {
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.qp-dock-header {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 11px;
}

.qp-props-body {
    padding: 12px;
    font-size: 12px;
}

.qp-prop-group {
    margin-bottom: 14px;
}

.qp-prop-lbl {
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
    display: block;
}

.qp-dim-btn-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.qp-dim-btn {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    color: #334155;
    transition: all 0.12s ease;
}

.qp-dim-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.qp-dim-btn.active {
    background: #002b5c;
    border-color: #002b5c;
    color: #ffffff;
}

/* Vor-Ort-Foto Container */
.cust-site-photo-container {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 16px;
    height: 540px;
    min-height: 500px;
    flex-shrink: 0 !important;
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.site-photo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.site-photo-banner h4 {
    margin: 0 0 2px 0;
    font-size: 14px;
    color: #002b5c;
}

.site-photo-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-photo-stage {
    flex: 1;
    background: #f8fafc;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 16px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    box-shadow: inset 0 2px 6px rgba(0, 43, 92, 0.03);
}

.site-photo-empty-dropzone {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    padding: 36px 24px;
    border-radius: 12px;
    text-align: center;
    color: #475569;
    cursor: pointer;
    box-shadow: 0 4px 12px -2px rgba(0, 43, 92, 0.04);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 480px;
    margin: 20px;
}

.site-photo-empty-dropzone:hover {
    border-color: #004b99;
    background: #f0f7ff;
    color: #002b5c;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(0, 75, 153, 0.12);
}

.site-photo-empty-dropzone strong {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    color: #002b5c;
    margin-bottom: 6px;
}

.site-photo-empty-dropzone span {
    display: block;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.site-photo-viewport {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
}

.site-photo-base {
    max-width: 100%;
    max-height: 520px;
    object-fit: contain;
    border-radius: 8px;
}

.site-photo-overlay-card {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 14px 16px;
    color: #0f172a;
    width: 480px;
    max-width: calc(100% - 32px);
    max-height: calc(100% - 32px);
    overflow-y: auto;
    box-shadow: 0 16px 36px -6px rgba(0, 43, 92, 0.18), 0 4px 12px -2px rgba(0, 43, 92, 0.08);
    z-index: 15;
}

.overlay-header {
    font-size: 12.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    color: #002b5c;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.site-photo-room-assessment {
    font-size: 11.5px;
    color: #334155;
    margin: 6px 0 10px 0;
    padding: 8px 10px;
    background: #f0f7ff;
    border-radius: 6px;
    border: 1px solid #bae6fd;
}

.overlay-device-chips {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.overlay-chip {
    font-size: 10px;
    background: rgba(0, 75, 153, 0.08);
    color: #004b99;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 75, 153, 0.15);
}

/* Retrofit Comparison Cards (Bright Design) */
.retrofit-comparison-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 43, 92, 0.04);
    transition: all 0.2s ease;
}

.retrofit-comparison-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 16px rgba(0, 43, 92, 0.08);
}

.retrofit-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 6px;
}

.retrofit-pos-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
}

.retrofit-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #002b5c;
}

.retrofit-grid-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

.retrofit-col-old {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
}

.retrofit-col-old .col-sub {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.retrofit-col-old .col-name {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
}

.retrofit-col-old .col-specs {
    font-size: 11px;
    color: #475569;
    margin-top: 2px;
}

.retrofit-col-old .col-ocr {
    font-size: 9.5px;
    color: #64748b;
    font-family: var(--font-code, monospace);
    margin-top: 5px;
    padding: 3px 6px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px dashed #cbd5e1;
    word-break: break-all;
}

.retrofit-col-old .col-cond {
    font-size: 10px;
    color: #b45309;
    margin-top: 4px;
    font-weight: 500;
}

.retrofit-col-new {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 10px;
}

.retrofit-col-new .col-sub {
    font-size: 10px;
    font-weight: 700;
    color: #0284c7;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.retrofit-col-new .col-name {
    font-size: 12px;
    font-weight: 700;
    color: #002b5c;
}

.retrofit-col-new .col-specs {
    font-size: 11.5px;
    color: #0369a1;
    font-weight: 700;
    margin-top: 2px;
}

.retrofit-col-new .col-norm {
    font-size: 10px;
    color: #0f766e;
    margin-top: 4px;
    font-weight: 500;
}

.retrofit-kpi-bar {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.retrofit-kpi-bar .kpi-econ {
    font-size: 11px;
    color: #15803d;
}

.retrofit-kpi-bar .kpi-econ strong {
    font-size: 12.5px;
    color: #166534;
    margin-left: 3px;
}

.retrofit-kpi-bar .kpi-vdi {
    font-size: 11px;
    color: #0369a1;
    font-weight: 600;
}

.retrofit-kpi-bar .kpi-payback {
    font-size: 11px;
    color: #475569;
}

.retrofit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.theme-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: #ffffff;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
    background: #f8fafc;
    color: #004b99;
    border-color: #cbd5e1;
}

/* Dark Theme Overrides for Retrofit Scanner */
body.dark-theme .site-photo-stage {
    background: #0b1326;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .site-photo-empty-dropzone {
    background: #131e36;
    border-color: #334155;
    color: #94a3b8;
}

body.dark-theme .site-photo-empty-dropzone:hover {
    border-color: #38bdf8;
    background: #1c2b4a;
    color: #f8fafc;
}

body.dark-theme .site-photo-empty-dropzone strong {
    color: #f8fafc;
}

body.dark-theme .site-photo-overlay-card {
    background: rgba(15, 23, 42, 0.94);
    border-color: rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

body.dark-theme .overlay-header {
    color: #38bdf8;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .site-photo-room-assessment {
    background: #0c2340;
    border-color: #1e3a8a;
    color: #93c5fd;
}

body.dark-theme .retrofit-comparison-card {
    background: #131e36;
    border-color: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

body.dark-theme .retrofit-comparison-card:hover {
    border-color: #38bdf8;
}

body.dark-theme .retrofit-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .retrofit-card-title {
    color: #f8fafc;
}

body.dark-theme .retrofit-col-old {
    background: #0f182e;
    border-color: #1e293b;
}

body.dark-theme .retrofit-col-old .col-sub {
    color: #94a3b8;
}

body.dark-theme .retrofit-col-old .col-name {
    color: #e2e8f0;
}

body.dark-theme .retrofit-col-old .col-specs {
    color: #cbd5e1;
}

body.dark-theme .retrofit-col-old .col-ocr {
    background: #0b1326;
    border-color: #334155;
    color: #94a3b8;
}

body.dark-theme .retrofit-col-new {
    background: #0c2340;
    border-color: #1e3a8a;
}

body.dark-theme .retrofit-col-new .col-sub {
    color: #38bdf8;
}

body.dark-theme .retrofit-col-new .col-name {
    color: #67e8f9;
}

body.dark-theme .retrofit-col-new .col-specs {
    color: #38bdf8;
}

body.dark-theme .retrofit-kpi-bar {
    background: #064e3b;
    border-color: #047857;
}

body.dark-theme .retrofit-kpi-bar .kpi-econ {
    color: #a7f3d0;
}

body.dark-theme .retrofit-kpi-bar .kpi-econ strong {
    color: #6ee7b7;
}

body.dark-theme .retrofit-kpi-bar .kpi-vdi {
    color: #67e8f9;
}

body.dark-theme .retrofit-kpi-bar .kpi-payback {
    color: #cbd5e1;
}

body.dark-theme .theme-toggle-btn {
    background: #131e36;
    border-color: rgba(255, 255, 255, 0.15);
    color: #f59e0b;
}

body.dark-theme .theme-toggle-btn:hover {
    background: #1c2b4a;
    color: #fbbf24;
}

/* --- Governance-Siegel (Stufe A) --- */
.qp-governance-seal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px 14px;
    font-size: 11px;
    flex-wrap: wrap;
    gap: 8px;
}

.seal-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.seal-pill {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.seal-note {
    color: #475569;
    font-size: 11px;
}

.seal-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.seal-sub {
    font-size: 11px;
    font-weight: 600;
    color: #334155;
}

/* --- 2-Punkt-Maßstabskalibrierung Bar --- */
.qp-calibration-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fffbeb;
    border-bottom: 2px solid #f59e0b;
    padding: 8px 14px;
    font-size: 11px;
    flex-wrap: wrap;
    gap: 10px;
    animation: fadeIn 0.2s ease;
}

.calib-instructions {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #92400e;
    font-weight: 600;
}

.calib-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.calib-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- Spitzenlast Buttons (Schritt 2) --- */
.cust-peak-btn {
    padding: 6px 4px !important;
    text-align: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    border-radius: 6px;
    transition: all 0.15s ease;
    cursor: pointer;
    line-height: 1.2;
}

.cust-peak-btn:hover {
    border-color: #004b99;
    background: #f0f7ff;
}

.cust-peak-btn.active {
    background: #004b99;
    border-color: #004b99;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 75, 153, 0.2);
}

.cust-peak-btn.active small {
    color: rgba(255, 255, 255, 0.85) !important;
}

.cust-peak-btn.active i {
    color: #ffffff !important;
}

/* --- Baulicher Technik-Schnellcheck (Show-Stopper-Ampel) --- */
.qp-tech-check-panel {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.03);
    margin-top: auto;
}

.tech-check-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    user-select: none;
    font-size: 12px;
}

.tech-check-header:hover {
    background: #f1f5f9;
}

.tech-check-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    background: #dcfce7;
    color: #15803d;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tech-check-badge.warning {
    background: #fef3c7;
    color: #b45309;
}

.tech-check-badge.danger {
    background: #fee2e2;
    color: #b91c1c;
}

.tech-check-body {
    padding: 10px 14px;
    background: #ffffff;
    transition: max-height 0.25s ease;
}

.tech-check-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 900px) {
    .tech-check-grid {
        grid-template-columns: 1fr;
    }
}

.tech-check-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
}

.tech-check-card.border-danger {
    border-color: #fca5a5;
    background: #fffbfb;
}

.tech-check-card.border-warning {
    border-color: #fde68a;
    background: #fffdf5;
}

.tc-title {
    font-weight: 700;
    color: #002b5c;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.tc-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tc-controls label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.tc-radio-row {
    display: flex;
    gap: 10px;
}

.tc-radio-lbl {
    font-size: 11px;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.tc-metrics {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed #e2e8f0;
    font-size: 11px;
}

.tc-status {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.tc-status.green {
    background: #dcfce7;
    color: #166534;
}

.tc-status.yellow {
    background: #fef3c7;
    color: #92400e;
}

.tc-status.red {
    background: #fee2e2;
    color: #991b1b;
}

.tc-alert-text {
    font-size: 10px;
    line-height: 1.3;
    padding: 4px 6px;
    border-radius: 4px;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    margin-top: 2px;
}

/* Vor-Ort-Foto KI-Vision Interactive Pins & Overlays */
.site-photo-pins-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.site-photo-box-overlay {
    position: absolute;
    border: 2px dashed #0284c7;
    background: rgba(2, 132, 199, 0.12);
    border-radius: 4px;
    pointer-events: auto;
    transition: all 0.2s ease;
    cursor: pointer;
}

.site-photo-box-overlay:hover,
.site-photo-box-overlay.active {
    border-color: #004b99;
    border-style: solid;
    background: rgba(0, 75, 153, 0.2);
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.4);
}

.site-photo-pin {
    position: absolute;
    top: -12px;
    left: 8px;
    background: #002b5c;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    white-space: nowrap;
}

.site-photo-pin i {
    color: #38bdf8;
}

.detected-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 6px;
    transition: all 0.15s ease;
}

.detected-item-card:hover {
    border-color: #0284c7;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
}

.detected-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.detected-item-name {
    font-size: 11.5px;
    font-weight: 700;
    color: #002b5c;
}

.detected-item-meta {
    font-size: 10.5px;
    color: #64748b;
}

.detected-item-action {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* ==========================================================================
   Tablet & iPad Responsiveness & Bottom-Clipping Prevention
   ========================================================================== */
@media (max-width: 1180px) {
    .top-bar {
        padding: 6px 14px;
    }
    .brand-section {
        gap: 8px;
    }
    .studio-name {
        font-size: 13px;
    }
    .cust-wizard-panel {
        --cust-panel-w: 420px;
    }
    .studio-ai-panel {
        --ai-panel-w: 380px;
    }
    .cust-tile-grid {
        gap: 6px;
    }
    .cust-tile {
        padding: 8px 6px;
    }
}

@media (max-width: 960px) {
    .cust-wizard-panel {
        --cust-panel-w: 380px;
    }
    .studio-ai-panel {
        --ai-panel-w: 340px;
    }
}

@media (max-width: 768px) {
    .customer-studio-body {
        flex-direction: column;
    }
    .cust-wizard-panel {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: 52% !important;
        border-right: none;
        border-bottom: 1px solid #cbd5e1;
    }
    .cust-showroom-panel {
        height: 48%;
        padding: 12px;
    }
}

/* Height-constrained and tablet devices (e.g. iPad in Landscape or Portrait) */
@media (max-height: 850px), (max-width: 1180px) {
    .cust-wizard-panel {
        --cust-panel-w: 420px;
        width: 420px !important;
        min-width: 420px !important;
        max-width: 420px !important;
    }
    .cust-steps-container {
        padding: 8px 12px;
    }
    .cust-tile {
        padding: 6px 4px;
        font-size: 11px;
    }
    .cust-tile i {
        font-size: 15px;
        margin-bottom: 2px;
    }
    .cust-prompt-chips {
        padding: 4px 8px;
        gap: 4px;
    }
    .cust-chip {
        padding: 3px 8px;
        font-size: 10px;
    }
    .prompt-chip {
        padding: 3px 8px;
        font-size: 10px;
    }
    .ai-panel-footer {
        padding: 6px 10px;
        gap: 4px;
    }
    .cust-chat-input-row,
    .cust-chat-input-bar {
        padding: 6px 10px;
        padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
    }
    .cust-wizard-view-container {
        max-height: 230px;
    }
    .cust-wizard-view-container.collapsed {
        max-height: 76px !important;
    }
}