:root {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: #18212b;
  background: #f6f7f9;
  line-height: 1.45;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
.shell {
  max-width: 1050px;
  margin: auto;
  padding: 24px 18px 56px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.brand {
  font-weight: 800;
  color: #e06421;
  font-size: 1.35rem;
}
.subtitle {
  color: #65717d;
  margin: 3px 0 0;
}
.banner {
  background: #fff4e8;
  color: #8a481e;
  border: 1px solid #f5d3b4;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 18px;
}
.card {
  background: #fff;
  border: 1px solid #e3e7eb;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 3px 12px #1c273208;
}
.hero {
  background: linear-gradient(125deg, #e96d2b, #f4984f);
  color: #fff;
  border: 0;
}
.hero h2 {
  margin: 0 0 8px;
}
.hero .count {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.med-list {
  display: grid;
  gap: 9px;
}
.med {
  color: #18212b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e5e8ec;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  background: #fff;
  width: 100%;
}
.med:hover,
.med.selected {
  border-color: #e87838;
  background: #fff9f5;
}
.med strong {
  display: block;
  overflow-wrap: anywhere;
}
.muted {
  color: #6b7580;
  font-size: 0.9rem;
}
.form {
  display: grid;
  gap: 12px;
}
label {
  display: grid;
  gap: 5px;
  font-weight: 650;
  font-size: 0.9rem;
}
input,
textarea {
  font: inherit;
  border: 1px solid #cbd3da;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  min-width: 0;
}
input[type="checkbox"] { width: 18px; height: 18px; padding: 0; accent-color: #e66f2e; }
.work-area, .grid > div, .med > span:first-child { min-width: 0; }
.med > span:first-child { overflow-wrap: anywhere; }
.list-actions { margin-bottom: 14px; }
.detail { margin-top: 20px; border-top: 1px solid #e5e8ec; padding-top: 18px; }
.detail h2 { overflow-wrap: anywhere; }
.detail-list { display: grid; gap: 10px; margin: 0 0 18px; }
.detail-list > div { border-bottom: 1px solid #edf0f3; padding-bottom: 8px; }
.detail-list dt { color: #65717d; font-size: .85rem; }
.detail-list dd { margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.badge { color: #8a481e; background: #fff4e8; border-radius: 30px; padding: 5px 9px; font-size: .8rem; white-space: nowrap; }
details { border: 1px solid #e5e8ec; border-radius: 8px; padding: 10px 12px; }
summary { cursor: pointer; font-weight: 700; }
.extra-fields { margin-top: 14px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
fieldset { border: 1px solid #e5e8ec; border-radius: 8px; min-width: 0; }
.weekdays { display: flex; flex-wrap: wrap; gap: 10px 15px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #b44e13; outline-offset: 2px; }
textarea {
  min-height: 78px;
  resize: vertical;
}
button {
  font: inherit;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: #e66f2e;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
button.secondary {
  background: #edf0f3;
  color: #283542;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.status {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef0ed;
  color: #a5382b;
  margin-bottom: 14px;
}
.status.ok {
  background: #edf8ef;
  color: #26733d;
}
.file-box {
  margin-top: 15px;
  border-top: 1px solid #e5e8ec;
  padding-top: 15px;
}
.login {
  max-width: 440px;
  margin: 8vh auto;
}
.hidden {
  display: none;
}
.right {
  text-align: right;
}
.med-card { margin-top: 18px; }
a.button { display: inline-block; border-radius: 8px; padding: 10px 14px; font-weight: 700; text-decoration: none; background: #edf0f3; color: #283542; }
@media (max-width: 720px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .shell {
    padding: 17px 12px 40px;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 420px) {
  .card { padding: 16px; }
  .two-col { grid-template-columns: 1fr; }
  .section-title { align-items: flex-start; flex-wrap: wrap; }
  .actions > button, .actions > a { max-width: 100%; }
}
