@import url("mfx-system-icons.css?v=7162");
@import url("base.css?v=r5_3_11");
@import url("future.css?v=r5_3_11");
@import url("webapp.css?v=r5_3_11");


/* =========================================================
   V18 HOME REALTIME PRODUCTION STATUS BOARD
   ========================================================= */
.home-production-layout{
    display:grid;
    grid-template-columns:minmax(280px,1fr) minmax(0,2fr);
    gap:14px;
    align-items:start;
    margin-bottom:14px;
}
.home-incident-column .compact-manufacturing{margin:0;height:100%}
.home-line-status-card{
    background:#fff;
    border:1px solid #e5eaf1;
    border-radius:14px;
    padding:14px;
    box-shadow:0 4px 18px rgba(24,39,75,.05);
}
.home-line-status-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:10px;
}
.home-line-status-head h2{margin:0;font-size:17px;font-weight:900}
.home-line-status-head span{display:block;margin-top:2px;font-size:10px;color:#7b8798}
.home-line-status-head a{
    text-decoration:none;
    font-size:10px;
    font-weight:850;
    color:#315fa8;
    background:#f0f5ff;
    padding:7px 10px;
    border-radius:8px;
}
.home-line-status-list{display:flex;flex-direction:column;gap:6px}
.home-line-status-row{
    display:grid;
    grid-template-columns:minmax(130px,1.1fr) minmax(220px,2fr) 58px minmax(105px,.8fr);
    gap:10px;
    align-items:center;
    min-height:48px;
    padding:7px 9px;
    border:1px solid #e8edf4;
    border-radius:9px;
    background:#fbfcfe;
}
.home-line-name{min-width:0}
.home-line-name strong{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:11px;
    color:#26344c;
}
.home-line-name small{display:block;margin-top:2px;font-size:8px;color:#8a95a6}
.home-line-bar-wrap{display:grid;grid-template-columns:minmax(0,1fr) 52px;gap:7px;align-items:center}
.home-line-bar{height:12px;background:#e9edf3;border-radius:999px;overflow:hidden}
.home-line-bar i{display:block;height:100%;border-radius:999px;transition:width .3s ease}
.home-line-bar i.rate-low{background:#d9534f}
.home-line-bar i.rate-mid{background:#55a868}
.home-line-bar i.rate-high{background:#3f7fd8}
.home-line-bar-wrap>b{text-align:right;font-size:10px;color:#26344c}
.home-line-output{text-align:center}
.home-line-output small{display:block;font-size:7px;color:#8a95a6}
.home-line-output strong{font-size:12px}
.home-line-state{
    display:flex;
    align-items:center;
    gap:6px;
    min-width:0;
    padding:6px 8px;
    border-radius:8px;
    font-size:9px;
}
.home-line-state strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.state-dot{width:8px;height:8px;border-radius:50%;flex:0 0 auto;background:#a7b0bd}
.status-running .home-line-state{background:#eaf7ef;color:#16764c}
.status-running .state-dot{background:#2ba66a}
.status-planned .home-line-state{background:#fff6df;color:#8a6517}
.status-planned .state-dot{background:#d9a126}
.status-repair .home-line-state{background:#fff0f0;color:#b63843}
.status-repair .state-dot{background:#d94a55}
.home-line-empty{padding:20px;text-align:center;color:#8a95a6;font-size:10px}
@media(max-width:1100px){
    .home-production-layout{grid-template-columns:1fr}
}
@media(max-width:760px){
    .home-line-status-row{
        grid-template-columns:minmax(100px,1fr) minmax(140px,1.6fr) 50px;
    }
    .home-line-state{grid-column:1/-1}
}


/* V19 GRAPH LINK */
.home-line-graph-link{
    text-decoration:none;
    color:inherit;
    cursor:pointer;
    padding:4px 5px;
    margin:-4px -5px;
    border-radius:8px;
    transition:background .15s ease, transform .15s ease;
}
.home-line-graph-link:hover{
    background:#f0f5ff;
    transform:translateY(-1px);
}
.home-line-graph-link:hover .home-line-bar{
    box-shadow:0 0 0 2px rgba(63,127,216,.14);
}


/* =========================================================
   V20 FIXED APP HEIGHT
   Common desktop frame: logo -> ADMIN is one fixed viewport.
   ========================================================= */
@media (min-width: 900px){
    html, body{
        min-height:100%;
    }

    body{
        min-height:100vh;
    }

    .sidebar{
        position:fixed !important;
        top:8px !important;
        bottom:8px !important;
        left:8px !important;
        height:auto !important;
        max-height:calc(100vh - 16px) !important;
        display:flex !important;
        flex-direction:column !important;
        overflow:hidden !important;
    }

    .sidebar-nav,
    .sidebar-menu,
    .nav-scroll,
    .sidebar-scroll{
        min-height:0;
    }

    .sidebar-nav,
    .nav-scroll,
    .sidebar-scroll{
        flex:1 1 auto;
        overflow-y:auto;
    }

    .sidebar-user,
    .sidebar-account,
    .user-panel{
        flex:0 0 auto;
        margin-top:auto;
    }

    .main-content,
    main.main-content{
        min-height:calc(100vh - 16px);
    }
}

/* =========================================================
   V20 HOME BALANCED LAYOUT
   Primary information gets most of the screen height.
   ========================================================= */
@media (min-width: 900px){
    .home-page,
    .dashboard-page,
    .home-dashboard{
        min-height:calc(100vh - 32px);
    }

    .home-top-grid{
        align-items:stretch;
    }

    .manufacturing-overview,
    .home-line-status-card{
        height:100%;
    }

    .home-line-status-card{
        display:flex;
        flex-direction:column;
    }

    .home-line-status-list{
        flex:1 1 auto;
        display:flex;
        flex-direction:column;
        justify-content:space-evenly;
        gap:8px;
    }

    .home-line-status-row{
        flex:1 1 0;
        min-height:56px;
    }

    .department-bottom-grid{
        margin-top:18px;
    }
}

/* Large desktop: enlarge the two primary HOME blocks. */
@media (min-width: 1100px) and (min-height: 720px){
    .home-top-grid{
        min-height:58vh;
    }

    .manufacturing-overview,
    .home-line-status-card{
        min-height:390px;
    }

    .home-line-status-head h2{
        font-size:22px;
    }

    .home-line-name strong{
        font-size:14px;
    }

    .home-line-status-row{
        padding-top:10px;
        padding-bottom:10px;
    }

    .department-bottom-grid{
        min-height:150px;
        align-items:stretch;
    }

    .compact-department{
        height:100%;
        min-height:130px;
    }
}


/* V20 HOME ACTUAL STRUCTURE */
@media (min-width:900px){
    .home-v20-layout{
        min-height:calc(100vh - 32px);
        display:flex;
        flex-direction:column;
    }

    .home-v20-layout > .home-top-grid,
    .home-v20-layout > .manufacturing-grid,
    .home-v20-layout > .top-dashboard-grid{
        flex:1 1 auto;
    }

    .home-v20-layout .department-bottom-grid{
        flex:0 0 auto;
    }
}


/* =========================================================
   V21 FINAL LAYOUT LOCK
   Uses the actual sidebar/home classes, not placeholder names.
   ========================================================= */
@media (min-width: 900px){

    /* ---------- GLOBAL APP FRAME ---------- */
    .future-sidebar{
        top:12px !important;
        bottom:12px !important;
        left:12px !important;
        height:calc(100vh - 24px) !important;
        max-height:none !important;
        box-sizing:border-box !important;
        display:flex !important;
        flex-direction:column !important;
        overflow:hidden !important;
    }

    .future-brand{
        flex:0 0 auto !important;
    }

    .future-nav{
        flex:1 1 auto !important;
        min-height:0 !important;
        overflow-y:auto !important;
        overflow-x:hidden !important;
        padding-right:2px;
    }

    .future-sidebar-user-wrap{
        flex:0 0 auto !important;
        margin-top:auto !important;
        padding-top:6px;
        background:rgba(255,255,255,.78);
    }

    body.future-shell > main.compact-dashboard,
    body.future-shell > main.dashboard{
        min-height:calc(100vh - 24px) !important;
        margin-top:12px !important;
        margin-bottom:12px !important;
        padding-top:0 !important;
        padding-bottom:0 !important;
        box-sizing:border-box !important;
    }

    /* ---------- HOME: USE THE WHOLE SIDEBAR HEIGHT ---------- */
    .home-v20-layout{
        height:calc(100vh - 24px) !important;
        min-height:0 !important;
        display:grid !important;
        grid-template-rows:minmax(0, 1fr) 165px !important;
        gap:14px !important;
        overflow:hidden !important;
    }

    .home-production-layout{
        min-height:0 !important;
        height:100% !important;
        margin:0 !important;
        display:grid !important;
        grid-template-columns:minmax(320px, 1fr) minmax(0, 2fr) !important;
        gap:14px !important;
        align-items:stretch !important;
    }

    .home-incident-column,
    .home-line-status-card{
        height:100% !important;
        min-height:0 !important;
        box-sizing:border-box !important;
    }

    .home-incident-column{
        display:flex !important;
    }

    .home-incident-column .compact-manufacturing{
        flex:1 1 auto !important;
        width:100% !important;
        height:100% !important;
        min-height:0 !important;
        margin:0 !important;
        display:flex !important;
        flex-direction:column !important;
        box-sizing:border-box !important;
    }

    .home-incident-column .compact-line-list{
        flex:1 1 auto !important;
        min-height:0 !important;
        overflow-y:auto !important;
    }

    .home-incident-column .compact-empty{
        height:100% !important;
        min-height:0 !important;
        flex:1 1 auto !important;
    }

    .home-line-status-card{
        display:flex !important;
        flex-direction:column !important;
        padding:18px !important;
    }

    .home-line-status-head{
        flex:0 0 auto !important;
        margin-bottom:12px !important;
    }

    .home-line-status-head h2{
        font-size:23px !important;
    }

    .home-line-status-list{
        flex:1 1 auto !important;
        min-height:0 !important;
        display:grid !important;
        grid-template-rows:repeat(5, minmax(0, 1fr)) !important;
        gap:8px !important;
    }

    .home-line-status-row{
        min-height:0 !important;
        height:100% !important;
        padding:10px 12px !important;
        grid-template-columns:minmax(145px,1.15fr) minmax(240px,2.25fr) 68px minmax(118px,.9fr) !important;
    }

    .home-line-name strong{
        font-size:14px !important;
    }

    .home-line-bar{
        height:15px !important;
    }

    .home-line-bar-wrap>b{
        font-size:12px !important;
    }

    .home-line-output strong{
        font-size:15px !important;
    }

    .home-line-state{
        min-height:34px !important;
        font-size:10px !important;
    }

    /* ---------- BOTTOM BLOCKS FILL THE REMAINING WIDTH ---------- */
    .department-bottom-grid{
        height:165px !important;
        min-height:165px !important;
        margin:0 !important;
        display:grid !important;
        grid-template-columns:1fr 1fr !important;
        gap:14px !important;
        align-items:stretch !important;
    }

    .compact-department-link{
        height:100% !important;
    }

    .compact-department{
        height:100% !important;
        min-height:0 !important;
        padding:16px 18px !important;
        box-sizing:border-box !important;
        display:flex !important;
        flex-direction:column !important;
        justify-content:center !important;
    }

    .compact-department-title{
        font-size:20px !important;
        margin-bottom:12px !important;
    }

    .compact-department-stats{
        flex:1 1 auto !important;
        align-items:stretch !important;
    }

    .compact-department-stats > div{
        height:100% !important;
        min-height:0 !important;
    }

    .compact-department-stats small{
        font-size:10px !important;
    }

    .compact-department-stats strong{
        font-size:22px !important;
    }
}

/* Laptop height: still fill the viewport, just shrink the bottom row slightly. */
@media (min-width:900px) and (max-height:760px){
    .home-v20-layout{
        grid-template-rows:minmax(0,1fr) 135px !important;
        gap:10px !important;
    }
    .department-bottom-grid{
        height:135px !important;
        min-height:135px !important;
    }
    .home-line-status-card{
        padding:13px !important;
    }
    .home-line-status-row{
        padding:7px 9px !important;
    }
    .compact-department{
        padding:12px 14px !important;
    }
}

/* iPad / narrow desktop keeps single-column fallback. */
@media (max-width:1100px) and (min-width:900px){
    .home-production-layout{
        grid-template-columns:minmax(260px,.9fr) minmax(0,1.6fr) !important;
    }
    .home-line-status-row{
        grid-template-columns:minmax(120px,1fr) minmax(170px,1.7fr) 55px minmax(100px,.8fr) !important;
    }
}


/* =========================================================
   V26 INCIDENT HORIZONTAL
   Home equipment-abnormality cards stay horizontal even in
   the narrow 1/3 HOME column.
   ========================================================= */
@media (min-width:900px){
    .home-incident-column .compact-line-list{
        display:flex !important;
        flex-direction:column !important;
        gap:8px !important;
    }

    .home-incident-column .compact-line-row{
        width:100% !important;
        min-height:94px !important;
        box-sizing:border-box !important;
        display:grid !important;
        grid-template-columns:64px minmax(0,1fr) !important;
        grid-template-areas:
            "priority support"
            "main main"
            "footer footer" !important;
        align-items:center !important;
        column-gap:8px !important;
        row-gap:7px !important;
        padding:10px 11px !important;
    }

    .home-incident-column .priority-column{
        grid-area:priority !important;
        min-width:0 !important;
        display:flex !important;
        flex-direction:row !important;
        align-items:center !important;
        white-space:nowrap !important;
        writing-mode:horizontal-tb !important;
    }

    .home-incident-column .requested-support-column{
        grid-area:support !important;
        min-width:0 !important;
        display:flex !important;
        flex-direction:row !important;
        align-items:center !important;
        gap:5px !important;
        white-space:nowrap !important;
        writing-mode:horizontal-tb !important;
    }

    .home-incident-column .requested-support-column small,
    .home-incident-column .requested-support-badge,
    .home-incident-column .priority-text{
        writing-mode:horizontal-tb !important;
        text-orientation:mixed !important;
        white-space:nowrap !important;
        word-break:keep-all !important;
    }

    .home-incident-column .requested-support-column small{
        font-size:7px !important;
        flex:0 0 auto !important;
    }

    .home-incident-column .requested-support-badge{
        display:inline-flex !important;
        width:auto !important;
        max-width:100% !important;
        padding:4px 6px !important;
        font-size:8px !important;
        line-height:1 !important;
    }

    .home-incident-column .compact-line-main{
        grid-area:main !important;
        min-width:0 !important;
        display:grid !important;
        grid-template-columns:minmax(110px,.9fr) minmax(0,1.7fr) !important;
        column-gap:8px !important;
        row-gap:2px !important;
        align-items:center !important;
    }

    .home-incident-column .compact-line-name,
    .home-incident-column .compact-machine-name,
    .home-incident-column .compact-owner{
        writing-mode:horizontal-tb !important;
        white-space:nowrap !important;
        text-overflow:ellipsis !important;
        overflow:hidden !important;
    }

    .home-incident-column .compact-line-name{
        grid-column:1 !important;
        grid-row:1 !important;
        font-size:11px !important;
    }

    .home-incident-column .compact-machine-name{
        grid-column:2 !important;
        grid-row:1 !important;
        font-size:9px !important;
    }

    .home-incident-column .compact-owner{
        grid-column:1 / -1 !important;
        grid-row:2 !important;
        font-size:8px !important;
    }

    .home-incident-column .incident-timing-row{
        grid-column:1 / -1 !important;
        grid-row:3 !important;
        display:flex !important;
        flex-direction:row !important;
        flex-wrap:wrap !important;
        gap:4px !important;
    }

    .home-incident-column .incident-card-footer{
        grid-area:footer !important;
        min-width:0 !important;
        display:flex !important;
        align-items:flex-end !important;
        justify-content:space-between !important;
        gap:8px !important;
    }

    .home-incident-column .compact-time{
        min-width:0 !important;
        width:auto !important;
        display:flex !important;
        flex-direction:row !important;
        justify-content:flex-end !important;
        align-items:baseline !important;
        gap:5px !important;
        white-space:nowrap !important;
        writing-mode:horizontal-tb !important;
    }

    .home-incident-column .compact-time small,
    .home-incident-column .compact-time strong{
        writing-mode:horizontal-tb !important;
        white-space:nowrap !important;
    }

    .home-incident-column .compact-time strong{
        max-width:100% !important;
        font-size:15px !important;
        line-height:1.1 !important;
    }
}


/* =========================================================
   V27 ANALYTICS HUB
   ========================================================= */
.analytics-v27{display:flex;flex-direction:column;gap:12px}
.analytics-v27-head{display:flex;justify-content:space-between;align-items:end;padding:4px 4px 0}
.analytics-v27-head h1{margin:0;font-size:27px;font-weight:950}
.analytics-v27-head p{margin:3px 0 0;color:#7d8899;font-size:10px}
.analytics-v27-sections{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.analytics-v27-sections a{padding:13px 10px;border:1px solid #e3e8f1;border-radius:11px;background:#fff;color:#536078;text-align:center;text-decoration:none;font-size:12px;font-weight:900}
.analytics-v27-sections a.active{background:linear-gradient(115deg,#2869f4,#7a5cf6);color:#fff;border-color:transparent;box-shadow:0 8px 20px rgba(70,89,230,.16)}
.analytics-v27-filter{padding:10px 12px;background:#fff;border:1px solid #e5eaf1;border-radius:12px}
.analytics-v27-filter form{display:flex;flex-direction:column;gap:8px}
.analytics-v27-period{display:flex;gap:6px}
.analytics-v27-period button{min-height:32px;padding:0 14px;border:1px solid #e0e5ed;border-radius:8px;background:#f8fafc;color:#647087;font-size:9px;font-weight:900;cursor:pointer}
.analytics-v27-period button.active{background:#1e2e48;color:#fff}
.analytics-v27-fields{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.analytics-v27-fields select,.analytics-v27-fields input{min-height:34px;padding:0 9px;border:1px solid #dfe5ee;border-radius:8px;background:#fff;font-size:9px}
.analytics-v27-apply{min-height:34px;padding:0 18px;border:0;border-radius:8px;background:#2869f4;color:#fff;font-size:9px;font-weight:900}
.analytics-v27-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}
.analytics-v27-kpis>div{min-height:90px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;border:1px solid #e5eaf1;border-radius:12px}
.analytics-v27-kpis small{color:#7a8699;font-size:9px}
.analytics-v27-kpis strong{margin-top:6px;font-size:25px}
.analytics-v27-kpis strong span{margin-left:3px;font-size:9px}
.analytics-v27-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.analytics-v27-panel{padding:15px;background:#fff;border:1px solid #e5eaf1;border-radius:13px}
.analytics-v27-panel h2{margin:0 0 13px;font-size:16px}
.analytics-v27-wide{min-height:340px}
.analytics-v27-rank{padding:8px 0;border-bottom:1px solid #eef1f5}
.analytics-v27-rank>div{display:flex;justify-content:space-between;gap:10px;font-size:10px}
.analytics-v27-rank>small{display:block;margin-top:2px;color:#8994a5;font-size:8px}
.analytics-v27-rank>i{display:block;height:7px;margin-top:6px;background:#edf1f6;border-radius:999px;overflow:hidden}
.analytics-v27-rank>i>em{display:block;height:100%;background:#527fd3;border-radius:999px}
.analytics-v27-rank>i>em.defect{background:#d95a63}
.analytics-v27-line{display:grid;grid-template-columns:150px minmax(0,1fr) 75px 70px;gap:10px;align-items:center;min-height:50px;border-bottom:1px solid #eef1f5;font-size:10px}
.analytics-v27-line>strong,.analytics-v27-line>span{text-align:right}
.analytics-v27-bar{height:12px;background:#e9edf3;border-radius:999px;overflow:hidden}
.analytics-v27-bar i{display:block;height:100%;border-radius:999px}
.analytics-v27-bar i.low{background:#d9534f}.analytics-v27-bar i.mid{background:#55a868}.analytics-v27-bar i.high{background:#3f7fd8}.analytics-v27-bar i.defect{background:#d95a63}
.analytics-v27-empty{padding:40px 0;text-align:center;color:#9aa4b3;font-size:10px}
@media(max-width:900px){.analytics-v27-sections,.analytics-v27-kpis{grid-template-columns:repeat(2,1fr)}.analytics-v27-grid{grid-template-columns:1fr}.analytics-v27-line{grid-template-columns:110px minmax(0,1fr) 60px}.analytics-v27-line>span{display:none}}


/* =========================================================
   V28 EQUIPMENT ANALYTICS RESTORE
   ========================================================= */
.analytics-v28-kpis{grid-template-columns:repeat(4,1fr)}
.analytics-v28-equipment-top{display:grid;grid-template-columns:minmax(0,2fr) minmax(300px,1fr);gap:10px}
.analytics-v28-trend{min-height:290px}
.analytics-v28-trend-chart{height:220px;display:flex;align-items:end;gap:4px;overflow-x:auto;padding-top:10px}
.analytics-v28-trend-col{min-width:24px;flex:1 0 24px;height:100%;display:grid;grid-template-rows:18px minmax(0,1fr) 20px;align-items:end;text-align:center}
.analytics-v28-trend-col>span{font-size:8px;font-weight:900;color:#526077}
.analytics-v28-trend-col>div{height:100%;display:flex;align-items:end;justify-content:center}
.analytics-v28-trend-col i{display:block;width:70%;min-height:2px;background:linear-gradient(180deg,#6b8ee8,#3267c8);border-radius:5px 5px 2px 2px}
.analytics-v28-trend-col small{font-size:6px;color:#8994a5;white-space:nowrap}
.analytics-v28-donut-wrap{display:flex;flex-direction:column;align-items:center;gap:14px}
.analytics-v28-donut{width:145px;height:145px;border-radius:50%;display:flex;align-items:center;justify-content:center}
.analytics-v28-donut>div{width:88px;height:88px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 0 0 1px #edf0f4}
.analytics-v28-donut small{font-size:8px;color:#8a95a6}.analytics-v28-donut strong{font-size:25px}.analytics-v28-donut span{font-size:8px}
.analytics-v28-team-legend{width:100%;display:flex;flex-direction:column;gap:6px}
.analytics-v28-team-legend>div{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:7px;align-items:center;font-size:9px}
.analytics-v28-team-legend i{width:8px;height:8px;border-radius:50%}.analytics-v28-team-legend span{color:#7b8798}
.analytics-v27-rank>i>em.problem{background:#cf7e42}.analytics-v27-rank>i>em.cost{background:#5d69c8}
.analytics-v28-status{display:flex;justify-content:space-between;align-items:center;padding:9px 0;border-bottom:1px solid #eef1f5;font-size:10px}
.analytics-v28-status span{padding:4px 8px;border-radius:999px;background:#f3f6fa;color:#59667b;font-weight:900}
.analytics-v28-panel-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:8px}
.analytics-v28-panel-head h2{margin:0}.analytics-v28-panel-head>strong{font-size:16px}
@media(max-width:1000px){.analytics-v28-equipment-top{grid-template-columns:1fr}.analytics-v28-kpis{grid-template-columns:repeat(2,1fr)}}


/* =========================================================
   V30 HOME LINE BOARD
   Equal-height rows, max 10 visible, internal scrolling,
   team filter, and operational priority ordering.
   ========================================================= */
.home-line-status-actions{
    display:flex;
    align-items:center;
    gap:8px;
}
.home-line-team-filter{
    display:flex;
    align-items:center;
    gap:5px;
    margin:0;
    flex-wrap:wrap;
    justify-content:flex-end;
}
.home-line-team-filter label{
    color:#7c8797;
    font-size:8px;
    font-weight:800;
}
.home-line-team-filter select{
    min-width:105px;
    height:31px;
    padding:0 27px 0 9px;
    border:1px solid #dfe5ee;
    border-radius:8px;
    background:#fff;
    color:#344158;
    font-size:9px;
    font-weight:850;
}
.home-line-priority-help{
    display:flex;
    flex-wrap:wrap;
    gap:5px;
    margin:-2px 0 9px;
}
.home-line-priority-help span{
    position:relative;
    padding-left:11px;
    color:#7b8798;
    font-size:7px;
    font-weight:800;
    white-space:nowrap;
}
.home-line-priority-help span::before{
    content:"";
    position:absolute;
    left:0;
    top:50%;
    width:7px;
    height:7px;
    border-radius:50%;
    transform:translateY(-50%);
}
.home-line-priority-help .problem::before{background:#d94a55}
.home-line-priority-help .running::before{background:#2ba66a}
.home-line-priority-help .planned::before{background:#d9a126}
.home-line-priority-help .noplan::before{background:#aab2bf}

/* Strong override of V21 repeat(5,1fr).
   Ten rows fit in the board; the 11th and later scroll internally. */
@media (min-width:900px){
    .home-line-status-list{
        display:block !important;
        flex:1 1 auto !important;
        min-height:0 !important;
        max-height:560px !important;
        overflow-y:auto !important;
        overflow-x:hidden !important;
        padding-right:4px !important;
        scrollbar-width:thin;
    }

    .home-line-status-row{
        display:grid !important;
        width:100% !important;
        height:52px !important;
        min-height:52px !important;
        max-height:52px !important;
        box-sizing:border-box !important;
        margin:0 0 5px !important;
        padding:7px 10px !important;
        grid-template-columns:
            minmax(145px,1.15fr)
            minmax(220px,2.1fr)
            62px
            minmax(108px,.9fr) !important;
        align-items:center !important;
    }

    .home-line-status-row:last-child{
        margin-bottom:0 !important;
    }

    .home-line-name strong{
        line-height:1.1 !important;
    }

    .home-line-state{
        min-height:30px !important;
        height:30px !important;
        box-sizing:border-box !important;
    }
}

@media (min-width:900px) and (max-height:760px){
    .home-line-status-list{
        max-height:500px !important;
    }
    .home-line-status-row{
        height:45px !important;
        min-height:45px !important;
        max-height:45px !important;
        margin-bottom:4px !important;
        padding:5px 8px !important;
    }
}

@media (max-width:760px){
    .home-line-status-actions{
        align-items:flex-end;
        flex-direction:column;
    }
    .home-line-priority-help{
        margin-top:4px;
    }
}


/* =========================================================
   V32 PRODUCTION QUICK VIEW MODAL
   ========================================================= */
body.home-production-modal-open{
    overflow:hidden !important;
}
.home-production-modal[hidden]{
    display:none !important;
}
.home-production-modal{
    position:fixed;
    inset:0;
    z-index:5000;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
}
.home-production-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(18,27,43,.58);
    backdrop-filter:blur(3px);
}
.home-production-modal-panel{
    position:relative;
    z-index:1;
    width:min(1180px,96vw);
    height:min(850px,94vh);
    display:grid;
    grid-template-rows:58px minmax(0,1fr);
    overflow:hidden;
    border:1px solid rgba(255,255,255,.65);
    border-radius:18px;
    background:#f4f6fa;
    box-shadow:0 25px 70px rgba(17,28,47,.28);
}
.home-production-modal-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
    padding:0 17px;
    background:#fff;
    border-bottom:1px solid #e3e8f0;
}
.home-production-modal-head>div{
    min-width:0;
}
.home-production-modal-head small{
    display:block;
    color:#8a95a5;
    font-size:8px;
    font-weight:800;
}
.home-production-modal-head strong{
    display:block;
    margin-top:2px;
    overflow:hidden;
    color:#1d2c44;
    font-size:16px;
    font-weight:950;
    white-space:nowrap;
    text-overflow:ellipsis;
}
.home-production-modal-close{
    width:38px;
    height:38px;
    flex:0 0 auto;
    border:0;
    border-radius:10px;
    background:#f1f4f8;
    color:#34445d;
    font-size:25px;
    font-weight:500;
    line-height:1;
    cursor:pointer;
}
.home-production-modal-close:hover{
    background:#e7ebf1;
}
.home-production-modal-frame{
    width:100%;
    height:100%;
    min-height:0;
    border:0;
    background:#f4f6fa;
}
.home-production-modal-loading{
    position:absolute;
    z-index:2;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    padding:10px 16px;
    border-radius:10px;
    background:#fff;
    box-shadow:0 5px 18px rgba(30,42,66,.12);
    color:#718096;
    font-size:10px;
    font-weight:850;
}
@media(max-width:900px){
    .home-production-modal{
        padding:8px;
    }
    .home-production-modal-panel{
        width:100%;
        height:96vh;
        border-radius:13px;
        grid-template-rows:52px minmax(0,1fr);
    }
}


/* V37 lifecycle master status / hard delete */
.lifecycle-master-name-row{display:flex;align-items:center;gap:8px;min-width:0}
.lifecycle-active-badge{display:inline-flex;align-items:center;justify-content:center;min-width:38px;padding:3px 7px;border-radius:999px;font-size:8px;font-weight:900}
.lifecycle-active-badge.is-active{background:#e7f7ee;color:#16744a}
.lifecycle-active-badge.is-inactive{background:#eef1f5;color:#7b8797}
.lifecycle-master-actions form{margin:0}
.lifecycle-state-button{min-height:30px;padding:0 9px;border:1px solid #d6dde7;border-radius:7px;background:#f3f5f8;color:#5e6979;font-size:8px;font-weight:900;cursor:pointer}
.lifecycle-state-button.enable{background:#eaf7ef;border-color:#caead7;color:#16744a}

/* V38: lifecycle active is one real toggle */
.lifecycle-toggle-button{min-width:52px;min-height:31px;padding:0 11px;border:0;border-radius:999px;font-size:9px;font-weight:900;color:#fff;cursor:pointer}
.lifecycle-toggle-button.active{background:#16965a}
.lifecycle-toggle-button.inactive{background:#d64045}
.lifecycle-toggle-button:hover{filter:brightness(.96)}


/* =========================================================
   V42 TEAM COMPARISON / DEFECT DONUT ANALYTICS
   ========================================================= */
.analytics-v42-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}
.analytics-v42-rank-link{
    display:block;
    color:inherit;
    text-decoration:none;
}
.analytics-v42-rank-link:hover{
    background:#fafbfe;
}
.analytics-v42-donut-wrap{
    display:grid;
    grid-template-columns:180px minmax(0,1fr);
    gap:20px;
    align-items:center;
}
.analytics-v42-donut{
    width:170px;
    height:170px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
}
.analytics-v42-donut>div{
    width:100px;
    height:100px;
    border-radius:50%;
    background:#fff;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    box-shadow:0 0 0 1px #edf0f4;
}
.analytics-v42-donut small{
    color:#8792a2;
    font-size:8px;
}
.analytics-v42-donut strong{
    margin-top:3px;
    font-size:18px;
}
.analytics-v42-legend{
    display:flex;
    flex-direction:column;
    gap:7px;
    min-width:0;
}
.analytics-v42-legend>div{
    display:grid;
    grid-template-columns:10px minmax(80px,1fr) auto;
    gap:7px;
    align-items:center;
    font-size:9px;
}
.analytics-v42-legend i{
    width:8px;
    height:8px;
    border-radius:50%;
}
.analytics-v42-legend span{
    color:#758196;
    white-space:nowrap;
}
.analytics-v42-trend-panel{
    min-height:300px;
}
.analytics-v42-team-keys{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
    margin-bottom:12px;
}
.analytics-v42-team-keys span{
    padding:4px 8px;
    border-radius:999px;
    background:#f1f4f8;
    color:#5d697c;
    font-size:8px;
    font-weight:850;
}
.analytics-v42-trend-scroll{
    overflow-x:auto;
    padding-bottom:5px;
}
.analytics-v42-trend{
    min-width:max-content;
    height:220px;
    display:flex;
    align-items:end;
    gap:10px;
}
.analytics-v42-trend-group{
    width:max(56px,calc(100% / 12));
    min-width:56px;
    height:100%;
    display:grid;
    grid-template-rows:minmax(0,1fr) 22px;
    gap:5px;
}
.analytics-v42-trend-bars{
    display:flex;
    align-items:end;
    justify-content:center;
    gap:3px;
    height:100%;
    padding:0 3px;
    border-bottom:1px solid #dfe5ed;
}
.analytics-v42-trend-bar-wrap{
    width:8px;
    height:100%;
    display:flex;
    align-items:end;
}
.analytics-v42-trend-bar-wrap i{
    display:block;
    width:100%;
    min-height:2px;
    border-radius:4px 4px 1px 1px;
    background:#527fd3;
}
.analytics-v42-trend-group small{
    text-align:center;
    color:#7f8a9a;
    font-size:7px;
}
@media(max-width:950px){
    .analytics-v42-grid{
        grid-template-columns:1fr;
    }
    .analytics-v42-donut-wrap{
        grid-template-columns:1fr;
        justify-items:center;
    }
    .analytics-v42-legend{
        width:100%;
    }
}
.analytics-v44-summary{background:#fff;border:1px solid #e5e9f0;border-radius:14px;padding:14px;margin-bottom:10px}.analytics-v44-summary-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:10px}.analytics-v44-summary-head small,.analytics-v44-summary-head span{font-size:8px;color:#8792a2}.analytics-v44-summary-head h2{margin:2px 0;font-size:14px}.analytics-v44-table-wrap{max-height:420px;overflow:auto}.analytics-v44-summary table{width:100%;border-collapse:collapse;font-size:9px}.analytics-v44-summary th{position:sticky;top:0;background:#f6f8fb;padding:8px;text-align:left}.analytics-v44-summary td{padding:8px;border-bottom:1px solid #eef1f5}.analytics-v44-summary tr.no-data{color:#a0a8b4;background:#fafbfc}
/* V45 productivity analytics: concise + drilldown */
.analytics-v45-click{cursor:pointer;transition:.15s}.analytics-v45-click:hover{background:#f6f9ff}
.analytics-v45-modal{position:fixed;inset:0;background:rgba(16,24,40,.38);z-index:9999;display:flex;align-items:center;justify-content:center;padding:24px}
.analytics-v45-modal[hidden]{display:none}.analytics-v45-dialog{position:relative;width:min(920px,94vw);max-height:82vh;overflow:auto;background:#fff;border-radius:18px;padding:20px;box-shadow:0 24px 70px rgba(15,23,42,.22)}
.analytics-v45-close{position:absolute;right:14px;top:10px;border:0;background:transparent;font-size:28px;cursor:pointer}.analytics-v45-head small{color:#8490a3}.analytics-v45-head h2{margin:3px 0 14px}
.analytics-v45-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px}.analytics-v45-metrics div{background:#f6f8fb;border-radius:12px;padding:12px}.analytics-v45-metrics small{display:block;color:#8792a2}.analytics-v45-metrics strong{display:block;margin-top:4px;font-size:18px}
.analytics-v45-period-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px}.analytics-v45-period{border:1px solid #e1e7f0;background:#fff;border-radius:10px;padding:10px;text-align:left;cursor:pointer}.analytics-v45-period:hover{border-color:#3779e8;background:#f7faff}.analytics-v45-period span,.analytics-v45-period b,.analytics-v45-period small{display:block}.analytics-v45-period b{margin:5px 0;font-size:16px}

/* V47 concise productivity analytics + enlarged drilldown modal */
.analytics-v47-panel-head{display:flex;align-items:end;justify-content:space-between;gap:14px;margin-bottom:10px}
.analytics-v47-panel-head small,.analytics-v47-panel-head span{font-size:8px;color:#8490a3}
.analytics-v47-panel-head h2{margin:2px 0 0}
.analytics-v47-click{cursor:pointer;transition:.15s}.analytics-v47-click:hover{background:#f5f8ff}

.analytics-v47-modal{position:fixed;inset:0;z-index:9999;background:rgba(15,23,42,.48);display:flex;align-items:center;justify-content:center;padding:20px}
.analytics-v47-modal[hidden]{display:none}
.analytics-v47-dialog{position:relative;width:min(1180px,96vw);height:min(820px,92vh);overflow:auto;background:#f7f9fc;border-radius:20px;padding:22px;box-shadow:0 28px 90px rgba(15,23,42,.28)}
.analytics-v47-close{position:absolute;right:18px;top:14px;width:38px;height:38px;border:0;border-radius:10px;background:#fff;font-size:24px;cursor:pointer}
.analytics-v47-title small{color:#8490a3;font-size:9px}.analytics-v47-title h2{margin:4px 0 16px;font-size:24px}
.analytics-v47-main-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:14px}
.analytics-v47-main-kpis>div,.analytics-v47-detail-kpis>div{background:#fff;border:1px solid #e5eaf1;border-radius:13px;padding:14px}
.analytics-v47-main-kpis small,.analytics-v47-detail-kpis small{display:block;color:#8792a2;font-size:9px}
.analytics-v47-main-kpis strong{display:block;margin-top:4px;font-size:22px}
.analytics-v47-chart-card,.analytics-v47-detail-card{background:#fff;border:1px solid #e5eaf1;border-radius:16px;padding:16px;margin-top:12px}
.analytics-v47-chart-card h3,.analytics-v47-detail-card h3{margin:0 0 12px;font-size:14px}
.analytics-v47-chart{height:330px;display:flex;align-items:end;gap:8px;overflow-x:auto;padding:8px 4px 0}
.analytics-v47-bar-item{min-width:58px;height:100%;display:grid;grid-template-rows:22px minmax(0,1fr) 24px;border:0;background:transparent;cursor:pointer;padding:0}
.analytics-v47-bar-item>span{font-size:8px;font-weight:800;color:#44516a}.analytics-v47-bar-item>div{height:100%;display:flex;align-items:end;border-bottom:1px solid #dfe5ed}
.analytics-v47-bar-item i{display:block;width:22px;margin:0 auto;background:#4b7bd8;border-radius:5px 5px 0 0;min-height:3px}
.analytics-v47-bar-item small{font-size:8px;color:#7d8898;padding-top:5px}
.analytics-v47-detail-kpis{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}
.analytics-v47-detail-kpis strong{display:block;margin-top:4px;font-size:15px}
@media(max-width:900px){.analytics-v47-detail-kpis{grid-template-columns:repeat(2,1fr)}.analytics-v47-main-kpis{grid-template-columns:1fr}}

/* V48 horizontal scroll comparison charts */
.analytics-v48-panel{min-height:300px}
.analytics-v48-panel-head{display:flex;align-items:end;justify-content:space-between;gap:14px;margin-bottom:12px}
.analytics-v48-panel-head small,.analytics-v48-panel-head span{font-size:8px;color:#8490a3}
.analytics-v48-panel-head h2{margin:2px 0 0;font-size:14px}
.analytics-v48-scroll{width:100%;overflow-x:auto;overflow-y:hidden;padding-bottom:8px}
.analytics-v48-columns{display:flex;align-items:stretch;gap:8px;min-width:max-content;height:220px}
.analytics-v48-col{width:74px;min-width:74px;height:100%;display:grid;grid-template-rows:22px minmax(0,1fr) 30px 18px;border:1px solid #e7ebf2;border-radius:10px;background:#fff;padding:6px 5px;cursor:pointer}
.analytics-v48-col:hover{border-color:#9bb7ef;background:#f8fbff}
.analytics-v48-col>span{font-size:8px;font-weight:900;text-align:center;color:#3f4b5f}
.analytics-v48-col-bar{display:flex;align-items:end;justify-content:center;border-bottom:1px solid #dfe5ed;min-height:0}
.analytics-v48-col-bar i{display:block;width:28px;min-height:2px;background:#4b7bd8;border-radius:5px 5px 0 0}
.analytics-v48-col-bar i.low{background:#d8565d}
.analytics-v48-col-bar i.mid{background:#df9b39}
.analytics-v48-col-bar i.high{background:#3d80df}
.analytics-v48-col>b{align-self:center;text-align:center;font-size:8px;line-height:1.2;white-space:normal;overflow:hidden}
.analytics-v48-col>small{text-align:center;color:#7f8a9a;font-size:7px}
.analytics-v48-team-columns .analytics-v48-col{width:88px;min-width:88px}

/* V50 historical team-line ownership */
.master-reassign-form{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.master-reassign-form select,.master-reassign-form input{min-height:31px;border:1px solid #dfe5ed;border-radius:8px;padding:4px 6px;background:#fff;font-size:8px}
.master-reassign-form button{min-height:31px;border:0;border-radius:8px;padding:5px 9px;background:#edf4ff;font-weight:800;cursor:pointer}

/* =========================================================
   V51 HISTORY CENTER
   ========================================================= */
.history-v51-page{padding-bottom:30px}
.history-v51-title{display:flex;align-items:center;justify-content:space-between;gap:18px}
.history-v51-title small{font-size:8px;color:#8a95a6;font-weight:900;letter-spacing:.12em}
.history-v51-title h1{margin:3px 0;font-size:24px}
.history-v51-title p{margin:0;color:#778397;font-size:9px}
.history-v51-title-count{display:flex;align-items:baseline;gap:4px}.history-v51-title-count strong{font-size:28px}.history-v51-title-count span{font-size:9px;color:#8691a2}

.history-v51-filter{display:flex;flex-direction:column;gap:10px}
.history-v51-period{display:flex;gap:5px;flex-wrap:wrap}
.history-v51-period button{min-width:58px;height:32px;border:1px solid #e0e5ed;border-radius:8px;background:#fff;font-size:9px;font-weight:850;cursor:pointer}
.history-v51-period button.active{background:#1f2d3d;color:#fff;border-color:#1f2d3d}
.history-v51-fields{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.history-v51-fields select,.history-v51-fields input{height:34px;border:1px solid #dfe5ed;border-radius:8px;background:#fff;padding:0 9px;font-size:9px}
.history-v51-fields input[type=search]{min-width:190px;flex:1}
.history-v51-search{height:34px;border:0;border-radius:8px;background:#2869f4;color:#fff;padding:0 16px;font-size:9px;font-weight:900}

.history-v51-categories{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:10px 0}
.history-v51-categories a{display:flex;align-items:center;justify-content:center;gap:8px;min-height:54px;background:#fff;border:1px solid #e4e9f1;border-radius:12px;text-decoration:none;color:#5f6c80}
.history-v51-categories a.active{border-color:#4c79d8;box-shadow:0 0 0 1px #4c79d8 inset;color:#2f5fb7}
.history-v51-categories b{font-size:17px}.history-v51-categories span{font-size:9px;font-weight:850}

.history-v51-list-card{padding:0;overflow:hidden}
.history-v51-list-head{display:flex;align-items:end;justify-content:space-between;padding:15px 16px;border-bottom:1px solid #e9edf3}
.history-v51-list-head small{font-size:8px;color:#8b96a6}.history-v51-list-head h2{margin:2px 0 0;font-size:15px}.history-v51-list-head>span{font-size:8px;color:#8b96a6}
.history-v51-table{overflow:auto;max-height:640px}
.history-v51-row{display:grid;grid-template-columns:90px 85px minmax(260px,1.7fr) minmax(190px,1fr) 90px 90px 28px;gap:8px;align-items:center;min-width:950px;padding:9px 14px;border-bottom:1px solid #eef1f5}
.history-v51-headrow{position:sticky;top:0;z-index:2;background:#f7f9fc;color:#758196;font-size:8px;font-weight:850}
.history-v51-event{text-decoration:none;color:#263247;background:#fff;transition:.12s}.history-v51-event:hover{background:#f8faff}
.history-v51-event>div:first-child strong,.history-v51-event>div:first-child small{display:block}.history-v51-event>div:first-child strong{font-size:10px}.history-v51-event>div:first-child small{font-size:8px;color:#8591a2;margin-top:2px}
.history-v51-type{display:inline-flex;padding:4px 7px;border-radius:999px;background:#eef3f9;font-size:8px}
.type-equipment .history-v51-type{background:#fff0f1;color:#b9414d}.type-production .history-v51-type{background:#edf5ff;color:#3268b9}.type-lifecycle .history-v51-type{background:#eef8f1;color:#28734a}.type-master .history-v51-type{background:#f4efff;color:#6d50ad}
.history-v51-main strong,.history-v51-main small,.history-v51-location strong,.history-v51-location small{display:block}.history-v51-main strong{font-size:10px}.history-v51-main small,.history-v51-location small{font-size:8px;color:#7e8999;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-v51-location strong{font-size:9px}.history-v51-status{display:inline-flex;padding:4px 7px;border-radius:999px;background:#f2f4f7;font-size:8px;font-weight:800}.history-v51-open{text-align:right;font-size:18px;color:#8490a2}
.history-v51-empty{padding:55px 20px;text-align:center}.history-v51-empty strong,.history-v51-empty span{display:block}.history-v51-empty span{margin-top:5px;color:#8590a0;font-size:9px}
@media(max-width:900px){.history-v51-categories{grid-template-columns:repeat(2,1fr)}}

/* V54 Scientific History Hierarchy */
.history-v54-page{padding-bottom:32px}.history-v54-hero{display:flex;justify-content:space-between;align-items:center}.history-v54-hero small,.history-v54-section-title small{font-size:8px;letter-spacing:.12em;color:#8a95a6;font-weight:900}.history-v54-hero h1{font-size:24px;margin:3px 0}.history-v54-hero p{margin:0;font-size:9px;color:#778397}.history-v54-hero-kpi{text-align:right}.history-v54-hero-kpi strong{display:block;font-size:28px}.history-v54-hero-kpi span{font-size:7px;color:#8994a5}
.history-v54-filter{display:flex;flex-direction:column;gap:10px}.history-v54-period,.history-v54-fields,.history-v54-switch,.history-v54-cats{display:flex;gap:6px;flex-wrap:wrap}.history-v54-period button,.history-v54-switch a,.history-v54-cats a{border:1px solid #e0e5ed;background:#fff;border-radius:8px;min-height:32px;padding:0 14px;display:flex;align-items:center;justify-content:center;text-decoration:none;color:#657286;font-size:9px;font-weight:850}.history-v54-period button.active,.history-v54-switch a.active{background:#1f2d3d;color:#fff;border-color:#1f2d3d}.history-v54-fields select,.history-v54-fields input{height:34px;border:1px solid #dfe5ed;border-radius:8px;background:#fff;padding:0 8px;font-size:9px}.history-v54-fields input[type=search]{flex:1;min-width:180px}.history-v54-search{height:34px;border:0;border-radius:8px;background:#2869f4;color:#fff;padding:0 16px;font-weight:900}.history-v54-switch{margin:10px 0}.history-v54-cats{margin:10px 0}.history-v54-cats a.active{border-color:#4775d3;color:#2f5fb7;background:#f5f8ff}
.history-v54-summary{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}.history-v54-summary div{background:#fff;border:1px solid #e5eaf1;border-radius:11px;padding:10px 12px}.history-v54-summary span{display:block;font-size:8px;color:#7f8b9d}.history-v54-summary strong{display:block;margin-top:4px;font-size:15px}
.history-v54-branch,.history-v54-detail{padding:0;overflow:hidden}.history-v54-section-title{display:flex;align-items:end;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #e9edf3}.history-v54-section-title h2{margin:2px 0 0;font-size:15px}.history-v54-section-title>span{font-size:8px;color:#8792a3}
.history-v54-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:9px;padding:12px}.history-v54-node{border:1px solid #e3e8ef;border-radius:11px;padding:12px;text-decoration:none;color:#263247;background:#fff;transition:.12s}.history-v54-node:hover{border-color:#85a5e7;box-shadow:0 4px 14px rgba(50,80,130,.08);transform:translateY(-1px)}.history-v54-node-head{display:flex;justify-content:space-between;align-items:center}.history-v54-node-head strong{font-size:12px}.history-v54-node-head b{font-size:11px;color:#416fc3}.history-v54-mini{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:11px 0}.history-v54-mini span{background:#f6f8fb;border-radius:6px;padding:5px 6px;font-size:8px;color:#667387}.history-v54-node-foot{display:flex;align-items:center;gap:9px;padding-top:8px;border-top:1px solid #eef1f5;font-size:8px;color:#758196}.history-v54-node-foot i{margin-left:auto;font-size:16px;font-style:normal}
.history-v54-table{max-height:650px;overflow:auto}.history-v54-row{display:grid;grid-template-columns:80px 80px minmax(260px,1.7fr) minmax(180px,1fr) 80px 80px 24px;gap:8px;align-items:center;min-width:900px;padding:9px 14px;border-bottom:1px solid #eef1f5;text-decoration:none;color:#273348;background:#fff}.history-v54-row.head{position:sticky;top:0;z-index:2;background:#f7f9fc;font-size:8px;color:#748094;font-weight:850}.history-v54-row:not(.head):hover{background:#f8faff}.history-v54-row strong,.history-v54-row small{display:block}.history-v54-row strong{font-size:9px}.history-v54-row small{font-size:8px;color:#808c9d;margin-top:3px}.history-v54-row .tag{display:inline-flex;padding:4px 6px;border-radius:999px;background:#eef3f9;font-size:8px}.history-v54-row .tag.equipment{background:#fff0f1;color:#b9414d}.history-v54-row .tag.production{background:#edf5ff;color:#3268b9}.history-v54-row .tag.lifecycle{background:#eef8f1;color:#28734a}.history-v54-row .tag.master{background:#f4efff;color:#6d50ad}.history-v54-row .arrow{font-size:17px}.history-v54-empty{padding:45px;text-align:center;color:#8792a2;font-size:9px}
@media(max-width:1000px){.history-v54-summary{grid-template-columns:repeat(3,1fr)}}
/* V55 History: period scope -> organization hierarchy */
.history-v55-page{padding-bottom:32px}.history-v55-hero{display:flex;align-items:center;justify-content:space-between}.history-v55-hero small,.history-v55-browser-head small{font-size:8px;color:#8b96a6;letter-spacing:.12em;font-weight:900}.history-v55-hero h1{font-size:24px;margin:3px 0}.history-v55-hero p{font-size:9px;color:#788497;margin:0}.history-v55-hero>div:last-child{text-align:right}.history-v55-hero>div:last-child strong{font-size:28px}.history-v55-hero>div:last-child span{font-size:9px;color:#8490a1;margin-left:3px}
.history-v55-filter{display:flex;flex-direction:column;gap:9px}.history-v55-period,.history-v55-fields,.history-v55-cats{display:flex;gap:6px;flex-wrap:wrap}.history-v55-period button,.history-v55-cats a{height:32px;border:1px solid #e0e5ed;border-radius:8px;background:#fff;padding:0 14px;display:flex;align-items:center;text-decoration:none;color:#667387;font-size:9px;font-weight:850}.history-v55-period button.active{background:#1f2d3d;color:#fff;border-color:#1f2d3d}.history-v55-fields select,.history-v55-fields input{height:34px;border:1px solid #dfe5ed;border-radius:8px;padding:0 9px;background:#fff;font-size:9px}.history-v55-fields input[type=search]{flex:1;min-width:220px}.history-v55-search{height:34px;border:0;border-radius:8px;background:#2869f4;color:#fff;padding:0 17px;font-weight:900}
.history-v55-kpis{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}.history-v55-kpis div{background:#fff;border:1px solid #e4e9f0;border-radius:11px;padding:10px 12px}.history-v55-kpis span{display:block;font-size:8px;color:#7f8b9c}.history-v55-kpis strong{display:block;margin-top:4px;font-size:15px}.history-v55-cats{margin:10px 0}.history-v55-cats a.active{border-color:#4775d3;background:#f4f7ff;color:#2e5eb7}
.history-v55-browser{padding:0;overflow:hidden}.history-v55-browser-head{display:flex;align-items:end;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #e8edf3}.history-v55-browser-head h2{font-size:15px;margin:2px 0 0}.history-v55-breadcrumb{display:flex;gap:5px;align-items:center;font-size:8px;color:#8490a0}.history-v55-breadcrumb a{text-decoration:none;color:#4770b8;font-weight:800}
.history-v55-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:9px;padding:12px}.history-v55-node{position:relative;display:block;border:1px solid #e2e8ef;border-radius:11px;padding:12px;text-decoration:none;color:#273347;background:#fff;transition:.12s}.history-v55-node:hover{border-color:#7e9fe3;box-shadow:0 4px 14px rgba(50,80,130,.08);transform:translateY(-1px)}.history-v55-node.all{background:#f5f8ff;border-color:#bfd0f2}.history-v55-node-head{display:flex;align-items:center;justify-content:space-between}.history-v55-node-head strong{font-size:12px}.history-v55-node-head b{font-size:12px;color:#3767bd}.history-v55-node p{font-size:8px;color:#758196;margin:10px 0 0}.history-v55-node-stats{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:11px 0}.history-v55-node-stats span{padding:5px 6px;background:#f6f8fb;border-radius:6px;font-size:8px;color:#657286}.history-v55-node-foot{display:flex;gap:9px;align-items:center;border-top:1px solid #edf1f5;padding-top:8px;font-size:8px;color:#748092}.history-v55-node-foot i,.history-v55-node-arrow{margin-left:auto;font-size:17px;font-style:normal}.history-v55-node-arrow{position:absolute;right:12px;bottom:8px}
.history-v55-detail-head{padding:10px 14px;background:#f7f9fc;border-bottom:1px solid #e8edf3}.history-v55-detail-head strong{font-size:11px}.history-v55-detail-head span{font-size:8px;color:#7f8b9c;margin-left:6px}.history-v55-table{max-height:650px;overflow:auto}.history-v55-row{display:grid;grid-template-columns:80px 80px minmax(260px,1.7fr) minmax(180px,1fr) 80px 80px 24px;gap:8px;align-items:center;min-width:900px;padding:9px 14px;border-bottom:1px solid #eef1f5;text-decoration:none;color:#273348;background:#fff}.history-v55-row.head{position:sticky;top:0;z-index:2;background:#f7f9fc;font-size:8px;color:#748094;font-weight:850}.history-v55-row strong,.history-v55-row small{display:block}.history-v55-row strong{font-size:9px}.history-v55-row small{font-size:8px;color:#808c9d;margin-top:3px}.history-v55-row .tag{display:inline-flex;padding:4px 6px;border-radius:999px;background:#eef3f9;font-size:8px}.history-v55-row .tag.equipment{background:#fff0f1;color:#b9414d}.history-v55-row .tag.production{background:#edf5ff;color:#3268b9}.history-v55-row .tag.lifecycle{background:#eef8f1;color:#28734a}.history-v55-row .tag.master{background:#f4efff;color:#6d50ad}.history-v55-empty{padding:45px;text-align:center;color:#8792a2;font-size:9px}@media(max-width:1000px){.history-v55-kpis{grid-template-columns:repeat(3,1fr)}}
/* V56 compact column history browser */
.history-v56-browser{padding:0;overflow:hidden}
.history-v56-browser-head{display:flex;align-items:end;justify-content:space-between;padding:13px 15px;border-bottom:1px solid #e8edf3}
.history-v56-browser-head small{font-size:8px;color:#8b96a6;letter-spacing:.12em;font-weight:900}
.history-v56-browser-head h2{margin:2px 0 0;font-size:15px}.history-v56-browser-head>span{font-size:8px;color:#8490a2}
.history-v56-columns{display:grid;grid-template-columns:210px 230px 230px minmax(320px,1fr);height:600px;min-width:990px}
.history-v56-column{border-right:1px solid #e8edf3;min-width:0;background:#fff}.history-v56-column:last-child{border-right:0}
.history-v56-col-head{height:42px;display:flex;align-items:center;justify-content:space-between;padding:0 11px;background:#f7f9fc;border-bottom:1px solid #e8edf3}
.history-v56-col-head strong{font-size:10px}.history-v56-col-head span{font-size:8px;color:#7f8b9d}
.history-v56-list,.history-v56-detail{height:calc(100% - 42px);overflow:auto}
.history-v56-item{width:100%;min-height:52px;border:0;border-bottom:1px solid #eef1f5;background:#fff;padding:8px 9px;display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;cursor:pointer}
.history-v56-item:hover,.history-v56-item.active{background:#f5f8ff}.history-v56-item.active{box-shadow:inset 3px 0 #4b76d1}
.history-v56-item.all{background:#fbfcfe}.history-v56-item>div:first-child{min-width:0}.history-v56-item strong{display:block;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-v56-item small{display:block;margin-top:3px;font-size:7px;color:#8994a4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-v56-item-right{display:flex;align-items:center;gap:6px;flex:none}.history-v56-item-right b{font-size:9px;color:#3765b8}.history-v56-item-right span{font-size:15px;color:#a0a9b7}
.history-v56-placeholder{padding:22px 12px;color:#9aa3b0;font-size:8px;text-align:center}
.history-v56-record{display:block;padding:9px 11px;border-bottom:1px solid #edf1f5;text-decoration:none;color:#263247}.history-v56-record:hover{background:#f8faff}
.history-v56-record>div{display:flex;align-items:center;justify-content:space-between;gap:8px}.history-v56-record .type{display:inline-flex;padding:3px 6px;border-radius:999px;background:#eef3f9;font-size:7px}.history-v56-record .type.equipment{background:#fff0f1;color:#b9414d}.history-v56-record .type.production{background:#edf5ff;color:#3268b9}.history-v56-record .type.lifecycle{background:#eef8f1;color:#28734a}.history-v56-record .type.master{background:#f4efff;color:#6d50ad}
.history-v56-record>div small,.history-v56-record>small{font-size:7px;color:#8792a2}.history-v56-record>strong{display:block;margin:5px 0 3px;font-size:9px}.history-v56-more{padding:10px;text-align:center;font-size:8px;color:#8792a2;background:#f8fafc}
@media(max-width:1100px){.history-v56-browser{overflow-x:auto}}

/* V57 adaptive history navigator */
.history-v57-browser{padding:0;overflow:visible}.history-v57-toolbar{display:flex;align-items:end;justify-content:space-between;padding:13px 15px;border-bottom:1px solid #e8edf3}.history-v57-toolbar small{font-size:8px;color:#8b96a6;letter-spacing:.12em;font-weight:900}.history-v57-toolbar h2{margin:2px 0 0;font-size:15px}.history-v57-filter-toggle{border:1px solid #dfe5ed;border-radius:8px;background:#fff;height:30px;padding:0 11px;font-size:8px;font-weight:850;cursor:pointer}
.history-v57-search-wrap{position:relative;padding:11px 15px;border-bottom:1px solid #edf1f5}.history-v57-searchbox{height:38px;display:flex;align-items:center;gap:8px;border:1px solid #dce3ec;border-radius:9px;padding:0 10px;background:#fff}.history-v57-searchbox>span{font-size:16px;color:#8490a0}.history-v57-searchbox input{flex:1;border:0;outline:0;font-size:9px}.history-v57-searchbox button{border:0;background:transparent;font-size:15px;color:#8a95a5;cursor:pointer}
.history-v57-suggestions{position:absolute;z-index:20;left:15px;right:15px;top:53px;background:#fff;border:1px solid #dfe5ed;border-radius:9px;box-shadow:0 10px 28px rgba(32,48,70,.14);max-height:330px;overflow:auto}.history-v57-suggestions button{width:100%;border:0;border-bottom:1px solid #eef1f5;background:#fff;padding:8px 10px;display:grid;grid-template-columns:52px 1fr;text-align:left;cursor:pointer}.history-v57-suggestions button:hover{background:#f6f9ff}.history-v57-suggestions b{font-size:7px;color:#4c70b2}.history-v57-suggestions strong,.history-v57-suggestions small{display:block}.history-v57-suggestions strong{font-size:9px}.history-v57-suggestions small{font-size:7px;color:#8994a4;margin-top:2px}
.history-v57-filter-panel{border-bottom:1px solid #e8edf3;background:#fafbfd;padding:9px 15px}.history-v57-filter-path{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:7px}.history-v57-filter-col{background:#fff;border:1px solid #e4e9f0;border-radius:8px;overflow:hidden;max-height:250px}.history-v57-filter-col>strong{display:block;padding:7px 9px;background:#f6f8fb;font-size:8px}.history-v57-filter-col>div{overflow:auto;max-height:215px}.history-v57-filter-col button{width:100%;border:0;border-top:1px solid #f0f2f5;background:#fff;padding:7px 8px;display:grid;grid-template-columns:1fr auto 12px;gap:5px;text-align:left;cursor:pointer;font-size:8px}.history-v57-filter-col button:hover{background:#f5f8ff}.history-v57-filter-col button b{color:#416bb8}.history-v57-filter-col button i{font-style:normal;color:#9aa4b2}.history-v57-filter-col p{padding:15px;text-align:center;color:#9aa4b2;font-size:8px}
.history-v57-result-head{display:flex;justify-content:space-between;align-items:center;padding:9px 15px;background:#f8fafc;border-bottom:1px solid #e8edf3}.history-v57-result-head strong{font-size:10px}.history-v57-result-head span{font-size:8px;color:#7e899a;margin-left:6px}.history-v57-result-head button{border:0;background:transparent;color:#4770b8;font-size:8px;font-weight:850;cursor:pointer}
.history-v57-results{max-height:620px;overflow:auto}.history-v57-record{display:grid;grid-template-columns:145px minmax(180px,1fr) minmax(220px,1.5fr) minmax(180px,1fr);align-items:center;gap:9px;padding:8px 12px;border-bottom:1px solid #edf1f5;text-decoration:none;color:#263247}.history-v57-record:hover{background:#f8faff}.history-v57-record-top{display:flex;align-items:center;gap:6px}.history-v57-record-top time{font-size:7px;color:#8792a2}.history-v57-record .type{padding:3px 6px;border-radius:999px;background:#eef3f9;font-size:7px}.history-v57-record .type.equipment{background:#fff0f1;color:#b9414d}.history-v57-record .type.production{background:#edf5ff;color:#3268b9}.history-v57-record .type.lifecycle{background:#eef8f1;color:#28734a}.history-v57-record .type.master{background:#f4efff;color:#6d50ad}.history-v57-record>strong{font-size:9px}.history-v57-record p{margin:0;font-size:8px;color:#6f7b8d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.history-v57-record>small{font-size:8px;color:#7e8999}.history-v57-empty,.history-v57-more{padding:35px;text-align:center;color:#8994a4;font-size:8px}

/* V59 unified live-search result counter */
.mfx-live-result-meta{display:flex;justify-content:flex-end;align-items:center;gap:6px;margin:0 2px 7px;font-size:8px;color:#8994a4}
.mfx-live-result-meta strong{font-size:9px;color:#4d596b}

/* V60 History search = inventory-picker style live result dropdown */
.history-v57-search-wrap{position:relative}
.history-v57-suggestions{
    position:absolute;
    z-index:80;
    left:15px;
    right:15px;
    top:56px;
    max-height:430px;
    overflow:auto;
    background:#fff;
    border:1px solid #dce3ec;
    border-radius:12px;
    box-shadow:0 14px 36px rgba(29,43,66,.16);
    padding:0;
}
.history-v60-option{
    min-height:64px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:10px 14px;
    border-bottom:1px solid #eef1f5;
    background:#fff;
    text-decoration:none;
    color:#263247;
}
.history-v60-option:last-child{border-bottom:0}
.history-v60-option:hover{background:#f7faff}
.history-v60-option-main{
    min-width:0;
    display:block;
}
.history-v60-option-main strong{
    display:block;
    font-size:10px;
    font-weight:900;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.history-v60-option-main small{
    display:block;
    margin-top:4px;
    color:#7e8999;
    font-size:8px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.history-v60-option-info{
    flex:none;
    display:flex;
    align-items:center;
    gap:9px;
}
.history-v60-option-info em{
    display:inline-flex;
    align-items:center;
    min-height:24px;
    padding:0 8px;
    border-radius:999px;
    background:#eef3f9;
    color:#55708f;
    font-size:7px;
    font-style:normal;
    font-weight:900;
}
.history-v60-option-info em.equipment{background:#fff0f1;color:#b9414d}
.history-v60-option-info em.production{background:#edf5ff;color:#3268b9}
.history-v60-option-info em.lifecycle{background:#eef8f1;color:#28734a}
.history-v60-option-info em.master{background:#f4efff;color:#6d50ad}
.history-v60-option-info b{
    min-width:58px;
    text-align:right;
    font-size:8px;
    color:#445167;
}
.history-v60-no-result{
    padding:25px 14px;
    text-align:center;
    color:#929cab;
    font-size:9px;
}

/* V61 optional hierarchy filter + active filter chips */
.history-v61-active-filters{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    padding:8px 15px;
    border-bottom:1px solid #e8edf3;
    background:#f8faff;
}
.history-v61-active-filters>span{
    font-size:8px;
    color:#6f7c8e;
    font-weight:850;
}
.history-v61-active-filters>div{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}
.history-v61-active-filters>div span{
    display:inline-flex;
    align-items:center;
    gap:4px;
    padding:5px 8px;
    border-radius:999px;
    background:#fff;
    border:1px solid #cddaf2;
    color:#476796;
    font-size:8px;
}
.history-v61-active-filters>div b{
    font-size:7px;
    color:#7e8da2;
}
.history-v61-active-filters>button{
    margin-left:auto;
    border:0;
    background:transparent;
    color:#3970c8;
    font-size:8px;
    font-weight:850;
    cursor:pointer;
}

/* =========================================================
   V62 HOME INCIDENT TIME-STATUS COLORS
   Red    : no response for more than 60 minutes
   Yellow : repair duration over 60 minutes
   ========================================================= */
.compact-line-row.incident-wait-over-60{
    background:#fff1f2;
    border-color:#f4b8be;
    box-shadow:0 0 0 1px rgba(210,47,47,.06),0 5px 14px rgba(176,39,52,.07);
}
.compact-line-row.incident-wait-over-60::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius:inherit;
    pointer-events:none;
    box-shadow:inset 4px 0 0 #d92f3f;
}
.compact-line-row.incident-repair-over-60{
    background:#fff9e8;
    border-color:#efd38a;
    box-shadow:0 0 0 1px rgba(202,151,31,.05),0 5px 14px rgba(158,116,18,.06);
}
.compact-line-row.incident-repair-over-60::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius:inherit;
    pointer-events:none;
    box-shadow:inset 4px 0 0 #e1a52c;
}
.compact-line-row.incident-wait-over-60,
.compact-line-row.incident-repair-over-60{
    position:relative;
}
.incident-time-alert{
    display:inline-flex;
    align-items:center;
    min-height:22px;
    padding:0 7px;
    border-radius:999px;
    font-size:8px;
    font-weight:900;
    white-space:nowrap;
}
.incident-time-alert-red{
    color:#b42331;
    background:#ffe1e4;
    border:1px solid #f4b4ba;
}
.incident-time-alert-yellow{
    color:#936310;
    background:#fff0bd;
    border:1px solid #ebcf76;
}
.incident-time-color-legend{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
    padding:2px 1px 10px;
    font-size:8px;
    color:#778397;
}
.incident-time-color-legend span{
    display:inline-flex;
    align-items:center;
    gap:5px;
}
.incident-time-color-legend span::before{
    content:"";
    width:8px;
    height:8px;
    border-radius:3px;
}
.incident-time-color-legend .legend-red::before{background:#e34b59}
.incident-time-color-legend .legend-yellow::before{background:#e8b33e}
.incident-time-color-legend .legend-normal::before{background:#d7dde5}

/* V63 production -> lifecycle linkage note */
.lifecycle-production-link-note{
    grid-column:1/-1;
    padding:9px 11px;
    border:1px solid #cfe0f7;
    border-radius:9px;
    background:#f5f9ff;
    color:#4d6789;
    font-size:8px;
    line-height:1.6;
}

/* V65 explicit production action confirmation + history read-only detail */
.pb-action-confirm-dialog{border:0;background:transparent;padding:0;max-width:none}.pb-action-confirm-dialog::backdrop{background:rgba(20,29,43,.45)}
.pb-action-confirm-box{width:min(430px,calc(100vw - 34px));background:#fff;border-radius:16px;padding:22px;box-shadow:0 24px 70px rgba(18,30,50,.25);text-align:center}
.pb-action-confirm-icon{width:42px;height:42px;margin:0 auto 10px;border-radius:50%;display:grid;place-items:center;background:#fff1d6;color:#a96b00;font-size:20px;font-weight:950}
.pb-action-confirm-box h3{margin:0;font-size:17px}.pb-action-confirm-box p{margin:10px auto 18px;max-width:350px;font-size:10px;line-height:1.7;color:#687588}
.pb-action-confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.pb-action-confirm-actions button{min-height:38px}
.pb-history-detail-banner{display:flex;align-items:center;gap:10px;margin-bottom:10px;padding:10px 13px;border:1px solid #cfe0f7;border-radius:10px;background:#f5f9ff;color:#46658d}
.pb-history-detail-banner strong{font-size:10px}.pb-history-detail-banner span{font-size:8px}

/* V66: real production-history detail mode */
.pb-history-view-header{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;margin-bottom:10px;border:1px solid #cfe0f7;border-radius:12px;background:#f5f9ff}
.pb-history-view-header div{display:flex;flex-direction:column;gap:3px}.pb-history-view-header strong{font-size:13px}.pb-history-view-header span{font-size:8px;color:#6d7d92}
.pb-history-view-header a{padding:8px 12px;border-radius:8px;background:#172a45;color:#fff;text-decoration:none;font-size:9px;font-weight:800}
.pb-history-view-mode .pb-work-start,
.pb-history-view-mode #pbWorkStartButton,
.pb-history-view-mode #pbWorkCompleteButton,
.pb-history-view-mode #pbWorkCompleteForm{display:none!important}
.pb-history-view-mode input[type="number"],
.pb-history-view-mode textarea{pointer-events:none}

/* =========================================================
   V67 INTERNAL MESSAGE
   ========================================================= */
.future-nav-item{position:relative}.future-nav-unread{margin-left:auto;min-width:18px;height:18px;padding:0 5px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:#f12d4c;color:#fff;font-size:8px;font-weight:900}.future-nav-unread[hidden]{display:none!important}
.message-v67-page{padding-bottom:22px}.message-v67-shell{padding:0;display:grid;grid-template-columns:290px minmax(460px,1fr) 250px;height:calc(100vh - 32px);min-height:650px;overflow:hidden}
.message-v67-left{border-right:1px solid #e7ebf1;display:flex;flex-direction:column;min-width:0}.message-v67-left-head{padding:16px 14px 10px}.message-v67-left-head small{font-size:7px;color:#8994a5;letter-spacing:.12em;font-weight:900}.message-v67-left-head h1{font-size:19px;margin:3px 0 12px}.message-v67-left-head button{width:100%;height:35px;border:0;border-radius:8px;background:linear-gradient(90deg,#2068f3,#7148ed);color:#fff;font-size:9px;font-weight:900}
.message-v67-tabs{display:flex;gap:3px;padding:0 14px 8px}.message-v67-tabs button{border:0;background:transparent;padding:6px 9px;font-size:8px;font-weight:850;color:#7a8698}.message-v67-tabs button.active{color:#2565d8;border-bottom:2px solid #3974e8}
.message-v67-search{margin:0 14px 10px;height:34px;border:1px solid #dfe5ed;border-radius:8px;display:flex;align-items:center;gap:6px;padding:0 8px}.message-v67-search span{color:#8b96a6}.message-v67-search input{border:0;outline:0;min-width:0;flex:1;font-size:8px}
.message-v67-thread-list{overflow:auto;flex:1}.message-v67-thread{position:relative;display:grid;grid-template-columns:36px minmax(0,1fr);gap:8px;padding:10px 12px;text-decoration:none;color:#283448;border-top:1px solid #eff2f5}.message-v67-thread:hover,.message-v67-thread.active{background:#f3f7ff}.message-v67-thread.active{box-shadow:inset 3px 0 #4777df}.message-v67-avatar,.message-v67-group-avatar,.message-v67-info-icon{border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#7a48ed,#a545dc);color:#fff;font-weight:900}.message-v67-avatar{width:36px;height:36px;font-size:12px}.message-v67-thread-main>div{display:flex;justify-content:space-between;gap:8px}.message-v67-thread-main strong{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.message-v67-thread-main time{font-size:7px;color:#8792a2}.message-v67-thread-main p{margin:4px 0 0;font-size:8px;color:#748094;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.message-v67-unread{position:absolute;right:10px;bottom:7px;min-width:17px;height:17px;border-radius:999px;background:#f22e50;color:#fff;display:grid;place-items:center;font-size:7px}
.message-v67-chat{display:flex;flex-direction:column;min-width:0;background:#fbfcfe}.message-v67-chat-head{height:72px;padding:0 16px;border-bottom:1px solid #e7ebf1;background:#fff;display:flex;align-items:center;justify-content:space-between}.message-v67-chat-head>div{display:flex;align-items:center;gap:10px}.message-v67-group-avatar{width:39px;height:39px;font-size:8px}.message-v67-chat-head h2{margin:0;font-size:13px}.message-v67-chat-head p{margin:3px 0 0;font-size:7px;color:#7e8999}.message-v67-chat-head>span{font-size:8px;color:#738096}
.message-v67-message-list{flex:1;overflow:auto;padding:20px 18px}.message-v67-bubble-row{display:flex;gap:7px;margin-bottom:13px}.message-v67-bubble-row.mine{justify-content:flex-end}.message-v67-mini-avatar{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#e8edf4;font-size:8px;font-weight:900}.message-v67-bubble-wrap{max-width:67%}.message-v67-bubble-wrap>small{display:block;font-size:7px;color:#7d899a;margin:0 0 3px}.message-v67-bubble{padding:9px 11px;border-radius:10px;background:#fff;border:1px solid #e5e9ef;font-size:9px;line-height:1.6;white-space:pre-wrap}.message-v67-bubble-row.mine .message-v67-bubble{background:#dbeaff;border-color:#c4dbfb}.message-v67-bubble-meta{display:flex;justify-content:flex-end;gap:7px;margin-top:3px;font-size:7px;color:#8a95a4}
.message-v67-compose{display:flex;gap:8px;padding:10px 12px;background:#fff;border-top:1px solid #e7ebf1}.message-v67-compose textarea{flex:1;min-height:38px;max-height:90px;resize:none;border:1px solid #dde4ed;border-radius:9px;padding:10px;font-size:9px;outline:0}.message-v67-compose button{width:70px;border:0;border-radius:8px;background:#2b6df1;color:#fff;font-size:9px;font-weight:900}
.message-v67-info{border-left:1px solid #e7ebf1;background:#fff;padding:18px 14px;overflow:auto}.message-v67-info-icon{width:54px;height:54px;margin:12px auto}.message-v67-info h3{text-align:center;font-size:11px}.message-v67-info>strong{display:block;text-align:center;font-size:9px;color:#778397}.message-v67-members{margin-top:18px;border-top:1px solid #edf0f4}.message-v67-members>div{display:flex;gap:8px;align-items:center;padding:9px 2px;border-bottom:1px solid #f0f2f5}.message-v67-members>div>span{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#eef2f7;font-size:8px;font-weight:900}.message-v67-members p{margin:0}.message-v67-members p strong,.message-v67-members p small{display:block}.message-v67-members p strong{font-size:8px}.message-v67-members p small{font-size:7px;color:#8490a2;margin-top:2px}.message-v67-no-chat{margin:auto;text-align:center;color:#8792a2}.message-v67-no-chat>div{font-size:32px}.message-v67-no-chat strong,.message-v67-no-chat span{display:block}.message-v67-no-chat strong{font-size:13px;margin:8px 0}.message-v67-no-chat span{font-size:8px}.message-v67-info-empty,.message-v67-empty{padding:25px 12px;text-align:center;color:#919baa;font-size:8px}
.message-v67-dialog{border:0;border-radius:15px;padding:0;width:min(640px,calc(100vw - 34px));max-height:82vh;background:#fff;box-shadow:0 24px 70px rgba(25,37,56,.24)}.message-v67-dialog::backdrop{background:rgba(19,29,44,.42)}.message-v67-dialog form{padding:16px}.message-v67-dialog-head{display:flex;justify-content:space-between;align-items:start}.message-v67-dialog-head small{font-size:7px;color:#8994a5;letter-spacing:.12em;font-weight:900}.message-v67-dialog-head h2{font-size:16px;margin:3px 0}.message-v67-dialog-head>button{border:0;background:transparent;font-size:20px;color:#758196}.message-v67-recipient-mode{display:flex;gap:6px;margin:12px 0}.message-v67-recipient-mode button{border:1px solid #dfe5ed;border-radius:8px;background:#fff;padding:8px 12px;font-size:8px;font-weight:850}.message-v67-recipient-mode button.active{background:#263950;color:#fff;border-color:#263950}.message-v67-person-search input,.message-v67-department-select select{width:100%;height:36px;border:1px solid #dfe5ed;border-radius:8px;padding:0 9px;font-size:9px}.message-v67-department-select{display:grid;grid-template-columns:1fr auto;gap:7px}.message-v67-department-select button{border:1px solid #dfe5ed;border-radius:8px;background:#f7f9fc;padding:0 10px;font-size:8px}.message-v67-user-list{max-height:290px;overflow:auto;margin:9px 0;border:1px solid #e6eaf0;border-radius:9px}.message-v67-user-list label{display:grid;grid-template-columns:20px 32px 1fr;align-items:center;gap:7px;padding:8px 10px;border-bottom:1px solid #eef1f5;cursor:pointer}.message-v67-user-list label:hover{background:#f7faff}.message-v67-user-avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#edf1f6;font-size:8px;font-weight:900}.message-v67-user-list label>span:last-child strong,.message-v67-user-list label>span:last-child small{display:block}.message-v67-user-list label>span:last-child strong{font-size:9px}.message-v67-user-list label>span:last-child small{font-size:7px;color:#8490a2}.message-v67-selected{display:flex;justify-content:space-between;align-items:center;padding:8px 0;font-size:8px;color:#7d899a}.message-v67-selected strong{font-size:10px;color:#3769c1}.message-v67-dialog textarea{width:100%;box-sizing:border-box;border:1px solid #dfe5ed;border-radius:9px;padding:10px;font-size:9px;resize:vertical}.message-v67-dialog-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:10px}.message-v67-dialog-actions button{border:0;border-radius:8px;min-height:35px;padding:0 15px;font-size:8px;font-weight:850}.message-v67-dialog-actions button:first-child{background:#eef1f5;color:#596577}.message-v67-dialog-actions button:last-child{background:#286bf2;color:#fff}
@media(max-width:1100px){.message-v67-shell{grid-template-columns:260px 1fr}.message-v67-info{display:none}}@media(max-width:760px){.message-v67-shell{grid-template-columns:1fr;height:auto;min-height:calc(100vh - 20px)}.message-v67-left{max-height:300px}.message-v67-chat{min-height:500px}}

/* V68 message attachments / voice notes */
.message-v67-compose{align-items:flex-end}.message-v68-compose-tools{display:flex;gap:5px;padding-bottom:2px}.message-v68-tool{width:34px;height:34px;border:1px solid #dce3ec!important;border-radius:9px!important;background:#fff!important;color:#506176!important;display:grid!important;place-items:center!important;font-size:13px!important;cursor:pointer;font-weight:900}.message-v68-tool.recording{background:#fff0f1!important;color:#d1283d!important;border-color:#f1b5bc!important;animation:v68pulse 1s infinite}.message-v68-compose-main{flex:1;min-width:0}.message-v68-compose-main textarea{width:100%;box-sizing:border-box}.message-v68-compose-preview{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:5px}.message-v68-compose-preview span{max-width:170px;padding:4px 7px;border-radius:7px;background:#eef3f9;font-size:7px;color:#536276;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.message-v68-compose-preview small{color:#8995a5}.message-v68-send{width:70px!important;height:38px}
.message-v68-attachments{display:flex;flex-direction:column;gap:6px;margin-top:5px}.message-v68-image{display:block;max-width:300px;border-radius:9px;overflow:hidden;border:1px solid #e1e6ec;background:#fff}.message-v68-image img{display:block;max-width:100%;max-height:260px;object-fit:contain}.message-v68-audio,.message-v68-video{max-width:320px;padding:7px;border:1px solid #e3e8ee;border-radius:9px;background:#fff}.message-v68-audio audio{width:290px;max-width:100%;height:34px}.message-v68-video video{width:300px;max-width:100%;max-height:260px}.message-v68-audio small,.message-v68-video small{display:block;margin-top:4px;font-size:7px;color:#7d899a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-v68-file{display:flex;align-items:center;gap:8px;max-width:300px;padding:8px 9px;border:1px solid #dfe5ed;border-radius:9px;background:#fff;text-decoration:none;color:#344157}.message-v68-file>span{width:30px;height:30px;border-radius:7px;display:grid;place-items:center;background:#eef3fb;color:#4770b7}.message-v68-file strong,.message-v68-file small{display:block}.message-v68-file strong{max-width:215px;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.message-v68-file small{margin-top:2px;font-size:7px;color:#8994a4}.message-v68-new-attach{display:inline-flex;align-items:center;margin-top:8px;padding:7px 9px;border:1px solid #dfe5ed;border-radius:8px;background:#f8fafc;color:#58708d;font-size:8px;font-weight:800;cursor:pointer}
@keyframes v68pulse{50%{opacity:.55}}

/* V69 4M CHANGE POINT MANAGEMENT */
.fourm-v69-page,.fourm-v69-form-page{padding-bottom:28px}.fourm-v69-hero,.fourm-v69-form-hero{display:flex;align-items:center;justify-content:space-between}.fourm-v69-hero-title{display:flex;align-items:center;gap:13px}.fourm-v69-wheel{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#6754e8 0 25%,#2388e6 25% 50%,#18b980 50% 75%,#ed9423 75%);color:#fff;font-size:11px;font-weight:950;border:7px solid #eef3fb}.fourm-v69-hero h1,.fourm-v69-form-hero h1{margin:0;font-size:23px}.fourm-v69-hero p,.fourm-v69-form-hero p{margin:5px 0 0;color:#748195;font-size:9px}.fourm-v69-new,.fourm-v69-form-hero button{background:#286bf3;color:#fff;border:0;border-radius:9px;padding:11px 16px;text-decoration:none;font-size:9px;font-weight:900}
.fourm-v69-filter{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.fourm-v69-status-tabs{display:flex;gap:3px}.fourm-v69-status-tabs button{height:32px;border:0;border-radius:8px;background:#fff;padding:0 12px;font-size:8px;font-weight:850;color:#647185}.fourm-v69-status-tabs button.active{background:#eaf2ff;color:#2367dc}.fourm-v69-filter input,.fourm-v69-filter select{height:34px;border:1px solid #dce3ec;border-radius:8px;padding:0 9px;background:#fff;font-size:8px}.fourm-v69-filter input[type=search]{min-width:250px;flex:1}.fourm-v69-search{height:34px;border:0;border-radius:8px;background:#172b47;color:#fff;padding:0 15px;font-size:8px;font-weight:900}
.fourm-v69-kpis{display:grid;grid-template-columns:repeat(4,1fr) 1.45fr;gap:9px}.fourm-v69-kpis>div{background:#fff;border:1px solid #e4e9f0;border-radius:13px;padding:13px 15px}.fourm-v69-kpis>div>span{font-size:8px;color:#6f7c8e}.fourm-v69-kpis>div>strong{display:block;font-size:22px;margin-top:7px}.fourm-v69-kpis>div>small{font-size:7px;color:#919baa}.fourm-v69-kpis .blue{background:#f5f9ff}.fourm-v69-kpis .red{background:#fff7f8}.fourm-v69-kpis .orange{background:#fffaf2}.fourm-v69-kpis .green{background:#f5fbf8}.fourm-v69-donut-card{display:flex;align-items:center;justify-content:center;gap:16px}.fourm-v69-donut{width:78px;height:78px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#6754e8 0 25%,#2388e6 25% 50%,#18b980 50% 75%,#ed9423 75%);position:relative}.fourm-v69-donut::after{content:"";position:absolute;width:48px;height:48px;background:#fff;border-radius:50%}.fourm-v69-donut strong,.fourm-v69-donut span{position:absolute;z-index:1}.fourm-v69-donut strong{font-size:16px}.fourm-v69-donut span{font-size:7px;margin-top:22px}.fourm-v69-legend{display:grid;gap:6px;font-size:8px}.fourm-v69-legend span::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px}.fourm-v69-legend .man::before{background:#6754e8}.fourm-v69-legend .machine::before{background:#2388e6}.fourm-v69-legend .material::before{background:#18b980}.fourm-v69-legend .method::before{background:#ed9423}
.fourm-v69-main-grid{display:grid;grid-template-columns:minmax(0,1.9fr) 330px;gap:10px}.fourm-v69-list-card,.fourm-v69-detail{padding:0;overflow:hidden}.fourm-v69-section-head,.fourm-v69-detail-head{display:flex;align-items:end;justify-content:space-between;padding:13px 14px;border-bottom:1px solid #e8edf3}.fourm-v69-section-head small,.fourm-v69-detail-head small{font-size:7px;color:#8b96a6;letter-spacing:.12em;font-weight:900}.fourm-v69-section-head h2,.fourm-v69-detail-head h2{font-size:14px;margin:2px 0 0}.fourm-v69-section-head>span{font-size:8px;color:#7d899a}.fourm-v69-table{overflow:auto;max-height:520px}.fourm-v69-row{display:grid;grid-template-columns:90px 95px minmax(220px,1.6fr) 110px 100px 60px 85px 85px 45px;gap:7px;align-items:center;min-width:980px;padding:8px 10px;border-bottom:1px solid #edf1f5;text-decoration:none;color:#293448;font-size:8px}.fourm-v69-row.head{position:sticky;top:0;background:#f7f9fc;z-index:2;color:#788496;font-weight:850}.fourm-v69-row:not(.head):hover,.fourm-v69-row.active{background:#f4f8ff}.fourm-v69-row strong{font-size:8px}.fourm-v69-cat-stack{display:flex;gap:3px;flex-wrap:wrap}.fourm-v69-cat-stack .cat,.fourm-v69-detail-items section>b{display:inline-flex;padding:4px 6px;border-radius:999px;font-size:7px}.cat.man,.fourm-v69-detail-items .man>b{background:#f1edff;color:#6b49c9}.cat.machine,.fourm-v69-detail-items .machine>b{background:#eaf4ff;color:#2871c4}.cat.material,.fourm-v69-detail-items .material>b{background:#eaf9f2;color:#218b60}.cat.method,.fourm-v69-detail-items .method>b{background:#fff4e7;color:#b56e16}.impact,.status{display:inline-flex;padding:4px 7px;border-radius:999px;font-size:7px}.impact.high,.status.unhandled{background:#ffecef;color:#c73a4a}.impact.medium,.status.working{background:#fff3da;color:#a56a13}.impact.low,.status.completed{background:#eaf8f0;color:#278454}
.fourm-v69-detail dl{display:grid;grid-template-columns:70px 1fr;gap:7px;padding:12px 14px;margin:0;font-size:8px}.fourm-v69-detail dt{color:#7f8a9a}.fourm-v69-detail dd{margin:0;font-weight:700}.fourm-v69-detail>h3{font-size:12px;margin:0 14px 10px}.fourm-v69-detail>h4{font-size:9px;margin:14px 14px 6px}.fourm-v69-detail-items{display:grid;gap:6px;padding:0 14px}.fourm-v69-detail-items section{border:1px solid #e5e9ef;border-radius:9px;padding:8px}.fourm-v69-detail-items p{display:grid;grid-template-columns:48px 1fr;gap:6px;margin:5px 0;font-size:8px}.fourm-v69-detail-items p span{color:#8792a2}.fourm-v69-detail-items small{font-size:7px;color:#6f7c8e}.fourm-v69-note{margin:0 14px;padding:8px;border:1px solid #e3e8ef;border-radius:8px;background:#fbfcfe;font-size:8px;line-height:1.6}.fourm-v69-files{display:grid;gap:5px;padding:0 14px}.fourm-v69-files a{padding:7px 8px;border:1px solid #e1e6ed;border-radius:8px;text-decoration:none;font-size:8px;color:#3d649f}.fourm-v69-actions{display:flex;gap:6px;padding:12px 14px}.fourm-v69-actions button{border:0;border-radius:8px;background:#286bf3;color:#fff;padding:8px 12px;font-size:8px;font-weight:850}.fourm-v69-actions button.complete{background:#26a76c}.fourm-v69-history{padding:0 14px;display:grid;gap:6px}.fourm-v69-history div{border-left:2px solid #d9e2ef;padding-left:8px}.fourm-v69-history time{font-size:7px;color:#8591a2}.fourm-v69-history strong{display:block;font-size:8px;margin:2px 0}.fourm-v69-history p{margin:0;font-size:7px;color:#758196}.fourm-v69-detail-empty,.fourm-v69-empty{padding:40px 16px;text-align:center;color:#8d97a6;font-size:8px}
.fourm-v69-bottom{display:grid;grid-template-columns:1.5fr 1fr .9fr;gap:10px}.fourm-v69-trend,.fourm-v69-completed,.fourm-v69-memo{padding:0}.fourm-v69-chart{padding:13px}.fourm-v69-chart-lines{display:grid;gap:7px}.fourm-v69-chart-row{display:grid;grid-template-columns:45px 1fr;align-items:end;gap:8px}.fourm-v69-chart-row>b{font-size:8px}.fourm-v69-chart-row>div{height:76px;display:grid;grid-template-columns:repeat(7,1fr);gap:4px;align-items:end;border-bottom:1px solid #dfe5ed}.fourm-v69-chart-row span{border-radius:3px 3px 0 0}.fourm-v69-chart-row.man span{background:#7353e8}.fourm-v69-chart-row.machine span{background:#2588e8}.fourm-v69-chart-row.material span{background:#1eb77e}.fourm-v69-chart-row.method span{background:#ea942a}.fourm-v69-chart-labels{display:grid;grid-template-columns:45px repeat(7,1fr);padding-top:5px;font-size:7px;color:#8792a2}.fourm-v69-chart-labels::before{content:""}.fourm-v69-completed>a{display:grid;grid-template-columns:14px 1fr auto;gap:6px;padding:8px 12px;border-bottom:1px solid #eef1f5;text-decoration:none;color:#2c394d;font-size:8px}.fourm-v69-completed span{color:#8591a2}.fourm-v69-memo{padding:13px;background:#fff9e9}.fourm-v69-memo h2{font-size:11px}.fourm-v69-memo p{font-size:8px;color:#6f6b58;line-height:1.5}
.fourm-v69-form{display:grid;gap:10px}.fourm-v69-form-hero>div:last-child{display:flex;gap:7px;align-items:center}.fourm-v69-form-hero a{padding:10px 14px;border:1px solid #dfe5ed;border-radius:8px;text-decoration:none;color:#4b596d;font-size:8px}.fourm-v69-form-grid{display:grid;grid-template-columns:minmax(0,1.7fr) 300px;gap:10px}.fourm-v69-form section h2,.fourm-v69-upload-card h2{font-size:13px;margin-top:0}.fourm-v69-basic-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.fourm-v69-basic-grid label,.fourm-v69-impact-grid>label{display:grid;gap:5px;font-size:8px;font-weight:800}.fourm-v69-basic-grid input,.fourm-v69-basic-grid select,.fourm-v69-detail-table input,.fourm-v69-detail-table select,.fourm-v69-detail-table textarea,.fourm-v69-impact-grid textarea{border:1px solid #dfe5ed;border-radius:8px;padding:8px;background:#fff;font-size:8px;box-sizing:border-box}.fourm-v69-basic-grid .wide{grid-column:span 2}.fourm-v69-basic-grid fieldset{border:1px solid #e3e8ef;border-radius:9px;padding:8px;display:flex;gap:9px;font-size:8px}.fourm-v69-basic-grid legend,.fourm-v69-impact-grid legend{font-size:8px;font-weight:850}.fourm-v69-drop{height:120px;border:1.5px dashed #cbd7e7;border-radius:10px;background:#f8fbff;display:grid;place-items:center;color:#3970c5;font-size:9px;font-weight:900;cursor:pointer}.fourm-v69-upload-card p{font-size:7px;color:#8994a4}.fourm-v69-detail-table .head,.fourm-v69-detail-table .row{display:grid;grid-template-columns:120px 1fr 1fr 1.5fr 160px;gap:7px;align-items:center}.fourm-v69-detail-table .head{padding:8px;background:#f7f9fc;font-size:8px;font-weight:850}.fourm-v69-detail-table .row{padding:8px;border-top:1px solid #edf1f5}.fourm-v69-detail-table .row>b{font-size:8px}.fourm-v69-impact-grid{display:grid;grid-template-columns:220px 1fr 1fr 1fr;gap:10px}.fourm-v69-impact-grid fieldset{border:1px solid #e3e8ef;border-radius:9px;padding:9px;display:grid;gap:6px;font-size:8px}.fourm-v69-form-actions{display:flex;justify-content:center;gap:8px}.fourm-v69-form-actions a,.fourm-v69-form-actions button{min-width:110px;padding:10px 15px;border-radius:8px;text-align:center;text-decoration:none;font-size:8px;font-weight:850}.fourm-v69-form-actions a{background:#eef1f5;color:#596577}.fourm-v69-form-actions button{border:0;background:#286bf3;color:#fff}
@media(max-width:1200px){.fourm-v69-main-grid{grid-template-columns:1fr}.fourm-v69-kpis{grid-template-columns:repeat(2,1fr)}.fourm-v69-donut-card{grid-column:span 2}.fourm-v69-bottom{grid-template-columns:1fr}.fourm-v69-form-grid{grid-template-columns:1fr}.fourm-v69-basic-grid{grid-template-columns:repeat(2,1fr)}.fourm-v69-impact-grid{grid-template-columns:1fr 1fr}.fourm-v69-detail-table{overflow:auto}.fourm-v69-detail-table .head,.fourm-v69-detail-table .row{min-width:900px}}

/* V70 4M day/month/range time filter */
.fourm-v70-time-filter{
    display:flex;
    align-items:center;
    gap:4px;
    flex-wrap:wrap;
    padding:3px;
    border:1px solid #e1e6ed;
    border-radius:9px;
    background:#f8fafc;
}
.fourm-v70-time-mode{
    height:29px;
    padding:0 10px;
    border:0;
    border-radius:7px;
    background:transparent;
    color:#69778b;
    font-size:8px;
    font-weight:850;
    cursor:pointer;
}
.fourm-v70-time-mode.active{
    background:#1d3049;
    color:#fff;
    box-shadow:0 2px 7px rgba(32,52,79,.12);
}
.fourm-v70-time-filter>input[type=date],
.fourm-v70-time-filter>input[type=month]{
    height:29px;
    min-width:130px;
}
.fourm-v70-range{
    display:flex;
    align-items:center;
    gap:4px;
}
.fourm-v70-range[hidden],
.fourm-v70-time-filter>[hidden]{
    display:none!important;
}

/* V71 4M 日・週・月・年 filter */
.fourm-v70-time-filter>input[type=week],
.fourm-v70-time-filter>select{
    height:29px;
    min-width:120px;
    border:1px solid #dce3ec;
    border-radius:7px;
    padding:0 8px;
    background:#fff;
    font-size:8px;
}

/* =========================================================
   RC1_TEST 2026-09-11 — Message phone conversation flow
   Phone behaves as two screens: thread index -> selected chat.
   Tablet/desktop three-column layout remains unchanged.
   ========================================================= */
.message-v67-mobile-back{display:none}
@media(max-width:700px){
  .message-v67-page{
    padding:0!important;
    min-height:0!important;
  }
  .message-v67-shell{
    display:block!important;
    width:100%!important;
    height:calc(100dvh - 164px)!important;
    min-height:520px!important;
    border-radius:16px!important;
    overflow:hidden!important;
    background:#fff!important;
  }

  /* List screen */
  .message-v67-shell.thread-index .message-v67-left{
    display:flex!important;
    height:100%!important;
    max-height:none!important;
    border-right:0!important;
  }
  .message-v67-shell.thread-index .message-v67-chat,
  .message-v67-shell.thread-index .message-v67-info{
    display:none!important;
  }
  .message-v67-left-head{padding:16px 14px 10px!important}
  .message-v67-left-head h1{font-size:21px!important;margin:4px 0 13px!important}
  .message-v67-left-head button{height:42px!important;font-size:12px!important;border-radius:10px!important}
  .message-v67-tabs{padding:0 14px 8px!important}
  .message-v67-tabs button{font-size:11px!important;padding:7px 10px!important}
  .message-v67-search{height:40px!important;margin:0 14px 9px!important}
  .message-v67-search input{font-size:12px!important}
  .message-v67-thread-list{min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important}
  .message-v67-thread{grid-template-columns:42px minmax(0,1fr)!important;gap:10px!important;padding:12px 14px!important;min-height:64px!important;box-sizing:border-box!important}
  .message-v67-avatar{width:42px!important;height:42px!important;font-size:14px!important}
  .message-v67-thread-main strong{font-size:12px!important}
  .message-v67-thread-main time{font-size:9px!important}
  .message-v67-thread-main p{font-size:10px!important;margin-top:5px!important}

  /* Chat screen */
  .message-v67-shell.has-thread .message-v67-left,
  .message-v67-shell.has-thread .message-v67-info{
    display:none!important;
  }
  .message-v67-shell.has-thread .message-v67-chat{
    display:flex!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    background:#fbfcfe!important;
  }
  .message-v67-chat-head{
    position:relative!important;
    flex:0 0 64px!important;
    height:64px!important;
    min-height:64px!important;
    padding:0 12px 0 52px!important;
    box-sizing:border-box!important;
  }
  .message-v67-mobile-back{
    position:absolute!important;
    left:10px!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    display:grid!important;
    place-items:center!important;
    width:34px!important;
    height:34px!important;
    border:1px solid #e1e7ef!important;
    border-radius:50%!important;
    background:#fff!important;
    color:#26354a!important;
    text-decoration:none!important;
    font-size:28px!important;
    line-height:1!important;
    box-shadow:0 3px 10px rgba(15,23,42,.06)!important;
  }
  .message-v67-chat-head>div{min-width:0!important;gap:8px!important}
  .message-v67-group-avatar{width:36px!important;height:36px!important;flex:0 0 36px!important}
  .message-v67-chat-head h2{font-size:14px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:210px!important}
  .message-v67-chat-head p{font-size:9px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:210px!important}
  .message-v67-chat-head>span{font-size:10px!important;white-space:nowrap!important}

  .message-v67-message-list{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    padding:14px 12px 12px!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;
  }
  .message-v67-bubble-row{margin-bottom:12px!important;gap:7px!important}
  .message-v67-bubble-wrap{max-width:82%!important}
  .message-v67-bubble-wrap>small{font-size:9px!important}
  .message-v67-bubble{font-size:13px!important;line-height:1.45!important;padding:9px 11px!important;border-radius:13px!important}
  .message-v67-bubble-meta{font-size:8px!important;margin-top:4px!important}

  .message-v67-compose{
    position:relative!important;
    flex:0 0 auto!important;
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    align-items:end!important;
    gap:6px!important;
    padding:8px 9px calc(8px + env(safe-area-inset-bottom,0px))!important;
    background:rgba(255,255,255,.98)!important;
    border-top:1px solid #e4e9f0!important;
    box-shadow:0 -6px 18px rgba(15,23,42,.04)!important;
    z-index:2!important;
  }
  .message-v68-compose-tools{gap:4px!important}
  .message-v68-tool{width:36px!important;height:36px!important;min-width:36px!important}
  .message-v68-compose-main textarea{
    min-height:38px!important;
    max-height:88px!important;
    padding:9px 10px!important;
    font-size:13px!important;
    border-radius:11px!important;
  }
  .message-v68-send{
    width:auto!important;
    min-width:52px!important;
    height:38px!important;
    padding:0 12px!important;
    font-size:11px!important;
    border-radius:10px!important;
  }
  .message-v68-compose-preview{max-height:54px!important;overflow-y:auto!important}

  /* New-message dialog fits phone viewport cleanly. */
  .message-v67-dialog{
    width:calc(100vw - 20px)!important;
    max-height:calc(100dvh - 32px)!important;
    border-radius:16px!important;
  }
  .message-v67-dialog form{padding:14px!important}
  .message-v67-user-list{max-height:36dvh!important}
}

@media(max-width:390px){
  .message-v67-shell{height:calc(100dvh - 160px)!important;min-height:480px!important}
  .message-v67-chat-head h2,.message-v67-chat-head p{max-width:175px!important}
  .message-v68-tool{width:34px!important;height:34px!important;min-width:34px!important}
  .message-v68-send{min-width:48px!important;padding:0 9px!important}
}

/* ==========================================================
   V1 R4 usability hardening: compact long lists + 班→ライン
   ========================================================== */
.mfx-five-row-scroll{
  max-height:var(--mfx-five-row-height)!important;
  overflow-y:auto!important;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  border-radius:inherit;
}
.mfx-five-row-scroll::-webkit-scrollbar{width:9px}
.mfx-five-row-scroll::-webkit-scrollbar-thumb{background:#cbd4e1;border-radius:999px;border:2px solid transparent;background-clip:padding-box}
.mfx-five-row-scroll::-webkit-scrollbar-track{background:transparent}
.history-v57-results.mfx-five-row-scroll,.pb-history-list.mfx-five-row-scroll,.fourm-v69-table.mfx-five-row-scroll{overflow-x:auto!important}
.pb-history-head,.fourm-v69-row.head{position:sticky;top:0;z-index:3;background:#f7f9fc}
.mfx-master-scope-filter{display:grid;grid-template-columns:minmax(150px,220px) minmax(180px,280px) minmax(220px,1fr) auto;gap:10px;align-items:end;margin:12px 0;padding:12px;border:1px solid #e1e7ef;border-radius:12px;background:#f8fafc}
.mfx-master-scope-filter label{display:grid;gap:5px;font-size:8px;font-weight:850;color:#657187}
.mfx-master-scope-filter select,.mfx-master-scope-filter input{height:38px;min-width:0;border:1px solid #d8e0ea;border-radius:9px;background:#fff;padding:0 10px;font-size:9px;color:#263247}
.mfx-master-scope-count{align-self:center;justify-self:end;display:inline-flex;align-items:center;justify-content:center;min-width:58px;height:32px;padding:0 10px;border-radius:999px;background:#eaf1ff;color:#315fba;font-size:8px;font-weight:900}
.mfx-cascade-team-line{display:grid;grid-template-columns:minmax(120px,1fr) minmax(160px,1.4fr);gap:8px;margin-bottom:8px}
.mfx-machine-filter{display:grid;grid-template-columns:minmax(120px,1fr) minmax(150px,1.3fr);gap:8px;margin:8px 0}
.mfx-machine-filter select{width:100%;height:36px;border:1px solid #dce3ec;border-radius:8px;background:#fff;padding:0 8px}
[hidden]{display:none!important}
@media(max-width:800px){
  .mfx-master-scope-filter{grid-template-columns:1fr 1fr}.mfx-master-scope-filter label:nth-child(3){grid-column:1/-1}.mfx-master-scope-count{justify-self:start}
}
@media(max-width:520px){.mfx-master-scope-filter,.mfx-cascade-team-line,.mfx-machine-filter{grid-template-columns:1fr}}
.permission-matrix-wrap.mfx-five-row-scroll,.responsive-table.mfx-five-row-scroll{overflow:auto!important}
.permission-matrix-wrap.mfx-five-row-scroll thead th,.responsive-table.mfx-five-row-scroll thead th{position:sticky;top:0;z-index:4;background:#f7f9fc}

/* V1 R5.1: permission matrices must never collapse after internal scrolling.
   Lock the viewport to the calculated header + 5 real permission rows. */
.permission-master-page .permission-matrix-wrap.mfx-five-row-scroll{
  height:var(--mfx-five-row-height)!important;
  min-height:var(--mfx-five-row-height)!important;
  max-height:var(--mfx-five-row-height)!important;
  overflow:auto!important;
}
.permission-master-page .permission-category-row td{
  padding-top:6px!important;
  padding-bottom:6px!important;
}


/* V1 R5 analytics graph drilldown */
.analytics-drill-link,
.analytics-drill-legend{color:inherit;text-decoration:none;cursor:pointer;}
.analytics-drill-link{transition:transform .12s ease,box-shadow .12s ease,background .12s ease;}
.analytics-drill-link:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(31,65,115,.10);background:rgba(49,107,217,.035);}
.analytics-drill-link:focus-visible,
.analytics-drill-legend:focus-visible{outline:2px solid #316bd9;outline-offset:2px;}
.analytics-v28-team-legend .analytics-drill-legend,
.analytics-v42-legend .analytics-drill-legend{display:flex;align-items:center;gap:8px;border-radius:7px;padding:3px 5px;}
.analytics-v28-team-legend .analytics-drill-legend:hover,
.analytics-v42-legend .analytics-drill-legend:hover{background:#f2f6ff;}
.analytics-v63-open-list{display:inline-flex;margin-top:12px;padding:9px 14px;border-radius:9px;background:#eef4ff;color:#235bb4;font-weight:700;text-decoration:none;}
.analytics-v63-open-list:hover{background:#dfeaff;}
.analytics-v63-open-list[hidden]{display:none!important;}


/* V1 R5.3.10 strict-CSP feedback status */
.mfx-inline-save-status{position:fixed;right:22px;bottom:22px;z-index:9999;padding:10px 14px;border-radius:10px;font-weight:800;font-size:12px;box-shadow:0 8px 24px rgba(0,0,0,.15);transition:opacity .2s;background:#18243a;color:#fff;opacity:0;pointer-events:none}
.mfx-inline-save-status.is-visible{opacity:1}
.mfx-inline-save-status.is-error{background:#a83242}

/* R5.3.15: 4M equipment/parts/cost integration */
.fourm-v315-source{display:inline-flex;align-items:center;gap:4px;margin-top:4px;padding:2px 7px;border-radius:999px;font-size:11px;font-weight:700;line-height:1.4;white-space:nowrap}
.fourm-v315-source.incident{background:#eaf2ff;color:#245cab;border:1px solid #bdd3f7}
.fourm-v315-source.direct{background:#eaf8ef;color:#217a45;border:1px solid #b9e4c9}
.fourm-v315-parts{margin-top:18px;padding-top:14px;border-top:1px solid #e2e8f0}
.fourm-v315-parts h4{margin:0 0 10px}
.fourm-v315-part-list{display:grid;gap:7px;margin-bottom:10px}
.fourm-v315-part-row{display:grid;grid-template-columns:minmax(120px,1.5fr) 48px 90px minmax(120px,1fr) auto;align-items:center;gap:8px;padding:8px 10px;background:#f8fafc;border:1px solid #e1e7ef;border-radius:8px}
.fourm-v315-part-row div{display:flex;flex-direction:column;min-width:0}.fourm-v315-part-row div span{font-size:11px;color:#667085;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fourm-v315-part-row small{color:#667085}.fourm-v315-part-row form{margin:0}.fourm-v315-part-row button{border:1px solid #f0b6b6;background:#fff;color:#a33;padding:5px 8px;border-radius:6px}
.fourm-v315-part-form{display:grid;grid-template-columns:minmax(180px,2fr) 72px minmax(150px,1.5fr) auto;gap:8px;align-items:center;margin-top:10px}
.fourm-v315-part-form select,.fourm-v315-part-form input{min-width:0}
.fourm-v315-part-form button{white-space:nowrap;background:#1769d2;color:#fff;border:0;border-radius:7px;padding:9px 12px;font-weight:700}
.fourm-v315-linked-note{padding:9px 11px;background:#eef5ff;border-left:3px solid #3d78c8;color:#365777;font-size:12px;line-height:1.55}
.fourm-v315-part-warning{color:#9b5d00;font-size:12px}.fourm-v315-part-empty{color:#7b8794;font-size:12px}
.fourm-v315-part-note p{margin:4px 0 0;color:#5f6b78;line-height:1.6}
.analytics-v315-cost-split{display:block;margin-top:4px;font-size:10px;color:#667085;font-weight:600}
.analytics-v28-panel-head small{color:#667085;font-size:11px}
@media (max-width:900px){.fourm-v315-part-row{grid-template-columns:1fr 45px 80px}.fourm-v315-part-row small{grid-column:1/3}.fourm-v315-part-row form{grid-column:3}.fourm-v315-part-form{grid-template-columns:1fr 70px}.fourm-v315-part-form input[name="note"]{grid-column:1/3}.fourm-v315-part-form button{grid-column:1/3}}


/* =========================================================
   V1.1 HOME PRODUCTION LIST
   Desktop: 10 rows visible, then internal scroll.
   Mobile keeps the existing compact 5-row scroll window.
   ========================================================= */
.status-noplan .home-line-state{background:#f2f4f7;color:#667085}
.status-noplan .state-dot{background:#98a2b3}

@media (min-width:900px){
    .home-v20-layout{
        height:auto !important;
        min-height:calc(100vh - 24px) !important;
        overflow:visible !important;
    }
    .home-production-layout{
        height:auto !important;
        min-height:0 !important;
    }
    .home-line-status-card{
        height:auto !important;
        min-height:0 !important;
    }
    .home-line-status-list{
        flex:none !important;
        display:flex !important;
        flex-direction:column !important;
        justify-content:flex-start !important;
        gap:8px !important;
        max-height:552px !important;
        overflow-y:auto !important;
        overscroll-behavior:contain;
        scrollbar-gutter:stable;
    }
    .home-line-status-row{
        flex:0 0 48px !important;
        min-height:48px !important;
        height:48px !important;
        padding:7px 10px !important;
    }
}

@media (max-width:899px){
    .home-line-status-list{
        max-height:354px !important;
        overflow-y:auto !important;
    }
}


/* =========================================================
   V1.1 PRODUCTION BOARD: single-column hourly table + stop history
   ========================================================= */
.pb-hourly .pb-slot-columns{
    display:block !important;
}
.pb-hourly .pb-slot-columns > table{
    width:100% !important;
}
.pb-stop-history{
    margin-top:12px;
    border-top:1px solid #e5eaf1;
    padding-top:12px;
}
.pb-stop-history-table{
    display:flex;
    flex-direction:column;
    gap:5px;
    max-height:240px;
    overflow-y:auto;
}
.pb-stop-history-row{
    display:grid;
    grid-template-columns:minmax(110px,1fr) minmax(150px,1.4fr) 90px 72px;
    gap:8px;
    align-items:center;
    padding:7px 9px;
    border:1px solid #e8edf4;
    border-radius:8px;
    font-size:11px;
}
.pb-stop-history-head{
    position:sticky;
    top:0;
    z-index:1;
    background:#f6f8fb;
    font-weight:800;
}
.pb-stop-history-empty{
    padding:12px;
    text-align:center;
    color:#8a95a6;
}
@media(max-width:760px){
    .pb-stop-history-row{
        grid-template-columns:1fr 1fr;
    }
}


/* =========================================================
   V1.1 INCIDENT TEMPORARY RESUME / LATE REPAIR DETAILS
   ========================================================= */
.incident-production-resumed-badge{
    margin-top:10px;padding:9px 12px;border-radius:9px;
    background:#eaf7ef;color:#16764c;font-weight:800;font-size:12px;
}
.incident-production-control{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.incident-production-control form,.home-resume-production-form{margin:0}
.incident-resume-production-button,.home-resume-production-button{
    border:0;border-radius:8px;padding:8px 12px;font-weight:850;cursor:pointer;
    background:#eaf7ef;color:#16764c;
}
.incident-restart-stop-button,.home-restart-stop-button{
    border:0;border-radius:8px;padding:8px 12px;font-weight:850;cursor:pointer;
    background:#fff0f0;color:#b63843;
}
.repair-detail-later-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.repair-detail-later-form label{display:flex;flex-direction:column;gap:5px;font-weight:800}
.repair-detail-later-form textarea{width:100%;box-sizing:border-box;resize:vertical}
.repair-detail-later-form button{grid-column:1/-1;justify-self:start}
@media(max-width:760px){.repair-detail-later-form{grid-template-columns:1fr}}

/* V1.1: inventory master lists must stay bounded even if JS has not initialized
   or the page was swapped by AJAX. JS computes the exact height of five rows;
   this fixed fallback prevents a long list pushing 部品マスタ off-screen. */
.inventory-master-list{
  max-height:330px !important;
  overflow-y:auto !important;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.inventory-master-list.mfx-five-row-scroll{
  max-height:var(--mfx-five-row-height,330px) !important;
}

/* V1.1 searchable lifecycle registration Zaiko selector. */
[data-mfx-lifecycle-inventory-picker] > input[type="search"]{
  display:block;width:100%;box-sizing:border-box;min-height:42px;
  border:1px solid #d1d9e4;border-radius:9px;padding:9px 12px;
  background:#fff;color:#263247;
}
[data-mfx-lifecycle-inventory-picker] > [data-mfx-inventory-result-count]{
  display:block;margin:4px 0 6px;font-size:12px;font-weight:700;color:#526479;
}

/* R5.3.32: one quick-receive form per inventory card, 3 equal buttons. */
.inventory-quick-receive > form {display:flex; gap:8px; min-width:0; width:100%;}
.inventory-quick-receive > form > button {flex:1 1 0; min-width:0;}
@media(max-width:760px) {
  .inventory-quick-receive > form {gap:5px;}
}
