/* RSW jury- en organisatieplatform. Bootstrap 5.3 does most of the work. */
:root {
  --rsw-primary: #1d4e89;
  --rsw-primary-dark: #143a68;
  --rsw-sidebar: #13202f;
  --rsw-sidebar-text: #c6d1de;
  --rsw-bg: #f3f5f8;
  --sidebar-width: 236px;
}

body { background: var(--rsw-bg); }

/* ---- Layout -------------------------------------------------------------- */
.app-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width);
  background: var(--rsw-sidebar); color: var(--rsw-sidebar-text);
  display: flex; flex-direction: column; z-index: 1030; overflow-y: auto;
}
.app-sidebar .brand {
  display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.2rem;
  color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .01em;
}
.app-sidebar .brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--rsw-primary);
  display: grid; place-items: center; font-size: 1.1rem;
}
.app-sidebar .brand small { display: block; font-weight: 400; color: var(--rsw-sidebar-text); font-size: .72rem; }
.app-sidebar .nav-heading {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #8193a6;
  padding: 1rem 1.2rem .35rem;
}
.app-sidebar .nav-link {
  color: var(--rsw-sidebar-text); padding: .5rem 1.2rem; display: flex; align-items: center; gap: .65rem;
  border-left: 3px solid transparent;
}
.app-sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.app-sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.08); border-left-color: #f2b630; }
.app-sidebar .nav-link .bi { font-size: 1.05rem; opacity: .9; }
.app-sidebar .sidebar-footer { margin-top: auto; padding: 1rem 1.2rem; font-size: .82rem; border-top: 1px solid rgba(255,255,255,.08); }

.app-main { margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }
.app-topbar {
  background: #fff; border-bottom: 1px solid #e3e7e2; padding: .6rem 1.5rem;
  display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 1020;
}
.app-content { padding: 1.5rem; flex: 1; }
.page-title { font-size: 1.4rem; font-weight: 700; margin: 0; }

@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  body.sidebar-open .app-sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .app-main { margin-left: 0; }
  .app-content { padding: 1rem; }
}

/* ---- Components ---------------------------------------------------------- */
.card { border-color: #e3e7e2; box-shadow: 0 1px 2px rgba(16,24,18,.04); }
.card-header { background: #fff; font-weight: 600; }
.stat { display: flex; flex-direction: column; }
.stat .value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .label { color: var(--bs-secondary-color); font-size: .8rem; }
.table td, .table th { vertical-align: middle; }
.table-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.btn-rsw { --bs-btn-bg: var(--rsw-primary); --bs-btn-border-color: var(--rsw-primary); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--rsw-primary-dark); --bs-btn-hover-border-color: var(--rsw-primary-dark); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--rsw-primary-dark); --bs-btn-active-border-color: var(--rsw-primary-dark); }
tr.board-outside > td { color: var(--bs-secondary-color); background: #fafbfa; }
.handle { cursor: grab; color: var(--bs-secondary-color); }
.sortable-ghost { opacity: .4; background: #e8f3ea; }
.code-pill { font-family: var(--bs-font-monospace); background: #eef2ed; padding: .15rem .45rem; border-radius: .35rem; }

/* ---- Login --------------------------------------------------------------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem;
  background: radial-gradient(1200px 600px at 10% -10%, #dbeadf 0%, transparent 60%), var(--rsw-bg); }
.login-card { width: 100%; max-width: 420px; }
.login-card .brand-mark { width: 52px; height: 52px; border-radius: 14px; background: var(--rsw-primary); color: #fff; display: grid; place-items: center; font-size: 1.6rem; }
.login-code { font-size: 3rem; font-weight: 700; letter-spacing: .15em; line-height: 1.2; margin: .25rem 0 .5rem; font-variant-numeric: tabular-nums; }


/* ---- RSW ------------------------------------------------------------------ */
.import-preview { max-height: 22rem; overflow: auto; }
.readiness li { display: flex; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid #eef1f4; }
.readiness li:last-child { border-bottom: 0; }
.readiness .mark { width: 1.4rem; flex-shrink: 0; text-align: center; }

/* Indeling: one column per subkamp, team cards to drag (or move with the menu). */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; align-items: start; }
.board-col { background: #fff; border: 1px solid #e3e7ec; border-radius: .6rem; }
.board-col > header { padding: .65rem .8rem; border-bottom: 1px solid #eef1f4; display: flex; align-items: baseline; gap: .5rem; }
.board-col > header .count { margin-left: auto; font-variant-numeric: tabular-nums; }
.board-col.unbalanced > header .count { color: #b35c00; font-weight: 700; }
.board-col .organizers { font-size: .78rem; color: var(--bs-secondary-color); padding: .35rem .8rem 0; }
.board-list { min-height: 3rem; padding: .5rem; display: flex; flex-direction: column; gap: .4rem; }
.team-card { border: 1px solid #dde3ea; border-radius: .45rem; padding: .4rem .55rem; background: #fbfcfd; display: flex; gap: .45rem; align-items: center; cursor: grab; }
.team-card .who { min-width: 0; flex: 1; }
.team-card .who .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-card .who small { color: var(--bs-secondary-color); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-card .num { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--rsw-primary); min-width: 1.6rem; }
.team-card.conflict-eigen { border-color: #dc3545; background: #fff5f5; }
.team-card.conflict-samen { border-color: #e8a33d; background: #fffaf0; }
.conflict-tag { font-size: .68rem; border-radius: .3rem; padding: 0 .3rem; white-space: nowrap; }
.conflict-tag.eigen { background: #dc3545; color: #fff; }
.conflict-tag.samen { background: #e8a33d; color: #fff; }
.team-card { flex-wrap: wrap; row-gap: .25rem; }
.team-card select { flex: 1 0 100%; font-size: .76rem; padding: .05rem 1.6rem .05rem .4rem; color: var(--bs-secondary-color); }

/* Check-in on the phone: big rows, one tap. */
.checkin-list .item { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-bottom: 1px solid #eef1f4; background: #fff; }
.checkin-list .item .num { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2.2rem; color: var(--rsw-primary); font-size: 1.1rem; }
.checkin-list .item .who { flex: 1; min-width: 0; }
.checkin-list .item .who .name { font-weight: 600; }
.checkin-list .item .who small { color: var(--bs-secondary-color); display: block; }
.checkin-list .item .btn { min-width: 6.5rem; }
.checkin-list .item.is-in { background: #f2faf4; }
.sticky-search { position: sticky; top: 0; z-index: 5; background: var(--rsw-bg); padding: .5rem 0; }
.big-number { font-size: 2.2rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
#qrBox canvas, #qrBox img { margin: 0 auto; }
