:root {
  --sage: #7a9471;
  --sage-dark: #5c7355;
  --gold: #c9a24b;
  --charcoal: #2e2b26;
  --stone: #6b6a64;
  --bg: #f6f5f2;
  --border: #e2e0da;
  --white: #ffffff;
  --danger: #b8483f;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--charcoal);
}

a { color: var(--sage-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 240px;
  background: var(--charcoal);
  color: #eee;
  padding: 1.5rem 1rem;
  flex-shrink: 0;
}
.admin-sidebar h1 { font-size: 1.05rem; margin: 0 0 0.25rem; color: #fff; }
.admin-sidebar .subtitle { font-size: 0.75rem; color: #a3a09a; margin-bottom: 1.5rem; }
.admin-sidebar nav a {
  display: block;
  padding: 0.55rem 0.7rem;
  color: #d6d4cf;
  border-radius: 6px;
  font-size: 0.88rem;
  margin-bottom: 2px;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
  background: rgba(255,255,255,0.08);
  text-decoration: none;
  color: #fff;
}
.admin-sidebar .section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #82807a;
  margin: 1.25rem 0 0.4rem 0.7rem;
}
.admin-sidebar .logout { margin-top: 2rem; display: block; color: #d6a4a0; }

.admin-main { flex: 1; padding: 2rem 2.5rem; max-width: 900px; }
.admin-main h2 { margin-top: 0; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.admin-topbar .user { font-size: 0.85rem; color: var(--stone); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--charcoal); }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field textarea, .field select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
}
.field textarea { min-height: 80px; resize: vertical; }
.field .hint { font-size: 0.76rem; color: var(--stone); margin-top: 0.3rem; }

.repeater-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  position: relative;
  background: #fbfbfa;
}
.repeater-item .remove-row {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.85rem;
}
.add-row {
  background: var(--sage);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.btn-save {
  background: var(--sage-dark);
  color: white;
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  font-size: 0.92rem;
  cursor: pointer;
  font-weight: 600;
}
.btn-save:hover { background: var(--sage); }

.flash-success {
  background: #eaf3e6;
  border: 1px solid #b9d9ac;
  color: #3d6b34;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
}

.login-shell {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--bg);
}
.login-box {
  background: white; padding: 2.5rem; border-radius: 12px;
  border: 1px solid var(--border); width: 340px;
}
.login-box h1 { font-size: 1.2rem; margin-bottom: 1.5rem; text-align: center; }
.login-error { color: var(--danger); font-size: 0.85rem; margin-bottom: 1rem; }

.ql-editor { min-height: 180px; background: white; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.dashboard-card {
  background: white; border: 1px solid var(--border); border-radius: 10px;
  padding: 1.25rem; display: block;
}
.dashboard-card h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.dashboard-card p { margin: 0; font-size: 0.82rem; color: var(--stone); }

table.media-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.media-table th, table.media-table td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--border); }
table.media-table img { max-width: 60px; border-radius: 4px; }
