
body.ed { background: #e9eff6; }
.ed h1, .ed h2, .ed h3 { text-transform: none; font-variation-settings: "wdth" 90; letter-spacing: 0; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--navy); }
.login-box { width: 100%; max-width: 380px; display: grid; gap: 10px; }
.login-box h1 { font-size: 26px; color: var(--navy); margin: 0 0 6px; }
.ed-mark { width: 220px; height: auto; margin: 0 0 4px; }
.msg { min-height: 1.4em; margin: 0; color: var(--red-dk); font-weight: 600; }

label { font-weight: 650; font-size: 14px; color: var(--navy); display: block; }
input, select, textarea {
  font: inherit; font-size: 16px; width: 100%;
  border: 1px solid #b9c8d8; border-radius: 10px; padding: 10px 12px; background: #fff; color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(31,95,168,.3); border-color: var(--blue); }
.hint { font-size: 13.5px; color: var(--muted); margin: 4px 0 0; }

.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.light { color: #fff; border-color: rgba(255,255,255,.5); }
.btn.light:hover { background: rgba(255,255,255,.12); }
.btn[disabled] { opacity: .45; cursor: default; }
.icon-btn {
  font: inherit; font-weight: 700; border: 1px solid var(--line); background: #fff; color: var(--navy);
  border-radius: 8px; min-width: 38px; min-height: 38px; padding: 4px 10px; cursor: pointer; font-size: 14px; white-space: nowrap;
}
.icon-btn:hover:not([disabled]) { border-color: var(--navy); }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.icon-btn.danger { color: var(--red-dk); }
.icon-btn.danger.armed { background: var(--red); color: #fff; border-color: var(--red); }
.add-btn {
  font: inherit; font-weight: 700; width: 100%; padding: 14px; cursor: pointer;
  border: 2px dashed #a9bbcf; border-radius: 12px; background: transparent; color: var(--navy);
}
.add-btn:hover { border-color: var(--navy); background: #fff; }

.ed-top { position: sticky; top: 0; z-index: 10; background: var(--navy); color: #fff; }
.ed-top-in { max-width: 980px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ed-title { font-weight: 900; font-variation-settings: "wdth" 70; text-transform: uppercase; font-size: 19px; }
.ed-title span { color: #a9bdd6; font-weight: 600; }
.status { font-size: 13.5px; color: #a9bdd6; order: 3; flex: 1 1 100%; min-width: 120px; }
.status.dirty { color: #ffd166; font-weight: 700; }
.status.err { color: #ff8b98; font-weight: 700; }
.ed-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ed-nav { max-width: 980px; margin: 0 auto; padding: 0 8px; }
.ed-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.ed-nav button {
  font: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer;
  background: none; border: 0; color: #c9d7e8; padding: 10px 12px; border-bottom: 3px solid transparent;
}
.ed-nav button[aria-current="true"] { color: #fff; border-bottom-color: var(--red); }

.conflict { background: #fff4c7; border-bottom: 1px solid #ecd98a; padding: 12px 16px; text-align: center; }
.conflict .btn { margin: 6px 4px 0; }

.ed-main { max-width: 980px; margin: 0 auto; padding: 20px 16px 80px; }
.ed-sec-h { font-size: 28px; color: var(--navy); margin: 4px 0 4px; }
.ed-sec-p { color: var(--muted); margin: 0 0 18px; max-width: 70ch; }

.card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.card.hidden-tab { opacity: .65; }
.row { display: flex; gap: 8px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.fields { display: grid; gap: 12px; margin-top: 12px; }
.two { display: grid; grid-template-columns: 1fr; gap: 12px; }
.three { display: grid; grid-template-columns: 1fr; gap: 12px; }
.type-chip { min-width: 128px; text-align: center; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--ice-2); color: var(--navy); border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.toggle input { width: 20px; height: 20px; }

.sec-card { border-left: 5px solid var(--red); }
.item-row { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.item-row:first-of-type { border-top: 0; }
.item-grid { display: grid; grid-template-columns: 1fr 96px; gap: 8px; }

.ev-card.past { opacity: .6; }
.ev-date { font-size: 13px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .06em; }

.drop { border: 2px dashed #a9bbcf; border-radius: 14px; padding: 22px; text-align: center; background: #fff; margin-bottom: 16px; }
.drop.over { border-color: var(--blue); background: #eef5ff; }
.drop input { display: none; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.photo { background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.photo .pad { padding: 10px; display: grid; gap: 8px; }
.photo .badge { font-size: 12px; font-weight: 700; color: #fff; background: var(--blue); border-radius: 6px; padding: 2px 8px; justify-self: start; }
.progress { font-weight: 600; color: var(--blue); margin: 8px 0 0; }

.hist { list-style: none; padding: 0; margin: 0; }
.hist li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }

.empty-note { color: var(--muted); font-style: italic; }

@media (min-width: 641px) {
  .two { grid-template-columns: 1fr 1fr; }
  .three { grid-template-columns: 1fr 1fr 1fr; }
  .item-grid { grid-template-columns: 1fr 120px; }
  .ed-title { font-size: 22px; }
  .status { order: 0; flex: 1 1 0%; }
}
