* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body {
    background-color: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}
.container {
    width: 100%;
    max-width: fit-content;
    margin: 0 auto;
    padding: 0 15px;
}
.header {
    margin-bottom: 10px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}
.message-bar {
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 5px;
    font-weight: bold;
    background-color: #333;
    color: #fff;
    text-align: center;
    font-size: 14px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.message-bar.green {
    background-color: rgba(0, 170, 0, 0.7);
    color: white;
}
.message-bar.yellow {
    background-color: rgba(255, 204, 0, 0.7);
    color: black;
}
.message-bar.red {
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
}
@media (max-width: 768px) {
    .container {
        max-width: 100%;
    }
}
.panel {
    width: 100%;
    min-height: 5vh;
    border-bottom: 1px solid #333;
    padding-left: 0;
    padding-right: 0;
    padding-top: 15px;
    padding-bottom: 15px;
    margin-left: 0%;
    margin-right: 0%;
}
.panel h2 {
    color: #00e0ff;
    font-size: 26px;
    margin-bottom: 35px;
    margin-left: 0px;
    margin-top: 0px;
}
.panel-content {
    display: flex;
    height: 100%;
}
.panel-left {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
}
.panel-number {
	display: flex;
	flex: 1;
	flex-direction: column;
	width: 80%;
    max-height: 180px;
    min-width: 200px;
    max-width: 250px;
 	background-color: #200505;
}
.panel-line {
	display: flex;
	flex-direction: row;
	justify-content: center;
	max-height: 20px;
 	background-color: #200505;
}
.animation-container{
    display: flex;
    flex-direction: row;
	justify-content: center;
    align-items: center;
	position: relative;
	object-fit: fit;
}
.animation-container img {
	object-fit: fit;
}
.animation-error {
    color: #ff5252;
    background-color: rgba(255, 0, 0, 0.1);
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}
.panel-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    margin-left: 5vh;
}
h2 {
    color: #00e0ff;
    font-size: 24px;
    margin-bottom: 20px;
}
.panel-left-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
	max-width: 200px;
}
#line-stats-panel  .panel-left-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 150px;
}
.stat-row {
    display: flex;
    align-items: right;
    margin-bottom: 10px;
    justify-content: flex-start;
}
.stat-label {
    font-size: 16px;
    font-weight: bold;
    margin-right: 10px;
    flex: 0 0 auto;
	min-width: 120px;
}
.stat-value-container {
    min-width: 40px;
    display: flex;
    justify-content: flex-end;
    margin-right: 0;
    margin-left: auto;
}
.stat-value {
    font-size: 16px;
    text-align: right;
    white-space: nowrap;
    display: inline;
}
#status-value {
    font-size: 16px;
    text-align: right;
    margin-right: 0;
    margin-left: auto;
    white-space: nowrap;
    overflow: visible; 
    display: inline-block;
    background-color: transparent; 
}
#health-value, #battery-voltage-value {
    font-size: 16px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.value-display {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
}
.value-display-bat {
    font-size: 32px;
    font-weight: bold;
    margin-top: 10px;
    text-align: right;
}
.circular-gauge {
    position: relative;
    width:  calc(14vh + 14vw);
    height: calc(14vh + 14vw);
    max-width: 170px;
    max-height: 170px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    margin-top: 0px;
}
.gauge-scale {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from -30deg,
        red 30deg,
        orange 45deg,
        yellow 70deg,
        lime   120deg,
        yellow 180deg,
        orange 195deg,
        red    210deg
    );
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 50% 50%);
    mask: radial-gradient(circle at center,
        transparent 0,
        transparent 40%,
        black 40%,
        black 65%,
        transparent 65%
    );
    -webkit-mask: radial-gradient(circle at center,
        transparent 0,
        transparent 40%,
        black 40%,
        black 65%,
        transparent 65%
    );
    transform: rotate(-90deg);
    z-index: 1;
}
.gauge-needle {
    position: absolute;
    width: 4px;
    height: 40%;
    background: linear-gradient(to bottom, #00ffff, #006699);
    left: calc(50% - 2px);
    bottom: 50%;
    transform-origin: bottom center;
    transform: rotate(-135deg);
    border-radius: 4px 4px 0 0;
    box-shadow: 0 0 10px rgba(0, 224, 255, 0.7);
    transition: transform 0.5s ease-in-out;
    z-index: 2;
}
.gauge-needle::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #00ffff;
    left: -6px;
    bottom: -8px;
    border-radius: 50%;
    box-shadow: 0 0 15px #00e0ff;
}
.gauge-labels {
    position: absolute;
    width: 100%;
    bottom: 35px;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 2;
}
.gauge-values {
    position: absolute;
    width: 100%;
    height: 100%;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    z-index: 3;
}
.gauge-values div {
    position: absolute;
    transform-origin: center;
}
.gauge-values div:nth-child(1) {
    top: 28%;
    left: 18%;
    transform: rotate(-45deg);
}
.gauge-values div:nth-child(2) {
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
}
.gauge-values div:nth-child(3) {
    top: 28%;
    right: 18%;
    transform: rotate(45deg);
}
.gauge-center-value {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    z-index: 2;
    text-shadow: 0 0 5px rgba(0, 224, 255, 0.7);
}
.low-label, .high-label {
    font-weight: bold;
    color: #fff;
    font-size: 16px;
    position: relative;
    top: 10px;
}
.icons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    max-width: 100px;
    gap: 20px;
    margin:  0 ;
    padding: 0;
}
.battery-icon,
.plug-icon {
    padding: 0%;
    justify-content: right;
    object-fit: fit;
    align-items: right;
    text-align: right;
    flex: 1;
}
#plug-icon svg {
    height: 80%;
    width: 80%;
    padding-top: 15%;
}
#battery-icon svg {
    height: 80%;
    width: 80%;
    padding-top: 15%;
}
.box-display {
    min-height: 160px;
    background-clip: padding-box;
    display: flex;
	flex: 1 1 auto;
    flex-direction: row;
	justify-content: left;
    align-items: left;
    position: relative;
}
/*
.socket-icon {
    width:  100px;
    height: 100px;
    position: relative;
    align-self: center center;
    left: 0;
    top: 10px;
}
.socket-icon::before, .socket-icon::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #000;
    border-radius: 50%;
    top: 11px;
}
.socket-icon::before {
    left: 12px;
}
.socket-icon::after {
    right: 12px;
}
.socket-icon::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #000;
    border-radius: 50%;
    top: 11px;
    left: 50%;
    transform: translateX(-50%);
}
*/
.vertical-gauge {
    position: absolute;
    right: 15px;
    top: 15px;
    bottom: 20px; 
    width: 20px;
    z-index: 1;
}
.gauge-track {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
        #ff0000,
        #ffff00,
        #00ff00
    );
    border-radius: 4px;
}
.gauge-fill {
    position: absolute;
    width: 100%;
    top: 0;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    transition: height 0.5s ease-in-out;
}
.gauge-indicator {
    position: absolute;
    width: 20px;
    height: 5px;
    background-color: #00e0ff;
    right: 0px;
    bottom: 0%;
    transform: translateY(50%);
    border-radius: 5px;
    transition: bottom 0.5s ease-in-out;
}
.status-indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-right: 10px;
}
.status-indicator.active {
    background-color: #00ff00;
    box-shadow: 0 0 5px #00ff00;
}
.battery-gauge {
    position: relative;
    width: 60px;
    height: 120px;
    margin: 0 auto;
    margin-top: 15px;
    z-index: 1;
}
.battery-outline {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid #aaa; 
    border-radius: 5px;
    box-sizing: border-box;
    box-shadow: 0 0 10px rgba(170, 170, 170, 0.5);
    z-index: 1;
    --battery-cap-color: #aaa; 
}
.battery-outline:before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 6px;
    background-color: var(--battery-cap-color);
    border-radius: 3px 3px 0 0;
}
.battery-segments {
    position: absolute;
    width: calc(100% - 16px); 
    height: calc(100% - 16px); 
    left: 8px;
    bottom: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
}
.battery-segment {
    width: 100%;
    height: calc(100% / 7);
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 2px;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}
.battery-segment:last-child {
    margin-bottom: 0;
}
.battery-segment.filled {
    background-color: #4CAF50; 
    box-shadow: 0 0 5px #4CAF50; 
}
#chart-panel {
    min-height: 30vh;
}
#chart-panel .panel-content {
    flex-direction: column;
}
.chart-container {
    width: 100%;
    height: 300px;
    margin-bottom: 15px;
    text-align: center;
}
.chart-controls-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
}
#line-chart {
    width: 100%;
    height: 100%;
}
.dataset-toggle {
    display: flex;
    flex-direction: row;
    gap: 15px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    border-radius: 20px;
    width: auto;
    max-width: none;
    justify-content: center;
    flex-wrap: wrap;
}
@media (max-width: 768px) {
    .dataset-toggle {
        gap: 10px;
        padding: 12px 15px;
    }
    .toggle-label {
        font-size: 14px;
    }
}
@media (max-width: 480px) {
    .dataset-toggle {
        gap: 8px;
        padding: 10px;
    }
}
.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    user-select: none;
}
.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #00e0ff;
}
.toggle-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}
#battery-stats-panel .stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    justify-content: space-between;
}
#battery-stats-panel .stat-label {
    font-size: 16px;
    font-weight: bold;
    margin-right: auto;
    margin-left: 0;
    flex: 0 0 auto;
}
#battery-stats-panel .stat-value {
    font-size: 16px;
    text-align: right;
    min-width: 40px;
    width: 100%;
    white-space: nowrap;
    margin-left: auto;
    margin-right: 0;
}
.settings-button {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid #00e0ff;
    color: #00e0ff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    padding: 0;
    transition: all 0.3s ease;
}
.settings-button:hover {
    background-color: rgba(0, 224, 255, 0.2);
    transform: rotate(30deg);
}
.settings-button img {
    width: 24px;
    height: 24px;
    filter: invert(80%) sepia(72%) saturate(4462%) hue-rotate(155deg) brightness(103%) contrast(101%);
}
.settings-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}
.settings-content {
    position: relative;
    background-color: #1a1a1a;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #333;
}
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    background-color: #242424;
    border-radius: 12px 12px 0 0;
}
.settings-header h2 {
    margin: 0;
    color: #00e0ff;
    font-size: 20px;
    font-weight: 600;
}
.close-settings {
    background: none;
    border: none;
    color: #00e0ff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}
.close-settings:hover {
    color: #fff;
}
.settings-body {
    padding: 20px;
    background-color: #1a1a1a;
    border-radius: 0 0 12px 12px;
}
.settings-section {
    margin-bottom: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}
.settings-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.settings-section h3 {
    color: #00e0ff;
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
}
.form-group {
    margin-bottom: 15px;
}
.form-group:last-child {
    margin-bottom: 0;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}
.setting-input,
.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 14px;
    color: #fff;
    background-color: #242424;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.setting-input:focus,
.form-group input:focus,
.form-group select:focus {
    border-color: #00e0ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 224, 255, 0.2);
}
.setting-input::placeholder,
.form-group input::placeholder {
    color: #666;
}
.device-select-container {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}
.device-select {
    flex: 1;
}
.device-edit-button,
.device-add-button {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    background-color: #00e0ff;
    color: #000;
    transition: background-color 0.3s;
}
.device-edit-button:hover,
.device-add-button:hover {
    background-color: #33e6ff;
}
.settings-save-button {
    width: 100%;
    padding: 10px;
    background-color: #00e0ff;
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}
.settings-save-button:hover {
    background-color: #33e6ff;
}
.settings-commands .command-label {
    color: #fff;
}
.status-connected {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
	margin-bottom : 15px;
}
.status-error {
    background-color: rgba(244, 67, 54, 0.2);
    color: #F44336;
	margin-bottom : 15px;
}
.status-connecting {
    background-color: rgba(255, 152, 0, 0.2);
    color: #FF9800;
	margin-bottom : 15px;
}
.settings-notification {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}
.settings-notification.success {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
	margin-bottom: 15px;
}
.settings-notification.error {
    background-color: rgba(244, 67, 54, 0.2);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
	margin-bottom: 15px;
}
.device-edit-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1100;
    justify-content: center;
    align-items: center;
    overflow: auto; 
}
.device-edit-content {
    background-color: #1a1a1a;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}
.device-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    background-color: #242424;
    border-radius: 12px 12px 0 0;
}
.device-edit-header h3 {
    margin: 0;
    color: #00e0ff;
    font-size: 18px;
    font-weight: 600;
}
.device-edit-close {
    background: none;
    border: none;
    color: #00e0ff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}
.device-edit-close:hover {
    color: #fff;
}
.device-edit-body {
    padding: 20px;
    background-color: #1a1a1a;
}
.device-edit-row {
    margin-bottom: 15px;
}
.device-edit-row label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}
.device-edit-row input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 14px;
    color: #fff;
    background-color: #242424;
}
.device-edit-row input:focus {
    border-color: #00e0ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 224, 255, 0.2);
}
.device-edit-buttons {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}
.device-edit-buttons button {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}
.device-save-button {
    background-color: #00e0ff;
    color: #000;
}
.device-save-button:hover {
    background-color: #33e6ff;
}
.device-cancel-button {
    background-color: #333;
    color: #fff;
}
.device-cancel-button:hover {
    background-color: #444;
}
.device-delete-button {
    background-color: #d32f2f;
    color: #fff;
}
.device-delete-button:hover {
    background-color: #f44336;
}
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
#plug-panel .panel-left {
    flex: 1.0;
    max-width: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    padding: 0;
    margin: 0;
}
#plug-panel .icons {
    min-width: 40px;
}
.command-modal {
    display: none;
    position: fixed;
    z-index: 1500; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    overflow: hidden; 
}
.command-modal-content {
    background-color: #1a1a1a;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
    border: 1px solid #333;
}
.command-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    background-color: #242424;
    border-radius: 12px 12px 0 0;
}
.command-modal-header h3 {
    margin: 0;
    color: #00e0ff;
    font-size: 24px;
    font-weight: 500;
}
.close-modal {
    background: none;
    border: none;
    color: #00e0ff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}
.close-modal:hover {
    color: #fff;
}
.command-modal-body {
    padding: 20px;
    background-color: #1a1a1a;
}
.command-modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-end;
}
.command-modal-btn {
    min-width: 120px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.confirm-btn {
    background-color: #00e0ff;
    color: #000;
}
.confirm-btn:hover {
    background-color: #33e6ff;
    transform: translateY(-1px);
}
.cancel-btn {
    background-color: #333;
    color: #fff;
}
.cancel-btn:hover {
    background-color: #444;
    transform: translateY(-1px);
}
#command-confirmation-message {
    color: #fff;
    font-size: 18px;
    margin: 0;
    line-height: 1.5;
}
#command-panel {
    padding: 20px;
}
#command-panel .panel-content {
    display: flex;
    justify-content: center;
    align-items: center;
}
.command-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 600px;
}
.command-set {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}
.command-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: #2196F3;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.command-btn:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.command-btn:active {
    transform: translateY(0);
    box-shadow: none;
}
#device-add-button,
#add-command-btn,
#del-schedule-btn,
#add-schedule-btn,
#add-subsystem-btn{
    max-width: 30px;
    font-size: 22px;
}
#device-edit-button,
#edit-command-btn,
#edit-schedule-btn,
#edit-subsystem-btn{
    max-width: 60px;
}
#smtp-settings,
#smtp-test,
#oauth-authorize{
    font-size: 16px;
    font-weight: 600;
}
@media (max-width: 768px) {
    .command-set {
        flex-direction: column;
        gap: 10px;
    }
    .command-btn {
        width: 100%;
        min-width: unset;
    }
}
.settings-commands {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex:1;
}
.command-select-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex:1;
    width: 100%;
}
.command-label {
    min-width: 65px;
    font-size: 15px;
    font-weight: 500;
    color: #00e0ff;
    margin-right: 4px;
}
.command-select {
    flex: 1 1 0;
    padding: 10px 14px;
    border: 1.5px solid #00e0ff;
    border-radius: 6px;
    font-size: 15px;
    color: #fff;
    background-color: #181c22;
    transition: border-color 0.3s, box-shadow 0.3s;
    margin-right: 0;
    min-width: 100px;
}
.command-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    margin-left: 0;
    background: linear-gradient(90deg, #00e0ff 0%, #2196F3 100%);
    color: #181c22;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px 0 rgba(0,224,255,0.08);
}
.command-btn i {
    color: #181c22;
    font-size: 16px;
    pointer-events: none;
}
.command-btn:hover, .command-btn:focus {
    background: linear-gradient(90deg, #2196F3 0%, #00e0ff 100%);
    color: #fff;
    outline: none;
}
.command-btn:hover i, .command-btn:focus i {
    color: #fff;
}
@keyframes pulse-orange {
    0% { box-shadow: 0 2px 8px 0 rgba(255, 165, 0, 0.3); transform: scale(1); }
    50% { box-shadow: 0 4px 15px 0 rgba(255, 165, 0, 0.6); transform: scale(0.95); }
    100% { box-shadow: 0 2px 8px 0 rgba(255, 165, 0, 0.3); transform: scale(1); }
}
.command-btn.is-downloading {
    background: linear-gradient(90deg, #FFB300 0%, #F57C00 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px 0 rgba(255, 165, 0, 0.3) !important;
    cursor: wait;
	animation: pulse-orange 0.5s infinite ease-in-out;
}
.command-btn.is-downloading i { color: #fff !important; }
.command-btn.is-finished {
    background: linear-gradient(90deg, #00C853 0%, #2E7D32 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px 0 rgba(0, 200, 83, 0.3) !important;
}
.command-btn.is-finished i { color: #fff !important; }
.command-btn.is-downloading:hover { background: linear-gradient(90deg, #F57C00 0%, #FFB300 100%) !important; }
.command-btn.is-finished:hover { background: linear-gradient(90deg, #2E7D32 0%, #00C853 100%) !important; }
@media (max-width: 600px) {
    .command-select-row {
        flex-direction: row;
        gap: 6px;
    }
    .command-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    .command-select {
        font-size: 14px;
        padding: 8px 10px;
    }
}
.command-send-row {
    margin-top: 10px;
}
#del-command-btn,
#send-command-btn {
    width: 100%;
    font-size: 17px;
    font-weight: 600;
    padding: 12px 0;
    border-radius: 8px;
    background: linear-gradient(90deg, #00e0ff 0%, #00bfff 100%);
    color: #181c22;
    border: none;
    box-shadow: 0 2px 8px rgba(0,224,255,0.10);
    transition: background 0.2s, color 0.2s;
}
#del-command-btn:hover,
#send-command-btn:hover, #send-command-btn:focus {
    background: linear-gradient(90deg, #00bfff 0%, #00e0ff 100%);
    color: #fff;
}
#device-selection-panel {
    min-height: auto;
    padding: 15px;
}
#device-selection-panel .panel-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}
.device-selection-container {
    display: flex;
    gap: 10px;
    width: 100%;
	margin-bottom: 20px;
	margin-top: 10px;
}
.device-selection-container .device-select,
.device-selection-container .command-btn {
    flex: 1;
    min-width: 0;
}
.device-selection-container .device-select {
    padding: 8px 12px;
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 14px;
    color: #fff;
    background-color: #242424;
    transition: border-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300e0ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
    text-align: left;
}
.device-selection-container .device-select:focus {
    outline: none;
    border-color: #00e0ff;
    box-shadow: 0 0 0 2px rgba(0, 224, 255, 0.2);
}
.device-selection-container .device-select option {
    background-color: #242424;
    color: #fff;
    padding: 8px;
}
.device-selection-container .device-select:disabled {
    background-color: #1a1a1a;
    color: #666;
    cursor: not-allowed;
}
.device-selection-container .command-btn {
    padding: 8px 12px;
    border: 1px solid #333;
    border-radius: 4px;
    background: #242424;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    white-space: nowrap;
}
.device-selection-container .command-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.device-selection-container .command-btn i {
    font-size: 16px;
}
#custom-ip-btn {
    border-color: #0088cc;
}
#custom-ip-btn:hover {
    background: #1a1a1a;
    border-color: #00aaff;
}
#environment-jump {
    padding: 8px 12px;
    border: 1px solid #333;
    border-radius: 4px;
    background: #242424;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    white-space: nowrap;
}
#environment-jump:hover {
    background: #333;
}
#environment-jump.lan-mode {
    border-color: #00cc88;
}
#environment-jump.cloud-mode {
    border-color: #0088cc;
}
#environment-jump i {
    font-size: 12px;
}
.command-modal-btn:hover {
    opacity: 0.9;
}
.custom-ip-input-container {
    margin-bottom: 20px;
}
.custom-ip-input-container label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}
.custom-ip-input-container input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: #242424;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.3s;
}
.custom-ip-input-container input:focus {
    outline: none;
    border-color: #00e0ff;
}
.custom-ip-input-container input:invalid {
    border-color: #ff4444;
}
.custom-ip-input-container input:invalid:focus {
    border-color: #ff6666;
}
.custom-alert-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1500; 
    justify-content: center;
    align-items: center;
    overflow: hidden; 
}
.custom-alert-content {
    background-color: #242424;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}
.custom-alert-message {
    color: #fff;
    margin-bottom: 20px;
    font-size: 14px;
}
.custom-alert-button {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}
.custom-alert-button:hover {
    background-color: #444;
}
.commands-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-right: 20px;
}
.broker-parameters-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.broker-parameters-group label {
    margin-bottom: 5px;
}
.broker-parameters-group input {
    margin-bottom: 15px;
}
.group-separator {
    height: 1px;
    background-color: #333;
    margin: 15px 0;
}
.help-button {
    position: fixed;
    top: 15px;
    right: 65px; 
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid #00e0ff;
    color: #00e0ff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    padding: 0;
    transition: all 0.3s ease;
}
.help-button:hover {
    background-color: rgba(0, 224, 255, 0.2);
    transform: rotate(-10deg);
}
.help-button img {
    width: 24px;
    height: 24px;
    filter: invert(80%) sepia(72%) saturate(4462%) hue-rotate(155deg) brightness(103%) contrast(101%);
}
.help-modal {
    display: none;
    position: fixed;
    z-index: 1200; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; 
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}
.help-content {
    position: relative;
    background-color: #1a1a1a;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    height: 90vh;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
}
.help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    background-color: #242424;
    border-radius: 12px 12px 0 0;
}
.help-header h1 {
    margin: 0;
    color: #00e0ff;
    font-size: 30px;
    font-weight: 700;
}
.help-header h2 {
    margin: 0;
    color: #00e0ff;
    font-size: 20px;
    font-weight: 600;
}
.close-help {
    background: none;
    border: none;
    color: #00e0ff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}
.close-help:hover {
    color: #fff;
}
.help-body {
    flex: 1;
    padding: 0;
    background-color: #1a1a1a;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}
#help-frame {
    width: 100%;
    height: 100%;
    border: none;
    background-color: #1a1a1a;
}
.connection-status.connected {
    background-color: #4CAF50;
    color: white;
}
.connection-status.disconnected {
    background-color: #f44336;
    color: white;
}
.connection-status.error {
    background-color: #ff9800;
    color: white;
}
.schedule-modal {
  display: none;
  position: fixed;
  z-index: 1300; 
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; 
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
}
.schedule-modal-content {
  background-color: #1a1a1a;
  width: 90%;
  max-width: 400px; 
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
  color: #fff;
}
.schedule-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #333;
  background-color: #242424;
  border-radius: 12px 12px 0 0;
}
.schedule-modal-title {
  margin: 0;
  color: #00e0ff;
  font-size: 18px;
  font-weight: 600;
}
.schedule-modal-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
}
.schedule-group {
  margin-bottom: 20px;
  display: flex;
  align-items: left;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}
.schedule-date {
  width: 100%;
  margin-bottom: 10px;
}
.schedule-input, .schedule-group select, .schedule-group textarea {
  background: #242424;
  color: #fff;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  min-width: 14px;
  font-weight: 600;
}
.schedule-input:focus, .schedule-group select:focus, .schedule-group textarea:focus {
    border-color: #00e0ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 224, 255, 0.2);
}
.schedule-group textarea {
    width: 100%;
    resize: vertical;
    min-height: 40px;
}
.schedule-group label {
  font-size: 14px;
  color: #fff;
  font-weight: 500;
  margin-right: 8px;
}
.schedule-group input[type="checkbox"],
.schedule-group input[type="radio"] {
  accent-color: #00e0ff;
  margin-right: 4px;
  width: 16px;
  height: 16px;
}
.schedule-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.schedule-btn {
  flex: none; 
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  min-width: 90px;
  transition: background-color 0.3s;
}
.schedule-btn.confirm-btn {
    background-color: #00e0ff;
    color: #000;
}
.schedule-btn.confirm-btn:hover {
    background-color: #33e6ff;
}
.schedule-btn.cancel-btn {
  background-color: #333;
  color: #fff;
}
.schedule-btn.cancel-btn:hover {
    background-color: #444;
}
.schedule-btn.delete-btn {
  background-color: #d32f2f;
  color: #fff;
}
.schedule-btn.delete-btn:hover {
    background-color: #f44336;
}
.schedule-modal .close-modal {
  background: none;
  border: none;
  color: #00e0ff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  transition: color 0.3s;
}
.schedule-modal .close-modal:hover {
  color: #fff;
}
.schedule-group input:disabled, .schedule-group select:disabled, .schedule-group label:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (max-width: 600px) {
  .schedule-modal-content {
    min-width: 90vw;
    padding: 0 0 10px 0;
  }
  .schedule-modal-body {
    padding: 10px 4vw 0 4vw;
  }
}
.schedule-input.time-input {
    width: 40px; 
    text-align: center;
}
.schedule-input, .schedule-group select, .schedule-group textarea {
    background: #242424;
    color: #fff;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
}
.schedule-input:focus, .schedule-group select:focus, .schedule-group textarea:focus {
    border-color: #00e0ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 224, 255, 0.2);
}
.schedule-group textarea {
    width: 100%;
    resize: vertical;
    min-height: 60px;
}
.schedule-group label {
  font-size: 14px;
  color: #fff;
  font-weight: 500;
  margin-right: 8px;
}
.schedule-group input[type="checkbox"],
.schedule-group input[type="radio"] {
  accent-color: #00e0ff;
  margin-right: 4px;
  width: 16px;
  height: 16px;
}
.schedule-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
#sequence-animation {
    overflow: hidden;
    display: flex;
    margin: 0;
    padding: 0;
}
#sequence-animation svg {
    height: 100%;
    width: 100%;
}
.smtp-modal {
    display: none;
    position: fixed;
    z-index: 1200;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
}
.smtp-modal-content {
    background-color: #1a1a1a;
    color: #fff;
    margin: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    border: 1px solid #333;
    width: 95vw;
    max-width: 420px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}
.smtp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    background-color: #242424;
    border-radius: 12px 12px 0 0;
}
.smtp-modal-header h3 {
    margin: 0;
    color: #00e0ff;
    font-size: 20px;
    font-weight: 600;
}
.smtp-modal-close {
    background: none;
    border: none;
    color: #00e0ff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}
.smtp-modal-close:hover { color: #fff; }
.smtp-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1 1 auto;
}
.smtp-modal-footer {
    padding: 15px 20px;
    background-color: #242424;
    border-top: 1px solid #333;
    border-radius: 0 0 12px 12px;
    text-align: right;
}
.smtp-server-selection {
    display: flex;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.smtp-radio-group, .smtp-checkbox-group {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: #fff;
    min-width: 75px;
}
.smtp-config-section {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 6px;
    background-color: #181c22;
}
.smtp-input-group {
    margin-bottom: 12px;
}
.smtp-input-group:last-child { margin-bottom: 0; }
.smtp-input-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #00e0ff;
    font-size: 13px;
}
.smtp-input-group input,
.smtp-input-group select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 14px;
    color: #fff;
    background-color: #242424;
}
.smtp-input-group input:focus,
.smtp-input-group select:focus {
    border-color: #00e0ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,224,255,0.15);
}
.smtp-input-group input:disabled {
    background-color: #222;
    color: #888;
    cursor: not-allowed;
}
.smtp-password-container {
    position: relative;
    display: flex;
    align-items: center;
}
.smtp-password-container input {
    padding-right: 38px;
}
.smtp-password-toggle {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #00e0ff;
    font-size: 18px;
    padding: 2px 4px;
}
.smtp-password-toggle:hover { color: #fff; }
.smtp-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    background-color: #00e0ff;
    color: #000;
    font-weight: 600;
    transition: background 0.2s;
}
.smtp-btn:hover { background-color: #33e6ff; color: #000; }
.smtp-btn.cancel {
    background-color: #333;
    color: #fff;
    margin-left: 0;
}
.smtp-btn.cancel:hover { background-color: #444; }
@media (max-width: 600px) {
    .smtp-modal-content {
        max-width: 98vw;
        min-width: 0;
        padding: 0;
    }
    .smtp-modal-body {
        padding: 10px 4vw 0 4vw;
    }
}
#oauth-authorize {
    background-color: #4285f4;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
#oauth-authorize:hover {
    background-color: #3367d6;
    transform: translateY(-1px);
}
#oauth-authorize:active {
    transform: translateY(0);
}
#oauth-authorize i {
    font-size: 16px;
}
#oauth-authorize:disabled {
    background-color: #666;
    cursor: not-allowed;
    transform: none;
}
#oauth-authorize.authorizing {
    background-color: #ff9800;
    animation: pulse 1.5s infinite;
}
#oauth-authorize.authorized {
    background-color: #4CAF50;
}
#oauth-authorize.error {
    background-color: #f44336;
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}
.oauth-callback-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #1a1a1a;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.oauth-callback-content {
    text-align: center;
    padding: 40px;
    background-color: #242424;
    border-radius: 12px;
    border: 1px solid #333;
    max-width: 400px;
    width: 90%;
}
.oauth-callback-spinner {
    border: 3px solid #333;
    border-top: 3px solid #00e0ff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.oauth-callback-message {
    font-size: 16px;
    margin-bottom: 10px;
    color: #00e0ff;
}
.oauth-callback-details {
    font-size: 14px;
    color: #888;
    margin-top: 10px;
}
.chart-res{
	min-height: 6vh;
	max-width: auto;
    border: 1px solid #666;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    flex: 1;
    flex-wrap: no-wrap;
	align-items: center;
	justify-content: space-evenly;
}
.chart-res input{
	display: none;
	justify-content: space-evenly;
}
.chart-res label{
    font-family: sans-serif;
    cursor: pointer;
    transition: all 0.3s;
	text-align: center;
	justify-content: space-evenly;
	padding: 10px 20px;
}
.chart-res label:last-of-type{ border-right: 0; }
.chart-res label:hover{
    background: #197380;
}
.chart-res input:checked + label{
    background: #33E6FF;
	color: #101010;
}
#heart-icon {
    transition: transform 0.1s ease-in-out;
    transform-origin: center;
    position: fixed;
    top: 65px;
    right: 23px; 
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.0);
    color: #00e0ff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 0;
  }
  .pulse-trigger {
    animation: beat 0.3s ease-out;
  }
  @keyframes beat {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    100% { transform: scale(1); }
  }
.schedule-line {
    outline: none;
	border-top: 2px solid #242424;
	color: #00e0ff;
	min-height: 5px;
	width: 100%;
	margin-bottom: 15px;
}  
