:root {
  --ink: #29241c;
  --muted: #665e52;
  --gold: #c5a044;
  --line: #e7dfd1;
  --paper: #fff;
  --bg: #f8f6f1;
  font-family: Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  background: #21190d;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px max(20px, calc((100vw - 1180px) / 2));
}
header a {
  color: #f0d790;
}
nav {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.brand {
  font-family: Georgia, serif;
  font-size: 24px;
  text-decoration: none;
}
.brand small {
  display: block;
  font:
    12px Arial,
    sans-serif;
  letter-spacing: 0.08em;
}
main {
  max-width: 1180px;
  margin: auto;
  padding: 30px 20px;
}
h1,
h2,
h3 {
  line-height: 1.25;
}
h1 {
  font-family: Georgia, serif;
  font-size: clamp(28px, 4vw, 40px);
  margin: 8px 0;
}
h2 {
  font-size: 21px;
}
.intro,
.toolbar,
.actions,
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #7a5b15;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin: 20px 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.metric {
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 12px;
}
.metric strong {
  display: block;
  font-size: 26px;
}
.muted,
small {
  color: var(--muted);
}
button,
.button {
  font: inherit;
  font-weight: 600;
  border: 1px solid #927425;
  border-radius: 8px;
  padding: 10px 16px;
  background: #e3c66e;
  color: #21190d;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button.secondary {
  background: #fff;
  border-color: var(--line);
}
button.danger {
  background: #fff;
  color: #8e2920;
  border-color: #b76c62;
}
input,
select,
textarea {
  width: 100%;
  font: inherit;
  padding: 11px;
  border: 1px solid #bcb3a4;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}
textarea {
  min-height: 110px;
  resize: vertical;
}
label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin: 12px 0;
}
label small {
  display: block;
  font-weight: 400;
}
.toolbar label {
  max-width: 260px;
  flex: 1;
}
.request {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 20px 0;
  align-items: center;
}
.request h3 {
  margin: 0 0 8px;
}
.request p {
  margin: 5px 0;
}
.badge {
  display: inline-block;
  background: #f3eedf;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 13px;
}
.overdue {
  background: #ffebe6;
  color: #8e2920;
}
.timeline {
  list-style: none;
  padding: 0;
}
.timeline li {
  border-left: 3px solid #d3ba74;
  padding: 0 0 22px 18px;
  margin-left: 6px;
  overflow-wrap: anywhere;
}
.timeline p {
  white-space: pre-wrap;
  margin: 8px 0;
}
.internal {
  background: #f4f1fb;
  padding: 8px;
  border-radius: 6px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}
.wide {
  grid-column: 1/-1;
}
.check {
  display: flex;
  gap: 12px;
  align-items: start;
}
.check input {
  width: auto;
  margin-top: 6px;
}
.details {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#notice {
  padding: 12px;
  border-radius: 8px;
  background: #f0eadb;
}
#notice.error {
  background: #ffebe6;
  color: #83261e;
}
#modalError {
  color: #83261e;
}
dialog {
  max-width: 760px;
  width: calc(100% - 28px);
  max-height: 90vh;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}
dialog::backdrop {
  background: #0008;
}
.dialog-head {
  position: sticky;
  top: -24px;
  background: #fff;
  z-index: 1;
  padding: 8px 0;
}
footer {
  padding: 20px 0;
  color: var(--muted);
  font-size: 14px;
}
footer a {
  color: #72561b;
  margin-right: 18px;
}
a {
  color: #795b16;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #2673ae;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 640px) {
  header {
    align-items: flex-start;
    flex-direction: column;
  }
  .panel {
    padding: 18px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .request {
    grid-template-columns: 1fr;
  }
  .toolbar {
    align-items: stretch;
  }
  .toolbar label {
    max-width: none;
    flex-basis: 100%;
  }
  .actions button {
    flex: 1;
  }
  .intro > button {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
.actions {
  justify-content: flex-start;
}
.request p {
  overflow-wrap: anywhere;
}
dialog input,
dialog select {
  min-width: 0;
}

.publication-diff{display:grid;grid-template-columns:1fr 1fr;gap:16px}.publication-diff pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:260px;overflow:auto;background:#f8f5ed;padding:12px;border-radius:8px}@media(max-width:640px){.publication-diff{grid-template-columns:1fr}}
.inventory-period{display:flex;gap:12px;align-items:end;flex-wrap:wrap;padding:12px;border:1px solid var(--line);border-radius:8px;margin:10px 0}.inventory-period label{flex:1;min-width:140px}.inventory-period button{margin-bottom:12px}.partner-load-error{margin:16px;padding:16px;background:#fff0e8;border:1px solid #d5a081;border-radius:9px;color:#76321c}
