:root {
    color-scheme: dark;
    --bg: #0a0f0d;
    --bg-strong: #080c0a;
    --panel: #111a15;
    --panel-soft: #182319;
    --panel-strong: #0e1511;
    --line: rgba(110, 227, 58, 0.18);
    --line-soft: rgba(110, 227, 58, 0.1);
    --text: #e8f5e9;
    --text-soft: #9ab99f;
    --text-muted: #68846d;
    --cyan: #19c3f5;
    --green: #6ee33a;
    --amber: #ffb000;
    --red: #f03b52;
    --purple: #3dd6c8;
    --glow: rgba(110, 227, 58, 0.3);
    --shadow: 0 20px 70px rgba(0, 0, 0, 0.34);
    --radius: 14px;
}

:root[data-theme="light"],
body[data-theme="light"] {
    color-scheme: light;
    --bg: #f0f7f0;
    --bg-strong: #e6f2e6;
    --panel: #ffffff;
    --panel-soft: #e8f5e9;
    --panel-strong: #dcebdc;
    --line: rgba(13, 31, 16, 0.14);
    --line-soft: rgba(13, 31, 16, 0.08);
    --text: #0d1f10;
    --text-soft: #3d6644;
    --text-muted: #719176;
    --cyan: #087ea4;
    --green: #389414;
    --amber: #b45309;
    --red: #b42318;
    --purple: #0e9f92;
    --glow: rgba(56, 148, 20, 0.18);
    --shadow: 0 14px 34px rgba(13, 31, 16, 0.1);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
    background:
        radial-gradient(ellipse 70% 52% at 18% -12%, rgba(110, 227, 58, 0.13), transparent 58%),
        radial-gradient(circle at 92% 18%, rgba(61, 214, 200, 0.08), transparent 34%),
        linear-gradient(180deg, var(--bg), var(--bg-strong));
    color: var(--text);
    font-family: Aptos, "Segoe UI Variable", "Segoe UI", sans-serif;
}

body[data-theme="light"] {
    background:
        radial-gradient(ellipse 70% 52% at 18% -12%, rgba(56, 148, 20, 0.16), transparent 58%),
        radial-gradient(circle at 92% 18%, rgba(8, 126, 164, 0.09), transparent 34%),
        linear-gradient(180deg, var(--bg), #f7fbf7);
}

html[data-theme="light"] body,
body[data-theme="light"] {
    color: var(--text);
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

a,
.btn-link {
    color: var(--cyan);
}

.m4-app {
    min-height: 100vh;
    padding: 20px 24px 36px;
}

.shell {
    position: relative;
}

.shell-main {
    padding-top: 48px;
}

.theme-toggle-shell {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 1200;
}

.theme-toggle {
    box-shadow: var(--shadow);
}

.auth-gate {
    min-height: calc(100vh - 48px);
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(440px, 100%);
    display: grid;
    gap: 20px;
    padding: 36px;
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.auth-brand {
    display: grid;
    gap: 6px;
}

.auth-mark {
    color: var(--text);
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.06em;
}

.auth-mark span {
    color: var(--green);
}

.auth-brand p,
.auth-copy p {
    margin: 0;
    color: var(--text-soft);
}

.auth-brand p {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-copy {
    display: grid;
    gap: 8px;
}

.auth-copy h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(30px, 5vw, 42px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.auth-copy h1:focus,
.auth-copy h1:focus-visible {
    outline: 0;
}

.auth-card:focus,
.auth-card:focus-visible,
.auth-card:focus-within {
    outline: 0;
}

.auth-copy p {
    font-size: 14px;
    line-height: 1.5;
}

.auth-form {
    display: grid;
    gap: 13px;
}

.auth-form label {
    display: grid;
    gap: 6px;
}

.auth-form label > span {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-submit {
    min-height: 46px;
    border-radius: 12px !important;
    font-weight: 800 !important;
}

.auth-error {
    margin: 0;
}

html[data-theme="light"] .auth-gate,
body[data-theme="light"] .auth-gate {
    background: #f7fbf7;
}

html[data-theme="light"] .auth-card,
body[data-theme="light"] .auth-card {
    background: #ffffff;
    border-color: rgba(56, 148, 20, 0.12);
    box-shadow: 0 18px 42px rgba(13, 31, 16, 0.1), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

html[data-theme="light"] .auth-card.login-panel,
body[data-theme="light"] .auth-card.login-panel {
    background: #ffffff !important;
}

html[data-theme="light"] .auth-card.login-panel::before,
body[data-theme="light"] .auth-card.login-panel::before {
    display: none;
}

html[data-theme="light"] .auth-mark,
body[data-theme="light"] .auth-mark {
    color: #0d1f10;
}

html[data-theme="light"] .auth-brand p,
html[data-theme="light"] .auth-copy p,
body[data-theme="light"] .auth-brand p,
body[data-theme="light"] .auth-copy p {
    color: #3d6644;
}

html[data-theme="light"] .auth-copy h1,
body[data-theme="light"] .auth-copy h1 {
    color: #0d1f10;
}

html[data-theme="light"] .auth-form label > span,
body[data-theme="light"] .auth-form label > span {
    color: #3d6644;
}

html[data-theme="light"] .auth-card .mud-input-root,
html[data-theme="light"] .auth-card .mud-input-control,
html[data-theme="light"] .auth-card .mud-input-slot,
html[data-theme="light"] .auth-card .mud-select-input,
body[data-theme="light"] .auth-card .mud-input-root,
body[data-theme="light"] .auth-card .mud-input-control,
body[data-theme="light"] .auth-card .mud-input-slot,
body[data-theme="light"] .auth-card .mud-select-input {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

html[data-theme="light"] .auth-card .mud-input-root,
html[data-theme="light"] .auth-card .mud-select-outlined,
html[data-theme="light"] .auth-card .mud-select-filled,
html[data-theme="light"] .auth-card .mud-input-outlined-border,
body[data-theme="light"] .auth-card .mud-input-root,
body[data-theme="light"] .auth-card .mud-select-outlined,
body[data-theme="light"] .auth-card .mud-select-filled,
body[data-theme="light"] .auth-card .mud-input-outlined-border {
    border-color: rgba(56, 148, 20, 0.18) !important;
}

html[data-theme="light"] .auth-card .mud-input-root:focus-within,
body[data-theme="light"] .auth-card .mud-input-root:focus-within {
    border-color: rgba(56, 148, 20, 0.42) !important;
}

html[data-theme="light"] .auth-submit,
body[data-theme="light"] .auth-submit {
    box-shadow: 0 10px 24px rgba(56, 148, 20, 0.14);
}

html[data-theme="light"] .auth-submit:hover,
body[data-theme="light"] .auth-submit:hover {
    filter: brightness(0.98);
}

html[data-theme="light"] .auth-error,
body[data-theme="light"] .auth-error {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(180, 83, 9, 0.18);
}

.m4-topbar,
.detail-header {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 68px;
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(17, 26, 21, 0.96), rgba(13, 20, 16, 0.94)),
        radial-gradient(circle at 0 0, rgba(110, 227, 58, 0.15), transparent 32%);
    box-shadow: var(--shadow);
}

.m4-topbar {
    position: sticky;
    top: 10px;
    z-index: 10;
    backdrop-filter: blur(16px);
}

.m4-topbar::before {
    content: "";
    align-self: stretch;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--green), var(--purple));
    box-shadow: 0 0 22px var(--glow);
}

.view-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
    padding: 6px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(17, 26, 21, 0.74);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
    overflow-x: auto;
}

.m4-brand,
.detail-device-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 250px;
}

.m4-brand h1,
.detail-device-card h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.m4-brand h1:focus,
.detail-device-card h1:focus {
    outline: 0;
}

.m4-brand span,
.detail-device-card p,
.device-state,
.asset-column small,
.asset-identity small,
.row-meta small,
.detail-header-fields small {
    color: var(--text-soft);
}

.m4-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex: 1 1 auto;
    min-width: 0;
}

.m4-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.m4-status-chip span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--amber);
}

.m4-status-chip.is-connected {
    color: var(--green);
    background: rgba(110, 227, 58, 0.08);
}

.m4-status-chip.is-connected span {
    background: var(--green);
    box-shadow: 0 0 10px var(--glow);
}

.searchbox {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(340px, 38vw);
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

.searchbox input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.searchbox input::placeholder {
    color: #a5adbc;
}

html[data-theme="light"] .searchbox input::placeholder,
body[data-theme="light"] .searchbox input::placeholder {
    color: #6b7280;
}

.icon-button,
.status-icon,
.tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-button {
    width: 40px;
    height: 40px;
}

.icon-button.compact {
    width: 34px;
    height: 34px;
}

.manage4all-logo-button {
    padding: 0;
}

.manage4all-logo-button img {
    display: block;
    width: 74%;
    height: 74%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.icon-button:hover,
.status-icon:hover,
.tab-button:hover,
.icon-button.is-active {
    border-color: rgba(110, 227, 58, 0.38);
    background: rgba(110, 227, 58, 0.09);
    color: var(--green);
}

.icon-button:active,
.status-icon:active,
.tab-button:active {
    transform: translateY(1px);
}

.icon-button.is-loading {
    cursor: progress;
}

.icon-button.is-loading .mud-icon-root,
.icon-button.is-loading .m4-icon,
.icon-button.is-loading svg {
    animation: icon-spin 1s linear infinite;
    transform-origin: 50% 50%;
}

@keyframes icon-spin {
    from {
        transform: scaleX(-1) rotate(0deg);
    }

    to {
        transform: scaleX(-1) rotate(-360deg);
    }
}

.m4-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
}

.m4-icon .mud-icon-root {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.mud-icon-bridge {
    min-width: 0 !important;
    padding: 0 !important;
    border-radius: 4px !important;
}

.m4-search {
    flex: 1 1 340px;
    width: min(440px, 42vw);
    min-width: 220px;
}

.m4-search .mud-input-control {
    margin-top: 0;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
}

.m4-search .mud-input-root,
.settings-grid .mud-input-root {
    min-height: 40px;
    color: var(--text);
    background: var(--panel-soft);
}

html[data-theme="light"] .m4-search .mud-input-root,
html[data-theme="light"] .settings-grid .mud-input-root,
html[data-theme="light"] .searchbox,
body[data-theme="light"] .m4-search .mud-input-root,
body[data-theme="light"] .settings-grid .mud-input-root,
body[data-theme="light"] .searchbox {
    background: #ffffff;
}

html[data-theme="light"] .m4-search .mud-input-root,
html[data-theme="light"] .settings-grid .mud-input-root,
body[data-theme="light"] .m4-search .mud-input-root,
body[data-theme="light"] .settings-grid .mud-input-root {
    color: #111827;
}

html[data-theme="light"] .m4-search .mud-input-outlined-border,
html[data-theme="light"] .settings-grid .mud-input-outlined-border,
html[data-theme="light"] .searchbox,
body[data-theme="light"] .m4-search .mud-input-outlined-border,
body[data-theme="light"] .settings-grid .mud-input-outlined-border,
body[data-theme="light"] .searchbox {
    border-color: var(--line) !important;
}

.settings-grid .mud-input-root {
    background: var(--panel-strong);
}

.m4-search .mud-input-outlined-border,
.settings-grid .mud-input-outlined-border {
    border-color: var(--line) !important;
}

.mud-input-root,
.mud-input-root .mud-input-slot,
.mud-input-root .mud-input-input,
.mud-select .mud-select-input,
.mud-select .mud-input-input,
.mud-select .mud-input-slot,
.mud-select .mud-input-label,
.mud-input-label,
.mud-input-adornment,
.mud-select-label,
.mud-input-helper-text,
.mud-select .mud-list-item-text,
.mud-popover .mud-list-item-text,
.mud-popover .mud-select-item,
.mud-input-root input {
    color: var(--text) !important;
    -webkit-text-fill-color: var(--text);
    caret-color: var(--text);
}

.mud-input-root .mud-input-label,
.mud-input-label,
.mud-select-label,
.mud-input-helper-text {
    color: var(--text-soft) !important;
}

.mud-input-root .mud-input-input::placeholder,
.mud-input-root input::placeholder {
    color: var(--text-muted) !important;
    opacity: 1;
}

html[data-theme="light"] .mud-input-root,
html[data-theme="light"] .mud-input-root .mud-input-slot,
html[data-theme="light"] .mud-input-root .mud-input-input,
html[data-theme="light"] .mud-select .mud-select-input,
html[data-theme="light"] .mud-select .mud-input-input,
html[data-theme="light"] .mud-select .mud-input-slot,
html[data-theme="light"] .mud-select .mud-input-label,
html[data-theme="light"] .mud-input-label,
html[data-theme="light"] .mud-input-adornment,
html[data-theme="light"] .mud-select-label,
html[data-theme="light"] .mud-input-helper-text,
html[data-theme="light"] .mud-select .mud-list-item-text,
html[data-theme="light"] .mud-popover .mud-list-item-text,
html[data-theme="light"] .mud-popover .mud-select-item,
html[data-theme="light"] .mud-input-root input,
body[data-theme="light"] .mud-input-root,
body[data-theme="light"] .mud-input-root .mud-input-slot,
body[data-theme="light"] .mud-input-root .mud-input-input,
body[data-theme="light"] .mud-select .mud-select-input,
body[data-theme="light"] .mud-select .mud-input-input,
body[data-theme="light"] .mud-select .mud-input-slot,
body[data-theme="light"] .mud-select .mud-input-label,
body[data-theme="light"] .mud-input-label,
body[data-theme="light"] .mud-input-adornment,
body[data-theme="light"] .mud-select-label,
body[data-theme="light"] .mud-input-helper-text,
body[data-theme="light"] .mud-select .mud-list-item-text,
body[data-theme="light"] .mud-popover .mud-list-item-text,
body[data-theme="light"] .mud-popover .mud-select-item,
body[data-theme="light"] .mud-input-root input {
    color: #111827 !important;
    -webkit-text-fill-color: #111827;
    caret-color: #111827;
}

html[data-theme="light"] .mud-input-root .mud-input-label,
html[data-theme="light"] .mud-input-label,
html[data-theme="light"] .mud-select-label,
html[data-theme="light"] .mud-input-helper-text,
body[data-theme="light"] .mud-input-root .mud-input-label,
body[data-theme="light"] .mud-input-label,
body[data-theme="light"] .mud-select-label,
body[data-theme="light"] .mud-input-helper-text {
    color: #4b5563 !important;
}

html[data-theme="light"] .mud-input-root .mud-input-input::placeholder,
html[data-theme="light"] .mud-input-root input::placeholder,
body[data-theme="light"] .mud-input-root .mud-input-input::placeholder,
body[data-theme="light"] .mud-input-root input::placeholder {
    color: #6b7280 !important;
}

.mud-paper {
    color: var(--text);
    background-color: transparent;
}

.mud-button-filled-primary {
    color: #06131b !important;
}

.mud-chip {
    border-radius: 4px !important;
}

.mud-alert {
    border-radius: 10px;
}

.ops-summary {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(170px, 1fr));
    gap: 12px;
    margin: 0 0 14px;
}

.ops-card {
    position: relative;
    display: grid;
    gap: 7px;
    min-height: 118px;
    padding: 16px 18px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(17, 26, 21, 0.92), rgba(13, 20, 16, 0.94)),
        radial-gradient(circle at 100% 0, rgba(110, 227, 58, 0.12), transparent 38%);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
}

button.ops-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
    appearance: none;
    border: 1px solid var(--line-soft);
}

button.ops-card:focus-visible {
    outline: 2px solid rgba(110, 227, 58, 0.48);
    outline-offset: 2px;
}

.ops-card-toggle.is-active {
    box-shadow: 0 0 0 1px rgba(110, 227, 58, 0.45), 0 14px 42px rgba(0, 0, 0, 0.22);
}

.ops-card::after {
    content: "";
    position: absolute;
    right: 16px;
    bottom: 0;
    left: 16px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--green), transparent);
    opacity: 0.75;
}

.ops-card-primary {
    background:
        linear-gradient(135deg, rgba(110, 227, 58, 0.16), rgba(17, 26, 21, 0.94) 58%),
        var(--panel);
}

.ops-card-command {
    background:
        linear-gradient(135deg, rgba(61, 214, 200, 0.11), rgba(17, 26, 21, 0.94) 58%),
        var(--panel);
}

.ops-label {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.ops-card strong {
    color: var(--text);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.055em;
}

.ops-card small {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.3;
}

.settings-panel,
.notice,
.customer-filter,
.asset-table-shell,
.detail-content,
.detail-tabs {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(17, 26, 21, 0.92);
    box-shadow: var(--shadow);
}

.settings-panel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    margin-top: 12px;
    padding: 16px;
}

.login-panel {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(110, 227, 58, 0.11), rgba(17, 26, 21, 0.94) 42%),
        var(--panel) !important;
}

.login-panel::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 34px;
    right: 34px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--green), transparent);
}

.login-copy {
    display: grid;
    align-content: center;
    gap: 4px;
    max-width: 220px;
}

.login-copy strong {
    color: var(--text);
    font-size: 18px;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.login-copy span {
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.35;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 12px;
}

.settings-grid label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.settings-grid span,
.asset-table-meta,
.connection-state {
    color: var(--text-soft);
    font-size: 13px;
}

.toggle-line {
    grid-column: 1 / -1;
    margin-top: 2px;
}

.settings-actions {
    display: flex;
    align-items: end;
    gap: 12px;
}

.primary-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    border: 0;
    padding: 0 14px;
    background: var(--cyan);
    color: #06131b;
    cursor: pointer;
}

.primary-action:disabled {
    opacity: 0.55;
    cursor: default;
}

.notice {
    margin-top: 12px;
    padding: 12px 14px;
}

.customer-filter {
    margin-top: 12px;
    padding: 12px 14px;
}

.customer-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.customer-select {
    flex: 1 1 360px;
    min-width: 0;
}

.customer-select .mud-input-control,
.customer-select .mud-input-root,
.customer-select .mud-input-slot,
.customer-select .mud-input-input {
    background: var(--panel-soft) !important;
}

.customer-select .mud-input-root {
    border-color: var(--line-soft) !important;
}

.mud-popover,
.mud-popover .mud-paper,
.mud-popover .mud-menu-paper,
.mud-popover .mud-list-padding,
.mud-popover .mud-list,
.mud-popover .mud-list-item,
.mud-popover .mud-list-item-button {
    background: var(--panel) !important;
    background-color: var(--panel) !important;
    background-image: none !important;
}

.mud-popover {
    color: var(--text) !important;
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow);
}

html[data-theme="light"] .mud-popover,
body[data-theme="light"] .mud-popover {
    color: #111827 !important;
}

.page-size-select {
    flex: 0 0 142px;
}

.customer-select .mud-input-control {
    margin-top: 0;
}

.customer-select .mud-input-control,
.customer-select .mud-input-root,
.customer-select .mud-input-slot,
.customer-select .mud-input-input,
.customer-select .mud-select-input,
.customer-select .mud-select-filled,
.customer-select .mud-select-outlined {
    background: var(--panel) !important;
    background-color: var(--panel) !important;
    background-image: none !important;
}

.customer-select .mud-popover,
.customer-select .mud-menu-paper,
.customer-select .mud-menu-list,
.customer-select .mud-list,
.customer-select .mud-list-padding,
.customer-select .mud-list-item,
.customer-select .mud-list-item-button {
    background: var(--panel) !important;
    background-color: var(--panel) !important;
    background-image: none !important;
}

.asset-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
    color: var(--text-soft);
    font-size: 13px;
}

.asset-pagination-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.page-state {
    color: var(--text-soft);
}

.demo-json-panel {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.demo-json-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.demo-json-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.demo-json-editor .mud-input-root {
    min-height: 220px;
}

.customer-scope {
    flex: 0 0 auto;
}

.notice.is-success {
    border-left: 4px solid var(--green);
}

.notice.is-warning {
    border-left: 4px solid var(--amber);
}

.asset-table-shell {
    margin-top: 14px;
    overflow: hidden;
}

.asset-table-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-soft);
    background: linear-gradient(90deg, rgba(110, 227, 58, 0.07), transparent);
}

.asset-table-meta-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.asset-grid {
    --asset-grid-min-width: 1750px;
    width: 100%;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
}

.asset-grid .mud-table-container {
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

.asset-grid table {
    width: 100% !important;
    min-width: var(--asset-grid-min-width) !important;
    table-layout: fixed;
}

.asset-grid thead,
.asset-grid .mud-table-head {
    display: table-header-group !important;
    visibility: visible !important;
    height: auto !important;
}

.asset-grid .mud-table-head .mud-table-row {
}

.asset-grid .mud-table-head .mud-table-cell {
    min-width: 0;
    padding: 10px 14px;
    border: 0;
    background: rgba(13, 20, 16, 0.96);
    color: var(--text-soft);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.asset-grid .mud-table-head .asset-grid-rail-header,
.asset-grid tr.asset-grid-row > td.asset-grid-rail-cell {
    width: 8px;
    min-width: 8px;
    max-width: 8px;
    padding: 10px 0;
}

.asset-grid .mud-table-head .asset-grid-identity-header,
.asset-grid tr.asset-grid-row > td.asset-grid-identity-cell {
    width: 240px;
    min-width: 96px;
}

.asset-grid .mud-table-head .asset-grid-column-header,
.asset-grid tr.asset-grid-row > td.asset-grid-column-cell {
    width: 180px;
    min-width: 64px;
}

.asset-grid .mud-table-head .asset-grid-badge-status-header,
.asset-grid tr.asset-grid-row > td.asset-grid-badge-status-cell {
    width: 130px;
    min-width: 130px;
    max-width: 130px;
}

.asset-grid .mud-table-head .asset-grid-status-header,
.asset-grid tr.asset-grid-row > td.asset-grid-status-cell {
    width: 330px !important;
    min-width: 330px !important;
    max-width: 330px !important;
}

.asset-grid .mud-table-head .asset-grid-actions-header,
.asset-grid tr.asset-grid-row > td.asset-grid-actions-cell {
    width: 142px !important;
    min-width: 142px !important;
    max-width: 142px !important;
}

.asset-grid .mud-table-head .mud-table-cell .column-header {
    width: 100%;
    min-width: 0;
}

.asset-grid .mud-table-head .mud-table-cell .column-options,
.asset-grid .mud-table-head .mud-table-cell .sort-direction-icon,
.asset-grid .mud-table-head .mud-table-cell .drag-icon-options {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.asset-grid .mud-table-head,
.asset-grid .mud-table-head *,
.asset-grid tr.asset-grid-row > td,
.asset-grid tr.asset-grid-row > td * {
    -webkit-user-select: none;
    user-select: none;
}

.asset-grid .mud-table-head .mud-table-cell,
.asset-grid tr.asset-grid-row > td {
    cursor: default;
}

.asset-grid .mud-table-head .mud-table-cell:hover .column-options,
.asset-grid .mud-table-head .mud-table-cell:hover .sort-direction-icon,
.asset-grid .mud-table-head .mud-table-cell:hover .drag-icon-options,
.asset-grid .mud-table-head .mud-table-cell:focus-within .column-options,
.asset-grid .mud-table-head .mud-table-cell:focus-within .sort-direction-icon,
.asset-grid .mud-table-head .mud-table-cell:focus-within .drag-icon-options {
    opacity: 1;
}

.asset-grid tr.asset-grid-row {
    min-height: 66px;
    background: linear-gradient(90deg, rgba(17, 26, 21, 0.95), rgba(20, 30, 24, 0.95));
    border-bottom: 1px solid rgba(110, 227, 58, 0.08);
    color: var(--text);
    cursor: pointer;
}

.asset-grid tr.asset-grid-row:hover {
    background: linear-gradient(90deg, rgba(24, 38, 27, 0.98), rgba(19, 36, 31, 0.98));
    outline: 1px solid rgba(110, 227, 58, 0.38);
    outline-offset: -1px;
}

.asset-grid tr.asset-grid-row:focus-within {
    outline: 2px solid var(--cyan);
    outline-offset: -2px;
}

.asset-grid tr.asset-grid-row > td {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent !important;
    color: inherit;
    vertical-align: top;
    overflow: hidden;
}

.asset-grid tbody td.sticky-left,
.asset-grid tbody td.sticky-right {
    position: static !important;
    left: auto !important;
    right: auto !important;
    z-index: auto !important;
}

.asset-grid tr.asset-grid-row > td.asset-grid-rail-cell {
    width: 10px;
    min-width: 10px;
    max-width: 10px;
    padding: 0;
    overflow: hidden;
}

.asset-grid tr.asset-grid-row > td.asset-grid-status-cell,
.asset-grid tr.asset-grid-row > td.asset-grid-actions-cell {
    white-space: nowrap;
}

.asset-grid .mud-table-cell .mud-button-root {
    color: inherit;
}

.asset-grid tbody > tr:has(> td.mud-table-child-content:empty) {
    display: none !important;
}

.asset-grid .mud-table-child-row {
    display: table-row !important;
}

.asset-grid .mud-table-child-row > td,
.asset-grid .mud-table-child-content {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    display: table-cell !important;
    overflow: visible !important;
}

.asset-grid-child {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 10px 10px 18px;
    background: rgba(17, 26, 21, 0.93);
}

.asset-table {
    display: grid;
}

.asset-entry {
    display: grid;
    gap: 10px;
}

.asset-row {
    display: grid;
    grid-template-columns: 8px minmax(210px, 1.4fr) repeat(4, minmax(150px, 1fr)) minmax(300px, auto) auto;
    align-items: stretch;
    min-height: 66px;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.18);
    padding: 0;
    text-align: left;
    background: linear-gradient(90deg, rgba(17, 26, 21, 0.95), rgba(20, 30, 24, 0.95));
    color: var(--text);
    cursor: pointer;
}

.asset-row:hover {
    background: linear-gradient(90deg, rgba(24, 38, 27, 0.98), rgba(19, 36, 31, 0.98));
    outline: 1px solid rgba(110, 227, 58, 0.38);
    outline-offset: -1px;
}

.asset-row:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: -2px;
}

.status-rail {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 68px;
    line-height: 0;
}

.status-segment {
    display: block;
    flex: 1 1 50%;
    min-height: 0;
    width: 100%;
}

.status-success {
    color: var(--green);
    background-color: var(--green);
}

.status-warning {
    color: var(--amber);
    background-color: var(--amber);
}

.status-danger {
    color: var(--red);
    background-color: var(--red);
}

.status-info {
    color: var(--cyan);
    background-color: var(--cyan);
}

.status-muted,
.status-offline {
    color: #6d7889;
    background-color: #6d7889;
}

.asset-identity,
.asset-column,
.asset-status-icons,
.asset-actions {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    max-width: 100%;
    padding: 10px 14px;
    overflow: hidden;
}

.asset-identity {
    gap: 12px;
}

.asset-identity > span {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.asset-identity strong,
.asset-column span,
.row-main strong {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-identity strong,
.row-main strong {
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
}

.asset-identity small,
.asset-column small {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 3px;
    font-size: 12px;
}

.asset-kind-icon,
.device-avatar {
    width: 36px;
    height: 36px;
    padding: 8px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: rgba(110, 227, 58, 0.1);
    color: var(--green);
}

.asset-kind-icon .mud-icon-root,
.device-avatar .mud-icon-root {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.asset-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 12px;
    min-width: 0;
    width: 100%;
}

.asset-status-icons {
    justify-content: flex-end;
    gap: 8px;
}

.status-icon-vms {
    min-width: 58px;
    padding: 0 8px;
}

.status-icon-vms .mud-icon-root {
    margin-right: 2px;
}

.status-icon-label {
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.status-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
}

.status-icon b {
    position: absolute;
    right: -5px;
    bottom: -5px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--panel-strong);
    color: var(--green);
    font-size: 11px;
    line-height: 17px;
    text-align: center;
}

.asset-actions {
    justify-content: flex-end;
    gap: 8px;
    color: var(--text-soft);
}

.empty-state,
.app-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 42px;
    color: var(--text-soft);
}

.detail-app {
    display: grid;
    gap: 12px;
}

.detail-header {
    display: grid;
    grid-template-columns: 40px minmax(260px, 0.9fr) minmax(360px, 1.1fr) auto;
    align-items: center;
    min-height: 88px;
}

.detail-device-card {
    min-width: 0;
    padding-left: 10px;
    border-left: 6px solid currentColor;
}

.detail-device-card h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
}

.detail-device-card > div {
    min-width: 0;
}

.detail-device-card p {
    margin: 4px 0 0;
    font-size: 14px;
    line-height: 1.35;
    color: var(--text-soft);
}

.detail-device-card .device-state {
    display: inline-block;
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.2;
}

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

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

.status-border-danger {
    color: var(--red);
}

.status-border-info {
    color: var(--cyan);
}

.status-border-muted,
.status-border-offline {
    color: #6d7889;
}

.detail-header-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 12px;
    min-width: 0;
}

.detail-header-fields span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.detail-header-fields small {
    color: var(--text-soft);
    font-size: 11px;
    line-height: 1.2;
    text-transform: uppercase;
}

.detail-header-fields strong,
.detail-header-fields em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-style: normal;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
}

.detail-actions {
    display: flex;
    gap: 8px;
}

.detail-tabs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 60px;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(17, 26, 21, 0.74);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.tab-button {
    width: fit-content;
    min-width: 0;
    flex: 0 0 auto;
    height: 40px;
    gap: 8px;
    padding-inline: 16px !important;
    border-radius: 9px !important;
    border: 1px solid transparent !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    justify-content: flex-start !important;
    text-align: left;
}

.tab-button .mud-button-label {
    max-width: none;
    overflow: visible;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: left;
}

.tab-button .mud-icon-root {
    font-size: 18px;
}

.tab-button.is-active {
    border-color: rgba(110, 227, 58, 0.45) !important;
    color: var(--text) !important;
    background: linear-gradient(135deg, rgba(110, 227, 58, 0.22), rgba(61, 214, 200, 0.1)) !important;
    box-shadow: 0 10px 24px rgba(4, 11, 20, 0.22);
    transform: translateY(-1px);
}

.view-tabs .tab-button,
.detail-tabs .tab-button {
    min-height: 44px;
}

.view-tabs .tab-button:hover,
.detail-tabs .tab-button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-1px);
}

.detail-content {
    min-height: calc(100vh - 210px);
    padding: 16px;
}

.device-status-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 12px;
}

.device-status-card {
    display: grid;
    gap: 9px;
    min-height: 128px;
    padding: 15px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 100% 0, rgba(110, 227, 58, 0.1), transparent 42%),
        rgba(17, 26, 21, 0.92);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
}

.device-status-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.device-status-card strong {
    color: var(--text);
    font-size: 17px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.device-status-card small {
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.35;
}

.properties-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 14px;
}

.service-sheet-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
    gap: 14px;
    align-items: start;
}

.service-sheet-column {
    min-width: 0;
}

.service-sheet-stack {
    display: grid;
    gap: 14px;
}

.hardware-dashboard {
    display: grid;
    gap: 14px;
}

.hardware-hero {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(17, 26, 21, 0.86);
}

.hardware-hero.status-border-success {
    color: var(--text);
}

.hardware-hero .hardware-online-icon,
.hardware-hero .hardware-online strong {
    color: var(--green);
}

.hardware-hero-main {
    display: grid;
    gap: 12px;
}

.hardware-online {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hardware-online strong,
.hardware-online small {
    display: block;
}

.hardware-online strong {
    font-size: 16px;
    line-height: 1.2;
}

.hardware-online small {
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.3;
}

.hardware-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.hardware-summary-card,
.hardware-panel,
.hardware-card {
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(17, 26, 21, 0.92);
}

.hardware-summary-card {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px;
}

.hardware-summary-card small,
.hardware-panel-overview small,
.hardware-card small,
.hardware-card span,
.hardware-card em {
    color: var(--text-soft);
}

.hardware-summary-card small,
.hardware-panel-overview small {
    font-size: 11px;
    line-height: 1.15;
    text-transform: uppercase;
}

.hardware-summary-card strong {
    font-size: 14px;
    line-height: 1.25;
}

.hardware-summary-value {
    min-width: 0;
    overflow-wrap: anywhere;
}

.hardware-summary-value.is-truncated {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hardware-summary-card span {
    font-size: 12px;
    line-height: 1.25;
}

.hardware-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.hardware-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    align-self: start;
}

.hardware-panel h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
}

.hardware-panel-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hardware-panel-overview span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.hardware-panel-overview strong {
    font-size: 14px;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
}

.hardware-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.hardware-card {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 12px;
}

.hardware-card-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}

.hardware-card strong {
    min-width: 0;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
    white-space: normal;
    overflow-wrap: anywhere;
}

.hardware-card small,
.hardware-card span,
.hardware-card em {
    font-size: 12px;
    line-height: 1.3;
}

.hardware-card em {
    font-style: normal;
    overflow-wrap: anywhere;
}

.hardware-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 12px;
}

.capacity-meter {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--line);
}

.capacity-meter-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), var(--purple));
}

.capacity-caption {
    font-size: 12px;
    line-height: 1.25;
    color: var(--text-soft);
}

.status-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 24px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    text-align: center;
    -webkit-box-align: center;
    -webkit-box-pack: center;
}

.vm-panel {
    display: grid;
    gap: 10px;
    padding: 0 10px 10px 18px;
    border-left: 3px solid var(--green);
    background: rgba(17, 26, 21, 0.78);
}

.vm-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(12, 19, 15, 0.94);
}

.vm-card-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}

.vm-card-head strong {
    display: block;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
}

.vm-card-head small {
    display: block;
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.25;
}

.vm-card-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.vm-card-summary span,
.vm-card-meta span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.vm-card-summary small,
.vm-card-meta {
    font-size: 11px;
    line-height: 1.2;
    color: var(--text-soft);
}

.vm-card-summary strong {
    font-size: 13px;
    line-height: 1.25;
}

.vm-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}

.vm-snapshot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.vm-details summary {
    cursor: pointer;
    color: var(--cyan);
}

.vm-details pre {
    overflow: auto;
    max-height: 180px;
    margin: 8px 0 0;
    padding: 12px;
    border: 1px solid var(--line-soft);
    background: rgba(17, 24, 39, 0.5);
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.vm-empty {
    padding: 12px 18px;
    color: var(--text-soft);
}

.property-section,
.list-group-band {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(17, 26, 21, 0.88);
}

html[data-theme="light"] .m4-topbar,
html[data-theme="light"] .detail-header,
html[data-theme="light"] .settings-panel,
html[data-theme="light"] .notice,
html[data-theme="light"] .customer-filter,
html[data-theme="light"] .asset-table-shell,
html[data-theme="light"] .ops-card,
html[data-theme="light"] .device-status-card,
html[data-theme="light"] .detail-content,
html[data-theme="light"] .detail-tabs,
html[data-theme="light"] .property-section,
html[data-theme="light"] .list-group-band,
html[data-theme="light"] .asset-row,
html[data-theme="light"] .asset-grid tr.asset-grid-row,
html[data-theme="light"] .asset-grid thead th,
html[data-theme="light"] .list-row,
html[data-theme="light"] .searchbox,
html[data-theme="light"] .m4-search .mud-input-root,
html[data-theme="light"] .settings-grid .mud-input-root {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(232, 245, 233, 0.99)) !important;
}

html[data-theme="light"] .m4-topbar,
html[data-theme="light"] .detail-header,
html[data-theme="light"] .settings-panel,
html[data-theme="light"] .notice,
html[data-theme="light"] .customer-filter,
html[data-theme="light"] .asset-table-shell,
html[data-theme="light"] .ops-card,
html[data-theme="light"] .device-status-card,
html[data-theme="light"] .detail-content,
html[data-theme="light"] .detail-tabs,
html[data-theme="light"] .property-section,
html[data-theme="light"] .list-group-band,
html[data-theme="light"] .asset-row,
html[data-theme="light"] .asset-grid tr.asset-grid-row,
html[data-theme="light"] .asset-grid thead th,
html[data-theme="light"] .list-row {
    color: var(--text);
}

html[data-theme="light"] .m4-topbar,
html[data-theme="light"] .detail-header,
html[data-theme="light"] .settings-panel,
html[data-theme="light"] .notice,
html[data-theme="light"] .customer-filter,
html[data-theme="light"] .asset-table-shell,
html[data-theme="light"] .ops-card,
html[data-theme="light"] .device-status-card,
html[data-theme="light"] .detail-content,
html[data-theme="light"] .detail-tabs,
html[data-theme="light"] .property-section,
html[data-theme="light"] .list-group-band,
html[data-theme="light"] .asset-row,
html[data-theme="light"] .asset-grid tr.asset-grid-row,
html[data-theme="light"] .asset-grid thead th,
html[data-theme="light"] .list-row,
html[data-theme="light"] .searchbox,
html[data-theme="light"] .m4-search .mud-input-root,
html[data-theme="light"] .settings-grid .mud-input-root {
    border-color: var(--line-soft) !important;
}

html[data-theme="light"] .m4-brand span,
html[data-theme="light"] .detail-device-card p,
html[data-theme="light"] .device-state,
html[data-theme="light"] .asset-column small,
html[data-theme="light"] .asset-identity small,
html[data-theme="light"] .row-meta small,
html[data-theme="light"] .detail-header-fields small,
html[data-theme="light"] .asset-table-meta,
html[data-theme="light"] .connection-state,
html[data-theme="light"] .settings-grid span {
    color: var(--text-soft);
}

html[data-theme="light"] .asset-kind-icon,
html[data-theme="light"] .device-avatar,
html[data-theme="light"] .status-icon b {
    background: rgba(8, 126, 164, 0.12);
    color: var(--cyan);
    border: 1px solid rgba(8, 126, 164, 0.18);
}

html[data-theme="light"] .asset-kind-icon .mud-icon-root,
html[data-theme="light"] .device-avatar .mud-icon-root {
    color: var(--cyan);
}

html[data-theme="light"] .asset-kind-icon,
html[data-theme="light"] .device-avatar {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

html[data-theme="light"] .hardware-summary-card,
html[data-theme="light"] .hardware-panel,
html[data-theme="light"] .hardware-card,
html[data-theme="light"] .hardware-hero,
html[data-theme="light"] .asset-grid-child,
html[data-theme="light"] .vm-panel,
html[data-theme="light"] .vm-card,
html[data-theme="light"] .property-section,
html[data-theme="light"] .list-group-band,
body[data-theme="light"] .hardware-summary-card,
body[data-theme="light"] .hardware-panel,
body[data-theme="light"] .hardware-card,
body[data-theme="light"] .hardware-hero,
body[data-theme="light"] .asset-grid-child,
body[data-theme="light"] .vm-panel,
body[data-theme="light"] .vm-card,
body[data-theme="light"] .property-section,
body[data-theme="light"] .list-group-band {
    background: var(--panel) !important;
    border-color: var(--line-soft) !important;
    color: var(--text);
}

html[data-theme="light"] .asset-grid-child,
body[data-theme="light"] .asset-grid-child {
    background: var(--panel) !important;
}

html[data-theme="light"] .vm-panel,
body[data-theme="light"] .vm-panel {
    border-left-color: var(--green);
    background: transparent !important;
}

html[data-theme="light"] .vm-details pre,
body[data-theme="light"] .vm-details pre {
    background: var(--panel-soft) !important;
    color: var(--text-soft);
    border-color: var(--line-soft);
}

html[data-theme="light"] .status-pill,
body[data-theme="light"] .status-pill {
    background: var(--panel-soft);
    color: var(--text);
    border: 1px solid var(--line-soft);
}

html[data-theme="light"] .status-pill.status-success,
html[data-theme="light"] .status-pill.status-warning,
html[data-theme="light"] .status-pill.status-danger,
html[data-theme="light"] .status-pill.status-info,
html[data-theme="light"] .status-pill.status-muted,
html[data-theme="light"] .status-pill.status-offline,
body[data-theme="light"] .status-pill.status-success,
body[data-theme="light"] .status-pill.status-warning,
body[data-theme="light"] .status-pill.status-danger,
body[data-theme="light"] .status-pill.status-info,
body[data-theme="light"] .status-pill.status-muted,
body[data-theme="light"] .status-pill.status-offline {
    color: var(--text);
}

html[data-theme="light"] .icon-button,
html[data-theme="light"] .status-icon,
html[data-theme="light"] .tab-button,
body[data-theme="light"] .icon-button,
body[data-theme="light"] .status-icon,
body[data-theme="light"] .tab-button {
    background: var(--panel);
    color: var(--text);
    border-color: var(--line-soft);
}

html[data-theme="light"] .icon-button:hover,
html[data-theme="light"] .status-icon:hover,
html[data-theme="light"] .tab-button:hover,
html[data-theme="light"] .icon-button.is-active,
body[data-theme="light"] .icon-button:hover,
body[data-theme="light"] .status-icon:hover,
body[data-theme="light"] .tab-button:hover,
body[data-theme="light"] .icon-button.is-active {
    background: var(--panel-soft);
    color: var(--cyan);
    border-color: rgba(8, 126, 164, 0.35);
}

.status-pill.status-success,
html[data-theme="light"] .status-pill.status-success,
body[data-theme="light"] .status-pill.status-success {
    background: color-mix(in srgb, var(--green) 14%, var(--panel) 86%);
    color: var(--green);
    border-color: color-mix(in srgb, var(--green) 42%, transparent) !important;
}

.status-pill.status-warning,
html[data-theme="light"] .status-pill.status-warning,
body[data-theme="light"] .status-pill.status-warning {
    background: color-mix(in srgb, var(--amber) 16%, var(--panel) 84%);
    color: var(--amber);
    border-color: color-mix(in srgb, var(--amber) 46%, transparent) !important;
}

.status-pill.status-danger,
html[data-theme="light"] .status-pill.status-danger,
body[data-theme="light"] .status-pill.status-danger {
    background: color-mix(in srgb, var(--red) 13%, var(--panel) 87%);
    color: var(--red);
    border-color: color-mix(in srgb, var(--red) 42%, transparent) !important;
}

.status-pill.status-info,
html[data-theme="light"] .status-pill.status-info,
body[data-theme="light"] .status-pill.status-info {
    background: color-mix(in srgb, var(--cyan) 13%, var(--panel) 87%);
    color: var(--cyan);
    border-color: color-mix(in srgb, var(--cyan) 42%, transparent) !important;
}

.status-icon.status-success,
html[data-theme="light"] .status-icon.status-success,
body[data-theme="light"] .status-icon.status-success {
    background: color-mix(in srgb, var(--green) 16%, transparent);
    color: var(--green);
    border-color: color-mix(in srgb, var(--green) 36%, transparent);
}

.status-icon.status-warning,
html[data-theme="light"] .status-icon.status-warning,
body[data-theme="light"] .status-icon.status-warning {
    background: color-mix(in srgb, var(--amber) 18%, transparent);
    color: var(--amber);
    border-color: color-mix(in srgb, var(--amber) 42%, transparent);
}

.status-icon.status-danger,
html[data-theme="light"] .status-icon.status-danger,
body[data-theme="light"] .status-icon.status-danger {
    background: color-mix(in srgb, var(--red) 16%, transparent);
    color: var(--red);
    border-color: color-mix(in srgb, var(--red) 38%, transparent);
}

.status-icon.status-info,
html[data-theme="light"] .status-icon.status-info,
body[data-theme="light"] .status-icon.status-info {
    background: color-mix(in srgb, var(--cyan) 16%, transparent);
    color: var(--cyan);
    border-color: color-mix(in srgb, var(--cyan) 38%, transparent);
}

.status-icon.status-muted,
.status-icon.status-offline,
html[data-theme="light"] .status-icon.status-muted,
html[data-theme="light"] .status-icon.status-offline,
body[data-theme="light"] .status-icon.status-muted,
body[data-theme="light"] .status-icon.status-offline {
    background: color-mix(in srgb, #6d7889 14%, transparent);
    color: #6d7889;
    border-color: color-mix(in srgb, #6d7889 32%, transparent);
}

.status-icon.status-success b,
html[data-theme="light"] .status-icon.status-success b,
body[data-theme="light"] .status-icon.status-success b {
    color: var(--green);
}

.status-icon.status-warning b,
html[data-theme="light"] .status-icon.status-warning b,
body[data-theme="light"] .status-icon.status-warning b {
    color: var(--amber);
}

.status-icon.status-danger b,
html[data-theme="light"] .status-icon.status-danger b,
body[data-theme="light"] .status-icon.status-danger b {
    color: var(--red);
}

html[data-theme="light"] .settings-grid .mud-input-root,
body[data-theme="light"] .settings-grid .mud-input-root {
    background: var(--panel) !important;
}

html[data-theme="light"] .asset-row,
html[data-theme="light"] .list-row {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(232, 245, 233, 0.99));
    box-shadow: inset 0 0 0 1px rgba(56, 148, 20, 0.12);
}

html[data-theme="light"] .asset-grid tr.asset-grid-row:hover,
html[data-theme="light"] .asset-row:hover,
html[data-theme="light"] .list-row:hover {
    background: linear-gradient(90deg, rgba(248, 255, 248, 0.99), rgba(220, 239, 221, 1));
}

html[data-theme="light"] .asset-grid-child,
body[data-theme="light"] .asset-grid-child,
html[data-theme="light"] .vm-card,
body[data-theme="light"] .vm-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 245, 233, 1)) !important;
}

html[data-theme="light"] .mud-paper,
html[data-theme="light"] .mud-chip,
html[data-theme="light"] .mud-alert {
    color: var(--text);
}

html[data-theme="light"] .theme-toggle {
    background: var(--panel);
    border-color: var(--line-soft);
}

html[data-theme="light"] .view-tabs,
body[data-theme="light"] .view-tabs {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 245, 233, 0.98));
    border-color: var(--line-soft);
}

html[data-theme="light"] .detail-tabs,
body[data-theme="light"] .detail-tabs {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 245, 233, 0.98));
    border-color: var(--line-soft);
}

html[data-theme="light"] .view-tabs .tab-button,
body[data-theme="light"] .view-tabs .tab-button,
html[data-theme="light"] .detail-tabs .tab-button,
body[data-theme="light"] .detail-tabs .tab-button {
    background: rgba(255, 255, 255, 0.72) !important;
}

html[data-theme="light"] .view-tabs .tab-button.is-active,
body[data-theme="light"] .view-tabs .tab-button.is-active,
html[data-theme="light"] .detail-tabs .tab-button.is-active,
body[data-theme="light"] .detail-tabs .tab-button.is-active {
    background: linear-gradient(135deg, rgba(56, 148, 20, 0.16), rgba(8, 126, 164, 0.1)) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .stats-app .notice,
body[data-theme="light"] .stats-app .notice {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 253, 0.98)) !important;
}

.property-section h2,
.list-group-band h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 15px;
    line-height: 1.2;
}

.property-section dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.property-section dl div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
    min-height: 40px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.property-section dl div:last-child {
    border-bottom: 0;
}

.property-section dt {
    color: var(--text-soft);
    font-weight: 500;
    font-size: 12px;
    line-height: 1.35;
}

.property-section dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.3;
}

.property-section dd small {
    display: block;
    margin-top: 3px;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.3;
}

.dynamic-list,
.grouped-list {
    display: grid;
    gap: 10px;
}

.list-group-band {
    border-left: 4px solid currentColor;
}

.list-group-band h2 span {
    color: var(--cyan);
    font-weight: 400;
}

.list-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 58px;
    margin-bottom: 4px;
    padding: 10px 10px 10px 14px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(17, 26, 21, 0.94), rgba(20, 30, 24, 0.94));
    border-left: 3px solid #778196;
}

.list-group-band .list-row {
    margin: 0;
    border-left-color: currentColor;
}

.row-icon {
    color: var(--text-soft);
}

.row-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 2px;
}

.row-main strong {
    display: block;
    margin: 0;
}

.row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.2;
}

.row-meta span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.row-meta small {
    color: var(--text-soft);
    font-size: 10px;
    line-height: 1.15;
    text-transform: uppercase;
}

.row-meta,
.row-meta span {
    align-items: center;
}

.row-actions {
    display: flex;
    gap: 8px;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@media (max-width: 900px) {
    .ops-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .device-status-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .properties-layout {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }

    .service-sheet-layout {
        grid-template-columns: 1fr;
    }

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

    .hardware-summary-grid,
    .hardware-panel-overview,
    .vm-card-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-header {
        grid-template-columns: 40px minmax(0, 1fr) auto;
    }

    .detail-header-fields {
        grid-column: 1 / -1;
    }
}

@media (max-width: 780px) {
    .m4-app {
        padding: 12px;
    }

    .ops-summary {
        grid-template-columns: 1fr;
    }

    .device-status-overview {
        grid-template-columns: 1fr;
    }

    .ops-card {
        min-height: 96px;
    }

    .m4-topbar,
    .detail-header {
        align-items: stretch;
        gap: 12px;
        min-height: 0;
        padding: 12px;
    }

    .m4-topbar {
        flex-direction: column;
    }

    .detail-header {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        align-items: start;
    }

    .m4-brand {
        min-width: 0;
        width: 100%;
    }

    .m4-brand h1,
    .detail-device-card h1 {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .detail-device-card h1 {
        font-size: 20px;
        line-height: 1.15;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .m4-toolbar {
        display: flex;
        justify-content: flex-end;
        width: 100%;
        margin-left: 0;
    }

    .m4-toolbar > * {
        min-width: 0;
    }

    .settings-actions {
        width: 100%;
        flex-wrap: wrap;
        margin-left: 0;
    }

    .searchbox {
        width: 100%;
        flex: 1 1 220px;
    }

    .m4-search {
        width: 100%;
        min-width: 0;
        flex: none;
    }

    .settings-panel {
        grid-template-columns: 1fr;
    }

    .login-copy {
        max-width: none;
    }

    .customer-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .customer-select,
    .customer-scope,
    .page-size-select {
        width: 100%;
    }

    .settings-grid,
    .detail-header-fields,
    .properties-layout {
        grid-template-columns: 1fr;
    }

    .service-sheet-layout {
        grid-template-columns: 1fr;
    }

    .asset-grid table {
        min-width: var(--asset-grid-min-width) !important;
    }

    .asset-grid .mud-table-child-row > td {
        display: table-cell;
    }

    .asset-entry {
        gap: 8px;
    }

    .asset-identity {
        padding: 10px 12px;
    }

    .asset-grid tr.asset-grid-row > td.asset-grid-status-cell,
    .asset-status-icons {
        grid-column: 2 / 4;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px;
        padding: 0 10px 10px 12px;
    }

    .asset-grid tr.asset-grid-row > td.asset-grid-actions-cell,
    .asset-actions {
        grid-column: 3;
        grid-row: 1;
        align-items: flex-start;
        padding: 10px;
    }

    .detail-device-card {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        width: 100%;
        padding-left: 8px;
    }

    .detail-device-card > div {
        min-width: 0;
    }

    .detail-device-card p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .detail-header-fields,
    .detail-actions {
        width: 100%;
    }

    .detail-header-fields {
        grid-column: 1 / -1;
    }

    .detail-actions {
        grid-column: 3;
        grid-row: 1;
        justify-content: flex-end;
    }

    .asset-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-tabs {
        min-height: 48px;
        padding: 0 8px;
    }

    .tab-button {
        flex: 0 0 auto;
        min-width: max-content;
        height: 48px;
        padding-inline: 10px !important;
    }

    .tab-button .mud-button-label {
        max-width: none;
    }

    .demo-json-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .demo-json-editor .mud-input-root {
        min-height: 180px;
    }

    .detail-content {
        min-height: calc(100vh - 188px);
        padding: 12px;
    }

    .property-section dl div,
    .list-row {
        grid-template-columns: 1fr;
    }

    .property-section h2,
    .list-group-band h2 {
        padding: 10px 12px;
    }

    .property-section dl div {
        gap: 4px;
        min-height: 0;
        padding: 9px 12px;
    }

    .row-actions {
        justify-content: flex-start;
    }

    .hardware-summary-grid,
    .hardware-panel-overview,
    .vm-card-summary {
        grid-template-columns: 1fr;
    }
}
