.template-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background-color: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-soft);
}

.workspace-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1rem;
  flex: 1;
  min-height: 0;
}

.control-panel {
  padding: 1rem 1.25rem;
  background-color: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-soft);
}

.control-panel__section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.canvas-panel {
  flex: 1;
  min-height: 0;
  background: linear-gradient(180deg, rgba(31, 26, 20, 0.04), rgba(31, 26, 20, 0.01));
  border: 1px solid rgba(31, 26, 20, 0.12);
  overflow: hidden;
}

.canvas-panel__body {
  display: block;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 8.5rem);
  padding: 0;
}

.canvas-panel__body canvas {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 991px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .template-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .canvas-panel__body {
    min-height: calc(100vh - 10.5rem);
  }
}
