﻿/*KPI Key performance Indicator*/
@import url('dashboard.css');

.dashboard-sub-title {
    margin: 15px 0px 15px 15px;
    color: #01558A;
}

.highcharts-root {
    font-family: 'Helvetica Neue', sans-serif !important;
    font-weight: normal;
}

.highcharts-label text {
    font-family: 'Helvetica Neue', sans-serif !important;
    font-weight: normal !important;
}

.kpi-card {
    position: relative;
    height: 160px;
    width: auto;
    margin: auto;
    border-radius: .1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
    transition: 0.5s;
    padding: .5rem;
    background: rgba(247, 247, 247, 1);
}

.kip-card-title {
    font-size: clamp(0.65rem, 1vw, 1rem);
    /*margin: 10px 20px;*/
    color: #667085;
}

.kpi-card-value {
    font-size: clamp(25px, 2vw, 32px);
    text-align: center;
    display: flex;
    color: #05507D;
    height: 30px;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.kpi-card-label {
    font-size: 12px;
    text-align: center;
    color: #667085;
}

.kpi-card-icon {
    /*margin: 0px 15px 10px auto;*/
    display: flex;
    height: 57px;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.kpi-card.incident {
    background: linear-gradient(135deg, #00c9ff, #92fe9d);
}

.kpi-card.man-hour {
    background: linear-gradient(135deg, #2193b0, #6dd5ed);
}

.kpi-spectrometer {
    border-color: #2193b0;
    border-width: 1px;
    border-radius: .5rem;
    color: #01558A;
    position: relative;
    height: auto;
    width: auto;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
    transition: 0.5s;
    padding: .5rem;
    margin: 0 2rem;
}

.kpi-spectrometer .spectrometer div {
    width: 100% !important;
    height: 120px !important;
}

/* High Charts*/
.highcharts-figure,
.highcharts-data-table table {
    min-width: 310px;
    max-width: 500px;
    margin: 1em auto;
}

.highcharts-data-table table {
    font-family: 'Helvetica Neue', sans-serif;
    border-collapse: collapse;
    border: 1px solid #ebebeb;
    margin: 10px auto;
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.highcharts-data-table caption {
    padding: 1em 0;
    font-size: 1.2em;
    color: #555;
}

.highcharts-data-table th {
    font-weight: normal;
    padding: 0.5em;
}

.highcharts-data-table td,
.highcharts-data-table th,
.highcharts-data-table caption {
    padding: 0.5em;
}

.highcharts-data-table thead tr,
.highcharts-data-table tbody tr:nth-child(even) {
    background: #f8f8f8;
}

.highcharts-data-table tr:hover {
    background: #f1f7ff;
}

.highcharts-description {
    margin: 0.3rem 10px;
}

.highcharts-tooltip span {
    height: auto;
    width: 160px;
    padding: 2px;
    overflow: auto;
    white-space: normal !important;
}

.highcharts-credits {
    display: none !important;
}

.speedometerLTIRate-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.speedometerTRIFRate-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.card {
    width: 100%;
    /*max-width: 250px;*/
    height: auto;
    background: #fff;
    /*border-radius: 30px;*/
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
    transition: 0.5s;
}

#map-container {
    height: 940px;
    min-width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-radius: .5rem !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    /*box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);*/

    .highcharts-button-symbol {
        stroke: rgba(5, 80, 125, 1);
    }
}

@media (max-width: 1270px) {
    #map-container {
        height: 590px;
    }
}

.map-container-version {
    height: 590px;
    min-width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-radius: .5rem !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    /*box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);*/

    .highcharts-button-symbol {
        stroke: rgba(5, 80, 125, 1);
    }
}

.formula-table{
    background: rgba(42, 191, 191, 0.1);
    padding: 0px 5px 8px 5px;
    left:0;
    right:0;bottom:0;
    display:flex;
    flex-direction:column;
    border-radius: 0 !important;
    border-bottom-left-radius: .5rem !important;
    border-bottom-right-radius: .5rem !important;
}

.formula-table-head th{
    border-radius: 0;
    font-weight: bold !important;
}

.dashboard-custom-box-shadow {
    box-shadow: 0 0 20px rgb(0 0 0 / 6%);
}

.dashboard-custom-table-header {
    background: linear-gradient(75deg, rgba(5, 80, 125, 1), rgba(20, 128, 158, 1), rgba(5, 80, 125, 1)) !important;
    color: #fff;
    width: 33%;
    font-size: clamp(0.5rem, 1vw, 0.7rem);
    padding: .5rem;
}

.custom-label {
    color: #01558A;
    font-size: 10px;
    text-align: center;
    width: 100px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 5px;
    padding: 4px;
    white-space: normal;
    pointer-events: none;
    user-select: none;
}

.styled-table {
    border-width: 1px;
}

.styled-table thead tr {
    background-color: #01558A;
    color: white;
    text-align: center;
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
}


.styled-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid #009879;
}

.styled-table tbody tr.active-row {
    color: #009879;
}

.gauge-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    margin-top: 4px;
}

.gauge-fill {
    height: 100%;
    background: #7cb5ec;
    border-radius: 3px;
}

.mud-dialog.full-dialog {
    position: fixed !important;
    top: 10%;
    left: 10%;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 80vw !important;
    max-height: 80vh !important;
    border-radius: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.full-dialog .mud-dialog-title{
    z-index: 9999;
    margin-bottom: 30px;
    background: white;
}

.text-nowrap {
    white-space: nowrap !important;
}

@media (max-width: 768px) {
    .card {
        max-width: 100%;
    }

    .card .imgBx {
        font-size: 24px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .card {
        max-width: 100%;
    }

    .card .imgBx {
        font-size: 20px;
        height: 100px;
    }

    .card .content {
        padding: 0 15px;
        top: -10px;
    }

    .chartCard {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 1rem;
    }

    .chartBox {
        width: 100%;
        max-width: 300px;
    }

}

@media (min-width: 960px) and (max-width: 1002px) {
    .duration-responsive {
        margin-left: 20px;
    }


}

@media (min-width: 1002px) and (max-width: 1226px) {
    .main-location {
        min-width: 100px;
    }

    .sub-location {
        min-width: 100px;
    }


}

/* Scale table */
.table-text {
    margin-bottom: 0px;
}

.table-text th, .table-text td {
    text-align: center;
    vertical-align: middle;
    font-size: clamp(.65rem, 2vw, 1.1rem);
}

.table-container {
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: 12px;
}

table.responsive-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(.65rem, 2vw, 1.1rem);
    text-align: center;
}

table.responsive-table th,
table.responsive-table td {
    border: 1px solid #ccc;
    padding: 0.5em;
    word-wrap: break-word;
    text-align: center;
}

/* Slightly reduce font for tablets */
@media (max-width: 768px) {
    table.responsive-table {
        font-size: 2.5vw;
    }
}

/* Fix very small phones (e.g., 360px wide) */
@media (max-width: 480px) {
    table.responsive-table {
        font-size: 10px;
    }

    table.responsive-table th,
    table.responsive-table td {
        padding: 4px;
    }
}

.chart-card {
    border-radius: 10px;
    box-shadow: 0 0 4px 0 #c9c4c4;
    padding-top: 20px;
    padding-bottom: 0px;
    background-color: #fff;
    height: 100%;
}

.chart-card-border {
    box-shadow: 0 0 4px 0 #c9c4c4;
}

.chart-title {
    font-size: 15px;
    color: #4d4c4c;
    margin-left: 20px;
}

/*Observation Status*/
.obs {

    .obs-card {
        height: 200px;
        width: 100%;
        background: rgba(254, 254, 254, 1);
        box-shadow: 0px 0px 4px 0px #c9c4c4;
        border-radius: .5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: .5rem;

        .icon-bar {
            /*position: absolute;*/
            width: 100%;
            padding: .5rem;
            background: #333;
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: .2rem;
        }

        .obs-card_content {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;

            > :nth-child(2) {
                color: rgba(5, 80, 125, 1);
            }
        }
    }
}

.obs-card-icon {
    width: 50px;
    height: 50px;
}

@media (max-width: 480px) {
    .obs-card-icon {
        width: 35px;
        height: 35px;
    }
}

.month-week-chart-btn {
    width: 80px;
    height: 23px;
    font-size: 10px;
}

.month-week-chart-btn span {
    font-weight: normal;
}

@media (max-width: 480px) {
    .month-week-chart-btn {
        width: 20px;
        height: 23px;
        font-size: 8px;
    }
}

.sub-text-title {
    color: rgb(5, 80, 125);
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
}

.indicator-header-div{
    margin-bottom: 30px;
}

.indicator-header-th{
    min-width: 75px;
    max-width: 75px;
    padding: 3px !important;
}

.lagging-indicator-table thead .indicator-header-th:not(:last-child) {
    position: relative;
}

    .lagging-indicator-table thead .indicator-header-th:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 0px;
        bottom: 0px;
        right: 0;
        width: 1px;
        background: rgb(202 195 195 / 35%);
        pointer-events: none;
    }

.indicator-header-text {
    color: #fffff6;
    font-weight: normal;
    font-size: clamp(0.65rem, 0.9vw, 1rem);
}

.indicator-body-text {
    font-size: clamp(0.65rem, 0.9vw, 1rem);
    padding-left: 0px !important;
    padding-right: 0px !important;
}

.dashboard-filter-btn span {
    font-weight: normal;
}

.map-popup-table {
    background: rgba(255, 255, 255, 0.95);
    padding: 2px 4px;
    margin-bottom: 5px;
    border-radius: 3px;
    box-shadow: rgba(2, 2, 2, 0.1) 0 0 12px 2px;
    width: clamp(70px, 7vw, 150px);
    height: clamp(84px, 10vh, 90px);
    font-weight: normal;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    transition: opacity 0.2s ease;
}

/* Hover-dim: when any one popup card is hovered, fade the rest so the
   focused country stands out. Scoped to #map-container so it only affects
   the map's labels, not other charts. */
#map-container:has(.map-popup-table:hover) .map-popup-table:not(:hover) {
    opacity: 0.3;
    z-index: 99999;
}

.map-popup-table-head {
    font-size: clamp(0.4rem, 0.5vw, 0.8rem);
    color: rgb(42, 191, 191);
    margin-bottom: 1px;
    overflow-wrap: break-word;
    white-space: normal;
}

.map-popup-table-body {
    font-size: clamp(0.35rem, 0.5vw, 0.7rem);
    line-height: 1;
    border-collapse: collapse;
    width: 100%;
    height: 40%;
}

/* Mobile legend for the Hazard Category donuts.
   Built dynamically by buildHazardLegend() in chart.custom.service.js.
   Lays out items as a 2-row horizontally-scrollable grid; clicking a row
   triggers the same action as clicking the corresponding chart slice. */
.hazard-legend-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    padding: 6px 4px 8px 4px;
    margin-top: 4px;
    -webkit-overflow-scrolling: touch;
}

.hazard-legend-grid {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 6px 14px;
    padding-bottom: 2px;
}

.hazard-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    transition: background 0.15s ease;
    user-select: none;
}

.hazard-legend-item:hover,
.hazard-legend-item:active {
    background: rgba(0, 0, 0, 0.05);
}

.hazard-legend-item .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.hazard-legend-item .name {
    font-size: 11px;
    color: #333;
}

.hazard-legend-item .count {
    font-size: 11px;
    font-weight: 600;
}

.dividend_ {
    margin-top: 5px;
    padding-top: 5px;
}

.map-formula-body {
    box-shadow: 0 2px 5px 0 #888888;
    font-size: 0.7rem;
    color: #05507D;
    font-weight: bold
}

/*.map-formula-body-data{*/
/*    display: flex;*/
/*    height: 100%;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*}*/

@media (max-width: 768px) {
    .map-formula-body {
        font-size: 0.45rem;
    }
}


.five-cards-grid {
    display: flex;
    /*flex-wrap: wrap;
    gap: 1px;*/
}

/* Desktop (>= 960px) → 5 equal columns */
@media (min-width: 960px) {
    .five-cards-grid > .mud-grid-item:first-child {
        flex: 1 1 100%;
    }

    .five-cards-grid > .mud-grid-item {
        flex: 1 1 20%;
        /*width:20%;*/
    }
}

/* Tablet & Mobile (< 960px) → 2 per row, last full width */
@media (max-width: 959px) {
    .five-cards-grid > .mud-grid-item {
        flex: 1 1 50%;
    }

    .five-cards-grid > .mud-grid-item:first-child {
        flex: 1 1 100%;
    }

    .five-cards-grid > .mud-grid-item:last-child {
        flex: 1 1 100%;
    }
}


.formulae_ {
    text-align: center;
    display: inline-block;
}

.dividend {
    display: inline-block;
    width: fit-content; /* shrink to widest line of wrapped text */
    position: relative;
    padding-bottom: 6px;
    text-align: center;
}

.dividend::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #05507D;
}

@media (min-width: 1800px) {
    .formula-body {
        max-width: 250px;
    }
}

@media (max-width: 1800px) {
    .formula-body {
        max-width: 202px;
    }
}

@media (max-width: 1600px) {
    .formula-body {
        max-width: 170px;
    }
}

@media (min-width: 1600px) {
    .formula-body-lead-time {
        max-width: 207px;
    }
}

@media (min-width: 2160px) {
    .formula-body-lead-time {
        max-width: 277px;
    }
}

@media (max-width: 1600px) {
    .formula-body-lead-time {
        max-width: 156px;
    }
}

@media (max-width: 360px) {
    .formula-body-odi{
        max-width: 60px;
    }
}

/* =========================================================================
   Recently Phase 4 Awards
   Photo-led cards: portrait photo on top, info block below.
   Matches dashboard tokens (brand blue #054F7D / #01558A, 10px radius,
   #c9c4c4 shadow, white card on the #f9f9f9 section band).
   ========================================================================= */

.awards-view-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #054F7D;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 20px;
    transition: background-color .15s ease;
}

.awards-view-all:hover {
    background-color: rgba(5, 79, 125, 0.08);
    color: #054F7D;
}

.awards-view-all-icon {
    transition: transform .15s ease;
}

.awards-view-all:hover .awards-view-all-icon {
    transform: translateX(2px);
}

.awards-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.awards-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 4px 0 #c9c4c4;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform .18s ease, box-shadow .18s ease;
}

.awards-card-link:hover .awards-card,
.awards-card-link:focus-visible .awards-card {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px 0 rgba(5, 79, 125, 0.18);
}

.awards-photo-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #eef3f7 0%, #dde7ee 100%);
    overflow: hidden;
}

.awards-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.awards-card-link:hover .awards-photo {
    transform: scale(1.04);
}

.awards-prize-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(5, 79, 125, 0.92);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 5px 10px 5px 7px;
    border-radius: 999px;
    max-width: calc(100% - 20px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    backdrop-filter: blur(2px);
}

.awards-prize-badge-icon {
    color: #FFD166 !important;
    font-size: 14px !important;
    flex-shrink: 0;
}

.awards-info {
    padding: 12px 14px 14px 14px;
    border-top: 1px solid rgba(5, 79, 125, 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.awards-info-row {
    display: grid;
    grid-template-columns: 88px 1fr;
    align-items: baseline;
    column-gap: 8px;
    font-size: 12.5px;
    line-height: 1.35;
}

.awards-info-label {
    color: #7a8794;
    font-weight: 500;
    letter-spacing: .01em;
}

.awards-info-label::after {
    content: ":";
    margin-left: 1px;
}

.awards-info-value {
    color: #2c3e50;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.awards-info-value-strong {
    color: #054F7D;
    font-weight: 700;
}

.awards-empty-text {
    color: #8a8a8a;
}

@media (max-width: 768px) {
    .awards-info-row {
        grid-template-columns: 76px 1fr;
        font-size: 12px;
    }

    .awards-prize-badge {
        font-size: 10px;
        padding: 4px 8px 4px 6px;
    }
}

@media (max-width: 480px) {
    .awards-photo-wrap {
        aspect-ratio: 1 / 1;
    }

    .awards-info {
        padding: 10px 12px 12px 12px;
    }
}







