:root {
  --cream: #f7f0e5;
  --paper: #fffdf9;
  --ink: #33271f;
  --muted: #756357;
  --line: #decfba;
  --gold: #9b6d3b;
  --brown: #875528;
  --soft: #efe3d3;
  --green: #47644b;
  --green-soft: #eef5ec;
  --red: #8b2f2f;
}
* { box-sizing: border-box; }
body.dashboard-page {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #f8f3eb 0%, #f1e7d9 100%);
  font-family: Georgia, "Times New Roman", serif;
}
.dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255,252,247,.97);
}
.dashboard-topbar-inner {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.dashboard-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  letter-spacing: .04em;
}
.dashboard-brand img { width: 58px; height: 58px; border-radius: 50%; }
.dashboard-private-badge,
.dashboard-count-pill,
.dashboard-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 700;
  white-space: nowrap;
}
.dashboard-private-badge { background: var(--soft); color: var(--brown); }
.dashboard-shell { width: min(1080px, calc(100% - 28px)); margin: 28px auto 60px; }
.dashboard-hero,
.dashboard-panel,
.dashboard-summary-card {
  border: 1px solid var(--line);
  background: rgba(255,253,249,.96);
  border-radius: 26px;
  box-shadow: 0 12px 32px rgba(71,45,26,.07);
}
.dashboard-hero { padding: clamp(24px, 5vw, 42px); margin-bottom: 20px; }
.dashboard-eyebrow { margin: 0; color: var(--gold); text-transform: uppercase; letter-spacing: .16em; font-size: .84rem; font-weight: 700; }
.dashboard-hero h1 { margin: 5px 0 12px; font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1; }
.dashboard-hero p { margin: 0; max-width: 760px; font-size: 1.08rem; line-height: 1.55; color: var(--muted); }
.dashboard-panel { padding: clamp(20px, 4vw, 32px); margin-bottom: 20px; }
.dashboard-login-panel label,
.dashboard-search-label { display: grid; gap: 8px; font-weight: 700; }
.dashboard-login-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; }
.dashboard-login-row input,
.dashboard-search-label input {
  width: 100%; min-height: 54px; border: 1px solid #cdb99f; border-radius: 14px;
  background: white; padding: 13px 15px; font: inherit; color: var(--ink);
}
.dashboard-login-row button,
.dashboard-review-button {
  min-height: 54px; border: 0; border-radius: 14px; padding: 12px 22px;
  background: var(--brown); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.dashboard-status { min-height: 1.35em; margin: 10px 0 0; font-weight: 700; color: var(--green); }
.dashboard-status.is-error { color: var(--red); }
.dashboard-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 16px; margin: 0 0 20px; }
.dashboard-summary-card { text-align: left; padding: 22px; color: var(--ink); cursor: pointer; font: inherit; }
.dashboard-summary-card strong { display: block; margin: 8px 0 3px; font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.dashboard-summary-label { color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .09em; font-size: .84rem; }
.dashboard-summary-card small { color: var(--muted); font-size: .95rem; }
.dashboard-tool-row { display: grid; grid-template-columns: minmax(260px,1fr) auto auto; gap: 12px; align-items: end; }
.dashboard-secondary-button {
  min-height: 54px; border: 1px solid #cdb99f; border-radius: 14px; padding: 12px 18px;
  background: #fffaf3; color: var(--brown); font: inherit; font-weight: 700; cursor: pointer;
}
.dashboard-filters { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
.dashboard-filter {
  min-height: 42px; padding: 8px 16px; border: 1px solid #cdb99f; border-radius: 999px;
  background: #fffaf3; color: var(--brown); font: inherit; font-weight: 700; cursor: pointer;
}
.dashboard-filter.is-active { background: var(--brown); color: white; border-color: var(--brown); }
.dashboard-list-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.dashboard-list-heading h2 { margin: 5px 0 0; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.dashboard-count-pill { background: var(--soft); color: var(--brown); }
.dashboard-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.dashboard-memorial-card { border: 1px solid var(--line); border-radius: 20px; padding: 20px; background: #fff; }
.dashboard-card-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dashboard-reference { font-weight: 700; color: var(--gold); letter-spacing: .05em; }
.dashboard-status-pill { font-size: .86rem; padding: 7px 11px; }
.dashboard-status-pill.is-awaiting-payment { background: #fff0d9; color: #805629; }
.dashboard-status-pill.is-submitted { background: #f2e5d4; color: var(--brown); }
.dashboard-status-pill.is-published { background: var(--green-soft); color: var(--green); }
.dashboard-status-pill.is-disabled { background: #fbf0df; color: #8a5a2d; }
.dashboard-memorial-card h3 { margin: 13px 0 12px; font-size: 1.6rem; }
.dashboard-card-details { border-top: 1px solid #eee3d4; padding-top: 10px; }
.dashboard-card-details p { margin: 7px 0; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.dashboard-card-details strong { color: var(--ink); }
.dashboard-review-button { width: 100%; margin-top: 14px; }
.dashboard-empty { color: var(--muted); font-style: italic; font-size: 1.05rem; }
.dashboard-footnote { margin: 18px 4px 0; color: var(--muted); line-height: 1.5; }
.dashboard-footer { text-align: center; padding: 22px 15px 36px; color: var(--muted); }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .dashboard-topbar-inner { min-height: 70px; }
  .dashboard-brand img { width: 48px; height: 48px; }
  .dashboard-private-badge { font-size: .82rem; padding: 7px 10px; }
  .dashboard-shell { width: min(100% - 20px, 1080px); margin-top: 18px; }
  .dashboard-login-row, .dashboard-tool-row { grid-template-columns: 1fr; }
  .dashboard-login-row button, .dashboard-secondary-button { width: 100%; }
  .dashboard-summary-grid { grid-template-columns: 1fr; gap: 11px; }
  .dashboard-summary-card { padding: 18px 20px; }
  .dashboard-summary-card strong { font-size: 2.35rem; }
  .dashboard-list { grid-template-columns: 1fr; }
  .dashboard-list-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .dashboard-filter { padding: 7px 8px; font-size: .9rem; }
}


/* Permanent memorial delete controls */
.dashboard-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.dashboard-delete-button {
  border: 1px solid #a83f34;
  background: #fff8f6;
  color: #8a2f27;
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.dashboard-delete-button:hover,
.dashboard-delete-button:focus-visible {
  background: #fbe9e5;
}


/* Private website visitor overview */
.dashboard-visitor-panel {
  background: linear-gradient(145deg, rgba(255,253,249,.98), rgba(247,240,229,.98));
}
.dashboard-visitor-heading { margin-bottom: 18px; }
.dashboard-visitor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
}
.dashboard-visitor-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(71,45,26,.05);
}
.dashboard-visitor-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  color: var(--ink);
}
.dashboard-visitor-card small { color: var(--muted); font-size: .94rem; }
.dashboard-visitor-note { margin: 16px 2px 0; color: var(--muted); line-height: 1.5; }
#visitor-stats-status.is-error { background: #fbf0df; color: #8a5a2d; }

@media (max-width: 760px) {
  .dashboard-visitor-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dashboard-visitor-card { padding: 17px; }
  .dashboard-visitor-card strong { font-size: 2.25rem; }
}

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