.layout { display: grid; grid-template-columns: 1fr; gap: 1rem; }
  .state-heading { display: flex; align-items: center; gap: 0.75rem; }
  .state-select {
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.4rem 0.55rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-left: auto;
    max-width: min(28rem, 65%);
  }
  .muted { color: var(--muted); font-size: 0.85rem; }
  .refresh-status { color: var(--muted); font-size: 0.8rem; }
  .stock-actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
  .admin-password {
    width: 10.5rem;
    min-height: 38px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    padding: 0.45rem 0.6rem;
  }
  .state-note { color: var(--muted); font-size: 0.78rem; margin-bottom: 0.85rem; }
  .state-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
  }
  .state-card {
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--panel-2);
    padding: 0.75rem;
    min-width: 0;
  }
  .state-card-label { color: var(--muted); font-size: 0.73rem; margin-bottom: 0.25rem; }
  .state-card-value { font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
  .state-card-value.multi-currency { white-space: pre-line; line-height: 1.45; }
  .state-section { margin-top: 1rem; }
  .state-section h4 { margin: 0 0 0.55rem; font-size: 0.92rem; }
  .state-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
  .state-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; min-width: 690px; }
  .state-table th, .state-table td {
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid var(--border);
    text-align: right;
    white-space: nowrap;
  }
  .state-table th { color: var(--muted); background: rgba(15, 21, 33, 0.55); font-weight: 600; }
  .state-table th:first-child, .state-table td:first-child { text-align: left; }
  .state-table tr:last-child td { border-bottom: 0; }
  .state-id { display: inline-block; max-width: 15rem; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
  .positive { color: var(--success); }
  .negative { color: var(--error); }
  .side-buy { color: var(--success); font-weight: 700; }
  .side-sell { color: #f59e0b; font-weight: 700; }
  .state-empty { color: var(--muted); padding: 0.85rem; }
  .metrics-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
  .metric-chip { border: 1px solid var(--border); border-radius: 999px; padding: 0.28rem 0.55rem; font-size: 0.76rem; }
  .raw-state { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 0.75rem; }
  .raw-state summary { cursor: pointer; color: var(--muted); font-size: 0.82rem; }
  .raw-state pre { margin: 0.7rem 0 0; max-height: 26rem; overflow: auto; white-space: pre-wrap; font-size: 0.75rem; }
  @media (max-width: 600px) {
    .stock-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
    .admin-password { width: 100%; }
    .refresh-status { min-height: 1rem; }
    .state-heading { align-items: stretch; flex-direction: column; }
    .state-select { margin-left: 0; max-width: none; width: 100%; min-height: 42px; }
    .state-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .state-card { padding: 0.65rem; }
  }
