@media (max-width: 700px) {
    body.customer-view > header {
        position: sticky;
        top: 0;
        flex-wrap: nowrap;
        padding-inline: clamp(8px, 4vw, 20px);
    }
    body.customer-view > header .brand {
        flex: 0 0 clamp(100px, 36vw, 180px);
        min-width: 0;
    }
    body.customer-view > header .brand .collectra-logo {
        width: 100%;
        height: auto;
    }
    body.customer-view > header #identity:not(:empty) {
        padding-inline: 6px;
    }
    body.customer-view .meter-dashboard,
    body.customer-view .dashboard-meter,
    body.customer-view .dashboard-usage-content {
        min-width: 0;
    }
    body.customer-view .meter-dashboard,
    body.customer-view .dashboard-meter {
        grid-template-columns: minmax(0, 1fr);
    }
    body.customer-view .dashboard-counter-panel {
        overflow-x: auto;
    }
    body.customer-view #filterForm select,
    body.customer-view .dashboard-usage-range,
    body.customer-view #collectraBillingPeriod,
    #loginForm input,
    #passwordForm input {
        font-size: 16px !important;
    }
}

body.customer-view .meter-usage-tile.today-usage-trigger {
    position: relative;
    width: 100%;
    border: 1px solid #cce5e6;
    border-left: 3px solid #007b83;
    border-radius: 7px;
    padding: 4px 6px;
    gap: 1px;
    align-content: start;
    line-height: 1.15;
    background: #eaf5f5;
    text-align: start;
    white-space: normal;
    overflow-wrap: anywhere;
}
body.customer-view .today-usage-trigger > span { padding-inline-end: 15px; }
body.customer-view .today-usage-trigger > strong { font-size: .9rem; }
body.customer-view .meter-usage-tile.today-usage-trigger:hover { background: #dff1f1; }
body.customer-view .today-usage-trigger > svg {
    position: absolute;
    top: 5px;
    inset-inline-end: 6px;
    width: 12px;
    height: 12px;
    fill: none;
    stroke: #007b83;
    stroke-width: 1.5;
    stroke-linecap: round;
}
.today-usage-trigger:focus-visible, #collectraTodayUsage :focus-visible {
    outline: 2px solid #007b83;
    outline-offset: 2px;
}
#collectraTodayUsage {
    box-sizing: border-box;
    width: min(490px, calc(100% - 24px));
    max-height: calc(100% - 24px);
    border: 1px solid #cfe4e8;
    border-radius: 14px;
    padding: 14px;
    color: #102a47;
    background: #fff;
    box-shadow: 0 16px 48px #102a4733;
}
#collectraTodayUsage::backdrop { background: #102a4773; }
#collectraTodayUsage .today-usage-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#collectraTodayUsage h2 { margin: 0; font-size: 1.15rem; }
#collectraTodayUsage .today-usage-header button { min-height: 36px; padding: 5px 10px; }
#collectraTodayUsage p { margin: 3px 0 7px; color: #496875; font-size: .8rem; }
#collectraTodayUsage .dashboard-usage-tabs { margin: 2px 0 8px; }
#collectraTodayUsage svg { display: block; width: 100%; height: auto; margin-top: 8px; overflow: visible; }
#collectraTodayUsage svg text { fill: #496875; font: 12px system-ui, sans-serif; }
#collectraTodayUsage .today-usage-grid { stroke: #dae9eb; }
#collectraTodayUsage .today-usage-series-forward { color: #007b83; }
#collectraTodayUsage .today-usage-series-reverse { color: #b45d14; }
#collectraTodayUsage .today-usage-trend { stroke: currentColor; stroke-width: 2; }
#collectraTodayUsage .today-usage-series-reverse .today-usage-trend { stroke-dasharray: 5 4; }
#collectraTodayUsage .today-usage-point { fill: currentColor; stroke: #fff; stroke-width: 1; }
#collectraTodayUsage .today-usage-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; }
#collectraTodayUsage .today-usage-legend span::before {
    content: '';
    display: inline-block;
    width: 15px;
    border-top: 2px solid #007b83;
    margin-inline-end: 5px;
    vertical-align: middle;
}
#collectraTodayUsage span.today-usage-key-reverse::before { border-top: 2px dashed #b45d14; }
#collectraTodayUsage summary { padding: 6px 0; color: #006a73; cursor: pointer; font-size: .8rem; }
#collectraTodayUsage .today-usage-table { max-height: 180px; overflow: auto; }
#collectraTodayUsage table { width: 100%; table-layout: auto; font-size: .78rem; }
#collectraTodayUsage th, #collectraTodayUsage td { padding: 6px; }
#collectraTodayUsage :is(th, td):not(:first-child) { text-align: end; }

#collectraTodayUsage .today-usage-series-reactive { color: #6245a1; }
#collectraTodayUsage .today-usage-series-reactive .today-usage-trend { stroke-dasharray: 2 3; }
#collectraTodayUsage .today-usage-legend span.today-usage-key-reactive::before { border-top: 2px dotted #6245a1; }
body.customer-view .dashboard-counter-table {
    border: 0;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}
body.customer-view .dashboard-counter-table :is(th, td) {
    border: 0;
    padding: 2px 3px;
    background: transparent;
    color: #254b55;
    text-align: center;
    vertical-align: middle;
    font-size: .75rem;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
}
body.customer-view .dashboard-counter-table :is(th, td):first-child {
    width: 4.5rem;
    text-align: start;
}
.dashboard-counter-unit {
    display: block;
    font-size: .67rem;
    font-weight: 400;
}
.dashboard-counter-panel .dashboard-counter-history {
    display: grid;
    place-items: center;
    width: 26px;
    min-height: 28px;
    padding: 0;
}
.dashboard-counter-history svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@media (max-width: 600px) {
    body.customer-view .dashboard-counter-table :is(th, td):first-child { width: 3.75rem; }
    .dashboard-counter-table .meter-digit {
        width: clamp(7px, 2.65vw, 11px);
        font-size: clamp(12px, 3.7vw, 17px);
    }
    .dashboard-counter-table .meter-counter-face { gap: 1px; }
}
#collectraDailyPopup .history-popup-table table { min-width: 630px; }
#collectraDailyPopup .history-popup-table :is(th, td):first-child {
    width: 12ch;
    white-space: nowrap;
}
@media (min-width: 601px) and (max-width: 700px) {
    #collectraDailyPopup .history-popup-table table { min-width: 570px; }
}
@media (max-width: 600px) {
    #collectraDailyPopup .history-popup-table table { min-width: 400px; }
    #collectraDailyPopup .meter-counter-face { gap: 1px; }
}
.dashboard-usage-scroll { overflow-x: auto; }
.dashboard-axis-unit {
    display: block;
    margin: 0 3px;
    font-size: .72rem;
    line-height: 1.15;
}
.dashboard-chart-panel .dashboard-chart { margin-top: 0; }
.dashboard-usage-summary {
    display: flex;
    justify-content: safe center;
    gap: 8px;
    padding-inline: 3px;
    line-height: 1.25;
    overflow-x: auto;
    white-space: nowrap;
}
.dashboard-usage-summary > span { font-size: .7rem; color: #254b55; }
.dashboard-chart-heading { align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.dashboard-usage-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-inline-start: auto; }
.dashboard-usage-tabs {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border: 1px solid #d8e6ea;
    border-radius: 8px;
    background: #f1f6f7;
}
.dashboard-usage-tabs button {
    border: 0;
    border-radius: 5px;
    padding: 5px 8px;
    min-height: 28px;
    background: transparent;
    color: #4d6579;
    font: inherit;
    font-size: .75rem;
}
.dashboard-usage-tabs button[aria-pressed="true"] {
    background: #dff2ef;
    color: #00666e;
    font-weight: 700;
}
.dashboard-usage-tabs button:focus-visible { outline: 2px solid #007b83; outline-offset: 2px; }

.dashboard-usage-summary .dashboard-usage-reactive::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-inline-end: 5px;
    border-radius: 2px;
    background: #6245a1;
}
.dashboard-chart .chart-bar.chart-bar-reactive { fill: #6245a1; }
.dashboard-chart .chart-bar.chart-bar-reverse { fill: #b45d14; }
.dashboard-usage-summary .dashboard-usage-forward::before,
.dashboard-usage-summary .dashboard-usage-reverse::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-inline-end: 5px;
    border-radius: 2px;
    background: #007b83;
}
.dashboard-usage-summary .dashboard-usage-reverse::before { background: #b45d14; }

#collectraTodayUsage .today-usage-series-reverseReactive { color: #a53c74; }
#collectraTodayUsage .today-usage-series-reverseReactive .today-usage-trend { stroke-dasharray: 7 3 2 3; }
#collectraTodayUsage .today-usage-legend span.today-usage-key-reverseReactive::before { border-top: 2px dashed #a53c74; }
.dashboard-chart .chart-bar.chart-bar-reverseReactive { fill: #a53c74; }
.dashboard-usage-summary .dashboard-usage-reverseReactive::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-inline-end: 5px;
    border-radius: 2px;
    background: #a53c74;
}
