:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #18201e;
  background: #eef1ef;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

button, input, textarea { font: inherit; letter-spacing: 0; }

.topbar {
  min-height: 86px;
  padding: 18px clamp(20px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #f6faf8;
  background: #17221f;
  border-bottom: 4px solid #d2a52b;
}

.product { margin: 0 0 3px; color: #a9bbb5; font-size: 13px; font-weight: 700; text-transform: uppercase; }
h1 { margin: 0; font-size: 25px; font-weight: 650; letter-spacing: 0; }
.profile { display: flex; align-items: center; gap: 9px; font-size: 13px; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #72c18a; box-shadow: 0 0 0 3px rgba(114, 193, 138, .16); }

.workspace {
  width: min(1440px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(340px, .9fr);
  min-height: calc(100vh - 86px);
}

.form-pane { padding: 34px clamp(20px, 4vw, 56px) 56px; background: #fff; }
.form-pane section { padding: 0 0 30px; margin: 0 0 30px; border-bottom: 1px solid #dce2df; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading h2, .summary-header h2 { margin: 0; font-size: 18px; letter-spacing: 0; }
.section-heading span { color: #6d7773; font-size: 12px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
label { display: grid; gap: 8px; color: #48534f; font-size: 13px; font-weight: 600; min-width: 0; }
input, textarea, .readonly-value {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  color: #17201d;
  background: #fff;
  border: 1px solid #b9c4c0;
  border-radius: 4px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
}
textarea { resize: vertical; overflow-wrap: anywhere; }
input:focus, textarea:focus { outline: 3px solid rgba(24, 111, 87, .15); border-color: #186f57; }
input:disabled, textarea:disabled { color: #606a66; background: #edf0ee; cursor: not-allowed; }
.readonly-value { display: flex; align-items: center; background: #edf0ee; border-color: #d1d8d5; }

button { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 4px; font-weight: 700; cursor: pointer; }
button:disabled { opacity: .48; cursor: not-allowed; }
.primary { color: #fff; background: #186f57; }
.primary:hover:not(:disabled) { background: #105a46; }
.confirm { width: 100%; color: #17201d; background: #d2a52b; }
.confirm:hover:not(:disabled) { background: #bf9220; }

.summary-pane { padding: 34px clamp(20px, 3vw, 38px); background: #f2f4f2; border-left: 1px solid #d4dbd8; }
.summary-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 26px; }
.summary-header p { margin: 0 0 5px; color: #6d7773; font-size: 12px; text-transform: uppercase; font-weight: 700; }
.tag { padding: 5px 8px; color: #615017; background: #f0dfad; border: 1px solid #d9bd68; border-radius: 3px; font-size: 11px; font-weight: 700; }
.tag.locked { color: #225332; background: #d9ecdf; border-color: #9ccbaa; }
.metrics { margin: 0; border-top: 1px solid #d4dbd8; }
.metrics div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 12px 0; border-bottom: 1px solid #d4dbd8; }
.metrics dt { color: #69736f; font-size: 12px; }
.metrics dd { margin: 0; text-align: right; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.not-approved { color: #a23b32; }
.hash-block { margin: 26px 0 16px; }
.hash-block span, details summary { display: block; margin-bottom: 8px; color: #69736f; font-size: 12px; font-weight: 700; }
code { display: block; padding: 11px; color: #27332f; background: #e3e8e5; border: 1px solid #cbd4d0; border-radius: 3px; font-family: "Cascadia Mono", Consolas, monospace; font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; word-break: break-all; }
details { margin-bottom: 24px; }
details summary { cursor: pointer; }
.confirmation { grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 10px; padding: 14px 0; line-height: 1.5; }
.confirmation input { width: 17px; min-height: 17px; margin: 2px 0 0; accent-color: #186f57; }
.notice { margin: 16px 0 0; color: #a23b32; font-size: 11px; text-align: center; }
.message { margin: 0 0 18px; padding: 12px; border-radius: 3px; font-size: 13px; }
.error { color: #812b25; background: #f9e4e1; border: 1px solid #e5aaa3; }

@media (max-width: 980px) {
  .workspace { grid-template-columns: 1fr; }
  .summary-pane { border-left: 0; border-top: 1px solid #d4dbd8; }
  .field-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 12px; }
  .workspace { min-height: auto; }
  .form-pane, .summary-pane { padding: 24px 18px 36px; }
  .field-grid, .field-grid.compact { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  h1 { font-size: 22px; }
  .profile { white-space: normal; }
}
