:root {
  --bg: #0b1020;
  --card: #121a33;
  --text: #e7eaf3;
  --muted: #a9b0c7;
  --green: #18c46c;
  --red: #e64646;
  --yellow: #f2c94c;
  --blue: #4b7bec;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1200px 600px at 20% 10%, #182353, transparent), var(--bg);
  color: var(--text);
}

a { color: var(--blue); text-decoration: none; }

.container { max-width: 1000px; margin: 0 auto; padding: 24px; }

.header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card {
  background: rgba(18, 26, 51, 0.9);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 820px) { .grid.two { grid-template-columns: 1fr; } }

.title { font-size: 22px; font-weight: 800; letter-spacing: 0.2px; }
.sub { color: var(--muted); margin-top: 6px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.14);
}
.badge.free { background: rgba(24,196,108,0.12); }
.badge.reported { background: rgba(230,70,70,0.12); }
.badge.progress { background: rgba(242,201,76,0.12); }

.bigbtn {
  width: 100%;
  padding: 18px 16px;
  font-size: 20px;
  font-weight: 900;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.12s ease;
}
.bigbtn:active { transform: scale(0.98); }
.bigbtn.green { background: var(--green); color: #03140a; }
.bigbtn.red { background: var(--red); color: #140303; cursor: not-allowed; }
.bigbtn.yellow { background: var(--yellow); color: #141003; }
.bigbtn:disabled { filter: grayscale(0.15) brightness(0.95); }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.kv:last-child { border-bottom: none; }
.k { color: var(--muted); }
.v { font-weight: 700; }

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
}
.table th, .table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.table th { color: var(--muted); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(75,123,236,0.12);
  margin-top: 12px;
  display: none;
}
.notice.show { display: block; }
.notice[data-kind="success"] { background: rgba(24,196,108,0.12); }
.notice[data-kind="error"] { background: rgba(230,70,70,0.12); }

.small { font-size: 13px; color: var(--muted); }

/* --- Containers overzicht (mobiel-vriendelijk) --- */
.toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .toolbar { grid-template-columns: 1.2fr 1fr; align-items: center; }
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
}
.searchIcon { opacity: 0.9; }
.searchInput {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}
.searchInput::placeholder { color: rgba(169,176,199,0.9); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
.chip {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.14);
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.chip.active { background: rgba(75,123,236,0.18); border-color: rgba(75,123,236,0.35); }

.cardsGrid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.containerCard { padding: 14px; }
.containerTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.containerName { font-size: 18px; font-weight: 900; letter-spacing: 0.2px; }
.containerMeta { margin-top: 6px; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.dot { opacity: 0.7; }
.muted { color: var(--muted); }
.strong { font-weight: 800; }

.containerBottom {
  margin-top: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.containerSmall { font-size: 13px; }

.actions { display: flex; gap: 8px; align-items: center; }
.linkBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.14);
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
}
.linkBtn:hover { filter: brightness(1.05); }

.smallbtn {
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 900;
  font-size: 14px;
  transition: transform 0.08s ease, filter 0.12s ease;
}
.smallbtn:active { transform: scale(0.98); }
.smallbtn.green { background: var(--green); color: #03140a; }
.smallbtn.red { background: var(--red); color: #140303; cursor: not-allowed; }
.smallbtn.yellow { background: var(--yellow); color: #141003; }
.smallbtn:disabled { filter: grayscale(0.15) brightness(0.95); }

@media (max-width: 460px) {
  .containerBottom { flex-direction: column; align-items: stretch; }
  .actions { justify-content: stretch; }
  .actions > * { flex: 1; }
}
/* ===== Containers UI v2 (SCOPED, geen conflicts) ===== */
.container-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

/* Sticky toolbar zonder jouw bestaande .toolbar te slopen */
.container-page .toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px;
  border-radius: 14px;
  background: rgba(10, 18, 40, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Gebruik een unieke class voor input, niet .search (die is bij jou een flex box) */
.container-page .searchBar {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #fff;
  outline: none;
}

/* Filters: ook unieke classnaam */
.container-page .filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.container-page .filter-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  font-size: 13px;
}
.container-page .filter-btn.active {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
}

/* Grid: hergebruik NIET .grid van je algemene layout. Geef eigen class. */
.container-page .containersGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}
@media (min-width: 720px) {
  .container-page .containersGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .container-page .containersGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Compactere card alleen binnen container-page */
.container-page .card {
  border-radius: 16px;
  padding: 12px 12px 10px;
}

/* Maak titels compact binnen cards, maar laat header title (22px) met rust */
.container-page .containerCard .containerName {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

/* Badge dot */
.container-page .badge {
  gap: 6px;
  font-size: 12px;
}
.container-page .badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}
.container-page .badge.free::before { background: var(--green); }
.container-page .badge.reported::before { background: var(--red); }
.container-page .badge.progress::before { background: var(--yellow); }

/* Acties netjes rechts */
.container-page .actions {
  justify-content: space-between;
}

/* ===== Containers bewoners UI (scoped) ===== */
.cp{
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.cp__header{
  margin: 6px 0 14px;
}

.cp__title{
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.cp__subtitle{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.cp__panel{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 18, 40, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
}

.cp__search{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}

.cp__searchIcon{ opacity: .9; }
.cp__searchInput{
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 16px; /* groter voor bewoners */
}
.cp__searchInput::placeholder{ color: rgba(169,176,199,0.9); }

.cp__filters{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cp__chip{
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.12);
  color: var(--text);
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
}
.cp__chip.is-active{
  background: rgba(75,123,236,0.20);
  border-color: rgba(75,123,236,0.35);
}

.cp__tip{
  margin: 10px 0 0;
  color: rgba(255,255,255,.65);
  font-size: 12px;
}

.cp__empty{
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(18, 26, 51, 0.9);
  border: 1px solid rgba(255,255,255,0.08);
}

.cp__grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px){
  .cp__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px){
  .cp__grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.cp__card{
  background: rgba(18, 26, 51, 0.9);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.20);
}

.cp__top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.cp__nameWrap{ min-width: 0; }
.cp__name{
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.cp__meta{
  margin-top: 8px;
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.cp__pill{
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.14);
  color: rgba(255,255,255,0.88);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

.cp__muted{ color: var(--muted); }

.cp__status{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}

.cp__dot{
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.cp__status.is-free{ background: rgba(24,196,108,0.12); }
.cp__status.is-free .cp__dot{ background: var(--green); }

.cp__status.is-reported{ background: rgba(230,70,70,0.12); }
.cp__status.is-reported .cp__dot{ background: var(--red); }

.cp__status.is-busy{ background: rgba(242,201,76,0.12); }
.cp__status.is-busy .cp__dot{ background: var(--yellow); }

.cp__actions{
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.cp__btn{
  width: 100%;
  padding: 14px 12px;        /* groot voor bewoners */
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-weight: 1000;
  font-size: 16px;
  cursor: pointer;
}
.cp__btn:active{ transform: scale(0.99); }

.cp__btn--primary{
  background: rgba(24,196,108,0.18);
  border-color: rgba(24,196,108,0.28);
}

.cp__btn:disabled{
  opacity: 0.55;
  cursor: not-allowed;
}

.cp__link{
  display: inline-flex;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.12);
  color: rgba(120, 180, 255, 0.95);
  font-weight: 900;
  text-decoration: none;
}

.cp__footer{
  margin-top: 14px;
  font-size: 12px;
  opacity: .9;
}
