/*
 * Frontend "M365 Dashboard" — app-shell met zijbalk, topbar en kaarten.
 * Stijl geïnspireerd op Metronic/shadcn-achtige admin-UI's.
 *
 * Alles gescoped onder .ictp-dashboard zodat het thema niet beïnvloed wordt.
 * Bevat ook shims voor WordPress-admin-classes (button, widefat, notice, …).
 */

/* Full-screen sjabloon: kale body, app-shell zweeft op een lichte achtergrond. */
body.ictp-fullscreen { margin: 0; background: #eef1f5; }
body.ictp-fullscreen .ictp-dashboard { padding: 0 16px; }

.ictp-dashboard {
	--ictp-accent: #3581ca;
	--ictp-accent-dark: #2a6aa8;
	--ictp-accent-soft: rgba( 53, 129, 202, 0.12 );
	--ictp-card: #ffffff;
	--ictp-page: #fafbfc;
	--ictp-border: #e6e8ec;
	--ictp-text: #1f2933;
	--ictp-muted: #6b7280;
	--ictp-radius: 12px;
	--ictp-shadow: 0 1px 3px rgba( 16, 24, 40, 0.06 ), 0 1px 2px rgba( 16, 24, 40, 0.04 );

	max-width: 1280px;
	margin: 24px auto;
	color: var( --ictp-text );
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.55;
}

.ictp-dashboard .ictp-icon { display: block; }

/* App-shell -------------------------------------------------------------- */
.ictp-app {
	display: flex;
	align-items: stretch;
	background: var( --ictp-card );
	border: 1px solid var( --ictp-border );
	border-radius: 14px;
	overflow: hidden;
	box-shadow: var( --ictp-shadow );
	min-height: 620px;
}

/* Zijbalk ---------------------------------------------------------------- */
.ictp-sidebar {
	width: 248px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	padding: 16px 14px;
	background: var( --ictp-card );
	border-right: 1px solid var( --ictp-border );
}
.ictp-brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	padding: 6px 10px 16px;
	font-weight: 700;
	font-size: 15px;
}
.ictp-brand-mark { color: var( --ictp-accent ); display: flex; }
.ictp-brand-logo { max-height: 34px; max-width: 150px; width: auto; height: auto; }
/* Hamburger-knop: enkel zichtbaar op mobiel (zie media-query). */
.ictp-nav-toggle { display: none; background: none; border: none; cursor: pointer; color: var( --ictp-accent ); padding: 8px; border-radius: 8px; line-height: 0; }
.ictp-nav-toggle:hover { background: var( --ictp-accent-soft ); }
.ictp-nav-toggle .ictp-icon { width: 26px; height: 26px; }
/* Menutitel "ICT-portaal": enkel zichtbaar in het opengeklapte mobiele menu. */
.ictp-nav-title { display: none; font-weight: 700; font-size: 15px; color: var( --ictp-text ); padding: 4px 6px 8px; }
.ictp-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ictp-nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border-radius: 8px;
	color: var( --ictp-muted );
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}
.ictp-nav-item:hover { background: #f3f5f8; color: var( --ictp-text ); }
.ictp-nav-item.is-active { background: var( --ictp-accent-soft ); color: var( --ictp-accent ); }
.ictp-nav-item .ictp-icon { width: 18px; height: 18px; }

.ictp-sidebar-foot {
	margin-top: 12px;
	padding-top: 14px;
	border-top: 1px solid var( --ictp-border );
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 13px;
}
.ictp-sidebar-user { font-weight: 600; color: var( --ictp-text ); }
.ictp-logout { color: var( --ictp-accent ); text-decoration: none; }
.ictp-logout:hover { text-decoration: underline; }

/* Hoofdkolom ------------------------------------------------------------- */
.ictp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var( --ictp-page ); }
.ictp-topbar {
	padding: 12px 24px;
	background: var( --ictp-card );
	border-bottom: 1px solid var( --ictp-border );
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	min-height: 56px;
}
.ictp-page-title { margin: 0; font-size: 20px; font-weight: 700; color: var( --ictp-text ); }

/* Topbar-rechts: hierin verhuist de school-keuze van een module (frontend-shell.js).
   Hogere specificiteit (.ictp-dashboard) zodat de kaart-stijl wordt overschreven:
   géén kader/achtergrond/padding meer in de topbar. */
.ictp-topbar-right { margin-left: auto; display: flex; align-items: center; }
.ictp-dashboard .ictp-topbar-right .ictp-schoolbar {
	margin: 0; padding: 0; background: none; border: none; box-shadow: none; border-radius: 0;
	display: flex; align-items: center; gap: 8px;
}
.ictp-dashboard .ictp-topbar-right .ictp-schoolbar label { margin: 0; font-size: 13px; white-space: nowrap; }
.ictp-dashboard .ictp-topbar-right .ictp-schoolbar .ictp-wide-select { max-width: 280px; width: auto; }
.ictp-dashboard .ictp-topbar-right .ictp-schoolbar .ictp-spinner { display: none; }

/* Inklapbare menugroepen -------------------------------------------------
   Elke groep is een <details name="ictp-nav-group">: de browser houdt er dan
   hoogstens één open (accordeon) zonder JavaScript. De kop is de <summary>. */
.ictp-nav-group { margin-top: 6px; }
.ictp-nav-group-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var( --ictp-muted );
	padding: 7px 12px;
	border-radius: 8px;
	cursor: pointer;
	list-style: none; /* Verbergt het standaard driehoekje. */
}
.ictp-nav-group-label::-webkit-details-marker { display: none; }
.ictp-nav-group-label::marker { content: ""; }
.ictp-nav-group-label:hover { background: #f3f5f8; color: var( --ictp-text ); }
.ictp-nav-group-label:focus-visible { outline: 2px solid var( --ictp-accent ); outline-offset: 1px; }
/* Chevron: wijst naar rechts als de groep dicht is, naar onder als ze open staat. */
.ictp-nav-group-label .ictp-icon {
	width: 13px;
	height: 13px;
	margin-left: auto;
	color: #9aa3ae;
	transition: transform 0.18s ease;
}
.ictp-nav-group[open] > .ictp-nav-group-label .ictp-icon { transform: rotate( 90deg ); }
.ictp-nav-group-items { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }

/* Menu-items onder de groepen (Rapporten): losgemaakt met een fijne lijn. */
.ictp-nav-bottom {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid var( --ictp-border );
}

@media ( prefers-reduced-motion: reduce ) {
	.ictp-nav-group-label .ictp-icon { transition: none; }
}
.ictp-content { padding: 24px; flex: 1; }

/* Kaarten ---------------------------------------------------------------- */
.ictp-dashboard .ictp-card {
	background: var( --ictp-card );
	border: 1px solid var( --ictp-border );
	border-radius: var( --ictp-radius );
	box-shadow: var( --ictp-shadow );
	padding: 20px 24px;
	margin: 0 0 20px;
	max-width: none;
}
.ictp-content h1 {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 16px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}
.ictp-content h1 .ictp-header-action { margin-left: auto; }
.ictp-content h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.ictp-content > .wrap { margin: 0; }

/* Statistiek-tegels ------------------------------------------------------ */
.ictp-stats {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 230px, 1fr ) );
	grid-auto-rows: 1fr; /* alle rijen even hoog → alle tegels even groot */
	gap: 16px;
	margin-bottom: 20px;
}
.ictp-stat {
	display: flex;
	align-items: center;
	gap: 14px;
	box-sizing: border-box;
	min-height: 92px;
	padding: 18px 20px;
	background: var( --ictp-card );
	border: 1px solid var( --ictp-border );
	border-radius: var( --ictp-radius );
	box-shadow: var( --ictp-shadow );
	text-decoration: none;
	color: var( --ictp-text );
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
a.ictp-stat:hover {
	border-color: var( --ictp-accent );
	box-shadow: 0 4px 14px rgba( 53, 129, 202, 0.18 );
	transform: translateY( -1px );
}
.ictp-stat-icon {
	width: 46px;
	height: 46px;
	flex-shrink: 0;
	display: grid;
	place-items: center;
	border-radius: 10px;
	background: var( --ictp-accent-soft );
	color: var( --ictp-accent );
}
.ictp-stat-icon .ictp-icon { width: 22px; height: 22px; }
.ictp-stat-body { display: flex; flex-direction: column; }
.ictp-stat-value { font-size: 26px; font-weight: 700; line-height: 1.1; }
.ictp-stat-value.ictp-stat-loading { color: var( --ictp-muted ); animation: ictp-pulse 1.1s ease-in-out infinite; }
@keyframes ictp-pulse { 50% { opacity: 0.4; } }
.ictp-stat-label { font-size: 13px; color: var( --ictp-muted ); }

/* Login ------------------------------------------------------------------ */
.ictp-login {
	max-width: 400px;
	margin: 40px auto;
	background: var( --ictp-card );
	border: 1px solid var( --ictp-border );
	border-radius: var( --ictp-radius );
	box-shadow: var( --ictp-shadow );
	padding: 32px 32px 28px;
}
.ictp-login-logo { text-align: center; margin-bottom: 18px; }
.ictp-login-logo img { max-height: 72px; max-width: 100%; width: auto; height: auto; }
.ictp-login h2 { margin-top: 0; font-size: 20px; text-align: center; color: var( --ictp-accent ); }
.ictp-login > p.description { text-align: center; margin-bottom: 22px; }
.ictp-login p { margin: 0 0 16px; }
.ictp-login label { display: block; margin-bottom: 6px; font-weight: 600; }
.ictp-login .regular-text { width: 100%; }
.ictp-login-remember label { font-weight: 400; color: var( --ictp-muted ); }
.ictp-login .button-primary { width: 100%; padding: 11px; font-size: 15px; }
.ictp-login .ictp-sso { margin-bottom: 18px; }
.ictp-login .ictp-sso-button { width: 100%; padding: 12px; font-size: 15px; text-align: center; }
.ictp-login-divider { display: flex; align-items: center; text-align: center; color: var( --ictp-muted ); font-size: 12px; margin: 18px 0; }
.ictp-login-divider::before,
.ictp-login-divider::after { content: ""; flex: 1; border-bottom: 1px solid var( --ictp-border ); }
.ictp-login-divider span { padding: 0 12px; }

/* Knoppen ---------------------------------------------------------------- */
.ictp-dashboard .button {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var( --ictp-border );
	border-radius: 8px;
	background: var( --ictp-card );
	color: var( --ictp-text );
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	text-decoration: none;
	vertical-align: middle;
	transition: all 0.15s ease;
}
.ictp-dashboard .button:hover { border-color: var( --ictp-accent ); color: var( --ictp-accent ); }
.ictp-dashboard .button-primary {
	background: var( --ictp-accent );
	border-color: var( --ictp-accent );
	color: #fff;
	box-shadow: 0 2px 6px rgba( 53, 129, 202, 0.3 );
}
.ictp-dashboard .button-primary:hover { background: var( --ictp-accent-dark ); border-color: var( --ictp-accent-dark ); color: #fff; }
.ictp-dashboard .button-link-delete { background: none; border-color: transparent; color: #d63638; box-shadow: none; }
.ictp-dashboard .button-link-delete:hover { background: #fdeced; border-color: transparent; color: #b32d2e; }
.ictp-dashboard .button-link-add { background: none; border-color: transparent; color: var( --ictp-accent ); box-shadow: none; }
.ictp-dashboard .button-link-add:hover { background: var( --ictp-accent-soft ); border-color: transparent; color: var( --ictp-accent-dark ); }
.ictp-dashboard .page-title-action {
	font-size: 12px;
	font-weight: 600;
	padding: 6px 14px;
	border-radius: 999px;
	border-color: var( --ictp-accent );
	color: var( --ictp-accent );
}
.ictp-dashboard .page-title-action:hover { background: var( --ictp-accent ); color: #fff; }

/* Formuliervelden -------------------------------------------------------- */
.ictp-dashboard input[type="text"],
.ictp-dashboard input[type="password"],
.ictp-dashboard input[type="search"],
.ictp-dashboard select,
.ictp-dashboard textarea {
	padding: 9px 12px;
	border: 1px solid #cfd3da;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
	color: var( --ictp-text );
	max-width: 100%;        /* nooit breder dan de container (mobiel) */
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
/* Lange opties (mailgroepen) niet de selectbreedte laten opblazen. */
.ictp-dashboard select { text-overflow: ellipsis; }
/* Keuzelijsten (groep/Team/school) krijgen een nette, begrensde breedte i.p.v.
   mee te groeien met de langste optie. */
.ictp-dashboard .ictp-wide-select { width: 100%; max-width: 460px; }
.ictp-dashboard input:focus,
.ictp-dashboard select:focus,
.ictp-dashboard textarea:focus {
	outline: none;
	border-color: var( --ictp-accent );
	box-shadow: 0 0 0 3px rgba( 53, 129, 202, 0.15 );
}
.ictp-dashboard .regular-text { width: 25em; max-width: 100%; }
.ictp-dashboard .large-text { width: 100%; }
.ictp-dashboard .description { color: var( --ictp-muted ); font-size: 13px; }
.ictp-dashboard label[for="ictpmod-group"] { display: inline-block; margin-right: 10px; }

/* Tabellen --------------------------------------------------------------- */
.ictp-dashboard .widefat {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var( --ictp-border );
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}
.ictp-dashboard .widefat th {
	padding: 11px 14px;
	background: #f8f9fb;
	color: var( --ictp-muted );
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	text-align: left;
	border-bottom: 1px solid var( --ictp-border );
}
.ictp-dashboard .widefat td {
	padding: 11px 14px;
	border-bottom: 1px solid #f0f1f4;
	text-align: left;
	vertical-align: middle;
}
.ictp-dashboard .widefat th,
.ictp-dashboard .widefat td { border-left: 0; border-right: 0; }
.ictp-dashboard .widefat tbody tr:last-child td { border-bottom: none; }
.ictp-dashboard .widefat tbody tr:hover { background: #f8fbff; }

/* Twee kolommen + ledenlijst --------------------------------------------- */
.ictp-dashboard .ictp-two-col { display: flex; gap: 28px; flex-wrap: wrap; }
.ictp-dashboard .ictp-two-col > div { flex: 1 1 320px; }
.ictp-dashboard .ictp-member-list { max-height: 440px; overflow-y: auto; overflow-x: auto; }
/* Brede tabellen scrollen horizontaal binnen hun kader i.p.v. de pagina te breken. */
.ictp-dashboard #ictpusr-list,
#ictpdash-modal-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Rol-badge (eigenaar/lid) ----------------------------------------------- */
.ictp-dashboard .ictp-role {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 1px 8px;
	border-radius: 10px;
	background: #eef0f3;
	color: var( --ictp-muted );
	vertical-align: middle;
}
.ictp-dashboard .ictp-role-owner { background: #fff3cd; color: #664d03; }
.ictp-dashboard .ictp-role-on { background: #d1e7dd; color: #0f5132; }
.ictp-dashboard .ictp-role-off { background: #f8d7da; color: #842029; }
.ictp-dashboard .ictpmod-groupbadge { background: #cfe2ff; color: #084298; }

/* Ledenkop met "+ Lid toevoegen" */
.ictp-dashboard .ictp-members-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ictp-dashboard .ictp-members-head h2 { margin: 0; }
.ictp-dashboard .ictp-members-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ictp-dashboard .ictp-members-actions .button[disabled] { opacity: .55; cursor: not-allowed; }
.ictp-dashboard .ictp-add-plus { font-weight: 700; font-size: 16px; line-height: 1; }
#ictpmod-members .check-column { width: 2.5em; text-align: center; vertical-align: middle; }

/* Modal (lid toevoegen) */
.ictp-modal { position: fixed; inset: 0; z-index: 100000; }
.ictp-modal-backdrop { position: absolute; inset: 0; background: rgba( 16, 24, 40, 0.55 ); }
.ictp-modal-box {
	position: relative;
	width: 520px;
	max-width: 92vw;
	margin: 8vh auto 0;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba( 16, 24, 40, 0.35 );
	padding: 20px 24px;
	max-height: 80vh;
	overflow: auto;
}
.ictp-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ictp-modal-head h2 { margin: 0; font-size: 17px; }
.ictp-modal-close { background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: var( --ictp-muted ); padding: 0 4px; }
.ictp-modal-close:hover { color: var( --ictp-text ); }
.ictp-modal-box .ictpusr-pw { font-size: 14px; font-weight: 600; }
.ictp-modal-foot { margin-top: 16px; display: flex; gap: 8px; justify-content: flex-end; }

/* Bulkknoppen in de werkbalk zijn uit tot er iets aangevinkt is. (De oude
   .ictpusr-toolbar/.ictpusr-bulk-actions zijn met core 0.10.9 vervangen door de
   gedeelde .ictp-toolbar.) */
.ictp-toolbar .button[disabled] { opacity: .55; cursor: not-allowed; }

/* Klikbare statistiektegel (opent een popup) */
.ictp-stat-action { cursor: pointer; }
.ictp-stat-action:hover { box-shadow: 0 4px 16px rgba( 16, 24, 40, 0.12 ); }
#ictpdash-modal .check-column { width: 2.5em; text-align: center; vertical-align: middle; }
/* Modal: head + footer vast, enkel de lijst scrollt (bulk-knop altijd zichtbaar). */
#ictpdash-modal .ictp-modal-box {
	width: 720px;
	display: flex;
	flex-direction: column;
	max-height: 85vh;
	overflow: hidden;
}
#ictpdash-modal .ictp-modal-head,
#ictpdash-modal #ictpdash-modal-notice { flex: 0 0 auto; }
#ictpdash-modal-body { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; }
#ictpdash-modal-foot {
	flex: 0 0 auto;
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	align-items: center;
	flex-wrap: wrap;
	border-top: 1px solid var( --ictp-border );
	margin-top: 12px;
	padding-top: 12px;
}
#ictpdash-bulk-disable[disabled] { opacity: .55; cursor: not-allowed; }
tr.ictpdash-failed,
.ictpdash-item.ictpdash-failed { background: #fbeaea !important; }

/* Inactieve-accounts-popup: lijst van kaarten (naam boven, meta + actie eronder). */
.ictpdash-selectall { padding: 4px 2px 10px; font-size: 13px; }
.ictpdash-selectall input { vertical-align: middle; margin-right: 6px; }
.ictpdash-list { border: 1px solid var( --ictp-border ); border-radius: 10px; overflow: hidden; background: #fff; }
.ictpdash-item { padding: 12px 14px; border-bottom: 1px solid #f0f1f4; }
.ictpdash-item:last-child { border-bottom: none; }
.ictpdash-item:hover { background: #f8fbff; }
.ictpdash-item-head { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; margin: 0; }
.ictpdash-item-head input { margin-top: 3px; flex: 0 0 auto; }
.ictpdash-item-info { display: flex; flex-direction: column; }
.ictpdash-item-info .description { color: var( --ictp-muted ); font-size: 12px; }
.ictpdash-item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; padding-left: 28px; }
.ictpdash-meta-text { color: var( --ictp-muted ); font-size: 12px; }
.ictpdash-item-actions { margin-left: auto; }
#ictpusr-list .check-column { width: 2.5em; text-align: center; vertical-align: middle; }

/* Actiekolom (laatste cel met knoppen): mag afbreken zodat knoppen nooit buiten
   beeld vallen i.p.v. de tabel horizontaal te laten overlopen. */
#ictpdash-modal-body .widefat td:last-child,
.ictp-dashboard #ictpusr-list .widefat td:last-child,
.ictp-dashboard .ictp-member-list .widefat td:last-child,
.ictp-dashboard #ictpcmp-list .widefat td:last-child { white-space: normal !important; }
#ictpdash-modal-body .widefat td:last-child .button,
.ictp-dashboard #ictpusr-list .widefat td:last-child .button,
.ictp-dashboard .ictp-member-list .widefat td:last-child .button,
.ictp-dashboard #ictpcmp-list .widefat td:last-child .button { margin: 2px 0 2px 6px; }

/* Selectielijst in de "lid toevoegen"-modal */
.ictp-dashboard .ictpmod-staged-wrap,
.ictp-modal .ictpmod-staged-wrap { margin-top: 14px; border-top: 1px solid var( --ictp-border, #e6e8ec ); padding-top: 12px; }
.ictpmod-staged-title { font-size: 13px; margin: 0 0 8px; }
.ictpmod-staged { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.ictpmod-staged li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; background: #f4f6f9; border-radius: 6px; }
.ictpmod-staged li.ictpmod-empty { background: none; padding: 0; }
.ictpmod-unstage { border: none; background: none; color: #d63638; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.ictpmod-unstage:hover { color: #8a1f21; }

/* Modulelijst (fallback) ------------------------------------------------- */
.ictp-dashboard .ictp-modules { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.ictp-dashboard .ictp-modules li { margin: 0; }
.ictp-dashboard .ictp-modules a {
	display: block;
	padding: 14px 20px;
	background: #f8fbff;
	border: 1px solid var( --ictp-border );
	border-radius: 10px;
	font-weight: 600;
	text-decoration: none;
}
.ictp-dashboard .ictp-modules a:hover { border-color: var( --ictp-accent ); }

/* Notices ---------------------------------------------------------------- */
.ictp-dashboard .notice {
	background: #fff;
	border: 1px solid var( --ictp-border );
	border-left: 4px solid #72aee6;
	border-radius: 8px;
	padding: 10px 14px;
	margin: 12px 0;
}
.ictp-dashboard .notice p { margin: 0.3em 0; }
.ictp-dashboard .notice-success { border-left-color: #00a32a; background: #f3fbf4; }
.ictp-dashboard .notice-error { border-left-color: #d63638; background: #fdf3f3; }
.ictp-dashboard .notice-warning { border-left-color: #dba617; background: #fffaf0; }

/* Spinner ---------------------------------------------------------------- */
.ictp-dashboard .spinner { display: none; }
.ictp-dashboard .spinner.is-active {
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: 8px;
	vertical-align: middle;
	border: 2px solid var( --ictp-border );
	border-top-color: var( --ictp-accent );
	border-radius: 50%;
	animation: ictp-spin 0.7s linear infinite;
}
@keyframes ictp-spin { to { transform: rotate( 360deg ); } }

/* Responsief ------------------------------------------------------------- */
@media ( max-width: 880px ) {
	/* overflow:visible zodat het opengeklapte menu niet afgeknapt wordt (iPhone). */
	.ictp-app { flex-direction: column; min-height: 0; overflow: visible; border-radius: 0; }
	.ictp-sidebar { width: auto; border-right: none; border-bottom: 1px solid var( --ictp-border ); }
	/* Kop: enkel logo links + hamburger rechts. "ICT-portaal" verhuist naar het menu. */
	.ictp-sidebar-head { display: flex; align-items: center; justify-content: space-between; }
	.ictp-brand { flex-direction: column; align-items: flex-start; }
	.ictp-brand-text { display: none; }
	.ictp-nav-title { display: block; }
	.ictp-nav-toggle { display: inline-flex; align-items: center; }

	/* Menu inklapbaar: verborgen tot de hamburger het opent. */
	.ictp-nav { display: none; flex-direction: column; flex-wrap: nowrap; width: 100%; gap: 2px; }
	.ictp-sidebar.is-open .ictp-nav { display: flex; }
	.ictp-nav-item { flex: 0 0 auto; }
	/* Mobiel (in het opengeklapte hamburgermenu): de kop over de volle breedte en
	   iets ruimer aantikbaar. */
	.ictp-nav-group { width: 100%; margin-top: 4px; }
	.ictp-nav-group-label { width: 100%; padding: 11px 8px; }
	.ictp-nav-bottom { margin-top: 8px; }

	/* Footer gecentreerd. */
	.ictp-sidebar-foot { flex-direction: row; justify-content: center; align-items: center; gap: 18px; }
	/* Voet-blok dat door frontend-shell.js naar de paginabodem is verplaatst. */
	.ictp-app > .ictp-sidebar-foot { margin-top: 0; padding: 14px 16px; background: var( --ictp-card ); border-top: 1px solid var( --ictp-border ); }
}

/* Telefoon --------------------------------------------------------------- */
@media ( max-width: 600px ) {
	/* Geen kader-in-kader op een klein scherm: de app loopt van rand tot rand en de
	   kaarten worden secties met enkel een lijn boven en onder. Alles houdt links
	   16px, gelijk met de titel in de balk erboven. */
	body.ictp-fullscreen .ictp-dashboard { padding: 0; }
	.ictp-dashboard { margin: 0 auto; }
	.ictp-app { border-left: none; border-right: none; border-radius: 0; box-shadow: none; }

	/* Titel op één regel, de schoolkeuze daaronder over de volle breedte — anders
	   knijpt een lange schoolnaam de titel plat. */
	.ictp-topbar { padding: 14px 16px; gap: 10px; }
	.ictp-page-title { font-size: 18px; }
	.ictp-topbar-right { margin-left: 0; width: 100%; }
	.ictp-dashboard .ictp-topbar-right .ictp-schoolbar { width: 100%; }
	.ictp-dashboard .ictp-topbar-right .ictp-schoolbar .ictp-wide-select {
		flex: 1 1 auto;
		width: 100%;
		max-width: none;
	}
	/* De inhoud houdt 16px marge (voor wat niet in een kaart zit, zoals de
	   documentatie); de kaarten trekken die marge weg en worden secties met enkel
	   een lijn boven en onder — dus geen kader in een kader. */
	.ictp-content { padding: 12px 16px; }
	.ictp-dashboard .ictp-card {
		border-left: none;
		border-right: none;
		border-radius: 0;
		box-shadow: none;
		padding: 14px 16px;
		margin: 0 -16px 12px;
	}
	/* Eén verticale schuifbalk (die van de pagina) i.p.v. een lijst die binnen haar
	   eigen kader scrollt. */
	.ictp-dashboard .ictp-member-list,
	.ictp-dashboard #ictpusr-list { max-height: none; }

	/* Werkbalk: zoekveld op een eigen regel, en elke knoppengroep daaronder over de
	   volle breedte met gelijke knoppen — geen knoppen meer die halfweg de regel aan
	   elkaar plakken. */
	.ictp-toolbar { row-gap: 10px; }
	.ictp-toolbar > span { width: 100%; }
	.ictp-toolbar > span > .button,
	.ictp-toolbar > .button { flex: 1 1 auto; text-align: center; }
	.ictp-toolbar-right { margin-left: 0; }

	/* Eén tegel per rij, wat compacter. */
	.ictp-stats { grid-template-columns: 1fr; gap: 12px; }

	/* De keuzelijsten nemen op telefoon de volle breedte. */
	.ictp-dashboard .ictp-wide-select { max-width: 100%; }
	.ictp-dashboard .regular-text { width: 100%; }

	/* Werkbalk en knoppenrijen netjes onder elkaar. */
	.ictpusr-modal-foot,
	.ictp-modal-foot { flex-wrap: wrap; }

	/* Modals bijna schermvullend. */
	.ictp-modal-box,
	#ictpdash-modal .ictp-modal-box {
		width: 96vw;
		max-width: 96vw;
		margin-top: 4vh;
		max-height: 90vh;
		padding: 16px;
	}

	/* Titel + actieknop onder elkaar i.p.v. uitgelijnd. */
	.ictp-content h1 .ictp-header-action,
	.ictp-content h1 .page-title-action { margin-left: 0; }

	/* Actie-lijsten als gestapelde kaarten: kolomkoppen weg, elke cel onder
	   elkaar, knoppen onder de naam. Geldt voor de inactieve-accounts-popup,
	   Personeel/Leerlingen, Teams/Mailgroepen en Computers. */
	#ictpdash-modal-body .widefat thead,
	.ictp-dashboard #ictpusr-list .widefat thead,
	.ictp-dashboard .ictp-member-list .widefat thead,
	.ictp-dashboard #ictpcmp-list .widefat thead { display: none; }

	#ictpdash-modal-body .widefat tr,
	.ictp-dashboard #ictpusr-list .widefat tr,
	.ictp-dashboard .ictp-member-list .widefat tr,
	.ictp-dashboard #ictpcmp-list .widefat tr {
		display: block;
		position: relative;
		padding: 10px 34px 10px 12px;
		border-bottom: 1px solid #f0f1f4;
	}

	#ictpdash-modal-body .widefat td,
	.ictp-dashboard #ictpusr-list .widefat td,
	.ictp-dashboard .ictp-member-list .widefat td,
	.ictp-dashboard #ictpcmp-list .widefat td {
		display: block;
		border: none;
		padding: 2px 0;
		text-align: left !important;
		white-space: normal !important;
	}

	/* Elke cel toont waar ze over gaat ("Laatst gezien: 2020-09-02"); de eerste,
	   titelcel van de kaart krijgt geen label (zie ICTPList.labelCells). */
	#ictpdash-modal-body .widefat td[data-label]::before,
	.ictp-dashboard #ictpusr-list .widefat td[data-label]::before,
	.ictp-dashboard .ictp-member-list .widefat td[data-label]::before,
	.ictp-dashboard #ictpcmp-list .widefat td[data-label]::before {
		content: attr( data-label ) ": ";
		color: var( --ictp-muted );
	}

	/* Sorteren zonder kolomkoppen: de keuzelijst boven de kaartjes. */
	.ictp-sortbar { display: table-caption; }
	.ictp-sortbar > div {
		display: flex;
		align-items: center;
		gap: 8px;
		padding: 0 0 10px;
	}
	.ictp-sortbar label {
		display: flex;
		align-items: center;
		gap: 6px;
		flex: 1 1 auto;
		font-size: 12px;
		color: var( --ictp-muted );
	}
	.ictp-dashboard .ictp-sortbar select { flex: 1 1 auto; width: auto; max-width: none; }
	.ictp-sortbar .ictp-sortdir { flex: 0 0 auto; }

	/* Selectievakje rechtsboven in de kaart i.p.v. een eigen kolom. */
	#ictpdash-modal-body .widefat td.check-column,
	.ictp-dashboard #ictpusr-list .widefat td.check-column,
	.ictp-dashboard .ictp-member-list .widefat td.check-column,
	.ictp-dashboard #ictpcmp-list .widefat td.check-column,
	.ictp-dashboard #ictpcmp-list .widefat td.ictpcmp-pickcell {
		position: absolute;
		top: 10px;
		right: 6px;
		width: auto;
		padding: 0;
	}

	/* Knoppen onder de naam, wat groter aantikbaar. */
	#ictpdash-modal-body .widefat td:last-child .button,
	.ictp-dashboard #ictpusr-list .widefat td:last-child .button,
	.ictp-dashboard .ictp-member-list .widefat td:last-child .button,
	.ictp-dashboard #ictpcmp-list .widefat td:last-child .button {
		display: inline-block;
		margin: 6px 6px 0 0;
	}
}

/* Knoppen die in wp-admin in de <h1> staan; op het portaal staan ze los boven de
   inhoud, want de titel zelf staat al in de topbar. */
.ictp-content .ictp-pageactions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin: 0 0 14px;
}

/* Sorteerbare kolomkoppen (gedeeld door alle lijsten, zie assets/list-tools.js) */
.ictp-content .ictp-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.ictp-content .ictp-sort:hover { background: #eef2f7; }
.ictp-content .ictp-sort:focus-visible { outline: 2px solid var( --ictp-accent, #3581ca ); outline-offset: -2px; }
.ictp-sort-arrow { margin-left: 5px; font-size: 10px; color: var( --ictp-accent, #3581ca ); }

/* Sorteerkeuze in de <caption> van een lijst: alleen nodig op een klein scherm, waar
   de kolomkoprij verborgen is (zie de telefoon-regels onderaan). */
.ictp-sortbar { display: none; }

/* Werkbalk boven een lijst: zoekveld en filters links, acties rechts. */
.ictp-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
}
/* Knoppengroepen in de werkbalk (toestand-filters, soort-filters, acties): altijd
   flex met dezelfde tussenruimte, zodat de knoppen ook bij het afbreken naar een
   volgende regel niet aan elkaar plakken. */
.ictp-toolbar > span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ictp-toolbar-right { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
