:root {
  --ink: #282724;
  --muted: #7d746c;
  --bg: #faf7f4;
  --panel: #fffaf7;
  --line: #e5ddd7;
  --teal: #9bb9aa;
  --teal-dark: #667f73;
  --rose: #d9a5a1;
  --rose-dark: #a26b66;
  --error: #a6423b;
  --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: Inter, Arial, sans-serif; }
a { color: inherit; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); padding: 32px; border-radius: var(--radius); background: #fffaf7; box-shadow: 0 20px 70px rgba(23,49,58,.13); }
.admin-mark, .admin-brand span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #fffaf7 url("../img/silvana-logo.jpeg") center/cover no-repeat; border: 1px solid rgba(217, 165, 161, .72); color: transparent; font-weight: 800; }
h1, h2 { margin: 0; line-height: 1.1; }
p { color: var(--muted); }
label { display: grid; gap: 7px; color: #31474f; font-weight: 700; font-size: .9rem; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; color: var(--ink); background: #fffaf7; font: inherit; }
textarea { resize: vertical; }
small { color: var(--muted); overflow-wrap: anywhere; }
.btn { min-height: 44px; padding: 10px 16px; border: 0; border-radius: 6px; color: #fff; background: var(--teal-dark); font-weight: 800; cursor: pointer; }
.btn:hover { background: #536a61; }
.alert { margin: 18px 0; padding: 12px 14px; border-radius: 6px; background: #eef5f1; color: #365f43; font-weight: 700; }
.alert.error { background: #fff0ed; color: var(--error); }
.login-card form { display: grid; gap: 14px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; padding: 24px; border-right: 1px solid var(--line); background: #fffaf7; }
.admin-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 28px; }
.sidebar nav { display: grid; gap: 6px; margin-bottom: 26px; }
.sidebar nav a, .muted-link { display: block; padding: 10px 12px; border-radius: 6px; color: #4f4a43; text-decoration: none; font-weight: 800; }
.sidebar nav a:hover, .muted-link:hover { background: #eef5f1; }
.muted-link { color: var(--muted); }
.admin-main { margin-left: 260px; padding: 34px; }
.admin-top { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.eyebrow { display: inline-block; color: var(--teal-dark); text-transform: uppercase; font-weight: 800; font-size: .78rem; }
.panel { margin-bottom: 24px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.panel h2 { margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: 1 / -1; }
.editor-card { margin: 18px 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #ffffff; }
.editor-card.compact { padding: 14px; }
.card-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 14px; }
.switch { display: inline-flex; grid-template-columns: auto auto; align-items: center; gap: 8px; white-space: nowrap; }
.switch input { width: auto; }
.switch.inline { align-self: end; padding-bottom: 11px; }
.actions { margin-top: 14px; }
.delete-form { margin: -10px 0 18px; text-align: right; }
.delete-form button { border: 0; background: transparent; color: var(--error); font-weight: 800; cursor: pointer; }
.menu-grid { grid-template-columns: 1fr 1fr 120px 100px; }
@media (max-width: 900px) {
  .sidebar { position: static; width: auto; }
  .admin-main { margin-left: 0; padding: 18px; }
  .admin-top, .card-head { display: block; }
  .form-grid, .menu-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
}


select { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; color: var(--ink); background: #fffaf7; font: inherit; }
.form-subtitle { margin: 10px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--teal-dark); font-size: 1rem; }
.message-card p { margin: 0 0 12px; color: var(--ink); }
.message-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.message-meta span,
.status-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border-radius: 999px; background: #eef5f1; color: #365f43; font-size: .8rem; font-weight: 800; }
.status-pill { background: #fbefed; color: var(--rose-dark); }
.error-text { display: block; margin: 8px 0; color: var(--error); }
.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf7;
}
.permission-grid legend {
  padding: 0 8px;
  color: var(--teal-dark);
  font-weight: 800;
}
.permission-grid .check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}
.permission-grid input,
.user-card .switch input { width: auto; }
.user-card .card-head small { display: block; margin-top: 4px; }
@media (max-width: 700px) {
  .permission-grid { grid-template-columns: 1fr; }
}