.admin-is-open {
  overflow: hidden;
}

.admin-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: #10231f;
  color: #fff;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.admin-backdrop[hidden],
.admin-notice[hidden] {
  display: none !important;
}

.admin-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  justify-content: flex-end;
  background: rgba(7, 16, 14, 0.58);
  backdrop-filter: blur(6px);
}

.admin-panel {
  width: min(980px, 100vw);
  height: 100vh;
  background: #f7f3eb;
  color: #11231f;
  box-shadow: -30px 0 60px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid rgba(16, 35, 31, 0.14);
  background: #fffaf2;
}

.admin-panel-header h2,
.admin-panel-header p,
.admin-toolbar h3,
.admin-toolbar p,
.admin-repeater h4,
.admin-state h3,
.admin-state p {
  margin: 0;
}

.admin-kicker {
  color: #5e766d;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(16, 35, 31, 0.18);
  border-radius: 999px;
  background: #ffffff;
  color: #10231f;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.admin-content {
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.admin-state {
  max-width: 620px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #fffaf2;
  border: 1px solid rgba(16, 35, 31, 0.12);
  border-radius: 22px;
  display: grid;
  gap: 1rem;
}

.admin-notice {
  margin: 0.85rem 1.25rem 0;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(16, 35, 31, 0.14);
  background: #fffaf2;
  font-weight: 650;
}

.admin-notice.is-success {
  background: #e9f7ec;
  border-color: #8fc99b;
}

.admin-notice.is-error {
  background: #fff0ee;
  border-color: #d68b83;
}

.admin-notice.is-info {
  background: #eef5ff;
  border-color: #97b7e0;
}

.admin-editor {
  height: 100%;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 0;
}

.admin-tabs {
  padding: 1rem;
  border-right: 1px solid rgba(16, 35, 31, 0.14);
  background: #efe7dc;
  overflow-y: auto;
}

.admin-tab {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  background: transparent;
  color: #253d36;
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.admin-tab:hover,
.admin-tab.is-active {
  background: #10231f;
  color: #fff;
}

.admin-form-wrap {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.admin-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(16, 35, 31, 0.12);
  background: #fffaf2;
}

.admin-toolbar p {
  margin-top: 0.25rem;
  color: #586b65;
}

.admin-toolbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.admin-language-select {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #586b65;
  font-size: 0.78rem;
  font-weight: 800;
}
.admin-language-select span {
  white-space: nowrap;
}
.admin-language-select select {
  min-height: 34px;
  border: 1px solid rgba(16, 35, 31, 0.18);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  background: #fff;
  color: #10231f;
  font: inherit;
  font-weight: 800;
}

.admin-save-state {
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.38rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  background: #e9f7ec;
  color: #173e20;
}

.admin-save-state.is-dirty {
  background: #fff1d7;
  color: #6a4300;
}

.admin-form {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.admin-field {
  display: grid;
  gap: 0.38rem;
  font-weight: 760;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  border: 1px solid rgba(16, 35, 31, 0.18);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  background: #fff;
  color: #10231f;
  font: inherit;
  font-weight: 500;
  outline: none;
}

.admin-field input[type="color"] {
  min-height: 48px;
  padding: 0.35rem;
}

.admin-field textarea {
  resize: vertical;
  line-height: 1.45;
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
  border-color: #10231f;
  box-shadow: 0 0 0 3px rgba(16, 35, 31, 0.14);
}

.admin-field small {
  color: #64766f;
  font-weight: 500;
}

.admin-repeater {
  display: grid;
  gap: 0.8rem;
}

.admin-repeater-header,
.admin-repeater-card-header,
.admin-bottom-bar,
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-repeater-items {
  display: grid;
  gap: 0.9rem;
}

.admin-repeater-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(16, 35, 31, 0.14);
  background: #fffaf2;
}

.admin-repeater-fields {
  display: grid;
  gap: 0.75rem;
}

.admin-mini-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.admin-button,
.admin-mini-button {
  border: 1px solid rgba(16, 35, 31, 0.18);
  border-radius: 999px;
  background: #ffffff;
  color: #10231f;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-button {
  padding: 0.72rem 1rem;
}

.admin-button-small {
  padding: 0.56rem 0.85rem;
}

.admin-button-primary {
  border-color: #10231f;
  background: #10231f;
  color: #ffffff;
}

.admin-button-muted {
  color: #6b3b2f;
}

.admin-mini-button {
  padding: 0.42rem 0.62rem;
  font-size: 0.78rem;
}

.admin-mini-button.is-danger {
  color: #8d2f21;
}

.admin-mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-button:hover,
.admin-mini-button:hover,
.admin-icon-button:hover,
.admin-fab:hover {
  transform: translateY(-1px);
}

.admin-bottom-bar {
  border-top: 1px solid rgba(16, 35, 31, 0.12);
  background: #fffaf2;
  padding: 1rem 1.25rem;
  justify-content: flex-start;
}

@media (max-width: 760px) {
  .admin-panel {
    width: 100vw;
  }

  .admin-editor {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(16, 35, 31, 0.14);
  }

  .admin-tab {
    width: auto;
    white-space: nowrap;
  }

  .admin-toolbar {
    flex-direction: column;
  }

  .admin-fab {
    right: 12px;
    bottom: 12px;
  }
}
