/* ==================================================
   QR STUDIO v4
   TWO-COLUMN CONTROL PANEL
================================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f3f4f6;
  color: #111;
}

/* ==================================================
   APP LAYOUT
================================================== */

.app {
  display: grid;
  grid-template-columns: 700px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ==================================================
   CONTROLS PANEL
================================================== */

.controls {
  background: #ffffff;
  padding: 18px;
  overflow-y: auto;

  border-right: 1px solid #e5e7eb;
}

/* ==================================================
   TWO COLUMN CONTROL GRID
================================================== */

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.controls-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ==================================================
   SECTION GROUPING
================================================== */

.section {
  display: flex;
  flex-direction: column;
  gap: 6px;

  padding: 14px;
  background: #fafafa;

  border: 1px solid #ececec;
  border-radius: 12px;
}

.section:last-child {
  margin-bottom: 20px;
}

/* ==================================================
   LABELS
================================================== */

label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.3px;
}

/* ==================================================
   INPUTS
================================================== */

.controls input[type="text"],
.controls input[type="url"],
.controls input[type="file"],
.controls input[type="color"],
.controls input:not([type]),
.controls select {
  width: 100%;

  padding: 10px 12px;
  font-size: 14px;

  border: 1px solid #d1d5db;
  border-radius: 8px;

  outline: none;
  transition: all 0.15s ease;

  background: white;
}

/* Text fields */
.controls input[type="text"],
.controls input[type="url"],
.controls input:not([type]) {
  min-height: 42px;
}

/* Color pickers */
.controls input[type="color"] {
  height: 44px;
  padding: 4px;
  cursor: pointer;
}

/* Range sliders */
.controls input[type="range"] {
  width: 100%;
  cursor: pointer;
}

/* Checkboxes */
.controls input[type="checkbox"] {
  margin-right: 8px;
}

/* Focus */
.controls input:focus,
.controls select:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

/* ==================================================
   BUTTON
================================================== */

.controls button {
  width: 100%;

  padding: 12px;
  font-size: 14px;
  font-weight: 600;

  border: none;
  border-radius: 10px;

  background: #111827;
  color: white;

  cursor: pointer;

  transition:
    transform 0.1s ease,
    background 0.2s ease;
}

.controls button:hover {
  background: #1f2937;
}

.controls button:active {
  transform: scale(0.98);
}

/* ==================================================
   PREVIEW PANEL
================================================== */

.preview {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 40px;
  overflow: auto;
}

/* ==================================================
   QR OUTPUT
================================================== */

.preview img {
  max-width: 90%;
  max-height: 90%;

  border-radius: 16px;

  background: white;
  padding: 10px;

  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.18);
}

/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 1200px) {

  .app {
    grid-template-columns: 500px 1fr;
  }

  .controls-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {

  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .controls {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }

  .controls-grid {
    grid-template-columns: 1fr;
  }
}