body {
    zoom: 0.8;
    background-color: #121212;
    font-family: Arial, sans-serif;
    color: #fff;
    margin: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    min-height: calc(100vh / 0.8);
    height: auto;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.dashboard {
    width: 99%;
    min-height: calc(100vh / 0.8 - 20px);
    height: auto;
    margin: 10px auto;
    padding: 10px;
    background-color: #1e1e1e;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* first section (title and clock) */
.header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    height: auto;
}

.header h1 {
    margin: 0px 10px;
    font-size: 24px;
}

.date-time {
    display: flex;
    margin: 0px 10px;
    gap: 20px;
    font-size: 18px;
    color: #ffffff; 
}

/* second section (machine information, status, and trouble information) */
.basic-info {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    height: auto;
}

.machine-info {
    flex: 4;
    text-align: center;
    padding: 5px;
    border-radius: 5px;
    margin: 0 5px;
    background-color: #333333;
}

.machine-title {
    margin-bottom: 10px;
    font-size: 15px;
}

.machine-detail {
    display: flex;
    justify-content: space-around;
    font-size: 24px;
    font-weight: bold;
    gap: 5px;
}

.machine-detail .more-detail {
    flex: 1;
    background-color: #2a2a2a;
    border-radius: 5px;
}

.status-machine {
    flex: 2;
    text-align: center;
    padding: 5px;
    border-radius: 5px;
    margin: 0 5px;
    background-color: #333333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.status-machine .label {
    margin-bottom: 10px;
    font-size: 15px;
}

.status-machine .value {
    color: #ff3333;
    font-size: 24px;
    font-weight: bold;
}

.trouble-info {
    flex: 2;
    text-align: center;
    padding: 5px;
    border-radius: 5px;
    margin: 0 5px;
    background-color: #333333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.trouble-info .label {
    margin-bottom: 10px;
    font-size: 15px;
}

.trouble-info .value {
    color: #ff3333;
    font-size: 24px;
    font-weight: bold;
}

/* third section (total loading time, total stop time, total operation time) */
.metrics {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    height: auto;
}

.metric {
    flex: 1;
    text-align: center;
    padding: 5px;
    border-radius: 5px;
    margin: 0 5px;
}

.metric .label {
    font-size: 15px;
    margin-bottom: 5px;
    color: #ffffff;
}

.metric .value {
    font-size: 24px;
    font-weight: bold;
}

.total-loading-time {
    background-color: #333333;
    color: #3399ff;
}

.total-stop-time {
    background-color: #333333;
    color: #ff3333;
}

.total-operation-time {
    background-color: #333333;
    color: #33cc33;
}

/* fourth section (availability, performance, quality, and OEE) */
.gauge-charts {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    min-height: 185px;
    height: 190px;
    flex: 0 0 190px;
}

.gauge {
    background-color: #333333;
    border-radius: 5px;
    flex: 2;
    text-align: center;
    margin: 0 5px;
    padding: 8px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 180px;
    height: 100%;
    box-sizing: border-box;
}

.oee {
    flex: 3;
}

.gauge .gauge-title {
    font-size: 20px;
    color: #ffffff;
    margin: 10px;
    align-self: center;
}

.gauge .gauge-content {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 140px;
    min-height: 140px;
    position: relative;
}

.gauge-content div[id*="Gauge"] {
    width: 100%;
    height: 100%;
    min-height: 140px;
    position: relative;
}

/* fifth section (summaries) */
.summary {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    min-height: 270px;
    height: 280px;
    margin-bottom: 5px;
}

.summary h2 {
    text-align: center;
    font-size: 15px;
    margin-top: 0px;
    margin-bottom: 5px;
    font-weight: normal;
}

.summary-stop {
    background-color: #333333;
    border-radius: 5px;
    padding: 10px;
    margin: 0 5px;
    flex: 1.96;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.summary-stop-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.summary-stop-container {
    background-color: #333333;
    border-radius: 5px;
    height: 100%;
    width: 100px;
    margin: 0;
    padding: 0;
    flex: 6;
}

.summary-stop-timer {
    flex: 1;
    margin-left: 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.summary-stop-timer table {
    width: 100%;
    height: 100%;
}

.summary-stop-timer td {
    font-size: 10px;
    padding-bottom: 15px;
    padding-top: 15px;
}

.summary-output {
    display: flex;
    flex-direction: column;
    background-color: #333333;
    border-radius: 5px;
    padding: 10px;
    margin: 0 5px;
    flex: 4.08;
}

.output-time {
    max-width: 100%;
    overflow-x: auto;
}

.output-time .table-container {
    max-height: 120px;
    overflow-y: auto;
    display: block;
}

.quality-loss-time {
    max-width: 100%;
    overflow-x: auto;
}

.quality-loss-time .table-container {
    max-height: 120px;
    overflow-y: auto;
    display: block;
}

.output-time table,
.quality-loss-time table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    background-color: #2a2a2a;
}

.output-time th,
.output-time td,
.quality-loss-time th,
.quality-loss-time td {
    border: 3px solid #333333;
    padding: 5px;
    text-align: center;
    font-size: 15px;
    font-weight: normal;
}

.summary-oee-loss, .summary-loss {
    background-color: #333333;
    border-radius: 5px;
    padding: 10px 14px;
    margin: 0 5px;
    flex: 2.96;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    height: 100%;
}

.oee-vs-loss, .summary-loss-detail {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    height: 100%;
    flex: 1;
    box-sizing: border-box;
}

.oee-vs-loss-chart, .summary-loss-container {
    width: 220px;
    height: 220px;
    min-width: 200px;
    min-height: 200px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.oee-vs-loss-chart canvas, .summary-loss-container canvas {
    width: 220px !important;
    height: 220px !important;
    max-width: 220px !important;
    max-height: 220px !important;
    display: block;
}

.oee-vs-loss-legend, .summary-loss-table {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 12px;
    flex: 1;
}

.oee-vs-loss-legend table, .summary-loss-table table {
    width: 100%;
    border-collapse: collapse;
}

.oee-vs-loss-legend th, .summary-loss-table th {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    padding: 4px 6px;
    text-align: right;
}

.oee-vs-loss-legend td, .summary-loss-table td {
    font-size: 13px;
    padding: 5px 6px;
    color: #ffffff;
    text-align: right;
    white-space: nowrap;
}

.oee-vs-loss-legend td.type, .summary-loss-table td.type {
    text-align: left;
    font-weight: 500;
    padding-left: 6px;
}

.legend-bar {
    width: 5px;
    min-width: 5px;
    height: 18px;
    padding: 0 !important;
    border-radius: 2px;
}

.type {
    text-align: left;
}
