:root {
    --light-color: #dce4e5;
    --medium-light-color: #35b1cd;
    --medium-dark-color: #2f8a9e;
    --medium-dark-color-alpha: rgb(47 138 158 / 60%);
    --dark-color: #206274;
    --color-red: #b10023;
    --color-yellow: #b38e1d;
    --color-green: #4CAF50;
    --text-color: #dddddd;
    --selected-text-color: #ffffff;
    --gradient-light: #206274;
    --gradient-dark: rgb(28 31 35);
    --disabled-color: #364147b3;
    --lime: #bad73d;
    --light-lime: #dffe61;
    --popup-gradient: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    --light-shadow: #ffffff0d;
}
@font-face {
    font-family: 'Big Shoulders';
    src: url('../fonts/BigShoulders-VariableFont_opsz,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-stretch: 75% 125%;
    font-style: normal;
}
@font-face {
    font-family: 'Overpass';
    src: url('../fonts/Overpass-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-stretch: 75% 125%;
    font-style: normal;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    margin: 0 auto;
    overflow: hidden;
}
body.lightMode {
    --light-color: #ffffff;
    --medium-light-color: #f2f2f2;
    --medium-dark-color: #495057;
    --dark-color: #d1d1d1;
    --color-red: #cc0000;
    --text-color: #677481;
    --gradient-light: #d6d6d6;
    --gradient-dark: #a8a8a8;
}
* {
    box-sizing: border-box;
}
.customScrollbar::-webkit-scrollbar {
    width: 10px;
}
.customScrollbar::-webkit-scrollbar-track {
    border-radius: 8px;
    background-color: var(--medium-light-color);
    border: 1px solid var(--medium-dark-color);
}

.customScrollbar::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background-color: var(--text-color);
    border: 1px solid var(--dark-color);
}

header {
    height: 60px;
    /*background-image: url(../images/pattern.png);*/
    background-size: 100px;
    /*background-image: linear-gradient(-90deg, var(--medium-dark-color), var(--gradient-dark));*/
    background-color: var(--gradient-dark);
    background-position: left;    
}

#menuDiv {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
footer {
    position: fixed;
    bottom: 0;
    z-index: 1000;
}
#tickerDiv {
    height: 40px;
    background: var(--gradient-dark);
    overflow: hidden;
    position: relative;
    color: white;
    display: flex;
    align-items: center;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-left: 0 !important;
}

.ticker-tape {
  position: absolute;
  white-space: nowrap;
  will-change: transform;
}

#mapContainer, #mainContainer {
    background: linear-gradient(135deg, #0d1b21 0%, #163a47 40%, #0d3d4d 70%, #0a2a35 100%);
    background-size: cover;
    background-repeat: no-repeat;    
    position: relative;
}
#menuHolder {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: space-evenly;
    font-family: 'Big Shoulders';
    color: white;
    text-transform: uppercase;
    font-size: 20px;   
    height: 100%;
    cursor: pointer;
}
#menuHolder.inactive {
    pointer-events: none;
}
.menuElement {
    height: 100%;
    width: 100%;    
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
}
.menuElement:hover, .menuElement:focus,.menuElement.selected {
    color: var(--lime);
    border-bottom-color: var(--lime);
    background: rgba(186, 215, 61, 0.08);
}
#plexusContainer {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.applicationTitle {
    display: flex;
    width: 100%;
    align-items: center;
    font-size: 24px;
    text-transform: uppercase;
    font-weight: bold;
    line-height: 60px;
    justify-content: space-between;
    color: var(--text-color);

    font-size: 30px;
    font-family: "Big Shoulders", sans-serif;
}

.applicationLogo {
    background-image: url(../images/ert_logo.png);
    background-size: contain;
    background-position: center;
    width: 110px;
    height: 50px;
    background-repeat: no-repeat;
    /*position: fixed;*/
    top: 5px;
    right: 0px;
    z-index: 999;
}


.btn {
    line-height: 20px;
    border-radius: 5px;
    border: 1px solid var(--text-color);
    background-color: var(--medium-dark-color-alpha);    
    background-position: center center;
    background-size: 80px;
    color: var(--text-color);
    text-transform: uppercase;
    font-weight: bold;
    position: relative;
    padding: 20px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: "Big Shoulders", sans-serif;
    font-size: 18px;
}

/*.btn:before, .btn:after {
    content: "";
    position: absolute;
    width: 30%;
    height: 30%;
    border: 2px solid var(--text-color);
    border-radius: 2px;
    pointer-events: none;
}

.btn:before {
    bottom: -2px;
    left: -2px;
    border-top: none;
    border-right: none;
}
.btn:after {
    top: -2px;
    right: -2px;
    border-bottom: none;
    border-left: none;
}*/
.btn:hover {
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--selected-text-color);
    background-color: rgba(255, 255, 255, 0.2);
}

.infoContainers {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 10px 20px;
/*    background-image: url(../images/pattern.png), linear-gradient(180deg, var(--medium-dark-color), var(--gradient-dark));
    border: 1px solid var(--text-color);*/
    margin: 10px;
    background-size: 100px;
    color: var(--text-color);
    /*border-radius: 5px 0 5px 0;*/
}

/*.infoContainers:before, .infoContainers:after {
    content: "";
    position: absolute;
    width: 30%;
    height: 20%;
    border: 3px solid var(--text-color);
    border-radius: 3px;
    pointer-events: none;
}*/
#informationPanel {
    min-height: 100%;
    display: none;
}
.infoContainers:before {
    bottom: -3px;
    left: -3px;
    border-top: none;
    border-right: none;
}
.infoContainers:after {
    top: -3px;
    right: -3px;
    border-bottom: none;
    border-left: none;
}

#armyTitle {
    display: flex;
    align-items: center;
    margin: 0;
    height: 60px;
    color: var(--text-color);
    font-family: "Big Shoulders", sans-serif;
}

#armyLogo {
    background-image: url(../images/army_logo.png);
    background-size: contain;
    background-position: center;
    width: 40px;
    height: 40px;
    background-repeat: no-repeat;
    margin-right: 10px;
}

/* Offline Mode Indicator */
.offline-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 8px 15px;
    background: var(--color-red, #b10023);
    color: white;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.offline-indicator.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.offline-indicator i {
    font-size: 14px;
}

/* ========================================
   LIVE MODE CONTROLS
   ======================================== */

.live-mode-controls {
    display: none; /* Hidden by default, shown only for RF Antenna Data View */
    align-items: center;
    gap: 10px;
    margin-left: 170px;
    margin-top: 9px;
    vertical-align: middle;
}

.live-mode-controls.visible {
    display: inline-flex;
}

.btn-live-mode {
    line-height: 20px;
    border-radius: 5px 0 5px 0;
    background-color: var(--medium-dark-color-alpha);
    background-image: url(../images/pattern.png);
    background-position: center center;
    background-size: 80px;
    color: var(--text-color);
    text-transform: uppercase;
    font-weight: bold;
    position: relative;
    padding: 10px;
    cursor: pointer;
    font-family: "Big Shoulders", sans-serif;
    font-size: 18px;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-live-mode:before, .btn-live-mode:after {
    content: "";
    position: absolute;
    width: 30%;
    height: 30%;
    border: 2px solid var(--text-color);
    border-radius: 2px;
    pointer-events: none;
}

.btn-live-mode:before {
    bottom: -2px;
    left: -2px;
    border-top: none;
    border-right: none;
}

.btn-live-mode:after {
    top: -2px;
    right: -2px;
    border-bottom: none;
    border-left: none;
}

.btn-live-mode:hover {
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--selected-text-color);
    background-color: rgba(255, 255, 255, 0.2);
}

.btn-live-mode.active {
    background: linear-gradient(135deg, var(--color-green), #045e00);
    border-color: var(--lime);
    color: white;
}

.live-indicator {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(0, 128, 0, 0.2);
    border: 1px solid var(--color-green);
    border-radius: 4px;
    color: var(--lime);
    font-size: 12px;
    font-weight: 600;
}

.live-indicator.active {
    display: inline-flex;
}

.live-indicator .pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--lime);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(186, 215, 61, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(186, 215, 61, 0); }
    100% { box-shadow: 0 0 0 0 rgba(186, 215, 61, 0); }
}

.live-settings {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-color);
}

.live-settings.visible,
.live-indicator.active ~ .live-settings {
    display: inline-flex;
}

.live-settings select {
    background: var(--dark-color);
    border: 1px solid var(--medium-dark-color);
    color: var(--text-color);
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 11px;
}

/* Failure Menu Toggle Button */
.btn-failure-menu {
    display: none; /* Hidden by default, shown only for RF Antenna Data View */
    line-height: 20px;
    border-radius: 5px 0 5px 0;
    background-color: var(--medium-dark-color-alpha);
    background-image: url(../images/pattern.png);
    background-position: center center;
    background-size: 80px;
    color: var(--text-color);
    text-transform: uppercase;
    font-weight: bold;
    position: relative;
    padding: 10px;
    cursor: pointer;
    font-family: "Big Shoulders", sans-serif;
    font-size: 18px;
    border: none;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-left: 10px;
    margin-top: 9px;
    vertical-align: middle;
}

.btn-failure-menu:before, .btn-failure-menu:after {
    content: "";
    position: absolute;
    width: 30%;
    height: 30%;
    border: 2px solid var(--text-color);
    border-radius: 2px;
    pointer-events: none;
}

.btn-failure-menu:before {
    bottom: -2px;
    left: -2px;
    border-top: none;
    border-right: none;
}

.btn-failure-menu:after {
    top: -2px;
    right: -2px;
    border-bottom: none;
    border-left: none;
}

.btn-failure-menu.visible {
    display: inline-flex;
}

.btn-failure-menu:hover {
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--selected-text-color);
    background-color: rgba(255, 255, 255, 0.2);
}

/* Network Loading Button */
.btn-network-loading {
    display: inline-flex;
    line-height: 20px;
    border-radius: 5px 0 5px 0;
    background-color: rgba(53, 177, 205, 0.15);
    background-image: url(../images/pattern.png);
    background-position: center center;
    background-size: 80px;
    color: var(--medium-light-color);
    text-transform: uppercase;
    font-weight: bold;
    position: fixed;
    top: 7px;
    right: 155px;
    z-index: 999;
    padding: 10px;
    cursor: pointer;
    font-family: "Big Shoulders", sans-serif;
    font-size: 18px;
    border: 1px solid var(--medium-dark-color);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.btn-network-loading:before, .btn-network-loading:after {
    content: "";
    position: absolute;
    width: 30%;
    height: 30%;
    border: 2px solid var(--medium-light-color);
    border-radius: 2px;
    pointer-events: none;
}

.btn-network-loading:before {
    bottom: -2px;
    left: -2px;
    border-top: none;
    border-right: none;
}

.btn-network-loading:after {
    top: -2px;
    right: -2px;
    border-bottom: none;
    border-left: none;
}

.btn-network-loading:hover {
    border: 1px solid var(--medium-light-color);
    color: #fff;
    background-color: rgba(53, 177, 205, 0.3);
    text-decoration: none;
}

/* ========================================
   FAILURE SIMULATION MENU
   ======================================== */

.failure-menu {
    position: fixed;
    top: 60px;
    right: -320px;
    width: 300px;
    background: linear-gradient(180deg, var(--gradient-dark), #1a1d20);
    border-left: 2px solid var(--medium-dark-color);
    border-bottom: 2px solid var(--medium-dark-color);
    border-radius: 0 0 0 8px;
    z-index: 1000;
    transition: right 0.3s ease;
    box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.5);
}

.failure-menu.open {
    right: 0; 
}

.failure-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--medium-dark-color);
    border-bottom: 1px solid var(--dark-color);
}

.failure-menu-header h4 {
    margin: 0;
    color: var(--selected-text-color);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.failure-menu-close {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
}

.failure-menu-close:hover {
    color: var(--color-red);
}

.failure-menu-content {
    padding: 15px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

.failure-menu-desc {
    color: var(--text-color);
    font-size: 12px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.btn-failure {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--dark-color), var(--gradient-dark));
    border: 1px solid var(--medium-dark-color);
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.btn-failure:hover {
    background: linear-gradient(135deg, var(--medium-dark-color), var(--dark-color));
    border-color: var(--medium-light-color);
    transform: translateX(-3px);
}

.btn-failure.active,
.btn-failure.running {
    background: linear-gradient(135deg, var(--color-yellow), #8a6c16);
    border-color: var(--color-yellow);
    color: white;
}

.btn-failure i {
    font-size: 16px;
    margin-bottom: 4px;
}

.btn-failure span {
    font-weight: 600;
    font-size: 16px;
}

.btn-failure small {
    font-size: 14px;
    opacity: 0.7;
    margin-top: 2px;
}

.btn-failure .failure-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.btn-failure .failure-progress-bar {
    height: 100%;
    background: var(--lime);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.btn-reset {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--color-red);
    color: var(--color-red);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-reset:hover {
    background: var(--color-red);
    color: white;
}

.failure-menu hr {
    border: none;
    border-top: 1px solid var(--medium-dark-color);
    margin: 15px 0;
}

/* ========================================
   VALUE UPDATE ANIMATIONS
   ======================================== */

.value-updated {
    animation: valueFlash 0.5s ease;
}

@keyframes valueFlash {
    0% { background-color: transparent; }
    50% { background-color: rgba(186, 215, 61, 0.3); }
    100% { background-color: transparent; }
}

.data-updated {
    animation: popupFlash 0.3s ease;
}

@keyframes popupFlash {
    0% { box-shadow: 0 0 0 0 rgba(186, 215, 61, 0.5); }
    100% { box-shadow: 0 0 20px 5px rgba(186, 215, 61, 0); }
}

/* ========================================
   ALERT NOTIFICATIONS
   ======================================== */

#alertContainer {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 350px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-notification {
    background: linear-gradient(135deg, var(--gradient-dark), #1a1d20);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--medium-dark-color);
}

.alert-notification.alert-critical {
    border-left-color: var(--color-red);
    background: linear-gradient(135deg, rgba(177, 0, 35, 0.2), var(--gradient-dark));
}

.alert-notification.alert-warning {
    border-left-color: var(--color-yellow);
    background: linear-gradient(135deg, rgba(179, 142, 29, 0.2), var(--gradient-dark));
}

.alert-notification.alert-info {
    border-left-color: var(--medium-light-color);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.alert-severity {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--selected-text-color);
}

.alert-critical .alert-severity {
    background: var(--color-red);
}

.alert-warning .alert-severity {
    background: var(--color-yellow);
}

.alert-time {
    font-size: 11px;
    color: var(--text-color);
    opacity: 0.7;
}

.alert-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--selected-text-color);
    margin-bottom: 5px;
}

.alert-message {
    font-size: 12px;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: 8px;
}

.alert-equipment,
.alert-readings {
    font-size: 11px;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 5px;
}

.alert-inventory {
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
}

.alert-inventory.inventory-in-stock {
    color: var(--color-green);
    border-left: 2px solid var(--color-green);
}

.alert-inventory.inventory-low-stock {
    color: var(--color-yellow);
    border-left: 2px solid var(--color-yellow);
}

.alert-inventory.inventory-out-of-stock {
    color: var(--color-red);
    border-left: 2px solid var(--color-red);
}

.alert-inventory.inventory-on-order {
    color: var(--medium-light-color);
    border-left: 2px solid var(--medium-light-color);
}

.alert-action {
    font-size: 11px;
    color: var(--lime);
    font-style: italic;
    margin-bottom: 10px;
}

.alert-acknowledge {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--medium-dark-color);
    color: var(--text-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.alert-acknowledge:hover {
    background: var(--medium-dark-color);
    color: var(--selected-text-color);
}

/* ========================================
   INVENTORY STATUS COLORS (Global)
   ======================================== */

.inventory-in-stock { color: #4CAF50; }
.inventory-low-stock { color: #FF9800; }
.inventory-out-of-stock { color: #F44336; }
.inventory-on-order { color: #2196F3; }

#progressDiv {
    position: absolute;
    z-index: -1;
    top: 400px;
    left: 50%;
    margin-left: -150px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--text-color);
}
.progress {
    width: 300px;
    height: 25px;
    background-color: #eee;
    border-radius: 0;
    overflow: hidden;
    border: 2px solid var(--medium-light-color);
}

.progress-bar {
    height: 100%;
    width: var(--value);
    background: linear-gradient(to right, var(--gradient-dark), var(--gradient-light));
    transition: width 0.2s ease;
}

.logoHolder {
    display: flex;
    align-items: center;
    float: right;
    flex-direction: column;
    color: white;
    font-family: 'Big Shoulders';
    justify-content: center;
    width: 120px;
    height: 50px;
    margin-top: 7px;
}

#loaderPage {
    min-width: 100%;
    min-height: calc(100vh - 60px);
    display: none;
}
#loaderPage iframe {
    min-width: 100%;
    min-height: calc(100vh - 60px);
}
.gaia-fab {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--medium-light-color), var(--medium-dark-color));
    color: #fff;
    font-size: 22px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.2s;
    z-index: 20;
    pointer-events: all;
}