body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f8ff; /* Light blue background */
    color: #333; /* Dark text for readability */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
}

/* Make the page stretch from header to footer */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background-color: #f0f8ff;
    color: #333;
}

/* Full–viewport vertical centering helper */
.center-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    text-align: center;
}

/* Header Bar */
.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #004080; /* Adjust to match your theme */
    color: white;
    padding: 5px 10px;
}

.logo {
    height: 40px;
}

.header-title {
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin: 0;
    text-align: center;
    flex-grow: 1;
}

.logout-button {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
}

.logout-button:hover {
    background-color: #e60000;
}

/* Menu Bar */
.menu-bar {
    display: flex;
    justify-content: left;
    background-color: #0066cc; /* Adjust to match your theme */
    padding: 10px 0;
    margin: 0;
}

.menu-link {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-size: 14px; /* Reduced from 18px by 30% */
    font-weight: bold;
}

.menu-link:hover {
    text-decoration: underline;
}

.login-button {
    background-color: rgb(200, 230, 235); /* Softer light blue to blend in */
    color: rgb(5, 75, 95); /* Match button text color with header */
    border: 2px solid rgb(5, 75, 95); /* Add border to match theme */
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s; /* Smooth hover effect */
}

.login-button:hover {
    background-color: rgb(5, 75, 95); /* Match hover background with header */
    color: white; /* Invert text color on hover */
}

.quit-button {
    background-color: rgb(200, 230, 235); /* Softer light blue to blend in */
    color: rgb(5, 75, 95); /* Match button text color with header */
    border: 2px solid rgb(5, 75, 95); /* Add border to match theme */
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s; /* Smooth hover effect */
}

.quit-button:hover {
    background-color: rgb(5, 75, 95); /* Match hover background with header */
    color: white; /* Invert text color on hover */
}

.view-button {
    display: inline-block;
    box-sizing: border-box; /* Ensure consistent sizing across browsers */
    width: 80px; /* Slightly increase width */
    height: 25px; /* Slightly increase height */
    padding: 0%; /* Adjust padding for better appearance */
    font-size: 20px; /* Slightly increase font size */
    color: #fff;
    background-color: #0073e6;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transform: scale(0.5) !important; /* Ensure the scaling is applied by overriding other styles */
    transform-origin: center; /* Keep the button centered while scaling */
}

.view-button:hover {
    background-color: #005bb5;
}

.refresh-button {
    display: inline-block;
    box-sizing: border-box; /* Ensure consistent sizing across browsers */
    #width: 80px; /* Slightly increase width */
    #height: 50px; /* Slightly increase height */
    font-size: 14px; /* Slightly increase font size */
    color: #fff;
    background-color: #0073e6;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    #transform: scale(0.5) !important; /* Ensure the scaling is applied by overriding other styles */
    transform-origin: center; /* Keep the button centered while scaling */
}

.refresh-button:hover {
    background-color: #005bb5;
}


/* Main content area fills remaining space */
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center; /* Center the welcome text on index.html */
}

/* Main content area fills remaining space */
.container_main {
    flex: 1;
    display: flow;
    flex-direction: column;
}

/* Meter‐status + table area */
.meter-readings-container {
    display: flow;
    padding: 10px 10px 10px 10px;    /* Padding around the meter status area */
    border-bottom: 25px; /* Add a bottom border to separate from footer */;
    gap: 1rem;
}
.meter-status-container {
    display: flow;
    padding: 10px 10px 10px 10px;    /* Padding around the meter status area */
    border-bottom: 25px; /* Add a bottom border to separate from footer */;
    gap: 1rem;
}

/* Tighter, full‐width meter status table */
.meter-status-table {
    width: 60%;
    border-spacing: 2px;
    border-collapse: collapse;
    font-size: 14px;
}
.meter-status-table td {
    padding: 2px 4px;
    white-space: nowrap;
    #font-size: 0.7em;  /* 70% of the inherited size */
}
.meter-status-table .spacer {
    width: 4px;
}

h1 {
    font-size: 3rem;
    color: #007acc; /* Blue color for the heading */
}

h2 {
    margin-top: 5px; /* Reduce top margin by 50% */
    margin-bottom: 5px; /* Reduce bottom margin by 50% */
}

p {
    font-size: 1.2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 5px 0;
    background-color: #f9f9f9;
    color: #666;
    font-size: 14px !important; /* Using pixels with !important to override other styles */
    position: fixed;
    bottom: 0;
    width: 100%;
    border-top: 1px solid #ddd;
}

footer p {
    font-size: 14px !important; /* Explicitly target the paragraph inside footer */
    margin: 0;
}

/* Form group to stack label and input vertically */
.form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
}

.form-group label {
    font-size: 1.2rem;
    color: rgb(5, 75, 95); /* Match theme color */
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 80%;
    max-width: 300px;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid rgb(5, 75, 95);
    border-radius: 5px;
}

/* Make the meter status buttons more subtle */
.meter-status-table button {
    min-width: 80px;
    padding: 5px 10px;
    background-color: #f0f8ff;
    color: #0066cc;
    border: 1px solid #0066cc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s, color 0.2s;
}

.meter-status-table button:hover {
    background-color: #e6f2ff;
    color: #004080;
}

/* Reduce text size of DataTable rows by 30% */
#myTable th,
#myTable td {
    font-size: 0.8em;  /* 70% of the inherited size */
    padding: 1px 1px !important; /* adjust to taste—set smaller or zero */
    text-align: center;
}

#myReadingsTable td {
    font-size: 0.8em;  /* 70% of the inherited size */
    padding: 2px 2px !important; /* adjust to taste—set smaller or zero */
    text-align: center;

}

#myReadingsTable th {
    padding: 0px 0px !important; /* adjust to taste—set smaller or zero */
    text-align: center;
}



#myReadingsTable_wrapper,
#myTable_wrapper {
    padding: 2px 2px !important; /* adjust to taste—set smaller or zero */
}


/* Center the “Meter Status” heading */
.meter-status-box {
    background-color: #f8f8f8; /*  */
}
/* Center the “Meter Status” heading */
.meter-status-box h3 {
    text-align: center;
    margin: 2 auto;   /* optional: center block if you changed its width */
}
/* Center the polling Status” heading */
.polling-sites-box h3 {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 0px; /* Remove bottom margin */
}

/* Meter details table styling */
.meter-details-container {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.meter-details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-column {
    width: 50%;
    vertical-align: top;
    padding: 15px;
    border: 1px solid #ddd;
}

.details-column h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 5px;
}

.detail-row {
    margin-bottom: 1px;
    padding: 1px 0;
}

.detail-row strong {
    display: inline-block;
    width: 120px;
    color: #555;
    font-size: 14px;
}

.detail-row span {
    color: #333;
    font-weight: normal;
    font-size: 14px;

}



/* hanchu  styling */

.hanchu-button {
    display: block;
    margin: 0 auto; /* Centers the button horizontally */

    /* background-color: rgb(235, 67, 12); *//* Softer light blue to blend in */
    border: 2px solid rgb(5, 75, 95); /* Add border to match theme */
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s; /* Smooth hover effect */
}

.login-button:hover {
    background-color: rgb(5, 75, 95); /* Match hover background with header */
    color: white; /* Invert text color on hover */
}
