﻿html, body {
    height: 100%;
}

body {
    display: inline-block;
    align - items: center;
    justify - content: center;
    position: relative;
    background: linear-gradient(135deg, rgba(#242e4d, .9), rgba(#897e79, .9));
    font-family: DroidSans, Droid Sans, Verdana;
}

#accSearch {
    padding: 10px;
    min-width: 300px;
    font-size: 1.2em;
    margin-bottom: 20px;
}

#account-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 20px;
}

.details-grid {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
}

.section {
    flex: 1;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.2em;
}

    .data-table th {
        text-align: left;
        color: #666;
        border-bottom: 2px solid #eee;
        padding: 8px;
    }

    .data-table td {
        padding: 8px;
        border-bottom: 1px solid #eee;
    }

.device-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    background: #fff;
    border: 1px solid #d1d1d1;
    border-left: 4px solid #007bff; /* Accent color */
    padding: 8px 12px;
    border-radius: 4px;
    min-width: 120px;
}

    /* Color coding by Device Type */
    .chip.elec {
        border-top: 5px solid #FFC000;
    }

    .chip.water {
        border-top: 5px solid #5B9BD5;
    }

    .chip.gas {
        border-top: 5px solid #ED7D31;
    }

    .chip.hotwater {
        border-top: 5px solid #70AD47;
    }

.chip-label {
    font-weight: bold;
    color: #1e293b;
   font-size:1.2em;
}

.chip-value {
    color: #3b82f6;
    font-size: 1.2em;
}

.chip small {
    color: #64748b;
    font-size: 1.0rem;
    margin-top: 4px;
}

.account-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

    .account-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    /* Status Sidebar indicator */
    .account-card.status-paid {
        border-left: 5px solid #28a745;
    }

    .account-card.status-overdue {
        border-left: 5px solid #dc3545;
    }

    .account-card.status-stale {
        border-left: 5px solid #6c757d;
    }

.status-container {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}

.status-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.label {
    color: #666;
    font-size: 1.2em;
}

.card-header {
    display: flex;
    flex-direction: column; /* This forces the stack */
    align-items: flex-start; /* Keeps everything aligned to the left */
    gap: 8px; /* Adds a nice little space between the number and the units */
    margin-bottom: 12px;
}

.header-main {
    width: 100%; /* Ensures it takes up the full top row */
}

.acc-number {
    margin: 0; /* Remove default headings margins to keep it tight */
    font-size: 1.5em;
    padding: 5px;
    color: white;
}

.location-tag {
    display: block; /* Puts it on its own line if it's inside header-main */
    color: #64748b;
    font-size: 1.0em;
    margin-top: 2px;
}

.acc-status-text, .due-date-text {
    font-size: 1.2em;
}

.balance-box {
    text-align: right;
}

.balance-amount {
    display: block;
    font-size: 1.25em;
    font-weight: 800;
    color: #0f172a;
}

.balance-label {
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.text-due {
    color: red;
    font-weight: bold;
}

.text-paid {
    color: green;
    font-weight: normal;
}

/*.card-footer {
    background: #f8fafc;
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
*/

.tab-header {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 10px;
}

.expand-btn {
    font-size: 1.2em;
    padding: 10px;
}


.tab-btn {
    flex: 1; /* Makes buttons equal width */
    padding: 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: bold;
    color: #64748b;
    transition: all 0.2s;
    font-size: 1.2em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

    .tab-btn.active {
        color: #3b82f6; /* Your brand blue */
        border-bottom: 3px solid #3b82f6;
        margin-bottom: -2px; /* Overlap the header border */
    }

.tab-pane {
    padding: 15px 5px;
}

.statement-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

    .statement-row:hover {
        background-color: #f8fafc; /* Light highlight */
        border-left: 4px solid #3b82f6; /* Subtle blue indicator */
    }

.unit-list-preview {
    display: flex;
    flex-wrap: wrap; /* Allows unit pills to wrap to a second line if there are many */
    gap: 5px;
    width: 100%;
}

.unit-pill {
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 1.2em;
}

.unit-more {
    font-size: 0.75rem;
    color: #3b82f6;
    font-weight: bold;
    align-self: center;
}

.reset-btn {
    margin-top: 15px;
    padding: 8px 20px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

    .reset-btn:hover {
        background-color: #2563eb;
    }


.device-status {
    font-size: 1em;
    color: #7f8c8d;
    display: inline;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
}

.status-dot {
    height: 6px;
    width: 6px;
    border-radius: 50%;
    display: inline-block;
}

.view-more-container {
    text-align: center;
    padding: 15px 0;
    border-top: 1px solid #f1f5f9;
    margin-top: 10px;
}

.view-more-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
}

    .view-more-link i {
        margin-left: 5px;
        transition: transform 0.2s;
    }

    .view-more-link:hover {
        color: #2563eb;
        text-decoration: underline;
    }

        .view-more-link:hover i {
            transform: translateX(3px); /* Subtle arrow nudge */
        }

/*-------------------- Mobile --------------------*/
@media screen and (max-width: 600px) {

    .acc-number {
        font-size: 0.7em;
    }

    .unit-pill {
        font-size: 0.9em;
    }

    .expand-btn {
        font-size: 1.0em;
    }

    .tab-btn {
        font-size: 1.0em;
    }

    .due-date-text {
        font-size: 0.9em;
    }

    .status-row {
        font-size: 0.8em;
    }

    .data-table {
        font-size: 0.7em;
    }

    .chip{
        padding:5px;
    }

    .chip-label {
        font-size: 0.6em;
    }

    .chip-value {
        font-size: 1.2em;
    }

    .chip small {
        font-size: 1.0rem;
    }

    #account-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}
