/* ==========================================================================
   hidrologi.net — Modern v2.14.2 EPANET JS
   Visual language: Modern v2 / Engineer Profile
   ========================================================================== */

body.mv2-epanet-page{
    background:#f4f7fb;
}

.mv2-epanet-page .mv2-footer{
    margin-top:0;
}

.ep-page,
.ep-editor-page{
    --ep-page:#f4f7fb;
    --ep-card:#ffffff;
    --ep-line:#dfe7ef;
    --ep-line-soft:#eaf0f5;
    --ep-ink:#153b5b;
    --ep-body:#536f86;
    --ep-muted:#7b91a3;
    --ep-blue:#0874d8;
    --ep-blue-dark:#0566c3;
    --ep-cyan:#2c9dd0;
    --ep-green:#2f9d72;
    --ep-orange:#f58a25;
    --ep-red:#c95d5d;
    --ep-radius:12px;
    --ep-shadow:0 5px 18px rgba(31,72,107,.055);
    --ep-shadow-hover:0 9px 24px rgba(31,72,107,.08);
    color:var(--ep-ink);
    background:var(--ep-page);
}

.ep-page *,
.ep-editor-page *{
    box-sizing:border-box;
}

.ep-shell{
    width:min(1160px,calc(100% - 36px));
    margin-left:auto;
    margin-right:auto;
}

.ep-card{
    border:1px solid var(--ep-line);
    border-radius:var(--ep-radius);
    background:var(--ep-card);
    box-shadow:var(--ep-shadow);
}

/* Shared controls -------------------------------------------------------- */

.ep-btn{
    min-height:38px;
    padding:0 15px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    border:1px solid #d6e2ea;
    border-radius:8px;
    outline:0;
    color:#355b78;
    background:#fff;
    font:inherit;
    font-size:10px;
    font-weight:800;
    line-height:1;
    text-decoration:none;
    white-space:nowrap;
    cursor:pointer;
    transition:border-color .16s ease,background .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease;
}

.ep-btn:hover{
    border-color:#a9cae1;
    color:var(--ep-blue);
    background:#f8fbfe;
    box-shadow:0 4px 12px rgba(31,72,107,.05);
}

.ep-btn:active{
    transform:translateY(1px);
}

.ep-btn-primary{
    border-color:transparent;
    color:#fff;
    background:linear-gradient(180deg,#1183e9,#0870d2);
    box-shadow:0 4px 10px rgba(8,112,210,.13);
}

.ep-btn-primary:hover{
    border-color:transparent;
    color:#fff;
    background:linear-gradient(180deg,#0f79da,#0568c8);
    box-shadow:0 6px 16px rgba(8,112,210,.18);
}

.ep-btn-secondary{
    border-color:#d4e0e9;
    color:#3f627b;
    background:#fff;
}

.ep-btn-sm{
    min-height:34px;
    padding:0 11px;
    border-radius:7px;
    font-size:9px;
}

.ep-icon-btn{
    width:34px;
    height:34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid #dbe5eb;
    border-radius:8px;
    color:#738896;
    background:#fff;
    cursor:pointer;
}

.ep-icon-btn:hover{
    border-color:#e0b5b5;
    color:#b44f4f;
    background:#fff8f8;
}

.ep-kicker{
    display:inline-flex;
    align-items:center;
    gap:7px;
    color:#35749c;
    font-size:9px;
    font-weight:900;
    letter-spacing:.10em;
    text-transform:uppercase;
}

.ep-kicker i{
    color:var(--ep-blue);
}

/* Landing --------------------------------------------------------------- */

.ep-page{
    padding:18px 0 34px;
}

.ep-landing-hero{
    position:relative;
}

.ep-hero-card{
    position:relative;
    min-height:390px;
    padding:32px;
    display:grid;
    grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr);
    gap:34px;
    align-items:center;
    overflow:hidden;
    border:1px solid var(--ep-line);
    border-radius:var(--ep-radius);
    background:
        radial-gradient(circle at 91% 5%,rgba(39,162,222,.10),transparent 26%),
        linear-gradient(135deg,#ffffff 0%,#fbfdff 62%,#f2f9fe 100%);
    box-shadow:var(--ep-shadow);
}

.ep-hero-card::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    width:4px;
    height:100%;
    background:linear-gradient(180deg,var(--ep-blue),#25a2c7,var(--ep-orange));
}

.ep-hero-copy{
    position:relative;
    z-index:2;
    padding-left:5px;
}

.ep-hero-copy h1{
    max-width:650px;
    margin:10px 0 0;
    color:var(--ep-ink);
    font-size:38px;
    line-height:1.07;
    letter-spacing:-1.15px;
}

.ep-hero-lead{
    max-width:640px;
    margin:14px 0 0;
    color:var(--ep-body);
    font-size:13px;
    line-height:1.65;
}

.ep-hero-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:21px;
}

.ep-hero-note{
    display:flex;
    flex-wrap:wrap;
    gap:9px 16px;
    margin-top:18px;
    color:#70879a;
    font-size:9px;
}

.ep-hero-note span{
    display:inline-flex;
    align-items:center;
    gap:5px;
}

.ep-hero-note i{
    color:#3e87b3;
}

.ep-hero-visual{
    min-width:0;
    padding:13px;
    border:1px solid #dfe8ef;
    border-radius:12px;
    background:#fff;
    box-shadow:0 8px 22px rgba(29,70,100,.07);
}

.ep-visual-head{
    min-height:39px;
    padding:0 4px 10px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.ep-visual-head>div{
    display:grid;
    gap:1px;
}

.ep-visual-head span{
    color:#8294a1;
    font-size:8px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
}

.ep-visual-head strong{
    color:#365d77;
    font-size:11px;
}

.ep-live-badge{
    min-height:24px;
    padding:0 8px;
    display:inline-flex;
    align-items:center;
    gap:5px;
    border:1px solid #d8e9e1;
    border-radius:999px;
    color:#4b7d68!important;
    background:#f4fbf8;
    font-size:7px!important;
    letter-spacing:0!important;
    text-transform:none!important;
}

.ep-live-badge i{
    width:6px;
    height:6px;
    border-radius:50%;
    background:var(--ep-green);
}

.ep-network-demo{
    position:relative;
    height:255px;
    overflow:hidden;
    border:1px solid #e4ebf0;
    border-radius:10px;
    background-color:#fbfdff;
    background-image:
        linear-gradient(#edf2f6 1px,transparent 1px),
        linear-gradient(90deg,#edf2f6 1px,transparent 1px);
    background-size:24px 24px;
}

.ep-demo-node{
    position:absolute;
    z-index:3;
    width:13px;
    height:13px;
    transform:translate(-50%,-50%);
    border:3px solid #fff;
    border-radius:50%;
    background:#2d8eb7;
    box-shadow:0 2px 7px rgba(44,89,119,.24);
}

.ep-demo-node.is-reservoir{
    background:#32a77b;
}

.ep-demo-node.is-tank{
    border-radius:4px;
    background:#8559a5;
}

.ep-demo-pipe{
    position:absolute;
    z-index:2;
    height:4px;
    transform-origin:left center;
    border-radius:999px;
    background:#3c93ba;
}

.ep-demo-result{
    position:absolute;
    z-index:4;
    right:12px;
    bottom:12px;
    min-width:132px;
    padding:11px 12px;
    border:1px solid #dbe6ed;
    border-radius:9px;
    background:rgba(255,255,255,.96);
    box-shadow:0 6px 16px rgba(35,72,96,.08);
}

.ep-demo-result small,
.ep-demo-result strong,
.ep-demo-result span{
    display:block;
}

.ep-demo-result small{
    color:#8496a2;
    font-size:7px;
}

.ep-demo-result strong{
    margin-top:3px;
    color:#2d617e;
    font-size:17px;
}

.ep-demo-result span{
    margin-top:2px;
    color:#8395a1;
    font-size:7px;
}

.ep-core-strip{
    position:relative;
    z-index:5;
    width:calc(100% - 44px);
    margin:-18px auto 0;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    overflow:hidden;
    border:1px solid var(--ep-line);
    border-radius:11px;
    background:#fff;
    box-shadow:0 8px 22px rgba(31,72,107,.07);
}

.ep-core-strip>div{
    min-height:72px;
    padding:13px 15px;
    display:flex;
    align-items:center;
    gap:10px;
    border-right:1px solid var(--ep-line-soft);
}

.ep-core-strip>div:last-child{
    border-right:0;
}

.ep-core-icon,
.ep-feature-icon,
.ep-empty-icon,
.ep-editor-module-icon{
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:var(--ep-blue);
    background:#edf7ff;
}

.ep-core-icon{
    width:34px;
    height:34px;
    border-radius:9px;
}

.ep-core-icon svg{
    width:18px;
    height:18px;
}

.ep-core-strip>div>span:last-child{
    display:grid;
    gap:1px;
}

.ep-core-strip strong{
    color:#355c75;
    font-size:10px;
}

.ep-core-strip small{
    color:#8496a3;
    font-size:8px;
}

/* Dashboard ------------------------------------------------------------- */

.ep-dashboard,
.ep-content-section{
    margin-top:16px;
}

.ep-project-panel,
.ep-capability-card,
.ep-workflow-card{
    padding:21px;
}

.ep-section-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:18px;
    margin-bottom:16px;
}

.ep-section-head>div{
    min-width:0;
}

.ep-section-head span{
    color:#738d9f;
    font-size:8px;
    font-weight:900;
    letter-spacing:.10em;
    text-transform:uppercase;
}

.ep-section-head h2{
    margin:3px 0 0;
    color:var(--ep-ink);
    font-size:20px;
    line-height:1.2;
    letter-spacing:-.3px;
}

.ep-section-head p{
    max-width:680px;
    margin:5px 0 0;
    color:var(--ep-body);
    font-size:10px;
    line-height:1.5;
}

.ep-section-head.is-compact{
    margin-bottom:13px;
}

.ep-version-pill{
    min-height:28px;
    padding:0 10px;
    display:inline-flex;
    align-items:center;
    border:1px solid #dce9f3;
    border-radius:999px;
    color:#43718f!important;
    background:#f5faff;
    font-size:8px!important;
    letter-spacing:0!important;
    text-transform:none!important;
}

.ep-stats{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:8px;
    margin-bottom:16px;
}

.ep-stats article{
    min-height:72px;
    padding:13px 14px;
    border:1px solid #e4ebf0;
    border-radius:10px;
    background:#f9fbfd;
}

.ep-stats span,
.ep-stats strong{
    display:block;
}

.ep-stats span{
    color:#8294a1;
    font-size:8px;
    font-weight:800;
    text-transform:uppercase;
}

.ep-stats strong{
    margin-top:5px;
    color:#2e5e7b;
    font-size:21px;
}

.ep-stats strong.is-date{
    font-size:13px;
}

.ep-project-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
}

.ep-project-card{
    min-width:0;
    padding:15px;
    border:1px solid #e2eaf0;
    border-radius:10px;
    background:#fff;
    box-shadow:0 3px 11px rgba(31,72,107,.035);
    transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}

.ep-project-card:hover{
    transform:translateY(-1px);
    border-color:#cddfea;
    box-shadow:var(--ep-shadow-hover);
}

.ep-project-card-head,
.ep-project-foot,
.ep-project-meta{
    display:flex;
    align-items:center;
}

.ep-project-card-head,
.ep-project-foot{
    justify-content:space-between;
    gap:8px;
}

.ep-project-code,
.ep-status,
.ep-project-meta span{
    font-size:8px;
}

.ep-project-code{
    color:#708b9e;
    font-weight:800;
}

.ep-status{
    padding:4px 7px;
    border-radius:999px;
    color:#417b67;
    background:#edf8f4;
    text-transform:capitalize;
}

.ep-project-card h3{
    margin:11px 0 0;
    color:#315974;
    font-size:13px;
}

.ep-project-card p{
    min-height:31px;
    margin:5px 0 0;
    color:#6a8293;
    font-size:9px;
    line-height:1.5;
}

.ep-project-meta{
    flex-wrap:wrap;
    gap:5px;
    margin-top:11px;
}

.ep-project-meta span{
    padding:4px 7px;
    border-radius:6px;
    color:#6a8495;
    background:#f2f6f9;
}

.ep-project-foot{
    margin-top:13px;
    padding-top:11px;
    border-top:1px solid #edf2f5;
}

.ep-project-foot small{
    color:#8798a4;
    font-size:8px;
}

.ep-project-foot>div{
    display:flex;
    gap:5px;
}

.ep-empty{
    padding:34px 20px;
    border:1px dashed #d7e3eb;
    border-radius:10px;
    text-align:center;
    background:#fbfdff;
}

.ep-empty-icon{
    width:42px;
    height:42px;
    margin:0 auto;
    border-radius:11px;
}

.ep-empty-icon svg{
    width:22px;
    height:22px;
}

.ep-empty h3{
    margin:10px 0 0;
    color:#315a75;
    font-size:14px;
}

.ep-empty p{
    margin:5px 0 0;
    color:#788e9e;
    font-size:9px;
}

.ep-alert{
    padding:15px 17px;
    display:flex;
    gap:11px;
    align-items:flex-start;
    border:1px solid;
    border-radius:10px;
    background:#fff;
    font-size:10px;
}

.ep-alert>i{
    margin-top:1px;
    font-size:18px;
}

.ep-alert strong{
    color:inherit;
}

.ep-alert p{
    margin:4px 0 0;
}

.ep-alert-warning{
    border-color:#efd9a9;
    color:#8b682f;
    background:#fffaf0;
}

.ep-alert-danger{
    border-color:#efd0d0;
    color:#985858;
    background:#fff8f8;
}

/* Capability + workflow ------------------------------------------------- */

.ep-content-section{
    display:grid;
    gap:16px;
}

.ep-feature-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:10px;
}

.ep-feature-grid article{
    min-height:148px;
    padding:16px;
    border:1px solid #e2eaf0;
    border-radius:10px;
    background:#fff;
}

.ep-feature-icon{
    width:38px;
    height:38px;
    border-radius:10px;
}

.ep-feature-icon svg{
    width:20px;
    height:20px;
}

.ep-feature-grid h3{
    margin:11px 0 0;
    color:#315a75;
    font-size:12px;
}

.ep-feature-grid p{
    margin:5px 0 0;
    color:#6d8494;
    font-size:9px;
    line-height:1.55;
}

.ep-workflow-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    overflow:hidden;
    border:1px solid #e3ebf0;
    border-radius:10px;
    background:#f9fbfd;
}

.ep-workflow-grid article{
    min-height:104px;
    padding:14px 15px;
    display:grid;
    align-content:start;
    border-right:1px solid #e3ebf0;
}

.ep-workflow-grid article:last-child{
    border-right:0;
}

.ep-workflow-grid b{
    color:var(--ep-orange);
    font-size:9px;
}

.ep-workflow-grid strong{
    margin-top:5px;
    color:#355d77;
    font-size:11px;
}

.ep-workflow-grid span{
    margin-top:4px;
    color:#738999;
    font-size:8.5px;
    line-height:1.5;
}

/* Modal ----------------------------------------------------------------- */

.ep-modal[hidden]{
    display:none!important;
}

.ep-modal{
    position:fixed;
    inset:0;
    z-index:20000;
    display:grid;
    place-items:center;
    padding:18px;
}

.ep-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(13,39,57,.44);
    backdrop-filter:blur(3px);
}

.ep-modal-card{
    position:relative;
    z-index:2;
    width:min(460px,100%);
    padding:24px;
    display:grid;
    gap:12px;
    border:1px solid #dbe6ed;
    border-radius:14px;
    background:#fff;
    box-shadow:0 22px 60px rgba(21,55,78,.22);
}

.ep-modal-card h2{
    margin:0;
    color:var(--ep-ink);
    font-size:20px;
}

.ep-modal-intro{
    margin:-5px 0 1px;
    color:#758b9b;
    font-size:9px;
}

.ep-modal-card label{
    display:grid;
    gap:5px;
    color:#607a8c;
    font-size:9px;
    font-weight:800;
}

.ep-modal-card input,
.ep-modal-card textarea,
.ep-modal-card select{
    width:100%;
    padding:9px 10px;
    border:1px solid #d6e2e9;
    border-radius:8px;
    outline:0;
    color:#31566d;
    background:#fff;
    font:inherit;
    font-size:10px;
}

.ep-modal-card input:focus,
.ep-modal-card textarea:focus,
.ep-modal-card select:focus{
    border-color:#8bc2e8;
    box-shadow:0 0 0 3px rgba(8,116,216,.07);
}

.ep-modal-close{
    position:absolute;
    top:11px;
    right:11px;
    width:32px;
    height:32px;
    border:0;
    border-radius:50%;
    color:#667f90;
    background:#f2f6f8;
    font-size:20px;
    cursor:pointer;
}

/* Editor shell ---------------------------------------------------------- */

.ep-editor-page{
    padding:14px 0 18px;
}

.ep-editor-shell{
    width:min(1480px,calc(100% - 24px));
    margin:0 auto;
}

.ep-editor-topbar{
    position:relative;
    z-index:1020;
    min-height:68px;
    padding:10px 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    border:1px solid var(--ep-line);
    border-radius:12px;
    background:rgba(255,255,255,.98);
    box-shadow:var(--ep-shadow);
}

.ep-editor-brand,
.ep-editor-actions{
    display:flex;
    align-items:center;
}

.ep-editor-brand{
    min-width:0;
    gap:9px;
}

.ep-editor-actions{
    flex:0 0 auto;
    gap:6px;
}

.ep-back{
    width:34px;
    height:34px;
    flex:0 0 auto;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid #d8e3eb;
    border-radius:8px;
    color:#54738a;
    background:#fff;
    text-decoration:none;
}

.ep-back:hover{
    color:var(--ep-blue);
    border-color:#afd0e5;
    background:#f7fbfe;
}

.ep-editor-module-icon{
    width:38px;
    height:38px;
    border-radius:10px;
}

.ep-editor-module-icon svg{
    width:20px;
    height:20px;
}

.ep-editor-title-wrap{
    min-width:0;
    display:grid;
    gap:2px;
}

.ep-editor-eyebrow{
    display:flex;
    align-items:center;
    gap:6px;
    color:#7890a0;
    font-size:7.5px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.ep-demo-badge{
    padding:2px 5px;
    border-radius:999px;
    color:#8c692a;
    background:#fff3d9;
    font-size:7px;
    letter-spacing:0;
    text-transform:none;
}

.ep-editor-brand input{
    width:min(460px,38vw);
    min-width:0;
    padding:0;
    border:0;
    outline:0;
    color:#315872;
    background:transparent;
    font:inherit;
    font-size:14px;
    font-weight:850;
}

.ep-save-state{
    margin-right:3px;
    color:#8194a1;
    font-size:8px;
    white-space:nowrap;
}

.ep-save-state::before{
    content:"";
    width:6px;
    height:6px;
    margin-right:5px;
    display:inline-block;
    border-radius:50%;
    background:#75a58f;
}

.ep-save-state.is-dirty{
    color:#b87a2f;
}

.ep-save-state.is-dirty::before{
    background:#e0a047;
}

.ep-editor-mobile-tabs{
    display:none;
}

.ep-editor-workspace{
    height:calc(100vh - 160px);
    min-height:650px;
    margin-top:10px;
    display:grid;
    grid-template-columns:210px minmax(0,1fr) 250px 280px;
    gap:10px;
    align-items:stretch;
}

.ep-editor-tools,
.ep-editor-properties,
.ep-editor-results,
.ep-editor-map-wrap{
    min-width:0;
    min-height:0;
    overflow:auto;
    border:1px solid var(--ep-line);
    border-radius:11px;
    background:#fff;
    box-shadow:0 4px 14px rgba(31,72,107,.04);
}

.ep-editor-tools,
.ep-editor-properties,
.ep-editor-results{
    padding:14px;
}

.ep-panel-title{
    display:grid;
    gap:2px;
    margin-bottom:12px;
}

.ep-panel-title span{
    color:#8296a4;
    font-size:7.5px;
    font-weight:900;
    letter-spacing:.10em;
    text-transform:uppercase;
}

.ep-panel-title strong{
    color:#365d76;
    font-size:12px;
    line-height:1.3;
}

.ep-panel-title small{
    margin-top:2px;
    color:#8a9ba7;
    font-size:7.5px;
    line-height:1.4;
}

.ep-panel-title.is-small{
    margin-top:18px;
    margin-bottom:9px;
}

.ep-tool-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:6px;
}

.ep-tool-grid button{
    min-height:56px;
    padding:7px;
    border:1px solid #dfe7ed;
    border-radius:9px;
    color:#607b8c;
    background:#fbfcfd;
    cursor:pointer;
    transition:.15s ease;
}

.ep-tool-grid button i,
.ep-tool-grid button span{
    display:block;
}

.ep-tool-grid button i{
    margin-bottom:4px;
    color:#5686a3;
    font-size:15px;
}

.ep-tool-grid button span{
    font-size:8.5px;
    font-weight:800;
}

.ep-tool-grid button:hover,
.ep-tool-grid button.is-active{
    border-color:#9bc8e3;
    color:#176d9b;
    background:#edf7fc;
}

.ep-tool-grid button.is-active i{
    color:var(--ep-blue);
}

.ep-tool-section{
    margin-top:15px;
    padding-top:13px;
    border-top:1px solid #edf2f5;
}

.ep-tool-section>span{
    display:block;
    margin-bottom:7px;
    color:#8195a3;
    font-size:7.5px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.ep-segmented{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:3px;
    padding:3px;
    border-radius:8px;
    background:#edf3f6;
}

.ep-segmented button{
    min-height:29px;
    border:0;
    border-radius:6px;
    color:#728895;
    background:transparent;
    font:inherit;
    font-size:8.5px;
    cursor:pointer;
}

.ep-segmented button.is-active{
    color:#285d7b;
    background:#fff;
    box-shadow:0 2px 7px rgba(37,74,98,.07);
}

.ep-list-action{
    width:100%;
    min-height:31px;
    padding:5px 3px;
    display:flex;
    gap:7px;
    align-items:center;
    border:0;
    border-radius:6px;
    color:#587589;
    background:transparent;
    font:inherit;
    font-size:8.5px;
    text-align:left;
    cursor:pointer;
}

.ep-list-action:hover{
    color:#2e688b;
    background:#f5f9fb;
}

.ep-list-action.is-danger{
    color:#aa5d5d;
}

.ep-model-counts{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:6px;
    margin-top:14px;
}

.ep-model-counts div{
    padding:10px;
    border:1px solid #e5edf1;
    border-radius:9px;
    background:#f5f9fb;
    text-align:center;
}

.ep-model-counts strong,
.ep-model-counts span{
    display:block;
}

.ep-model-counts strong{
    color:#2f6380;
    font-size:15px;
}

.ep-model-counts span{
    margin-top:1px;
    color:#889aa5;
    font-size:7px;
    font-weight:800;
    text-transform:uppercase;
}

/* Map ------------------------------------------------------------------- */

.ep-editor-map-wrap{
    display:grid;
    grid-template-rows:49px minmax(0,1fr);
    overflow:hidden;
}

.ep-map-card-head{
    padding:9px 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    border-bottom:1px solid #e7edf2;
    background:#fff;
}

.ep-map-card-head>div{
    min-width:0;
    display:grid;
    gap:1px;
}

.ep-map-card-head>div span{
    color:#8195a3;
    font-size:7px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.ep-map-card-head>div strong{
    color:#365c75;
    font-size:11px;
}

.ep-engine-chip{
    max-width:220px;
    padding:4px 7px;
    display:flex;
    align-items:center;
    gap:5px;
    overflow:hidden;
    border:1px solid #dfe9e4;
    border-radius:999px;
    color:#6b8379;
    background:#f7fbf9;
    font-size:7px;
    white-space:nowrap;
}

.ep-engine-chip>i{
    width:6px;
    height:6px;
    flex:0 0 auto;
    border-radius:50%;
    background:#60a386;
}

.ep-engine-chip span{
    overflow:hidden;
    text-overflow:ellipsis;
}

.ep-map-canvas{
    position:relative;
    min-width:0;
    min-height:0;
    overflow:hidden;
    background:#dfe8ec;
}

#epMap{
    width:100%;
    height:100%;
    min-height:0;
    background:#dfe8ec;
}

.ep-map-hint{
    position:absolute;
    z-index:600;
    top:11px;
    left:50%;
    max-width:80%;
    padding:7px 10px;
    transform:translateX(-50%);
    border:1px solid rgba(194,211,221,.92);
    border-radius:8px;
    color:#5f7888;
    background:rgba(255,255,255,.94);
    box-shadow:0 4px 12px rgba(37,71,92,.07);
    font-size:8px;
    pointer-events:none;
}

.ep-map-status{
    position:absolute;
    z-index:600;
    right:8px;
    bottom:8px;
    padding:5px 7px;
    display:flex;
    gap:8px;
    border:1px solid rgba(207,221,229,.92);
    border-radius:7px;
    color:#718691;
    background:rgba(255,255,255,.94);
    font-size:7px;
}

/* Map network symbols --------------------------------------------------- */

.ep-node-marker{
    --result-color:#2b87b4;
    width:22px;
    height:22px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:3px solid #fff;
    border-radius:50%;
    color:#fff;
    background:#2b87b4;
    box-shadow:0 3px 8px rgba(34,76,100,.24);
}

.ep-node-marker.is-junction span{
    width:5px;
    height:5px;
    border-radius:50%;
    background:#fff;
}

.ep-node-marker.is-reservoir{
    background:#2f9d72;
    font-size:11px;
}

.ep-node-marker.is-tank{
    border-radius:6px;
    background:#845fa6;
    font-size:10px;
}

.ep-node-marker.is-selected{
    outline:3px solid rgba(245,138,37,.42);
}

.ep-node-marker.has-result{
    background:var(--result-color);
}

.ep-map-label{
    padding:2px 5px!important;
    border:1px solid #d8e2e8!important;
    border-radius:5px!important;
    color:#516d7e!important;
    background:rgba(255,255,255,.92)!important;
    box-shadow:none!important;
    font-size:8px!important;
}

.ep-map-label:before{
    display:none!important;
}

/* Inspector ------------------------------------------------------------- */

.ep-property-empty{
    padding:28px 8px;
    color:#8497a2;
    text-align:center;
}

.ep-property-empty i{
    display:block;
    margin-bottom:8px;
    color:#7295aa;
    font-size:24px;
}

.ep-property-empty p{
    margin:0;
    font-size:8.5px;
    line-height:1.55;
}

#epPropertyForm{
    display:grid;
    gap:8px;
}

.ep-form-field{
    display:grid;
    gap:4px;
    color:#657e8e;
    font-size:8px;
    font-weight:800;
}

.ep-form-field input,
.ep-form-field select,
.ep-result-toolbar select,
.ep-model-options input,
.ep-model-options select{
    width:100%;
    min-width:0;
    min-height:34px;
    padding:7px 8px;
    border:1px solid #d7e2e8;
    border-radius:7px;
    outline:0;
    color:#31566d;
    background:#fff;
    font:inherit;
    font-size:9px;
}

.ep-form-field input:focus,
.ep-form-field select:focus,
.ep-result-toolbar select:focus,
.ep-model-options input:focus,
.ep-model-options select:focus{
    border-color:#8bc1e1;
    box-shadow:0 0 0 3px rgba(8,116,216,.06);
}

.ep-model-options{
    margin-top:17px;
    padding-top:1px;
    border-top:1px solid #edf2f5;
}

.ep-model-options label{
    display:grid;
    gap:4px;
    margin-bottom:8px;
    color:#657e8e;
    font-size:8px;
    font-weight:800;
}

/* Results --------------------------------------------------------------- */

.ep-result-toolbar{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:6px;
    margin-bottom:9px;
}

.ep-result-summary{
    display:grid;
    gap:6px;
}

.ep-result-summary>div{
    padding:9px;
    border:1px solid #e5edf1;
    border-radius:8px;
    background:#f6f9fb;
}

.ep-result-summary span,
.ep-result-summary strong{
    display:block;
}

.ep-result-summary span{
    color:#899aa5;
    font-size:7px;
    font-weight:800;
    text-transform:uppercase;
}

.ep-result-summary strong{
    margin-top:2px;
    color:#315f79;
    font-size:12px;
}

.ep-result-legend{
    margin:10px 0;
}

.ep-gradient{
    height:7px;
    border-radius:999px;
    background:linear-gradient(90deg,rgb(49,104,176),rgb(45,164,197),rgb(92,184,92),rgb(240,184,74),rgb(210,70,70));
}

.ep-result-legend>div:last-child{
    margin-top:3px;
    display:flex;
    justify-content:space-between;
    color:#8495a0;
    font-size:7px;
}

.ep-result-table-wrap{
    max-height:330px;
    overflow:auto;
    border:1px solid #e0e9ee;
    border-radius:8px;
}

.ep-result-table{
    width:100%;
    border-collapse:collapse;
    font-size:8px;
}

.ep-result-table th,
.ep-result-table td{
    padding:6px 7px;
    border-bottom:1px solid #edf2f5;
    text-align:left;
}

.ep-result-table th{
    position:sticky;
    z-index:2;
    top:0;
    color:#66808f;
    background:#f5f8fa;
}

.ep-run-warnings{
    margin-top:10px;
    padding:0 2px;
    color:#92682b;
    font-size:8px;
    line-height:1.5;
}

.ep-run-warnings ul{
    margin:5px 0 0;
    padding-left:16px;
}

/* Toast / loading ------------------------------------------------------- */

.ep-toast-stack{
    position:fixed;
    z-index:20000;
    top:90px;
    right:16px;
    width:min(340px,calc(100% - 32px));
    display:grid;
    gap:7px;
}

.ep-toast{
    padding:11px 12px;
    border:1px solid #d5e2e9;
    border-radius:10px;
    color:#4a687a;
    background:#fff;
    box-shadow:0 10px 28px rgba(25,59,80,.12);
    font-size:10px;
}

.ep-toast.is-success{border-left:4px solid #39966d}
.ep-toast.is-warning{border-left:4px solid #d79a36}
.ep-toast.is-danger{border-left:4px solid #c75b5b}

.ep-loading-overlay[hidden]{display:none!important}

.ep-loading-overlay{
    position:fixed;
    inset:0;
    z-index:19000;
    display:grid;
    place-items:center;
    background:rgba(17,42,57,.45);
    backdrop-filter:blur(3px);
}

.ep-loading-overlay>div{
    min-width:260px;
    padding:24px;
    border-radius:14px;
    background:#fff;
    text-align:center;
    box-shadow:0 18px 48px rgba(17,42,57,.25);
}

.ep-loading-overlay strong,
.ep-loading-overlay small{
    display:block;
}

.ep-loading-overlay strong{
    margin-top:10px;
    color:#315f78;
}

.ep-loading-overlay small{
    margin-top:4px;
    color:#8496a1;
    font-size:9px;
}

.ep-spinner{
    width:28px;
    height:28px;
    display:inline-block;
    border:3px solid #d7e8f0;
    border-top-color:var(--ep-blue);
    border-radius:50%;
    animation:epSpin .8s linear infinite;
}

@keyframes epSpin{to{transform:rotate(360deg)}}

/* Responsive ------------------------------------------------------------ */

@media(max-width:1279px) and (min-width:901px){
    .ep-editor-workspace{
        grid-template-columns:190px minmax(0,1fr) 260px;
        grid-template-rows:minmax(0,1fr) minmax(245px,.82fr);
        grid-template-areas:
            "tools map properties"
            "tools map results";
        min-height:700px;
    }

    .ep-editor-tools{grid-area:tools}
    .ep-editor-map-wrap{grid-area:map}
    .ep-editor-properties{grid-area:properties}
    .ep-editor-results{grid-area:results}

    .ep-editor-brand input{
        width:min(360px,30vw);
    }
}

@media(max-width:1020px){
    .ep-hero-card{
        grid-template-columns:1fr 360px;
        gap:22px;
        padding:27px;
    }

    .ep-hero-copy h1{
        font-size:34px;
    }

    .ep-project-grid{
        grid-template-columns:1fr 1fr;
    }

    .ep-feature-grid{
        grid-template-columns:1fr 1fr;
    }

    .ep-editor-actions{
        max-width:56%;
        overflow-x:auto;
        padding-bottom:1px;
    }

    .ep-editor-actions::-webkit-scrollbar{
        height:0;
    }
}

@media(max-width:900px){
    .ep-shell{
        width:min(100% - 24px,1160px);
    }

    .ep-page{
        padding-top:12px;
    }

    .ep-hero-card{
        min-height:auto;
        grid-template-columns:1fr;
        padding:23px;
    }

    .ep-hero-copy h1{
        max-width:700px;
        font-size:33px;
    }

    .ep-hero-visual{
        display:none;
    }

    .ep-core-strip{
        width:calc(100% - 24px);
        grid-template-columns:1fr 1fr;
    }

    .ep-core-strip>div:nth-child(2){border-right:0}
    .ep-core-strip>div:nth-child(-n+2){border-bottom:1px solid var(--ep-line-soft)}

    .ep-stats,
    .ep-workflow-grid{
        grid-template-columns:1fr 1fr;
    }

    .ep-workflow-grid article:nth-child(2){border-right:0}
    .ep-workflow-grid article:nth-child(-n+2){border-bottom:1px solid #e3ebf0}

    .ep-editor-page{
        padding:10px 0 14px;
    }

    .ep-editor-shell{
        width:calc(100% - 18px);
    }

    .ep-editor-topbar{
        min-height:auto;
        padding:9px;
        align-items:flex-start;
        flex-wrap:wrap;
    }

    .ep-editor-brand{
        width:100%;
    }

    .ep-editor-title-wrap{
        flex:1;
    }

    .ep-editor-brand input{
        width:100%;
    }

    .ep-editor-actions{
        width:100%;
        max-width:none;
        overflow-x:auto;
    }

    .ep-save-state{
        display:none;
    }

    .ep-editor-mobile-tabs{
        margin-top:8px;
        padding:3px;
        display:grid;
        grid-template-columns:repeat(4,1fr);
        border:1px solid var(--ep-line);
        border-radius:10px;
        background:#fff;
        box-shadow:0 3px 10px rgba(31,72,107,.035);
    }

    .ep-editor-mobile-tabs button{
        min-height:36px;
        display:flex;
        align-items:center;
        justify-content:center;
        gap:5px;
        border:0;
        border-radius:7px;
        color:#78909d;
        background:transparent;
        font:inherit;
        font-size:8px;
        font-weight:800;
    }

    .ep-editor-mobile-tabs button.is-active{
        color:#1d6c96;
        background:#edf6fb;
    }

    .ep-editor-workspace{
        position:relative;
        height:calc(100vh - 210px);
        min-height:620px;
        margin-top:8px;
        display:block;
    }

    .ep-editor-tools,
    .ep-editor-properties,
    .ep-editor-results,
    .ep-editor-map-wrap{
        position:absolute;
        inset:0;
        display:none;
        width:auto;
        height:auto;
        border-radius:10px;
    }

    .ep-editor-tools.is-mobile-active,
    .ep-editor-properties.is-mobile-active,
    .ep-editor-results.is-mobile-active,
    .ep-editor-map-wrap.is-mobile-active{
        display:block;
    }

    .ep-editor-map-wrap.is-mobile-active{
        display:grid;
    }

    .ep-tool-grid{
        grid-template-columns:repeat(3,1fr);
    }
}

@media(max-width:620px){
    .ep-hero-card{
        padding:20px 18px;
    }

    .ep-hero-copy h1{
        font-size:29px;
        letter-spacing:-.8px;
    }

    .ep-hero-lead{
        font-size:11px;
    }

    .ep-hero-actions{
        display:grid;
    }

    .ep-hero-actions .ep-btn{
        width:100%;
    }

    .ep-hero-note{
        display:grid;
        gap:6px;
    }

    .ep-core-strip,
    .ep-stats,
    .ep-project-grid,
    .ep-feature-grid,
    .ep-workflow-grid{
        grid-template-columns:1fr;
    }

    .ep-core-strip>div,
    .ep-core-strip>div:nth-child(2),
    .ep-workflow-grid article,
    .ep-workflow-grid article:nth-child(2){
        border-right:0;
        border-bottom:1px solid var(--ep-line-soft);
    }

    .ep-core-strip>div:last-child,
    .ep-workflow-grid article:last-child{
        border-bottom:0;
    }

    .ep-section-head{
        align-items:flex-start;
        flex-direction:column;
    }

    .ep-project-panel,
    .ep-capability-card,
    .ep-workflow-card{
        padding:16px;
    }

    .ep-version-pill{
        align-self:flex-start;
    }

    .ep-editor-module-icon{
        display:none;
    }

    .ep-editor-actions .ep-btn{
        flex:0 0 auto;
    }

    .ep-editor-mobile-tabs button{
        gap:3px;
        font-size:7px;
    }

    .ep-editor-mobile-tabs button i{
        font-size:11px;
    }

    .ep-editor-workspace{
        min-height:590px;
    }
}
