.page { display: flex; flex-direction: column; width: min(1680px, calc(100% - 40px)); height: 100dvh; margin: 0 auto; padding: 40px 0; overflow: hidden; }
.topbar, .card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.topbar { margin-bottom: 10px; }
.topbar-statuses { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
h1 { margin: 0; color: var(--navy); font-size: clamp(30px, 3vw, 40px); font-weight: 650; letter-spacing: -.04em; line-height: 1.06; }
.status-chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 550; }
.status-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 16px; flex-shrink: 0; }
.benchmark-rates { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 18px; margin-left: auto; color: var(--muted); font-size: 13px; }
.benchmark-rate { display: inline-flex; align-items: baseline; gap: 6px; }
.benchmark-rate strong { color: #405974; font-weight: 600; }
.topbar, .benchmark-rates, .preparation-status { flex-shrink: 0; }
.preparation-status { display: flex; width: fit-content; align-items: center; gap: 8px; min-height: 34px; padding: 0 13px; border: 1px solid #e0e7ee; border-radius: 8px; color: #6d8197; background: #fff; font-size: 13px; font-weight: 550; }
.preparation-status.is-refreshing { border-color: #d5e0eb; color: #315a86; background: #f5f9fc; }
.preparation-status.is-ready { border-color: #c8dfcf; color: #397052; background: #f4faf5; }
.preparation-status.is-error { border-color: #e5c4c4; color: #a24a4a; background: #fff9f9; }
.status-spinner { width: 8px; height: 8px; border-radius: 50%; background: #aab9c8; }
.preparation-status.is-refreshing .status-spinner { background: transparent; }
.preparation-status.is-error .status-spinner { background: #c05d5d; }
.preparation-status.is-ready .status-spinner { background: #55926b; }
.api-key-button { min-height: 34px; }
.workspace { position: relative; display: grid; flex: 1; grid-template-columns: 380px minmax(0, 1fr); min-height: 0; gap: 18px; }
.workspace-sidebar { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.workspace-tools.card { padding: 18px; }
.workspace-tools .button { width: 100%; white-space: normal; }
.api-access-gate { position: absolute; z-index: 3; inset: 0; display: grid; place-content: center; gap: 8px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: rgb(244 246 248 / 94%); text-align: center; }
.api-access-gate[hidden] { display: none; }
.api-access-gate strong { color: var(--navy); font-size: 18px; }
.api-access-gate span { margin-bottom: 6px; color: var(--muted); font-size: 14px; }
.api-key-button.is-valid { border-color: #a9cdb9; color: #2f6e4a; background: #f3faf5; }
.api-key-button.is-invalid { border-color: #dfb0b0; color: #9f3838; background: #fff7f7; }
.dashboard { display: grid; grid-auto-rows: max-content; align-content: start; min-height: 0; gap: 18px; padding-right: 4px; overflow-y: auto; }
.card { padding: 27px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 2px 5px rgb(23 42 69 / 3%); }
.card-heading { margin-bottom: 24px; }
h2 { margin: 0; color: var(--navy); font-size: 20px; font-weight: 650; letter-spacing: -.025em; }
.issuers-card { height: 100%; min-height: 0; }
.result-card { min-height: 230px; }
.issuers-card { display: flex; flex-direction: column; }
.result-placeholder { margin: 0; color: var(--muted); font-size: 14px; }

@media (max-width: 760px) {
  .page { width: min(100% - 32px, 1440px); height: auto; padding: 30px 0 56px; overflow: visible; }
  .workspace { grid-template-columns: 1fr; height: auto; }
  .issuers-card, .result-card { height: auto; }
  .card { padding: 21px; }
}

@media (max-width: 480px) {
  .topbar, .search-row, .dialog-actions { flex-direction: column; }
  .topbar-statuses { width: 100%; justify-content: flex-start; }
  .search-row .button, .dialog-actions .button { width: 100%; }
}
