:root {
  --bg: #0c0f14;
  --bg-elevated: #141a24;
  --bg-input: #0e131c;
  --border: rgba(94, 234, 212, 0.12);
  --accent: #5eead4;
  --text: #e8edf5;
  --text-muted: #8b98ab;
  --danger: #f87171;
  --warn: #fbbf24;
  --success: #6ee7b7;
  --radius: 12px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(94, 234, 212, 0.08), transparent),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(56, 189, 248, 0.06), transparent),
    var(--bg);
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

header.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3.5vw, 2.15rem);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #f0fdfa 0%, var(--accent) 55%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-guide {
  max-width: 48rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-guide p {
  margin: 0 0 0.75rem;
}

.hero-guide a {
  color: var(--accent);
}

.workspace {
  display: grid;
  gap: 1rem;
}

.panel {
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(20, 26, 36, 0.92);
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
}

.options-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.muted {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-top: 0.75rem;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  grid-template-columns: none;
}

.checks input {
  width: auto;
}

.activity-table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
}

.activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 720px;
}

.activity-table th,
.activity-table td {
  text-align: left;
  padding: 0.4rem 0.35rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.activity-table th {
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.activity-table input,
.activity-table select {
  padding: 0.35rem 0.4rem;
  font-size: 0.82rem;
}

.activity-table .col-name {
  min-width: 10rem;
}

.activity-table .col-dur,
.activity-table .col-lag,
.activity-table .col-start {
  width: 4.5rem;
}

.activity-table .col-wp {
  width: 7.5rem;
}

.activity-table .col-deps {
  min-width: 9rem;
}

.btn-primary,
.btn-secondary,
.btn-icon {
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.55rem 0.95rem;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, #2dd4bf, #38bdf8);
  color: #0c0f14;
}

.btn-secondary,
.btn-icon {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-icon {
  padding: 0.35rem 0.55rem;
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

#status {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
}

#status.error {
  color: var(--danger);
}

#status.warn {
  color: var(--warn);
}

#status.ok {
  color: var(--success);
}

#preview {
  overflow-x: auto;
  background: #fff;
  border-radius: 8px;
  padding: 0.5rem;
}

#preview svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.tips details {
  margin: 0.35rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  background: rgba(14, 19, 28, 0.5);
}

.tips summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.9rem;
}

.tips details p,
.tips details ul {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0.5rem 0 0;
}

.tips ul {
  padding-left: 1.15rem;
}

.page-guide-body {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.guide-section h3 {
  margin: 1rem 0 0.4rem;
  font-size: 0.95rem;
  color: var(--text);
}
