/* Label studio — v2, aligned to the forest/moss design system */

.studio-hero {
  padding: 72px 0 52px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f2f7f1 100%);
}
.studio-hero h1 { max-width: 33ch; font-size: clamp(2.1rem, 3.7vw, 3.15rem); }
.studio-hero .lede { margin-top: 18px; max-width: 64ch; }
.studio-hero .hero-note { margin-top: 26px; }

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 32px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 64px;
}

.studio-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 2px solid var(--forest);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 26px 26px 22px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}
.panel-head h2 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; }

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  margin-bottom: 24px;
  overflow: hidden;
}
.mode-tab {
  appearance: none;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 11px 6px;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
}
.mode-tab:last-child { border-right: 0; }
.mode-tab:hover { color: var(--ink); background: #f7faf6; }
.mode-tab.is-active {
  background: var(--forest);
  color: #fff;
  box-shadow: none;
  font-weight: 600;
}

.studio-set {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 20px 0 4px;
}
.studio-set:first-of-type { border-top: 0; padding-top: 0; }
.studio-set legend {
  padding: 0;
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.studio-set[hidden] { display: none; }
.hint-inline {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.btn-small { padding: 6px 12px; font-size: 12.5px; margin-top: 8px; }

.studio-side { position: sticky; top: 94px; }
.studio-preview-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 2px solid var(--forest);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 20px;
}
.studio-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.studio-preview-head h2 { font-family: var(--serif); font-weight: 400; font-size: 1.22rem; }

.label-stage {
  background:
    linear-gradient(45deg, rgba(11, 26, 40, .03) 25%, transparent 25%, transparent 75%, rgba(11, 26, 40, .03) 75%),
    linear-gradient(45deg, rgba(11, 26, 40, .03) 25%, transparent 25%, transparent 75%, rgba(11, 26, 40, .03) 75%),
    #f5f9f4;
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 16px;
  display: grid;
  place-items: center;
  min-height: 180px;
}
#label-canvas {
  max-width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 2px 14px -6px rgba(11, 26, 40, .45);
  display: block;
}

.studio-status {
  margin: 16px 0 14px;
  font-size: 13px;
  line-height: 1.45;
}
.status-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 9px 11px;
  border-radius: 2px;
  margin-bottom: 6px;
  border: 1px solid transparent;
  border-left-width: 3px;
}
.status-line b { font-weight: 600; }
.status-ok { background: var(--green-soft); border-color: #d3e4da; border-left-color: var(--green); color: #1c4d3a; }
.status-warn { background: var(--amber-soft); border-color: #eed6c4; border-left-color: var(--amber); color: #74380f; }
.status-error { background: var(--red-soft); border-color: #eed3cf; border-left-color: var(--red); color: #6f251f; }
.status-meta { color: var(--muted); font-size: 12px; }

.record-link {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 15px;
  margin-bottom: 20px;
  background: var(--green-soft);
  border: 1px solid #d3e4da;
  border-left: 3px solid var(--green);
  border-radius: 2px;
}
.record-link.is-warn { background: var(--amber-soft); border-color: #eed6c4; border-left-color: var(--amber); }
.record-link.is-error { background: var(--red-soft); border-color: #eed3cf; border-left-color: var(--red); }
.record-link-main strong { display: block; font-size: 14.5px; line-height: 1.4; }
.record-link-main p { margin: 5px 0 0; }
.record-link-kicker {
  display: block;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.record-link-side { display: flex; flex-direction: column; gap: 6px; flex: none; }
.record-link-side .btn { margin-top: 0; white-space: nowrap; }

.pack-card {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.pack-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.pack-head h3 { font-size: .98rem; }
.pack-card .btn { width: 100%; margin-top: 8px; }
.pack-card .btn[disabled] { cursor: not-allowed; }
.pack-status { font-size: 12.5px; line-height: 1.45; margin-top: 8px; }
.pack-status:empty { display: none; }
.pack-status.is-ok { color: #1c4d3a; }
.pack-status.is-error { color: #6f251f; }
.pack-list { list-style: none; margin: 12px 0 0; padding: 0; }
.pack-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid #e6ede5;
  font-size: 12.5px;
}
.pack-list .mono { font-size: 11px; color: var(--muted); }

.studio-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.studio-actions-sub { margin-top: 8px; }
.studio-actions .btn { width: 100%; text-align: center; }
.studio-actions .btn[disabled] { cursor: not-allowed; }
.studio-disclaimer { margin: 16px 0 0; }

.studio-notes { padding-bottom: 72px; }
.note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  border-top: 1px solid var(--line);
  padding-top: 36px;
}
.note-grid h3 { font-size: 1rem; margin-bottom: 9px; }
.note-grid p { font-size: 14px; color: var(--ink-2); line-height: 1.7; }

@media (max-width: 980px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-side { position: static; }
  .note-grid { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 560px) {
  .mode-tabs { grid-template-columns: repeat(2, 1fr); }
  .mode-tab { min-height: 44px; border-bottom: 1px solid var(--line); }
  .studio-panel, .studio-preview-card { padding: 18px; }
  .studio-actions { grid-template-columns: 1fr; }
  .studio-actions .btn { min-height: 44px; }
  .field-row { grid-template-columns: 1fr; }
  .record-link { flex-direction: column; }
  .record-link-side { flex-direction: row; flex-wrap: wrap; }
}
