/* ---- Admin shell ---- */
.admin-body {
  background: #f4f6f5;
  font-family: 'Inter', system-ui, sans-serif;
  color: #1c2a2a;
  margin: 0;
}

/* ---- Login screen ---- */
.admin-login-body {
  min-height: 100vh;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #14201e, #2f6b5e);
  padding: 1rem;
}
.admin-login-card {
  width: 100%; max-width: 400px;
  background: #fff; padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.admin-login-card form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.admin-login-card label { display: flex; flex-direction: column; font-size: .875rem; font-weight: 500; gap: .35rem; color: #3b4a4a; }
.admin-login-card input {
  padding: .75rem 1rem; border: 1.5px solid #e3e7e3; border-radius: 8px;
  font-size: 1rem; font-family: inherit;
}
.admin-login-card input:focus { outline: none; border-color: #2f6b5e; }

.admin-brand { display: flex; flex-direction: column; line-height: 1.1; color: inherit; text-decoration: none; }
.admin-brand:hover { text-decoration: none; }
.admin-brand .brand-mark { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.4rem; color: #244f47; }
.admin-brand .brand-sub { font-size: .75rem; color: #6b7878; letter-spacing: .04em; text-transform: uppercase; }

/* ---- Top bar ---- */
.admin-top {
  background: #fff; border-bottom: 1px solid #e3e7e3;
  position: sticky; top: 0; z-index: 30;
}
.admin-top-inner {
  max-width: 1400px; margin: 0 auto;
  padding: .9rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-top-cta { display: flex; gap: 1rem; font-size: .9rem; }
.admin-top-cta a { color: #3b4a4a; text-decoration: none; font-weight: 500; }
.admin-top-cta a:hover { color: #2f6b5e; }

/* ---- Layout ---- */
.admin-shell {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 220px 1fr;
  gap: 0;
}
.admin-side {
  background: #fff;
  border-right: 1px solid #e3e7e3;
  min-height: calc(100vh - 60px);
  padding: 1.5rem 0;
}
.admin-side nav { display: flex; flex-direction: column; }
.admin-side a {
  padding: .7rem 1.5rem;
  color: #3b4a4a; text-decoration: none;
  font-size: .92rem; font-weight: 500;
  border-left: 3px solid transparent;
}
.admin-side a:hover { background: #f1f4f1; color: #2f6b5e; text-decoration: none; }
.admin-side a.active {
  background: #f1f4f1; color: #2f6b5e;
  border-left-color: #2f6b5e; font-weight: 600;
}

.admin-main {
  padding: 2rem 2.5rem;
  max-width: 1100px;
}
.admin-h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin: 0 0 1rem;
  color: #14201e;
}
.admin-h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem; font-weight: 600;
  margin: 2rem 0 1rem;
  color: #14201e;
}
.lede { color: #3b4a4a; font-size: 1.02rem; margin-bottom: 2rem; }

/* ---- Cards (dashboard) ---- */
.admin-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 1.5rem;
}
.admin-card {
  background: #fff; border: 1px solid #e3e7e3;
  border-radius: 12px; padding: 1.5rem;
  text-decoration: none; color: inherit;
  transition: transform .15s ease, border-color .15s, box-shadow .15s;
  display: block;
}
.admin-card:hover {
  transform: translateY(-2px); border-color: #2f6b5e;
  box-shadow: 0 6px 18px rgba(20,40,35,.08);
  text-decoration: none;
}
.admin-card h3 {
  font-family: 'Inter', sans-serif; font-size: 1.05rem; font-weight: 600;
  color: #244f47; margin: 0 0 .35rem;
  display: flex; align-items: center; gap: .5rem;
}
.admin-card .count {
  background: #f1f4f1; color: #2f6b5e;
  font-size: .8rem; font-weight: 600;
  padding: .15rem .55rem; border-radius: 999px;
}
.admin-card p { color: #6b7878; font-size: .92rem; margin: 0; }

/* ---- Tables ---- */
.admin-table {
  width: 100%; border-collapse: collapse; margin-bottom: 1.5rem;
  background: #fff; border-radius: 12px; overflow: hidden;
  border: 1px solid #e3e7e3;
}
.admin-table th, .admin-table td {
  padding: .85rem 1rem;
  text-align: left;
  border-bottom: 1px solid #f0f3f0;
  font-size: .92rem;
}
.admin-table th {
  background: #f8faf8; font-weight: 600; color: #14201e;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .04em;
}
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .icon-cell { font-size: 1.4rem; }
.admin-table .row-actions { white-space: nowrap; text-align: right; }
.admin-table .row-actions a, .admin-table .row-actions button {
  margin-left: .5rem; font-size: .88rem;
  background: transparent; border: 0; cursor: pointer; font-family: inherit;
  color: #2f6b5e; text-decoration: none; font-weight: 500;
}
.admin-table .row-actions a:hover, .admin-table .row-actions .link-danger:hover {
  text-decoration: underline;
}
.admin-table .link-danger { color: #b94545; }
.admin-table .muted { color: #6b7878; }

/* ---- Forms ---- */
.admin-form {
  background: #fff; border: 1px solid #e3e7e3;
  border-radius: 12px; padding: 1.5rem;
}
.admin-fieldset {
  border: 0; padding: 0; margin: 0 0 2rem;
}
.admin-fieldset legend {
  font-family: 'Inter', sans-serif;
  font-size: .82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #2f6b5e;
  padding: 0 0 .5rem; margin-bottom: 1rem;
  border-bottom: 1px solid #e3e7e3;
  width: 100%;
}
.form-row {
  display: flex; flex-direction: column;
  margin-bottom: 1rem;
  gap: .35rem;
}
.form-row > span {
  font-size: .85rem; font-weight: 500; color: #3b4a4a;
  display: flex; align-items: center; gap: .5rem;
}
.form-row > span code {
  background: #f1f4f1; color: #6b7878;
  padding: .1rem .4rem; border-radius: 4px;
  font-size: .75rem;
}
.form-row input[type="text"],
.form-row input[type="url"],
.form-row input[type="number"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row textarea {
  width: 100%; padding: .65rem .85rem;
  border: 1.5px solid #e3e7e3; border-radius: 8px;
  font-family: inherit; font-size: .95rem;
  color: #1c2a2a; background: #fff;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none; border-color: #2f6b5e;
}
.form-row textarea { resize: vertical; min-height: 70px; }
.form-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.form-check {
  display: flex; align-items: center; gap: .6rem;
  margin: 1rem 0;
  font-size: .92rem; color: #3b4a4a;
}
.form-check input { width: 18px; height: 18px; }

.admin-actions {
  display: flex; gap: .75rem; flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.5rem; border-top: 1px solid #f0f3f0;
}

/* ---- Alerts ---- */
.alert {
  padding: .9rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: .92rem;
}
.alert-ok { background: #e6f4ef; color: #244f47; border: 1px solid #c8e2d6; }
.alert-error { background: #fae8e8; color: #8a2929; border: 1px solid #f0c8c8; }

/* ---- Mobile ---- */
@media (max-width: 800px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    min-height: auto; border-right: 0;
    border-bottom: 1px solid #e3e7e3;
    padding: .5rem 0;
  }
  .admin-side nav {
    flex-direction: row; overflow-x: auto;
    padding: 0 .5rem;
  }
  .admin-side a {
    padding: .6rem 1rem; border-left: 0; border-bottom: 3px solid transparent;
    white-space: nowrap;
  }
  .admin-side a.active { border-left: 0; border-bottom-color: #2f6b5e; }
  .admin-main { padding: 1.5rem 1rem; }
  .admin-table th:nth-child(4), .admin-table td:nth-child(4) { display: none; }
}
