:root {
  --navy: #17365d;
  --blue: #1f4e78;
  --gold: #c49a2c;
  --ink: #142033;
  --muted: #667085;
  --line: #d8dee8;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --soft: #eaf1f8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 88px; height: auto; }
.brand p { margin: 0 0 2px; color: var(--gold); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
.brand h1 { margin: 0; color: var(--navy); font-size: 22px; }
main { max-width: 1180px; margin: 0 auto; padding: 24px 18px 110px; }
.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 0 18px;
}
.intro h2 { margin: 0; font-size: 42px; color: var(--navy); }
.intro p:last-child { max-width: 560px; color: var(--muted); line-height: 1.45; }
.eyebrow { margin: 0 0 8px; color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin: 16px 0;
}
h3 { margin: 0 0 14px; color: var(--navy); font-size: 19px; }
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, select, textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  min-width: 0;
}
textarea { min-height: 82px; resize: vertical; }
.wide { grid-column: 1 / -1; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
th { background: var(--soft); color: var(--navy); font-size: 12px; text-transform: uppercase; }
td input { width: 100%; padding: 8px; }
td:first-child { width: 38px; color: var(--muted); font-weight: 700; text-align: center; }
.docs {
  min-width: 210px;
}
.docs label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 600;
  margin: 3px 0;
}
.docs input {
  width: auto;
  min-width: auto;
}
.remove { border: 1px solid #f1b8b8; color: #a32020; background: #fff5f5; border-radius: 6px; padding: 7px 9px; }
.notes { width: 100%; min-height: 115px; }
.actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 25px rgba(20, 32, 51, .08);
}
.actions div { margin-right: auto; max-width: 1180px; }
.actions b, .actions span { display: block; }
.actions span { color: var(--muted); font-size: 13px; }
.primary, .secondary, .ghost, .link-button {
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 700;
}
.link-button { text-decoration: none; display: inline-block; }
.primary { border: 1px solid var(--blue); background: var(--blue); color: #fff; }
.secondary { border: 1px solid var(--line); background: #fff; color: var(--navy); }
.ghost { border: 1px solid var(--line); background: #fff; color: var(--navy); }
dialog {
  width: min(760px, 94vw);
  border: 0;
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 24px 70px rgba(20, 32, 51, .28);
}
dialog::backdrop { background: rgba(20, 32, 51, .45); }
.close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 50%;
}
pre {
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  max-height: 55vh;
  overflow: auto;
}
.status {
  min-height: 22px;
  color: var(--blue);
  font-weight: 700;
}
button:disabled {
  opacity: .65;
  cursor: not-allowed;
}
@media (max-width: 760px) {
  .topbar, .intro, .actions { align-items: flex-start; flex-direction: column; }
  .grid { grid-template-columns: 1fr; }
  .actions div { margin-right: 0; }
  main { padding-bottom: 190px; }
}
