* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  background-color: #e2e8f0;
  background-image: url('background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #334155;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

.app-container {
  width: 100%;
  max-width: 1050px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
  display: flex;
  padding: 24px;
  gap: 32px;
}

/* SIDEBAR */
.sidebar {
  width: 200px;
  flex-shrink: 0;
}

.sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar li {
  padding: 14px 16px;
  border-radius: 12px;
  color: #64748b;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.sidebar li i {
  font-size: 20px;
}

.sidebar li:hover {
  background: #f1f5f9;
  color: #3b82f6;
}

.sidebar li.active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
  position: relative;
}

/* CONTENT AREA */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content h2 {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 20px;
}

.input-section {
  margin-bottom: 32px;
}

.input-section label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 12px;
  font-size: 15px;
}

.input-section label i {
  font-size: 18px;
}

.styled-input {
  width: 100%;
  padding: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 15px;
  color: #334155;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #f8fafc;
}

.styled-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hint {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 8px;
}

.customize-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.color-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 12px;
  font-size: 15px;
}

.color-label i {
  font-size: 18px;
  color: #3b82f6;
}

.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.color-option {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 0;
  background: none; /* overrides default button style */
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.active {
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px #3b82f6;
}

.actions {
  display: flex;
  gap: 16px;
  margin-top: auto;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #2563eb;
  color: white;
  padding: 14px 24px;
  flex: 1;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #64748b;
  color: white;
  padding: 14px 24px;
}

.btn-secondary:hover {
  background: #475569;
  transform: translateY(-1px);
}

/* PREVIEW PANEL */
.preview-panel {
  width: 320px;
  background: #221b34; /* Cor escura puxada pro roxo similar à imagem */
  border-radius: 16px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.preview-header {
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.preview-header i {
  color: #f97316;
}

.qr-wrapper {
  background: #ffffff;
  padding: 16px;
  border-radius: 12px;
  width: 220px;
  height: 220px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 32px;
  position: relative;
}

#qrcode {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.placeholder-text {
  position: absolute;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.download-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  opacity: 1;
  transition: opacity 0.3s;
}

.download-actions.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.btn-orange {
  background: #f59e0b;
  color: #1e1400;
  padding: 14px;
  border-radius: 999px; /* Pilula */
  width: 100%;
  font-size: 14px;
}

.btn-orange:hover {
  background: #d97706;
  transform: translateY(-1px);
}

/* Responsividade Básica */
@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
    padding: 16px;
  }
  .sidebar {
    width: 100%;
  }
  .sidebar ul {
    flex-direction: row;
    overflow-x: auto;
  }
  .preview-panel {
    width: 100%;
  }
}
