:root {
    --bg-color: #edf0e5;
    --sidebar-color: #557255;
    --content-bg: #fff;
}

body {
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 300px;
    background-color: var(--sidebar-color);
    color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo-container img {
    max-width: 150px;
    height: auto;
    filter: invert(1);
}

.search-box {
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.9);
}

.machines-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.machine-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background-color 0.2s;
    color: white;
    text-decoration: none;
    display: block;
}

.machine-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.machine-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-left: 4px solid white;
}

.machine-item .machine-id {
    font-weight: bold;
    font-size: 0.9rem;
}

.machine-item .machine-user {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.welcome-message {
    background-color: var(--content-bg);
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 2rem;
}

.welcome-message h1 {
    color: var(--sidebar-color);
    margin-bottom: 1rem;
}

.date-range-selector {
    background-color: var(--content-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.date-range-selector > label {
    font-weight: bold;
}

.date-range-selector form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
}

.date-range-selector .date-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-range-selector .date-input-group label {
    white-space: nowrap;
    font-weight: normal;
}

/* Override Bulma success button color */
.button.is-success {
    background-color: #557255;
    border-color: transparent;
}

.button.is-success:hover {
    background-color: #486347;
    border-color: transparent;
}

.tag:not(body).is-success {
    background-color: #557255;
}


.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-container {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
}

.chart-title {
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--sidebar-color);
}

.table-container {
    background-color: var(--content-bg);
    padding: 2rem;
    border-radius: 8px;
    overflow: auto;
}

.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.table-container {
    scrollbar-width: auto;
    scrollbar-color: #bbb #f0f0f0;
}

.table-container h2 {
    color: var(--sidebar-color);
    margin-bottom: 1rem;
}

.table {
    width: 100%;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.table thead th:first-child {
    border-top-left-radius: 8px;
}

.table thead th:last-child {
    border-top-right-radius: 8px;
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

.table thead {
    background-color: white;
    color: black;
}

.table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Scrollbar styling */
.machines-list::-webkit-scrollbar,
.main-content::-webkit-scrollbar {
    width: 8px;
}

.machines-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.machines-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.machines-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.tag.has-tooltip {
    cursor: help;
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: 300px;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}