*{
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}
.header{
    min-height: 100vh;
    width: 100%;
    background-image: linear-gradient(rgba(8, 25, 80, 0.7),rgba(8, 25, 80, 0.7)),url(img/bg8.jpg);
    background-position: center;
    background-size: cover;
    position: relative;
}
.header img{
    padding: 10px;
    height: 100px;
}
hr {
    border: 0;
    height: 1px;
    background-color: grey; 
    opacity: 0.3; 
}


/*------------Index-----------*/
.login {
    display: flex; 
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding-top: 100px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    gap: 10px;
}
.map-container {
    flex: 1; 
    max-width: 600px; 
    height:525px; 
    border: 2px solid rgba(255, 255, 255, .2);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, .2);
}
.wrapper {
    width: 410px;
    max-width: 90%; 
    background: transparent;
    border: 2px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 10px rgba(0, 0, 0, .2);
    color: #fff;
    border-radius: 10px;
    padding: 30px 30px;
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    min-height: 57vh;
}
form .input-box .text{
    text-transform: uppercase;
}
form img {
    display: block;
    margin: 0 auto;
    max-width: 125px;
}
.wrapper h2 {
    text-align: center;
}
.wrapper .input-box {
    position: relative;
    width: 100%;
    height: 50px;
    margin: 30px 0;
}
.input-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    border: 2px solid rgba(255, 255, 255, .2);
    border-radius: 40px;
    font-size: 16px;
    color: #fff;
    padding: 10px 45px 10px 20px; 
    box-sizing: border-box; 
    max-width: 100%; 
}
.input-box input::placeholder {
    color: #fff;
}
.input-box i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}
.wrapper .btn {
    width: 100%;
    height: 45px;
    background: #01053d;
    border: none;
    outline: none;
    border-radius: 40px;
    box-shadow: 0 0 10px rgba(197, 178, 178, 0.1);
    cursor: pointer;
    font-size: 16px;
    color: #ffffff;
    font-weight: 600;
}
.wrapper .btn:hover {
    background: #1320d1;
    color: #fff;
}
.center-text {
    text-align: center;
}
.show-password-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}


/*------------Homepage-----------*/
*{
    margin: 0;
    padding: 0;
	box-sizing: border-box;
}
a {
	text-decoration: none;
}
li {
	list-style: none;
}
.homepage {
    /* background-image: linear-gradient(rgba(8, 25, 80, 0.7),rgba(8, 25, 80, 0.7)),url(img/bg2.jpg); */
    background-image: url(img/bg2.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 100vh;
    overflow-x: hidden;
}


/*------------Sidebar-----------*/
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: linear-gradient(to bottom, #00001a 10%, #224abe 100%); 
    z-index: 2000;
    font-family: var(--poppins);
    transition: .3s ease;
    overflow-x: hidden;
    padding-bottom: 20px;
    color: #fff;
    padding-top: 20px;
    cursor: pointer;
}
#sidebar::--webkit-scrollbar {
    display: none;
}
#sidebar.hide {
    width: 60px;
}
#sidebar.hide .text {
    opacity: 0;
    pointer-events: none;
}
#sidebar a i:first-child {
    margin-right: 10px; 
    
}
#sidebar.hide a {
    text-align: center;
}


/* Brand Section */
#sidebar .brand {
    font-size: 24px;
    font-weight: 700;
    height: 60px;
    display: flex;
    align-items: center;
    padding-left: 20px;
    z-index: 500;
}
#sidebar .brand .fas {
    min-width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    color: #fff;
    font-size: 2.3rem; 
    transform: rotate(-20deg);
    padding: auto;

}
#sidebar .brand .text {
    color: #fff;
    font-size: 18px;
    display: flex; 
    justify-content: flex-start;
    align-items: center; 
    text-align: center; 
    height: 100%; 
    width: auto;
}
#sidebar .brand:hover {
    background-color: transparent;
    color: #fff;
    text-align: center;
}
/* Links in Sidebar */
#sidebar a {
    text-decoration: none;
    font-size: 16px;
    padding: 12px 15px;
    transition: background-color 0.3s ease;
    display: block;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    font-size: 15px;
}
/* Sidebar Link Hover Effect */
#sidebar a:hover {
    background-color: rgba(155, 167, 207, 0.7);
    border-radius: 5px;
}

/* Sidebar Menu */
.sidebar-content {
    display: none;
    margin: 10px 15px;
    padding: 15px;
    background: rgb(255, 255, 255);
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); 
    border: 1px solid rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
/* Visible content when active */
.sidebar-content.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
/* Hide text when sidebar is collapsed */
#sidebar.hide .text {
    display: none;
}
/* Ensure icons are visible in collapsed mode */
#sidebar.hide a i {
    display: inline-block;
    font-size: 1.5rem;
    text-align: center;
    margin: 0 auto;
}
/* Center icons in collapsed mode */
#sidebar.hide a {
    text-align: center;
    padding: 10px 0;
}

/* Styling links under Heatmap and Graph */
.sidebar-content a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin: 8px 0;
    padding: 8px 10px;
    background: rgba(8, 25, 80, 0.7);
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    transition: background-color 0.3s ease, color 0.3s ease;
}
#sidebar .sidebar-content a:hover {
    color: #224abe;
    background-color: rgba(155, 167, 207, 0.7);
    border-radius: 5px;
}
/* Highlight the active menu item */
#sidebar a.active {
    background-color: rgba(155, 167, 207, 0.7);
    border-radius: 10px;
}

/* Logout Section */
#sidebar .side-menu {
    position: absolute;
    bottom: 20px;
    width: 100%;
}
#sidebar .side-menu li {
    margin-top: 10px;
}
/* Hide confirmation dialog by default */
.modal {
    display: none;
}
/* Logout Link */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.modal-content h3 {
    margin: 0;
    color: #333;
}
.modal-content p {
    margin: 10px 0;
    color: #555;
}
.modal-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}
.modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}
#confirm-logout {
    background: #d9534f;
    color: white;
}
#confirm-logout:hover {
    background: #c9302c;
}
#cancel-logout {
    background: #5bc0de;
    color: white;
}
#cancel-logout:hover {
    background: #31b0d5;
}

/* Responsive for smaller screens */
@media (max-width: 768px) {
    #sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    #sidebar .brand {
        padding-left: 10px;
        padding-top: 10px;
    }

    #sidebar a {
        font-size: 14px;
        padding: 8px 10px;
    }
}
/*------------Sidebar-----------*/


/*------------Content-----------*/
#content {
	position: relative;
	width: calc(100% - 280px);
	left: 280px;
	transition: .3s ease;
}
#sidebar.hide ~ #content {
	width: calc(100% - 60px);
	left: 60px;
}
/*------------Content-----------*/

/*------------Navbar-----------*/
#content nav {
    height: 45px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    grid-gap: 24px;
    font-family: 'Poppins', sans-serif;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 1000;
}
#content nav::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    bottom: -50px;
    left: 0;
    border-radius: 50%;
}
#content nav h1 {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 25px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4); 
}
#content .bx {
    color: #fff;
    cursor: pointer;
}
/* Dropdown Styling */
#content .station-dropdown {
    margin-left: auto; 
    margin-top: 3px;  
    padding: 10px -10px;
}
#content .station-dropdown select {
    padding: 2px 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
    width: 150px;
}
/*------------Navbar-----------*/

/*------------Main-----------*/
/* Content Row */
.row {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 20px;
}
/* Card Styling */
.card {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 20px;
    margin: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 calc(20% - 40px); /* Adjusts for 5 cards */
    min-width: 200px;
    max-width: 300px;
}
.card:nth-child(1) {
    border-left: 5px solid #007BFF; /* Blue */
}
.card:nth-child(2) {
    border-left: 5px solid #28A745; /* Green */
}
.card:nth-child(3) {
    border-left: 5px solid #FFC107; /* Yellow */
}
.card:nth-child(4) {
    border-left: 5px solid #DC3545; /* Red */
}
.card:nth-child(5) {
    border-left: 5px solid #6F42C1; /* Purple */
}
.card .text {
    font-weight: bold;
    font-size: 15px;
    color: #555;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.card i {
    font-size: 24px;
    color: #555;
    margin-left: 10px; /* Space between text and icon */
}
.card div {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    text-align: left;
    margin-top: auto;
}
.card-content {
    display: flex;
    flex-direction: column;
}

/* Map Section */
.map-heading {
    text-align: center;
    font-size: 22px;
    margin: 20px;
    padding: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
    padding: 10px;
    background: linear-gradient(180deg, #001133 10%, #258391);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-style: italic; 
}
/* Map container */
.map-frame {
    width: 100%; 
    max-width: 1600px; 
    height: 600px;
    margin: 0 auto; 
    border-radius: 10px;
    overflow: hidden;
    margin: 10px;
    padding: 10px;
}
/* Map iframe */
.map-frame iframe {
    width: 100%;
    height: 600px;
    border: none; 
    margin-left: auto; 
}
/* Footer */
.footer {
    display: flex;
    justify-content: center; 
    align-items: center; 
    color: #fff;
    margin-top: 5px; 
    padding: 5px; 
    font-size: 10px;
}
/*------------Main-----------*/


/*------------Heatmap-----------*/
.temperature {
    background-image: linear-gradient(rgba(255, 57, 8, 0.3),rgba(31, 8, 3, 0.3)),url(img/bg10.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 100vh;
    overflow-x: hidden;
}
.rainfall {
    background-image: linear-gradient(rgba(8, 25, 80, 0.3),rgba(1, 3, 10, 0.3)),url(img/bg8.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 100vh;
    overflow-x: hidden;
}
.humidity {
    background-image: linear-gradient(rgba(199, 139, 9, 0.3),rgba(19, 13, 2, 0.3)),url(img/bg13.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 100vh;
    overflow-x: hidden;
}
.water {
    background-image: linear-gradient(rgba(8, 25, 80, 0.3),rgba(1, 3, 10, 0.3)),url(img/bbg7.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 100vh;
    overflow-x: hidden;
}
.river {
    background-image: linear-gradient(rgba(13, 92, 138, 0.3),rgba(0, 0, 0, 0.3)),url(img/bg11.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 100vh;
    overflow-x: hidden;
}
.gradient-div {
    width: 28%;
    text-align: center;
    margin-top: 60px;
}
.gradient-div img {
    width: 100%;
    max-width: 300px;
    height: auto;
} 
.mapdiv {
    width: 76.8%;
    margin: auto;
} 
.mapdiv path {
    fill: #262626;
    stroke: #fff ;
    stroke-width: 1px;
    transition: fill 0.3s, stroke 0.3s;
}
.mapdiv path:hover {
    fill: #262626  ;
    stroke: #dece0c;
    stroke-width: 3px;
}
/*------------Heatmap-----------*/

/*------------Graph-----------*/
.graphchart {
    background-image: linear-gradient(rgba(13, 92, 138, 0.3),rgba(0, 0, 0, 0.3)),url(img/bg5.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 100vh;
    overflow-x: hidden;
}
/* Chart Area */
.chart-area {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    text-align: center;
    margin: 15px 20px;
    width: 97%;
    max-height: 800px;
}
/* Buttons */
.btn {
    background-color: #00001a;
    color: white;
    padding: 5px 16px;
    margin: 3px; 
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.btn:hover {
    background-color: #2a96a5;
    transform: scale(1.05);
}

/* In style.css, replace your existing .chart-area and .chart-container rules */

.chart-area {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 15px 20px;
    width: calc(100% - 40px);
    
    /* Flexbox settings to control layout */
    display: flex;
    flex-direction: column;
    /* This is the key fix: it forces the controls and chart to be full-width */
    align-items: stretch; 
}

.chart-container {
    /* This makes the chart's container fill all remaining vertical space */
    flex-grow: 1; 
    position: relative;
    min-height: 400px; /* Ensures the chart has a minimum size */
}

/* This rule should already exist, but ensure it's there */
#temperatureChart {
    width: 100%;
    height: 100%;
}
.record-selectors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    color: black;
}

.record-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}
