﻿:root {
  --bg: #0a0d12;
  --panel: rgba(16, 21, 30, 0.94);
  --panel-2: rgba(19, 26, 37, 0.94);
  --border: rgba(124, 143, 173, 0.18);
  --text: #edf2ff;
  --muted: #8d9bb4;
  --accent: #4cc9f0;
  --danger: #f25f5c;
  --input: #0f1622;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(76, 201, 240, 0.15), transparent 26%),
    radial-gradient(circle at top right, rgba(126, 224, 129, 0.1), transparent 22%),
    linear-gradient(180deg, #070a0e 0%, #0d1117 100%);
  color: var(--text);
  font-family: "Segoe UI", "Arial Nova", sans-serif;
}

body {
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 390px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 22px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(11, 16, 24, 0.96), rgba(11, 16, 24, 0.9));
  overflow-y: auto;
  backdrop-filter: blur(16px);
}

.sidebar-head {
  margin-bottom: 20px;
}

.sidebar-head h1 {
  margin: 6px 0 8px;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.sidebar-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.panel-title {
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.field {
  margin-bottom: 12px;
}

.field:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

input,
select,
button {
  width: 100%;
  border: 1px solid rgba(137, 159, 194, 0.16);
  border-radius: 12px;
  background: var(--input);
  color: var(--text);
  font: inherit;
}

input,
select {
  padding: 11px 12px;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(76, 201, 240, 0.55);
  box-shadow: 0 0 0 4px rgba(76, 201, 240, 0.12);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.checkbox input {
  width: auto;
  margin: 0;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stack {
  display: flex;
  flex-direction: column;
}

.button-row {
  display: flex;
  gap: 10px;
}

.button-row.stacked {
  display: block;
}

.button {
  padding: 11px 14px;
  background: linear-gradient(180deg, #20344f, #16253a);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.button:hover {
  background: linear-gradient(180deg, #27405f, #1b2d46);
  transform: translateY(-1px);
}

.button-secondary {
  background: linear-gradient(180deg, #182334, #121b28);
}

.button-secondary:hover {
  background: linear-gradient(180deg, #203046, #182435);
}

.button-danger {
  background: linear-gradient(180deg, rgba(242, 95, 92, 0.24), rgba(99, 24, 24, 0.35));
}

.status-line {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.warnings-box {
  margin-top: 12px;
  padding: 0;
}

.warning-item {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(242, 95, 92, 0.25);
  border-radius: 12px;
  background: rgba(242, 95, 92, 0.08);
  color: #ffd3d2;
  font-size: 12px;
  line-height: 1.4;
}

.preview-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
}

.preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.preview-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.preview-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.preview-mode-wrap {
  min-width: 220px;
}

.preview-mode-wrap label {
  margin-bottom: 6px;
}

.plot-host {
  flex: 1;
  min-height: 560px;
  border: 1px solid var(--border);
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(76, 201, 240, 0.08), transparent 35%),
    linear-gradient(180deg, rgba(14, 20, 29, 0.96), rgba(10, 14, 20, 0.98));
  box-shadow: var(--shadow);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .preview-area {
    padding-top: 14px;
  }

  .preview-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .button-row {
    flex-wrap: wrap;
  }
}
