:root {
        color-scheme: light;
        font-family:
          "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
        --app-bg: #f5f8fc;
        --surface: #ffffff;
        --subtle: #eef4fb;
        --nav-bg: #eaf3ff;
        --brand-deep: #102a56;
        --brand: #2563eb;
        --action: #2563eb;
        --action-hover: #1d4ed8;
        --action-soft: #e8f1ff;
        --text: #102a56;
        --secondary: #52647b;
        --muted: #7a8ba1;
        --border: #c8d9ee;
        --border-strong: #9fb8d4;
        --success: #16745e;
        --success-bg: #e8f5ef;
        --warning: #a76308;
        --warning-bg: #fff7e8;
        --danger: #bc3e45;
        --danger-bg: #fff0f0;
        --proxy: #2563eb;
        --proxy-bg: #eef4ff;
        --log-bg: #10213a;
        background: var(--app-bg);
        color: var(--text);
      }

      * {
        box-sizing: border-box;
      }

      html,
      body {
        margin: 0;
        min-width: 320px;
        min-height: 100%;
        background: var(--app-bg);
      }

      body {
        min-height: 100vh;
        min-height: 100dvh;
      }

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

      button {
        min-height: 40px;
        padding: 0 16px;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: var(--surface);
        color: var(--text);
        cursor: pointer;
        transition:
          border-color 140ms ease,
          background-color 140ms ease,
          color 140ms ease;
      }

      button:hover {
        border-color: var(--border-strong);
        background: var(--subtle);
      }

      button:focus-visible,
      input:focus-visible,
      select:focus-visible,
      textarea:focus-visible {
        outline: 3px solid rgba(37, 99, 235, 0.22);
        outline-offset: 1px;
      }

      button.primary {
        border-color: var(--action);
        background: var(--action);
        color: #ffffff;
      }

      button.primary:hover {
        border-color: var(--action-hover);
        background: var(--action-hover);
      }

      button.danger {
        border-color: var(--danger);
        background: var(--danger-bg);
        color: var(--danger);
      }

      button.danger:hover {
        background: #ffe3e5;
      }

      button:disabled {
        cursor: not-allowed;
        opacity: 0.55;
      }

      h1,
      h2,
      h3,
      p {
        margin: 0;
      }

      h1 {
        font-size: 24px;
        line-height: 34px;
      }

      h2 {
        font-size: 18px;
        line-height: 28px;
      }

      h3 {
        font-size: 14px;
        line-height: 22px;
      }

      .muted {
        color: var(--secondary);
      }

      .eyebrow {
        color: var(--muted);
        font-size: 12px;
        line-height: 18px;
      }

      .hidden {
        display: none !important;
      }

      .row {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
      }

      .login {
        display: grid;
        grid-template-columns: minmax(380px, 36%) minmax(0, 1fr);
        min-height: 100vh;
        min-height: 100dvh;
        background: var(--app-bg);
      }

      .login-brand {
        display: flex;
        min-height: 100%;
        padding: 52px 56px 44px;
        flex-direction: column;
        border-right: 1px solid var(--border);
        background: var(--nav-bg);
        color: var(--text);
      }

      .brand-lockup {
        display: flex;
        align-items: center;
        gap: 11px;
      }

      .brand-product-icon {
        width: 48px;
        height: 48px;
        object-fit: cover;
        flex: 0 0 auto;
        border-radius: 8px;
        box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
      }

      .brand-name {
        color: var(--brand-deep);
        font-size: 17px;
        font-weight: 700;
        line-height: 22px;
      }

      .brand-meta {
        color: var(--secondary);
        font-size: 12px;
        line-height: 18px;
      }

      .login-message {
        max-width: 440px;
        margin: auto 0;
      }

      .login-message h1 {
        margin-bottom: 18px;
        color: var(--brand-deep);
        font-size: 28px;
        line-height: 40px;
      }

      .login-message p {
        color: var(--secondary);
        font-size: 14px;
        line-height: 24px;
      }

      .login-badge {
        display: inline-flex;
        min-height: 26px;
        margin-top: 22px;
        padding: 0 10px;
        align-items: center;
        border-radius: 999px;
        background: var(--action-soft);
        color: var(--action);
        font-size: 12px;
      }

      .login-footnote {
        color: var(--muted);
        font-size: 12px;
      }

      .login-form-zone {
        display: grid;
        min-width: 0;
        padding: 40px;
        place-items: center;
        background: var(--surface);
      }

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

      .login-box > .muted {
        margin-top: 8px;
        margin-bottom: 26px;
        font-size: 14px;
      }

      .field-label {
        display: grid;
        gap: 6px;
        margin-top: 16px;
        color: var(--text);
        font-size: 13px;
        font-weight: 600;
      }

      .field-label input {
        width: 100%;
        height: 44px;
        padding: 0 12px;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: var(--surface);
        color: var(--text);
      }

      .login-box button {
        width: 100%;
        margin-top: 20px;
      }

      .login-security {
        margin-top: 16px;
        color: var(--muted);
        font-size: 12px;
        text-align: center;
      }

      .notice {
        min-height: 22px;
        color: var(--danger);
        font-size: 13px;
        line-height: 20px;
      }

      .login-box .notice {
        margin-top: 10px;
        text-align: center;
      }

      .console-shell {
        display: grid;
        grid-template-columns: 232px minmax(0, 1fr);
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        background: var(--app-bg);
      }

      .sidebar {
        display: flex;
        min-height: 0;
        padding: 24px 18px 18px;
        flex-direction: column;
        gap: 8px;
        overflow: hidden;
        background: var(--nav-bg);
        border-right: 1px solid var(--border);
      }

      .sidebar .brand-lockup {
        min-height: 44px;
      }

      .sidebar .brand-product-icon {
        width: 38px;
        height: 38px;
        border-radius: 6px;
      }

      .sidebar .brand-name {
        color: var(--text);
        font-size: 13px;
        line-height: 20px;
      }

      .sidebar .brand-meta {
        color: var(--secondary);
      }

      .sidebar-divider {
        width: 100%;
        height: 1px;
        margin-bottom: 2px;
        background: var(--action);
        opacity: 0.72;
      }

      .sidebar-nav {
        display: grid;
        gap: 4px;
      }

      .nav-button {
        display: flex;
        width: 100%;
        height: 44px;
        min-height: 44px;
        padding: 0 14px;
        align-items: center;
        gap: 12px;
        border: 0;
        background: transparent;
        color: var(--secondary);
        font-size: 13px;
        font-weight: 600;
        text-align: left;
      }

      .nav-link {
        text-decoration: none;
      }

      .nav-button::before {
        width: 3px;
        height: 20px;
        border-radius: 2px;
        background: transparent;
        content: "";
      }

      .nav-button:hover {
        border-color: transparent;
        background: var(--action-soft);
        color: var(--brand-deep);
      }

      .nav-button.active {
        background: var(--surface);
        color: var(--brand-deep);
        box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
      }

      .nav-button.active::before {
        background: var(--action);
      }

      .sidebar-bottom {
        display: grid;
        gap: 10px;
        margin-top: auto;
      }

      .sidebar-status,
      .sidebar-account {
        display: flex;
        min-height: 32px;
        align-items: center;
        gap: 8px;
        color: var(--secondary);
        font-size: 12px;
      }

      .status-dot {
        width: 8px;
        height: 8px;
        flex: 0 0 auto;
        border-radius: 50%;
        background: var(--success);
      }

      .avatar {
        display: grid;
        width: 28px;
        height: 28px;
        place-items: center;
        border-radius: 50%;
        background: var(--brand);
        color: #ffffff;
        font-family: Inter, Arial, sans-serif;
        font-size: 12px;
        font-weight: 700;
      }

      .workspace {
        display: grid;
        min-width: 0;
        min-height: 0;
        grid-template-rows: auto minmax(0, 1fr);
      }

      .topbar {
        display: flex;
        min-height: 96px;
        padding: 22px 40px 16px;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        border-bottom: 1px solid var(--border);
        background: var(--surface);
      }

      .topbar-copy {
        min-width: 0;
      }

      .topbar-copy p {
        margin-top: 2px;
        color: var(--secondary);
        font-size: 12px;
        line-height: 18px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .topbar-actions {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 0;
      }

      .topbar-notice {
        max-width: 300px;
        margin-right: 12px;
        overflow: hidden;
        color: var(--secondary);
        font-size: 12px;
        white-space: nowrap;
        text-overflow: ellipsis;
      }

      .topbar-actions button {
        min-width: 120px;
      }

      .topbar-actions button + button {
        margin-left: -1px;
      }

      .workspace-content {
        min-width: 0;
        min-height: 0;
        padding: 24px 40px 28px;
        overflow: auto;
        scrollbar-gutter: stable;
      }

      .view-panel {
        width: min(1180px, 100%);
        margin: 0 auto;
      }

      .view-panel[hidden] {
        display: none;
      }

      .section-panel {
        padding: 16px 18px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--surface);
        box-shadow: 0 8px 24px rgba(16, 42, 86, 0.04);
      }

      .section-heading {
        display: flex;
        margin-bottom: 12px;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
      }

      .section-heading p {
        margin-top: 2px;
        color: var(--secondary);
        font-size: 12px;
      }

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

      .metric {
        min-width: 0;
        min-height: 104px;
        padding: 14px 15px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--surface);
        box-shadow: 0 8px 24px rgba(16, 42, 86, 0.04);
      }

      .metric span {
        display: block;
        color: var(--secondary);
        font-size: 12px;
      }

      .metric strong {
        display: block;
        margin-top: 8px;
        color: var(--text);
        font-size: 20px;
        line-height: 28px;
        word-break: break-word;
      }

      .metric small {
        display: block;
        margin-top: 8px;
        color: var(--success);
        font-size: 12px;
      }

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

      .service-list,
      .summary-list {
        display: grid;
        gap: 10px;
        margin-top: 12px;
      }

      .service-row,
      .summary-row {
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--secondary);
        font-size: 14px;
      }

      .service-row strong,
      .summary-row strong {
        margin-right: auto;
        color: var(--text);
        font-weight: 500;
      }

      .service-ok {
        color: var(--success);
        font-size: 12px;
        font-weight: 600;
      }

      .service-warning {
        color: var(--warning);
        font-size: 12px;
        font-weight: 600;
      }

      .service-fail {
        color: var(--danger);
        font-size: 12px;
        font-weight: 600;
      }

      .security-panel {
        display: flex;
        margin-top: 16px;
        align-items: center;
        gap: 16px;
      }

      .security-copy {
        margin-right: auto;
      }

      .security-copy p {
        color: var(--secondary);
        font-size: 12px;
      }

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

      .stack {
        display: grid;
        gap: 10px;
      }

      .link-item {
        display: grid;
        min-height: 64px;
        padding: 10px 12px 10px 16px;
        grid-template-columns: 110px minmax(0, 1fr) auto auto;
        gap: 10px;
        align-items: center;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: var(--surface);
      }

      .link-value {
        min-width: 0;
        overflow: hidden;
        color: var(--secondary);
        font-family: Consolas, "SFMono-Regular", monospace;
        font-size: 13px;
        white-space: nowrap;
        text-overflow: ellipsis;
      }

      .qr {
        display: none;
        margin-top: 14px;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--surface);
      }

      .qr img {
        width: 180px;
        height: 180px;
      }

      .linux-toolbar {
        display: flex;
        min-height: 78px;
        margin-bottom: 16px;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
      }

      .linux-toolbar p,
      .linux-form small,
      .linux-usage span {
        color: var(--secondary);
        font-size: 12px;
      }

      .linux-layout {
        display: grid;
        grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
        gap: 16px;
        align-items: start;
      }

      .linux-form {
        min-width: 0;
      }

      .compact-field {
        margin-top: 12px;
      }

      .compact-field input,
      .compact-field select,
      .compact-field textarea {
        width: 100%;
        padding: 0 12px;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: var(--surface);
        color: var(--text);
      }

      .compact-field input {
        height: 40px;
      }

      .compact-field select {
        height: 40px;
      }

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

      .compact-field textarea {
        min-height: 154px;
        padding-block: 10px;
        resize: vertical;
        font-family: Consolas, "SFMono-Regular", monospace;
        font-size: 13px;
        line-height: 20px;
      }

      .linux-domains-field small {
        font-weight: 400;
      }

      .linux-enabled-control {
        margin-top: 12px;
      }

      .linux-save {
        width: 100%;
        margin-top: 10px;
      }

      .linux-form .notice {
        margin-top: 8px;
      }

      .linux-list-panel {
        min-width: 0;
      }

      .linux-profile-list {
        display: grid;
        max-height: min(53vh, 520px);
        gap: 8px;
        overflow-y: auto;
        scrollbar-gutter: stable;
      }

      .linux-profile-row {
        display: grid;
        min-width: 0;
        padding: 13px 14px;
        grid-template-columns: minmax(180px, 1fr) minmax(250px, auto);
        align-items: center;
        gap: 14px;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: var(--surface);
      }

      .linux-profile-row.is-disabled {
        background: var(--subtle);
      }

      .linux-profile-main {
        min-width: 0;
      }

      .linux-profile-title {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 7px;
        flex-wrap: wrap;
      }

      .linux-profile-title strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .linux-profile-main p,
      .linux-profile-main > span {
        display: block;
        margin-top: 4px;
        color: var(--secondary);
        font-size: 12px;
        line-height: 18px;
      }

      .linux-status {
        display: inline-flex;
        min-height: 22px;
        padding: 1px 7px;
        align-items: center;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 600;
      }

      .linux-status.online,
      .linux-status.enabled {
        background: var(--success-bg);
        color: var(--success);
      }

      .linux-status.offline {
        background: var(--warning-bg);
        color: var(--warning);
      }

      .linux-status.disabled {
        background: var(--subtle);
        color: var(--muted);
      }

      .linux-profile-actions {
        display: flex;
        max-width: 350px;
        justify-content: flex-end;
        gap: 6px;
        flex-wrap: wrap;
      }

      .linux-profile-actions button {
        min-height: 32px;
        padding-inline: 9px;
        font-size: 12px;
      }

      .node-layout {
        grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
      }

      .node-protocol-grid {
        display: grid;
        margin-top: 14px;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
      }

      .node-port-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
      }

      .node-protocol-grid .switch-control {
        min-height: 42px;
        padding: 7px 9px;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: var(--subtle);
      }

      .node-enrollment-result {
        display: grid;
        gap: 8px;
        margin-top: 10px;
      }

      .node-enrollment-result:empty {
        display: none;
      }

      .node-enrollment-result code {
        display: block;
        max-width: 100%;
        padding: 9px 10px;
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: var(--surface);
        color: var(--brand-deep);
        font-family: Consolas, "SFMono-Regular", monospace;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .node-enrollment-result .actions {
        margin-top: 0;
      }

      .node-actions {
        max-width: 390px;
      }

      .linux-empty {
        display: grid;
        min-height: 180px;
        place-content: center;
        gap: 5px;
        color: var(--secondary);
        text-align: center;
      }

      .linux-empty strong {
        color: var(--text);
      }

      .linux-usage {
        display: grid;
        margin-top: 16px;
        grid-template-columns: minmax(150px, 0.7fr) repeat(2, minmax(250px, 1fr));
        align-items: center;
        gap: 12px;
      }

      .linux-usage div {
        display: grid;
        gap: 2px;
      }

      .linux-usage code {
        min-width: 0;
        padding: 9px 11px;
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: var(--subtle);
        color: var(--text);
        font-size: 12px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .rules-toolbar {
        display: flex;
        min-height: 92px;
        margin-bottom: 16px;
        align-items: center;
        gap: 16px;
      }

      .rules-toolbar-copy {
        margin-right: auto;
      }

      .rules-toolbar-copy p {
        color: var(--secondary);
        font-size: 12px;
      }

      .switch-control {
        display: inline-flex;
        min-height: 40px;
        align-items: center;
        gap: 9px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
      }

      .switch-control input {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
      }

      .switch-track {
        display: block;
        width: 42px;
        height: 24px;
        padding: 3px;
        border-radius: 999px;
        background: var(--border-strong);
        transition: background 140ms ease;
      }

      .switch-track::after {
        display: block;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #ffffff;
        box-shadow: 0 1px 3px rgba(16, 42, 86, 0.2);
        content: "";
        transition: transform 140ms ease;
      }

      .switch-control input:checked + .switch-track {
        background: var(--action);
      }

      .switch-control input:checked + .switch-track::after {
        transform: translateX(18px);
      }

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

      .rule-editor {
        min-width: 0;
        padding: 16px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--surface);
      }

      .rule-editor label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        font-size: 18px;
        font-weight: 700;
      }

      .rule-editor p {
        margin: 4px 0 12px;
        color: var(--secondary);
        font-size: 12px;
      }

      .rule-count {
        min-width: 40px;
        min-height: 24px;
        padding: 2px 8px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 500;
        text-align: center;
      }

      .rule-editor textarea {
        width: 100%;
        height: clamp(190px, 33vh, 278px);
        min-height: 170px;
        resize: vertical;
        padding: 12px;
        border-radius: 6px;
        color: var(--text);
        font-family: Consolas, "SFMono-Regular", monospace;
        font-size: 13px;
        line-height: 20px;
      }

      .rule-editor.direct textarea {
        border: 1px solid var(--success);
        background: var(--success-bg);
      }

      .rule-editor.direct .rule-count {
        background: var(--success-bg);
        color: var(--success);
      }

      .rule-editor.proxy textarea {
        border: 1px solid var(--proxy);
        background: var(--proxy-bg);
      }

      .rule-editor.proxy .rule-count {
        background: var(--proxy-bg);
        color: var(--proxy);
      }

      .rule-editor.block textarea {
        border: 1px solid var(--danger);
        background: var(--danger-bg);
      }

      .rule-editor.block .rule-count {
        background: var(--danger-bg);
        color: var(--danger);
      }

      .rules-footer {
        display: flex;
        min-height: 48px;
        margin-top: 12px;
        align-items: center;
        justify-content: flex-end;
        gap: 14px;
      }

      .rule-history-panel {
        margin-top: 4px;
      }

      .history-list {
        display: grid;
        gap: 6px;
      }

      .history-row {
        display: grid;
        min-height: 42px;
        padding: 6px 8px 6px 12px;
        grid-template-columns: 90px minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        border: 1px solid var(--border);
        border-radius: 6px;
        color: var(--secondary);
        font-size: 12px;
      }

      .history-row strong {
        color: var(--text);
      }

      .history-row button,
      .device-table button {
        min-height: 32px;
        padding-inline: 10px;
        font-size: 12px;
      }

      .success-notice {
        color: var(--success);
      }

      .account-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        margin-bottom: 16px;
      }

      .account-card {
        min-width: 0;
        min-height: 104px;
        padding: 16px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--surface);
      }

      .account-card span {
        color: var(--secondary);
        font-size: 12px;
      }

      .account-card strong {
        display: block;
        margin-top: 8px;
        overflow: hidden;
        font-size: 18px;
        white-space: nowrap;
        text-overflow: ellipsis;
      }

      .badge {
        display: inline-flex;
        min-height: 24px;
        padding: 2px 8px;
        align-items: center;
        border-radius: 999px;
        background: var(--success-bg);
        color: var(--success);
        font-size: 12px;
      }

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

      .device-table {
        width: 100%;
        min-width: 760px;
        border-collapse: collapse;
      }

      .device-table th,
      .device-table td {
        height: 50px;
        padding: 10px 16px;
        border-bottom: 1px solid var(--border);
        text-align: left;
        vertical-align: middle;
      }

      .device-table th {
        background: var(--subtle);
        color: var(--secondary);
        font-size: 13px;
        font-weight: 600;
      }

      .device-table td {
        font-size: 14px;
      }

      .log-toolbar {
        display: flex;
        min-height: 48px;
        margin-bottom: 14px;
        align-items: center;
        gap: 10px;
      }

      .log-toolbar select {
        width: 190px;
        height: 40px;
        padding: 0 12px;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: var(--surface);
        color: var(--text);
      }

      .log-toolbar button {
        margin-left: 0;
      }

      .log-toolbar select + button {
        margin-left: auto;
      }

      .log-grid {
        display: grid;
        grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr);
        gap: 16px;
      }

      .log-grid h2 {
        margin-bottom: 8px;
      }

      .output {
        width: 100%;
        height: min(52vh, 520px);
        min-height: 300px;
        margin: 0;
        padding: 18px;
        overflow: auto;
        border: 1px solid #274267;
        border-radius: 8px;
        background: var(--log-bg);
        color: #dce6ec;
        font-family: Consolas, "SFMono-Regular", monospace;
        font-size: 13px;
        line-height: 1.75;
        white-space: pre-wrap;
      }

      .log-note {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 16px;
        margin-top: 16px;
      }

      .log-note p {
        margin-top: 6px;
        color: var(--secondary);
        font-size: 13px;
      }

      @media (max-width: 1080px) {
        .console-shell {
          grid-template-columns: 204px minmax(0, 1fr);
        }

        .sidebar {
          padding-inline: 14px;
        }

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

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

        .rule-editor textarea {
          height: 190px;
        }

        .rules-toolbar,
        .security-panel,
        .linux-toolbar {
          align-items: flex-start;
          flex-wrap: wrap;
        }

        .linux-profile-row {
          grid-template-columns: 1fr;
        }

        .linux-profile-actions {
          max-width: none;
          justify-content: flex-start;
        }

        .linux-usage {
          grid-template-columns: 1fr;
        }
      }

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

        .login-brand {
          min-height: 230px;
          padding: 28px 24px;
        }

        .login-message {
          margin: 34px 0 0;
        }

        .login-message h1 {
          margin-bottom: 8px;
          font-size: 22px;
          line-height: 30px;
        }

        .login-message p,
        .login-badge,
        .login-footnote {
          display: none;
        }

        .login-form-zone {
          padding: 32px 24px 48px;
        }

        .console-shell {
          display: block;
          height: auto;
          min-height: 100vh;
          min-height: 100dvh;
          overflow: visible;
        }

        .sidebar {
          position: sticky;
          z-index: 10;
          top: 0;
          min-height: 0;
          padding: 10px 12px;
          border-right: 0;
          border-bottom: 1px solid var(--border);
        }

        .sidebar .brand-lockup,
        .sidebar-divider,
        .sidebar-bottom {
          display: none;
        }

        .sidebar-nav {
          display: flex;
          gap: 6px;
          overflow-x: auto;
          scrollbar-width: none;
        }

        .sidebar-nav::-webkit-scrollbar {
          display: none;
        }

        .nav-button {
          width: auto;
          min-width: max-content;
          padding: 0 12px;
        }

        .nav-button::before {
          display: none;
        }

        .workspace {
          display: block;
        }

        .topbar {
          min-height: 112px;
          padding: 18px 18px 12px;
          align-items: flex-start;
        }

        .topbar-actions button {
          min-width: auto;
          padding-inline: 12px;
        }

        .workspace-content {
          padding: 18px 18px 28px;
          overflow: visible;
        }

        .overview-grid,
        .account-grid,
        .log-note,
        .log-grid,
        .linux-layout {
          grid-template-columns: 1fr;
        }

        .linux-selection-grid {
          grid-template-columns: 1fr;
        }

        .linux-toolbar {
          display: grid;
        }

        .linux-profile-list {
          max-height: none;
        }

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

        .metric {
          min-height: 96px;
        }

        .topbar-notice {
          display: none;
        }

        .link-item {
          grid-template-columns: 1fr auto auto;
        }

        .link-value {
          grid-column: 1 / -1;
          grid-row: 2;
        }

        .rules-toolbar {
          display: grid;
          grid-template-columns: 1fr auto;
        }

        .rules-toolbar-copy {
          grid-column: 1 / -1;
        }

        .security-panel {
          display: block;
        }

        .actions {
          display: grid;
          grid-template-columns: 1fr 1fr;
          margin-top: 14px;
        }

        .log-toolbar {
          align-items: stretch;
          flex-wrap: wrap;
        }

        .log-toolbar select {
          width: calc(50% - 5px);
        }

        .log-toolbar button {
          width: 100%;
          margin-left: 0;
        }

        .output {
          min-height: 300px;
          height: 44vh;
        }

        .history-row {
          grid-template-columns: 74px minmax(0, 1fr) auto;
        }
      }
