/* ---------- Mobile portal (design "MobileApp v2"), phone widths only ----------
 * Frame .mshell (MainLayout) with the bottom tab bar, and the m-* building blocks of Components/Mobile. Colours come from
 * the tokens of app.css (--mon-*, .st-<status> → --st / --st-bg / --st-fg), so the dark design follows.
 * Touch targets are at least 44 px (small controls get an invisible larger hit area), safe areas of notch and home bar are
 * kept free.
 */

.mshell {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--mon-bg);
    color: var(--mon-text);
    font-size: 13px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

.mshell-main {
    padding: max(6px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) calc(66px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    max-width: 100%;
}

/* Messages above the tab bar (design toast). */
.mshell .mud-snackbar-location-bottom-center {
    bottom: calc(62px + env(safe-area-inset-bottom)) !important;
}

/* ---------- tab bar ---------- */

.m-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: calc(50px + env(safe-area-inset-bottom));
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: var(--mon-surface);
    border-top: 1px solid var(--mon-border);
}

.m-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--mon-faint);
    text-decoration: none;
    min-height: 50px;
}

.m-tab.active {
    color: var(--mon-text);
}

.m-tab .mud-icon-root {
    font-size: 21px;
}

.m-tab-label {
    font-size: 10.5px;
    font-weight: 500;
}

.m-tab-badge {
    position: absolute;
    top: 4px;
    left: calc(50% + 5px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--st-down);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    display: grid;
    place-items: center;
    font-variant-numeric: tabular-nums;
}

/* ---------- screen, header ---------- */

.m-screen {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 16px;
    min-width: 0;
}

.m-screen.detail {
    gap: 10px;
}

.m-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 2px 0;
}

.m-head-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.m-kicker {
    font-size: 11.5px;
    color: var(--mon-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.015em;
    line-height: 1.25;
}

.m-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
}

.m-live {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--mon-muted);
    white-space: nowrap;
}

.m-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--st-unknown);
}

.m-live.on .m-live-dot {
    background: var(--st-up);
}

.m-iconbtn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid var(--mon-input-border);
    background: var(--mon-surface);
    color: var(--mon-text);
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
}

.m-iconbtn .mud-icon-root {
    font-size: 19px;
}

/* Invisible hit area of at least 44 px around small controls. */
.m-iconbtn::after,
.m-chip::after,
.m-link::after {
    content: "";
    position: absolute;
    inset: -6px;
}

.m-link {
    position: relative;
    border: 0;
    background: transparent;
    color: var(--mon-accent);
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    padding: 0 4px;
    cursor: pointer;
    flex: none;
}

.m-link:disabled {
    opacity: .5;
}

/* ---------- cards and rows ---------- */

.m-card {
    background: var(--mon-surface);
    border: 1px solid var(--mon-border);
    border-radius: 10px;
    overflow: hidden;
    min-width: 0;
}

.m-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 5px 12px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    min-width: 0;
}

.m-row + .m-row {
    border-top: 1px solid var(--mon-line);
}

.m-row:active {
    background: var(--mon-hover);
}

.m-row-empty {
    color: var(--mon-muted);
    cursor: default;
    justify-content: center;
    font-size: 12.5px;
}

.m-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--st, var(--st-unknown));
    flex: none;
}

.m-dot.sm {
    width: 7px;
    height: 7px;
}

.m-dot.lg {
    width: 9px;
    height: 9px;
}

.m-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.m-row-title {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-row-title.plain {
    font-weight: 400;
}

.m-row-title.strong {
    font-weight: 600;
}

.m-row-sub {
    font-size: 11.5px;
    color: var(--mon-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-row-sub.wrap {
    white-space: normal;
    text-wrap: pretty;
}

.m-row-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: none;
    max-width: 104px;
}

.m-val {
    display: flex;
    align-items: center;
    gap: 3px;
    font-family: var(--mon-font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--st-fg, var(--mon-text));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 104px;
}

.st-paused .m-val {
    color: var(--mon-muted);
}

.m-muted-icon.mud-icon-root {
    font-size: 14px;
    color: var(--mon-muted);
}

.m-since {
    font-size: 11px;
    color: var(--mon-faint);
}

.m-row-icon.mud-icon-root {
    font-size: 18px;
    color: var(--mon-muted);
    flex: none;
}

.m-chevron.mud-icon-root {
    font-size: 18px;
    color: var(--mon-faint);
    opacity: .7;
    flex: none;
}

.m-badges {
    display: flex;
    gap: 4px;
    flex: none;
}

.m-badge {
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 5px;
    background: var(--st-bg);
    color: var(--st-fg);
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

/* ---------- sections ---------- */

.m-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.m-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 20px;
    padding: 0 2px;
}

.m-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--mon-text-2);
    padding: 0 2px;
}

.m-section-head .m-section-title {
    padding: 0;
}

.m-section-info {
    font-size: 11.5px;
    color: var(--mon-muted);
}

.m-group-head {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 3px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mon-text-2);
}

.m-group-head .mud-icon-root {
    font-size: 15px;
}

.m-group-head .n {
    color: var(--mon-faint);
    font-weight: 500;
}

.m-empty {
    padding: 32px 12px;
    text-align: center;
    color: var(--mon-muted);
    font-size: 12.5px;
}

.m-empty.small {
    padding: 24px 12px;
}

/* ---------- overview ---------- */

.m-summary {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.m-summary-line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11.5px;
    color: var(--mon-muted);
}

.m-pad {
    padding: 0 2px;
}

.m-counters {
    display: grid;
    gap: 6px;
}

.m-counter {
    border-radius: 8px;
    padding: 5px 8px;
    min-height: 44px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background: var(--st-bg);
    color: var(--st-fg);
    text-decoration: none;
}

.m-counter .n {
    font-size: 17px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.m-counter .l {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.m-counters.matrix .m-counter {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    background: var(--mon-surface);
    border: 1px solid var(--mon-border);
}

.m-counters.matrix .sq {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--st);
    flex: none;
}

.m-counters.matrix .st-up .sq {
    background: color-mix(in srgb, var(--st-up) 40%, var(--mon-surface));
}

.m-counters.matrix .t {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.m-counters.matrix .n {
    font-size: 14px;
    line-height: 1.15;
}

.m-counters.matrix .l {
    font-size: 10.5px;
    color: var(--mon-muted);
}

.m-site-matrix {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 10px 10px;
    color: inherit;
    text-decoration: none;
}

.m-site-matrix-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
}

.m-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
}

.m-mdot {
    width: 7px;
    height: 7px;
    border-radius: 1.5px;
    background: var(--st);
}

.m-mdot.st-up {
    background: color-mix(in srgb, var(--st-up) 40%, var(--mon-surface));
}

.m-dots-more {
    font-size: 10.5px;
    color: var(--mon-muted);
    margin-left: 4px;
}

/* ---------- underline tabs (Probleme, Sensoren) ---------- */

.m-tabs {
    display: flex;
    gap: 14px;
    margin: 0 -12px;
    padding: 0 14px;
    border-bottom: 1px solid var(--mon-border);
    overflow-x: auto;
    scrollbar-width: none;
}

.m-tabs::-webkit-scrollbar {
    display: none;
}

.m-tabs.inset {
    margin: 0;
    padding: 0 3px;
}

.m-tabs-item {
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
    padding: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--mon-muted);
    font: inherit;
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    flex: none;
}

.m-tabs-item.active {
    color: var(--mon-text);
    border-bottom-color: var(--mon-text);
}

.m-tabs-item .n {
    font-size: 11px;
    color: var(--mon-faint);
    font-variant-numeric: tabular-nums;
}

/* ---------- devices ---------- */

.m-search {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 10px;
    border-radius: 9px;
    background: var(--mon-seg);
    margin: 0;
}

.m-search .mud-icon-root {
    font-size: 17px;
    color: var(--mon-faint);
}

.m-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    color: var(--mon-text);
    /* 16 px: iOS zooms into smaller input fields. */
    font: inherit;
    font-size: 16px;
}

.m-chips {
    display: flex;
    gap: 6px;
    margin: 0 -12px;
    padding: 6px 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.m-chips::-webkit-scrollbar {
    display: none;
}

.m-chips.wrap {
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    overflow: visible;
}

.m-chip {
    position: relative;
    flex: none;
    height: 32px;
    padding: 0 11px;
    border-radius: 16px;
    border: 1px solid var(--mon-input-border);
    background: var(--mon-surface);
    color: var(--mon-text);
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.m-chip.on {
    background: var(--mon-inverse);
    border-color: var(--mon-inverse);
    color: var(--mon-inverse-fg);
}

.m-chips .m-chip::after {
    inset: -6px -3px;
}

.m-kind {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--mon-chip);
    color: var(--mon-text-2);
    display: grid;
    place-items: center;
    flex: none;
}

.m-kind .mud-icon-root {
    font-size: 17px;
}

.m-kind.tinted {
    background: var(--st-bg);
    color: var(--st-fg);
}

.m-kind.lg {
    width: 36px;
    height: 36px;
    border-radius: 9px;
}

.m-kind.lg .mud-icon-root {
    font-size: 20px;
}

.m-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}

.m-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    min-height: 56px;
    padding: 6px 7px;
    border-radius: 8px;
    border: 1px solid var(--mon-border);
    background: var(--mon-surface);
    color: inherit;
    text-decoration: none;
}

.m-tile.tinted {
    background: var(--st-bg);
    border-color: color-mix(in srgb, var(--st) 30%, transparent);
}

.m-tile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    color: var(--mon-text-2);
}

.m-tile.tinted .m-tile-top {
    color: var(--st-fg);
}

.m-tile-top .mud-icon-root {
    font-size: 15px;
}

.m-tile-badge {
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.m-tile-name {
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-tile-sub {
    font-size: 10.5px;
    color: var(--mon-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- device and sensor pages ---------- */

.m-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    margin: 0 -8px;
}

.m-back,
.m-action {
    display: flex;
    align-items: center;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: var(--mon-accent);
    font: inherit;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    min-width: 0;
}

.m-back {
    padding: 0 6px 0 0;
}

.m-back .mud-icon-root {
    font-size: 24px;
    flex: none;
}

.m-back-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.m-action {
    gap: 4px;
    padding: 0 8px;
    flex: none;
}

.m-action .mud-icon-root {
    font-size: 18px;
}

.m-devhead {
    display: flex;
    align-items: center;
    gap: 10px;
}

.m-devname {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -.01em;
    overflow-wrap: anywhere;
}

.m-sensorhead {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.m-kpis {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
}

.m-kpi {
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.m-kpi + .m-kpi {
    border-left: 1px solid var(--mon-line);
}

.m-kpi .n {
    font-size: 15px;
    font-weight: 600;
    color: var(--st-fg, var(--mon-text));
    font-variant-numeric: tabular-nums;
}

.m-kpi .l {
    font-size: 10.5px;
    color: var(--mon-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 6px 0 10px;
    border-radius: 8px;
    background: var(--mon-seg);
    font-size: 12px;
    color: var(--mon-text-2);
}

.m-banner .mud-icon-root {
    font-size: 16px;
    flex: none;
}

.m-banner-text {
    flex: 1;
    min-width: 0;
}

.m-bays {
    display: grid;
    gap: 5px;
    padding: 8px;
}

.m-bay {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 44px;
    min-width: 0;
    padding: 5px 6px;
    border-radius: 6px;
    border: 1px solid var(--mon-border);
    background: var(--mon-surface-2);
    color: var(--mon-text);
    text-decoration: none;
}

.m-bay.tinted {
    background: var(--st-bg);
    border-color: color-mix(in srgb, var(--st) 30%, transparent);
    color: var(--st-fg);
}

.m-bay-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
}

.m-bay-top .m-dot {
    width: 6px;
    height: 6px;
}

.m-bay-name {
    font-size: 10.5px;
    color: var(--mon-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-bay-value {
    font-family: var(--mon-font-mono);
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-sensor {
    gap: 8px;
    padding: 4px 10px 4px 12px;
}

.m-sensor-name {
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-spark {
    flex: none;
    display: block;
}

.m-spark polyline {
    fill: none;
    stroke: var(--mon-faint);
    stroke-width: 1.25;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.m-sensor.st-down .m-spark polyline,
.m-sensor.st-warning .m-spark polyline {
    stroke: var(--st);
}

.m-sensor-val {
    width: 92px;
    flex: none;
    text-align: right;
    font-family: var(--mon-font-mono);
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-sensor.st-down .m-sensor-val,
.m-sensor.st-warning .m-sensor-val,
.m-sensor.st-unknown .m-sensor-val {
    color: var(--st-fg);
}

.m-sensor.st-paused .m-sensor-val {
    color: var(--mon-muted);
}

.m-valcard {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.m-valcard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.m-bigval {
    font-family: var(--mon-font-mono);
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -.02em;
    min-width: 0;
    overflow-wrap: anywhere;
}

.m-valcard.st-down .m-bigval,
.m-valcard.st-warning .m-bigval {
    color: var(--st-fg);
}

.m-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    background: var(--st-bg);
    color: var(--st-fg);
    font-size: 11.5px;
    font-weight: 600;
    flex: none;
}

.m-pill .m-dot {
    width: 6px;
    height: 6px;
}

.m-limits {
    font-size: 11.5px;
    color: var(--mon-faint);
}

.m-chartcard {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
}

.m-seg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 2px;
    border-radius: 8px;
    background: var(--mon-seg);
}

.m-seg button {
    height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--mon-text);
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.m-seg button.active {
    background: var(--mon-seg-active);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(28, 29, 31, .12);
}

.m-chart {
    position: relative;
    --m-line: var(--mon-accent);
    --m-fill: color-mix(in srgb, var(--mon-accent) 8%, transparent);
}

.m-chart.problem {
    --m-line: var(--st);
    --m-fill: var(--st-bg);
}

.m-chart svg {
    width: 100%;
    height: 150px;
    display: block;
    overflow: visible;
}

.m-chart .mid {
    stroke: var(--mon-line);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.m-chart .area {
    fill: var(--m-fill);
}

.m-chart .line {
    fill: none;
    stroke: var(--m-line);
    stroke-width: 1.75;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.m-chart .limit {
    stroke: var(--st);
    stroke-width: 1;
    stroke-dasharray: 4 3;
    vector-effect: non-scaling-stroke;
}

.m-ylabel {
    position: absolute;
    left: 0;
    padding: 0 3px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--mon-surface) 85%, transparent);
    font-family: var(--mon-font-mono);
    font-size: 10px;
    color: var(--mon-faint);
}

.m-xlabels {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    color: var(--mon-faint);
}

.m-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 6px;
    border-top: 1px solid var(--mon-line);
}

.m-stats > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.m-stats .l {
    font-size: 10.5px;
    color: var(--mon-muted);
}

.m-stats .v {
    font-family: var(--mon-font-mono);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-event {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 6px 12px;
}

.m-event + .m-event {
    border-top: 1px solid var(--mon-line);
}

.m-event .t {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.m-event .w {
    font-size: 11px;
    color: var(--mon-faint);
    flex: none;
}

/* ---------- options ---------- */

.m-options {
    max-width: 560px;
}

.m-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 8px 12px;
}

.m-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--st-paused-bg);
    color: var(--st-paused-fg);
    display: grid;
    place-items: center;
    font-size: 12.5px;
    font-weight: 600;
    flex: none;
}

.m-opt-val {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: none;
    font-size: 12.5px;
    color: var(--mon-muted);
}

.m-opt-val .mud-icon-root {
    font-size: 17px;
    color: var(--mon-faint);
}

.m-opt.current {
    cursor: default;
}

.m-opt.current .m-row-icon.mud-icon-root {
    color: var(--st-up);
}

.m-logout {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--mon-border);
    border-radius: 10px;
    background: var(--mon-surface);
    color: var(--st-down-fg);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.m-logout .mud-icon-root {
    font-size: 18px;
}

.m-version {
    text-align: center;
    font-size: 11px;
    color: var(--mon-faint);
}

/* ---------- pause sheet ---------- */

.m-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(28, 29, 31, .32);
}

.m-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1301;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 6px max(12px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border-radius: 14px 14px 0 0;
    background: var(--mon-bg);
    color: var(--mon-text);
    font-size: 13px;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .12);
}

.m-sheet-handle {
    align-self: center;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--mon-toggle-off);
    flex: none;
}

.m-sheet-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 2px;
}

.m-sheet-title {
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.m-sheet-opts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}

.m-sheet-opt {
    min-height: 48px;
    padding: 4px 2px;
    border: 1px solid var(--mon-border);
    border-radius: 8px;
    background: var(--mon-surface);
    color: var(--mon-text);
    font: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    cursor: pointer;
    min-width: 0;
}

.m-sheet-opt:disabled {
    opacity: .5;
}

.m-sheet-opt .l {
    font-size: 12.5px;
    font-weight: 600;
}

.m-sheet-opt .u {
    font-size: 10.5px;
    color: var(--mon-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.m-sheet-cancel {
    min-height: 44px;
    border: 0;
    background: transparent;
    color: var(--mon-accent);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

/* Other portal pages inside the mobile frame (Ereignisse, Einstellungen …) keep their responsive desktop layout. */
.mshell .page-header {
    margin-top: 8px;
}
