:root {
  --bg: #f7f3ea;
  --surface: #fff9ef;
  --ink: #123c37;
  --muted: #60746f;
  --berry: #0e4a43;
  --copper: #d77852;
  --sage-mist: #e0e8dd;
  --gold: #d8af69;
  --line: #d7dfd6;
  --green: #278664;
  --orange: #b96d27;
  --red: #9a4735;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
.login-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 25px;
  background:
    radial-gradient(circle at 20% 10%, #e0e8dd, transparent 30%),
    linear-gradient(135deg, #f7f3ea, #e7ece3);
}
.login-card {
  width: min(470px, 100%);
  padding: 48px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(14, 74, 67, 0.16);
}
.admin-brand {
  color: var(--berry);
  font-family: Georgia, serif;
  font-size: 30px;
}
.admin-brand img {
  display: block;
  width: min(220px, 100%);
  height: auto;
}
.admin-brand small {
  display: block;
  margin-top: 7px;
  color: var(--gold);
  font:
    7px Arial,
    sans-serif;
  letter-spacing: 0.25em;
}
.login-card h1 {
  margin: 38px 0 10px;
  font:
    40px Georgia,
    serif;
}
.login-card > p {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.login-card label,
.admin-form > label,
.field-grid label {
  display: block;
  margin-bottom: 17px;
  color: #315e57;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.login-card input,
.admin-form input:not([type="checkbox"]),
.admin-form textarea,
.admin-form select,
.field-grid input,
.field-grid textarea,
.filter-bar input,
.filter-bar select,
.lead-update input,
.lead-update select {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  outline: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.login-card input:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.field-grid input:focus,
.field-grid textarea:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(215, 120, 82, 0.12);
}
.admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--copper), var(--berry));
  border: 0;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
}
.login-card .admin-button {
  width: 100%;
}
.back-link {
  display: block;
  margin-top: 23px;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}
.alert {
  margin: 0 0 22px;
  padding: 13px 15px;
  border-left: 3px solid;
  font-size: 11px;
  line-height: 1.6;
}
.alert-error {
  color: #7a3829;
  background: #f7e4dc;
  border-color: var(--copper);
}
.alert-success {
  color: #205c4a;
  background: #e4f2eb;
  border-color: #36906f;
}
.admin-body {
  min-height: 100vh;
  padding-left: 245px;
}
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  width: 245px;
  flex-direction: column;
  padding: 32px 22px;
  color: rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, #0e4a43, #082f2b);
}
.admin-sidebar .admin-brand {
  padding: 0 10px 30px;
  color: #fff;
}
.admin-sidebar .admin-brand img {
  width: 190px;
}
.admin-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.admin-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 5px;
  font-size: 11px;
}
.admin-sidebar nav a span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: #e8b66f;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}
.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: auto;
  padding: 20px 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.admin-main {
  padding: 34px 42px 70px;
}
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.admin-topbar small,
.panel-heading small {
  color: var(--copper);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.19em;
}
.admin-topbar h1 {
  margin: 4px 0 0;
  font:
    38px Georgia,
    serif;
}
.admin-topbar > span {
  padding: 10px 14px;
  color: var(--berry);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 10px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 23px;
}
.metric-grid article {
  padding: 23px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(14, 74, 67, 0.04);
}
.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.metric-grid b {
  display: block;
  margin: 13px 0 17px;
  color: var(--berry);
  font:
    36px Georgia,
    serif;
}
.metric-grid a {
  color: var(--copper);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.admin-panel {
  margin-bottom: 22px;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 35px rgba(14, 74, 67, 0.04);
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.panel-heading h2 {
  margin: 4px 0 0;
  font:
    28px Georgia,
    serif;
}
.admin-button-small {
  padding: 10px 13px;
  font-size: 8px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  text-align: left;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
th,
td {
  padding: 13px;
  border-bottom: 1px solid var(--line);
}
td {
  font-size: 11px;
}
td small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.status {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 20px;
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.status-new {
  color: #8c5219;
  background: #fff0d8;
}
.status-contacted {
  color: #22634f;
  background: #ddf2e8;
}
.status-closed {
  color: #6e6569;
  background: #ece8ea;
}
.empty {
  padding: 40px !important;
  text-align: center;
  color: var(--muted) !important;
}
.content-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 25px rgba(14, 74, 67, 0.08);
}
.content-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.content-group {
  margin-bottom: 16px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.field-grid .field-wide {
  grid-column: 1/-1;
}
.branding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.branding-card > p {
  min-height: 44px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.branding-preview {
  display: grid;
  min-height: 190px;
  margin-bottom: 18px;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.branding-preview img {
  display: block;
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
}
.branding-preview-light {
  background: #fff;
}
.branding-preview-dark {
  background: #0e4a43;
}
.branding-preview-favicon {
  background: #f7f3ea;
}
.branding-preview-favicon img {
  width: 96px;
  height: 96px;
}
.branding-reset {
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: var(--muted) !important;
  font-size: 9px;
}
.branding-reset input {
  width: auto;
}
.field-grid textarea,
.admin-form textarea {
  resize: vertical;
  min-height: 100px;
}
.admin-form textarea[name="privacy_content"],
.admin-form textarea[name="terms_content"] {
  min-height: 360px;
  font-family: Georgia, serif;
  font-size: 14px;
  line-height: 1.65;
}
.save-footer {
  text-align: right;
}
.admin-split {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(420px, 1.28fr);
  gap: 20px;
  align-items: start;
}
.admin-form small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.admin-help {
  margin: -5px 0 22px;
  padding: 12px 14px;
  color: var(--muted);
  background: var(--sage-mist);
  border-left: 3px solid var(--copper);
  font-size: 11px;
  line-height: 1.65;
}
.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  align-items: center;
}
.switch {
  display: flex !important;
  align-items: center;
  gap: 9px;
  margin: 12px 0 !important;
}
.switch input {
  width: 17px;
  height: 17px;
  accent-color: var(--berry);
}
.switch span {
  font-size: 9px;
}
.text-link {
  display: inline-block;
  margin-left: 14px;
  color: var(--berry);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stack-list {
  display: flex;
  flex-direction: column;
}
.stack-list article {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.stack-list article:first-child {
  padding-top: 0;
}
.stack-list h3 {
  margin: 9px 0 7px;
  font:
    21px Georgia,
    serif;
}
.stack-list p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.item-actions {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.item-actions a,
.item-actions button {
  padding: 0;
  color: var(--berry);
  background: 0;
  border: 0;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}
.item-actions form {
  margin: 0;
}
.item-actions button {
  color: var(--red);
}
.list-order {
  display: grid;
  float: left;
  width: 31px;
  height: 31px;
  margin: 0 12px 9px 0;
  place-items: center;
  color: #fff;
  background: var(--copper);
  border-radius: 50%;
  font-size: 8px;
}
.tab-bar {
  display: flex;
  gap: 7px;
  margin-bottom: 19px;
}
.tab-bar a {
  padding: 11px 15px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tab-bar a.active {
  color: #fff;
  background: var(--berry);
  border-color: var(--berry);
}
.edit-preview {
  width: 100%;
  height: 190px;
  margin-bottom: 20px;
  object-fit: cover;
}
.gallery-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.gallery-admin-grid article {
  overflow: hidden;
  border: 1px solid var(--line);
}
.gallery-admin-grid img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.gallery-admin-grid article > div {
  padding: 14px;
}
.gallery-admin-grid h3 {
  min-height: 38px;
  margin: 9px 0;
  font:
    18px Georgia,
    serif;
}
.filter-bar {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 24px;
  padding: 16px;
  background: #f3f0e8;
  border: 1px solid var(--line);
}
.filter-bar label,
.lead-update label {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.filter-bar input,
.filter-bar select,
.lead-update input,
.lead-update select {
  margin-top: 6px;
  padding: 10px;
}
.lead-list article {
  margin-bottom: 13px;
  padding: 20px;
  border: 1px solid var(--line);
}
.lead-summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.lead-summary h3 {
  margin: 8px 0 5px;
  font:
    23px Georgia,
    serif;
}
.lead-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}
.lead-meta {
  text-align: right;
}
.lead-meta b,
.lead-meta span {
  display: block;
}
.lead-meta b {
  font-size: 10px;
}
.lead-meta span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 8px;
}
.lead-message {
  margin: 18px 0;
  padding: 14px;
  background: #f3f0e8;
}
.lead-message strong {
  color: var(--copper);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.lead-message p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
.lead-update {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 11px;
  align-items: end;
}
@media (max-width: 1050px) {
  .admin-body {
    padding-left: 0;
  }
  .admin-sidebar {
    position: static;
    width: 100%;
    height: auto;
  }
  .admin-sidebar nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .sidebar-bottom {
    flex-direction: row;
  }
  .admin-main {
    padding: 28px 22px;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .admin-split {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
  .footer {
  }
}
@media (max-width: 640px) {
  .login-card {
    padding: 32px 23px;
  }
  .admin-sidebar nav {
    grid-template-columns: 1fr 1fr;
  }
  .admin-main {
    padding: 24px 15px;
  }
  .admin-topbar > span {
    display: none;
  }
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .field-grid,
  .inline-fields,
  .branding-grid,
  .gallery-admin-grid,
  .filter-bar,
  .lead-update {
    grid-template-columns: 1fr;
  }
  .lead-summary {
    flex-direction: column;
  }
  .lead-meta {
    text-align: left;
  }
  .content-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .content-toolbar .admin-button {
    width: 100%;
  }
}
