:root {
    color-scheme: light;
    --bg: #f3efe6;
    --surface: rgba(250, 247, 238, 0.96);
    --surface-solid: #fbf8ef;
    --surface-soft: #eee9dc;
    --surface-muted: #e2dccd;
    --text: #25231d;
    --muted: #625d51;
    --muted-2: #81796a;
    --border: rgba(37, 35, 29, 0.22);
    --border-strong: rgba(37, 35, 29, 0.34);
    --border-soft: rgba(37, 35, 29, 0.13);
    --paper-speck: rgba(37, 35, 29, 0.035);
    --paper-line: rgba(37, 35, 29, 0.026);
    --topbar: rgba(242, 238, 228, 0.94);
    --topbar-wash: linear-gradient(180deg, rgba(251, 248, 239, 0.82), rgba(242, 238, 228, 0.92));
    --topbar-stripe: linear-gradient(90deg, #25231d 0 72%, #81796a 72% 100%);
    --menu-bg: #f2eee4;
    --topbar-text: #25231d;
    --topbar-muted: #625d51;
    --accent: #4a554d;
    --accent-bright: #315f66;
    --accent-soft: rgba(49, 95, 102, 0.12);
    --charge: #356f52;
    --charge-glow: rgba(53, 111, 82, 0.34);
    --socket-ready: #356f52;
    --socket-active: #335f82;
    --socket-paused: #8a6f2a;
    --socket-error: #8f3f37;
    --socket-bubble: rgba(51, 95, 130, 0.34);
    --socket-bubble-soft: rgba(93, 122, 128, 0.34);
    --socket-bubble-core: rgba(37, 35, 29, 0.12);
    --socket-bubble-shine: rgba(251, 248, 239, 0.68);
    --warn: #8a6f2a;
    --warn-soft: rgba(138, 111, 42, 0.12);
    --danger: #8f3f37;
    --danger-soft: rgba(143, 63, 55, 0.11);
    --chart-bg: #f4f0e6;
    --chart-grid: rgba(37, 35, 29, 0.15);
    --chart-track: rgba(37, 35, 29, 0.12);
    --shadow: 0 10px 28px rgba(37, 35, 29, 0.08);
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #15140f;
    --surface: rgba(31, 30, 25, 0.96);
    --surface-solid: #1f1e19;
    --surface-soft: #28261f;
    --surface-muted: #343126;
    --text: #eee8d8;
    --muted: #b8b0a0;
    --muted-2: #8f887a;
    --border: rgba(238, 232, 216, 0.18);
    --border-strong: rgba(238, 232, 216, 0.30);
    --border-soft: rgba(238, 232, 216, 0.12);
    --paper-speck: rgba(238, 232, 216, 0.032);
    --paper-line: rgba(238, 232, 216, 0.026);
    --topbar: rgba(20, 20, 15, 0.94);
    --topbar-wash: linear-gradient(180deg, rgba(31, 30, 25, 0.84), rgba(20, 20, 15, 0.94));
    --topbar-stripe: linear-gradient(90deg, #eee8d8 0 72%, #8f887a 72% 100%);
    --menu-bg: #1f1e19;
    --topbar-text: #eee8d8;
    --topbar-muted: #b8b0a0;
    --accent: #a9b6a8;
    --accent-bright: #adc8c1;
    --accent-soft: rgba(173, 200, 193, 0.14);
    --charge: #91c6a1;
    --charge-glow: rgba(145, 198, 161, 0.34);
    --socket-ready: #91c6a1;
    --socket-active: #8aa8c3;
    --socket-paused: #d3bb75;
    --socket-error: #d48d85;
    --socket-bubble: rgba(138, 168, 195, 0.22);
    --socket-bubble-soft: rgba(173, 200, 193, 0.22);
    --socket-bubble-core: rgba(238, 232, 216, 0.08);
    --socket-bubble-shine: rgba(238, 232, 216, 0.28);
    --warn: #d3bb75;
    --warn-soft: rgba(211, 187, 117, 0.13);
    --danger: #d48d85;
    --danger-soft: rgba(212, 141, 133, 0.13);
    --chart-bg: #1b1a16;
    --chart-grid: rgba(238, 232, 216, 0.13);
    --chart-track: rgba(238, 232, 216, 0.10);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

body {
    position: relative;
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

body::before,
body::after {
    content: none;
    display: none;
}

body::before {
    opacity: 0.62;
    background:
        repeating-linear-gradient(90deg, transparent 0 54px, var(--paper-line) 54px 55px),
        repeating-linear-gradient(0deg, transparent 0 42px, var(--paper-line) 42px 43px);
    mix-blend-mode: multiply;
}

body::after {
    opacity: 0.42;
    background:
        linear-gradient(90deg, transparent 0 49%, color-mix(in srgb, var(--text) 4%, transparent) 50%, transparent 51%),
        linear-gradient(180deg, transparent 0 49%, color-mix(in srgb, var(--text) 3%, transparent) 50%, transparent 51%);
    background-size: 420px 420px;
}

.login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.login-shell {
    width: min(420px, 100%);
}

.login-card {
    display: grid;
    gap: 22px;
    padding: 28px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.login-brand {
    display: grid;
    justify-items: center;
    gap: 4px;
}

.login-brand img {
    width: 156px;
    height: 38px;
    object-fit: contain;
    filter: brightness(0) saturate(100%);
}

:root[data-theme="dark"] .login-brand img {
    filter: none;
}

.login-brand span {
    width: 156px;
    color: var(--text);
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .08em;
    text-align: center;
    text-transform: uppercase;
}

.login-copy {
    display: grid;
    gap: 7px;
    text-align: center;
}

.login-copy p,
.login-copy h1,
.login-copy span {
    margin: 0;
}

.login-copy p {
    color: var(--accent-bright);
    font-size: 13px;
    font-weight: 600;
}

.login-copy h1 {
    color: var(--text);
    font-size: clamp(28px, 6vw, 40px);
    line-height: 1;
    letter-spacing: 0;
}

.login-copy span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.login-form {
    gap: 14px;
}

:root[data-theme="dark"] body::before {
    mix-blend-mode: screen;
}

@keyframes energy-rise {
    from {
        transform: translate3d(0, 10vh, 0) scale(1);
    }

    to {
        transform: translate3d(0, -9vh, 0) scale(1.08);
    }
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0;
    border-bottom: 1px solid var(--border-soft);
    background: var(--topbar-wash), var(--topbar);
    color: var(--topbar-text);
    box-shadow: 0 1px 0 var(--border-soft);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.topbar::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--topbar-stripe);
}

.topbar-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(1240px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    padding: 0 18px;
}

.brand {
    display: grid;
    flex: 0 0 170px;
    justify-items: center;
    align-content: center;
    gap: 3px;
    font-weight: 800;
}

.brand img {
    display: block;
    width: 142px;
    max-width: 100%;
    height: 34px;
    object-fit: contain;
    object-position: center;
    filter: brightness(0) saturate(100%);
}

:root[data-theme="dark"] .brand img {
    filter: none;
}

.brand span {
    display: block;
    width: 142px;
    max-width: 100%;
    color: var(--topbar-text);
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .08em;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--topbar-text);
    cursor: pointer;
    transition:
        background 220ms ease,
        border-color 220ms ease,
        transform 220ms cubic-bezier(0.2, 1.35, 0.28, 1);
}

.menu-toggle:hover {
    border-color: var(--border-strong);
    background: var(--surface-soft);
}

.menu-toggle:active {
    transform: scale(0.96);
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition:
        transform 260ms cubic-bezier(0.2, 1.35, 0.28, 1),
        opacity 160ms ease;
}

.menu-lines {
    position: relative;
}

.menu-lines::before,
.menu-lines::after {
    position: absolute;
    left: 0;
    content: "";
}

.menu-lines::before {
    top: -6px;
}

.menu-lines::after {
    top: 6px;
}

body.menu-open .menu-lines {
    transform: rotate(45deg);
}

body.menu-open .menu-lines::before {
    opacity: 0;
    transform: translateY(6px);
}

body.menu-open .menu-lines::after {
    transform: translateY(-6px) rotate(90deg);
}

.tabs {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-button,
.action-button,
.primary-button {
    min-height: 40px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.tab-button {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-color: transparent;
    background: transparent;
    color: var(--topbar-text);
    font-weight: 500;
    padding: 0 16px;
}

.tab-button.is-active {
    border-color: transparent;
    background: transparent;
    color: var(--text);
    box-shadow: none;
}

.tab-icon-button {
    width: 44px;
    padding: 0;
}

.tabs-indicator {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-bright));
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 38px, 0);
    transition:
        transform 460ms cubic-bezier(0.2, 1.45, 0.28, 1),
        width 460ms cubic-bezier(0.2, 1.45, 0.28, 1),
        opacity 180ms ease,
        background 240ms ease;
}

.topbar-status {
    position: absolute;
    top: 50%;
    left: calc(50% - 70px);
    z-index: 2;
    width: min(330px, calc(100% - 620px));
    min-width: 230px;
    transform: translate(-50%, -50%);
    color: var(--topbar-muted);
    pointer-events: auto;
}

.status-window {
    position: relative;
    display: grid;
    align-items: center;
    height: 44px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

:root[data-theme="dark"] .status-window {
    background: transparent;
}

.status-window::before,
.status-window::after {
    display: none;
}

.status-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    white-space: nowrap;
    color: var(--topbar-muted);
}

#nav-status-text {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
}

.status-popover {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    z-index: 30;
    width: min(420px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-solid);
    box-shadow: var(--shadow);
    color: var(--text);
    opacity: 0;
    transform: translate(-50%, -6px) scale(0.98);
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 220ms ease,
        transform 360ms cubic-bezier(0.2, 1.45, 0.28, 1),
        visibility 220ms ease;
}

.status-popover::before {
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 14px;
    content: "";
}

.topbar-status:hover .status-popover,
.topbar-status:focus-within .status-popover {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
    visibility: visible;
    pointer-events: auto;
}

.status-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px 8px;
    border-bottom: 1px solid var(--border-soft);
}

.status-popover-head strong {
    font-size: 13px;
    font-weight: 700;
}

.status-popover-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 4px 0;
    list-style: none;
}

.status-popover-list li {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 2px;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
}

.status-popover-list li:last-child {
    border-bottom: 0;
}

.status-popover-list time {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.status-popover-list span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 13px;
    line-height: 1.3;
}

.status-popover-link {
    width: 100%;
    min-height: 36px;
    border: 0;
    border-top: 1px solid var(--border-soft);
    background: transparent;
    color: var(--accent-bright);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
}

.status-line.is-rolling {
    animation: status-roll 520ms cubic-bezier(.2, 1.1, .28, 1) both;
}

.topbar-status.is-ok .status-line {
    color: var(--accent-bright);
}

.topbar-status.is-error .status-line {
    color: var(--danger);
}

.topbar-status.is-neutral .status-line {
    color: var(--topbar-muted);
}

.dot {
    display: inline-block;
    flex: 0 0 10px;
    width: 10px;
    min-width: 10px;
    max-width: 10px;
    height: 10px;
    min-height: 10px;
    max-height: 10px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: var(--accent-bright);
}

.topbar-status.is-error .dot {
    background: var(--danger);
}

.topbar-status.is-neutral .dot {
    background: var(--topbar-muted);
}

@keyframes status-roll {
    0% {
        opacity: 0;
        filter: blur(4px);
        transform: translateY(18px);
    }
    70% {
        opacity: 1;
        filter: blur(.8px);
        transform: translateY(-2px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

.shell {
    position: relative;
    z-index: 1;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 56px;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.status-card,
.panel,
.connector-card,
.fleet-card,
.control-card,
.station-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.status-card {
    min-height: 112px;
    padding: 18px;
}

.label {
    display: block;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.status-card strong {
    display: block;
    font-size: 28px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.panel {
    margin-top: 16px;
    padding: 18px;
}

[data-tab-panel="dashboard"] .overview-section {
    margin: 0;
    padding: 28px 0 30px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

[data-tab-panel="dashboard"] .overview-section:first-child {
    padding-top: 14px;
}

[data-tab-panel="dashboard"] .overview-section + .overview-section {
    border-top: 1px solid var(--border-soft);
}

[data-tab-panel="dashboard"] .overview-section .panel-heading {
    margin-bottom: 18px;
}

[data-tab-panel="fleet"] .panel {
    margin: 0;
    padding: 28px 0 30px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

[data-tab-panel="fleet"] .panel:first-child {
    padding-top: 14px;
}

[data-tab-panel="fleet"] .panel-heading {
    margin-bottom: 18px;
}

[data-tab-panel="fleet"] .fleet-grid {
    grid-template-columns: 1fr;
    gap: 0;
}

[data-tab-panel="fleet"] .fleet-connectors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}

[data-tab-panel="fleet"] .fleet-card {
    border: 0;
    border-top: 1px solid var(--border-soft);
    border-radius: 0;
    background: transparent;
    padding: 28px 0;
}

[data-tab-panel="fleet"] .fleet-card:first-child {
    border-top: 0;
    padding-top: 8px;
}

[data-tab-panel="fleet"] .fleet-connector {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

[data-tab-panel="fleet"] .fleet-connector:first-child {
    padding-right: 28px;
}

[data-tab-panel="fleet"] .fleet-connector + .fleet-connector {
    padding-left: 28px;
    border-left: 1px solid var(--border-soft);
}

[data-tab-panel="fleet"] .phase-telemetry {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

[data-tab-panel="fleet"] .phase-tile {
    display: grid;
    gap: 8px;
    min-height: 76px;
    padding: 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: inset 0 -1px 0 var(--border-soft);
    overflow: hidden;
}

[data-tab-panel="fleet"] .phase-tile .phase-name {
    font-size: 11px;
    font-weight: 650;
}

[data-tab-panel="fleet"] .phase-tile strong {
    font-size: 18px;
    font-weight: 500;
}

[data-tab-panel="fleet"] .phase-tile em,
[data-tab-panel="fleet"] .phase-tile strong small {
    font-size: 11px;
}

[data-tab-panel="fleet"] .phase-sparkline {
    display: none;
}

[data-tab-panel="fleet"] .smart-state {
    padding: 0;
    border: 0;
    background: transparent;
}

[data-tab-panel="fleet"] .smart-state > div {
    gap: 0;
}

[data-tab-panel="fleet"] .station-state-dot,
[data-tab-panel="fleet"] .action-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
}

[data-tab-panel="fleet"] .action-button > .icon,
[data-tab-panel="fleet"] .action-button > .button-icon,
[data-tab-panel="fleet"] .action-button svg {
    width: 16px;
    height: 16px;
}

[data-tab-panel="fleet"] .limit-control {
    padding: 12px 0 0;
    border: 0;
    border-top: 1px solid var(--border-soft);
    border-radius: 0;
    background: transparent;
}

[data-tab-panel="dashboard"] #connector-summary {
    display: none;
}

[data-tab-panel="dashboard"] .power-layout {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 28px;
}

[data-tab-panel="dashboard"] .power-bars {
    padding: 2px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

[data-tab-panel="dashboard"] .chart-wrap {
    border: 0;
    border-radius: 0;
    background: transparent;
}

[data-tab-panel="dashboard"] .connector-card {
    padding: 22px 0 24px;
    border: 0;
    border-top: 1px solid var(--border-soft);
    border-radius: 0;
    background: transparent;
}

[data-tab-panel="dashboard"] .connector-card:first-child {
    border-top: 0;
    padding-top: 0;
}

[data-tab-panel="dashboard"] .connector-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

[data-tab-panel="dashboard"] .connector-grid .empty {
    padding: 18px 0;
}

[data-tab-panel="dashboard"] .connector-station-row {
    padding: 24px 0;
    border-top: 1px solid var(--border-soft);
}

[data-tab-panel="dashboard"] .connector-station-row:first-child {
    padding-top: 0;
    border-top: 0;
}

[data-tab-panel="dashboard"] .connector-station-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 12px;
}

[data-tab-panel="dashboard"] .connector-station-title {
    display: grid;
    gap: 3px;
    min-width: 0;
}

[data-tab-panel="dashboard"] .connector-station-title strong {
    color: var(--text);
    font-weight: 500;
    overflow-wrap: anywhere;
}

[data-tab-panel="dashboard"] .connector-station-title small {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 12px;
}

[data-tab-panel="dashboard"] .connector-station-heading .station-state-dot {
    min-height: 34px;
    padding: 0 9px;
}

[data-tab-panel="dashboard"] .connector-station-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

@media (min-width: 1080px) {
    [data-tab-panel="dashboard"] .connector-station-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 30px;
    }

    [data-tab-panel="dashboard"] .connector-station-row.is-single .connector-station-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    [data-tab-panel="dashboard"] .connector-station-grid .connector-card {
        position: relative;
        padding-top: 0;
        border-top: 0;
    }

    [data-tab-panel="dashboard"] .connector-station-grid .connector-card:nth-child(even)::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 24px;
        left: -15px;
        width: 1px;
        background: var(--border-soft);
    }
}

.panel-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.panel-heading h2 {
    margin: 0;
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: 0;
}

.panel-heading span {
    color: var(--muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.inline-heading {
    margin-bottom: 10px;
}

.inline-heading h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: 0;
}

.home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.home-side {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.home-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mini-stat {
    min-height: 72px;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.mini-stat span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.mini-stat strong {
    display: block;
    font-size: 21px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.power-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.power-overview,
.power-analytics {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.power-donut {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
}

.power-donut canvas {
    display: block;
    width: 220px;
    height: 220px;
}

.power-total {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
    pointer-events: none;
}

.power-total strong {
    font-size: 30px;
    line-height: 1;
}

.power-total span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
}

.chart-wrap {
    min-height: 260px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    overflow: hidden;
    background: var(--chart-bg);
}

.chart-wrap canvas {
    display: block;
    width: 100%;
    height: 260px;
}

.power-legend,
.power-bars {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.legend-item,
.power-bar-row {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
}

.legend-item span:nth-child(2),
.power-bar-row span:first-child {
    overflow-wrap: anywhere;
}

.legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--swatch, var(--chart-track));
}

.legend-item strong,
.power-bar-row strong {
    color: var(--text);
    font-size: 13px;
    white-space: nowrap;
}

.power-bars {
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.power-bars-title {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.power-bar-row {
    grid-template-columns: minmax(0, 1fr) minmax(80px, 2fr) auto;
}

.power-bar-track {
    height: 9px;
    border-radius: 999px;
    background: var(--chart-track);
    overflow: hidden;
}

.power-bar-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--bar, var(--accent-bright));
}

.connector-grid,
.control-grid,
.station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 14px;
}

.connector-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    min-height: 146px;
    padding: 16px;
}

.socket-face {
    position: relative;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    align-self: center;
    color: var(--accent-bright);
}

.socket-face::before {
    content: "";
    position: absolute;
    inset: -8px;
    z-index: 0;
    border-radius: 999px;
    background:
        radial-gradient(circle, var(--charge-glow) 0%, rgba(29, 154, 91, 0.22) 38%, transparent 72%);
    opacity: 0;
    transform: scale(0.72);
    filter: blur(10px);
    pointer-events: none;
}

.socket-icon {
    position: relative;
    z-index: 1;
    display: block;
    width: 62px;
    height: 62px;
    background: currentColor;
    -webkit-mask: url("/static/img/type-2-connector.svg") center / contain no-repeat;
    mask: url("/static/img/type-2-connector.svg") center / contain no-repeat;
}

.socket-face-mini {
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
}

.socket-face-mini .socket-icon {
    width: 28px;
    height: 28px;
}

.socket-lock-dot {
    position: absolute;
    top: 1px;
    right: 1px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    color: var(--danger);
    filter: drop-shadow(0 1px 1px var(--surface)) drop-shadow(0 0 2px var(--surface));
}

.socket-lock-dot svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.socket-face.has-cable-lock .socket-lock-dot {
    color: var(--accent-bright);
}

.socket-face.has-cable-unlock .socket-lock-dot {
    color: var(--danger);
}

.socket-face-mini .socket-lock-dot {
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
}

.socket-face-mini .socket-lock-dot svg {
    width: 13px;
    height: 13px;
    stroke-width: 2.8;
}

.is-idle .socket-face,
.is-charging .socket-face {
    color: var(--accent-bright);
}

.is-charging .socket-face::before {
    animation: socketChargeGlow 1.8s ease-in-out infinite;
}

.is-locked .socket-face,
.is-paused .socket-face {
    color: var(--warn);
}

.is-faulted .socket-face,
.is-offline .socket-face {
    color: var(--danger);
}

@keyframes socketChargeGlow {
    0%,
    100% {
        opacity: 0.28;
        transform: scale(0.78);
    }

    50% {
        opacity: 0.95;
        transform: scale(1.18);
    }
}

.connector-details,
.control-title,
.fleet-card-head,
.station-card {
    min-width: 0;
}

.connector-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.connector-title strong,
.fleet-card-head strong,
.station-card strong,
.control-title strong {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.station-app-link {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.station-app-link:hover,
.station-app-link:focus-visible {
    color: var(--accent);
    text-decoration: underline;
}

.connector-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.connector-badge::before {
    content: "";
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 16%, transparent);
    opacity: 0.92;
}

.station-badge {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--surface-solid);
    background: var(--muted-2);
    font-size: 12px;
    font-weight: 700;
}

.is-idle .connector-badge,
.is-charging .connector-badge {
    border-color: color-mix(in srgb, var(--charge) 34%, var(--border-soft));
    background: color-mix(in srgb, var(--charge) 11%, var(--surface));
    color: var(--charge);
}

.is-idle .connector-badge::before,
.is-charging .connector-badge::before {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--charge) 18%, transparent);
}

.fleet-card.is-online .station-badge {
    background: var(--accent-bright);
}

.is-faulted .connector-badge,
.is-offline .connector-badge {
    border-color: color-mix(in srgb, var(--danger) 32%, var(--border-soft));
    background: var(--danger-soft);
    color: var(--danger);
}

.is-faulted .connector-badge::before,
.is-offline .connector-badge::before {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent);
}

.is-locked .connector-badge,
.is-paused .connector-badge {
    border-color: color-mix(in srgb, var(--warn) 34%, var(--border-soft));
    background: var(--warn-soft);
    color: var(--warn);
}

.fleet-card.is-offline .station-badge {
    background: var(--danger);
}

.connector-metric {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 8px;
    margin-top: 7px;
    font-size: 14px;
}

.connector-metric span,
.station-card span,
.control-title span {
    color: var(--muted);
}

.connector-metric strong {
    overflow-wrap: anywhere;
}

.connector-power-panel {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 166px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
}

.connector-power-donut-column {
    display: grid;
    gap: 8px;
    justify-items: center;
    min-width: 0;
}

.connector-power-donut-wrap {
    position: relative;
    display: grid;
    place-items: center;
    width: 148px;
    height: 148px;
}

.connector-power-donut {
    display: block;
    width: 148px;
    height: 148px;
}

.connector-power-center {
    position: absolute;
    inset: 0;
    display: grid;
    gap: 3px;
    place-content: center;
    text-align: center;
    pointer-events: none;
}

.connector-power-center small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1;
}

.connector-power-center strong {
    font-size: 18px;
    line-height: 1;
}

.connector-power-center span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1;
}

.connector-limit-caption {
    display: grid;
    gap: 2px;
    min-height: 25px;
    text-align: center;
}

.connector-limit-caption span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
}

.connector-limit-caption strong {
    color: var(--limit-marker, var(--accent));
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.connector-limit-caption small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
}

.connector-limit-caption.is-muted strong {
    color: var(--muted);
}

.connector-session-panel {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.connector-session-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.connector-session-heading strong {
    color: var(--text);
    white-space: nowrap;
}

.connector-session-chart {
    display: block;
    width: 100%;
    height: 148px;
}

.phase-telemetry {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.phase-tile {
    position: relative;
    display: grid;
    gap: 8px;
    min-width: 0;
    min-height: 76px;
    padding: 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: inset 0 -1px 0 var(--border-soft);
    overflow: hidden;
}

.phase-tile::after {
    content: none;
}

.phase-tile-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.phase-tile span,
.phase-tile strong,
.phase-tile em {
    position: relative;
    z-index: 1;
}

.phase-tile .phase-name {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0;
}

.phase-legend {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.phase-legend span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.phase-legend i {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 999px;
}

.phase-legend .is-current {
    background: var(--charge);
}

.phase-legend .is-voltage {
    background: var(--accent-bright);
}

.phase-readings {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 10px;
    align-items: end;
}

.phase-reading {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.phase-reading > span {
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.1;
}

.phase-reading strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-style: normal;
    line-height: 1.2;
}

.phase-reading strong {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-weight: 500;
}

.phase-reading strong small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.phase-reading.is-current strong {
    color: var(--charge);
    font-size: 21px;
}

.phase-reading.is-voltage strong {
    color: var(--accent-bright);
    font-size: 16px;
}

.phase-sparkline {
    display: none;
}

.fleet-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: stretch;
    padding: 18px;
}

.fleet-card-media {
    display: grid;
    min-height: 164px;
    place-items: center;
    background: transparent;
    overflow: visible;
}

.fleet-card-media img {
    display: block;
    width: 100%;
    max-width: 178px;
    height: auto;
    filter: drop-shadow(0 14px 18px rgba(16, 35, 28, 0.14));
}

.station-limit-strip {
    --station-limit-color: var(--accent);
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 8px 12px;
    align-items: baseline;
    padding: 11px 0;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    color: var(--muted);
}

.station-limit-strip span {
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.15;
    text-transform: uppercase;
}

.station-limit-strip strong {
    color: var(--station-limit-color);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.1;
    white-space: nowrap;
}

.station-limit-strip small {
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.station-limit-strip.is-ok {
    --station-limit-color: var(--charge);
}

.station-limit-strip.is-info {
    --station-limit-color: var(--accent-bright);
}

.station-limit-strip.is-warning {
    --station-limit-color: var(--warn);
}

.station-limit-strip.is-danger {
    --station-limit-color: var(--danger);
}

.station-limit-strip.is-muted {
    --station-limit-color: var(--muted);
}

.fleet-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-height: 36px;
}

.fleet-card-head span {
    color: var(--muted);
    font-size: 14px;
}

.fleet-connectors {
    display: grid;
    gap: 14px;
}

.fleet-connector {
    display: grid;
    gap: 12px;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-soft);
    font-size: 13px;
}

.fleet-connector-main {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.fleet-connector-copy {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.fleet-connector-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.fleet-connector-title div {
    min-width: 0;
}

.fleet-connector-title span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.fleet-connector-title strong {
    display: block;
    color: var(--text);
    overflow-wrap: anywhere;
}

.fleet-connector-title small {
    flex: 0 0 auto;
    color: var(--muted);
    text-align: right;
    white-space: nowrap;
}

.fleet-connector-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--muted);
    font-size: 12px;
}

.fleet-connector-metrics strong {
    color: var(--text);
    font-weight: 500;
}

.control-card,
.station-card {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.control-title {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.action-grid,
.compact-actions,
.limit-actions {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.compact-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    grid-template-columns: none;
}

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

.smart-state {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.smart-state > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.smart-state span,
.smart-state small {
    min-width: 0;
    overflow-wrap: anywhere;
}

.smart-state span {
    color: var(--text);
}

.smart-state small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.smart-state strong {
    flex: 0 0 auto;
    color: var(--text);
    font-size: 12px;
}

.smart-state.is-ok {
    border-color: color-mix(in srgb, var(--charge) 24%, var(--border-soft));
}

.smart-state.is-info {
    border-color: color-mix(in srgb, var(--accent) 26%, var(--border-soft));
}

.smart-state.is-warning {
    border-color: color-mix(in srgb, var(--warn) 34%, var(--border-soft));
}

.smart-state.is-danger {
    border-color: color-mix(in srgb, var(--danger) 34%, var(--border-soft));
}

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

.settings-hint {
    max-width: 760px;
    margin: -6px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.action-button,
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    padding: 0 12px;
}

.action-button {
    --button-bg: var(--surface);
    --button-border: var(--border-soft);
    --button-text: var(--text);
    --button-hover-bg: var(--surface-muted);
    --button-hover-border: var(--border-strong);
    min-height: 42px;
    padding: 7px 14px;
    border-color: var(--button-border);
    border-radius: 999px;
    background: var(--button-bg);
    color: var(--button-text);
    box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--text) 7%, transparent);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.1;
}

.action-button > .icon,
.action-button > .button-icon {
    flex: 0 0 18px;
}

.action-button > span:not(.button-label),
.action-button .button-label {
    display: block;
    min-width: 0;
    line-height: 1.18;
    text-align: center;
    text-wrap: balance;
    overflow-wrap: break-word;
}

.action-button:hover:not(:disabled),
.primary-button:hover {
    border-color: var(--button-hover-border, var(--text));
    background: var(--button-hover-bg, var(--surface));
}

.action-button.is-primary {
    --button-bg: color-mix(in srgb, var(--accent) 10%, var(--surface));
    --button-border: color-mix(in srgb, var(--accent) 28%, var(--border-soft));
    --button-text: var(--accent);
    --button-hover-bg: color-mix(in srgb, var(--accent) 16%, var(--surface));
    --button-hover-border: color-mix(in srgb, var(--accent) 44%, var(--border-soft));
}

.action-button.is-success {
    --button-bg: color-mix(in srgb, var(--charge) 12%, var(--surface));
    --button-border: color-mix(in srgb, var(--charge) 30%, var(--border-soft));
    --button-text: var(--charge);
    --button-hover-bg: color-mix(in srgb, var(--charge) 18%, var(--surface));
    --button-hover-border: color-mix(in srgb, var(--charge) 44%, var(--border-soft));
}

.action-button.is-warning {
    --button-bg: color-mix(in srgb, var(--warn) 12%, var(--surface));
    --button-border: color-mix(in srgb, var(--warn) 30%, var(--border-soft));
    --button-text: var(--warn);
    --button-hover-bg: color-mix(in srgb, var(--warn) 18%, var(--surface));
    --button-hover-border: color-mix(in srgb, var(--warn) 44%, var(--border-soft));
}

.action-button.is-secure {
    --button-bg: color-mix(in srgb, var(--accent-bright) 11%, var(--surface));
    --button-border: color-mix(in srgb, var(--accent-bright) 30%, var(--border-soft));
    --button-text: var(--accent-bright);
    --button-hover-bg: color-mix(in srgb, var(--accent-bright) 17%, var(--surface));
    --button-hover-border: color-mix(in srgb, var(--accent-bright) 44%, var(--border-soft));
}

.action-button.is-danger {
    --button-bg: color-mix(in srgb, var(--danger) 11%, var(--surface));
    --button-border: color-mix(in srgb, var(--danger) 28%, var(--border-soft));
    --button-text: var(--danger);
    --button-hover-bg: color-mix(in srgb, var(--danger) 17%, var(--surface));
    --button-hover-border: color-mix(in srgb, var(--danger) 42%, var(--border-soft));
}

:root[data-theme="dark"] .action-button {
    --button-bg: var(--surface);
    --button-border: var(--border-soft);
    --button-text: var(--text);
    --button-hover-bg: var(--surface-muted);
    --button-hover-border: var(--border-strong);
    box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--text) 7%, transparent);
}

:root[data-theme="dark"] .action-button.is-primary,
:root[data-theme="dark"] .action-button.is-secure {
    --button-bg: color-mix(in srgb, var(--accent-bright) 12%, var(--surface));
    --button-border: color-mix(in srgb, var(--accent-bright) 28%, var(--border-soft));
    --button-text: var(--accent-bright);
    --button-hover-bg: color-mix(in srgb, var(--accent-bright) 18%, var(--surface));
    --button-hover-border: color-mix(in srgb, var(--accent-bright) 44%, var(--border-soft));
}

:root[data-theme="dark"] .action-button.is-success {
    --button-bg: color-mix(in srgb, var(--charge) 13%, var(--surface));
    --button-border: color-mix(in srgb, var(--charge) 30%, var(--border-soft));
    --button-text: var(--charge);
    --button-hover-bg: color-mix(in srgb, var(--charge) 20%, var(--surface));
    --button-hover-border: color-mix(in srgb, var(--charge) 42%, var(--border-soft));
}

:root[data-theme="dark"] .action-button.is-warning {
    --button-bg: color-mix(in srgb, var(--warn) 13%, var(--surface));
    --button-border: color-mix(in srgb, var(--warn) 30%, var(--border-soft));
    --button-text: var(--warn);
    --button-hover-bg: color-mix(in srgb, var(--warn) 20%, var(--surface));
    --button-hover-border: color-mix(in srgb, var(--warn) 42%, var(--border-soft));
}

:root[data-theme="dark"] .action-button.is-danger {
    --button-bg: color-mix(in srgb, var(--danger) 13%, var(--surface));
    --button-border: color-mix(in srgb, var(--danger) 30%, var(--border-soft));
    --button-text: var(--danger);
    --button-hover-bg: color-mix(in srgb, var(--danger) 20%, var(--surface));
    --button-hover-border: color-mix(in srgb, var(--danger) 42%, var(--border-soft));
}

.action-button.is-compact {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
}

.action-button.is-compact .button-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.action-button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.primary-button {
    --button-hover-bg: color-mix(in srgb, var(--accent) 16%, var(--surface));
    --button-hover-border: color-mix(in srgb, var(--accent) 42%, var(--border-soft));
    min-height: 38px;
    border-color: color-mix(in srgb, var(--accent) 28%, var(--border-soft));
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
    color: var(--accent);
    font-weight: 600;
}

:root[data-theme="dark"] .primary-button {
    --button-hover-bg: color-mix(in srgb, var(--accent-bright) 18%, var(--surface));
    --button-hover-border: color-mix(in srgb, var(--accent-bright) 42%, var(--border-soft));
    border-color: color-mix(in srgb, var(--accent-bright) 26%, var(--border-soft));
    background: color-mix(in srgb, var(--accent-bright) 12%, var(--surface));
    color: var(--accent-bright);
}

.icon,
.button-icon {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
}

.icon svg,
.button-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.station-corner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    max-width: min(100%, 520px);
}

.station-corner-inline {
    top: 10px;
    right: 10px;
}

.station-state-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid color-mix(in srgb, var(--danger) 32%, var(--border-soft));
    border-radius: 999px;
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.station-state-dot::before {
    content: "";
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 16%, transparent);
    opacity: 0.92;
}

.station-state-dot.is-online {
    border-color: color-mix(in srgb, var(--charge) 34%, var(--border-soft));
    background: color-mix(in srgb, var(--charge) 11%, var(--surface));
    color: var(--charge);
}

.station-state-dot.is-online::before {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--charge) 18%, transparent);
}

.station-state-dot.is-offline::before {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent);
}

.station-state-label {
    white-space: nowrap;
}

.compact-actions .station-state-dot {
    min-height: 34px;
    padding: 0 9px;
}

.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(12, 23, 36, 0.48);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.modal-backdrop:not([hidden]) {
    animation: modal-backdrop-in 240ms ease-out both;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(760px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-solid);
    color: var(--text);
    box-shadow: 0 30px 84px rgba(0, 0, 0, 0.32);
    overflow: hidden;
    transform-origin: 50% 52%;
}

.modal-backdrop:not([hidden]) .modal-panel {
    animation: modal-panel-in 480ms cubic-bezier(0.2, 1.45, 0.28, 1) both;
}

@keyframes modal-backdrop-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modal-panel-in {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.965);
    }

    62% {
        opacity: 1;
        transform: translateY(-3px) scale(1.01);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mobile-menu-in {
    0% {
        opacity: 0;
        transform: translateY(-8px) scaleY(0.985);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

.modal-head,
.modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-soft);
}

.modal-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--border-soft);
    border-bottom: 0;
}

.modal-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.modal-head h2 {
    margin: 3px 0 0;
    font-size: 20px;
    line-height: 1.2;
}

.modal-close {
    display: grid;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 24px;
    line-height: 1;
}

.modal-body {
    display: grid;
    gap: 14px;
    min-height: 0;
    padding: 18px;
    overflow: auto;
}

.about-loading,
.about-warning,
.about-summary {
    padding: 12px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
}

.about-warning {
    border: 1px solid rgba(230, 57, 70, 0.26);
    background: var(--danger-soft);
    color: var(--danger);
}

.about-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.about-summary strong {
    color: var(--warn);
    font-size: 13px;
    text-align: right;
}

.about-section {
    display: grid;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
}

.about-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.about-section h3 {
    margin: 0 0 3px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.2;
    text-transform: uppercase;
}

.about-row {
    display: grid;
    grid-template-columns: minmax(130px, 0.44fr) minmax(0, 1fr);
    gap: 14px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-soft);
}

.about-row:last-child {
    border-bottom: 0;
}

.about-row span {
    color: var(--muted);
    font-size: 13px;
}

.about-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 600;
}

.about-limitation {
    display: grid;
    gap: 6px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
}

.about-limitation:last-child {
    border-bottom: 0;
}

.about-limitation span,
.about-limitation li {
    color: var(--muted);
    font-size: 13px;
}

.about-limitation ol {
    display: grid;
    gap: 4px;
    margin: 0;
    padding-left: 18px;
}

.tag-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 13px;
}

.tag-summary strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-align: right;
}

.tag-summary[data-tone="ok"] strong {
    color: var(--charge);
}

.tag-summary[data-tone="error"] strong {
    color: var(--danger);
}

.tag-form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(160px, 1fr) auto;
    align-items: end;
    gap: 10px;
}

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

.tag-form label span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.tag-list {
    display: grid;
    gap: 8px;
}

.tag-row,
.tag-read {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
}

.tag-row:last-child,
.tag-read:last-child {
    border-bottom: 0;
}

.tag-row > div,
.tag-read > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.tag-row strong,
.tag-read strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 500;
}

.tag-row span,
.tag-read span {
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.tag-action {
    flex: 0 0 auto;
    min-width: 112px;
}

.limit-control {
    --limit-edge-air: 18px;
    --limit-thumb-center-inset: var(--limit-edge-air);
    --limit-thumb-center-offset: 0px;
    --slider-manual-fill: color-mix(in srgb, var(--text) 54%, var(--accent-bright));
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.limit-heading,
.limit-scale {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.limit-scale {
    padding-inline: var(--limit-edge-air);
}

.limit-heading span,
.limit-scale span,
.field-grid span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.limit-heading strong {
    font-size: 18px;
}

.limit-heading.is-auto strong {
    color: var(--accent-bright);
}

.limit-slider {
    --slider-fill: 0%;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.limit-slider-wrap {
    position: relative;
    display: grid;
    align-items: center;
    min-height: 28px;
}

.limit-slider-wrap .limit-slider {
    position: relative;
    z-index: 2;
    width: calc(100% - (var(--limit-edge-air) * 2));
    margin-inline: var(--limit-edge-air);
}

.limit-ticks {
    --tick-shift: calc(-50% + var(--limit-thumb-center-offset));
    position: relative;
    display: block;
    z-index: 3;
    height: 38px;
    margin: -16px var(--limit-thumb-center-inset) -2px;
    padding: 0;
    overflow: visible;
    pointer-events: none;
}

.limit-ticks span {
    position: absolute;
    bottom: 0;
    left: var(--tick-x, 0%);
    display: block;
    width: 2px;
    height: 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 34%, transparent);
    opacity: 0.78;
    transform: translateX(var(--tick-shift));
    transition:
        height 520ms cubic-bezier(0.2, 1.55, 0.34, 1),
        width 520ms cubic-bezier(0.2, 1.55, 0.34, 1),
        opacity 240ms ease,
        background 260ms ease,
        box-shadow 360ms ease,
        transform 520ms cubic-bezier(0.2, 1.55, 0.34, 1);
}

.limit-ticks span.is-major {
    height: 9px;
}

.limit-ticks span.is-active {
    height: 11px;
    background: color-mix(in srgb, var(--accent-bright) 74%, var(--surface-solid));
    opacity: 0.9;
}

.limit-ticks span.is-blocked {
    background: color-mix(in srgb, var(--danger) 24%, transparent);
    opacity: 0.38;
}

.limit-ticks span.is-ceiling {
    width: 4px;
    height: 27px;
    background: var(--limit-marker-color, var(--danger));
    opacity: 1;
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--limit-marker-color, var(--danger)) 8%, transparent),
        0 0 12px color-mix(in srgb, var(--limit-marker-color, var(--danger)) 26%, transparent);
}

.limit-slider:disabled {
    cursor: not-allowed;
    opacity: 0.46;
}

.limit-slider:focus {
    outline: none;
}

.limit-slider::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: var(--chart-track);
    box-shadow: inset 0 1px 2px rgba(29, 53, 87, 0.08);
}

.limit-slider.is-auto::-webkit-slider-runnable-track {
    background: var(--chart-track);
}

.limit-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    margin-top: -7px;
    border: 3px solid transparent;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    transition:
        transform 420ms cubic-bezier(0.2, 1.55, 0.34, 1),
        opacity 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 240ms ease;
}

.limit-slider:focus-visible::-webkit-slider-thumb {
    box-shadow: none;
}

.limit-slider:active::-webkit-slider-thumb {
    transform: scale(1.1);
}

.limit-slider.is-auto::-webkit-slider-thumb {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    opacity: 0;
}

.limit-slider.is-auto:active::-webkit-slider-thumb,
.limit-slider.is-auto:focus-visible::-webkit-slider-thumb {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    opacity: 0;
}

.limit-slider::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: var(--chart-track);
}

.limit-slider::-moz-range-progress {
    height: 8px;
    border-radius: 999px;
    background: transparent;
}

.limit-slider.is-auto::-moz-range-progress {
    background: transparent;
}

.limit-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 3px solid transparent;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    transition:
        transform 420ms cubic-bezier(0.2, 1.55, 0.34, 1),
        opacity 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 240ms ease;
}

.limit-slider:active::-moz-range-thumb {
    transform: scale(1.1);
}

.limit-slider.is-auto::-moz-range-thumb {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    opacity: 0;
}

.limit-slider.is-auto:active::-moz-range-thumb,
.limit-slider.is-auto:focus-visible::-moz-range-thumb {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    opacity: 0;
}

.limit-visual-rail {
    position: absolute;
    top: 50%;
    left: var(--limit-thumb-center-inset);
    right: var(--limit-thumb-center-inset);
    z-index: 4;
    height: 0;
    pointer-events: none;
}

.limit-manual-fill {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: var(--fill-x, 0%);
    height: 8px;
    border-radius: 999px;
    background: var(--slider-manual-fill);
    opacity: 0.96;
    transform: translateY(-50%);
    transition:
        width 680ms cubic-bezier(0.2, 1.35, 0.28, 1),
        opacity 180ms ease,
        background 240ms ease;
}

.limit-manual-fill.is-auto {
    opacity: 0;
}

.limit-auto-thumb {
    position: absolute;
    top: 0;
    left: var(--thumb-x, 0%);
    z-index: 3;
    width: 22px;
    height: 22px;
    border: 3px solid var(--accent);
    border-radius: 999px;
    background: var(--surface-solid);
    box-shadow: 0 5px 14px rgba(29, 53, 87, 0.13);
    opacity: 1;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition:
        left 680ms cubic-bezier(0.2, 1.35, 0.28, 1),
        opacity 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 240ms ease;
}

.limit-auto-thumb.is-auto {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--border-soft));
    background: var(--surface-solid);
    opacity: 1;
}

.limit-auto-thumb.is-manual {
    border-color: var(--accent);
    opacity: 1;
}

.limit-auto-thumb.is-hidden {
    opacity: 0;
}

.phase-select span {
    display: block;
    margin-bottom: 6px;
}

input,
select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    padding: 0 10px;
}

input:disabled,
select:disabled {
    cursor: not-allowed;
    opacity: 0.52;
    background: var(--surface-soft);
    color: var(--muted);
}

.action-status {
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.action-status[data-tone="ok"] {
    border-color: rgba(29, 154, 91, 0.35);
    color: var(--accent-bright);
    background: var(--accent-soft);
}

.action-status[data-tone="error"] {
    border-color: rgba(200, 59, 59, 0.35);
    color: var(--danger);
    background: var(--danger-soft);
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

td {
    font-size: 14px;
}

.empty {
    color: var(--muted-2);
}

.event-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.event-list li {
    display: grid;
    grid-template-columns: 160px 72px minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
}

.event-list li:last-child {
    border-bottom: 0;
}

.event-list span,
.event-list strong {
    color: var(--muted);
    font-size: 13px;
}

.event-list strong {
    text-transform: uppercase;
}

.event-list p {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
}

.log-list li {
    grid-template-columns: 180px 80px minmax(0, 1fr);
}

.log-toolbar {
    display: grid;
    gap: 14px;
    margin: 4px 0 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-soft);
}

.log-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.log-filter-button,
.ghost-button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-solid) 74%, transparent);
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition:
        background 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        transform 180ms cubic-bezier(.2, .9, .2, 1.1);
}

.log-filter-button:hover,
.ghost-button:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    color: var(--text);
}

.log-filter-button.is-active {
    border-color: color-mix(in srgb, var(--accent-bright) 58%, var(--border));
    background: color-mix(in srgb, var(--accent-bright) 18%, var(--surface-solid));
    color: var(--accent-bright);
}

.log-filter-fields {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(140px, 160px) minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.log-filter-fields label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.log-filter-fields label > span {
    color: var(--muted);
    font-size: 12px;
}

.log-filter-fields select,
.log-filter-fields input {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
    color: var(--text);
    padding: 0 14px;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.log-filter-fields select:focus,
.log-filter-fields input:focus {
    border-color: color-mix(in srgb, var(--accent-bright) 64%, var(--border));
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.log-search-field {
    min-width: 0;
}

.log-list {
    gap: 0;
}

.log-list li.log-entry {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 16px 0;
}

.log-list li.empty {
    display: block;
    padding: 16px 0;
}

.log-entry-time {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 13px;
}

.log-entry-time time {
    color: var(--text);
}

.log-entry-body {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.log-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.log-pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 9px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-solid) 70%, transparent);
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.log-pill-error {
    border-color: color-mix(in srgb, var(--danger) 34%, transparent);
    background: var(--danger-soft);
    color: var(--danger);
}

.log-pill-warning {
    border-color: color-mix(in srgb, var(--warn) 36%, transparent);
    background: var(--warn-soft);
    color: var(--warn);
}

.log-pill-notification,
.log-pill-command {
    border-color: color-mix(in srgb, var(--accent-bright) 32%, transparent);
    background: var(--accent-soft);
    color: var(--accent-bright);
}

.log-pill-telemetry {
    border-color: color-mix(in srgb, var(--muted-2) 30%, transparent);
    color: var(--muted-2);
}

.log-pill-muted {
    max-width: min(100%, 260px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-entry p {
    font-size: 15px;
    line-height: 1.45;
}

.settings-form {
    display: grid;
    gap: 16px;
}

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

.field-grid label,
.settings-form label {
    min-width: 0;
}

.field-grid span {
    display: block;
    margin-bottom: 6px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
}

.toggle-row input {
    width: 18px;
    min-height: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.field-toggle {
    align-self: end;
    min-height: 42px;
}

.discovery-list {
    display: grid;
    gap: 10px;
}

.firmware-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
    gap: 18px;
    align-items: start;
}

.firmware-package-list,
.firmware-charger-list {
    display: grid;
    gap: 10px;
}

.firmware-charger-list {
    margin-top: 14px;
}

.firmware-package,
.firmware-charger {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.firmware-package[data-tone="ok"] {
    border-color: rgba(29, 154, 91, 0.35);
    background: var(--accent-soft);
}

.firmware-package[data-tone="error"] {
    border-color: rgba(230, 57, 70, 0.35);
    background: var(--danger-soft);
}

.firmware-package strong,
.firmware-charger strong {
    overflow-wrap: anywhere;
}

.firmware-package span,
.firmware-charger span {
    color: var(--muted);
    font-size: 13px;
}

.firmware-meta {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 7px 10px;
}

.firmware-meta span {
    color: var(--muted);
}

.firmware-meta strong {
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.firmware-charger.is-online {
    border-color: rgba(29, 154, 91, 0.28);
}

.firmware-charger.is-offline {
    border-color: rgba(230, 57, 70, 0.28);
}

.firmware-form {
    position: sticky;
    top: 96px;
}

.assignment-list {
    display: grid;
    gap: 10px;
}

.assignment-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 64px;
    padding: 12px 92px 12px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.assignment-title {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.assignment-title strong {
    overflow-wrap: anywhere;
}

.assignment-title span,
.assignment-meta {
    color: var(--muted);
    font-size: 13px;
}

.assignment-meta {
    text-align: right;
    white-space: nowrap;
}

.discovery-item {
    display: grid;
    gap: 4px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
}

.discovery-item:last-child {
    border-bottom: 0;
}

.discovery-item span {
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.prefs-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.prefs-panel section {
    display: grid;
    gap: 8px;
}

.prefs-panel strong {
    color: var(--muted);
    font-size: 13px;
}

.prefs-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.prefs-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.prefs-option.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-bright);
}

.flag {
    display: inline-block;
    width: 24px;
    height: 16px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(14, 31, 46, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.flag-en {
    background:
        linear-gradient(90deg, transparent 43%, #c8102e 43% 57%, transparent 57%),
        linear-gradient(0deg, transparent 40%, #c8102e 40% 60%, transparent 60%),
        linear-gradient(90deg, transparent 36%, #ffffff 36% 64%, transparent 64%),
        linear-gradient(0deg, transparent 30%, #ffffff 30% 70%, transparent 70%),
        linear-gradient(34deg, transparent 46%, #c8102e 46% 54%, transparent 54%),
        linear-gradient(-34deg, transparent 46%, #c8102e 46% 54%, transparent 54%),
        linear-gradient(34deg, transparent 40%, #ffffff 40% 60%, transparent 60%),
        linear-gradient(-34deg, transparent 40%, #ffffff 40% 60%, transparent 60%),
        #012169;
}

.flag-sv {
    background:
        linear-gradient(90deg, transparent 30%, #fecc00 30% 44%, transparent 44%),
        linear-gradient(0deg, transparent 38%, #fecc00 38% 58%, transparent 58%),
        #006aa7;
}

@media (max-width: 900px) {
    .topbar-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        width: 100%;
        padding: 12px;
    }

    .brand {
        grid-column: 1;
        flex-basis: auto;
        justify-items: center;
        width: max-content;
    }

    .brand img,
    .brand span {
        object-position: center;
    }

    .menu-toggle {
        display: grid;
        grid-column: 2;
        grid-row: 1;
    }

    .tabs {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        grid-column: auto;
        display: none;
        grid-template-columns: 1fr;
        gap: 0;
        width: 100%;
        margin-left: 0;
        padding: 6px 0;
        border: 0;
        border-top: 1px solid var(--border-soft);
        border-bottom: 1px solid var(--border-soft);
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        background: var(--menu-bg);
        box-shadow: 0 1px 0 var(--border-soft);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        overflow: visible;
    }

    body.menu-open .tabs {
        display: grid;
        animation: mobile-menu-in 340ms cubic-bezier(0.2, 1.35, 0.28, 1) both;
    }

    .tab-button {
        min-height: 54px;
        width: 100%;
        justify-content: center;
        border: 0;
        border-radius: 0;
        background: transparent;
        text-align: center;
        box-shadow: none;
    }

    .tab-button.is-active {
        border-color: transparent;
        background: color-mix(in srgb, var(--surface-soft) 78%, transparent);
        box-shadow: none;
    }

    :root[data-theme="dark"] .tab-button.is-active {
        background: color-mix(in srgb, var(--surface-soft) 78%, transparent);
    }

    .tabs-indicator {
        height: 3px;
        background: linear-gradient(90deg, var(--accent-bright), var(--charge));
    }

    .topbar-status {
        position: relative;
        top: auto;
        left: auto;
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
        transform: none;
    }

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

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

    [data-tab-panel="dashboard"] .power-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

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

    .firmware-form {
        position: static;
    }

    .power-bar-row {
        grid-template-columns: minmax(0, 1fr) minmax(96px, 2fr);
    }

    .power-bar-row strong {
        grid-column: 1 / -1;
        text-align: right;
    }

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

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

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

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after {
        animation: none;
    }
}

@media (max-width: 520px) {
    .shell {
        width: min(100% - 20px, 1240px);
    }

    .topbar-inner {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 10px;
    }

    .brand img {
        width: 118px;
    }

    .brand span {
        width: 118px;
        font-size: 10px;
    }

    .tab-button {
        min-height: 38px;
        padding: 0 10px;
        font-size: 14px;
    }

    .topbar-status {
        font-size: 13px;
    }

    .status-line {
        justify-content: flex-start;
        padding: 0 12px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .status-grid,
    .connector-grid,
    .fleet-grid,
    .control-grid,
    .station-grid,
    .action-grid,
    .compact-actions {
        grid-template-columns: 1fr;
    }

    .smart-state {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-mini-grid {
        grid-template-columns: 1fr;
    }

    .panel-heading,
    .event-list li {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .log-filter-fields,
    .log-list li.log-entry {
        grid-template-columns: 1fr;
    }

    .log-filter-fields {
        gap: 10px;
    }

    .log-category-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .log-filter-button,
    .ghost-button {
        width: 100%;
    }

    [data-tab-panel="dashboard"] .connector-station-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .connector-card {
        grid-template-columns: 1fr;
    }

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

    .connector-power-donut-wrap {
        justify-self: center;
    }

    .socket-face {
        justify-self: center;
    }

    .fleet-card {
        grid-template-columns: 1fr;
    }

    .fleet-card-head {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
        padding-right: 0;
    }

    .station-corner {
        justify-content: flex-start;
        max-width: 100%;
    }

    .fleet-card-media {
        min-height: 120px;
    }

    .fleet-card-media img {
        max-width: 156px;
    }

    .station-limit-strip {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px 10px;
    }

    .station-limit-strip small {
        grid-column: 1 / -1;
    }

    .fleet-connector {
        gap: 12px;
    }

    [data-tab-panel="fleet"] .fleet-connectors {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    [data-tab-panel="fleet"] .fleet-connector:first-child {
        padding-right: 0;
    }

    [data-tab-panel="fleet"] .fleet-connector + .fleet-connector {
        padding-top: 18px;
        padding-left: 0;
        border-top: 1px solid var(--border-soft);
        border-left: 0;
    }

    .fleet-connector-main {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .fleet-connector-title {
        flex-direction: column;
        gap: 3px;
    }

    .fleet-connector-title small {
        text-align: left;
    }

    .assignment-item {
        grid-template-columns: 1fr;
        padding: 48px 12px 12px;
    }

    .assignment-meta {
        grid-column: auto;
        text-align: left;
        white-space: normal;
    }

    .power-donut,
    .power-donut canvas {
        width: 190px;
        height: 190px;
    }

    .chart-wrap,
    .chart-wrap canvas {
        height: 220px;
    }

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

    .firmware-meta {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .modal-backdrop {
        align-items: end;
        padding: 12px;
    }

    .modal-panel {
        max-height: calc(100vh - 24px);
    }

    .modal-head,
    .modal-actions {
        padding: 14px;
    }

    .modal-body {
        padding: 14px;
    }

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

    .tag-row,
    .tag-read,
    .tag-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .tag-summary strong {
        text-align: left;
    }

    .tag-action {
        width: 100%;
    }

    .about-summary {
        display: grid;
    }

    .about-summary strong {
        text-align: left;
    }

    .about-row {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

.charger-app-page {
    min-height: 100svh;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

.mobile-energy-bubbles {
    position: fixed;
    inset: 52px 0 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    --bubble-lane-width: clamp(112px, 36vw, 160px);
    --bubble-lane-half: clamp(56px, 18vw, 80px);
    --bubble-lane-offset: clamp(100px, 24vw, 124px);
}

.mobile-bubble-lane {
    position: absolute;
    top: 0;
    bottom: -12vh;
    width: var(--bubble-lane-width);
    opacity: 0;
    transition: opacity 420ms ease;
}

.mobile-bubble-lane.is-left {
    left: calc(50% - var(--bubble-lane-offset) - var(--bubble-lane-half));
}

.mobile-bubble-lane.is-right {
    left: calc(50% + var(--bubble-lane-offset) - var(--bubble-lane-half));
}

.mobile-bubble-lane.is-active {
    opacity: 1;
}

.mobile-bubble-lane span {
    position: absolute;
    bottom: -10%;
    left: var(--x, 50%);
    width: var(--size, 22px);
    aspect-ratio: 1;
    border-radius: 999px;
    background:
        radial-gradient(circle at 34% 30%, var(--socket-bubble-shine), transparent 16%),
        radial-gradient(circle at 50% 54%, var(--socket-bubble-core), transparent 30%),
        radial-gradient(circle, var(--socket-bubble-soft) 0 34%, var(--socket-bubble) 50%, transparent 74%);
    filter: blur(var(--blur, 5px));
    mix-blend-mode: multiply;
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.7);
    animation: mobileChargeBubble var(--dur, 7s) linear infinite;
    animation-delay: var(--delay, 0s);
    animation-play-state: paused;
}

.mobile-bubble-lane.is-active span {
    animation-play-state: running;
}

.charger-app-page.preview-charge-flow .mobile-bubble-lane {
    opacity: 1;
}

.charger-app-page.preview-charge-flow .mobile-bubble-lane span {
    animation-play-state: running;
}

:root[data-theme="dark"] .mobile-bubble-lane span {
    mix-blend-mode: screen;
}

:root[data-theme="light"] .mobile-bubble-lane span,
:root:not([data-theme]) .mobile-bubble-lane span {
    box-shadow:
        0 0 14px rgba(47, 128, 237, 0.22),
        0 0 26px rgba(168, 218, 220, 0.24);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .mobile-bubble-lane span {
        box-shadow: none;
        mix-blend-mode: screen;
    }
}

.mobile-bubble-lane.is-left span {
    --drift: 2.5vw;
}

.mobile-bubble-lane.is-right span {
    --drift: -2.5vw;
}

.mobile-bubble-lane span:nth-child(1) {
    --x: 10%;
    --size: 24px;
    --dur: 8.2s;
    --delay: -1.1s;
    --blur: 5px;
}

.mobile-bubble-lane span:nth-child(2) {
    --x: 28%;
    --size: 16px;
    --dur: 6.8s;
    --delay: -4.2s;
    --blur: 4px;
}

.mobile-bubble-lane span:nth-child(3) {
    --x: 44%;
    --size: 32px;
    --dur: 9.4s;
    --delay: -2.8s;
    --blur: 7px;
}

.mobile-bubble-lane span:nth-child(4) {
    --x: 62%;
    --size: 18px;
    --dur: 7.8s;
    --delay: -5.6s;
    --blur: 4px;
}

.mobile-bubble-lane span:nth-child(5) {
    --x: 78%;
    --size: 34px;
    --dur: 10.2s;
    --delay: -7.1s;
    --blur: 8px;
}

.mobile-bubble-lane span:nth-child(6) {
    --x: 18%;
    --size: 20px;
    --dur: 7.1s;
    --delay: -0.7s;
    --blur: 5px;
}

.mobile-bubble-lane span:nth-child(7) {
    --x: 88%;
    --size: 13px;
    --dur: 6.4s;
    --delay: -3.3s;
    --blur: 3px;
}

.mobile-bubble-lane span:nth-child(8) {
    --x: 52%;
    --size: 28px;
    --dur: 9.6s;
    --delay: -6.4s;
    --blur: 7px;
}

.mobile-bubble-lane span:nth-child(9) {
    --x: 94%;
    --size: 17px;
    --dur: 7.4s;
    --delay: -2s;
    --blur: 4px;
}

.mobile-bubble-lane span:nth-child(10) {
    --x: 6%;
    --size: 21px;
    --dur: 8.9s;
    --delay: -5.5s;
    --blur: 5px;
}

.mobile-bubble-lane span:nth-child(11) {
    --x: 36%;
    --size: 12px;
    --dur: 6.1s;
    --delay: -1.8s;
    --blur: 3px;
}

.mobile-bubble-lane span:nth-child(12) {
    --x: 70%;
    --size: 27px;
    --dur: 9.9s;
    --delay: -8.4s;
    --blur: 7px;
}

.mobile-bubble-lane span:nth-child(13) {
    --x: 86%;
    --size: 16px;
    --dur: 7.7s;
    --delay: -3.9s;
    --blur: 4px;
}

.mobile-bubble-lane span:nth-child(14) {
    --x: 22%;
    --size: 30px;
    --dur: 10.8s;
    --delay: -9.1s;
    --blur: 8px;
}

.mobile-bubble-lane.is-right span:nth-child(1) {
    --x: 91%;
    --size: 20px;
    --dur: 7.6s;
    --delay: -3.8s;
}

.mobile-bubble-lane.is-right span:nth-child(2) {
    --x: 68%;
    --size: 26px;
    --dur: 8.8s;
    --delay: -1.6s;
    --blur: 6px;
}

.mobile-bubble-lane.is-right span:nth-child(3) {
    --x: 50%;
    --size: 15px;
    --dur: 6.5s;
    --delay: -5.1s;
    --blur: 4px;
}

.mobile-bubble-lane.is-right span:nth-child(4) {
    --x: 32%;
    --size: 31px;
    --dur: 9.8s;
    --delay: -7.4s;
    --blur: 7px;
}

.mobile-bubble-lane.is-right span:nth-child(5) {
    --x: 14%;
    --size: 17px;
    --dur: 7.2s;
    --delay: -2.5s;
    --blur: 4px;
}

.mobile-bubble-lane.is-right span:nth-child(6) {
    --x: 82%;
    --size: 34px;
    --dur: 10.6s;
    --delay: -8.2s;
    --blur: 8px;
}

.mobile-bubble-lane.is-right span:nth-child(7) {
    --x: 22%;
    --size: 14px;
    --dur: 6.9s;
    --delay: -0.9s;
}

.mobile-bubble-lane.is-right span:nth-child(8) {
    --x: 56%;
    --size: 23px;
    --dur: 8.1s;
    --delay: -4.5s;
    --blur: 5px;
}

.mobile-bubble-lane.is-right span:nth-child(9) {
    --x: 8%;
    --size: 29px;
    --dur: 9.2s;
    --delay: -6.1s;
    --blur: 7px;
}

.mobile-bubble-lane.is-right span:nth-child(10) {
    --x: 94%;
    --size: 18px;
    --dur: 7.9s;
    --delay: -4.8s;
    --blur: 4px;
}

.mobile-bubble-lane.is-right span:nth-child(11) {
    --x: 72%;
    --size: 31px;
    --dur: 11.2s;
    --delay: -9.4s;
    --blur: 8px;
}

.mobile-bubble-lane.is-right span:nth-child(12) {
    --x: 38%;
    --size: 13px;
    --dur: 6.4s;
    --delay: -2.1s;
    --blur: 3px;
}

.mobile-bubble-lane.is-right span:nth-child(13) {
    --x: 16%;
    --size: 24px;
    --dur: 9.1s;
    --delay: -6.9s;
    --blur: 6px;
}

.mobile-bubble-lane.is-right span:nth-child(14) {
    --x: 58%;
    --size: 17px;
    --dur: 7.3s;
    --delay: -0.4s;
    --blur: 4px;
}

@keyframes mobileChargeBubble {
    0% {
        opacity: 0;
        transform: translate3d(0, 7vh, 0) scale(0.64);
    }

    16% {
        opacity: 0.46;
    }

    48% {
        opacity: 0.40;
    }

    76% {
        opacity: 0.30;
    }

    92% {
        opacity: 0.12;
    }

    100% {
        opacity: 0;
        transform: translate3d(var(--drift), -98vh, 0) scale(0.96);
    }
}

.charger-app-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 52px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--topbar-wash), var(--topbar);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.charger-app-brand {
    grid-column: 2;
    display: grid;
    justify-items: center;
    gap: 2px;
    color: var(--topbar-text);
    text-decoration: none;
}

.charger-app-brand img {
    display: block;
    width: 112px;
    height: 27px;
    object-fit: contain;
    filter: brightness(0) saturate(100%);
}

:root[data-theme="dark"] .charger-app-brand img {
    filter: none;
}

.charger-app-brand span {
    color: var(--topbar-text);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}

.charger-app-state {
    grid-column: 1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 68px;
    padding: 6px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: var(--surface);
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

:root[data-theme="dark"] .charger-app-state {
    background: var(--surface);
}

.charger-app-state::before {
    content: "";
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
}

.charger-app-state.is-online {
    color: var(--charge);
}

.charger-app-state.is-offline {
    color: var(--danger);
}

.charger-app-theme {
    grid-column: 3;
    justify-self: end;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--surface);
    color: var(--topbar-text);
    cursor: pointer;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

:root[data-theme="dark"] .charger-app-theme {
    border-color: var(--border-soft);
    background: var(--surface);
}

.charger-app-theme:active {
    transform: scale(0.94);
}

.charger-app-theme:focus-visible {
    outline: 2px solid var(--accent-bright);
    outline-offset: 3px;
}

.theme-icon,
.theme-icon svg {
    display: block;
    width: 18px;
    height: 18px;
}

.theme-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.charger-app-shell {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 10px;
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 12px 14px 18px;
}

.mobile-charger-hero {
    display: grid;
    gap: 0;
    justify-items: center;
    text-align: center;
}

.mobile-charger-visual {
    position: relative;
    display: grid;
    place-items: center;
    width: min(52vw, 196px);
}

.mobile-charger-visual img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 16px 22px rgba(16, 35, 28, 0.16));
}

.mobile-led-rings {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.mobile-hero-controls {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.mobile-hero-control {
    position: absolute;
    top: 47%;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
    color: var(--accent-bright);
    box-shadow: 0 8px 18px rgba(29, 53, 87, 0.14);
    cursor: pointer;
    pointer-events: auto;
    transform: translateY(-50%);
    transition:
        transform 220ms cubic-bezier(0.2, 1.55, 0.34, 1),
        border-color 180ms ease,
        background 180ms ease,
        color 180ms ease;
}

.mobile-hero-control.is-left {
    right: calc(100% + 12px);
}

.mobile-hero-control.is-right {
    left: calc(100% + 12px);
}

.mobile-hero-control.is-lock {
    color: var(--danger);
}

.mobile-hero-control.is-unlock {
    color: var(--charge);
}

.mobile-hero-control.is-cable-locked {
    color: var(--accent-bright);
}

.mobile-hero-control.is-cable-unlocked {
    color: var(--danger);
}

.mobile-hero-control.is-cable-unknown {
    color: var(--muted);
}

.mobile-hero-control:active {
    transform: translateY(-50%) scale(0.92);
}

.mobile-hero-control:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.mobile-hero-control .icon,
.mobile-hero-control svg {
    display: block;
    width: 19px;
    height: 19px;
}

.charger-led-ring {
    position: absolute;
    width: 21.4%;
    aspect-ratio: 1;
    border: 3px solid currentColor;
    border-radius: 999px;
    color: var(--socket-ready);
    opacity: 0.95;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 10px currentColor,
        0 0 22px color-mix(in srgb, currentColor 34%, transparent),
        inset 0 0 9px currentColor;
}

.charger-led-ring::before,
.charger-led-ring::after {
    content: "";
    position: absolute;
    border-radius: inherit;
    pointer-events: none;
}

.charger-led-ring::before {
    inset: -12px;
    background: radial-gradient(circle, color-mix(in srgb, currentColor 34%, transparent) 0 28%, transparent 72%);
    filter: blur(7px);
    opacity: 0.42;
}

.charger-led-ring::after {
    inset: -5px;
    background: conic-gradient(from 0deg, transparent 0 48%, currentColor 54%, transparent 66% 100%);
    opacity: 0;
    filter: blur(2px);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
}

.charger-led-ring.is-left {
    left: 25.7%;
    top: 79.5%;
}

.charger-led-ring.is-right {
    left: 74.1%;
    top: 79.5%;
}

.charger-led-ring.is-ready {
    color: var(--socket-ready);
}

.charger-led-ring.is-active-charging {
    color: var(--socket-active);
    animation: auraBlueRing 2.35s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

.charger-led-ring.is-active-charging::before {
    animation: auraBlueHalo 2.35s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

.charger-app-page.preview-charge-flow .charger-led-ring {
    color: var(--socket-active);
    opacity: 1;
    animation: auraBlueRing 2.35s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

.charger-app-page.preview-charge-flow .charger-led-ring::before {
    animation: auraBlueHalo 2.35s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

.charger-led-ring.is-load-balancing {
    color: var(--socket-active);
    animation: auraLoadBalanceFlash 1.05s ease-in-out infinite;
}

.charger-led-ring.is-complete-paused {
    color: var(--socket-paused);
}

.charger-led-ring.is-error {
    color: var(--socket-error);
    opacity: 0.72;
}

@keyframes auraBlueRing {
    0%,
    100% {
        opacity: 0.86;
        box-shadow:
            0 0 8px currentColor,
            0 0 18px color-mix(in srgb, currentColor 30%, transparent),
            inset 0 0 8px currentColor;
    }

    50% {
        opacity: 1;
        box-shadow:
            0 0 13px currentColor,
            0 0 31px color-mix(in srgb, currentColor 48%, transparent),
            inset 0 0 10px currentColor;
    }
}

@keyframes auraBlueHalo {
    0%,
    100% {
        opacity: 0.24;
        transform: scale(0.9);
    }

    50% {
        opacity: 0.56;
        transform: scale(1.16);
    }
}

@keyframes auraLoadBalanceFlash {
    0%,
    100% {
        opacity: 0.25;
        box-shadow:
            0 0 5px currentColor,
            0 0 14px color-mix(in srgb, currentColor 22%, transparent),
            inset 0 0 6px currentColor;
    }

    48% {
        opacity: 1;
        box-shadow:
            0 0 15px currentColor,
            0 0 36px color-mix(in srgb, currentColor 56%, transparent),
            inset 0 0 11px currentColor;
    }
}

.mobile-outlets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
}

.mobile-outlet-card {
    position: relative;
    display: grid;
    grid-template-rows: auto auto minmax(224px, 1fr) auto auto;
    gap: 9px;
    min-width: 0;
    padding: 8px 12px 10px;
}

.mobile-outlet-card + .mobile-outlet-card {
    border-left: 1px solid var(--border-soft);
}

.mobile-outlet-card.is-offline {
    opacity: 0.72;
}

.mobile-outlet-head {
    display: grid;
    gap: 3px;
    justify-items: center;
    min-width: 0;
    text-align: center;
}

.mobile-outlet-head span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.mobile-outlet-head strong {
    display: block;
    margin-top: 2px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.15;
}

.mobile-outlet-meter {
    display: grid;
    justify-items: center;
    gap: 2px;
    min-height: 38px;
}

.mobile-outlet-meter span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.mobile-outlet-meter strong {
    color: var(--charge);
    font-size: 19px;
    font-weight: 500;
}

.mobile-slider-zone {
    display: grid;
    grid-template-rows: 1fr auto;
    justify-items: center;
    gap: 8px;
    min-height: 224px;
}

.mobile-slider-shell {
    --slider-manual-fill: color-mix(in srgb, var(--text) 54%, var(--socket-active));
    --mobile-slider-edge: 17px;
    position: relative;
    display: grid;
    grid-template-columns: 18px 44px;
    column-gap: 8px;
    width: 70px;
    height: 190px;
    min-height: 190px;
    place-items: center;
    --mobile-thumb-size: 34px;
}

.mobile-slider-shell.is-ticks-right {
    grid-template-columns: 44px 18px;
}

.mobile-slider-shell .mobile-limit-slider {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    z-index: 3;
}

.mobile-slider-shell.is-ticks-right .mobile-limit-slider {
    grid-column: 1;
}

.mobile-slider-visual-rail {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    z-index: 2;
    width: 44px;
    height: 190px;
    pointer-events: none;
}

.mobile-slider-shell.is-ticks-right .mobile-slider-visual-rail {
    grid-column: 1;
}

.mobile-slider-track,
.mobile-slider-fill,
.mobile-slider-thumb {
    position: absolute;
    left: 50%;
    border-radius: 999px;
}

.mobile-slider-track {
    top: var(--mobile-slider-edge);
    bottom: var(--mobile-slider-edge);
    z-index: 0;
    width: 10px;
    transform: translateX(-50%);
    background: var(--chart-track);
    box-shadow: inset 0 1px 2px rgba(29, 53, 87, 0.12);
}

.mobile-slider-fill {
    bottom: var(--mobile-slider-edge);
    z-index: 1;
    width: 10px;
    transform: translateX(-50%);
    height: var(--mobile-fill-height, 0px);
    background: var(--slider-manual-fill);
    opacity: 0.96;
    transition:
        height 680ms cubic-bezier(0.2, 1.35, 0.28, 1),
        opacity 180ms ease,
        background 240ms ease;
}

.mobile-slider-fill.is-auto {
    opacity: 0;
}

.mobile-slider-thumb {
    bottom: var(--mobile-thumb-bottom, var(--mobile-slider-edge));
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 4px solid var(--charge);
    background: var(--surface-solid);
    box-shadow: 0 8px 18px rgba(29, 53, 87, 0.22);
    opacity: 1;
    transform: translate(-50%, 50%);
    transition:
        bottom 680ms cubic-bezier(0.2, 1.35, 0.28, 1),
        opacity 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 240ms ease;
}

.mobile-slider-thumb.is-auto {
    border-color: color-mix(in srgb, var(--charge) 42%, var(--border-soft));
    background: var(--surface-solid);
    box-shadow: 0 5px 14px rgba(29, 53, 87, 0.12);
}

.mobile-slider-thumb.is-manual {
    border-color: var(--charge);
    background: var(--surface-solid);
}

.mobile-limit-ticks {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-between;
    align-items: flex-end;
    width: 18px;
    height: 170px;
    padding: 6px 0;
}

.mobile-slider-shell.is-ticks-right .mobile-limit-ticks {
    grid-column: 2;
    align-items: flex-start;
}

.mobile-limit-ticks span {
    display: block;
    width: 5px;
    height: 2px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 22%, transparent);
    opacity: 0.56;
    transition:
        width 520ms cubic-bezier(0.2, 1.55, 0.34, 1),
        opacity 220ms ease,
        background 240ms ease,
        box-shadow 320ms ease,
        transform 520ms cubic-bezier(0.2, 1.55, 0.34, 1);
}

.mobile-limit-ticks span.is-major {
    width: 7px;
}

.mobile-limit-ticks span.is-active {
    width: 9px;
    background: color-mix(in srgb, var(--socket-active) 48%, var(--surface-solid));
    opacity: 0.74;
}

.mobile-limit-ticks span.is-blocked {
    background: color-mix(in srgb, var(--danger) 24%, transparent);
    opacity: 0.38;
}

.mobile-limit-ticks span.is-ceiling {
    width: 30px;
    background: var(--limit-marker-color, var(--danger));
    opacity: 0.96;
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--limit-marker-color, var(--danger)) 10%, transparent),
        0 0 12px color-mix(in srgb, var(--limit-marker-color, var(--danger)) 26%, transparent);
    transform: translateX(9px);
    animation: mobileLimitCeilingElastic 620ms cubic-bezier(0.2, 1.55, 0.34, 1);
}

.mobile-slider-shell.is-ticks-right .mobile-limit-ticks span.is-ceiling {
    transform: translateX(-9px);
}

@keyframes mobileLimitCeilingElastic {
    0% {
        width: 14px;
        opacity: 0.58;
    }

    58% {
        width: 36px;
        opacity: 1;
    }

    100% {
        width: 30px;
        opacity: 0.96;
    }
}

.mobile-limit-slider {
    --slider-fill: 0%;
    -webkit-appearance: none;
    appearance: none;
    width: 44px;
    height: 190px;
    min-height: 190px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    writing-mode: vertical-lr;
    direction: rtl;
    accent-color: var(--charge);
}

.mobile-limit-slider:disabled {
    cursor: not-allowed;
    opacity: 0.44;
}

.mobile-limit-slider:focus {
    outline: none;
}

.mobile-limit-slider::-webkit-slider-runnable-track {
    width: 10px;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
}

.mobile-limit-slider.is-auto::-webkit-slider-runnable-track {
    background: transparent;
}

.mobile-limit-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 34px;
    height: 34px;
    margin-left: -12px;
    border: 4px solid transparent;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    opacity: 0;
}

.mobile-limit-slider.is-auto::-webkit-slider-thumb {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    opacity: 0;
}

.mobile-limit-slider.is-auto:active::-webkit-slider-thumb,
.mobile-limit-slider.is-auto:focus-visible::-webkit-slider-thumb {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    opacity: 0;
}

.mobile-limit-slider::-moz-range-track {
    width: 10px;
    border-radius: 999px;
    background: transparent;
}

.mobile-limit-slider::-moz-range-progress {
    width: 10px;
    border-radius: 999px;
    background: transparent;
}

.mobile-limit-slider.is-auto::-moz-range-progress {
    background: transparent;
}

.mobile-limit-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border: 4px solid transparent;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    opacity: 0;
}

.mobile-limit-slider.is-auto::-moz-range-thumb {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    opacity: 0;
}

.mobile-limit-slider.is-auto:active::-moz-range-thumb,
.mobile-limit-slider.is-auto:focus-visible::-moz-range-thumb {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    opacity: 0;
}

.mobile-slider-zone output {
    min-width: 76px;
    padding: 6px 8px;
    border-radius: 999px;
    background: var(--surface-solid);
    color: var(--text);
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    box-shadow: inset 0 0 0 1px var(--border-soft);
}

.mobile-slider-zone output.is-auto {
    color: var(--accent-bright);
}

.mobile-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.mobile-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 14px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-solid);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.1;
}

.mobile-action.primary {
    border-color: color-mix(in srgb, var(--charge) 30%, var(--border-soft));
    background: color-mix(in srgb, var(--charge) 12%, var(--surface));
    color: var(--charge);
}

.mobile-action.danger {
    border-color: color-mix(in srgb, var(--danger) 28%, var(--border-soft));
    background: color-mix(in srgb, var(--danger) 11%, var(--surface));
    color: var(--danger);
}

.mobile-action.auto {
    border-color: color-mix(in srgb, var(--accent-bright) 28%, var(--border-soft));
    background: color-mix(in srgb, var(--accent-bright) 10%, var(--surface));
    color: var(--accent-bright);
}

.mobile-action:disabled {
    cursor: not-allowed;
    opacity: 0.46;
}

.mobile-action .icon,
.mobile-action .icon svg {
    width: 19px;
    height: 19px;
}

.mobile-action svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mobile-empty {
    grid-column: 1 / -1;
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 380px) {
    .charger-app-shell {
        padding-right: 10px;
        padding-left: 10px;
    }

    .mobile-outlets {
        gap: 0;
    }

    .mobile-outlet-card {
        padding-right: 8px;
        padding-left: 8px;
    }

    .mobile-action {
        font-size: 13px;
    }

    .mobile-hero-control {
        width: 38px;
        height: 38px;
    }

    .mobile-hero-control.is-left {
        right: calc(100% + 8px);
    }

    .mobile-hero-control.is-right {
        left: calc(100% + 8px);
    }
}
