:root {
  color-scheme: light;
  --bg: #f5f4f0;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #0f766e;
  --border: #e5e7eb;
  --shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
}

[v-cloak] {
  display: none;
}

.app-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: #f1f5f2;
  border-bottom: 1px solid var(--border);
}

.app-header h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
}

.app-header p {
  margin: 0;
  color: var(--muted);
}

.status-chip {
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

.status-chip.loading {
  background: #fff7ed;
  color: #c2410c;
}

.status-chip.ready {
  background: #ecfdf3;
  color: #047857;
}

.header-download {
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
}

.header-note {
  max-width: 440px;
  font-size: 0.85rem;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
  padding: 24px;
}

.app-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 20px 24px 32px;
}

.app-footer a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.app-footer a:hover {
  text-decoration: underline;
}

.panel {
  background: var(--panel);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.panel h2 {
  margin-top: 0;
}

.field {
  margin-bottom: 16px;
}

label {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

input[type="file"],
input[type="number"],
input[type="range"] {
  width: 100%;
}

.file-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.file-upload-row input[type="file"] {
  width: auto;
}

.file-help {
  flex: 1 1 260px;
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.file-help-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.file-help-link:hover {
  text-decoration: underline;
}

input[type="number"] {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.row label {
  font-weight: 500;
  margin: 0;
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 6px;
}

.log-box {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 10px;
  min-height: 120px;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
}

.slider-grid {
  display: grid;
  gap: 12px;
}

.plot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.plot {
  min-height: 240px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.plot-large {
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.plot-medium {
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.plot-stack {
  display: grid;
  gap: 16px;
}

.plot-lambda {
  min-height: 260px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table th,
table td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 6px 4px;
}

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