body {font-family: monospace, sans-serif; margin: 2rem;}
textarea {width: 100%; box-sizing: border-box; font-family: monospace; padding: .5rem;}
button {padding: .6rem 1.2rem; font-size: 1rem; margin-top: .5rem;}
.result {margin-top: 1rem; padding: .8rem; border-radius: .4rem;}
.success {background:#e6f7e6; border:1px solid #4caf50; color:#2e7d32;}
.error   {background:#ffebee; border:1px solid #f44336; color:#c62828;}
pre {margin:0; white-space: pre-wrap; word-break: break-all;}
.full-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}
.full-table td {
    width: 50%;
    vertical-align: top;
    padding: 10px;
}
.normal-table-100 {
    width: 100%;
    border-collapse: collapse;
}
.normal-table {
    width: 140%;
    border-collapse: collapse;
}
.normal-table-border,
.normal-table-border th,
.normal-table-border td {
    border: 1px solid #333;
    padding-left: 5px;
    padding-right: 5px;
}
/* Tom select option for more beautiful */
.ts-wrapper .optgroup-header {
    font-weight: bold;
    padding: 8px 12px;
    background: #f0f0f0;
    color: #333;
    font-size: 14px;
}
.ts-dropdown .option {
    /*white-space: normal;*/
    /*padding: 8px 12px;*/
    /*line-height: 1.4;*/
    padding: normal !important;			/* allow text wrapping */
    height: auto !important;				/* grow to fit content */
    min-height: 38px;								/* keep a reasonable minimum */
    padding: 12px 16px !important;	/* more breathing room */
    line-height: 1.4 !important;
}
.ts-dropdown {
    max-height: 70vh !important;		/* or 500px, whatever you like */
}
/* Slider */
/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

/* Hide default checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Optional: rounded slider */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* 1. Define the font with @font-face */
@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    src:
        /* Optional: local() helps if the font is already installed on the user's system */
            local('Material Icons'),
            local('MaterialIcons-Regular'),
                /* Path to your TTF file – adjust if your folder structure is different */
            url('../fonts/MaterialIcons.ttf') format('truetype');
}

/* 2. Base class for showing icons properly */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;          /* Preferred size – change as needed (20px, 1.5em, etc.) */
    display: inline-block;    /* Important for consistent alignment */
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;

    /* Better rendering in most browsers */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 3. Optional – nice button style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;                 /* space between icon and text */
    padding: 10px 16px;
    background: #1e88e5;
    color: white;
    border: none;
    border-radius: 6px;
    font-family: system-ui, sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background: #1565c0;
}

.btn:active {
    background: #0d47a1;
}

.preserve-newlines {
    white-space: pre-line;
}

/* 4. login styles */
/* Container itself */
.login-container {
    font-family: Arial, sans-serif;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 300px;
    margin: auto; /* Centers it if the parent is a flexbox or has width */
}

/* Headers inside the container */
.login-container h2 {
    margin-top: 0;
    color: #333;
    text-align: center;
}

/* Labels and groups */
.login-container .input-group {
    margin-bottom: 1rem;
}

.login-container label {
    display: block;
    font-size: 0.9rem;
    color: #666;
}

/* Inputs specifically within this container */
.login-container input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Crucial for keeping width at 100% */
}

/* The Submit Button */
.login-container button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.login-container button:hover {
    background-color: #0056b3;
}

/* Success/Error message text */
.login-container #message {
    font-size: 0.85rem;
    text-align: center;
    margin-top: 1rem;
}

/* All styles starting with the .sensor-grid scope */
.sensor-grid {
    /*display: flex;*/
    justify-content: space-between;
    gap: 15px;
    margin-top: 1.5rem;
}

.sensor-grid .sensor-item {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #eee;
    margin-top: 10px;
}

.sensor-grid .label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
}

.sensor-grid .value {
    font-size: 1.4rem;
    font-weight: 500;
}

.tiny-btn {
    padding: 2px 6px;
    font-size: 10px;
    line-height: 1;
    min-height: 16px;
    min-width: 16px;
    border: 1px solid #ccc;
    border-radius: 2px;
    background: #f5f5f5;
    cursor: pointer;
    font-family: system-ui, sans-serif;
}