:root {
  --bg: #fff7fa;
  --panel: #ffffff;
  --ink: #25161d;
  --muted: #74606a;
  --pink: #f05f93;
  --pink-dark: #c83368;
  --line: #f2d7e2;
  --shadow: 0 22px 60px rgba(178, 76, 118, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #ffe1ec, transparent 34%), var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
}

a { color: inherit; text-decoration: none; }

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-size: 20px;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 600, "GRAD" 0, "opsz" 24;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.86);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.admin-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; margin-bottom: 28px; }
.admin-brand img { width: 74px; height: auto; }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; color: var(--muted); font-weight: 700; }
.admin-sidebar nav a:hover { background: #ffe8f0; color: var(--pink-dark); }

.admin-main { margin-left: 250px; padding: 30px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 24px; }
.admin-topbar h1 { margin: 4px 0 0; font-size: clamp(2rem, 4vw, 3.4rem); }
.eyebrow { color: var(--pink-dark); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }

.panel, .stat-grid article, .login-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.panel { padding: 22px; margin-bottom: 22px; overflow-x: auto; }
.panel h2 { margin-top: 0; }
.panel-intro { color: var(--muted); margin-top: -4px; }
.narrow-panel { max-width: 680px; }
.publication-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.publication-panel h2 { margin-bottom: 8px; }
.publication-panel p { margin: 0; color: var(--muted); }
.publication-panel form { display: grid; justify-items: end; gap: 12px; min-width: 220px; }
.publication-panel.is-offline { border-color: #ffd6a6; background: #fff8eb; }
.switch-control { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; }
.switch-control input { width: 20px; height: 20px; accent-color: var(--pink-dark); }
.flash, .error { padding: 13px 15px; border-radius: 16px; margin-bottom: 18px; font-weight: 700; }
.flash { background: #eaf8ef; color: #24713f; }
.error { background: #ffe3e3; color: #a62424; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-grid article { padding: 24px; }
.stat-grid strong { display: block; font-size: 2.4rem; color: var(--pink-dark); }
.stat-grid span { color: var(--muted); font-weight: 700; }

.admin-form { display: grid; gap: 14px; }
.grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-form label, .login-card label { display: grid; gap: 7px; color: var(--muted); font-weight: 700; }
.admin-form input, .admin-form select, .admin-form textarea, .login-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  color: var(--ink);
  font: inherit;
}
.full, fieldset.full { grid-column: 1 / -1; }
.checkbox { display: flex !important; align-items: center; gap: 8px; }
.checkbox input { width: auto; }
.feature-list { border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.feature-list legend { color: var(--muted); font-weight: 800; }
.feature-list label { display: inline-flex; margin: 8px 14px 0 0; }
.feature-list input { width: auto; }
.image-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  font-weight: 800;
}
.image-preview img {
  width: 120px;
  height: 82px;
  object-fit: cover;
  border-radius: 14px;
}

button, .admin-form button, .login-card button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.muted { color: var(--muted); }
.table-thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 12px; }
.actions { display: flex; align-items: center; gap: 12px; }
.actions a { color: var(--pink-dark); font-weight: 800; }
.actions form { margin: 0; }
.link-danger { background: transparent; color: #b42323; padding: 0; }

.status { display: inline-flex; border-radius: 999px; padding: 6px 10px; font-size: 0.78rem; font-weight: 800; }
.status.draft { background: #eeeaf0; color: #665a68; }
.status.pending { background: #fff2cf; color: #8a5b00; }
.status.published { background: #ddf6e7; color: #18733e; }
.status.rejected { background: #ffe0e0; color: #a62424; }

.login-page { display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); padding: 30px; }
.login-card img { display: block; width: 120px; margin: 0 auto 18px; }
.login-card h1 { margin: 0 0 8px; text-align: center; }
.login-card p, .login-card small { color: var(--muted); text-align: center; }
.login-card button { width: 100%; margin-top: 8px; }

@media (max-width: 860px) {
  .admin-sidebar { position: static; width: auto; }
  .admin-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-main { margin-left: 0; padding: 18px; }
  .stat-grid, .grid-form { grid-template-columns: 1fr; }
  .admin-topbar { align-items: flex-start; flex-direction: column; }
  .publication-panel { align-items: flex-start; flex-direction: column; }
  .publication-panel form { justify-items: start; }
}
