/* SEM Cockpit shell — entity workspace overlay */

.cockpit-workspace-shell {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0 0 24px;
}

.cockpit-workspace-shell.hidden {
  display: none !important;
}

.cockpit-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.cockpit-shell-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 239, 232, 0.92));
  box-shadow: 0 10px 30px rgba(18, 106, 92, 0.06);
}

.cockpit-shell-title-block h2 {
  margin: 4px 0 6px;
  font-size: 1.35rem;
}

.cockpit-shell-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
}

.cockpit-shell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cockpit-metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  width: 100%;
}

.cockpit-metric-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.82);
}

.cockpit-metric-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cockpit-metric-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.1rem;
}

.cockpit-tab-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: thin;
}

.cockpit-tab-btn {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.cockpit-tab-btn.active {
  background: linear-gradient(135deg, var(--brand) 0%, #0f5a4e 100%);
  border-color: transparent;
  color: #fff;
}

.cockpit-tab-btn.is-placeholder {
  opacity: 0.55;
}

.cockpit-tab-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  padding: 16px 18px;
  min-height: 180px;
}

.cockpit-empty-state,
.cockpit-loading-state,
.cockpit-error-state {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
}

.cockpit-error-state {
  color: #9b2c2c;
}

.cockpit-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cockpit-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.cockpit-breadcrumb button {
  border: none;
  background: none;
  color: var(--brand-strong);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.cockpit-table-shell {
  overflow-x: auto;
}

@media (max-width: 720px) {
  .cockpit-shell-header {
    padding: 14px;
  }

  .cockpit-shell-actions {
    width: 100%;
  }
}
