:root {
  --bg: #f7f9fc;
  --panel: #ffffff;
  --ink: #0b1220;
  --muted: #526173;
  --line: #d9e2ee;
  --accent: #0ea5e9;
  --radius: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Manrope", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0;
  font-size: 28px;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.controls {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 20px;
}

.controls > div {
  min-width: 0;
}

.controls .file-control {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}

input[type="file"],
select,
input[type="number"],
button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}

input[type="file"] {
  min-width: 0;
  max-width: 100%;
  display: block;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.row > * {
  flex: 1;
  min-width: 0;
}

.btn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  cursor: pointer;
  font-weight: 600;
}

@media (max-width: 900px) {
  .controls .row {
    flex-wrap: wrap;
  }

  .controls .row > * {
    flex: 1 1 160px;
  }
}

.charts {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.chart {
  min-height: 320px;
}

.chart-panel.focused {
  grid-column: 1 / -1;
}

.chart-panel.focused .chart {
  min-height: 500px;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.chart-head h3 {
  margin: 0;
}

.chart-toggle {
  width: auto;
  min-width: 88px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
  cursor: pointer;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.table {
  min-width: 520px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
}

.table th {
  color: var(--muted);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
