:root {
  font-family: Arial,Helvetica,sans-serif;
  color: #16241a;
  background: #f2f3ee;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: inherit;
}

button,input,select,textarea {
  font: inherit;
}

header {
  background: #14271b;
  color: #fff;
  padding: 14px 0;
}

.wrap {
  max-width: 1140px;
  margin: auto;
  padding: 0 24px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-logo {
  display: flex;
  align-items: center;
}

.admin-logo img {
  display: block;
  width: 108px;
  height: 73px;
  object-fit: contain;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top nav a {
  font-size: 13px;
}

.top nav button {
  border: 1px solid #ffffff99;
  border-radius: 5px;
  background: none;
  color: white;
  padding: 9px 14px;
  cursor: pointer;
}

.page-heading {
  padding: 70px 0 30px;
}

.eyebrow,.section-heading span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .17em;
  color: #5b8062;
}

.page-heading h1,.login h1 {
  font-size: clamp(2.8rem,5vw,5rem);
  letter-spacing: -.06em;
  margin: 16px 0;
}

.page-heading p:last-child,.section-heading p,.login p {
  color: #566259;
  line-height: 1.6;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 25px;
}

.tabs a {
  border: 1px solid #b5c0b4;
  padding: 10px 15px;
  text-decoration: none;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
}

.tabs a:hover {
  background: #d4e98b;
}

.panel {
  background: #fff;
  border: 1px solid #dfe5da;
  border-radius: 12px;
  padding: 32px;
  margin: 0 0 22px;
  scroll-margin-top: 25px;
}

.section-heading h2 {
  font-size: 2.2rem;
  letter-spacing: -.05em;
  margin: 10px 0;
}

.section-heading p {
  margin: 0 0 30px;
}

.text-group {
  border: 0;
  padding: 0;
  margin: 0 0 30px;
}

.text-group legend {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 0 0 16px;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.fields label,.upload-form label,.photo-edit label,.password-form label,.login label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.fields input,.fields select,.fields textarea,.upload-form input,.upload-form select,.photo-edit input,.photo-edit select,.password-form input,.login input {
  width: 100%;
  padding: 11px 12px;
  background: #fafbf8;
  border: 1px solid #becbbd;
  border-radius: 6px;
  color: #18251b;
  outline-color: #629566;
}

.fields textarea {
  resize: vertical;
}

.primary {
  background: #d4e98b;
  color: #14271b;
  border: 0;
  border-radius: 6px;
  padding: 13px 20px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 24px;
}

.primary:hover {
  background: #bede66;
}

.upload-form {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr auto;
  gap: 15px;
  align-items: end;
  background: #f4f7ef;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 28px;
}

.upload-form .primary {
  margin: 0;
}

.photo-list {
  display: grid;
  gap: 10px;
}

.photo-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e0e6df;
  border-radius: 8px;
}

.photo-item img {
  width: 90px;
  height: 78px;
  object-fit: cover;
  border-radius: 4px;
}

.photo-edit {
  display: grid;
  grid-template-columns: 1.3fr .8fr;
  gap: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 180px;
}

.actions button {
  border: 1px solid #b9c6b8;
  background: white;
  border-radius: 5px;
  padding: 7px 9px;
  cursor: pointer;
}

.actions .danger {
  border-color: #dbbaba;
  color: #9d3030;
}

.password-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 15px;
  align-items: end;
}

.password-form .primary {
  margin: 0;
}

.login {
  max-width: 500px;
  margin: 90px auto;
}

.login label {
  margin-top: 30px;
}

.notice {
  background: #ddedc8;
  border: 1px solid #bbd993;
  border-radius: 7px;
  padding: 14px 18px;
  margin: 22px 0;
}

.notice.error {
  background: #fff0ee;
  border-color: #ebbbb5;
  color: #8d2b20;
}

footer {
  text-align: center;
  color: #718073;
  font-size: 11px;
  padding: 30px;
}

@media(max-width:800px) {
  .fields,.upload-form,.password-form {
    grid-template-columns: 1fr 1fr;
  }
  .upload-form .primary,.password-form .primary {
    justify-self: start;
  }
  .photo-item {
    grid-template-columns: 80px 1fr;
  }
  .photo-item img {
    width: 80px;
  }
  .actions {
    grid-column: 2;
    max-width: none;
  }
}

@media(max-width:550px) {
  .admin-logo img {
    width: 88px;
    height: 60px;
  }
  .wrap {
    padding-inline: 15px;
  }
  .panel {
    padding: 18px;
  }
  .fields,.upload-form,.password-form,.photo-edit {
    grid-template-columns: 1fr;
  }
  .top nav {
    gap: 8px;
  }
  .top nav a {
    font-size: 11px;
  }
  .photo-item {
    grid-template-columns: 70px 1fr;
    gap: 10px;
  }
  .photo-item img {
    width: 70px;
    height: 70px;
  }
  .actions {
    grid-column: 1/-1;
  }
  .page-heading {
    padding-top: 45px;
  }
}

.upload-form {
  grid-template-columns: 1fr 1.3fr 1fr;
}

.pending-removal {
  opacity: .48;
  background: #fff1ef;
}

.pending-removal .photo-edit {
  pointer-events: none;
}

.save-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  margin: 0 0 22px;
  background: #14271b;
  color: white;
  border-radius: 10px;
  box-shadow: 0 5px 25px #0003;
}

.save-bar p {
  margin: 0;
  font-size: 13px;
}

.save-bar .primary {
  margin: 0;
  white-space: nowrap;
}

@media(max-width:550px) {
  .save-bar {
    padding: 12px 15px;
  }
  .save-bar p {
    font-size: 11px;
  }
}
