* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f4f4ef;
  color: #242a23;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 14px;
}
header {
  height: 66px;
  background: #202820;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(5%, calc((100% - 1120px) / 2));
}
header strong {
  letter-spacing: 2px;
  font-size: 11px;
}
header strong span {
  color: #e49a74;
}
.back {
  color: #dfe5dc;
  text-decoration: none;
  font-size: 12px;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.hidden {
  display: none !important;
}
main {
  width: min(1050px, 90%);
  margin: 48px auto 90px;
}
.login-card {
  max-width: 440px;
  margin: 7vh auto;
  background: white;
  padding: 42px;
  border: 1px solid #e4e5dd;
  box-shadow: 0 15px 50px #1d28120a;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  color: #607858;
  font-weight: 800;
}
.login-card h1,
.dash-title h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 42px;
  letter-spacing: -1px;
  margin: 14px 0;
}
.login-card p,
.dash-title p,
.panel-heading p {
  color: #747a70;
  font-size: 12px;
  line-height: 1.7;
}
.login-card form {
  margin-top: 28px;
}
.login-card label,
.settings-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  font-weight: 750;
  margin-bottom: 17px;
}
.login-card input,
.settings-grid input,
.settings-grid textarea,
.item-row input,
.item-row textarea,
.event-row input,
.event-row textarea,
.event-row select {
  border: 1px solid #dfe2d8;
  background: #fff;
  padding: 12px;
  width: 100%;
  outline-color: #758b6c;
  border-radius: 2px;
}
.primary {
  border: 0;
  background: #405b3c;
  color: white;
  padding: 13px 17px;
  font-weight: 750;
  font-size: 11px;
  border-radius: 2px;
}
.login-card .primary {
  width: 100%;
  margin-top: 5px;
}
.login-card small {
  display: block;
  margin-top: 22px;
  color: #8a9085;
  font-size: 10px;
}
.error {
  color: #b03d2e;
  font-size: 11px;
  margin-top: 12px;
}
.dash-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.dash-title h1 {
  margin-bottom: 5px;
}
.status {
  color: #4c7046;
  font-size: 10px;
}
.tabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid #dcded5;
  margin-bottom: 22px;
}
.tab {
  background: none;
  border: 0;
  padding: 14px 18px;
  font-size: 11px;
  color: #6f756a;
  border-bottom: 2px solid transparent;
}
.tab.active {
  color: #2e432a;
  border-color: #54734b;
  font-weight: 800;
}
.panel {
  background: white;
  border: 1px solid #e2e4dc;
  padding: 28px;
  margin-bottom: 20px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
.panel-heading h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 27px;
  margin: 0;
}
.panel-heading p {
  margin: 7px 0 0;
}
.item-row,
.event-row {
  border: 1px solid #e5e7df;
  padding: 17px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr 110px;
  gap: 12px;
  align-items: start;
}
.item-row .wide,
.event-row .wide {
  grid-column: 1/-1;
}
.item-row label,
.event-row label {
  font-size: 10px;
  color: #697064;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.danger {
  border: 1px solid #e3c8c0;
  background: white;
  color: #a14332;
  padding: 10px;
  font-size: 10px;
}
.save {
  margin-top: 13px;
}
.status-text {
  font-size: 11px;
  color: #4c7046;
  margin-left: 12px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.settings-grid .wide {
  grid-column: 1/-1;
}
.settings-grid textarea {
  resize: vertical;
}
.settings-grid label {
  margin-bottom: 20px;
}
#logout {
  background: transparent;
  border: 1px solid #697565;
  color: white;
  padding: 8px 12px;
  font-size: 10px;
}
@media (max-width: 650px) {
  main {
    margin-top: 30px;
  }
  .panel {
    padding: 18px;
  }
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .item-row,
  .event-row {
    grid-template-columns: 1fr 1fr;
  }
  .item-row .wide,
  .event-row .wide {
    grid-column: 1/-1;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-grid .wide {
    grid-column: auto;
  }
  .dash-title h1 {
    font-size: 35px;
  }
  .login-card {
    padding: 28px;
  }
}
.upload-form {
  border: 1px dashed #cdd3c7;
  background: #f9faf6;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}
.upload-form label {
  font-size: 12px;
  font-weight: 800;
}
.upload-form input[type="file"] {
  max-width: 100%;
  padding: 10px;
  background: #fff;
  border: 1px solid #dfe2d8;
}
.upload-form small {
  font-size: 10px;
  line-height: 1.6;
  color: #747a70;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.media-card {
  border: 1px solid #e2e4dc;
  min-width: 0;
}
.media-preview {
  height: 155px;
  background: #f1f2ec;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.media-preview img,
.media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-file-icon {
  font-size: 12px;
  letter-spacing: 1px;
  color: #607858;
  font-weight: 800;
}
.media-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.media-info strong {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-info small {
  font-size: 10px;
  color: #777d72;
}
.media-url {
  width: 100%;
  border: 1px solid #dfe2d8;
  background: #fafbf8;
  padding: 8px;
  font: 10px monospace;
}
.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.media-actions button {
  padding: 8px;
  font-size: 9px;
}
.secondary {
  border: 1px solid #d8ddd2;
  background: white;
  color: #405b3c;
}
.media-empty {
  color: #777d72;
  font-size: 12px;
  grid-column: 1/-1;
}
@media (max-width: 800px) {
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .media-grid {
    grid-template-columns: 1fr;
  }
  .media-preview {
    height: 210px;
  }
  .tabs {
    overflow-x: auto;
  }
  .tab {
    white-space: nowrap;
    padding: 12px;
  }
}

.settings-grid input[type="file"] {
  width: 100%;
  padding: 12px;
  border: 1px dashed #cdd3c7;
  background: #f9faf6;
}
.settings-grid label small {
  font-weight: 400;
  color: #777d72;
  line-height: 1.5;
}
.setting-image-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: #777d72;
  font-size: 11px;
}
.setting-image-preview img {
  width: 190px;
  height: 110px;
  object-fit: cover;
  border: 1px solid #e2e4dc;
}
.setting-gallery-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.setting-gallery-preview > span {
  font-size: 11px;
  color: #777d72;
}
.setting-gallery-item {
  border: 1px solid #e2e4dc;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.setting-gallery-item img {
  width: 100%;
  height: 90px;
  object-fit: cover;
}
.setting-gallery-item button {
  align-self: flex-start;
  padding: 7px;
  font-size: 9px;
}
