/* =============================================================
   Registratie applicatie — shared stylesheet
   All pages link to this file. Per-page accent colours are
   set via  --accent  on the <html> element in each page.
   ============================================================= */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Page default accent (blue — used by most pages) ── */
:root {
  --accent:        #3b82d4;
  --accent-dark:   #2e6bbf;
  --accent-darker: #255aa8;
  --accent-faded:  #93bce8;
  --accent-glow:   rgba(59,130,212,.14);
}

/* ── Body ── */
body {
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  background: transparent;
  color: #1f2328;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1rem 4rem;
}

/* ── Random background ── */
.page-bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}
.page-bg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, .30);
  z-index: -1;
  pointer-events: none;
}

/* ── Navbar ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  width: 100%; background: #0d2b5e;
  display: flex; align-items: center;
  padding: 0 1.5rem; gap: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.navbar .nb-brand {
  font-size: .95rem; font-weight: 700; color: #fff;
  text-decoration: none; padding: .75rem 1rem .75rem 0;
  margin-right: .5rem; white-space: nowrap;
}
.navbar a.nb-link {
  font-size: .85rem; color: #fff; text-decoration: none;
  padding: .78rem .9rem; white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}
.navbar a.nb-link:hover  { color: #fff; background: rgba(255,255,255,.12); border-bottom-color: #fff; }
.navbar a.nb-link.active { color: #fff; border-bottom-color: #fff; font-weight: 600; }
body { padding-top: 0; }

/* ── Page headings ── */
h1 { font-size: 1.6rem; color: var(--accent); margin-bottom: .25rem; }
.subtitle { color: #57606a; font-size: .88rem; margin-bottom: 2rem; }

/* ── Card ── */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  width: 100%;
  padding: 2rem 2rem 1.8rem;
  margin-bottom: 1.6rem;
}
.card-md  { padding: 1.6rem 1.8rem 1.4rem; }
.card-lg  { padding: 1.6rem 1.8rem 1.4rem; }
.card-xl  { padding: 1.6rem 1.8rem 1.4rem; }

/* ── Section titles ── */
.section-title {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: #57606a;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: .4rem;
  margin: 1.6rem 0 1rem;
}
.section-title:first-child { margin-top: 0; }

/* ── Form rows (label + input two-column layout) ── */
.row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: start;
  gap: .45rem 1rem;
  margin-bottom: .85rem;
}
label {
  padding-top: .44rem;
  font-size: .88rem;
  line-height: 1.4;
}
label .hint, label span.hint {
  display: block;
  font-size: .74rem;
  color: #57606a;
}

/* ── Inputs / selects / textarea ── */
input[type="text"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: .42rem .7rem;
  border: 1px solid #d0d7de;
  border-radius: 5px;
  font-size: .9rem;
  color: #1f2328;
  background: #fff;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input[type="number"] { width: 90px; }
textarea { resize: vertical; min-height: 68px; }

/* ── Char counter ── */
.char-counter {
  text-align: right;
  font-size: .72rem;
  color: #57606a;
  margin-top: .2rem;
}
.char-counter.over { color: #c0392b; font-weight: 600; }

/* ── Field-wrap (label above input) ── */
.field-wrap label {
  display: block; font-size: .78rem; color: #57606a;
  margin-bottom: .28rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}

/* ── Search grid ── */
.search-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .7rem 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 600px) { .search-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .search-grid { grid-template-columns: 1fr; } }

/* Stars range filter */
.stars-filter { display: flex; align-items: center; gap: .5rem; }
.stars-filter input[type="number"] { width: 62px; }
.stars-filter span { font-size: .8rem; color: #57606a; white-space: nowrap; }

/* ── Stars widget (slider) ── */
.stars-wrap { display: flex; align-items: center; gap: .7rem; }
.stars-wrap input[type="range"] { flex: 1; accent-color: #f59e0b; cursor: pointer; }
.stars-number {
  width: 58px; text-align: center; font-weight: 600;
  font-size: .9rem; padding: .42rem .5rem !important; flex-shrink: 0;
}
.star-display { font-size: 1.1rem; margin-top: .3rem; min-height: 1.3rem; }

/* ── Photo upload area ── */
.upload-area {
  border: 2px dashed #d0d7de; border-radius: 6px;
  padding: 1rem; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s; position: relative;
}
.upload-area:hover, .upload-area.drag-over { border-color: var(--accent); background: #f0faff; }
.upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-label { font-size: .82rem; color: #57606a; pointer-events: none; }
.upload-label strong { color: var(--accent); }

.photo-preview-wrap { margin-top: .7rem; display: none; text-align: center; }
.photo-preview-wrap img {
  max-width: 100%; max-height: 180px;
  border: 1px solid #e5e7eb; border-radius: 5px; object-fit: contain; display: block; margin: 0 auto;
}
.photo-meta { font-size: .74rem; color: #57606a; margin-top: .3rem; }

.current-photo-wrap { margin-bottom: .7rem; }
.current-photo-wrap img {
  max-width: 160px; max-height: 120px;
  border: 1px solid #e5e7eb; border-radius: 5px; object-fit: contain; display: block;
}
.current-photo-label { font-size: .74rem; color: #57606a; margin-top: .3rem; }
.keep-photo { font-size: .78rem; color: #57606a; margin-top: .4rem; }
.btn-clear-photo {
  font-size: .75rem; color: #c0392b; cursor: pointer;
  background: none; border: none; text-decoration: underline; padding: 0; margin-top: .25rem;
}

/* ── Buttons ── */
button {
  padding: .48rem 1.5rem; border-radius: 5px;
  font-size: .9rem; cursor: pointer; border: none;
  font-family: inherit; transition: background .15s;
}
.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover   { background: var(--accent-dark); }
.btn-primary:disabled { background: var(--accent-faded); cursor: not-allowed; }
.btn-secondary { background: #fff; color: #57606a; border: 1px solid #d0d7de; }
.btn-secondary:hover { background: #f7f8fa; }

.btn-row  { display: flex; gap: .7rem; align-items: center; }
.btn-wrap { margin-top: 1.6rem; display: flex; gap: .8rem; justify-content: center; }

/* Large action buttons */
.btn-action {
  padding: .55rem 2.2rem;
  background: var(--accent); color: #fff;
  border: none; border-radius: 5px;
  font-size: .95rem; cursor: pointer;
  transition: background .15s;
}
.btn-action:hover   { background: var(--accent-dark); }
.btn-action:active  { background: var(--accent-darker); }
.btn-action:disabled { background: var(--accent-faded); cursor: not-allowed; }

.btn-cancel-action {
  padding: .55rem 1.4rem;
  background: #fff; color: #57606a;
  border: 1px solid #d0d7de; border-radius: 5px;
  font-size: .95rem; cursor: pointer;
}
.btn-cancel-action:hover { background: #f7f8fa; }

/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 5px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result / status banners ── */
.banner {
  width: 100%;
  padding: .8rem 1rem; border-radius: 6px;
  font-size: .9rem; font-weight: 500; margin-bottom: 1rem; display: none;
}
.banner.ok    { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.banner.error { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }

#result {
  margin-top: 1.4rem;
  width: 100%;
  padding: .85rem 1.1rem;
  border-radius: 6px;
  font-size: .9rem; font-weight: 500;
  display: none;
}
#result.ok    { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
#result.error { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }

#errorBanner {
  margin-top: 1rem;
  width: 100%;
  padding: .8rem 1rem;
  border-radius: 6px;
  background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5;
  font-size: .88rem; display: none;
}

/* ── Info grid (dt/dd two-column) ── */
.info-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: .45rem .8rem;
  font-size: .88rem;
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: .9rem 1rem;
  margin-bottom: 1.2rem;
}
.info-grid dt { color: #57606a; }
.info-grid dd { font-weight: 600; color: #1f2328; word-break: break-all; }

/* ── Credential modal ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.modal-backdrop.hidden { display: none; }

.modal-box {
  background: #fff;
  border-radius: 8px;
  width: 100%; max-width: 400px;
  padding: 1.8rem 2rem 1.6rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
}
.modal-box h2 { font-size: 1.1rem; color: var(--accent); margin-bottom: .25rem; }
.modal-box .modal-sub { font-size: .82rem; color: #57606a; margin-bottom: 1.3rem; }

.modal-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: .5rem .75rem;
  margin-bottom: .75rem;
}
.modal-row label { font-size: .88rem; }
.modal-row input {
  width: 100%; padding: .42rem .7rem;
  border: 1px solid #d0d7de; border-radius: 5px;
  font-size: .9rem; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.modal-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.modal-error {
  font-size: .82rem; color: #7f1d1d;
  background: #fee2e2; border: 1px solid #fca5a5;
  border-radius: 5px; padding: .5rem .8rem;
  margin-bottom: .9rem; display: none;
}
.modal-btn-wrap {
  display: flex; gap: .7rem; justify-content: flex-end; margin-top: 1.2rem;
}
.modal-btn-wrap button.btn-cancel {
  padding: .48rem 1.2rem;
  background: #fff; color: #57606a;
  border: 1px solid #d0d7de; border-radius: 5px;
  font-size: .9rem; cursor: pointer;
}
.modal-btn-wrap button.btn-cancel:hover { background: #f7f8fa; }
.modal-btn-wrap button.btn-confirm {
  padding: .48rem 1.4rem;
  background: var(--accent); color: #fff;
  border: none; border-radius: 5px;
  font-size: .9rem; cursor: pointer;
  transition: background .15s;
}
.modal-btn-wrap button.btn-confirm:hover    { background: var(--accent-dark); }
.modal-btn-wrap button.btn-confirm:disabled { background: var(--accent-faded); cursor: not-allowed; }

/* ── Results table (zoeklid / modlid) ── */
#resultWrap { width: 100%; display: none; }

.result-header {
  display: flex; justify-content: space-between;
  align-items: baseline; margin-bottom: .6rem;
}
.result-header h2 { font-size: 1rem; color: #1f2328; }
.result-count { font-size: .82rem; color: #57606a; }

.tbl-wrap { overflow-x: auto; border: 1px solid #e5e7eb; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; background: #fff; }
thead th {
  background: #f7f8fa; padding: .55rem .75rem;
  text-align: left; color: #57606a; font-weight: 700;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid #e5e7eb; white-space: nowrap;
}
tbody td { padding: .5rem .75rem; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f7f8fa; }

.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; border: 1px solid #e5e7eb; display: block; }
.no-photo {
  width: 44px; height: 44px; border-radius: 4px; border: 1px solid #e5e7eb;
  background: #f7f8fa; display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: #57606a;
}
.stars-cell { color: #f59e0b; white-space: nowrap; font-size: .95rem; }
.stars-num  { font-size: .75rem; color: #57606a; margin-left: .2rem; }

.action-link { color: var(--accent); text-decoration: none; font-size: .82rem; white-space: nowrap; }
.action-link:hover { text-decoration: underline; }

.empty-state { padding: 2.5rem; text-align: center; color: #57606a; font-size: .9rem; }

/* ── initnow: column table ── */
table.cols {
  width: 100%; border-collapse: collapse; font-size: .82rem;
  background: #fff; border: 1px solid #e5e7eb;
  border-top: none; border-radius: 0 0 6px 6px; overflow: hidden;
}
table.cols th {
  background: #f7f8fa; padding: .45rem .7rem;
  text-align: left; color: #57606a; font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}
table.cols td { padding: .4rem .7rem; border-bottom: 1px solid #f0f2f5; color: #1f2328; }
table.cols tr:last-child td { border-bottom: none; }
table.cols td.key { color: #7c5cd8; font-weight: 600; }

/* ── Info / warning boxes ── */
.info-box {
  width: 100%;
  background: #f0fdfa; border: 1px solid #99f6e4;
  border-left: 4px solid #0f766e; border-radius: 6px;
  padding: 1rem 1.2rem; margin-bottom: 1.6rem;
  font-size: .88rem; color: #134e4a; line-height: 1.6;
}
.info-box strong { display: block; margin-bottom: .3rem; font-size: .92rem; }

.warning-box {
  width: 100%;
  background: #fffbeb; border: 1px solid #fcd34d;
  border-left: 4px solid var(--accent); border-radius: 6px;
  padding: 1rem 1.2rem; margin-bottom: 1.6rem;
  font-size: .88rem; color: #78350f; line-height: 1.6;
}
.warning-box strong { display: block; margin-bottom: .3rem; font-size: .92rem; }

/* ── main.html: slideshow ── */
.bg-slide {
  position: fixed; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  opacity: 0; transition: opacity 1.4s ease-in-out; z-index: 0;
}
.bg-slide.active { opacity: 1; }
.bg-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 1; pointer-events: none;
}
header {
  text-align: center; margin-bottom: 3rem;
  color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
header h1 { font-size: 2.6rem; font-weight: 700; letter-spacing: .04em; margin-bottom: .4rem; }
header p  { font-size: 1rem; opacity: .85; letter-spacing: .02em; }
.btn-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem; width: 100%; max-width: 680px;
  position: relative; z-index: 3;
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; padding: 1.4rem .8rem 1.2rem; border-radius: 10px; border: none;
  cursor: pointer; text-decoration: none; font-family: inherit;
  font-size: .88rem; font-weight: 600; letter-spacing: .02em; color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .15s, box-shadow .15s, background .15s;
  box-shadow: 0 4px 18px rgba(0,0,0,.35); text-align: center; line-height: 1.3;
}
.nav-btn:hover  { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.45); }
.nav-btn:active { transform: translateY(0); }
.nav-btn .icon  { font-size: 1.8rem; line-height: 1; }
.btn-init     { background: rgba(59,  130, 212, .72); }
.btn-clear    { background: rgba(180,  83,   9, .72); }
.btn-delete   { background: rgba(192,  57,  43, .72); }
.btn-add      { background: rgba(42,  157,  92, .72); }
.btn-search   { background: rgba(124,  92, 216, .72); }
.btn-modify   { background: rgba(30,  144, 180, .72); }
.btn-backup   { background: rgba(15,  118, 110, .72); }
.btn-restore  { background: rgba(101,  82,  15, .72); }
.btn-init:hover    { background: rgba(59,  130, 212, .92); }
.btn-clear:hover   { background: rgba(180,  83,   9, .92); }
.btn-delete:hover  { background: rgba(192,  57,  43, .92); }
.btn-add:hover     { background: rgba(42,  157,  92, .92); }
.btn-search:hover  { background: rgba(124,  92, 216, .92); }
.btn-modify:hover  { background: rgba(30,  144, 180, .92); }
.btn-backup:hover  { background: rgba(15,  118, 110, .92); }
.btn-restore:hover { background: rgba(101,  82,  15, .92); }
.dots {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: .5rem; z-index: 3;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.4); border: 1px solid rgba(255,255,255,.6);
  transition: background .3s; cursor: pointer;
}
.dot.active { background: #fff; }
@media (max-width: 480px) { .btn-grid { grid-template-columns: repeat(2, 1fr); } header h1 { font-size: 1.9rem; } }

/* main.html body override */
body.main-page {
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2rem 1rem 3rem; position: relative; z-index: 2;
  background: transparent;
}

/* ── Site footer ─────────────────────────────────────────────────────────── */
.site-footer {
  width: 100%;
  padding: .6rem 1rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  font-size: .72rem;
  color: #57606a;
  position: fixed;
  bottom: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.85);
  z-index: 100;
}

/* ── phpMyAdmin link wrapper (main.html) ─────────────────────────────────── */
.pma-link-wrap {
  display: none;
  margin-top: 1rem;
  position: relative;
  z-index: 3;
}
.pma-link {
  color: #fff;
  font-size: .85rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
  text-decoration: underline;
}
