:root {
  --bg: #f2f2f7;
  --purple: #8b5cf6;
  --purple-light: rgba(166, 147, 253, 0.5);
  --purple-border: #a693fd;
  --purple-text: #811dd8;
  --red: #ff5252;
  --gray-card: #d6d6d6;
  --gray-pill: rgba(196, 196, 196, 0.5);
  --gray-pill-border: #c4c4c4;
  --gray-text: #555;
  --blue-pill: rgba(147, 197, 253, 0.5);
  --blue-pill-border: #93c5fd;
  --blue-text: #1d4ed8;
  --green-pill: rgba(149, 253, 147, 0.5);
  --green-pill-border: #95fd93;
  --green-text: #20b016;
  --yellow-pill: rgba(253, 224, 112, 0.5);
  --yellow-pill-border: rgba(146, 100, 14, 0.25);
  --yellow-text: #92640e;
  --font: "Nunito", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  background: var(--bg);
  color: #1e1e1e;
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior: none;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

#screen-login.active {
  display: flex;
}

.nav-bar {
  align-items: center;
  background: var(--gray-card);
  display: flex;
  gap: 12px;
  height: 48px;
  justify-content: space-between;
  left: 0;
  padding: 0 12px;
  position: sticky;
  right: 0;
  top: 0;
  z-index: 100;
}

.nav-bar[hidden] {
  display: none;
}

.nav-logo {
  align-items: center;
  background: var(--purple-light);
  border: 1.5px solid var(--purple-border);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-size: 17px;
  font-weight: 800;
  gap: 6px;
  padding: 4px 14px 4px 10px;
  text-decoration: none;
  user-select: none;
}

.nav-logo svg {
  height: 18px;
  width: 18px;
}

.nav-user {
  align-items: center;
  display: flex;
  gap: 8px;
}

.nav-user span {
  font-size: 16px;
  font-weight: 700;
}

.nav-avatar,
.account-avatar,
.detail-avatar {
  align-items: center;
  background: var(--purple-light);
  border: 2px solid var(--purple-border);
  border-radius: 50%;
  color: var(--purple-text);
  display: flex;
  font-weight: 800;
  justify-content: center;
}

.nav-avatar {
  background: #fff;
  border-color: var(--purple);
  font-size: 11px;
  height: 30px;
  width: 30px;
}

.nav-logout-btn,
.role-chip,
.acc-btn,
.detail-status-toggle,
.detail-delete-btn,
.new-account-btn,
.bottom-nav-btn,
.absent-btn,
.login-btn,
.mbtn,
.clear-btn,
.bs-add,
.datum-chip {
  cursor: pointer;
}

.nav-logout-btn {
  background: transparent;
  border: 1.5px solid var(--gray-pill-border);
  border-radius: 999px;
  color: var(--gray-text);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s;
}

.nav-logout-btn:hover {
  background: rgba(206, 0, 0, 0.12);
  border-color: #c40000;
  color: #c40000;
}

.tag,
.builder-tag,
.account-role-tag,
.afmelding-tag {
  align-items: center;
  border: 1px solid;
  border-radius: 999px;
  display: inline-flex;
  white-space: nowrap;
}

.tag {
  font-size: 13px;
  font-weight: 600;
  gap: 4px;
  padding: 2px 9px;
}

.tag.location,
.builder-tag.location {
  background: var(--purple-light);
  border-color: var(--purple-border);
  color: var(--purple-text);
}

.tag.client,
.builder-tag.client,
.account-role-tag.client {
  background: var(--gray-pill);
  border-color: var(--gray-pill-border);
  color: var(--gray-text);
}

.tag.sup-blue,
.builder-tag.sup-blue,
.account-role-tag.begeleider,
.account-role-tag.admin {
  background: var(--blue-pill);
  border-color: var(--blue-pill-border);
  color: var(--blue-text);
}

.account-role-tag.editor {
  background: rgba(139, 92, 246, 0.15);
  border-color: #8b5cf6;
  color: #6d28d9;
}

.tag.sup-green,
.builder-tag.sup-green {
  background: var(--green-pill);
  border-color: var(--green-pill-border);
  color: var(--green-text);
}

.tag.game,
.builder-tag.game {
  background: rgba(254, 115, 115, 0.5);
  border-color: #fe7373;
  color: #d21818;
}

.modal-bg {
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 500;
}

.modal-bg.open {
  display: flex;
}

.modal-box {
  animation: modal-in 0.2s ease;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 22px 24px;
  width: min(340px, calc(100vw - 32px));
}

.modal-box h3 {
  color: var(--gray-text);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
}

.modal-input,
.modal-select,
.login-input,
.accounts-search {
  background: #fff;
  border: 1.5px solid var(--gray-pill-border);
  border-radius: 999px;
  color: #1e1e1e;
  outline: none;
  transition: border-color 0.18s;
  width: 100%;
}

.modal-input,
.modal-select {
  color: var(--gray-text);
  font-size: 15px;
  font-weight: 500;
  padding: 9px 14px;
}

.modal-select {
  margin-top: 10px;
}

.modal-input:focus,
.modal-select:focus,
.login-input:focus,
.accounts-search:focus {
  border-color: var(--purple);
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.mbtn {
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  padding: 7px 18px;
  transition: filter 0.15s;
}

.mbtn:hover {
  filter: brightness(0.93);
}

.mbtn.cancel {
  background: var(--gray-pill);
  color: var(--gray-text);
}

.mbtn.confirm {
  background: var(--purple);
  color: #fff;
}

/* ── Absence modal extras ─────────────────────── */
.abs-date-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.abs-date-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
  min-width: 0;
}

.abs-date-group label {
  color: var(--gray-text);
  font-size: 12px;
  font-weight: 700;
  padding-left: 4px;
}

.abs-date-input {
  border-radius: 12px;
  min-width: 0;
  padding: 8px 12px;
  width: 100%;
}

.abs-reason-textarea {
  border-radius: 12px;
  margin-top: 10px;
  resize: none;
}

/* ── New account form ─────────────────────────── */
.acc-modal-header {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: -4px 0 14px;
  padding: 10px 0 4px;
}

.acc-modal-icon {
  align-items: center;
  border-radius: 50%;
  color: #fff;
  display: flex;
  height: 54px;
  justify-content: center;
  margin-bottom: 4px;
  transition: background 0.22s;
  width: 54px;
}

.acc-modal-icon svg {
  height: 26px;
  width: 26px;
}

.acc-modal-icon.role-client { background: #b8b8b8; }
.acc-modal-icon.role-admin  { background: #60a5fa; }
.acc-modal-icon.role-editor { background: var(--purple); }

.acc-role-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 2px;
}

.acc-role-chip {
  background: none;
  border: 1.5px solid var(--gray-pill-border);
  border-radius: 999px;
  color: #bbb;
  cursor: pointer;
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 0;
  text-align: center;
  transition: all 0.15s;
}

.acc-role-chip.sel-client {
  background: rgba(196, 196, 196, 0.3);
  border-color: #c4c4c4;
  color: #555;
}

.acc-role-chip.sel-admin {
  background: var(--blue-pill);
  border-color: var(--blue-pill-border);
  color: var(--blue-text);
}

.acc-role-chip.sel-editor {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--purple);
  color: #6d28d9;
}

.acc-section-label {
  color: #ccc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 14px 0 8px;
  text-transform: uppercase;
}

.acc-field {
  margin-bottom: 8px;
}

.acc-field-label {
  color: #aaa;
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  padding-left: 4px;
  text-transform: uppercase;
}

.toast {
  background: #1e1e1e;
  border-radius: 999px;
  bottom: 24px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  left: 50%;
  padding: 10px 20px;
  pointer-events: none;
  position: fixed;
  transform: translateX(-50%) translateY(80px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 9000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.activity-card,
.mini-card,
.account-card,
.account-detail,
.login-card,
.builder-section {
  background: #fff;
}

.activity-card {
  animation: fade-card 0.25s ease;
  border-radius: 16px;
  padding: 12px;
  position: relative;
}

.card-title {
  color: var(--red);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
}

.card-divider-left {
  background: linear-gradient(to right, #d0d0d0 55%, transparent);
  height: 1.5px;
  margin: 5px 0;
  width: 58%;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.card-section-label {
  color: #9c9c9c;
  font-size: 11px;
  font-weight: 600;
  position: absolute;
  right: 12px;
  top: 12px;
}

.card-right-col {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: absolute;
  right: 12px;
  top: 28px;
}

.cards-empty,
.accounts-empty {
  color: #9c9c9c;
  font-size: 14px;
  font-weight: 500;
  padding: 28px 16px;
  text-align: center;
}

#screen-login {
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 16px;
}

.login-card {
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 36px 32px;
  width: min(340px, 100%);
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.login-logo-badge {
  align-items: center;
  background: var(--purple-light);
  border: 1.5px solid var(--purple-border);
  border-radius: 999px;
  display: inline-flex;
  font-size: 22px;
  font-weight: 800;
  gap: 6px;
  padding: 6px 18px 6px 12px;
}

.login-logo-badge svg {
  height: 22px;
  width: 22px;
}

.login-subtitle {
  color: #9c9c9c;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 28px;
  margin-top: -18px;
  text-align: center;
}

.login-field {
  margin-bottom: 14px;
}

.login-label {
  color: var(--gray-text);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-input {
  font-size: 15px;
  font-weight: 500;
  padding: 11px 16px;
}

.login-error {
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  min-height: 18px;
  text-align: center;
}

.login-btn {
  background: var(--purple);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  height: 50px;
  margin-top: 4px;
  transition: filter 0.2s, transform 0.12s;
  width: 100%;
}

.login-btn:hover,
.new-account-btn:hover,
.bottom-nav-btn:hover,
.absent-btn:hover,
.clear-btn:hover {
  filter: brightness(1.08);
}

.login-btn:active,
.bottom-nav-btn:active,
.absent-btn:active {
  transform: scale(0.98);
}

.login-hint {
  color: #bbb;
  font-size: 12px;
  margin-top: 14px;
  text-align: center;
}

.home-wrap {
  margin: 0 auto;
  max-width: 420px;
  padding: 16px 16px 100px;
}

.home-columns {
  display: none;
}

.home-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.home-col .col-header {
  flex-shrink: 0;
}

.home-col .cards-container {
  flex: 1;
}

.time-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.time-tab {
  background: var(--gray-card);
  border-radius: 20px;
  cursor: pointer;
  flex: 1;
  padding: 8px 4px 20px;
  position: relative;
  text-align: center;
  transition: background 0.25s;
  user-select: none;
}

.time-tab .t-times {
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.time-tab .t-period {
  color: #9c9c9c;
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
}

.time-tab .ball-wrap {
  align-items: center;
  bottom: 5px;
  display: flex;
  height: 14px;
  left: 8px;
  position: absolute;
  right: 8px;
}

.time-tab .ball-track {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 1px;
  height: 2px;
  position: relative;
  width: 100%;
}

.time-tab.active .ball-track {
  background: rgba(139, 92, 246, 0.25);
}

.time-tab .ball {
  background: var(--purple);
  border-radius: 50%;
  height: 12px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 12px;
}

.time-tab.active .ball {
  transform: translate(-50%, -50%) scale(1);
}

.cards-container,
.gesch-cards-wrap,
.mini-cards-area {
  background: var(--gray-card);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
  padding: 8px;
}

#screen-home .card-title,
.gesch-cards-wrap .card-title {
  padding-right: 96px;
}

.absent-btn {
  background: var(--purple);
  border: none;
  border-radius: 20px;
  bottom: 20px;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  height: 58px;
  left: 50%;
  max-width: 388px;
  position: fixed;
  transform: translateX(-50%);
  transition: filter 0.2s, transform 0.15s;
  width: calc(100% - 32px);
  z-index: 50;
}

.absent-btn:active {
  transform: translateX(-50%) scale(0.97);
}

.dashboard-wrap {
  margin: 0 auto;
  max-width: 1200px;
  padding: 16px 16px 110px;
}

.dashboard-top {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: auto auto 1fr;
  margin-bottom: 16px;
}

.stat-card {
  border-radius: 20px;
  min-width: 160px;
  padding: 20px 28px;
}

.stat-card.blue {
  background: var(--blue-pill);
}

.stat-card.yellow {
  background: var(--yellow-pill);
}

.stat-number {
  color: #1a1a1a;
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  color: var(--gray-text);
  font-size: 16px;
  font-weight: 600;
  margin-top: 6px;
}

.afmeldingen-panel {
  background: var(--gray-card);
  border-radius: 20px;
  padding: 14px;
}

.afmeldingen-title {
  color: #1a1a1a;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 10px;
}

.afmeldingen-line {
  background: linear-gradient(to right, var(--purple) 30%, transparent);
  height: 2px;
  margin-bottom: 10px;
  opacity: 0.4;
}

.afmeldingen-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.afmelding-tag {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
}

.afmelding-tag.ziek {
  background: var(--blue-pill);
  border-color: var(--blue-pill-border);
  color: var(--blue-text);
}

.afmelding-tag.vakantie {
  background: var(--yellow-pill);
  border-color: var(--yellow-pill-border);
  color: var(--yellow-text);
}

.afmelding-tag.anders {
  background: var(--gray-pill);
  border-color: var(--gray-pill-border);
  color: var(--gray-text);
}

.afmelding-tag[data-tooltip]:not([data-tooltip=""]) {
  cursor: default;
  position: relative;
}

.afmelding-tag[data-tooltip]:not([data-tooltip=""])::after {
  background: #333;
  border-radius: 8px;
  bottom: calc(100% + 6px);
  color: #fff;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 600;
  left: 50%;
  opacity: 0;
  padding: 5px 10px;
  pointer-events: none;
  position: absolute;
  transform: translateX(-50%);
  transition: opacity 0.15s;
  white-space: nowrap;
  z-index: 100;
}

.afmelding-tag[data-tooltip]:not([data-tooltip=""]):hover::after {
  opacity: 1;
}

.dashboard-calendar {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 16px;
}

.mini-col-header,
.col-header {
  background: var(--gray-card);
}

.mini-col-header {
  border-radius: 16px;
  margin-bottom: 8px;
  padding: 10px 14px;
}

.mini-col-header .ch-time {
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 800;
}

.mini-col-header .ch-period,
.col-header .ch-period {
  color: #9c9c9c;
  font-size: 12px;
  font-weight: 500;
}

.mini-col-header .ch-line,
.col-header .ch-line {
  background: var(--purple);
  border-radius: 1px;
  height: 2px;
  margin-top: 4px;
  opacity: 0.5;
}

.mini-card {
  border-radius: 12px;
  padding: 8px 10px;
  transition: box-shadow 0.2s;
}

.mini-card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

.mini-card-title {
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 3px;
}

.mini-card .tag {
  font-size: 11px;
  padding: 1px 7px;
}

.mini-card .card-divider-left {
  margin: 3px 0;
}

.bottom-nav {
  background: var(--bg);
  bottom: 0;
  display: flex;
  gap: 12px;
  left: 0;
  padding: 12px 16px;
  position: fixed;
  right: 0;
  z-index: 50;
}

.bottom-nav-btn {
  align-items: center;
  background: var(--purple);
  border: none;
  border-radius: 16px;
  color: #fff;
  display: flex;
  flex: 1;
  flex-direction: column;
  font-size: 15px;
  font-weight: 700;
  gap: 8px;
  padding: 18px 12px;
  transition: filter 0.18s, transform 0.12s;
}

.bottom-nav-btn svg {
  height: 28px;
  width: 28px;
}

#screen-admin-calendar {
  height: calc(100vh - 48px);
  overflow: hidden;
}

.admin-wrap {
  display: flex;
  gap: 10px;
  height: 100%;
  overflow: hidden;
  padding: 12px;
}

.columns-area {
  display: flex;
  flex: 1;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
}

.time-col {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  max-width: 300px;
  min-width: 180px;
}

.col-header {
  border-radius: 20px;
  flex-shrink: 0;
  padding: 10px 12px 12px;
  text-align: center;
}

.col-header .ch-time {
  color: #1a1a1a;
  font-size: clamp(14px, 2vw, 22px);
  font-weight: 800;
}

.drop-zone {
  background: var(--gray-card);
  border-radius: 20px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
  overflow-y: auto;
  padding: 8px;
  transition: background 0.2s, outline 0.2s;
}

.drop-zone.drag-over {
  background: rgba(139, 92, 246, 0.12);
  outline: 2px dashed var(--purple);
}

.admin-card {
  position: relative;
  background: #fff;
  border-radius: 14px;
  cursor: grab;
  flex-shrink: 0;
  padding: 10px 12px;
  transition: box-shadow 0.2s, transform 0.15s;
  user-select: none;
}

.admin-card:hover,
.preview-card:hover,
.account-card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

.admin-card.is-dragging {
  opacity: 0.4;
}

.card-delete-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  padding: 5px;
}

.card-delete-btn svg {
  width: 100%;
  height: 100%;
}

.admin-card:hover .card-delete-btn {
  opacity: 1;
}

.card-delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

.admin-card .card-title {
  font-size: 16px;
  padding-right: 0;
}

.admin-card .card-divider-left {
  margin: 4px 0;
  width: 70%;
}

.admin-card .tag {
  font-size: 11px;
  padding: 1px 7px;
}

.drag-ghost {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  opacity: 0.92;
  padding: 10px 12px;
  pointer-events: none;
  position: fixed;
  transform: rotate(2deg) scale(1.02);
  z-index: 9999;
}

.sidebar {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 8px;
  height: 100%;
  overflow-y: auto;
  width: 300px;
}

.preview-panel,
.builder-panel {
  background: var(--gray-card);
  border-radius: 20px;
  padding: 8px;
  transition: outline 0.1s;
}

.preview-panel.drag-over {
  outline: 2px dashed var(--purple);
}

.preview-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.preview-hint {
  color: #666;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  max-width: 180px;
}

.clear-btn {
  background: rgba(206, 0, 0, 0.5);
  border: 1px solid #c40000;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 12px;
  transition: filter 0.15s;
}

.preview-card {
  background: #fff;
  border-radius: 14px;
  cursor: grab;
  min-height: 70px;
  padding: 10px 12px;
  transition: box-shadow 0.2s;
}

.preview-title-input {
  background: transparent;
  border: none;
  color: var(--red);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
  outline: none;
  width: 100%;
}

.preview-title-input::placeholder {
  color: rgba(255, 82, 82, 0.35);
}

.preview-tags-wrap {
  display: block;
}

.preview-empty-hint {
  color: #bbb;
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}

.builder-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.builder-section {
  border-radius: 14px;
  padding: 10px 12px 12px;
}

.bs-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.bs-title {
  color: var(--gray-text);
  font-size: 17px;
  font-weight: 800;
}

.bs-add {
  align-items: center;
  background: none;
  border: 1.5px solid var(--gray-pill-border);
  border-radius: 8px;
  color: var(--gray-text);
  display: flex;
  font-size: 18px;
  height: 26px;
  justify-content: center;
  transition: all 0.18s;
  width: 26px;
}

.bs-add:hover {
  background: var(--purple-light);
  border-color: var(--purple-border);
  color: var(--purple-text);
}

.bs-divider {
  background: linear-gradient(to right, #d0d0d0 45%, transparent);
  height: 1.5px;
  margin: 6px 0 8px;
}

.bs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.builder-tag {
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  padding: 3px 11px;
  transition: filter 0.15s, transform 0.1s, outline 0.1s;
}

.builder-tag:hover {
  filter: brightness(0.93);
}

.builder-tag:active {
  transform: scale(0.95);
}

.builder-tag.selected {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
}

.geschiedenis-wrap {
  padding: 16px;
}

.datum-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.datum-chip {
  background: var(--gray-card);
  border: 1.5px solid transparent;
  border-radius: 999px;
  color: var(--gray-text);
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  transition: all 0.18s;
  white-space: nowrap;
}

.datum-chip:hover {
  filter: brightness(0.96);
}

.datum-chip.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.datum-chip.today-chip {
  border-color: var(--purple-border);
}

.gesch-day-title {
  color: #1a1a1a;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
}

.gesch-slots {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gesch-slot-label {
  color: #9c9c9c;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  padding-left: 4px;
}

.accounts-wrap {
  display: grid;
  gap: 16px;
  grid-template-columns: 320px 1fr;
  min-height: calc(100vh - 64px);
  padding: 16px;
}

.accounts-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accounts-search-wrap {
  position: relative;
}

.accounts-search {
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px 10px 38px;
}

.accounts-search-icon {
  color: #9c9c9c;
  height: 16px;
  left: 12px;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
}

.role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-chip {
  background: transparent;
  border: 1.5px solid var(--gray-pill-border);
  border-radius: 999px;
  color: var(--gray-text);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  transition: all 0.18s;
}

.role-chip.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.new-account-btn {
  background: var(--purple);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  transition: filter 0.18s;
  width: 100%;
}

.accounts-grid {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.account-card {
  align-items: center;
  border: 2px solid transparent;
  border-radius: 16px;
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  transition: box-shadow 0.18s, border-color 0.18s;
}

.account-card.selected {
  border-color: var(--purple);
}

.account-avatar {
  flex-shrink: 0;
  font-size: 15px;
  height: 42px;
  width: 42px;
}

.account-info {
  flex: 1;
  min-width: 0;
}

.account-name {
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 800;
}

.account-role-tag {
  font-size: 12px;
  font-weight: 600;
  margin-top: 3px;
  padding: 2px 10px;
}

.account-status {
  border-radius: 50%;
  flex-shrink: 0;
  height: 10px;
  width: 10px;
}

.account-status.active {
  background: var(--green-text);
}

.account-status.inactive {
  background: var(--gray-pill-border);
}

.account-actions {
  display: flex;
  gap: 6px;
}

.acc-btn {
  align-items: center;
  background: transparent;
  border: 1.5px solid var(--gray-pill-border);
  border-radius: 8px;
  color: var(--gray-text);
  display: flex;
  height: 30px;
  justify-content: center;
  transition: all 0.15s;
  width: 30px;
}

.acc-btn:hover {
  background: var(--gray-pill);
}

.acc-btn.delete:hover,
.detail-delete-btn:hover {
  background: rgba(206, 0, 0, 0.18);
  border-color: #c40000;
  color: #c40000;
}

.acc-btn svg {
  height: 14px;
  width: 14px;
}

.account-detail {
  align-self: start;
  border-radius: 20px;
  padding: 24px;
}

.detail-avatar {
  border-width: 3px;
  font-size: 26px;
  height: 72px;
  margin: 0 auto 16px;
  width: 72px;
}

.detail-name {
  color: #1a1a1a;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
  text-align: center;
}

.detail-role {
  margin-bottom: 20px;
  text-align: center;
}

.detail-divider {
  background: #eee;
  height: 1.5px;
  margin: 16px 0;
}

.detail-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.detail-label {
  color: #9c9c9c;
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.detail-value {
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 700;
}

.detail-status-toggle {
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 16px;
  transition: filter 0.15s;
}

.detail-status-toggle.active {
  background: var(--green-pill);
  color: var(--green-text);
}

.detail-status-toggle.inactive {
  background: var(--gray-pill);
  color: var(--gray-text);
}

.detail-input {
  background: #f2f2f7;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  color: #1a1a1a;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 9px 12px;
  width: 100%;
}

.detail-input:focus {
  border-color: #8b5cf6;
  outline: none;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.detail-save-btn {
  background: #8b5cf6;
  border: none;
  border-radius: 999px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px;
  transition: filter 0.15s;
  width: 100%;
}

.detail-save-btn:hover {
  filter: brightness(1.1);
}

.detail-delete-btn {
  background: rgba(206, 0, 0, 0.12);
  border: 1.5px solid rgba(206, 0, 0, 0.3);
  border-radius: 999px;
  color: #c40000;
  font-size: 14px;
  font-weight: 700;
  padding: 10px;
  transition: all 0.15s;
  width: 100%;
}

::-webkit-scrollbar {
  height: 4px;
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

@keyframes fade-card {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 900px) {
  .dashboard-top {
    grid-template-columns: 1fr 1fr;
  }

  .afmeldingen-panel {
    grid-column: 1 / -1;
  }

  .dashboard-calendar {
    grid-template-columns: 1fr;
  }

  .accounts-wrap {
    grid-template-columns: 1fr;
  }

  .account-detail {
    display: none;
  }

  .account-detail.visible {
    display: block;
  }
}

@media (max-width: 700px) {
  .bottom-nav-btn {
    font-size: 12px;
    gap: 5px;
    padding: 12px 8px;
  }

  .bottom-nav-btn svg {
    height: 22px;
    width: 22px;
  }
}

@media (max-width: 640px) {
  .nav-user span {
    display: none;
  }

  .stat-card {
    min-width: 0;
    padding: 16px 14px;
  }

  .stat-number {
    font-size: 44px;
  }

  #screen-admin-calendar {
    height: auto;
    overflow: visible;
  }

  .admin-wrap {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    height: auto;
    width: 100%;
  }

  .dashboard-top {
    grid-template-columns: 1fr 1fr;
  }

  .afmeldingen-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 28px 22px;
  }

  .dashboard-top {
    grid-template-columns: 1fr;
  }

  .time-tabs {
    gap: 6px;
  }

  .time-tab .t-times {
    font-size: 11px;
  }

  .accounts-wrap,
  .geschiedenis-wrap {
    padding: 12px;
  }

  .dashboard-wrap {
    padding: 12px 12px 80px;
  }

  .home-wrap {
    padding: 12px 12px 96px;
  }
}

@media (min-width: 768px) {
  .home-wrap {
    max-width: none;
    padding: 24px 24px 100px;
  }

  .home-tab-view {
    display: none;
  }

  .home-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
  }
}

/* ── Mobile calendar tabs ─────────────────────── */
.cal-mobile-tabs {
  display: none;
}

.cal-tab {
  background: var(--gray-card);
  border: 1.5px solid transparent;
  border-radius: 999px;
  color: var(--gray-text);
  cursor: pointer;
  flex: 1;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 4px;
  text-align: center;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  white-space: nowrap;
}

.cal-tab.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

@media (max-width: 640px) {
  .cal-mobile-tabs {
    display: flex;
    flex-shrink: 0;
    gap: 4px;
    margin-bottom: 8px;
  }

  .columns-area {
    overflow-x: visible;
  }

  .time-col {
    display: none;
    min-width: 0;
    width: 100%;
  }

  .time-col.mobile-active {
    display: flex;
  }
}
