* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0878e8;
    --primary-dark: #0759ad;
    --success: #16a34a;
    --danger: #dc2626;
    --text-dark: #172033;
    --text-light: #667085;
    --background: #eef6ff;
    --white: #ffffff;
    --border: #dbe5f0;
}

body {
    font-family: Arial, sans-serif;
    background: var(--background);
    color: var(--text-dark);
}

.login-page {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;

    background:
        linear-gradient(
            135deg,
            #063c72,
            var(--primary)
        );
}

.login-card {
    width: 100%;
    max-width: 420px;

    background: var(--white);

    padding: 40px 30px;

    border-radius: 18px;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.18);
}

.brand {
    text-align: center;
    margin-bottom: 35px;
}

.water-icon {
    font-size: 55px;
    margin-bottom: 10px;
}

.brand h1 {
    color: var(--primary-dark);
    font-size: 34px;
    margin-bottom: 6px;
}

.brand p {
    color: var(--text-light);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    font-weight: bold;
    font-size: 14px;
}

.form-group input {
    width: 100%;

    padding: 14px 15px;

    border: 1px solid var(--border);
    border-radius: 8px;

    font-size: 16px;

    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

.login-btn {
    width: 100%;

    padding: 15px;

    border: none;
    border-radius: 8px;

    background: var(--primary);
    color: var(--white);

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;
}

.login-btn:hover {
    background: var(--primary-dark);
}

.connection-status {
    margin-top: 25px;

    display: flex;
    justify-content: center;
    align-items: center;

    gap: 8px;

    color: var(--text-light);
    font-size: 14px;
}

.status-dot {
    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: var(--success);
}

.app-footer {
    margin-top: 30px;

    text-align: center;

    color: var(--text-light);
    font-size: 12px;
}
/* ==========================================
   ATTENDANT DASHBOARD
========================================== */

.dashboard-page {
    display: none;
    min-height: 100vh;
    background: #f5f8fc;
}

.app-header {
    background: var(--primary-dark);
    color: var(--white);

    padding: 18px 5%;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h2 {
    font-size: 24px;
}

.app-header p {
    margin-top: 4px;
    font-size: 13px;
    opacity: 0.8;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 7px;

    background: rgba(255, 255, 255, 0.12);

    padding: 8px 12px;
    border-radius: 20px;

    font-size: 13px;
}

.dashboard-status-dot {
    width: 9px;
    height: 9px;

    background: var(--success);
    border-radius: 50%;
}


.dashboard-container {
    width: 100%;
    max-width: 900px;

    margin: 0 auto;
    padding: 25px 20px 50px;
}


.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 30px;
}

.welcome-section p {
    color: var(--text-light);
    margin-bottom: 3px;
}

.logout-btn {
    padding: 9px 15px;

    border: 1px solid var(--border);
    border-radius: 7px;

    background: var(--white);
    color: var(--danger);

    cursor: pointer;
}


.summary-section h2,
.sales-section h2 {
    margin-bottom: 15px;
    font-size: 20px;
}


.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 15px;
    margin-bottom: 35px;
}


.summary-card {
    background: var(--white);

    padding: 20px;

    border-radius: 12px;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.06);
}

.summary-card span {
    display: block;

    color: var(--text-light);

    font-size: 13px;
    margin-bottom: 10px;
}

.summary-card strong {
    color: var(--primary-dark);
    font-size: 22px;
}


.sale-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 20px;
    margin-bottom: 25px;
}


.sale-btn {
    min-height: 170px;

    border: none;
    border-radius: 15px;

    color: var(--white);

    cursor: pointer;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    gap: 8px;

    transition: 0.2s;
}

.sale-btn:hover {
    transform: translateY(-3px);
}

.ten-litre-btn {
    background: var(--primary);
}

.twenty-litre-btn {
    background: var(--success);
}

.sale-icon {
    font-size: 32px;
}

.sale-btn strong {
    font-size: 22px;
}

.sale-btn span:last-child {
    font-size: 16px;
}


.action-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 12px;
}


.action-btn {
    padding: 15px 10px;

    border: none;
    border-radius: 9px;

    background: var(--white);

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.06);

    color: var(--text-dark);
    font-weight: bold;

    cursor: pointer;
}

.credit-btn {
    border-bottom: 4px solid #f59e0b;
}

.payment-btn {
    border-bottom: 4px solid #7c3aed;
}

.electricity-btn {
    border-bottom: 4px solid #eab308;
}

.customers-btn {
    border-bottom: 4px solid var(--primary);
}

/* ==========================================
   RECENT SALES
========================================== */

.recent-sales-section {
    margin-top: 35px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 15px;
}

.section-heading h2 {
    font-size: 20px;
}

.section-heading span {
    color: var(--text-light);
    font-size: 13px;
}

.recent-sales-list {
    background: var(--white);

    border-radius: 12px;
    overflow: hidden;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.05);
}

.sale-record {
    padding: 15px 18px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border-bottom: 1px solid var(--border);
}

.sale-record:last-child {
    border-bottom: none;
}


.sale-record-left {
    display: flex;
    align-items: center;
    gap: 12px;
}


.sale-size {
    min-width: 78px;
    height: 48px;
    padding: 0 10px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: var(--background);
    color: var(--primary-dark);

    border-radius: 10px;

    font-weight: bold;
    font-size: 13px;

    white-space: nowrap;
}

.sale-details strong {
    display: block;
    margin-bottom: 5px;
}


.sale-details span {
    color: var(--text-light);
    font-size: 12px;
}


.sale-amount {
    text-align: right;
}


.sale-amount strong {
    display: block;
    color: var(--text-dark);
}


.pending-sync {
    margin-top: 5px;

    color: #f59e0b;
    font-size: 11px;
}

.sale-record {
    padding: 15px 18px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border-bottom: 1px solid var(--border);
}

.sale-record:last-child {
    border-bottom: none;
}

.sale-record-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sale-size {
    width: 48px;
    height: 48px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: var(--background);
    color: var(--primary-dark);

    border-radius: 10px;

    font-weight: bold;
    font-size: 14px;
}

.sale-details strong {
    display: block;
    margin-bottom: 5px;
}

.sale-details span {
    color: var(--text-light);
    font-size: 12px;
}

.sale-amount {
    text-align: right;
}

.sale-amount strong {
    display: block;
    color: var(--text-dark);
}

.pending-sync {
    margin-top: 5px;

    color: #f59e0b;
    font-size: 11px;
}

.empty-message {
    text-align: center;

    padding: 30px;

    color: var(--text-light);
}

/* ==========================================
   CUSTOMERS & DEBTS SCREEN
========================================== */

.customers-page {
    display: none;
    min-height: 100vh;
    background: #f5f8fc;
}

.electricity-page {
    display: none;
    min-height: 100vh;
    background: #f5f8fc;
}

.owner-page {
    display: none;
    min-height: 100vh;
    background: #f5f8fc;
}


.customers-container {
    width: 100%;
    max-width: 900px;

    margin: 0 auto;
    padding: 30px 20px 50px;
}


/* TOP AREA */

.customers-top {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;
    margin-bottom: 30px;
}


.page-label {
    color: var(--primary);
    font-size: 13px;
    font-weight: bold;

    margin-bottom: 5px;
}


.customers-top h1 {
    font-size: 28px;
    margin-bottom: 8px;
}


.page-description {
    color: var(--text-light);
    line-height: 1.5;
}


.add-customer-btn {
    border: none;
    border-radius: 8px;

    padding: 13px 18px;

    background: var(--primary);
    color: var(--white);

    font-weight: bold;
    cursor: pointer;

    white-space: nowrap;
}


.add-customer-btn:hover {
    background: var(--primary-dark);
}


/* BACK BUTTON */

.back-btn {
    padding: 9px 14px;

    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 7px;

    background: transparent;
    color: var(--white);

    cursor: pointer;
}


/* DEBT SUMMARY */

.debt-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 15px;
    margin-bottom: 35px;
}


.debt-card {
    background: var(--white);

    padding: 20px;

    border-radius: 12px;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.06);
}


.debt-card span {
    display: block;

    color: var(--text-light);
    font-size: 13px;

    margin-bottom: 10px;
}


.debt-card strong {
    color: var(--primary-dark);
    font-size: 22px;
}


/* CUSTOMER LIST */

.customer-list-section {
    margin-top: 10px;
}


.customer-list {
    background: var(--white);

    border-radius: 12px;
    overflow: hidden;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.05);
}

/* CUSTOMER RECORD */

.customer-record {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;
    padding: 18px 20px;

    border-bottom: 1px solid var(--border);
}

.customer-record:last-child {
    border-bottom: none;
}

.customer-record strong {
    display: block;

    color: var(--text-dark);
    font-size: 15px;

    margin-bottom: 6px;
}

.customer-record span {
    display: block;

    color: var(--text-light);
    font-size: 13px;
}

.customer-debt {
    color: var(--primary-dark);

    font-size: 15px;
    font-weight: bold;

    white-space: nowrap;
}

/* ==========================================
   ADD CUSTOMER MODAL
========================================== */

.customer-modal,
.credit-modal,
.payment-modal,
.electricity-modal,
.quick-sale-modal {
    display: none;

    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.45);

    justify-content: center;
    align-items: center;

    padding: 20px;

    z-index: 1000;
}

.customer-form-card {
    width: 100%;
    max-width: 450px;

    background: var(--white);

    padding: 25px;

    border-radius: 15px;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.2);
}


.customer-form-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 25px;
}


.customer-form-header h2 {
    margin-bottom: 5px;
}


.customer-form-header p {
    color: var(--text-light);
    font-size: 14px;
}


.close-customer-form {
    border: none;
    background: transparent;

    color: var(--text-light);

    font-size: 28px;
    line-height: 1;

    cursor: pointer;
}


.customer-form-actions {
    display: flex;
    justify-content: flex-end;

    gap: 10px;
    margin-top: 25px;
}


.cancel-customer-btn,
.save-customer-btn {
    padding: 12px 18px;

    border-radius: 8px;

    font-weight: bold;
    cursor: pointer;
}


.cancel-customer-btn {
    background: var(--white);
    color: var(--text-dark);

    border: 1px solid var(--border);
}


.save-customer-btn {
    background: var(--primary);
    color: var(--white);

    border: none;
}


.save-customer-btn:hover {
    background: var(--primary-dark);
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 700px) {

    .app-header {
        padding: 15px 18px;
    }

    .dashboard-container {
        padding: 20px 15px 40px;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sale-buttons {
        gap: 12px;
    }

    .sale-btn {
        min-height: 150px;
    }

    .sale-btn strong {
        font-size: 18px;
    }

    .action-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   QUICK SALE QUANTITY BUTTONS
========================================== */

.quick-quantity-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 10px 0 18px;
}

.quick-quantity-buttons button {
    min-height: 44px;
    padding: 10px 14px;

    background: #f4f8fc;
    color: var(--primary-dark);

    border: 1px solid var(--border);
    border-radius: 10px;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

.quick-quantity-buttons button:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.quick-quantity-buttons button:active {
    transform: scale(0.97);
}

.quick-quantity-buttons button.selected {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 3px 8px rgba(8, 120, 232, 0.22);
}

.quick-sale-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;

    margin: 6px 0 22px;
}

.quick-sale-summary > div {
    padding: 16px;

    background: #f8fbff;
    border: 1px solid var(--border);
    border-radius: 12px;

    display: flex;
    flex-direction: column;
    gap: 7px;
}

.quick-sale-summary span {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.quick-sale-summary strong {
    color: var(--text-dark);
    font-size: 20px;
    line-height: 1.2;
}

/* Emphasize the amount being charged */
.quick-sale-summary > div:last-child {
    background: #eef7ff;
    border-color: #b9d9f8;
}

.quick-sale-summary > div:last-child strong {
    color: var(--primary-dark);
    font-size: 22px;
}

/* ==========================================
   CUSTOMER EDIT & DELETE ACTIONS
========================================== */

.customer-record-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.customer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.customer-actions button {
    min-width: 68px;
    height: 36px;
    padding: 0 12px;

    border-radius: 8px;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

/* Edit */
.edit-customer-btn {
    background: #eef7ff;
    color: var(--primary-dark);
    border: 1px solid #b9d9f8;
}

.edit-customer-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Delete */
.delete-customer-btn {
    background: #fff5f5;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.delete-customer-btn:hover {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.customer-actions button:active {
    transform: scale(0.96);
}

/* ==========================================
   OWNER BUSINESS MANAGEMENT
========================================== */

.owner-management-section {
    margin-top: 30px;
}

.owner-management-section .section-heading {
    margin-bottom: 16px;
}

.owner-management-section .section-heading h2 {
    margin: 4px 0 6px;
    font-size: 21px;
    color: var(--text-dark);
}

.owner-management-section .section-heading p:last-child {
    color: var(--text-light);
    font-size: 14px;
}


/* Settings Card */

.owner-settings-btn {
    width: 100%;
    max-width: 520px;

    display: flex;
    align-items: center;
    gap: 14px;

    padding: 17px 18px;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: 14px;

    text-align: left;
    cursor: pointer;

    box-shadow: 0 3px 10px rgba(23, 32, 51, 0.05);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.owner-settings-btn:hover {
    transform: translateY(-2px);
    border-color: #b9d9f8;
    box-shadow: 0 6px 16px rgba(23, 32, 51, 0.08);
}


/* Settings Icon */

.owner-settings-icon {
    width: 46px;
    height: 46px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eef7ff;
    color: var(--primary);

    border-radius: 12px;

    font-size: 22px;
}


/* Settings Text */

.owner-settings-text {
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.owner-settings-text strong {
    color: var(--text-dark);
    font-size: 16px;
}

.owner-settings-text span {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 400;
}


/* Arrow */

.owner-settings-arrow {
    color: var(--text-light);
    font-size: 28px;
    font-weight: 400;
}

/* ==========================================
   OWNER SETTINGS PAGE
========================================== */

.owner-settings-page {
    display: none;
    min-height: 100vh;
    background: #f5f8fc;
}

/* ==========================================
   DATA MANAGEMENT - DANGER ZONE
========================================== */

.data-management-section {
    margin-top: 10px;
}

.data-management-section .section-heading {
    margin-bottom: 18px;
}

.data-management-section .section-heading h2 {
    margin: 4px 0 6px;
    font-size: 21px;
    color: var(--text-dark);
}

.data-management-section .section-heading p:last-child {
    color: var(--text-light);
    font-size: 14px;
}

/* Danger Zone */

.danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 20px;

    background: #fffafa;
    border: 1px solid #fecaca;
    border-radius: 14px;
}

.danger-zone-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.danger-zone-info strong {
    color: var(--danger);
    font-size: 16px;
}

.danger-zone-info span {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
}

/* Reset Button */

.reset-business-btn {
    flex-shrink: 0;

    padding: 11px 16px;

    background: var(--white);
    color: var(--danger);

    border: 1px solid var(--danger);
    border-radius: 9px;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

.reset-business-btn:hover {
    background: var(--danger);
    color: var(--white);
}

.reset-business-btn:active {
    transform: scale(0.97);
}

/* Mobile */

@media (max-width: 700px) {

    .danger-zone {
        flex-direction: column;
        align-items: stretch;
    }

    .reset-business-btn {
        width: 100%;
    }
}

/* ==========================================
   RESET BUSINESS DATA MODAL
========================================== */

.reset-data-modal {
    display: none;

    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.5);

    align-items: center;
    justify-content: center;

    padding: 20px;
    z-index: 2000;
}

.reset-data-box {
    width: 100%;
    max-width: 460px;

    background: var(--white);
    border-radius: 16px;

    padding: 28px;

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.reset-warning-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 18px;

    background: #fee2e2;
    color: var(--danger);

    border-radius: 50%;

    font-size: 24px;
    font-weight: 800;
}

.reset-data-box h2 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.reset-data-box > p {
    margin-bottom: 14px;

    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.reset-warning-message {
    margin-bottom: 20px;
    padding: 11px 13px;

    background: #fff5f5;
    color: var(--danger);

    border: 1px solid #fecaca;
    border-radius: 8px;

    font-size: 13px;
    font-weight: 700;
}

.reset-data-box label {
    display: block;
    margin-bottom: 8px;

    color: var(--text-dark);
    font-size: 14px;
}

#resetConfirmationInput {
    width: 100%;
    height: 44px;

    padding: 0 12px;

    border: 1px solid var(--border);
    border-radius: 9px;

    font-size: 15px;
    outline: none;
}

#resetConfirmationInput:focus {
    border-color: var(--primary);
}

.reset-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 22px;
}

.cancel-reset-btn,
.confirm-reset-btn {
    min-height: 42px;
    padding: 0 16px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.cancel-reset-btn {
    background: var(--white);
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.confirm-reset-btn {
    background: var(--danger);
    color: var(--white);
    border: 1px solid var(--danger);
}

.confirm-reset-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

/* ==========================================
   RESET BUSINESS DATA MODAL
========================================== */

.reset-data-modal {
    display: none;
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.5);

    align-items: center;
    justify-content: center;

    padding: 20px;
    z-index: 2000;
}

.reset-data-box {
    width: 100%;
    max-width: 460px;

    background: var(--white);
    border-radius: 16px;

    padding: 28px;

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

/* Reset Warning Icon */

.reset-warning-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 18px;

    background: #fee2e2;
    color: var(--danger);

    border-radius: 50%;

    font-size: 24px;
    font-weight: 800;
}

.reset-data-box h2 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.reset-data-box > p {
    margin-bottom: 14px;

    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.reset-warning-message {
    margin-bottom: 20px;
    padding: 11px 13px;

    background: #fff5f5;
    color: var(--danger);

    border: 1px solid #fecaca;
    border-radius: 8px;

    font-size: 13px;
    font-weight: 700;
}

/* Confirmation Input */

.reset-data-box label {
    display: block;
    margin-bottom: 8px;

    color: var(--text-dark);
    font-size: 14px;
}

#resetConfirmationInput {
    width: 100%;
    height: 44px;

    padding: 0 12px;

    border: 1px solid var(--border);
    border-radius: 9px;

    font-size: 15px;
    outline: none;
}

#resetConfirmationInput:focus {
    border-color: var(--primary);
}

/* Reset Modal Actions */

.reset-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 22px;
}

.cancel-reset-btn,
.confirm-reset-btn {
    min-height: 42px;
    padding: 0 16px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

/* Cancel */

.cancel-reset-btn {
    background: var(--white);
    color: var(--text-dark);

    border: 1px solid var(--border);
}

.cancel-reset-btn:hover {
    background: #f5f7fa;
}

/* Final Reset */

.confirm-reset-btn {
    background: var(--danger);
    color: var(--white);

    border: 1px solid var(--danger);
}

.confirm-reset-btn:hover:not(:disabled) {
    background: #b91c1c;
}

.confirm-reset-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    border-color: #e5e7eb;

    cursor: not-allowed;
}

/* Mobile */

@media (max-width: 500px) {

    .reset-data-box {
        padding: 22px 18px;
    }

    .reset-modal-actions {
        flex-direction: column-reverse;
    }

    .cancel-reset-btn,
    .confirm-reset-btn {
        width: 100%;
    }
}

/* ==========================================
   WATER USAGE PAGE
========================================== */

#waterUsagePage {
    display: none;
}

/* ==========================================
   BUSINESS DATA EXPORT
========================================== */

.data-export-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 20px;
    margin-bottom: 18px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.data-export-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.data-export-info strong {
    color: var(--text-dark);
    font-size: 16px;
}

.data-export-info span {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
}

.export-business-btn {
    flex-shrink: 0;

    padding: 11px 16px;

    background: var(--primary);
    color: var(--white);

    border: 1px solid var(--primary);
    border-radius: 9px;

    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.export-business-btn:hover {
    background: var(--primary-dark);
}

@media (max-width: 700px) {

    .data-export-section {
        flex-direction: column;
        align-items: stretch;
    }

    .export-business-btn {
        width: 100%;
    }
}


/* ==========================================
   MAXDIVA SHOP - BUSINESS DAY MANAGEMENT
========================================== */

.business-day-section {
    background: #ffffff;
    border: 1px solid #dce7ee;
    border-radius: 14px;
    padding: 22px;
    margin: 22px 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.business-day-heading h2 {
    margin: 0 0 6px;
    color: #17324d;
}

.business-day-heading p {
    color: #64748b;
    margin: 0;
}

.business-day-details {
    margin-top: 18px;
}

.business-meter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 16px 0;
}

.business-meter-card {
    background: #f1f7fb;
    padding: 16px;
    border-radius: 10px;
}

.business-meter-card h3 {
    margin: 0 0 10px;
    color: #17324d;
}

.business-meter-card p {
    margin: 7px 0;
}

.business-day-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.business-day-btn {
    border: none;
    background: #1769aa;
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.close-day-btn {
    background: #a6482b;
}

.business-day-message {
    margin-top: 12px;
    color: #64748b;
}

.business-day-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.business-day-modal-content {
    background: white;
    width: 100%;
    max-width: 430px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 14px;
    padding: 25px;
}

.business-day-modal-content h2 {
    margin-top: 0;
}

.business-day-modal-content label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 600;
}

.business-day-modal-content input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.business-day-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.business-day-modal-actions button {
    padding: 11px 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.business-day-modal-actions button[type="submit"] {
    background: #1769aa;
    color: white;
}

@media (max-width: 600px) {
    .business-meter-grid {
        grid-template-columns: 1fr;
    }

    .business-day-section {
        padding: 16px;
    }
}


/* ==========================================
   OWNER DAILY BUSINESS REPORTS
========================================== */

.owner-reports-section {
    margin-top: 35px;
    margin-bottom: 35px;
}

.owner-report-controls {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0;
}

.owner-report-controls label {
    font-weight: 600;
}

.owner-report-controls input {
    padding: 11px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
}

.owner-report-controls button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.owner-report-controls button:hover {
    background: #1d4ed8;
}

#ownerReportStatus {
    margin: 12px 0 18px;
    color: #64748b;
}

.owner-daily-report-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.owner-history-section {
    margin-top: 35px;
}

.owner-history-section h3 {
    margin-bottom: 16px;
}

.owner-history-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.owner-history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}

.owner-history-table th,
.owner-history-table td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.owner-history-table th {
    background: #f8fafc;
    font-weight: 600;
}

@media (max-width: 900px) {
    .owner-daily-report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .owner-daily-report-grid {
        grid-template-columns: 1fr;
    }

    .owner-report-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .owner-report-controls button,
    .owner-report-controls input {
        width: 100%;
    }
}


/* ==========================================
   OWNER REPORTS - REDESIGNED INTERFACE
========================================== */


/* MAIN REPORT CARDS LAYOUT */

.owner-report-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0 30px;
    align-items: stretch;
}

.owner-report-options > .owner-report-option {
    min-width: 0;
    width: auto;
    box-sizing: border-box;
}

.owner-report-options > .daily-option,
.owner-report-options > .weekly-option {
    grid-column: auto;
}

.owner-report-options > .monthly-option {
    grid-column: 1 / -1;
}


.owner-report-option {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.daily-option {
    border-top: 5px solid #2563eb;
}

.weekly-option {
    border-top: 5px solid #059669;
}

.monthly-option {
    border-top: 5px solid #7c3aed;
}

.report-option-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.report-option-heading h3 {
    margin: 0;
    font-size: 18px;
}

.report-option-icon {
    font-size: 24px;
}

.owner-report-option > p {
    color: #64748b;
    line-height: 1.5;
    margin: 12px 0 22px;
}

.report-option-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.report-option-form label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.report-option-form input {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
}

.report-option-form button {
    min-height: 44px;
    padding: 10px 12px;
    border: none;
    border-radius: 9px;
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.daily-option button {
    background: #2563eb;
}

.weekly-option button {
    background: #059669;
}

.monthly-option button {
    background: #7c3aed;
}

.report-option-form button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* RESULTS PANEL */

.owner-report-results {
    margin: 28px 0;
    padding: 24px;
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    background: #eff6ff;
}

.owner-report-results[hidden] {
    display: none !important;
}

.owner-report-results-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.owner-report-results-heading h3 {
    margin: 4px 0 8px;
}

.close-owner-report-btn {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    color: #334155;
    font: inherit;
    cursor: pointer;
}

/* DISTINCT REPORT CARD COLORS */

.owner-report-results .summary-card {
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.06);
}

.owner-report-results .summary-card span {
    color: #475569;
}

.owner-report-results .summary-card strong {
    color: #1d4ed8;
}

/* FINANCIAL / UTILITY COLOR VARIATION */

.owner-report-results .summary-card:nth-child(4),
.owner-report-results .summary-card:nth-child(5) {
    border-left-color: #059669;
}

.owner-report-results .summary-card:nth-child(4) strong,
.owner-report-results .summary-card:nth-child(5) strong {
    color: #047857;
}

.owner-report-results .summary-card:nth-child(6),
.owner-report-results .summary-card:nth-child(7) {
    border-left-color: #d97706;
}

.owner-report-results .summary-card:nth-child(6) strong,
.owner-report-results .summary-card:nth-child(7) strong {
    color: #b45309;
}

.owner-report-results .summary-card:nth-child(8),
.owner-report-results .summary-card:nth-child(9),
.owner-report-results .summary-card:nth-child(10) {
    border-left-color: #7c3aed;
}

.owner-report-results .summary-card:nth-child(8) strong,
.owner-report-results .summary-card:nth-child(9) strong,
.owner-report-results .summary-card:nth-child(10) strong {
    color: #6d28d9;
}

/* RESPONSIVE */

@media (max-width: 1000px) {
    .owner-report-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .owner-report-options {
        grid-template-columns: 1fr;
    }

    .owner-report-results {
        padding: 16px;
    }

    .owner-report-results-heading {
        flex-direction: column;
    }
}


/* WEEKLY AND MONTHLY SALES SUMMARIES */

.weekly-option,
.monthly-option {
    justify-content: space-between;
}

.report-summary-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

.report-summary-icon {
    font-size: 25px;
}

.report-summary-amount {
    display: block;
    margin-top: 28px;
    font-size: clamp(24px, 2.3vw, 34px);
    font-weight: 800;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.monthly-option .report-summary-amount {
    font-size: clamp(28px, 2.7vw, 40px);
}

.report-summary-period {
    margin: 6px 0 20px !important;
    font-size: 13px;
    color: #64748b;
}

.report-summary-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.report-summary-link {
    border: none;
    background: transparent !important;
    padding: 6px 0;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.weekly-option .report-summary-link {
    color: #047857;
}

.monthly-option .report-summary-link {
    color: #6d28d9;
}

.report-summary-link:hover {
    text-decoration: underline;
}

/* ==========================================
   OWNER REPORTS - FINAL CARD LAYOUT FIX
========================================== */

/* Daily and Weekly side by side */

/* Prevent cards from becoming too narrow */
.owner-report-options .owner-report-option {
    min-width: 0;
    width: auto;
    box-sizing: border-box;
}

/* Compact daily report */
.owner-report-options .daily-option {
    grid-column: auto;
    min-height: 230px;
}

/* Weekly summary */
.owner-report-options .weekly-option {
    grid-column: auto;
    min-height: 230px;
}

/* Monthly report spans full row */
.owner-report-options .monthly-option {
    grid-column: 1 / -1;
    min-height: 190px;
}

/* Keep financial figures on a normal line */
.owner-report-options .report-summary-amount {
    font-size: clamp(24px, 3vw, 34px);
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
    margin-top: 18px;
}

/* Bigger monthly sales figure */
.owner-report-options .monthly-option .report-summary-amount {
    font-size: clamp(30px, 3.5vw, 40px);
}

/* Reduce unnecessary vertical space */
.owner-report-options .owner-report-option > p {
    margin: 10px 0 16px;
}

/* Position report links to the right */
.owner-report-options .report-summary-footer {
    margin-top: auto;
    justify-content: flex-end;
}

/* Mobile layout */
@media (max-width: 650px) {
    .owner-report-options {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .owner-report-options .daily-option,
    .owner-report-options .weekly-option,
    .owner-report-options .monthly-option {
        grid-column: 1 / -1;
        min-height: auto;
    }
}


/* ==========================================
   BUSINESS-DAY HISTORY LAYOUT FIX
========================================== */

.owner-reports-section {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Make history occupy the full available width */
.owner-history-section {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-top: 32px;
    box-sizing: border-box;
}

.owner-history-section h3 {
    margin-bottom: 18px;
}

/* Allow the table to use all available space */
.owner-history-table-wrapper {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    box-sizing: border-box;
}

.owner-history-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
    table-layout: auto;
}

.owner-history-table th,
.owner-history-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.owner-history-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #334155;
}

/* Keep action buttons readable */
.owner-history-table button {
    white-space: nowrap;
    padding: 9px 14px;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
    cursor: pointer;
}

.owner-history-table button:hover {
    background: #dbeafe;
}


/* RESPONSIVE BUSINESS REPORT CARDS */

@media (max-width: 650px) {

    .owner-report-options {
        grid-template-columns: minmax(0, 1fr);
    }

    .owner-report-options > .daily-option,
    .owner-report-options > .weekly-option,
    .owner-report-options > .monthly-option {
        grid-column: 1 / -1;
        min-height: auto;
    }
}

/* WEEKLY / MONTHLY REPORT DETAILS */

.owner-period-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

#ownerPeriodReportResults h4 {
    margin: 24px 0 14px;
}

@media (max-width: 850px) {
    .owner-period-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 550px) {
    .owner-period-summary-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================
   COMPACT BUSINESS REPORT ACCORDIONS
========================================== */

.owner-report-accordions {
    margin-top: 28px;
}

.owner-report-accordions h4 {
    margin-bottom: 16px;
}

.owner-report-accordion {
    margin-bottom: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.owner-report-accordion summary {
    padding: 17px 20px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    background: #f8fafc;
}

.owner-report-accordion summary:hover {
    background: #eff6ff;
}

.owner-report-accordion[open] summary {
    border-bottom: 1px solid #e2e8f0;
    color: #1d4ed8;
}

.owner-report-accordion .owner-history-table-wrapper {
    padding: 12px;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .owner-report-accordion summary {
        padding: 14px;
    }

    .owner-report-accordion .owner-history-table-wrapper {
        padding: 8px;
    }
}


/* ==========================================
   OWNER REPORT PRINTING
========================================== */

.owner-report-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.print-owner-report-btn {
    background: #176b48;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 11px 18px;
    font-weight: 600;
    cursor: pointer;
}

.print-owner-report-btn:hover {
    background: #115236;
}

@media print {

    @page {
        size: A4;
        margin: 12mm;
    }

    body {
        background: white !important;
        color: black !important;
    }

    body * {
        visibility: hidden !important;
    }

    #ownerPeriodReportResults,
    #ownerPeriodReportResults * {
        visibility: visible !important;
    }

    #ownerPeriodReportResults {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: white !important;
    }

    #ownerPeriodReportResults::before {
        content: "MAXDIVA SHOP";
        display: block;
        font-size: 23px;
        font-weight: 800;
        margin-bottom: 14px;
        color: black;
    }

    .owner-report-actions,
    #ownerPeriodReportStatus {
        display: none !important;
    }

    .owner-period-summary-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }

    .owner-period-summary-grid .summary-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #cccccc !important;
        background: white !important;
        color: black !important;
    }

    .owner-report-accordion {
        break-inside: auto;
        border: 1px solid #cccccc !important;
        margin-bottom: 14px !important;
    }

    .owner-report-accordion summary {
        font-weight: bold;
        background: #eeeeee !important;
        color: black !important;
    }

    .owner-report-accordion .owner-history-table-wrapper {
        overflow: visible !important;
        max-height: none !important;
    }

    .owner-report-accordion table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 10px !important;
    }

    .owner-report-accordion th,
    .owner-report-accordion td {
        border: 1px solid #cccccc !important;
        padding: 6px !important;
        color: black !important;
    }

    .owner-report-accordion tr {
        break-inside: avoid;
    }

    #ownerPeriodReportResults::after {
        content: "Powered by Code Craft Tanzania";
        display: block;
        margin-top: 22px;
        padding-top: 10px;
        border-top: 1px solid #cccccc;
        font-size: 10px;
        text-align: center;
        color: #555555;
    }
}

/* MaxDiva login branding — test release */
.login-page .login-card { border: 1px solid rgba(255,255,255,.35); }
.login-page .brand { margin-bottom: 30px; }
.login-page .brand h1 { font-size: clamp(36px, 7vw, 46px); font-weight: 800; letter-spacing: -.8px; }
.login-page .brand p { font-size: 13px; letter-spacing: .25px; line-height: 1.5; }
.login-page .water-icon { font-size: 48px; }
.login-page .login-btn { transition: background .2s ease, transform .2s ease; }
.login-page .login-btn:active { transform: translateY(1px); }

/* MaxDiva — disabled business-day opening button */

#openBusinessDayBtn:disabled {
    background-color: #9ca3af;
    color: #ffffff;
    border-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.75;
    box-shadow: none;
}

/* ==========================================
   MaxDiva Safe Update Notification
========================================== */

.maxdiva-update-notice {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: min(380px, calc(100% - 32px));
    padding: 20px;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
}

/* Keep the notice hidden until an update is detected */
.maxdiva-update-notice[hidden] {
    display: none !important;
}

.maxdiva-update-content h3 {
    margin: 0 0 10px;
    color: #1d4ed8;
    font-size: 18px;
}

.maxdiva-update-content p {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
}

.maxdiva-update-actions {
    display: flex;
    gap: 10px;
}

.maxdiva-update-actions button {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

#maxdivaUpdateLaterBtn {
    background: #e5e7eb;
    color: #374151;
}

#maxdivaUpdateNowBtn {
    background: #2563eb;
    color: white;
}

#maxdivaUpdateNowBtn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}
