.arrangement-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: var(--daw-border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
  overflow-x: auto;
}

/* DAW Color Scheme - Purple/Studio Theme (distinct from main Tune-X blue theme) */
:root {
  --daw-primary: #9d4edd;
  --daw-primary-gradient: linear-gradient(135deg, #9d4edd 0%, #c77dff 100%);
  --daw-secondary: #e0aaff;
  --daw-accent: #ff6b9d;
  --daw-success: #a8e6cf;
  --daw-warning: #ffd93d;
  --daw-danger: #ff6b6b;
  --daw-dark: #0f0a1a;
  --daw-darker: #080510;
  --daw-light: #f0f0f0;
  --daw-border-radius: 12px;
  --daw-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Fullscreen body - no padding, no borders, matches Tune-X main page */
body.daw-body {
  background: linear-gradient(135deg, #0f0a1a 0%, #1a0f2e 100%);
  color: var(--daw-light);
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  transition: var(--daw-transition);
  min-height: 100vh;
  min-width: 1200px;
  height: auto;
  display: block;
  overflow-y: auto;
  overflow-x: auto;
  box-sizing: border-box;
  padding-top: 35px; /* Space for banner only */
}

/* App container uses global .app-container class - no need to redefine */

/* Header - matches Tune-X style but with studio colors */
body.daw-body .main-header.daw-header {
  text-align: left;
  margin: 0;
  padding: 12px 20px;
  position: relative;
  z-index: 10;
  background: linear-gradient(135deg, rgba(15, 10, 26, 0.7) 0%, rgba(26, 15, 46, 0.7) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.header-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.daw-body .main-header.daw-header h1 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  background: var(--daw-primary-gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 5s ease infinite;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  display: inline-block;
}

body.daw-body .main-header.daw-header h1::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--daw-secondary);
  margin: 3px 0 0;
  border-radius: 2px;
  box-shadow: 0 0 15px var(--daw-secondary);
  animation: tunerGlow 3s ease-in-out infinite;
}

.header-brand p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Grid container - uses global .grid-container, just override colors */
body.daw-body .grid-container {
  width: 100%;
  height: calc(100vh - 100px);
  height: calc(100dvh - 100px);
  min-height: calc(100vh - 100px);
  min-height: calc(100dvh - 100px);
  gap: 0;
}

/* Dividers - studio purple theme */
body.daw-body .divider {
  background: var(--daw-secondary);
  opacity: 0.6;
}

body.daw-body .divider:hover,
body.daw-body .divider.active {
  background: var(--daw-secondary);
  opacity: 1;
  box-shadow: 0 0 15px var(--daw-secondary);
}

/* Quadrants - no borders, no backgrounds, matches Tune-X style */
body.daw-body .quadrant {
  background: var(--daw-darker);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2) inset;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--daw-transition);
}

body.daw-body .quadrant h2 {
  margin-top: 0;
  font-size: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
  margin-bottom: 15px;
  color: var(--daw-secondary);
}

.quadrant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.quadrant-header h2,
.quadrant-header h1 {
  margin: 0;
}

.quadrant-header p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.6);
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.quadrant-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Ghost button - studio theme */
.ghost-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 15px;
  border-radius: var(--daw-border-radius);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--daw-transition);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ghost-button:hover {
  border-color: var(--daw-secondary);
  color: #fff;
  background: rgba(157, 78, 221, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.ghost-button:active {
  transform: translateY(1px);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--daw-border-radius);
  padding: 12px;
}

.stat-card strong {
  display: block;
  font-size: 1.8rem;
  margin: 0 0 6px;
  color: var(--daw-secondary);
}

.scene-lane {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.scene-chip {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: var(--daw-transition);
}

.scene-chip:hover {
  border-color: var(--daw-secondary);
  color: #fff;
  background: rgba(157, 78, 221, 0.2);
}

.scene-chip.active {
  background: var(--daw-primary-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 5px 15px rgba(157, 78, 221, 0.4);
}

.scene-chip .scene-label {
  font-weight: 600;
  margin-right: 6px;
}

.scene-chip .scene-length {
  font-size: 0.75rem;
  opacity: 0.8;
}

.snapshot-panel {
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--daw-border-radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.snapshot-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.snapshot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.snapshot-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: var(--daw-border-radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
}

.snapshot-item strong {
  font-size: 0.95rem;
  color: #fff;
}

.snapshot-item time {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.snapshot-actions {
  display: flex;
  gap: 8px;
}

.command-palette-trigger {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.command-palette {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.command-palette[aria-hidden="false"] {
  display: flex;
}

.command-palette-panel {
  width: min(640px, 90vw);
  background: rgba(12, 12, 22, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.command-palette-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#commandPaletteInput {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
}

.command-palette-results {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.command-palette-results li {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.command-palette-results li:hover,
.command-palette-results li.active {
  border-color: var(--daw-secondary);
  background: rgba(157, 78, 221, 0.2);
}

.command-palette-results .meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Transport shell */
.transport-shell {
  background: rgba(20, 20, 20, 0.4);
  border-radius: var(--daw-border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
}

.transport-left,
.transport-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.transport-center {
  display: flex;
  justify-content: center;
  gap: 35px;
}

.transport-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--daw-transition);
}

.transport-btn:hover {
  background: rgba(157, 78, 221, 0.3);
  transform: scale(1.1);
}

#transportRecord {
  color: var(--daw-danger);
}

.transport-status {
  min-width: 80px;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.05em;
}

.time-display {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.time-display label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.time-display div {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: monospace;
}

.transport-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.transport-field input,
.transport-field select {
  width: 90px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  padding: 6px 10px;
}

/* Track list */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
}

.track-card {
  padding: 10px;
  border-radius: var(--daw-border-radius);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: var(--daw-transition);
}

.track-card:hover {
  background: rgba(157, 78, 221, 0.1);
  border-color: rgba(157, 78, 221, 0.3);
}

.track-card.active {
  border-color: var(--daw-secondary);
  box-shadow: 0 8px 20px rgba(157, 78, 221, 0.3);
}

.track-name {
  font-weight: 500;
  margin-bottom: 3px;
}

.track-meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Arrangement grid */
.arrangement-grid-ruler {
  position: relative;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  margin-bottom: 8px;
}

.ruler-marker {
  position: absolute;
  top: 4px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.arrangement-grid {
  flex: 1;
  min-height: 320px;
  background: rgba(10, 10, 10, 0.3);
  border-radius: var(--daw-border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.arrangement-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    to right,
    transparent 0,
    transparent calc(100% - 1px),
    rgba(255, 255, 255, 0.05) calc(100% - 1px)
  );
  background-size: 80px 100%;
  pointer-events: none;
}

.arrangement-track-row {
  position: absolute;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  min-height: 70px;
  width: 100%;
}

.scene-highlight {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(157, 78, 221, 0.12);
  border: 1px solid rgba(157, 78, 221, 0.8);
  border-radius: var(--daw-border-radius);
  pointer-events: none;
  box-shadow: 0 0 25px rgba(157, 78, 221, 0.35);
}

.arrangement-clip {
  position: absolute;
  top: 14px;
  height: 42px;
  border-radius: 10px;
  padding: 8px 12px;
  color: #111;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--daw-secondary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  cursor: grab;
}

.arrangement-clip span {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Mixer strips */
.mixer-strips {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.mixer-strip {
  width: 140px;
  min-width: 140px;
  border-radius: var(--daw-border-radius);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.mixer-strip .label {
  font-weight: 600;
}

.meter {
  width: 16px;
  height: 160px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}

.meter::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(180deg, var(--daw-success), var(--daw-danger));
  border-radius: 999px;
}

.fader {
  width: 100%;
}

/* Sidecar panels */
.sidecar-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidecar-tab {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: var(--daw-transition);
}

.sidecar-tab.active {
  color: var(--daw-secondary);
  border-bottom: 2px solid var(--daw-secondary);
}

.sidecar-panels {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
}

.sidecar-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.sidecar-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidecar-panel.active {
  display: flex;
}

.lab-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: start;
}

.lab-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--daw-border-radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.lab-panel h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--daw-secondary);
}

.physics-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.physics-controls .ghost-button.active {
  border-color: rgba(157, 78, 221, 0.6);
  background: rgba(157, 78, 221, 0.2);
  color: #fff;
}

.physics-canvas {
  width: 100%;
  height: 180px;
  border-radius: var(--daw-border-radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
}

.physics-canvas.draw-mode {
  cursor: crosshair;
}

.sequencer-grid {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 6px;
}

.sequencer-step {
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: var(--daw-transition);
}

.sequencer-step.active {
  background: var(--daw-primary);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 12px rgba(157, 78, 221, 0.5);
}

.sequencer-step.playing {
  outline: 2px solid var(--daw-secondary);
  outline-offset: 1px;
}

.physics-meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.asset-list,
.plugin-library {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 6px;
}

.asset-card,
.plugin-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--daw-border-radius);
  padding: 12px;
  transition: var(--daw-transition);
}

.asset-row,
.plugin-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.asset-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.asset-card:hover,
.plugin-card:hover {
  border-color: var(--daw-secondary);
  transform: translateY(-2px);
}

.asset-card .meta,
.plugin-card .meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

.block-button {
  width: 100%;
  justify-content: center;
}

#sessionNotes {
  min-height: 160px;
  resize: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--daw-border-radius);
  color: var(--daw-light);
  padding: 12px;
}

.empty-state {
  text-align: center;
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--daw-border-radius);
  color: rgba(255, 255, 255, 0.6);
}

/* Add track button */
.add-track-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--daw-transition);
}

.add-track-btn:hover {
  border-style: solid;
  color: #fff;
  background: rgba(157, 78, 221, 0.2);
}

/* Primary button - studio theme */
.primary-button {
  background: var(--daw-primary-gradient);
  color: white;
  font-weight: 500;
  border: none;
  padding: 8px 15px;
  border-radius: var(--daw-border-radius);
  cursor: pointer;
  transition: var(--daw-transition);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(157, 78, 221, 0.4);
}

/* Fullscreen mode adjustments */
body.daw-body.full-screen .grid-container {
  height: calc(100vh - 35px) !important;
  height: calc(100dvh - 35px) !important;
}

body.daw-body.full-screen .main-header.daw-header {
  display: none !important;
}
