:root {
  --ink: #181818;
  --muted: #6b625d;
  --paper: #fffaf4;
  --panel: #ffffff;
  --line: #eadfd4;
  --brand: #c42c27;
  --brand-dark: #8f1c19;
  --leaf: #426b48;
  --gold: #d69b33;
  --shadow: 0 24px 70px rgba(53, 32, 24, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(196, 44, 39, 0.08), transparent 32rem),
    linear-gradient(315deg, rgba(66, 107, 72, 0.1), transparent 28rem),
    var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

.admin-header {
  align-items: center;
  background: rgba(255, 250, 244, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 16px 34px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: flex;
  font-weight: 800;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  height: 42px;
  width: 42px;
}

.admin-header nav {
  align-items: center;
  display: flex;
  gap: 18px;
}

.admin-header nav a,
.public-link,
.filters button,
.content-card button,
.login-card button {
  background: var(--brand);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  padding: 12px 18px;
  text-decoration: none;
}

.admin-header nav a {
  background: var(--ink);
}

.admin-main {
  margin: 0 auto;
  max-width: 1280px;
  padding: 34px;
}

.dashboard-hero,
.login-screen,
.setup-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 34px;
}

.dashboard-hero h1,
.login-brand h1,
.setup-panel h1 {
  font-size: 42px;
  letter-spacing: 0;
  line-height: 1.02;
  margin: 0 0 14px;
}

.dashboard-hero p,
.login-brand p,
.setup-panel p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
  max-width: 780px;
}

.eyebrow {
  color: var(--brand) !important;
  font-size: 13px !important;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 10px !important;
  text-transform: uppercase;
}

.quick-guide {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 22px 0;
}

.quick-guide article,
.filters,
.content-card,
.notice,
.instruction-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 34px rgba(53, 32, 24, 0.08);
}

.quick-guide article {
  padding: 20px;
}

.quick-guide strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.quick-guide span,
.help-text,
.content-card details,
.helper-copy {
  color: var(--muted);
  line-height: 1.45;
}

.filters {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: 1.1fr 1fr 1.4fr auto;
  margin-bottom: 22px;
  padding: 18px;
}

label span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #d8c9bd;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 12px;
  width: 100%;
}

textarea {
  line-height: 1.5;
  resize: vertical;
}

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

.content-card {
  padding: 22px;
}

.card-topline {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-topline span,
.card-topline em {
  color: var(--leaf);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-topline em {
  color: var(--brand);
}

.content-card h2 {
  font-size: 22px;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 12px 0 8px;
}

.image-preview {
  align-items: center;
  background: #f5eee7;
  border: 1px dashed #cdb9a8;
  border-radius: 8px;
  display: flex;
  height: 180px;
  justify-content: center;
  margin: 16px 0;
  overflow: hidden;
}

.image-preview img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.upload-field {
  display: block;
  margin-top: 12px;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.content-card .reset-button {
  background: #eee2d6;
  color: var(--ink);
}

details {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

code {
  background: #f6eee5;
  border-radius: 6px;
  display: block;
  margin-top: 10px;
  overflow-wrap: anywhere;
  padding: 12px;
  white-space: pre-wrap;
}

.notice {
  font-weight: 800;
  margin: 18px 0;
  padding: 16px 18px;
}

.notice.success {
  border-color: rgba(66, 107, 72, 0.35);
  color: var(--leaf);
}

.notice.error,
.error-text {
  color: var(--brand-dark);
}

.empty-state {
  background: #fff;
  border: 1px dashed #cdb9a8;
  border-radius: 8px;
  color: var(--muted);
  grid-column: 1 / -1;
  padding: 34px;
  text-align: center;
}

.login-screen {
  align-items: stretch;
  margin: 8vh auto;
  max-width: 980px;
}

.login-brand {
  flex: 1;
}

.login-brand img {
  height: 76px;
  margin-bottom: 18px;
  width: 76px;
}

.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  flex: 0 0 370px;
  gap: 16px;
  padding: 24px;
}

.setup-panel {
  display: block;
}

.setup-icon {
  align-items: center;
  background: var(--brand);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 30px;
  font-weight: 900;
  height: 58px;
  justify-content: center;
  margin-bottom: 18px;
  width: 58px;
}

.instruction-card {
  margin-top: 22px;
  padding: 22px;
}

@media (max-width: 900px) {
  .admin-header,
  .dashboard-hero,
  .login-screen {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-main {
    padding: 20px;
  }

  .quick-guide,
  .filters,
  .item-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    flex: 1;
    width: 100%;
  }
}

