/* =========================================================
   OPENBIM INFORMATION LIFECYCLE DEMO
   ========================================================= */


/* ---------- ASSET BANNER ---------- */

.asset-banner{

    margin-top:30px;

    padding:22px 24px;

    background:var(--surface-alt);

    border:1px solid var(--border);

    border-left:5px solid var(--accent);

    border-radius:12px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:20px;
}

.asset-banner h2{

    margin:5px 0;

}

.asset-banner p{

    margin:0;

    color:var(--muted);

}

.asset-label{

    font-size:.75rem;

    font-weight:700;

    color:var(--muted);

    letter-spacing:.08em;

}

.asset-id{

    font-size:2rem;

    font-weight:700;

    color:var(--accent);

}


/* ---------- STAGE NAVIGATION ---------- */

.stage-navigation{

    display:flex;

    flex-wrap:wrap;

    gap:6px;

    margin:30px 0;

    padding:8px;

    background:#f1f5f9;

    border-radius:12px;

}

.stage-button{

    flex:1 1 90px;

    border:0;

    background:transparent;

    color:#475569;

    padding:10px 8px;

    border-radius:8px;

    cursor:pointer;

    font-weight:700;

    line-height:1.3;

}

.stage-button span{

    font-size:.78rem;

    font-weight:600;

}

.stage-button:hover{

    background:white;

    color:var(--accent);

}

.stage-button.active{

    background:white;

    color:var(--accent);

    box-shadow:0 2px 8px rgba(15,23,42,.08);

}


/* ---------- STAGES ---------- */

.demo-stage{

    display:none;

    animation:fadeIn .25s ease;

}

.demo-stage.active{

    display:block;

}

@keyframes fadeIn{

    from{
        opacity:0;
        transform:translateY(5px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }

}


/* ---------- DOCUMENT ---------- */

.document{

    margin:25px 0;

    border:1px solid var(--border);

    border-radius:10px;

    overflow:hidden;

    background:white;

}

.document-header{

    display:flex;

    justify-content:space-between;

    padding:13px 18px;

    background:#f1f5f9;

    font-size:.8rem;

    font-weight:700;

    color:#475569;

}

.document h3{

    padding:0 18px;

}


/* ---------- TABLE ---------- */

.demo-stage table{

    width:100%;

    border-collapse:collapse;

}

.demo-stage th{

    background:#f1f5f9;

    text-align:left;

}

.demo-stage th,
.demo-stage td{

    border:1px solid var(--border);

    padding:11px;

}

.required{

    color:#b45309;

    font-weight:600;

}


/* ---------- CODE ---------- */

.code-panel{

    margin:25px 0;

    border-radius:10px;

    overflow:hidden;

    border:1px solid #1e293b;

}

.code-title{

    padding:10px 15px;

    background:#1e293b;

    color:#cbd5e1;

    font-size:.82rem;

    font-weight:600;

}

.code-panel pre{

    margin:0;

    border-radius:0;

}


/* ---------- MAPPING ---------- */

.mapping{

    display:flex;

    align-items:center;

    justify-content:center;

    gap:20px;

    margin:30px 0;

}

.mapping-box{

    flex:1;

    max-width:350px;

    padding:20px;

    border:1px solid var(--border);

    border-radius:10px;

    background:var(--surface-alt);

}

.mapping-box p{

    margin-bottom:0;

    color:var(--muted);

}

.mapping-arrow{

    font-size:28px;

    color:var(--accent);

    font-weight:700;

}


/* ---------- INFO GRID ---------- */

.info-grid{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:12px;

    margin:25px 0;

}

.info-grid div{

    padding:15px;

    background:var(--surface-alt);

    border:1px solid var(--border);

    border-radius:8px;

}

.info-grid strong{

    display:block;

    font-size:.8rem;

    color:var(--muted);

    margin-bottom:5px;

}

.info-grid span{

    font-weight:600;

}


/* ---------- EXPLANATION ---------- */

.explanation{

    margin:25px 0;

    padding:20px;

    background:var(--surface-alt);

    border:1px solid var(--border);

    border-radius:10px;

}

.explanation h3{

    margin-top:0;

}


/* ---------- BUTTON ---------- */

.next-stage{

    margin-top:25px;

    padding:12px 20px;

    border:0;

    border-radius:8px;

    background:var(--accent);

    color:white;

    font-weight:600;

    cursor:pointer;

}

.next-stage:hover{

    filter:brightness(1.05);

}

.hidden{

    display:none;

}


/* ---------- VALIDATION ---------- */

.validation-layout{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:25px;

    margin:30px 0;

}

.validation-requirements,
.validation-result{

    padding:20px;

    border:1px solid var(--border);

    border-radius:10px;

    background:var(--surface-alt);

}

.requirement{

    display:flex;

    justify-content:space-between;

    padding:12px;

    background:white;

    border:1px solid var(--border);

    margin-top:7px;

    border-radius:6px;

}

.requirement span{

    color:var(--muted);

    font-size:.8rem;

}

.validation-status{

    padding:18px;

    border-radius:8px;

    text-align:center;

    font-weight:700;

    margin:20px 0;

}

.validation-status.fail{

    background:#fef2f2;

    color:#b91c1c;

    border:1px solid #fecaca;

}

.validation-status.pass{

    background:#f0fdf4;

    color:#15803d;

    border:1px solid #bbf7d0;

}

.validation-result button,
.corrected-panel button,
.bcf-card button{

    padding:10px 18px;

    border:0;

    border-radius:7px;

    background:var(--accent);

    color:white;

    font-weight:600;

    cursor:pointer;

}

.corrected-panel{

    display:none;

    margin-top:25px;

    padding:20px;

    border:1px solid #bbf7d0;

    background:#f0fdf4;

    border-radius:10px;

}


/* ---------- BCF ---------- */

.bcf-card{

    margin:25px 0;

    border:1px solid var(--border);

    border-radius:10px;

    overflow:hidden;

}

.bcf-header{

    display:flex;

    justify-content:space-between;

    padding:13px 18px;

    background:#f1f5f9;

    font-size:.8rem;

    font-weight:700;

}

.issue-open{

    color:#b45309;

}

.issue-flow{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:15px;

    flex-wrap:wrap;

    padding:20px;

    background:var(--surface-alt);

    color:#475569;

}

.bcf-card h3,
.bcf-card table{

    margin-left:18px;

    margin-right:18px;

}

.bcf-card button{

    margin:20px;

}

.resolved-panel{

    display:none;

    padding:18px;

    margin:20px 0;

    background:#f0fdf4;

    border:1px solid #bbf7d0;

    border-radius:8px;

    color:#166534;

}


/* ---------- CDE ---------- */

.cde-window{

    margin:30px 0;

    border:1px solid var(--border);

    border-radius:10px;

    overflow:hidden;

}

.cde-toolbar{

    background:#1e293b;

    color:#e2e8f0;

    padding:12px 18px;

    font-size:.8rem;

    font-weight:600;

}

.cde-body{

    display:grid;

    grid-template-columns:220px 1fr;

    min-height:250px;

}

.cde-tree{

    padding:18px;

    background:#f1f5f9;

    border-right:1px solid var(--border);

}

.cde-tree div{

    padding:8px 4px;

    color:#475569;

}

.cde-tree .selected{

    color:var(--accent);

    font-weight:700;

}

.cde-files{

    padding:20px;

}

.file{

    display:flex;

    justify-content:space-between;

    padding:13px;

    border:1px solid var(--border);

    border-radius:7px;

    margin-bottom:8px;

    background:white;

}

.file span{

    color:#15803d;

    font-size:.8rem;

    font-weight:600;

}


/* ---------- HANDOVER ---------- */

.handover-flow{

    display:flex;

    align-items:center;

    gap:25px;

    margin:30px 0;

}

.handover-source{

    flex:1;

    padding:20px;

    border:1px solid var(--border);

    border-radius:10px;

    background:var(--surface-alt);

}

.handover-source.highlight{

    border-left:4px solid var(--accent);

}

.handover-source h3{

    margin-top:0;

}

.handover-source li{

    margin:8px 0;

}


/* ---------- FACILITY MANAGEMENT ---------- */

.fm-dashboard{

    margin:30px 0;

    border:1px solid var(--border);

    border-radius:12px;

    overflow:hidden;

    background:white;

}

.fm-header{

    padding:20px;

    background:#f1f5f9;

    display:flex;

    justify-content:space-between;

    align-items:center;

}

.fm-header h2{

    margin:4px 0 0;

}

.fm-header span{

    font-size:.75rem;

    color:var(--muted);

    font-weight:700;

}

.asset-status{

    padding:8px 12px;

    border-radius:20px;

    background:#dcfce7;

    color:#166534;

    font-size:.75rem;

    font-weight:700;

}

.fm-grid{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:1px;

    background:var(--border);

}

.fm-grid div{

    padding:18px;

    background:white;

}

.fm-grid label{

    display:block;

    color:var(--muted);

    font-size:.78rem;

    margin-bottom:6px;

}

.fm-grid strong{

    font-size:.95rem;

}

.fm-documents{

    padding:20px;

    border-top:1px solid var(--border);

}

.fm-documents button{

    padding:9px 14px;

    margin-right:7px;

    border:1px solid var(--border);

    background:white;

    border-radius:6px;

    cursor:pointer;

}


/* ---------- LIFECYCLE SUMMARY ---------- */

.lifecycle-summary{

    margin-top:40px;

    padding:25px;

    background:var(--surface-alt);

    border:1px solid var(--border);

    border-radius:12px;

}

.lifecycle-summary h2{

    margin-top:0;

}

.lifecycle-line{

    display:flex;

    align-items:center;

    justify-content:center;

    gap:10px;

    flex-wrap:wrap;

    margin-top:25px;

    font-weight:600;

}

.lifecycle-line span{

    padding:8px 12px;

    background:white;

    border:1px solid var(--border);

    border-radius:6px;

}

.lifecycle-line span:nth-child(even){

    border:0;

    background:transparent;

    color:var(--accent);

}


/* ---------- FINAL MESSAGE ---------- */

.final-message{

    margin-top:30px;

}


/* ---------- MOBILE ---------- */

@media(max-width:760px){

    .asset-banner{

        align-items:flex-start;

    }

    .stage-navigation{

        display:grid;

        grid-template-columns:repeat(2,1fr);

    }

    .info-grid{

        grid-template-columns:repeat(2,1fr);

    }

    .validation-layout{

        grid-template-columns:1fr;

    }

    .mapping{

        flex-direction:column;

    }

    .mapping-arrow{

        transform:rotate(90deg);

    }

    .handover-flow{

        flex-direction:column;

    }

    .handover-flow .mapping-arrow{

        transform:rotate(90deg);

    }

    .cde-body{

        grid-template-columns:1fr;

    }

    .cde-tree{

        border-right:0;

        border-bottom:1px solid var(--border);

    }

    .fm-grid{

        grid-template-columns:repeat(2,1fr);

    }

}