.bp-energy-portal {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 1rem;
}

.bp-energy-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.bp-energy-header p {
    color: #666;
    margin: 0 0 1.5rem;
}

.bp-energy-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.bp-tab {
    border: none;
    background: transparent;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-size: 0.95rem;
    border-radius: 999px 999px 0 0;
    color: #555;
}

.bp-tab.active {
    background: #fff;
    border: 1px solid #ddd;
    border-bottom: 1px solid #fff;
    color: #111;
    font-weight: 600;
}

.bp-tab-content {
    display: none;
}

.bp-tab-content.active {
    display: block;
}

.bp-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.0rem 1.0rem;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.07);
    margin-bottom: 1.25rem;
}

.bp-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.bp-card-form {
    max-width: 600px;
}

.bp-field-group {
    margin-bottom: 0.9rem;
}

.bp-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.bp-field-group input,
.bp-field-group select,
.bp-field-group textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 0.5rem;
    border: 1px solid #ddd;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.bp-field-group input:focus,
.bp-field-group select:focus,
.bp-field-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.bp-help-text {
    font-size: 0.8rem;
    color: #777;
    margin: 0.25rem 0 0;
}

.bp-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
}

.bp-btn-primary:hover {
    opacity: 0.93;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.bp-btn-primary:active {
    transform: translateY(1px);
    box-shadow: none;
}

.bp-form-message {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.bp-form-message.success {
    color: #16a34a;
}

.bp-form-message.error {
    color: #dc2626;
}

.bp-table-wrapper {
    overflow-x: auto;
}

.bp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.bp-table thead {
    background: #f9fafb;
}

.bp-table th,
.bp-table td {
    padding: 0.5rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.bp-table th {
    font-weight: 600;
    color: #475569;
}

.bp-table tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Chart containers */
.bp-chart-container {
    position: relative;
    height: 280px;
}

.bp-mini-chart-container {
    position: relative;
    height: 200px;
}

/* Responsive tweaks */
@media (max-width: 640px) {
    .bp-energy-portal {
        padding: 0.5rem;
    }

    .bp-card {
        padding: 1rem;
    }

    .bp-energy-tabs {
        overflow-x: auto;
    }

    .bp-tab {
        white-space: nowrap;
        font-size: 0.85rem;
    }
}
/* Group title headings */
.bp-reading-group-title {
    margin: 0.5rem 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

/* Card container list */
.bp-reading-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Modern reading cards */
.bp-reading-modern {
    border-radius: 1.2rem;
    padding: 1.4rem 1.6rem;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Header */
.bp-reading-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bp-badge {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.bp-badge-electricity {
    background: #3b82f6;
}

.bp-badge-gas {
    background: #ea580c;
}

.bp-reading-date-modern {
    font-weight: 600;
    color: #475569;
}

/* Reading + Usage */
.bp-reading-stats {
    display: flex;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 0.8rem 0;
    flex-wrap: wrap;
}

.bp-stat label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.bp-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
}

/* First reading badge */
.bp-badge-first {
    background: #a855f7;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Trend indicators */
.bp-trend {
    display: inline-flex;
    align-items: center;
    margin-left: 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.bp-trend-up {
    color: #dc2626; /* red */
}

.bp-trend-down {
    color: #16a34a; /* green */
}

.bp-trend-flat {
    color: #64748b; /* grey */
}

/* Notes */
.bp-reading-notes-modern label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #475569;
}

.bp-reading-notes-modern p {
    margin: 0;
    color: #334155;
    line-height: 1.4em;
}

/* Footer */
.bp-reading-footer-modern {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.6rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #475569;
}

.bp-reading-footer-modern strong {
    color: #0f172a;
}

.bp-reading-timeago {
    opacity: 0.7;
}

/* Responsive tweaks for cards */
@media (max-width: 640px) {
    .bp-reading-stats {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* Overlay */
.bp-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Modal box */
.bp-modal {
    background: #fff;
    width: 90%;
    max-width: 480px;
    border-radius: 1.2rem;
    padding: 1.5rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    animation: bpModalIn 0.25s ease-out;
}

@keyframes bpModalIn {
    from { transform: translateY(20px); opacity:0; }
    to { transform: translateY(0); opacity:1; }
}

/* Modal header */
.bp-meter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bp-modal-close {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0.7;
}

.bp-modal-close:hover {
    opacity: 1;
}

/* Digital Meter Display */
.bp-meter-display {
    background: #111827;
    padding: 1rem 1.2rem;
    margin: 1.2rem 0;
    border-radius: 0.5rem;
    text-align: center;
    color: #22d3ee;
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    letter-spacing: 6px;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.5);
}

.bp-meter-display span {
    display: inline-block;
}

/* Form layout inside modal */
.bp-meter-form .bp-field-group label {
    font-weight: 600;
}

.bp-meter-form .bp-field-group input,
.bp-meter-form .bp-field-group select {
    font-size: 1rem;
}

/* Open modal */
.bp-modal-overlay.active {
    display: flex;
}


