    .login {
      position: fixed;
      inset: 0;
      z-index: 80;
      display: grid;
      place-items: center;
      padding: 22px;
      background: oklch(0.06 0.004 150 / 0.86);
      backdrop-filter: blur(12px);
    }

    .login[hidden] {
      display: none;
    }

    .login-card {
      width: min(440px, 100%);
      padding: 32px;
      border: 1px solid var(--line);
      background: var(--panel);
      box-shadow: var(--shadow);
    }

    .login-card h2 {
      margin: 0;
      font-family: var(--display);
      font-size: 42px;
      font-weight: 800;
      letter-spacing: -0.03em;
      line-height: 0.95;
      text-transform: uppercase;
    }

    .login-card p {
      margin: 14px 0 26px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.7;
    }

    .login-form {
      display: grid;
      gap: 12px;
    }

    .login-form label {
      color: var(--faint);
      font-family: var(--mono);
      font-size: 9px;
      letter-spacing: 0.09em;
      text-transform: uppercase;
    }

    .login-form input {
      width: 100%;
      height: 46px;
      padding: 0 12px;
      border: 1px solid var(--line);
      border-radius: 0;
      color: var(--text);
      background: var(--bg-deep);
      font-family: var(--mono);
      font-size: 12px;
    }

    .login-form .control-button {
      min-height: 46px;
      margin-top: 6px;
    }

    .login-error {
      min-height: 18px;
      margin: 0;
      color: var(--danger);
      font-family: var(--mono);
      font-size: 10px;
    }

    .drawer-backdrop {
      position: fixed;
      inset: 0;
      z-index: 50;
      display: flex;
      justify-content: flex-end;
      background: oklch(0.04 0 0 / 0.58);
      backdrop-filter: blur(3px);
    }

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

    .drawer {
      width: min(560px, 100%);
      height: 100%;
      overflow-y: auto;
      padding: 24px;
      border-left: 1px solid var(--line);
      background: var(--bg);
      box-shadow: var(--shadow);
    }

    .drawer-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      padding-bottom: 20px;
      border-bottom: 1px solid var(--line);
    }

    .drawer-kicker {
      color: var(--faint);
      font-family: var(--mono);
      font-size: 9px;
      text-transform: uppercase;
    }

    .drawer h3 {
      margin: 8px 0 0;
      overflow-wrap: anywhere;
      font-family: var(--mono);
      font-size: 16px;
    }

    .drawer-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1px;
      margin: 20px 0;
      background: var(--line-soft);
    }

    .drawer-field {
      min-height: 78px;
      padding: 14px;
      background: var(--panel);
    }

    .drawer-field span {
      display: block;
      margin-bottom: 8px;
      color: var(--faint);
      font-family: var(--mono);
      font-size: 9px;
      text-transform: uppercase;
    }

    .drawer-field strong {
      display: block;
      overflow-wrap: anywhere;
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 500;
      line-height: 1.5;
    }

    .drawer-section {
      margin-top: 20px;
    }

    .drawer-section h4 {
      margin: 0 0 9px;
      color: var(--faint);
      font-family: var(--mono);
      font-size: 9px;
      font-weight: 400;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .drawer-section pre {
      max-height: 320px;
      margin: 0;
      overflow: auto;
      padding: 14px;
      border: 1px solid var(--line-soft);
      color: var(--muted);
      background: var(--bg-deep);
      font-family: var(--mono);
      font-size: 10px;
      line-height: 1.65;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }

    .toast {
      position: fixed;
      right: 22px;
      bottom: 22px;
      z-index: 90;
      max-width: min(430px, calc(100% - 44px));
      padding: 13px 15px;
      border: 1px solid var(--line);
      color: var(--text);
      background: var(--panel-raised);
      box-shadow: var(--shadow);
      font-family: var(--mono);
      font-size: 10px;
      line-height: 1.5;
      transform: translateY(12px);
      opacity: 0;
      pointer-events: none;
      transition:
        opacity 160ms ease,
        transform 160ms ease;
    }

    .toast.show {
      opacity: 1;
      transform: translateY(0);
    }

    .toast.error {
      border-color: var(--danger);
    }

    .loading .metric-value,
    .loading .queue-total strong {
      color: var(--faint);
    }

    @media (max-width: 1080px) {
      .layout-top {
        grid-template-columns: 1fr;
      }

      .queue-panel {
        display: grid;
        grid-template-columns: 220px 1fr;
      }

      .queue-panel .panel-head {
        grid-column: 1 / -1;
      }

      .queue-total {
        border-right: 1px solid var(--line);
        border-bottom: 0;
      }

      .queue-policy {
        grid-column: 1 / -1;
      }
    }

    @media (max-width: 760px) {
      .topbar {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px 16px;
      }

      .topbar-actions {
        justify-content: space-between;
      }

      .main {
        width: min(100% - 24px, 1540px);
        padding-top: 10px;
      }

      .overview-toolbar {
        align-items: flex-start;
        min-height: 0;
        padding: 12px 0;
        flex-direction: column;
        gap: 8px;
      }

      .overview-identity,
      .overview-controls {
        width: 100%;
        justify-content: space-between;
      }

      .overview-title {
        font-size: 18px;
      }

      .overview-controls {
        gap: 10px;
      }

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

      .metric {
        min-height: 116px;
        border-top: 1px solid var(--line);
        border-right: 1px solid var(--line);
      }

      .metric:nth-child(odd) {
        border-right: 1px solid var(--line);
      }

      .metric:nth-child(even) {
        border-right: 0;
      }

      .metric:first-child,
      .metric:nth-child(2) {
        border-top: 0;
      }

      .metric:last-child {
        grid-column: 1 / -1;
        border-right: 0;
      }

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

      .worker-card {
        border-right: 0;
      }

      .worker-body {
        grid-template-columns: 1fr;
        gap: 12px;
      }

      .queue-panel {
        display: block;
      }

      .queue-total {
        border-right: 0;
        border-bottom: 1px solid var(--line);
      }

      .task-toolbar {
        align-items: stretch;
      }

      .filters {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 3px;
      }

      .filter-button {
        flex: 0 0 auto;
      }

      .search {
        width: 100%;
      }

      .table-wrap {
        overflow: visible;
      }

      table,
      tbody {
        display: block;
      }

      .tasks-panel table,
      .token-table {
        width: 100%;
        min-width: 0;
        table-layout: auto;
      }

      thead {
        display: none;
      }

      tbody {
        display: grid;
        gap: 8px;
        padding: 10px;
      }

      tbody tr[data-job-id],
      tbody tr[data-token-id] {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 14px;
        border: 1px solid var(--line-soft);
        background: var(--panel);
      }

      tbody tr[data-job-id]:hover,
      tbody tr[data-token-id]:hover {
        background: var(--panel-raised);
      }

      tbody tr[data-job-id] td,
      tbody tr[data-token-id] td {
        display: flex;
        height: auto;
        min-width: 0;
        padding: 0;
        border: 0;
        flex-direction: column;
        gap: 5px;
        white-space: normal;
      }

      tbody tr[data-job-id] td::before,
      tbody tr[data-token-id] td::before {
        color: var(--faint);
        content: attr(data-label);
        font-family: var(--mono);
        font-size: 8px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }

      tbody tr[data-job-id] td.job-id {
        grid-column: 1 / -1;
        max-width: none;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--line-soft);
      }

      tbody tr[data-token-id] td:first-child {
        grid-column: 1 / -1;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--line-soft);
        font-size: 12px;
      }

      tbody tr.empty-row {
        display: block;
      }

      tbody td.table-empty {
        display: block;
        padding: 54px 18px;
        border: 0;
      }

      tbody td.table-empty::before {
        display: none;
      }

      .app-footer {
        display: block;
      }

      .app-footer span {
        display: block;
        margin-top: 7px;
      }

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

    .account-label {
      color: var(--signal-soft);
      font-family: var(--mono);
      font-size: 10px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .tokens-panel {
      margin-top: 18px;
      animation-delay: 240ms;
    }

    .token-form {
      display: grid;
      grid-template-columns: 1fr 1fr 1.4fr auto;
      gap: 12px;
      align-items: end;
      padding: 16px 18px;
      border-bottom: 1px solid var(--line);
    }

    .token-form label {
      display: grid;
      gap: 7px;
      min-width: 0;
    }

    .token-form label span {
      color: var(--faint);
      font-family: var(--mono);
      font-size: 9px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .token-form input {
      width: 100%;
      height: 40px;
      min-width: 0;
      padding: 0 10px;
      border: 1px solid var(--line-soft);
      border-radius: 0;
      color: var(--text);
      background: var(--bg-deep);
      font-family: var(--mono);
      font-size: 10px;
    }

    .token-form .control-button {
      min-height: 40px;
      white-space: nowrap;
    }

    .token-output {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 18px;
      border-bottom: 1px solid var(--line);
      background: oklch(0.25 0.045 124 / 0.32);
    }

    .token-output[hidden] {
      display: none;
    }

    .token-output span {
      flex: 0 0 auto;
      color: var(--warn);
      font-family: var(--mono);
      font-size: 9px;
      text-transform: uppercase;
    }

    .token-output code {
      min-width: 0;
      flex: 1;
      overflow-wrap: anywhere;
      color: var(--signal);
      font-family: var(--mono);
      font-size: 11px;
    }

    .token-table td {
      font-family: var(--mono);
      font-size: 10px;
    }

    .token-table .danger-button {
      color: var(--danger);
      border-color: oklch(0.68 0.2 28 / 0.45);
    }

    .token-table .danger-button:hover {
      background: oklch(0.3 0.08 28 / 0.35);
    }

    .file-cell {
      max-width: 190px;
      overflow: hidden;
      color: var(--text);
      text-overflow: ellipsis;
    }

    @media (max-width: 760px) {
      .account-label {
        margin-left: auto;
      }

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

      .token-output {
        align-items: flex-start;
        flex-direction: column;
      }

      .token-output code {
        width: 100%;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }
