:root {
  --green: #008c4c;
  --green-dark: #003528;
  --gold: #d4af37;
  --ink: #101820;
  --muted: #667085;
  --line: #dfe6e2;
  --bg: #f5f7f6;
  --white: #fff;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(18, 59, 38, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Manrope, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.auth-body {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(0, 53, 40, 0.92), rgba(0, 140, 76, 0.76)),
    url("../images/hero-wellness.jpg") center / cover no-repeat;
}

.auth-shell {
  width: min(460px, 100%);
}

.login-card,
.admin-card,
.stat-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.login-card {
  padding: 34px;
}

.login-logo img {
  width: 140px;
  height: 96px;
  object-fit: contain;
  object-position: left center;
}

.login-card h1,
.admin-topbar h1,
.admin-card h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.login-card p,
.muted {
  color: var(--muted);
  line-height: 1.7;
}

.login-card form,
.admin-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 0.88rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  outline: 0;
  background: #fff;
}

input[type="file"] {
  min-height: auto;
  padding: 0;
  border: 0;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 14px;
  color: #fff;
  background: linear-gradient(135deg, #12b76a, var(--green));
  font-weight: 800;
  cursor: pointer;
}

button,
.admin-card-head a,
.actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 0;
  border-radius: var(--radius);
  padding: 9px 14px;
  color: #fff;
  background: var(--green);
  font-weight: 800;
  cursor: pointer;
}

.admin-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100svh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  padding: 24px 18px;
  color: rgba(255, 255, 255, 0.82);
  background: var(--green-dark);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
}

.admin-brand img {
  width: 64px;
  height: 52px;
  object-fit: contain;
}

.admin-sidebar nav {
  display: grid;
  gap: 7px;
}

.admin-sidebar a {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 800;
}

.admin-sidebar a:hover,
.admin-sidebar a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.admin-app {
  min-width: 0;
  padding: 28px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.admin-topbar p {
  margin: 0 0 4px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.admin-flash {
  margin-bottom: 18px;
  padding: 13px 16px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--green);
}

.flash-warning {
  background: #9a6a08;
}

.flash-error {
  background: #a23333;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-grid article {
  padding: 22px;
}

.stat-grid span {
  color: var(--muted);
  font-weight: 800;
}

.stat-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 2rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.wide-first {
  grid-template-columns: minmax(340px, 0.85fr) minmax(0, 1.2fr);
}

.admin-card {
  overflow: hidden;
  padding: 22px;
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

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

.span-2 {
  grid-column: span 2;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
  min-height: auto;
}

.upload-field {
  padding: 14px;
  border: 1px dashed rgba(0, 140, 76, 0.36);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f7fffb, #fff);
}

.upload-control {
  display: grid;
  gap: 8px;
}

.upload-control > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.admin-image-preview {
  width: 120px;
  height: 90px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: #eef5f1;
}

.admin-slide-preview {
  width: min(100%, 520px);
  aspect-ratio: 16 / 7;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: #eef5f1;
}

.admin-icon-preview,
.admin-table-icon,
.admin-table-image {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: #eef5f1;
}

.admin-icon-preview {
  width: 72px;
  height: 72px;
  margin-top: 6px;
}

.admin-table-icon {
  width: 40px;
  height: 40px;
}

.admin-table-image {
  width: 78px;
  height: 50px;
}

.generated-field {
  display: grid;
  gap: 7px;
  align-content: start;
  color: #344054;
  font-size: 0.88rem;
  font-weight: 800;
}

.generated-field strong {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--green);
  background: #f0faf5;
  font-size: 0.88rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--green);
  background: #e3f7ed;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.actions form {
  display: inline;
}

.actions button {
  background: #b42318;
}

.status-form select {
  min-width: 130px;
}

code {
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 900px) {
  .admin-body {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-sidebar nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-grid,
  .admin-grid,
  .wide-first {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .admin-app {
    padding: 18px;
  }

  .admin-topbar,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-sidebar nav,
  .stat-grid,
  .admin-grid,
  .wide-first,
  .admin-form {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}
