﻿:root {
  color-scheme: light;
  font-family: Segoe UI, Arial, sans-serif;
  background: #eef2f7;
  color: #1f2937;
}

body {
  margin: 0;
}

.lab-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  box-sizing: border-box;
}

.lab-header {
  min-width: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.lab-header h1 {
  margin: 0;
  color: #1e3a5f;
  font-size: 26px;
  line-height: 1.1;
}

.lab-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
}

.health-link {
  color: #215c98;
  font-size: 13px;
  text-decoration: none;
}

.tabs {
  min-width: 0;
  display: flex;
  gap: 6px;
  border-bottom: 1px solid #a6c9ec;
}

.tab {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #a6c9ec;
  border-bottom: 0;
  background: #ffffff;
  color: #1e3a5f;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.tab.is-active {
  background: #dae9f8;
  font-weight: 700;
}

.workbench {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  grid-template-rows: minmax(0, 1fr) 32px;
  gap: 16px;
}

.preview-band {
  min-width: 0;
  min-height: 0;
  display: contents;
}

.preview-frame {
  min-width: 0;
  min-height: 0;
  grid-column: 1;
  grid-row: 1;
  display: grid;
  place-items: center;
  border: 1px solid #a6c9ec;
  background: #e2e8f0;
  padding: 24px;
  box-sizing: border-box;
}

.preview-slot {
  width: var(--slot-width, 360px);
  height: var(--slot-height, 44px);
}

.preview-slot--panel {
  width: min(560px, 100%);
  aspect-ratio: 1 / 1;
  height: auto;
}

.result-line {
  min-width: 0;
  grid-column: 1;
  grid-row: 2;
  color: #1e3a5f;
  font-size: 14px;
  line-height: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-panel {
  min-width: 0;
  min-height: 0;
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  border: 1px solid #a6c9ec;
  background: #ffffff;
}

.control-panel__title {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-bottom: 1px solid #a6c9ec;
  background: #dae9f8;
  color: #215c98;
  font-size: 16px;
  font-weight: 700;
}

.control-grid {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding: 10px;
  box-sizing: border-box;
}

.field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.field span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field input,
.field select {
  min-width: 0;
  height: 28px;
  box-sizing: border-box;
  font: inherit;
}

@media (max-width: 900px) {
  .workbench {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(280px, 1fr) 32px 360px;
  }

  .control-panel {
    grid-column: 1;
    grid-row: 3;
    min-height: 0;
  }
}
