* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #111;
  --surface: #1a1a1a;
  --border: #2a2a2a;
  --accent: #e05a00;
  --text: #eee;
  --text-muted: #666;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', sans-serif;
  height: 100vh;
  overflow: hidden;
}

#app {
  display: flex;
  height: 100vh;
}

/* SIDEBAR */
#sidebar {
  width: 300px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

h1 {
  font-size: 1.2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

/* UPLOAD */
#upload-area input {
  display: none;
}

#upload-area label {
  display: block;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

#upload-area label:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* CURVAS */
.curve-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}

.tab {
  flex: 1;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
}

.tab.active {
  border-color: var(--accent);
  color: var(--accent);
}

#curve-svg {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: crosshair;
}

/* BOTÕES */
#actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

#actions button {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

#export-btn {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

#actions button:hover {
  background: var(--border);
}

/* PREVIEW */
#preview-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}

#canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}