/* ================= HEADER ================= */
header {
    background: #333333c2;
    color: #fff;
    padding: 10px 0;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.logo a {
    text-decoration: none;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

.navbar {
    display: flex;
}

.navbar ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.navbar ul li {
    margin-left: 20px;
}

.navbar ul li a {
    text-decoration: none;
    color: #fff;
    font-size: 16px;
    transition: color 0.3s;
}

.navbar ul li a:hover {
    color: #7a9cf7;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
    transition: all 0.3s;
}

/* ================= GENERAL ================= */
body {
    font-family: Arial, sans-serif;
    padding: 20px 0;
    background-color: #e5e6e6;
    margin-top: 60px; /* To avoid overlap with fixed header */
}

.container {
    width: 500px;
    margin: 150px auto;
    padding: 20px;
    background-color: #e3e3e3;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 10px 10px 0px 0px rgb(157 115 115 / 10%);
}

h1, h3 {
    text-align: center;
    margin: 10px 0;
}

form {
    margin-top: 30px;
}

label {
    display: block;
    margin-bottom: 10px;
    padding-left: 8px;
}

input[type="text"] {
    width: 94%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 10px;
    margin-bottom: 10px;
}

button[type="submit"] {
    margin-top: 20px;
    width: 100%;
    padding: 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

button[type="submit"]:hover {
    background-color: #0062cc;
}

p {
    margin-top: 20px;
    text-align: center;
}

p a {
    color: #007bff;
    text-decoration: none;
}

p a:hover {
    text-decoration: underline;
}

.container img {
    display: block;
    margin: 0 auto;
    padding: 10px 0;
}

/* ================= INFO SECTIONS ================= */
.consumer-info, .recharge-history, .chart-info {
    background-color: #fff;
    border: 1px solid #801b1b;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.info-row {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr 3fr;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.info-row span:first-child,
.info-row span:nth-child(3) {
    font-weight: bold;
}

.info-panel {
    background-color: #004a99;
    color: white;
    padding: 20px;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 10px;
    text-align: center;
    overflow-x: auto;
}

.info-panel p {
    margin: 5px 0;
}

.blue { background-color: #007bff; }
.purple { background-color: #6f42c1; }
.orange { background-color: #fd7e14; }
.green { background-color: #28a745; }
.red { background-color: #dc3545; }

#firstPannel {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 0;
    justify-content: center;
    width: 100%;
    box-shadow: 0 4px 8px rgba(232, 224, 224, 0.1);
    overflow-x: auto;
    background-color: #ffffff;
}

.details-button {
    background-color: #017bfe;
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
}

.details-button:hover {
    background-color:#8c1ee978;
    transform: scale(1.2);
}

/* ================= TABLE ================= */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: center;
    padding: 8px;
    border-bottom: 1px solid #f96363;
}

th {
    background-color: #9d6efa;
    color: white;
}

/* ================= LOGOUT BUTTON ================= */
#logoutButton {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #f44336;
    color: white;
    padding: 10px 10px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

#logoutButton:hover {
    transform: scale(1.1);
}

/* ================= TITLE SECTION ================= */
#title {
    text-align: center;
}

#title h1 {
    font-size: 40px;
    background-color: #69a0da;
}

#title img {
    width: 97%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(232, 224, 224, 0.1);
}


.charts-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* On desktop: make the charts sit side-by-side */
@media (min-width: 768px) {
    .charts-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .chart-info {
        flex: 1;
    }
}


.chart-wrapper {
    width: 100%;
    margin: 20px 0;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #801b1b;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(232, 224, 224, 0.1);
    overflow-x: auto;
}


.chart-wrapper canvas {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
}


.total {
    margin: 30px 0;
}

.close-button {
    position: absolute;
    top: 205%;
    right: 605px;
    cursor: pointer;
    color: rgb(244, 7, 7);
    z-index: 2000;
}

.left {
    text-align: left;
}

.details-content p {
    text-align: left;
    font-size: 16px;
    color: #040404;
    margin: 10px 0;
    line-height: 1.4;
}

/* ================= FOOTER ================= */
footer {
    background: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin: 10px;
}

.footer-section h2 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #f0f0f0;
}

.footer-section p, .footer-section ul {
    font-size: 14px;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #b3b3b3;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #8f8ffc;
}

.footer-bottom {
    background: #be90eb;
    padding: 10px 0;
    font-size: 12px;
}

.footer-bottom p {
    margin: 0;
}

/* ================= MODAL ================= */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-radius: 10px;
    position: relative;
}

.closeBtn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.closeBtn:hover,
.closeBtn:focus {
    color: black;
    text-decoration: none;
    transform: scale(1.1);
}

.full {
    display: flex;
    gap: 20px;
    padding: 2px 2px;
    border: 1px solid #801b1b;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    flex-wrap: wrap;
}

.con1 {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 5px 0;
    width: 100%;
    max-width: auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.44);
    overflow-x: auto;
    border-radius: 10px;
}


/* Optional: Prevent horizontal scroll from the body */
/* body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
} */



/* ================= MEDIA QUERIES ================= */
@media (max-width: 768px) {
    .navbar ul {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .container {
        width: 100%;
        padding: 15px 0;
    }

    .info-row {
        grid-template-columns: 1fr 1fr;
    }

    .footer-container {
        flex-direction: column;
    }

    .modal-content {
        width: 90%;
        max-width: none;
    }

    .info-panel {
        flex: 1 0 45%;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px 0;
    }

    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar ul {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .container {
        margin-top: 30px;
        width: 100%;
    }

    .footer-container {
        flex-direction: column;
    }
}
