/* SiteHub — kleurenschema
   001514  Ink Black      (achtergrond)
   FBFFFE  White          (tekst)
   6B0504  Dark Garnet    (diep accent / fout)
   A3320B  Rust Brown     (secundair accent / uit-status)
   E6AF2E  Sunflower Gold (primair accent / aan-status)          */

:root {
  --ink: #001514;
  --ink-soft: #04211f;
  --ink-card: #072b29;
  --white: #fbfffe;
  --muted: rgba(251, 255, 254, 0.65);
  --muted-2: rgba(251, 255, 254, 0.38);
  --line: rgba(251, 255, 254, 0.10);
  --garnet: #6b0504;
  --rust: #a3320b;
  --gold: #e6af2e;
  --gold-soft: rgba(230, 175, 46, 0.15);
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 80% -10%, rgba(107, 5, 4, 0.35), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(163, 50, 11, 0.25), transparent 55%),
              var(--ink);
  color: var(--white);
  line-height: 1.5;
}

code {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.85em;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
}

h1 { letter-spacing: -0.02em; }

.muted { color: var(--muted); }
.center { text-align: center; }
.link-muted { color: var(--muted); text-decoration: none; }
.link-muted:hover { color: var(--gold); }

/* ---------- Merk / topbar ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--rust) 55%, var(--garnet) 100%);
  box-shadow: 0 0 14px rgba(230, 175, 46, 0.35);
}

.brand-mark.big { width: 44px; height: 44px; border-radius: 12px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 21, 20, 0.85);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-actions { display: flex; align-items: center; gap: 14px; }

.container { max-width: 1060px; margin: 0 auto; padding: 28px 28px 80px; }

/* ---------- Knoppen ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s ease, background 0.15s ease;
}

.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--white); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn-danger { background: var(--garnet); color: var(--white); }
.btn-danger:hover { background: var(--rust); }

.btn-block { width: 100%; }

/* ---------- Formulieren ---------- */

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 5px;
}

input, textarea, select {
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--ink-soft);
  color: var(--white);
  font: inherit;
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 0;
  border-color: transparent;
}

.form-error {
  color: #ffb0a0;
  background: rgba(107, 5, 4, 0.45);
  border: 1px solid var(--rust);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13px;
}

.hint { font-size: 13px; color: var(--muted-2); margin: 10px 0; }

/* ---------- Login ---------- */

.page-login { display: grid; place-items: center; }

.login-card {
  width: min(380px, calc(100vw - 40px));
  background: var(--ink-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 34px 28px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

.login-head { text-align: center; margin-bottom: 8px; }
.login-head .brand-mark { margin: 0 auto 14px; }
.login-head p { margin: 6px 0 0; }
#login-form { margin-top: 10px; }
#login-form .btn { margin-top: 18px; }

.stats { display: flex; gap: 12px; margin-bottom: 22px; }

.stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: var(--ink-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 18px;
}

.stat-num { font-size: 24px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat.is-active .stat-num { color: var(--gold); }
.stat.is-off .stat-num { color: var(--rust); }

.tools { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.tools input, .tools select { margin-top: 0; width: auto; }
.tools input { flex: 1; max-width: 320px; }
.tools select {
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--ink-soft);
  color: var(--white);
  font: inherit;
  cursor: pointer;
}
.sort-label { margin: 0; font-size: 13px; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
  align-items: start;
}

.site-card {
  background: var(--ink-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  transition: border-color 0.15s ease;
}

.site-card.is-active { border-color: rgba(230, 175, 46, 0.45); }
.site-card.busy { opacity: 0.6; pointer-events: none; }

.site-head { display: flex; align-items: center; gap: 10px; }
.site-head h3 { flex: 1; margin: 0; font-size: 16px; overflow-wrap: anywhere; }

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  background: var(--rust);
}

.site-card.is-active .status-dot {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(230, 175, 46, 0.8);
}

.site-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.site-meta .files { color: var(--gold); }
.site-meta .visits { color: var(--muted, #9a9177); }
.site-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.site-actions .btn { padding: 6px 12px; font-size: 13px; }

.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.slider {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  transition: background 0.2s ease;
}
.slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  background: var(--muted);
  transition: transform 0.2s ease, background 0.2s ease;
}
input:checked + .slider { background: var(--gold); border-color: var(--gold); }
input:checked + .slider::before { transform: translateX(20px); background: var(--ink); }
input:focus-visible + .slider { outline: 2px solid var(--gold); }

.upload-zone {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  margin: 0;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.upload-zone p { margin: 2px 0; font-size: 13px; color: var(--muted); }
.upload-zone p strong { color: var(--white); font-size: 14px; }

.upload-status { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.upload-status.error { color: #ffb0a0; }
.upload-status.ok { color: var(--gold); }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-card);
  border: 1px solid var(--gold);
  color: var(--white);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  z-index: 50;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}
.toast.error { border-color: var(--rust); color: #ffb0a0; }

/* ---------- Feedback ---------- */

.badge {
  background: var(--gold);
  color: var(--ink);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 6px;
}

.feedback-panel, #feedback-panel { margin-top: 0; margin-bottom: 22px; }
#feedback-list {
  max-height: 45vh;
  overflow-y: auto;
  padding-right: 4px;
}
.feedback-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.feedback-head h2 { margin: 0; }
.feedback-head .tools { margin-bottom: 0; }

.feedback-item {
  background: var(--ink-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.fb-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  font-size: 13px;
}
.fb-site { color: var(--gold); font-weight: 700; }
.fb-name {
  background: var(--gold-soft);
  border: 1px solid rgba(230, 175, 46, 0.35);
  border-radius: 999px;
  padding: 1px 9px;
  color: var(--white);
  font-weight: 600;
}
.fb-name.noname {
  background: transparent;
  border-color: var(--line);
  color: var(--muted-2);
  font-style: italic;
  font-weight: 400;
}
.fb-date { color: var(--muted-2); margin-left: auto; }
.feedback-item p { margin: 4px 0 8px; overflow-wrap: anywhere; white-space: pre-wrap; }
.fb-actions { display: flex; justify-content: flex-end; }
.fb-actions .btn { padding: 4px 10px; font-size: 12px; }

/* Sleep een zip op het dashboard → nieuwe site met auto-slug */
#drop-overlay {
  position: fixed;
  inset: 0;
  display: none;
  pointer-events: none;
  z-index: 40;
  background: rgba(0, 0, 0, 0.45);
}
#drop-overlay.active { display: flex; align-items: center; justify-content: center; }
.drop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 36px;
  background: var(--ink-card);
  border: 2px dashed var(--gold);
  border-radius: 14px;
  color: var(--white);
}
.drop-card strong { font-size: 17px; }
.drop-card span { color: var(--muted); font-size: 13px; }

[hidden] { display: none !important; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 20px;
}

.modal-card {
  width: min(430px, 100%);
  background: var(--ink-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 26px;
}
.modal-card h2 { margin: 0 0 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.hub-main { max-width: 1000px; margin: 0 auto; padding: 54px 28px 90px; }
.hub-title { font-size: clamp(32px, 5vw, 48px); margin: 0; }
.hub-sub { margin: 8px 0 32px; }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  background: var(--ink-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--white);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.hub-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.hub-card h3 { margin: 4px 0 2px; }
.hub-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(230, 175, 46, 0.8); }
.hub-favicon,
.site-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: contain;
  flex: none;
}
.site-icon { width: 22px; height: 22px; }
.hub-go { margin-top: 10px; color: var(--gold); font-size: 13px; font-weight: 600; }
.hub-card { position: relative; }
.hub-copy {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted, #9a9177);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.hub-copy:hover { color: var(--gold); border-color: var(--gold); }
.copy-btn {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted, #9a9177);
  font-size: 12px;
  line-height: 1;
  padding: 3px 6px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.copy-btn:hover { color: var(--gold); border-color: var(--gold); }

.page-status { display: grid; place-items: center; }

.status-card {
  text-align: center;
  max-width: 520px;
  padding: 40px 24px;
}

.status-sign {
  display: inline-block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--rust), var(--garnet));
  box-shadow: 0 0 30px rgba(163, 50, 11, 0.5);
  margin-bottom: 18px;
}
.dot-404 { background: radial-gradient(circle at 35% 30%, var(--garnet), var(--ink-soft)); }
.status-card h1 { font-size: 26px; }
.status-card p { margin: 10px 0 24px; }

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; padding: 12px 16px; }
  .container, .hub-main { padding: 20px 16px 60px; }
  .stats { flex-wrap: wrap; }
  .tools { flex-wrap: wrap; }
  .tools input { flex-basis: 100%; max-width: none; }
}
