/* hobipets adminpaneel — styling in dezelfde huisstijl als de website */
:root {
  --cream: #fdf8f1;
  --ink: #1d1a16;
  --ink-soft: #5c554c;
  --coral: #f2542d;
  --coral-dark: #d8431f;
  --teal: #2a9d8f;
  --mustard: #f4c95d;
  --card: #ffffff;
  --line: rgba(29, 26, 22, 0.1);
  --radius: 16px;
  --shadow: 0 8px 24px rgba(29, 26, 22, 0.08);
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
}

h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.02em; }
img { max-width: 100%; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  background: none;
  transition: transform 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--coral); color: #fff; }
.btn--primary:hover { background: var(--coral-dark); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--danger { border-color: var(--coral); color: var(--coral); }
.btn--danger:hover { background: var(--coral); color: #fff; }
.btn--small { padding: 0.5rem 1rem; font-size: 0.82rem; }
.btn--full { width: 100%; }

/* ---------- Inlogscherm ---------- */
.login[hidden], .admin[hidden], .modal[hidden] { display: none; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login__card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.4rem;
  width: min(400px, 100%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login__logo { height: 64px; margin-inline: auto; }
.login__card h1 { font-size: 1.4rem; text-align: center; }
.login__sub { text-align: center; color: var(--ink-soft); font-size: 0.92rem; }

.login__card label,
.admin__card label,
.modal__card label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
}

input, select, textarea {
  font-family: var(--font-body);
  font-size: 0.93rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); border-color: transparent; }

.login__error { color: var(--coral); font-size: 0.88rem; font-weight: 600; }
.login__hint { font-size: 0.8rem; color: var(--ink-soft); text-align: center; }
.login__hint code { background: var(--cream); padding: 0.1rem 0.4rem; border-radius: 6px; }
.login__back { text-align: center; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Layout admin ---------- */
.admin__topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink);
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.7rem 1.5rem;
  flex-wrap: wrap;
}

.admin__brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-head); font-weight: 800; }
.admin__brand img { height: 36px; }
.admin__brand em { font-style: normal; color: var(--mustard); font-weight: 600; }

.admin__tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.admin__tab {
  background: none;
  border: none;
  color: rgba(253, 248, 241, 0.65);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.admin__tab:hover { color: var(--cream); }
.admin__tab.is-active { background: var(--coral); color: #fff; }

.admin__badge {
  background: var(--mustard);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
}

.admin__topactions { margin-left: auto; display: flex; gap: 0.5rem; }
.admin__topbar .btn--ghost { border-color: rgba(253, 248, 241, 0.4); color: var(--cream); }
.admin__topbar .btn--ghost:hover { background: var(--cream); color: var(--ink); }

.admin__main { width: min(1100px, 94%); margin: 2rem auto 4rem; }
.admin__page { display: none; }
.admin__page.is-active { display: block; }
.admin__page h2 { margin-bottom: 1.4rem; font-size: 1.6rem; }
.admin__page h3 { margin: 1.6rem 0 0.8rem; font-size: 1.05rem; }

.admin__pagehead { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.4rem; }
.admin__pagehead h2 { margin-bottom: 0; }
.admin__pageactions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.admin__search { min-width: 220px; }

.admin__empty { color: var(--ink-soft); padding: 2rem 0; text-align: center; }

/* ---------- Statistieken ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.stat {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem 1.4rem;
}
.stat__value { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--coral); }
.stat__label { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Recente producten ---------- */
.admin__recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.recent-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.recent-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.recent-card div { padding: 0.8rem 1rem; font-weight: 600; font-family: var(--font-head); font-size: 0.9rem; }

/* ---------- Tabel ---------- */
.table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.admin__table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin__table th {
  text-align: left;
  font-family: var(--font-head);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
}
.admin__table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin__table tr:last-child td { border-bottom: none; }
.admin__table tr.is-off { opacity: 0.45; }

.admin__thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }

.admin__cat {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
}
.admin__cat--hond { background: rgba(42, 157, 143, 0.15); color: var(--teal); }
.admin__cat--kat { background: rgba(242, 84, 45, 0.13); color: var(--coral); }

.admin__rowactions { display: flex; gap: 0.35rem; }
.icon-btn {
  border: 1px solid var(--line);
  background: var(--cream);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
}
.icon-btn:hover { background: var(--ink); }

/* Toggle zichtbaarheid */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle__slider {
  position: absolute; inset: 0;
  background: #d8d0c4;
  border-radius: 999px;
  transition: background 0.2s;
}
.toggle__slider::before {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle input:checked + .toggle__slider { background: var(--teal); }
.toggle input:checked + .toggle__slider::before { transform: translateX(20px); }

/* ---------- Berichten ---------- */
.message {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.3rem;
  margin-bottom: 0.9rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.message--unread { border-left: 4px solid var(--coral); }
.message__body { flex: 1; }
.message__meta { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 0.3rem; }
.message__meta strong { color: var(--ink); font-size: 0.92rem; }
.message__text { font-size: 0.93rem; white-space: pre-wrap; }
.message__actions { display: flex; gap: 0.35rem; }

/* ---------- Instellingen ---------- */
.admin__card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: flex-start;
}
.admin__card h3 { margin: 0; }
.admin__card label { width: min(420px, 100%); }
.admin__note { font-size: 0.85rem; color: var(--ink-soft); }
.admin__row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.admin__import { cursor: pointer; display: inline-block; }
.admin__feedback { font-size: 0.88rem; font-weight: 600; color: var(--teal); }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(29, 26, 22, 0.55);
  display: grid;
  place-items: center;
  padding: 1.2rem;
  overflow-y: auto;
}

.modal__card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: min(560px, 100%);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 90vh;
  overflow-y: auto;
}

.modal__preview { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.modal__check { flex-direction: row !important; align-items: center; gap: 0.6rem !important; }
.modal__check input { width: auto; }

.modal__platform {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.modal__platform legend {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0 0.4rem;
}
.modal__urllabel { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.82rem; font-weight: 600; }

.modal__hint { font-size: 0.78rem; color: var(--ink-soft); margin-top: -0.4rem; }

.modal__upload-status { font-size: 0.85rem; font-weight: 600; color: var(--teal); }
.modal__upload-status.is-error { color: var(--coral); }

.upload-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.upload-row:last-child { border-bottom: none; }
.upload-row__thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.upload-row__name { font-size: 0.85rem; font-weight: 600; word-break: break-all; }
.upload-row__used { font-size: 0.78rem; color: var(--ink-soft); margin-left: auto; text-align: right; }

select[multiple] { min-height: 110px; }
select[multiple] option:checked { background: var(--teal); color: #fff; }
.modal__actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.4rem; }

/* ---------- Responsief ---------- */
@media (max-width: 760px) {
  .admin__topbar { gap: 0.8rem; }
  .admin__topactions { margin-left: 0; width: 100%; }
  .message { flex-direction: column; }
}
