/* ===========================================================================
   auth.css — login-overlay, uitlogknop en de beheerderspagina.
   Gebruikt de ECOstyle-tokens uit style.css (--brand, --surface, …).
   Aparte file zodat style.css onaangeroerd blijft: dat maakt het vergelijken
   van het nieuwe en oude dashboard tijdens de parallelperiode eenvoudiger.
   =========================================================================== */

/* Vervangt style="display:none" — inline styles zijn door de CSP geblokkeerd. */
.is-hidden { display: none !important; }

/* ===== LOGIN-OVERLAY ===== */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.auth-overlay[hidden] { display: none; }

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px 24px;
  text-align: left;
}
.auth-logo { height: 40px; width: auto; display: block; margin: 0 auto 18px; }
.auth-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: var(--brand-dark);
  text-align: center;
}
.auth-lead {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin: 4px 0 22px;
}

.auth-card label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 5px;
}
.auth-card input {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 9px 11px;
  margin: 0 0 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.auth-card input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(114, 168, 0, .18);
}

.auth-submit {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: var(--radius);
  padding: 11px;
  margin-top: 4px;
  cursor: pointer;
  transition: background .15s;
}
.auth-submit:hover:not(:disabled) { background: var(--brand-dark); }
.auth-submit:disabled { opacity: .55; cursor: not-allowed; }

.auth-error {
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  background: #fde8e8;
  border-radius: var(--radius);
  padding: 9px 11px;
  margin: 0 0 14px;
}
.auth-error[hidden] { display: none; }

.auth-foot {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin: 16px 0 0;
  line-height: 1.7;
}
.auth-foot a { color: var(--brand-dark); font-weight: 600; }

/* ===== HEADER: uitloggen ===== */
.signout-btn {
  margin-left: 10px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.signout-btn:hover { background: var(--brand-light); color: var(--brand-dark); }

.restart-btn[hidden] { display: none; }

.footer-user { display: block; margin-top: 3px; opacity: .8; }

/* ===== BEHEERDERSPAGINA ===== */
.admin-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin: 0 0 18px;
}
.admin-card h2 {
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-dark);
  margin: 0 0 4px;
}
.admin-card p.hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop-zone:hover,
.drop-zone.is-over { border-color: var(--brand); background: var(--brand-light); }
.drop-zone strong { display: block; font-size: 14px; margin-bottom: 3px; }
.drop-zone span { font-size: 12px; color: var(--text-muted); }

.admin-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: var(--radius);
  padding: 11px 22px;
  cursor: pointer;
  transition: background .15s;
}
.admin-btn:hover:not(:disabled) { background: var(--brand-dark); }
.admin-btn:disabled { opacity: .5; cursor: not-allowed; }
.admin-btn.secondary {
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  font-size: 13px;
  padding: 9px 16px;
}
.admin-btn.secondary:hover:not(:disabled) { background: var(--brand-light); color: var(--brand-dark); }

.admin-log {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.7;
  background: #1e2a0e;
  color: #d8f0b0;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 16px 0 0;
  max-height: 260px;
  overflow-y: auto;
  white-space: pre-wrap;
}
.admin-log:empty { display: none; }
.admin-log .err { color: #ffb3ae; }
.admin-log .ok  { color: #a8e063; font-weight: 700; }

.admin-summary { margin: 18px 0 0; }
.admin-summary table { border-collapse: collapse; font-size: 13px; width: 100%; }
.admin-summary th,
.admin-summary td {
  border-bottom: 1px solid var(--border);
  padding: 6px 10px;
  text-align: right;
}
.admin-summary th:first-child,
.admin-summary td:first-child { text-align: left; font-weight: 600; }
.admin-summary caption {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: left;
  padding: 0 0 6px;
}
.admin-warn {
  font-size: 12px;
  font-weight: 600;
  color: #8a6100;
  background: #fff8e1;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 10px 13px;
  margin: 14px 0 0;
}

.admin-actions { margin: 18px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.admin-actions[hidden] { display: none; }

.admin-back {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 16px;
}

@media (max-width: 520px) {
  .auth-card { padding: 24px 20px 20px; }
  .admin-main { padding: 18px 14px 60px; }
  .admin-card { padding: 18px 16px; }
}
