﻿:root {
  --bg: #f6f2e8;
  --panel: #fffdf7;
  --ink: #1f1d18;
  --muted: #6f6a5d;
  --line: #d9d1c4;
  --brand: #0f6e63;
  --danger: #b63c2f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at 18% 0%, #efe8d8 0%, #f6f2e8 45%, #ece4d4 100%);
}

.page {
  width: 100%;
  margin: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(360px, 34vw) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 10px 22px rgba(40, 32, 20, 0.08);
}

.panel-form {
  position: sticky;
  top: 10px;
  max-height: calc(100vh - 20px);
  overflow: auto;
}

.panel-result {
  min-width: 0;
}

h1, h2 {
  margin: 0 0 10px 0;
}

h1 {
  font-size: 22px;
}

h2 {
  margin-top: 12px;
  font-size: 16px;
}

.sub {
  margin-top: 0;
  color: var(--muted);
}

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

label {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

input,
select,
button,
textarea {
  width: 100%;
  font-size: 13px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

textarea {
  resize: vertical;
}

.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 13px;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.checks input {
  width: auto;
}

button {
  cursor: pointer;
  color: #fff;
  border: none;
  font-weight: 700;
  background: linear-gradient(120deg, #198277, #0c5b51);
}

button:hover {
  filter: brightness(1.03);
}

.actions {
  margin-top: 12px;
}

.table-wrap {
  overflow: auto;
  max-height: 34vh;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1320px;
}

th,
td {
  padding: 6px 8px;
  border-bottom: 1px solid #ece5d7;
  white-space: nowrap;
  text-align: right;
  font-size: 12px;
}

th:first-child,
td:first-child {
  text-align: left;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f0e4;
}

.chart-toolbar {
  margin-bottom: 8px;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

#curveChart {
  width: 100%;
  height: 420px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hidden {
  display: none;
}

.error {
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
  margin: 8px 0 0 0;
}

@media (max-width: 1080px) {
  .page {
    grid-template-columns: 1fr;
  }

  .panel-form {
    position: static;
    max-height: none;
    overflow: visible;
  }

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