:root {
  --ink: #07110d;
  --forest: #063823;
  --green: #74c947;
  --green-light: #9ee96f;
  --paper: #ffffff;
  --mist: #f5f8f3;
  --line: #dce8dc;
  --text: #5b665e;
  --shadow: 0 28px 80px rgba(7, 17, 13, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(116, 201, 71, .18), transparent 28rem),
    linear-gradient(180deg, #07110d 0%, #0b2017 34%, #f5f8f3 34%, #f5f8f3 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.bepass-admin {
  min-height: 100vh;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(100%, 520px);
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 32px;
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow);
}

.login-card img,
.dashboard-brand img {
  width: 178px;
  height: auto;
  object-fit: contain;
}

.admin-kicker {
  margin: 30px 0 12px;
  color: #3b8f23;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.login-card h1,
.dashboard-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -.055em;
  line-height: .98;
}

.login-copy,
.section-title p {
  color: var(--text);
  line-height: 1.6;
}

.login-form,
.content-form {
  display: grid;
  gap: 18px;
}

.login-form {
  margin-top: 28px;
}

label {
  display: grid;
  gap: 8px;
  color: #354037;
  font-size: .78rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cbd9cb;
  border-radius: 14px;
  background: #fbfdfb;
  color: var(--ink);
  outline: 0;
  transition: border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

input {
  min-height: 48px;
  padding: 12px 14px;
}

textarea {
  min-height: 118px;
  padding: 13px 14px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(116, 201, 71, .78);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(116, 201, 71, .12);
}

.login-form button,
.save-button,
.secondary-action {
  min-height: 50px;
  padding: 13px 20px;
  color: #06100c;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  font-weight: 850;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

.login-form button:hover,
.save-button:hover,
.secondary-action:hover {
  transform: translateY(-1px);
  background: #82da53;
  box-shadow: 0 18px 38px rgba(116, 201, 71, .26);
}

.ghost-button,
.dashboard-header nav a,
.dashboard-header nav button,
.remove-post {
  min-height: 42px;
  padding: 10px 15px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 800;
  text-decoration: none;
}

.remove-post {
  color: #7c2626;
}

.form-message {
  min-height: 1.4em;
  margin: 0;
  color: #3b8f23;
  font-size: .8rem;
  font-weight: 750;
}

.form-message.is-error {
  color: #a93232;
}

.login-hint {
  margin: 22px 0 0;
  color: #7b857d;
  font-size: .78rem;
}

.dashboard {
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 52px);
}

.dashboard-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
  padding: 24px;
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 28px;
  background: rgba(7, 17, 13, .72);
  backdrop-filter: blur(14px);
}

.dashboard-header .admin-kicker {
  margin: 0 0 10px;
}

.dashboard-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-header nav a,
.dashboard-header nav button {
  color: var(--paper);
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
}

.admin-section {
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 16px 60px rgba(7, 17, 13, .06);
}

.section-title {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.section-title > span {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--forest);
  border: 1px solid rgba(116, 201, 71, .4);
  border-radius: 50%;
  background: #e5f8dc;
  font-size: .8rem;
  font-weight: 900;
}

.section-title h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2vw, 2.25rem);
  letter-spacing: -.04em;
}

.metrics-editor {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.metric-editor {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dce8dc;
  border-radius: 20px;
  background: #fbfdfb;
}

.metric-editor h3 {
  margin: 0;
  color: #3b8f23;
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cards-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.editor-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fbfdfb;
}

.editor-card-header {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.editor-card-header h3 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -.025em;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-wide {
  grid-column: 1 / -1;
}

.image-field {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.image-preview {
  overflow: hidden;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0b1c14;
}

.image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-controls {
  display: grid;
  gap: 12px;
}

.file-pill {
  display: inline-grid;
  width: fit-content;
  min-height: 42px;
  place-items: center;
  padding: 10px 15px;
  color: var(--forest);
  border: 1px solid rgba(116, 201, 71, .34);
  border-radius: 999px;
  background: #eefbe8;
  font-size: .8rem;
  font-weight: 850;
}

.file-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.secondary-action {
  width: fit-content;
  margin-top: 18px;
  border: 0;
}

.save-bar {
  position: sticky;
  bottom: 16px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(116, 201, 71, .24);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

@media (max-width: 1080px) {
  .dashboard-header {
    grid-template-columns: 1fr;
  }

  .dashboard-header nav {
    justify-content: flex-start;
  }

  .metrics-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .login-shell,
  .dashboard {
    padding: 14px;
  }

  .metrics-editor,
  .field-grid,
  .image-field {
    grid-template-columns: 1fr;
  }

  .save-bar {
    border-radius: 22px;
  }
}
