:root {
    color-scheme: light;

    --background: #f3f6fa;
    --surface: #ffffff;
    --surface-soft: #edf2f7;
    --text: #172033;
    --text-muted: #667085;
    --border: #d8e0ea;
    --primary: #1769e0;
    --primary-hover: #0e55bd;
    --primary-text: #ffffff;
    --success: #16794b;
    --warning: #9a6700;
    --danger: #b42318;
    --shadow: 0 12px 35px rgba(21, 33, 52, 0.09);
    --radius: 14px;
}

html[data-theme="dark"] {
    color-scheme: dark;

    --background: #10141d;
    --surface: #191f2b;
    --surface-soft: #222a38;
    --text: #edf2f8;
    --text-muted: #aab4c4;
    --border: #344054;
    --primary: #69a7ff;
    --primary-hover: #8abaff;
    --primary-text: #07111f;
    --success: #62d49b;
    --warning: #f6c75b;
    --danger: #ff8a80;
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] {
        color-scheme: dark;

        --background: #10141d;
        --surface: #191f2b;
        --surface-soft: #222a38;
        --text: #edf2f8;
        --text-muted: #aab4c4;
        --border: #344054;
        --primary: #69a7ff;
        --primary-hover: #8abaff;
        --primary-text: #07111f;
        --success: #62d49b;
        --warning: #f6c75b;
        --danger: #ff8a80;
        --shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    }
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--background);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.55;
}

a {
    color: var(--primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--primary-hover);
}

.page-width {
    width: min(1120px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(14px);
}

.header-content {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    text-decoration: none;
}

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

.brand-logo {
    width: 42px;
    height: 42px;
    display: block;
    border-radius: 12px;
    box-shadow: 0 5px 14px rgba(21, 33, 52, .12);
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.theme-control {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text-muted);
    font-size: 14px;
}

.page-content {
    flex: 1;
    padding-block: 38px 60px;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding-block: 22px;
    color: var(--text-muted);
    font-size: 13px;
}

h1,
h2,
h3 {
    line-height: 1.2;
    margin-top: 0;
}

h1 {
    margin-bottom: 24px;
    font-size: clamp(28px, 5vw, 42px);
    letter-spacing: -0.035em;
}

h2 {
    margin-bottom: 15px;
    font-size: 22px;
}

p {
    margin-top: 0;
}

section,
.card,
fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

section,
.card {
    margin-bottom: 20px;
    padding: 24px;
}

fieldset {
    margin: 0 0 22px;
    padding: 20px;
}

legend {
    padding-inline: 8px;
    font-weight: 700;
}

hr {
    height: 1px;
    margin: 26px 0;
    border: 0;
    background: var(--border);
}

label {
    font-weight: 650;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    max-width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
}

input:not([type="checkbox"]):not([type="radio"]),
textarea {
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    outline: 3px solid color-mix(in srgb, var(--primary) 22%, transparent);
}

textarea {
    resize: vertical;
}

button,
.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 17px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: var(--primary-text);
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 120ms ease,
        background 120ms ease;
}

button:hover,
.button:hover {
    transform: translateY(-1px);
    background: var(--primary-hover);
    color: var(--primary-text);
}

.helptext {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 13px;
}

.errorlist {
    margin: 8px 0;
    padding: 10px 14px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--danger) 13%, transparent);
    color: var(--danger);
}

.messages {
    margin-bottom: 24px;
}

.message {
    padding: 14px 17px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
}

.message-success {
    border-color: var(--success);
}

.message-warning {
    border-color: var(--warning);
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

th,
td {
    padding: 13px 15px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    background: var(--surface-soft);
}

tr:last-child td {
    border-bottom: 0;
}

@media (max-width: 640px) {
    .page-width {
        width: min(100% - 22px, 1120px);
    }

    .header-content {
        min-height: 62px;
    }

    .theme-control > span {
        display: none;
    }

    .page-content {
        padding-top: 25px;
    }

    section,
    .card,
    fieldset {
        padding: 17px;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}


/* Dashboard components */

.page-heading,
.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.page-heading {
    margin-bottom: 28px;
}

.section-heading {
    margin: 38px 0 18px;
}

.page-heading h1,
.section-heading h2 {
    margin-bottom: 5px;
}

.eyebrow {
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lead,
.reading-date {
    color: var(--text-muted);
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--text);
    text-decoration: none;
}

.quick-link:hover {
    border-color: var(--primary);
    color: var(--text);
}

.quick-link-icon {
    width: 44px;
    height: 44px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    background: var(--surface-soft);
    font-size: 21px;
}

.quick-link strong,
.quick-link small {
    display: block;
}

.quick-link small {
    margin-top: 2px;
    color: var(--text-muted);
}

.meter-count,
.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
}

.meter-count {
    padding: 6px 10px;
    background: var(--surface-soft);
    color: var(--text-muted);
}

.meter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 20px;
}

.meter-grid > .meter-card {
    margin: 0;
}

.meter-card {
    display: flex;
    min-height: 335px;
    flex-direction: column;
}

.meter-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.meter-card-header h3 {
    margin: 4px 0 0;
    font-size: 21px;
}

.property-name {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 650;
}

.status-badge {
    padding: 5px 9px;
}

.status-ok {
    background: color-mix(
        in srgb,
        var(--success) 14%,
        transparent
    );
    color: var(--success);
}

.status-missing {
    background: color-mix(
        in srgb,
        var(--warning) 14%,
        transparent
    );
    color: var(--warning);
}

.reading-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 27px;
}

.reading-value strong {
    font-size: clamp(32px, 6vw, 46px);
    line-height: 1;
    letter-spacing: -0.04em;
}

.reading-value span {
    color: var(--text-muted);
    font-weight: 700;
}

.reading-date {
    margin-top: 9px;
    font-size: 13px;
}

.consumption-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    padding: 14px;
    border-radius: 11px;
    background: var(--surface-soft);
}

.consumption-box span {
    color: var(--text-muted);
    font-size: 13px;
}

.consumption-box strong {
    white-space: nowrap;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 24px;
}

.button-secondary {
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text);
}

.button-secondary:hover {
    border-color: var(--primary);
    background: var(--surface-soft);
    color: var(--primary);
}

.empty-state {
    display: grid;
    flex: 1;
    place-items: center;
    align-content: center;
    color: var(--text-muted);
    text-align: center;
}

.empty-state > span {
    font-size: 38px;
}

.logout-area {
    display: flex;
    justify-content: flex-end;
    margin-top: 38px;
}

@media (max-width: 640px) {
    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .page-heading > .button {
        width: 100%;
    }

    .meter-grid {
        grid-template-columns: 1fr;
    }

    .consumption-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .card-actions .button {
        flex: 1;
    }
}

/* Reading forms */

.period-card {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 420px);
    align-items: center;
    gap: 28px;
}

.period-card h2 {
    margin-bottom: 0;
}

.period-card p:last-child {
    margin-bottom: 0;
}

.reading-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 20px;
}

.reading-form-grid > section {
    margin: 0;
}

.reading-form-card p {
    margin-bottom: 18px;
}

.reading-form-card p:last-child {
    margin-bottom: 0;
}

.status-billed {
    background: color-mix(
        in srgb,
        var(--primary) 14%,
        transparent
    );
    color: var(--primary);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

@media (max-width: 700px) {
    .period-card {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .reading-form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .button,
    .form-actions button {
        width: 100%;
    }
}

/* Single reading */

.single-reading-form {
    width: min(720px, 100%);
}

.form-section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.form-section-heading h2,
.form-section-heading p {
    margin-bottom: 0;
}

.form-section-icon {
    width: 46px;
    height: 46px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 13px;
    background: var(--surface-soft);
    font-size: 22px;
}

/* History */

.heading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.table-card {
    padding: 0;
    overflow: hidden;
}

.table-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
}

.table-card-heading h2,
.table-card-heading p {
    margin-bottom: 0;
}

.table-scroll {
    overflow-x: auto;
}

.history-table {
    border: 0;
    border-radius: 0;
}

.history-table th {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.history-table tbody tr:hover {
    background: var(--surface-soft);
}

.text-link {
    font-weight: 700;
}

.table-empty {
    padding: 40px;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 720px) {
    .heading-actions {
        width: 100%;
    }

    .heading-actions .button {
        flex: 1;
    }

    .table-card {
        padding: 14px;
        overflow: visible;
        background: transparent;
        box-shadow: none;
    }

    .table-card-heading {
        padding: 0 0 18px;
        border-bottom: 0;
    }

    .history-table,
    .history-table tbody,
    .history-table tr,
    .history-table td {
        display: block;
        width: 100%;
    }

    .history-table thead {
        display: none;
    }

    .history-table {
        border: 0;
        background: transparent;
    }

    .history-table tr {
        margin-bottom: 14px;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .history-table td {
        display: flex;
        justify-content: space-between;
        gap: 18px;
        padding: 9px 0;
        border-bottom: 1px solid var(--border);
        text-align: right;
    }

    .history-table td:last-child {
        border-bottom: 0;
    }

    .history-table td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: 13px;
        font-weight: 700;
        text-align: left;
    }
}

/* Charges */

.charge-total {
    color: var(--primary);
    font-size: 17px;
    white-space: nowrap;
}

.charge-status {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.empty-charge-state {
    display: grid;
    justify-items: center;
    gap: 7px;
}

.empty-charge-state span {
    font-size: 38px;
}

.empty-charge-state small {
    max-width: 440px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
}

/* Tenant portal */

.tenant-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.tenant-portal-card {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.tenant-documents-card {
    grid-column: 1 / -1;
}

.tenant-card-heading {
    padding: 20px 22px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-soft);
}

.tenant-card-heading h2,
.tenant-card-heading .eyebrow {
    margin-bottom: 0;
}

.tenant-record {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
}

.tenant-record:last-child {
    border-bottom: 0;
}

.tenant-record > div {
    min-width: 0;
}

.tenant-record strong,
.tenant-record span {
    display: block;
}

.tenant-record span {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 13px;
}

.tenant-empty {
    margin: 0;
    padding: 20px 22px;
    color: var(--text-muted);
}

@media (max-width: 760px) {
    .tenant-overview-grid {
        grid-template-columns: 1fr;
    }

    .tenant-documents-card {
        grid-column: auto;
    }

    .tenant-record {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Login */

.auth-shell {
    min-height: calc(100vh - 230px);
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(460px, 100%);
    margin: 0;
    padding: 38px;
    text-align: center;
}

.auth-card h1 {
    margin-bottom: 12px;
}

.auth-card .lead {
    margin-bottom: 28px;
}

.auth-icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    margin: 0 auto 22px;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.auth-icon img {
    width: 62px;
    height: 62px;
    display: block;
    border-radius: 18px;
}

.login-form {
    display: grid;
    gap: 20px;
    text-align: left;
}

.login-form button {
    width: 100%;
    margin-top: 4px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.login-error {
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 1px solid var(--danger);
    border-radius: 10px;
    background: color-mix(
        in srgb,
        var(--danger) 12%,
        transparent
    );
    color: var(--danger);
    font-weight: 650;
}

@media (max-width: 520px) {
    .auth-card {
        padding: 25px 19px;
    }
}

/* Excel upload */

.upload-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
    align-items: start;
    gap: 20px;
}

.upload-layout > section,
.upload-layout > aside {
    margin: 0;
}

.upload-card form > p {
    margin-bottom: 20px;
}

.upload-card input[type="file"] {
    padding: 16px;
    border: 2px dashed var(--border);
    background: var(--surface-soft);
    cursor: pointer;
}

.upload-card input[type="file"]:hover {
    border-color: var(--primary);
}

.info-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.info-card-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 13px;
    background: var(--surface-soft);
    font-size: 23px;
}

.info-card h2 {
    margin-bottom: 10px;
}

.info-card p,
.info-card li {
    color: var(--text-muted);
}

.info-card ul {
    margin: 18px 0 0;
    padding-left: 20px;
}

.info-card li + li {
    margin-top: 8px;
}

@media (max-width: 760px) {
    .upload-layout {
        grid-template-columns: 1fr;
    }
}

/* Main navigation */

.main-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
}

.main-navigation a {
    padding: 8px 11px;
    border-radius: 9px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.main-navigation a:hover {
    background: var(--surface-soft);
    color: var(--primary);
}

@media (max-width: 820px) {
    .header-content {
        flex-wrap: wrap;
        padding-block: 10px;
    }

    .main-navigation {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .main-navigation a {
        white-space: nowrap;
    }
}

/* User menu */

.user-menu {
    display: flex;
    align-items: center;
    gap: 9px;
}

.user-menu form {
    margin: 0;
}

.user-name {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.header-logout {
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text);
    font-size: 13px;
}

.header-logout:hover {
    border-color: var(--primary);
    background: var(--surface-soft);
    color: var(--primary);
}

@media (max-width: 620px) {
    .user-name {
        display: none;
    }

    .header-logout {
        padding-inline: 9px;
    }
}

/* Reporting progress */

.reporting-progress {
    display: grid;
    min-width: 210px;
    gap: 7px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: right;
}

.reporting-progress strong {
    color: var(--text);
}

.reporting-progress progress {
    width: 100%;
    height: 9px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: var(--surface-soft);
    accent-color: var(--primary);
}

.reporting-progress progress::-webkit-progress-bar {
    border-radius: 999px;
    background: var(--surface-soft);
}

.reporting-progress progress::-webkit-progress-value {
    border-radius: 999px;
    background: var(--primary);
}

.reporting-progress progress::-moz-progress-bar {
    border-radius: 999px;
    background: var(--primary);
}

@media (max-width: 640px) {
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .reporting-progress {
        width: 100%;
        text-align: left;
    }
}

/* Current electricity price */

.current-price-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    border-color: color-mix(
        in srgb,
        var(--primary) 35%,
        var(--border)
    );
}

.current-price-card h2 {
    margin-bottom: 5px;
}

.current-price-value {
    display: grid;
    justify-items: end;
    min-width: 190px;
}

.current-price-value > strong {
    color: var(--primary);
    font-size: clamp(34px, 6vw, 48px);
    line-height: 1;
    letter-spacing: -0.04em;
}

.current-price-value > span:not(.status-badge) {
    margin-top: 5px;
    color: var(--text-muted);
    font-weight: 700;
}

.current-price-value .status-badge {
    margin-top: 12px;
}

.status-preliminary {
    background: color-mix(
        in srgb,
        var(--warning) 14%,
        transparent
    );
    color: var(--warning);
}

@media (max-width: 640px) {
    .current-price-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .current-price-value {
        justify-items: start;
        min-width: 0;
    }
}

.pwa-install-banner {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1000;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 0.8rem;
    align-items: center;
    width: min(520px, calc(100% - 2rem));
    padding: 1rem;
    border: 1px solid var(--border-color, #ccd5df);
    border-radius: 1rem;
    background: var(--surface-color, #ffffff);
    color: var(--text-color, #17212b);
    box-shadow: 0 12px 35px rgb(0 0 0 / 18%);
    opacity: 0;
    transform: translateY(1rem);
    transition:
        opacity 200ms ease,
        transform 200ms ease;
}

.pwa-install-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pwa-install-icon {
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 0.8rem;
    background: #1f4e78;
    color: white;
    font-size: 1.4rem;
}

.pwa-install-content {
    display: grid;
    gap: 0.2rem;
}

.pwa-install-content span {
    font-size: 0.9rem;
    color: var(--muted-color, #586674);
}

.pwa-install-close {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 620px) {
    .pwa-install-banner {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .pwa-install-banner .button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .pwa-install-close {
        grid-column: 3;
        grid-row: 1;
    }
}



.meter-reading-panel {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid rgba(127, 127, 127, 0.22);
    border-radius: 0.9rem;
    background: rgba(127, 127, 127, 0.07);
}

.reading-label {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.72;
}

.meter-reading-panel .reading-value {
    margin: 0;
}

.meter-reading-panel .reading-value strong {
    font-size: clamp(2rem, 7vw, 2.8rem);
    line-height: 1;
}

.meter-reading-panel .reading-value span {
    margin-left: 0.25rem;
    font-weight: 600;
    opacity: 0.7;
}

.meter-reading-panel .reading-date {
    margin: 0.7rem 0 0;
}



/* Stabil knapp-layout på mätarkorten */
.meter-card {
    min-width: 0;
    overflow: hidden;
}

.card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    width: 100%;
}

.card-actions .button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
}

.card-actions .button-start-reading {
    grid-column: 1 / -1;
}

.meter-reading-panel .reading-value {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.meter-reading-panel .reading-value strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 680px) {
    .meter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .card-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .card-actions .button-start-reading {
        grid-column: auto;
    }

    .meter-reading-panel .reading-value strong {
        font-size: clamp(1.8rem, 10vw, 2.6rem);
    }
}


/* PWA-bannern får aldrig blockera sidan när den är dold */
.pwa-install-banner {
    pointer-events: none;
}

.pwa-install-banner.is-visible {
    pointer-events: auto;
}

.pwa-install-banner[hidden] {
    display: none !important;
}
