﻿        :root {
            --primary: #2563eb;
            --primary-dark: #1e40af;
            --secondary: #0ea5e9;
            --accent: #f59e0b;
            --dark: #0f172a;
            --light: #f8fafc;
            --success: #10b981;
            --danger: #ef4444;
            --purple: #8b5cf6;
            --glass-bg: rgba(255, 255, 255, 0.95);
        }

        body {
            font-family: 'Cairo', sans-serif;
            background: #e2e8f0;
            background-image:
                radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.05) 0px, transparent 50%),
                radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.05) 0px, transparent 50%);
            background-attachment: fixed;
            color: var(--dark);
        }

        .header-banner {
            background: linear-gradient(135deg, var(--dark), var(--primary-dark));
            color: white;
            padding: 30px 0 50px 0;
            border-bottom-left-radius: 40px;
            border-bottom-right-radius: 40px;
            position: relative;
            overflow: hidden;
        }

        .header-banner::after {
            content: "🏗️";
            position: absolute;
            font-size: 150px;
            opacity: 0.05;
            top: -20px;
            left: 5%;
            transform: rotate(-15deg);
        }

        .glass-card {
            background: var(--glass-bg);
            border: 1px solid rgba(255, 255, 255, 0.5);
            border-radius: 20px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
            padding: 25px;
            margin-top: -30px;
        }

        .section-title {
            font-weight: 800;
            color: var(--primary-dark);
            position: relative;
            padding-bottom: 15px;
            margin-bottom: 20px;
            font-size: 1.25rem;
        }

        .section-title::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 50px;
            height: 4px;
            background: var(--accent);
            border-radius: 2px;
        }

        .form-control,
        .form-select {
            border-radius: 10px;
            border: 2px solid #cbd5e1;
            font-weight: 600;
        }

        .form-control:focus,
        .form-select:focus {
            border-color: var(--primary);
            box-shadow: none;
        }

        .smart-inputs-card {
            padding: 26px 24px;
        }

        .smart-inputs-card .form-label {
            width: 100%;
            margin-bottom: 0.35rem;
            font-weight: 800;
            line-height: 1.45;
            color: #0f172a;
        }

        .smart-inputs-card .form-control,
        .smart-inputs-card .form-select,
        .smart-inputs-card .input-group-text {
            min-height: 42px;
            font-size: 0.92rem;
        }

        .smart-inputs-card .form-select {
            padding-top: 0.45rem;
            padding-bottom: 0.45rem;
            line-height: 1.35;
            white-space: normal;
        }

        .smart-inputs-card .form-control-sm,
        .smart-inputs-card .form-select-sm,
        .smart-inputs-card .input-group-sm > .form-control,
        .smart-inputs-card .input-group-sm > .form-select,
        .smart-inputs-card .input-group-sm > .input-group-text {
            min-height: 38px;
            font-size: 0.86rem;
        }

        .smart-inputs-card .input-group {
            flex-wrap: nowrap;
        }

        .smart-inputs-card .input-group > .form-control {
            min-width: 0;
        }

        .smart-inputs-card .input-group-text {
            flex: 0 0 auto;
            padding-inline: 0.65rem;
            font-weight: 800;
            background: #f8fafc;
        }

        .smart-inputs-card .badge {
            min-height: 26px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
        }

        .smart-inputs-card #net_area_badge {
            min-width: 72px;
            max-width: 96px;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .smart-inputs-card .accordion-body .row > [class*="col-"] {
            min-width: 0;
            font-weight: 800;
            line-height: 1.35;
        }

        .smart-inputs-card .accordion-body .form-control {
            margin-top: 0.25rem;
        }

        .smart-inputs-card #concrete_mode_div,
        .smart-inputs-card .border-warning {
            border-radius: 12px !important;
        }

        .smart-inputs-card #concrete_mode_div .ps-3 {
            padding-inline-start: 0.75rem !important;
        }

        .smart-inputs-card #inp_contractor_select {
            min-width: 0;
        }

        .smart-inputs-card .ratio-control {
            flex-wrap: wrap;
        }

        .smart-inputs-card .ratio-control .form-range {
            flex: 1 1 170px;
            min-width: 150px;
        }

        .smart-options-accordion {
            --bs-accordion-border-color: #dbe4ef;
            --bs-accordion-border-radius: 10px;
            --bs-accordion-inner-border-radius: 10px;
            --bs-accordion-btn-focus-box-shadow: none;
            --bs-accordion-active-bg: #f8fafc;
            --bs-accordion-active-color: #0f172a;
        }

        .smart-options-accordion .accordion-item {
            border-radius: 10px;
            overflow: hidden;
            background: #ffffff;
        }

        .smart-options-accordion .accordion-button {
            min-height: 42px;
            background: #ffffff;
        }

        .smart-options-accordion .accordion-button::after {
            margin-right: auto;
            margin-left: 0;
        }

        .smart-options-accordion .accordion-body {
            padding: 12px;
            background: #f8fafc;
        }

        .input-quality-card {
            border: 1px solid #bfdbfe;
            border-right: 4px solid #2563eb;
            border-radius: 12px;
            background: #eff6ff;
            padding: 12px;
        }

        .input-quality-card.quality-ok {
            border-color: #bbf7d0;
            border-right-color: #16a34a;
            background: #f0fdf4;
        }

        .input-quality-card.quality-warn {
            border-color: #fed7aa;
            border-right-color: #f59e0b;
            background: #fff7ed;
        }

        .input-quality-card.quality-danger {
            border-color: #fecaca;
            border-right-color: #ef4444;
            background: #fef2f2;
        }

        .quality-item {
            display: flex;
            align-items: flex-start;
            gap: 7px;
            padding: 6px 0;
            border-top: 1px solid rgba(148, 163, 184, 0.28);
            color: #334155;
            line-height: 1.5;
        }

        .quality-item:first-child {
            border-top: 0;
        }

        /* Range Slider Customization */
        .form-range::-webkit-slider-runnable-track {
            background: rgba(37, 99, 235, 0.2);
            border-radius: 10px;
            height: 8px;
        }

        .form-range::-webkit-slider-thumb {
            background: #ffffff !important;
            border: 4px solid var(--primary) !important;
            width: 22px;
            height: 22px;
            margin-top: -7px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            appearance: none;
            -webkit-appearance: none;
        }

        .form-range::-moz-range-track {
            background: rgba(37, 99, 235, 0.2);
            border-radius: 10px;
            height: 8px;
        }

        .form-range::-moz-range-thumb {
            background: #ffffff !important;
            border: 4px solid var(--primary) !important;
            width: 22px;
            height: 22px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            appearance: none;
            -moz-appearance: none;
        }

        /* Result Cards */
        .res-pill {
            background: white;
            border-radius: 12px;
            padding: 15px;
            border: 1px solid #e2e8f0;
            text-align: center;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
            border-bottom: 4px solid var(--primary);
        }

        .res-pill .val {
            font-size: 1.5rem;
            font-weight: 900;
            color: var(--dark);
            margin: 5px 0;
        }

        .res-pill .lbl {
            font-size: 0.85rem;
            font-weight: 700;
            color: #64748b;
        }

        /* Steel Table */
        .steel-table th {
            background: #1e293b;
            color: white;
            font-size: 0.85rem;
            text-align: center;
        }

        .steel-table td {
            font-size: 0.9rem;
            font-weight: 600;
            text-align: center;
            vertical-align: middle;
        }

        /* AI Compare */
        .ai-box {
            background: #fdf4ff;
            border: 1px dashed #d946ef;
            border-radius: 12px;
            padding: 15px;
        }

        .ai-title {
            color: #86198f;
            font-weight: bold;
        }

        .btn-magic {
            background: linear-gradient(45deg, var(--primary), var(--secondary));
            color: white;
            font-weight: bold;
            border-radius: 12px;
            padding: 12px 20px;
            border: none;
            width: 100%;
            transition: all 0.3s;
        }

        .btn-magic:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
            color: white;
        }

        /* Cost Table */
        .cost-row {
            display: flex;
            justify-content: space-between;
            padding: 10px 0;
            border-bottom: 1px solid #f1f5f9;
            font-weight: 600;
            font-size: 0.95rem;
        }

        .cost-row:last-child {
            border-bottom: none;
        }

        .cost-val {
            color: var(--danger);
            font-weight: 800;
        }

        .cost-total {
            background: #fee2e2;
            color: #991b1b;
            padding: 15px;
            border-radius: 10px;
            font-size: 1.2rem;
            font-weight: 900;
            display: flex;
            justify-content: space-between;
            margin-top: 15px;
        }

        .warning-item {
            background: #ffffff;
            border: 1px solid #fed7aa;
            border-right: 4px solid #f59e0b;
            border-radius: 8px;
            padding: 8px 10px;
            margin-bottom: 8px;
        }

        .warning-item.danger {
            border-color: #fecaca;
            border-right-color: #ef4444;
        }

        .decision-card {
            background: #ffffff;
            border: 1px solid #dbe4ef;
            border-radius: 12px;
            padding: 14px;
            box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
        }

        .risk-radar-card {
            border-right: 5px solid #ef4444;
        }

        .value-engineering-card {
            border-right: 5px solid #16a34a;
        }

        .risk-row {
            padding: 7px 0;
            border-top: 1px solid #eef2f7;
        }

        .risk-row:first-of-type {
            border-top: 0;
        }

        .risk-bar {
            height: 8px;
            border-radius: 999px;
            background: #e2e8f0;
            overflow: hidden;
            margin: 4px 0;
        }

        .risk-bar i {
            display: block;
            height: 100%;
            border-radius: inherit;
        }

        .risk-bar i.ok { background: #16a34a; }
        .risk-bar i.warn { background: #f59e0b; }
        .risk-bar i.danger { background: #ef4444; }

        .risk-reason {
            color: #64748b;
            font-size: 0.76rem;
        }

        .ve-item {
            border: 1px solid #e2e8f0;
            border-right: 4px solid #16a34a;
            border-radius: 8px;
            padding: 8px 10px;
            margin-top: 8px;
            background: #f8fafc;
            color: #334155;
        }

        .ve-item.primary { border-right-color: #2563eb; }
        .ve-item.warning { border-right-color: #f59e0b; background: #fff7ed; }
        .ve-item.danger { border-right-color: #ef4444; background: #fef2f2; }

        .ve-item span {
            color: #16a34a;
            font-weight: 900;
            white-space: nowrap;
        }

        .explain-table th,
        .explain-table td {
            vertical-align: middle;
            text-align: center;
        }

        .blueprint-3d-shell {
            position: relative;
            background: #ffffff;
            border: 2px solid #1e293b;
            border-radius: 8px;
            overflow: hidden;
            min-height: 520px;
        }

        .blueprint-3d-canvas {
            width: 100%;
            height: 520px;
            background: #f8fafc;
        }

        .blueprint-3d-canvas canvas {
            display: block;
            width: 100% !important;
            height: 100% !important;
        }

        .blueprint-3d-legend {
            position: absolute;
            bottom: 12px;
            right: 12px;
            left: 12px;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            background: rgba(255,255,255,0.92);
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            padding: 8px 10px;
            font-size: 0.78rem;
            font-weight: 800;
        }

        .blueprint-3d-toolbar {
            position: absolute;
            top: 12px;
            left: 12px;
            z-index: 5;
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            background: rgba(255,255,255,0.9);
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            padding: 6px;
        }

        .blueprint-3d-toolbar .btn {
            min-width: 58px;
            line-height: 1.2;
        }

        .decor-designer-panel {
            border: 1px solid #cbd5e1;
            border-radius: 12px;
            background: #f8fafc;
            padding: 16px;
        }

        .decor-design-result {
            background: #ffffff;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            padding: 12px;
        }

        .decor-board {
            background: #ffffff;
            border: 1px solid #dbe4ef;
            border-radius: 8px;
            padding: 14px;
            height: 100%;
        }

        .decor-facade-svg {
            width: 100%;
            min-height: 360px;
            border: 1px solid #cbd5e1;
            border-radius: 6px;
            background: #ffffff;
            display: block;
        }

        .decor-facade-luxury {
            box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
        }

        .decor-zoning-svg {
            width: 100%;
            min-height: 300px;
            border: 1px solid #cbd5e1;
            border-radius: 6px;
            display: block;
            background: #ffffff;
        }

        .decor-arch-svg {
            width: 100%;
            min-height: 330px;
            border: 1px solid #cbd5e1;
            border-radius: 6px;
            display: block;
            background: #ffffff;
        }

        .decor-proposal-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
            gap: 10px;
        }

        .decor-proposal-card {
            border: 1px solid #cbd5e1;
            border-right: 4px solid #64748b;
            border-radius: 8px;
            background: #ffffff;
            padding: 10px 12px;
            text-align: start;
            min-height: 92px;
        }

        .decor-proposal-card.active,
        .decor-proposal-card:hover {
            border-color: #2563eb;
            border-right-color: #2563eb;
            background: #eff6ff;
        }

        .decor-proposal-card span,
        .decor-proposal-card strong,
        .decor-proposal-card em {
            display: block;
        }

        .decor-proposal-card span {
            color: #0f172a;
            font-weight: 900;
        }

        .decor-proposal-card strong {
            color: #2563eb;
            font-size: 0.82rem;
            margin: 3px 0;
        }

        .decor-proposal-card em {
            color: #64748b;
            font-size: 0.78rem;
            font-style: normal;
            font-weight: 700;
        }

        .decor-check-list {
            display: grid;
            gap: 8px;
        }

        .decor-check {
            display: flex;
            gap: 8px;
            align-items: flex-start;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 9px 10px;
            background: #ffffff;
            font-size: 0.84rem;
            font-weight: 800;
        }

        .decor-check.ok i {
            color: #16a34a;
        }

        .decor-check.warn {
            border-color: #fed7aa;
            background: #fff7ed;
        }

        .decor-check.warn i {
            color: #f59e0b;
        }

        .decor-chip-row {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .decor-chip {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            border: 1px solid #cbd5e1;
            border-radius: 999px;
            padding: 6px 10px;
            font-size: 0.78rem;
            font-weight: 800;
            background: #ffffff;
        }

        .decor-chip i {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            border: 1px solid rgba(15, 23, 42, 0.18);
            display: inline-block;
        }

        .decor-cost-box {
            border: 1px solid #bfdbfe;
            border-right: 4px solid #2563eb;
            border-radius: 8px;
            background: #eff6ff;
            padding: 10px 12px;
        }

        .decor-cost-box div {
            font-size: 0.78rem;
            font-weight: 800;
            color: #475569;
        }

        .decor-cost-box strong {
            display: block;
            color: #1d4ed8;
            font-size: 1.15rem;
            font-weight: 900;
        }

        .decor-cost-box span {
            color: #64748b;
            font-size: 0.78rem;
            font-weight: 700;
        }

        .decor-notes {
            margin: 8px 0 0;
            padding-inline-start: 20px;
            font-size: 0.83rem;
            font-weight: 700;
            color: #334155;
        }

        .decor-room-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
            gap: 10px;
        }

        .decor-room-card {
            border: 1px solid #e2e8f0;
            border-right: 4px solid #0ea5e9;
            border-radius: 8px;
            padding: 10px;
            background: #ffffff;
        }

        .construction-4d-panel {
            border: 1px solid #cbd5e1;
            border-radius: 12px;
            background: #ffffff;
            padding: 16px;
        }

        .construction-stage-view {
            background: #f8fafc;
            border: 1px solid #dbe4ef;
            border-radius: 10px;
            padding: 14px;
            height: 100%;
        }

        .construction-4d-svg {
            width: 100%;
            min-height: 430px;
            display: block;
            background: #ffffff;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
        }

        .construction-4d-svg .mep-routes path,
        .construction-4d-svg .mep-routes line {
            stroke-linecap: round;
            stroke-linejoin: round;
            animation: serviceFlow 1.8s linear infinite;
        }

        @keyframes serviceFlow {
            to { stroke-dashoffset: -32; }
        }

        .construction-stage-details {
            background: #0f172a;
            color: #ffffff;
            border-radius: 10px;
            padding: 16px;
            border: 1px solid rgba(255,255,255,0.12);
        }

        .stage-kicker {
            color: #93c5fd;
            font-size: 0.78rem;
            font-weight: 900;
            margin-bottom: 4px;
        }

        .stage-metric {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 8px 10px;
            margin-top: 8px;
            font-size: 0.85rem;
        }

        .stage-metric span {
            color: #cbd5e1;
        }

        .stage-metric strong {
            color: #ffffff;
        }

        .stage-note {
            color: #dbeafe;
            font-size: 0.82rem;
            font-weight: 800;
            margin-top: 10px;
        }

        .construction-layer-toggles {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
            margin-top: 8px;
        }

        .construction-layer-toggles button {
            border: 1px solid rgba(255,255,255,0.14);
            background: rgba(255,255,255,0.08);
            color: #cbd5e1;
            border-radius: 8px;
            padding: 7px 8px;
            font-size: 0.78rem;
            font-weight: 900;
            text-align: center;
        }

        .construction-layer-toggles button.active {
            background: color-mix(in srgb, var(--layer-color) 22%, #0f172a);
            border-color: var(--layer-color);
            color: #ffffff;
            box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
        }

        .construction-layer-toggles button.focused {
            outline: 2px solid var(--layer-color);
            outline-offset: 2px;
        }

        .construction-layer-toggles button i {
            color: var(--layer-color);
        }

        .construction-layer-explain {
            margin-top: 10px;
            border: 1px solid rgba(255,255,255,0.14);
            background: rgba(255,255,255,0.08);
            border-radius: 8px;
            padding: 9px 10px;
        }

        .construction-layer-explain strong,
        .construction-layer-explain span {
            display: block;
        }

        .construction-layer-explain span {
            color: #dbeafe;
            font-size: 0.8rem;
            font-weight: 700;
            margin-top: 4px;
        }

        .construction-timeline {
            display: flex;
            flex-wrap: wrap;
            gap: 7px;
            margin-top: 14px;
        }

        .construction-timeline button {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: 1px solid #64748b;
            background: #1e293b;
            color: #cbd5e1;
            font-weight: 900;
        }

        .construction-timeline button.done {
            background: #16a34a;
            border-color: #16a34a;
            color: #ffffff;
        }

        .construction-timeline button.active {
            background: #2563eb;
            border-color: #93c5fd;
            color: #ffffff;
            box-shadow: 0 0 0 3px rgba(147,197,253,0.25);
        }

        /* ===== PRINT STYLES ===== */
        @media print {
            body { background: white !important; font-size: 12px; }
            .header-banner { background: white !important; color: black !important; border-bottom: 3px solid #1e293b; padding: 15px 0 !important; border-radius: 0 !important; }
            .header-banner h1, .header-banner p, .header-banner div { color: black !important; }
            .btn, .btn-magic, .btn-danger, .btn-outline-secondary, button, .form-range { display: none !important; }
            .glass-card { box-shadow: none !important; border: 1px solid #cbd5e1 !important; margin-top: 0 !important; border-radius: 8px !important; }
            .cost-total { background: #f1f5f9 !important; color: black !important; }
            .cost-val { color: black !important; }
            #savings_msg, #demolding_msg, #ai_recommendation_box { border: 1px solid #e2e8f0 !important; background: white !important; }
            .col-xxl-3, .col-xl-4, .col-lg-4 { display: none !important; } /* hide inputs column */
            .col-xl-6, .col-lg-8 { width: 60% !important; }
            .col-xxl-3.col-xl-3 { width: 40% !important; }
        }
