:root {
    --main-bg-color: #FFF3E2;
    --panel-bg-color: #e6f0f5;
    --container-bg-color: #FF8C42;
    --text-color: #333;
    --button-color: #0275d8; /* Blue for online */
    --offline-color: #dc3545; /* Red for offline */
    --offline-light-orange: #fbd2ac;
    --clicked-color: #FF8C42; /* Orange for clicked state */
    --light-orange: #FFB380;
}

body {
    background-color: var(--main-bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
    font-family: Arial, sans-serif;
    padding: 0 5%;
    padding-top: 60px; /* Adjust this value based on your navbar height */
}

.main-content {
    display: flex;
    flex-grow: 1;
    justify-content: space-between;
    margin-top: 20px;
}

.left-panel {
    flex: 0 0 20%;
    min-width: 200px;
    max-width: 300px;
    background-color: var(--panel-bg-color);
    margin-left: 5%;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.left-panel h2 {
    margin-bottom: 20px;
    font-size: clamp(0.8rem, 1.5vw + 0.3rem, 1.4rem);
    color: var(--button-color);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.device-button-container {
    display: flex;
    width: 100%;
    margin-bottom: 10px;
}

.device-button {
    display: block;
    padding: 10px;
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.device-button.main-button {
    flex: 0 0 92%;
    margin-right: 0;
    border-radius: 5px 0 0 5px;
}

.device-button.main-button.online {
    background-color: var(--button-color);
}

.device-button.main-button.offline {
    background-color: var(--offline-color);
}

.device-button.t-button {
    flex: 0 0 8%;
    background-color: white;
    color: black;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 0 5px 5px 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
}

.device-button.t-button:hover {
    background-color: black;
}

.device-button.t-button[data-icon="trash"] {
    background-image: url(#trash-icon);
}

.device-button:hover {
    transform: translateY(-2px);
}

.container {
    flex: 1;
    margin-right: 5%;
    margin-left: 2%;
    background-color: var(--container-bg-color);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gridHeader {
    padding-bottom: 15px;
    padding-top: 15px;
    font-size: 2em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.button-group button {
    background-color: var(--button-color);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.button-group button:hover {
    transform: translateY(-2px);
}

.clicked {
    background-color: var(--clicked-color) !important;
}

.light-orange-clicked {
    background-color: var(--light-orange) !important;
}

.grid-container {
    background: var(--panel-bg-color);
    border-radius: 0 0 10px 10px;
    padding: 20px;
}

.grid-row {
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.grid-item {
    background-color: #f8f9fa;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.grid-item img {
    max-height: 100%;
    width: auto;
    cursor: pointer;
}

.expanded-row {
    height: 240px;
    margin-bottom: 24px;
    margin-top: 24px;
}

.expanded-row .grid-item {
    height: 240px;
}

.offline-indicator {
    font-style: italic;
    font-family: 'Alegreya';
    font-size: 0.8em;
    color: var(--offline-light-orange);
    margin-left: 10px;
}

.frequency-select {
    width: 100%;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ced4da;
    font-size: 1em;
}

.grid-header {
    background-color: var(--button-color);
    color: white;
    font-weight: bold;
    padding: 10px 0;
    border-radius: 5px 5px 0 0;
    margin-bottom: 10px;
}

.grid-header div {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5px;
}