﻿/* =========================================================
   PHED CONSUMER DASHBOARD
========================================================= */

body {
    background: #f7f8fa;
    color: #111827;
}

.consumer-dashboard {
    width: 100%;
    max-width: 2117px;
    margin: 0 auto 40px;
    padding: 0 38px 25px;
}


/* =========================================================
   HEADER
========================================================= */

.dashboard-header {
    min-height: 135px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 3px solid #ff7a00;
    border-bottom: 1px solid #e6e6e6;
    background: #fff;
    margin-left: -38px;
    margin-right: -38px;
    padding: 15px 40px;
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 22px;
}

.water-logo {
    width: 72px;
    height: 82px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1685d1;
    font-size: 62px;
}

.dashboard-brand h1 {
    margin: 0 0 8px;
    color: #052752;
    font-size: 34px;
    line-height: 1;
    font-weight: 800;
}

.welcome-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-circle {
    width: 40px;
    height: 40px;
    border: 2px solid #ff8a1d;
    color: #ff8a1d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
}

.welcome-row h4 {
    margin: 0;
    font-weight: 700;
    font-size: 19px;
}

.account-info {
    margin-top: 4px;
    font-size: 14px;
    color: #333;
}

    .account-info .divider {
        margin: 0 10px;
        color: #999;
    }

.logout-btn {
    text-decoration: none;
    background: #ed2117;
    color: #fff;
    padding: 11px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(237,33,23,.18);
}

    .logout-btn:hover {
        background: #d91a12;
        color: white;
    }


/* =========================================================
   SUMMARY
========================================================= */

.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
    margin-top: 12px;
}

.summary-card {
    background: white;
    min-height: 100px;
    border: 1px solid #e5e5e5;
    border-radius: 13px;
    display: flex;
    align-items: center;
    padding: 12px 24px;
    gap: 20px;
    box-shadow: 0 2px 7px rgba(0,0,0,.08);
}

.summary-icon {
    min-width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 1.5px solid #ff7a00;
    color: #ff7200;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    background: #fffaf5;
}

.summary-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
}

.summary-value {
    font-size: 29px;
    line-height: 1;
    font-weight: 800;
    color: #080808;
}

.summary-date {
    font-size: 23px;
}


/* =========================================================
   STATUS
========================================================= */

.bill-status {
    display: inline-block;
    margin-top: 4px;
    border-radius: 8px;
    padding: 6px 17px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.status-paid {
    background: #22a447;
}

.status-partial {
    background: #f59e0b;
}

.status-unpaid {
    background: #ef3028;
}

.status-no-bill {
    background: #6b7280;
}


/* =========================================================
   GENERAL SECTION
========================================================= */

.dashboard-section {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 13px;
    box-shadow: 0 2px 7px rgba(0,0,0,.07);
    padding: 15px 20px 17px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 11px;
}

    .section-heading > span {
        width: 5px;
        height: 25px;
        border-radius: 10px;
        background: #ff6e00;
    }


/* =========================================================
   BILL + USAGE
========================================================= */

.main-information-grid {
    display: grid;
    grid-template-columns: 36% 64%;
    gap: 20px;
    margin-top: 13px;
}

.bill-detail-row,
.reading-row,
.consumer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dedede;
    padding: 9px 5px;
    font-size: 15px;
}

    .bill-detail-row strong {
        font-weight: 700;
    }

.payable-row {
    font-size: 16px;
    font-weight: 700;
}

    .payable-row strong {
        color: #ff6400;
        font-size: 21px;
    }

.bill-buttons {
    display: flex;
    justify-content: center;
    gap: 35px;
    margin-top: 13px;
}

.outline-action-btn,
.primary-action-btn {
    min-width: 165px;
    border-radius: 6px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: .2s;
}

.outline-action-btn {
    border: 1px solid #ff6f00;
    color: #ff6500;
    background: white;
}

    .outline-action-btn:hover {
        background: #fff5ed;
        color: #ff6500;
    }

.primary-action-btn {
    border: none;
    background: linear-gradient(135deg,#ff8700,#ff5800);
    color: white;
}

    .primary-action-btn:hover {
        color: white;
        transform: translateY(-1px);
    }

.paid-button {
    background: #21a649;
}

.water-grid {
    display: grid;
    grid-template-columns: 35% 65%;
    min-height: 255px;
}

.water-reading-list {
    border-right: 1px solid #e0e0e0;
    padding-right: 18px;
}

.usage-chart-container {
    padding-left: 25px;
    height: 255px;
}

.chart-title {
    text-align: center;
    margin-bottom: 5px;
    font-size: 13px;
    color: #444;
}

.normal-reading {
    color: #109336;
}

.reading-warning {
    color: #e57b00;
}


/* =========================================================
   QUICK SERVICES
========================================================= */

.quick-service-section {
    margin-top: 13px;
}

.quick-service-grid {
    display: grid;
    grid-template-columns: repeat(6,1fr);
    gap: 24px;
}

.quick-service-card {
    height: 94px;
    border: 1px solid #d8d8d8;
    border-radius: 7px;
    text-decoration: none;
    color: #111;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 9px;
    transition: .2s;
}

    .quick-service-card i {
        color: #1672c7;
        font-size: 35px;
    }

        .quick-service-card i.orange {
            color: #ff6f00;
        }

    .quick-service-card:hover {
        transform: translateY(-3px);
        color: #111;
        border-color: #ff8c2f;
        box-shadow: 0 6px 13px rgba(0,0,0,.09);
    }


/* =========================================================
   BOTTOM SECTION
========================================================= */

.bottom-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 13px;
}

.consumer-details-grid {
    display: grid;
    grid-template-columns: 58% 42%;
}

    .consumer-details-grid > div:first-child {
        padding-right: 20px;
    }

.consumer-right-column {
    padding-left: 20px;
    border-left: 1px solid #dedede;
}

.consumer-row span {
    color: #222;
}

.consumer-row strong {
    max-width: 65%;
    text-align: right;
    font-size: 14px;
}


/* =========================================================
   PAYMENT TABLE
========================================================= */

.payment-table-wrapper {
    overflow-x: auto;
}

.dashboard-payment-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #d5d5d5;
    border-radius: 6px;
    overflow: hidden;
}

    .dashboard-payment-table th {
        background: #f0f0f0;
        text-align: center;
        padding: 7px;
        border-right: 1px solid #d5d5d5;
        font-size: 14px;
    }

    .dashboard-payment-table td {
        text-align: center;
        padding: 7px;
        border-top: 1px solid #d5d5d5;
        border-right: 1px solid #d5d5d5;
        font-size: 14px;
    }

.payment-paid {
    background: #d8f5dd;
    color: #159134;
    border: 1px solid #9ed8ab;
    padding: 2px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}

.no-payment {
    padding: 25px !important;
    color: #888;
}

.payment-view-all {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}


/* =========================================================
   NOTIFICATIONS
========================================================= */

.notification-section {
    min-height: 65px;
    margin-top: 14px;
    background: #fffcf5;
    border: 1px solid #ded9ce;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    padding: 7px 30px;
    gap: 35px;
}

.notification-title {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 260px;
    border-right: 1px solid #bbb;
    font-size: 18px;
}

.notification-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 1px solid #ff7b00;
    color: #ff7900;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.notification-message {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
}

.notification-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff6d00;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1200px) {

    .dashboard-summary-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .main-information-grid {
        grid-template-columns: 1fr;
    }

    .quick-service-grid {
        grid-template-columns: repeat(3,1fr);
    }
}


@media (max-width: 800px) {

    .consumer-dashboard {
        padding: 0 15px 20px;
    }

    .dashboard-header {
        margin-left: -15px;
        margin-right: -15px;
        padding: 20px;
    }

    .dashboard-brand h1 {
        font-size: 24px;
    }

    .dashboard-summary-grid {
        grid-template-columns: 1fr;
    }

    .bottom-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .quick-service-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .water-grid {
        grid-template-columns: 1fr;
    }

    .water-reading-list {
        border-right: none;
        padding-right: 0;
    }

    .usage-chart-container {
        padding-left: 0;
        margin-top: 20px;
    }

    .notification-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .notification-title {
        width: 100%;
        border-right: none;
    }
}

.usage-chart-container {
    padding-left: 25px;
    height: 255px;
    position: relative;
}

    .usage-chart-container canvas {
        width: 100% !important;
        height: 220px !important;
    }

.chart-title {
    text-align: center;
    margin-bottom: 5px;
    font-size: 13px;
    color: #444;
}


/* =========================================================
   PAYMENT PIE CHART
========================================================= */

.payment-dashboard-content {
    display: grid;
    grid-template-columns: 32% 68%;
    gap: 18px;
    align-items: center;
}


.payment-chart-box {
    min-width: 0;
    text-align: center;
    border-right: 1px solid #e2e2e2;
    padding-right: 16px;
}


.payment-chart-title {
    font-size: 13px;
    font-weight: 700;
    color: #444;
    margin-bottom: 5px;
}


.payment-chart-canvas {
    position: relative;
    height: 180px;
    width: 100%;
}


    .payment-chart-canvas canvas {
        width: 100% !important;
        height: 180px !important;
    }


.payment-list-box {
    min-width: 0;
}


@media (max-width: 900px) {

    .payment-dashboard-content {
        grid-template-columns: 1fr;
    }

    .payment-chart-box {
        border-right: none;
        border-bottom: 1px solid #e2e2e2;
        padding-right: 0;
        padding-bottom: 15px;
    }
}

.officer-login-page,
.admin-portal-page,
.show-bill-page {
    width: 94%;
    max-width: 1450px;
    margin: 25px auto;
}


.officer-login-card,
.admin-card,
.show-bill-card {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 3px 12px rgba(0,0,0,.07);
}


.officer-login-card {
    max-width: 450px;
    margin: 60px auto;
}


.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}


.bill-search-row {
    display: flex;
    gap: 10px;
}


.bill-result-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #ddd;
    padding: 10px 5px;
}


@media (max-width: 800px) {

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .bill-search-row {
        flex-direction: column;
    }
}