@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap");

:root {
  --bg: #f5f3ef;
  --ink: #1f2933;
  --muted: #5f6c7b;
  --accent: #1c4b6e;
  --accent-soft: #dfe7ee;
  --card: #ffffff;
  --border: #d7dbe0;
  --shadow: 0 12px 40px rgba(33, 43, 54, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f5f3ef 0%, #eef1f5 50%, #f4f5f0 100%);
  min-height: 100vh;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  width: 56px;
  height: 56px;
}

.brand-name {
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.04em;
}

.brand-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-title h1 {
  margin: 0 0 6px;
  font-size: 2rem;
}

.hero-title p {
  margin: 0;
  color: var(--muted);
}

.card {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px;
  border: 1px solid var(--border);
}

.hidden {
  display: none !important;
}

.block {
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--border);
}

.block:last-of-type {
  border-bottom: none;
}

.block-title {
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--accent);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

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

label.inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

input,
textarea,
select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(28, 75, 110, 0.2);
  border-color: var(--accent);
}

textarea {
  resize: vertical;
}

.req {
  color: #b42318;
  font-weight: 600;
}

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

.hint.small {
  font-size: 0.82rem;
  margin-top: 8px;
}

.tag-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 12px;
  background: #fafafa;
}

.tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--border);
}

.table {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 0.6fr 1fr 0.2fr;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
}

.table-head {
  background: var(--accent-soft);
  font-weight: 600;
  font-size: 0.9rem;
}

.table-row {
  border-top: 1px solid var(--border);
  background: #fff;
}

.table-row input {
  width: 100%;
}

.ghost {
  margin-top: 12px;
  border: 1px dashed var(--accent);
  background: transparent;
  color: var(--accent);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.form-message {
  font-size: 0.95rem;
  color: var(--muted);
}

.form-message.error {
  color: #b42318;
}

.form-message.success {
  color: #067647;
}

.wizard {
  display: grid;
  gap: 18px;
}

.wizard-header {
  display: grid;
  gap: 12px;
}

.wizard-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #e7ebf0;
  overflow: hidden;
}

.wizard-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1c4b6e 0%, #316d95 100%);
  transition: width 0.3s ease;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.wizard-steps li {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-align: center;
  background: #f7f8fa;
}

.wizard-steps li.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: #eef4f9;
  font-weight: 600;
}

.wizard-steps li.is-complete {
  color: #0f5132;
  border-color: #9fd3b7;
  background: #eaf5ef;
}

.step {
  display: none;
}

.step.is-active {
  display: block;
}

.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
}

.success-panel {
  margin-top: 24px;
  text-align: center;
  display: grid;
  gap: 14px;
}

.success-mark {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  margin: 0 auto;
}

.success-meta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  background: var(--accent-soft);
  color: var(--ink);
  max-width: 280px;
  margin: 0 auto;
}

.success-meta .label {
  font-size: 0.85rem;
  color: var(--muted);
}

.success-meta .value {
  font-weight: 600;
  font-size: 1.2rem;
}

.success-actions {
  display: flex;
  justify-content: center;
}

.wizard-nav .ghost,
.wizard-nav .primary {
  margin-top: 0;
}

.wizard-nav .primary:disabled,
.wizard-nav .ghost:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.step-status {
  font-size: 0.9rem;
  color: var(--muted);
}

.sub-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.sub-block-title {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--accent);
}

.standards-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 1fr);
}

.standards-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #fafbfc;
}

.panel-title {
  font-weight: 600;
  margin-bottom: 10px;
}

.standards-grid {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  max-height: 220px;
  overflow-y: auto;
}

#other-standard-wrap {
  margin-top: 12px;
}

.scope-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.annex-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fbfbfb;
}

.annex-card summary {
  list-style: none;
  cursor: pointer;
}

.annex-card summary::-webkit-details-marker {
  display: none;
}

.annex-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 4px 8px;
}

.annex-title::after {
  content: "▾";
  color: var(--muted);
  font-size: 0.9rem;
}

.annex-card[open] .annex-title::after {
  content: "▴";
}

.annex-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.annex-helper {
  margin: 0 0 10px;
  padding-left: 18px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .standards-layout {
    grid-template-columns: 1fr;
  }
  .table-head {
    display: none;
  }
  .table-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .table-row span.remove-btn {
    justify-self: flex-start;
  }
}
