/* Centrale stylesheet voor de eigen portalpagina's.
 * Externe bibliotheekstyles blijven afzonderlijk beheerd.
 */

@scope (body.portal-login-page) {
/* style.css */
/* 1. Het font correct inladen met de exacte bestandsnaam */
@font-face {
    font-family: 'Limelight';
    src: url('/fonts/Limelight-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* 1. De basistitel (dit zijn de kleine letters) */
.dra-titel {
    font-family: 'Limelight';
    /* Minimaal ~10.6px, schaalt met scherm, maximaal exact 13.33px */
    font-size: clamp(0.66rem, 2.5vw, 0.833rem); 
    font-weight: normal;
    letter-spacing: 1px;
    color: white;
}

/* 2. De hoofdletters (D, R, A) die in de span staan */
.dra-titel span {
    /* Maakt de hoofdletters exact 3 keer zo groot als de kleine letters */
    font-size: 300%; 
    /* Berekening maximum: 13.33px * 3 = exact 40px */
    vertical-align: baseline; 
}

.password-wrapper { position: relative; width: 100%; }
.password-wrapper .form-control { padding-right: 45px; }
.password-toggle { position: absolute; right: 12px; top: 55%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1.2rem; color: #64748b; padding: 0; }

html, body { height: 100%; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #f4f6f9; display: flex; flex-direction: column; align-items: center; box-sizing: border-box; }

.blueheader { 
	background-color: #026eb4; 
	padding: 0px;
	color: white; 
	text-align: center; 
	font-size: clamp(0.875rem, 2.5vw, 1.5rem);  
	width: 100%; 
	box-sizing: border-box; 

	height: auto
}
	


.container-main { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; padding: 20px; margin-top: auto; margin-bottom: auto; box-sizing: border-box; }

/* Service Desk Knop */
.menuItem { background: white; padding: 15px 20px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); display: flex; align-items: center; justify-content: space-between; font-weight: bold; color: #1e3a8a; font-size: clamp(1rem, 4vw, 1.4rem); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s; box-sizing: border-box; }
.menuItem:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); background-color: #f8fafc; }
.menuItem img { height: 28px; width: auto; object-fit: contain; }
.index-application { padding-top: 4px; padding-bottom: 4px; }
.index-application + .index-application { margin-top: -12px; }
.index-application-image { display: flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 6px; border-radius: 6px; box-sizing: border-box; }
 
/* Portaal Inlogvak */
.wrapper { width: 100%; background: white; padding: 40px 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); box-sizing: border-box; text-align: center; }
h1 { font-size: 1.5rem; color: #1f2937; margin-bottom: 10px; margin-top: 0; }
p { color: #4b5563; font-size: 0.95rem; margin-bottom: 25px; line-height: 1.5; }

/* Knoppen */
.btn-portal { display: block; background: #2563eb; color: white; padding: 14px 24px; border: none; border-radius: 6px; font-weight: bold; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background 0.2s; box-shadow: 0 2px 5px rgba(37, 99, 235, 0.2); width: 100%; box-sizing: border-box; }
.btn-portal:hover { background: #1d4ed8; }
.btn-login { background: #2563eb; color: white; padding: 12px; border: none; border-radius: 6px; font-weight: bold; font-size: 1rem; cursor: pointer; margin-top: 10px; width: 100%; transition: background 0.2s; }
.btn-login:hover { background: #1d4ed8; }

/* Pop-up (Modal) */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: white; width: 100%; max-width: 360px; padding: 30px; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.15); box-sizing: border-box; position: relative; text-align: left; }
@media (max-width: 600px) {
    .modal-content { width: calc(100% - 32px); }
}
.close-modal { position: absolute; top: 12px; right: 15px; padding: 0; border: 0; background: none; font-size: 1.5rem; color: #9ca3af; cursor: pointer; font-weight: bold; line-height: 1; }
.close-modal:hover { color: #4b5563; }
.modal-title { font-size: 1.2rem; font-weight: bold; color: #1e3a8a; margin-bottom: 20px; text-align: center; border-bottom: 2px solid #f3f4f6; padding-bottom: 10px; }

/* Formulier Velden */
.form-group { margin-bottom: 15px; display: flex; flex-direction: column; }
label { font-size: 0.9rem; font-weight: 600; color: #4b5563; margin-bottom: 5px; }
input { padding: 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 1rem; width: 100%; box-sizing: border-box; }

/* Wachtwoord Oogje */
.password-wrapper { position: relative; display: flex; align-items: center; }
.password-wrapper input { padding-right: 45px; }
.toggle-password { position: absolute; right: 12px; cursor: pointer; color: #6b7280; font-size: 0.75rem; user-select: none; padding: 4px; font-weight: bold; }
.toggle-password:hover { color: #111827; }

/* Alerts & Info */
.alert { padding: 12px; background: #fde8e8; color: #9b1c1c; border: 1px solid #f8b4b4; border-radius: 6px; margin-bottom: 15px; font-size: 0.9rem; }
.two-factor-setup-notice { padding: 12px; background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; border-radius: 6px; margin-bottom: 15px; font-size: 0.9rem; line-height: 1.45; }
.two-factor-setup-notice a { color: #1d4ed8; font-weight: 700; }
.otp-box { background: #f0fdf4; border: 1px solid #bbf7d0; padding: 15px; border-radius: 6px; margin-bottom: 15px; }
.trusted-device-option { display: inline-flex; flex-wrap: nowrap; gap: 8px; align-items: center; max-width: 100%; margin: 10px 0; font-size: clamp(0.78rem, 3.5vw, 0.9rem); white-space: nowrap; }
.trusted-device-option input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; padding: 0; }
.trusted-device-option span { display: inline-block; white-space: nowrap; }
.portal-version { position: fixed; right: 10px; bottom: 8px; color: #6b7280; font-size: 0.75rem; }
.emergency-link { display: block; width: 100%; margin-top: 15px; padding: 0; border: 0; background: none; cursor: pointer; text-align: center; font-size: 0.85rem; color: #2563eb; text-decoration: none; font-weight: 500; }
.emergency-link:hover { text-decoration: underline; }
.password-reset-card { max-width: 420px; text-align: left; }
.password-reset-card h1 { text-align: center; }
.reset-message { padding: 12px; background: #e1fbf1; color: #0d5c3a; border: 1px solid #a2f1cc; border-radius: 6px; margin-bottom: 15px; font-size: 0.9rem; }
.reset-back-link { display: block; margin-top: 20px; text-align: center; color: #2563eb; text-decoration: none; font-size: 0.9rem; }
.reset-back-link:hover { text-decoration: underline; }

/* Schermbevriezing overlay */
.freeze-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); display: none; flex-direction: column; align-items: center; justify-content: center; z-index: 2000; cursor: wait; }
.spinner { border: 4px solid #f3f4f6; border-top: 4px solid #2563eb; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin-bottom: 15px; }
.freeze-text { font-weight: 600; color: #1e3a8a; font-size: 1rem; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

}

@scope (body.portal-dashboard-page) {
@media screen and (max-device-width: 480px) {
	.formContent {
		text-align: center;
	}	
}

/* 1. Het font correct inladen met de exacte bestandsnaam */
@font-face {
    font-family: 'Limelight';
    src: url('/fonts/Limelight-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* 1. De basistitel (dit zijn de kleine letters) */
.dra-titel {
    font-family: 'Limelight';
    /* Minimaal ~10.6px, schaalt met scherm, maximaal exact 13.33px */
    font-size: clamp(0.66rem, 2.5vw, 0.833rem); 
    font-weight: normal;
    letter-spacing: 1px;
    color: white;
}

/* 2. De hoofdletters (D, R, A) die in de span staan */
.dra-titel span {
    /* Maakt de hoofdletters exact 3 keer zo groot als de kleine letters */
    font-size: 300%; 
    /* Berekening maximum: 13.33px * 3 = exact 40px */
    vertical-align: baseline; 
}


body { 
	margin: 0px; 
	padding: 0px;  
	background: #ffffff; 
	font-family: Verdana, Arial, Helvetica, sans-serif; 
	font-size: 11px;
}

* {
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

html { 
	width: 100%; 
	height: 100%; 
	margin: 0px;
	padding: 0px;
}
          
caption {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: bold;
}

p, table, text, tbody {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 11px;
}

.sidenav {
	height: 100%;
	width: 0;
	position: fixed;
	z-index: 100;
	top: 0;
	left: 0;
	background-color: white;
	overflow: hidden; 
	transition: 0.5s;
	border-right: solid 1px silver;
}

.sidenav a {
	padding: 5px 5px 5px 15px;
	text-decoration: none;
	font-size: 25px;
	color: #818181;
	display: block;
	transition: 0.3s;
}

.divMenuCellBlank  {
	padding: 9px 0px;
	width:250px;
	text-align: center;
	font-size: 20px;
	color: #818181;
}

.ui-datepicker td span, .ui-datepicker td a {
	display: block;
	padding: 8px;
	text-align: left;
	text-decoration: none;
	font-size:85%;
}

.sidenav a:hover, .offcanvas a:focus{
	color: #f1f1f1;
}

.sidenav .closebtn {
	position: absolute;
	top: 0;
	right: 25px;
	font-size: 30px;
	font-weight:bold;
	margin-left: 50px;
}	

.menuLogo	{
	text-align:center;
	width:250px;
	padding: 10px 0px;
}

.divLabel {
	color: #818181;
	font-size: 1.8em;
	padding:3px;
	text-align: left;
}

.localButton {
	background-color: #818181;
	border: none;
	color: white;
	padding: 15px 25px;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 16px;
	font-weight:bold;
	margin: 4px 2px;
	cursor: pointer;
}

.nextButton {
	color: white;
	font-size: 1.8em;
	font-weight:bold;
	padding: 5px 5px 5px 5px;
	margin-left: -2px;
	background-color:#818181;
	cursor: pointer;
	border: none;
}

.divBtn {
	display:inline-block; 
	padding-right:10px;
}

.divText {
	color: #818181;
	font-size: 1.8em;
}

.inputField {
	color: #818181; 
	width: 100%; 
	max-width: 500px;
	height: 35px; 
	font-size:1.8em;
	border:1px solid darkgrey;
	padding:3px;
}

select.inputField,
select.inputField option {
	font-size: 14px;
}

.inputField50 {
	color: #818181; 
	font-size:1.8em; 
	border:1px solid darkgrey;
	padding:3px;
	height: 35px; 
	width: 103px;
}

.disabledInputField {
	color: #818181;
	width: 100%; 
	max-width: 500px;
	height: 35px; 
	font-size:1.8em; 
	border:1px solid darkgrey;
	background-color:#eaeaea;
	padding:3px;
}

.inputDrop {
	color: #818181; 
	font-size:1.8em; 
	border:1px solid darkgrey;
	width: 100%; 
	max-width: 500px;
	height: 35px;
	background-color:white;
}
.inputDropNoWidth {
	color: #818181; 
	font-size:1.8em; 
	border:1px solid darkgrey;
	max-width: 500px;
	background-color:white;
}

.inputRemark {
	width: 100%; 
	max-width: 500px;
	height: 247px;
	resize:none;
	border:none; 
	color: #818181; 
	font-size:1.8em;
}

.inputDrop50 {
	color: #818181; 
	font-size:1.8em; 
	border:1px solid darkgrey;
	width: 92px;
	height: 35px;
	background-color:white;
}

.menuItem {
	display:inline-block; 
	padding:10px;
	font-size: clamp(0.875rem, 2vw, 1rem);
	width:200px;
	height:200px;
	cursor: pointer;
	margin:10px;
	vertical-align: top;
}

.menuItem {
	display: inline-flex; 
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	padding: 15px 10px;
	width: 180px;
	height: 180px;
	cursor: pointer;
	margin: 10px;
	vertical-align: top;
	border-radius: 8px; /* Optioneel: geeft de knoppen mooie afgeronde hoeken */
	box-sizing: border-box;
}

.menuTitleWhite {
	margin-top: 0;
	margin-bottom: 10px;
	display: block;
	color: white;
	width: 100%;
	/* Zorgt dat de tekst geforceerd op één regel blijft */
	white-space: nowrap;
	/* Kapt de tekst netjes af met '...' als de applicatienaam écht te lang is */
	overflow: hidden;
	text-overflow: ellipsis; 
	text-align: center;
}
.menuTitleBlack {
	margin-top: 0;
	margin-bottom: 10px;
	display: block;
	color: black;
	width: 100%;
	/* Zorgt dat de tekst geforceerd op één regel blijft */
	white-space: nowrap;
	/* Kapt de tekst netjes af met '...' als de applicatienaam écht te lang is */
	overflow: hidden;
	text-overflow: ellipsis; 
	text-align: center;
}

/* Geef alle afbeeldingen in het hoofdmenu dezelfde vaste beeldbox. */
.menuItem img {
	width: 100px;
	height: 100px;
	max-width: 100%;
	object-fit: contain; /* Behoudt de juiste beeldverhouding zonder vervorming */
	margin-top: auto; /* Duwt de afbeelding netjes naar de onderkant van het vak */
}

/* Houd op telefoons twee compacte hoofdmenutegels naast elkaar waar dat past. */
@media (max-width: 600px) {
	body.portal-dashboard-page .portalStartMenu .tableRow {
		grid-template-columns: repeat(auto-fit, 140px);
		gap: 10px;
		padding: 0 5px 10px;
	}

	body.portal-dashboard-page .portalStartMenu .menuItem {
		width: 140px;
		height: 140px;
		padding: 10px 8px;
	}

	body.portal-dashboard-page .portalStartMenu .menuItem img {
		width: 72px;
		height: 72px;
	}
}

.menuItem a {
	text-decoration: none;
	transition: 0.3s;
	color: #818181;
}

.menuItem a:hover, .offcanvas a:focus{
	color: silver;
}

.slideMenuItem {
	border-right: none;
	vertical-align: left;
	font-size: 6px;
}

/* AANGEPAST: Hoogte op auto gezet zodat de grotere tekst past */
div.blueheader {
	max-width: 100%; 
	color: white; 
	padding-top: 5px;
 vertical-align;
	background-color: #026eb4;
/*	border: solid 1px #026eb4; */
font-family: 'Limelight';
	min-height: 40px;
	height: auto;
    font-size: clamp(1.3rem, 3.5vw, 1.875rem);
}

/* AANGEPAST: Hoogte op auto gezet */
div.greyheader {
	max-width: 100%;
	padding: 0px; 
	background-color: #666; 
	border: 1px solid #666;
	color: white;
	min-height: 50px;
	height: auto;
}

/* 1. De basistitel (dit zijn de kleine letters) */
.dra-titel {
    font-family: 'Limelight';
    /* Minimaal ~10.6px, schaalt met scherm, maximaal exact 13.33px */
    font-size: clamp(0.66rem, 2.5vw, 0.933rem); 
    font-weight: normal;
    letter-spacing: 1px;
    color: white;
}

/* 2. De hoofdletters (D, R, A) die in de span staan */
.dra-titel span {
    /* Maakt de hoofdletters exact 3 keer zo groot als de kleine letters */
    font-size: 300%; 
    /* Berekening maximum: 13.33px * 3 = exact 40px */
    vertical-align: baseline; 
}


.wrapper {
	width: 350px; 
	padding: 10px;  
	display: block;
	margin-left: auto;
	margin-right: auto;
}

}

@scope (body.portal-profile-page) {
/* ==========================================================================
   Basis styling & Reset
   ========================================================================== */

        .form-control {
            width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 6px;
            font-size: 1rem; box-sizing: border-box; margin-top: 6px; background: #ffffff;
        }
        .form-control:focus { outline: none; border-color: #2563eb; background: #ffffff; }
        .btn-submit {
            display: block; width: 100%; padding: 14px; background: #1e3a8a; color: white;
            border: none; border-radius: 6px; font-weight: bold; font-size: 1rem;
            cursor: pointer; transition: background 0.2s; margin-top: 15px;
        }
        .btn-submit:hover { background: #1d4ed8; }
        .btn-submit:disabled { background: #94a3b8; cursor: not-allowed; opacity: 0.7; }
        .alert { padding: 12px; border-radius: 6px; margin-bottom: 20px; font-size: 0.95rem; display: none; }
        .alert-danger { background: #fde8e8; color: #9b1c1c; border: 1px solid #f8b4b4; }
        .alert-success { background: #e1fbf1; color: #0d5c3a; border: 1px solid #a2f1cc; }
        
        .scherm-bevroren {
            cursor: wait !important;
            user-select: none !important;
            pointer-events: none !important;
       }


.profile-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    width: 100%;
    max-width: 700px;
    padding: 20px;
    box-sizing: border-box;
    margin: 0 auto 20px auto; /* Centreert de kaart horizontaal en behoudt de bodemmarge */
}

h2 { 
    color: #1e3a8a; 
    margin-top: 0; 
    border-bottom: 2px solid #e5e7eb; 
    padding-bottom: 12px; 
    font-size: 1.4rem; 
}

/* Grid-layout voor PC/Tablet, valt automatisch terug naar 1 kolom op mobiel */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.info-group { 
    margin-bottom: 5px; 
}

.info-label { 
    font-size: 0.8rem; 
    color: #6b7280; 
    text-transform: uppercase; 
    font-weight: 600; 
    margin-bottom: 6px; 
}

.info-value { 
    font-size: 1rem; 
    color: #1f2937; 
    background: #f9fafb; 
    padding: 12px; 
    border-radius: 6px; 
    border: 1px solid #f3f4f6; 
    word-break: break-word; 
}

/* Badges flexibel uitlijnen */
.badge-container { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 6px; 
    background: #f9fafb; 
    padding: 12px; 
    border-radius: 6px; 
    border: 1px solid #f3f4f6; 
}

.badge { 
    background-color: #d1e7dd; 
    color: #0f5132; 
    padding: 6px 12px; 
    border-radius: 4px; 
    font-size: 0.85rem; 
    font-weight: 500; 
}

.badge-admin { 
    background-color: #f8d7da; 
    color: #842029; 
}

/* Beheer links ombouwen tot grote, makkelijk tikbare knoppen op mobiel */
.admin-tools {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 15px;
}

.admin-link {
    display: block;
    color: #2563eb; 
    background: #eff6ff;
    text-decoration: none; 
    font-weight: 500;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #dbeafe;
    transition: background 0.2s;
    font-size: 0.95rem;
}

.admin-link:hover {
    background: #dbeafe;
}

/* Gecorrigeerde Debug-regels onderin */
pre {
    background: #1e293b;
    color: #38bdf8;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto; 
    font-size: 0.85rem;
}

/* ==========================================================================
   MEDIA QUERIES (Aanpassingen voor grotere schermen)
   ========================================================================== */
@media (min-width: 600px) {
    body {
        padding: 0px 0px;
    }
    .profile-card {
        padding: 30px;
    }
    .info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .admin-tools {
        grid-template-columns: 1fr 1fr; 
    }
    h2 {
        font-size: 1.6rem;
    }
}
/* Aanvulling voor wijziggebruiker checkboxen */
.group-container { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; max-height: 250px; overflow-y: auto; border: 1px solid #cbd5e1; padding: 12px; border-radius: 6px; background: #ffffff; }
.group-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 6px; border: 1px solid #e2e8f0; transition: background-color 0.15s; }
.group-active { background-color: #f1f5f9 !important; font-weight: bold; color: #1e293b; border-color: #cbd5e1; }
.group-disabled { background-color: #f8fafc !important; color: #94a3b8 !important; border-color: #e2e8f0; }
.checkbox-custom { width: 18px; height: 18px; cursor: pointer; }
.scherm-bevroren { cursor: wait !important; pointer-events: none !important; user-select: none !important; }

/* /css/mail_style.css */
.form-control { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #cbd5e1; 
    border-radius: 6px; 
    font-size: 1rem; 
    box-sizing: border-box; 
    margin-top: 6px; 
    background: #ffffff; 
    font-family: inherit; 
}
.form-control:focus { 
    outline: none; 
    border-color: #2563eb; 
    background: #ffffff; 
}
textarea.form-control { 
    resize: vertical; 
    min-height: 150px; 
}
.file-input-wrapper { 
    background: #f9fafb; 
    border: 2px dashed #cbd5e1; 
    padding: 15px; 
    border-radius: 6px; 
    text-align: center; 
    cursor: pointer; 
    margin-top: 6px; 
}
.btn-submit { 
    display: block; 
    width: 100%; 
    padding: 14px; 
    background: #1e3a8a; 
    color: white; 
    border: none; 
    border-radius: 6px; 
    font-weight: bold; 
    font-size: 1rem; 
    cursor: pointer; 
    transition: background 0.2s; 
    margin-top: 15px; 
}
.btn-submit:hover { 
    background: #1d4ed8; 
}
.alert { 
    padding: 12px; 
    border-radius: 6px; 
    margin-bottom: 20px; 
    font-size: 0.95rem; 
    display: none; 
} 
.alert-danger { 
    background: #fde8e8; 
    color: #9b1c1c; 
    border: 1px solid #f8b4b4; 
}
.alert-success { 
    background: #e1fbf1; 
    color: #0d5c3a; 
    border: 1px solid #a2f1cc; 
}

}

/* Lazy Mofo-formulieren worden ook via AJAX in het dashboard geladen. */
@scope (#lm) {
:scope { margin: 20px 20px 100px 20px;  font-family: sans-serif; font-size: 10px; }
a    { color: #0074d9;}


/* table cells */
#lm td   { padding: 6px; }
#lm th   { padding: 10px; background: #0074d9; color: #fff; }
#lm th a { color: #fff; text-decoration: none; }

/* inputs and buttons */
#lm input, #lm select, #lm textarea, #lm .lm_button  { background: #fff; border-radius: 3px; padding: 10px; border: 1px solid #ccc; font-size: 16px; }
#lm .lm_button       { padding: 10px; min-width: 100px; color: #fff; background: #0074d9; border: 0; font-weight: bold; margin: 5px; opacity: 0.90; cursor: pointer; }
#lm .lm_button:hover { opacity: 1.0; }
#lm .dull            { background: #888; }
#lm .error           { background: #FF4136; }
#lm input[type=checkbox], #lm input[type=radio] { margin: 0 7px 0 12px;	}

/* search box and pagination */
#lm input.lm_search_button     { margin-left: 12px; }
#lm form.lm_search_box a       { text-decoration: none; }
#lm table.lm_pagination select { padding: 3px; }
#lm table.lm_pagination        { margin-top: -10px; }
#lm table.lm_add_search        { margin-top: -10px; }

/* form */
#lm table.lm_form                { margin: 0 auto; }
#lm table.lm_form td:first-child { text-align: right; }

#lm table.lm_form tr             { background: #eee; border: 1px; }
#lm div.lm_form_button_bar       { text-align: center; }
#lm span.lm_validate_error       { color: #ff4136; font-size: 13px; font-weight: bold; margin-left: 10px; }
#lm span.lm_validate_tip         { color: #777777; font-size: 13px; font-weight: bold; margin-left: 10px; }
#lm div.lm_form_button_bar       { margin: 10px auto; }   

/* grid */
#lm table.lm_grid { margin-bottom: 11px; }
#lm table.lm_grid tr:nth-child(even)   { background: #eee; }
#lm table.lm_grid td { border: 1px solid #ddd;}
#lm table.lm_grid th { border-left: 1px solid blue; }
#lm table.lm_grid tr.lm_active, #lm table.lm_grid tr:hover { background: #c2e3ff; } /* highlight hover and current row edited */ 

/* success and error messages */
#lm div.lm_success, #lm div.lm_error { color: #2ecc40; border: 1px solid #2ecc40; border-radius: 3px; padding: 10px; margin: 10px auto; width: 50%; text-align: center; }
#lm div.lm_error                     { color: #ff4136; border-color: #ff4136;  }

}
/* Gedeelde Tabulator-beheerpagina's */
.portal-dashboard-page .menuItem {
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.tabulator-admin-page {
    box-sizing: border-box;
    margin: 0;
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    min-width: 0;
    overflow-x: hidden;
    background: #fff;
    color: #242424;
    font-family: Arial, sans-serif;
}

.admin-grid-shell { box-sizing: border-box; display: flex; flex-direction: column; width: 100%; max-width: 100vw; min-width: 0; height: 100%; padding: 12px 20px; overflow: hidden; }
.admin-grid-toolbar { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.admin-grid-toolbar button, .admin-grid-toolbar input,
.admin-grid-dialog-actions button, .admin-grid-field input,
.admin-grid-field select, .admin-grid-field textarea {
    box-sizing: border-box; min-height: 38px; border: 1px solid #aeb6c2; border-radius: 4px; font: inherit;
}
.admin-grid-toolbar button, .admin-grid-dialog-actions button { padding: 8px 12px; background: #f4f6f8; cursor: pointer; }
.admin-grid-toolbar input { width: min(320px, 100%); padding: 7px 10px; }
#admin-grid-message { min-height: 20px; color: #555; font-size: 14px; }
#admin-grid-message:empty { display: none; }
#admin-grid-message.error { color: #a12622; }
#admin-grid { flex: 0 1 auto; width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; }
#admin-grid.admin-grid-pending { position: absolute; left: -100000px; visibility: hidden; pointer-events: none; }
.admin-grid-fallback-wrap { width: 100%; max-width: 100%; overflow: auto; }
.admin-grid-sql { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; max-width: 100%; overflow-wrap: anywhere; }
.admin-grid-result-count { flex: 0 0 100%; margin-top: 4px; color: #555; font: 13px Arial, sans-serif; }
.admin-grid-fallback { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-grid-fallback th, .admin-grid-fallback td { padding: 8px; border: 1px solid #d4d8de; text-align: left; }
.admin-grid-fallback th { background: #f4f6f8; }
.admin-grid-shell .tabulator { width: 100%; max-width: 100%; min-width: 0; font-size: 14px; }
.admin-grid-shell .tabulator .tabulator-tableholder { overflow-x: auto; }
.admin-grid-shell .tabulator .tabulator-header .tabulator-col { background: #f4f6f8; }
.admin-grid-shell .tabulator .admin-grid-editable-cell { cursor: pointer; }
.admin-grid-value { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-grid-edit, .admin-grid-security, .admin-grid-delete { width: 30px; min-height: 30px; margin: 0 2px; padding: 4px; border: 1px solid #aeb6c2; border-radius: 4px; background: #fff; cursor: pointer; }
.admin-grid-delete { color: #a12622; }
.admin-grid-edit svg, .admin-grid-security svg, .admin-grid-delete svg { width: 17px; height: 17px; pointer-events: none; }
.admin-grid-cell-saving { opacity: .6; }
#admin-grid-dialog { box-sizing: border-box; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 20px; border: 1px solid #aeb6c2; border-radius: 6px; }
#admin-grid-dialog::backdrop { background: rgba(0, 0, 0, .35); }
#admin-grid-fields { display: grid; gap: 12px; }
.admin-grid-field { display: grid; gap: 5px; font-weight: bold; }
.admin-grid-field input, .admin-grid-field select, .admin-grid-field textarea { width: 100%; padding: 8px; font-weight: normal; }
.admin-grid-field select,
.admin-grid-field select option { font-size: 11px !important; }
.admin-grid-field textarea { min-height: 150px; resize: vertical; font-family: ui-monospace, Consolas, monospace; }
.admin-grid-field .uppercase { text-transform: uppercase; }
.admin-grid-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
#admin-security-editor { margin: 4px 0 0; padding: 12px; border: 1px solid #c8ced6; }
#admin-security-editor legend { padding: 0 6px; font-weight: bold; }
.admin-security-rules { display: grid; gap: 8px; margin-bottom: 10px; }
.admin-security-rule { display: grid; grid-template-columns: minmax(120px, 1fr) repeat(4, auto) auto; gap: 8px; align-items: center; }
.admin-security-rule > label { display: flex; gap: 4px; align-items: center; font-size: 12px; font-weight: normal; }
.admin-security-rule > label input { width: auto; }
.admin-security-rule-remove, .admin-security-rule-add { padding: 7px 10px; }
@media (max-width: 700px) {
    .admin-security-rule { grid-template-columns: 1fr 1fr; }
    .admin-security-rule > input, .admin-security-rule-remove { grid-column: 1 / -1; }
}

.setting-editor-page { box-sizing: border-box; margin: 0; padding: 16px; background: #fff; color: #242424; font-family: Arial, sans-serif; }
.setting-editor { display: grid; gap: 12px; width: min(100%, 1000px); }
.setting-editor label { display: grid; gap: 5px; font-weight: bold; }
.setting-editor input, .setting-editor textarea { box-sizing: border-box; width: 100%; padding: 9px; border: 1px solid #aeb6c2; border-radius: 4px; font: inherit; }
.setting-editor textarea { min-height: 55vh; resize: vertical; font-family: ui-monospace, Consolas, monospace; white-space: pre-wrap; }
.setting-editor-actions { display: flex; gap: 8px; }
.setting-editor-actions button, .setting-editor-actions a { min-height: 38px; padding: 9px 14px; border: 1px solid #aeb6c2; border-radius: 4px; background: #f4f6f8; color: inherit; text-decoration: none; }
.setting-editor-message.error { color: #a12622; }

@media (max-width: 700px) {
    .admin-grid-toolbar { flex-wrap: wrap; }
    .admin-grid-toolbar input { flex: 1 1 100%; width: 100%; }
    .admin-grid-shell { padding: 10px; }
    .admin-grid-shell .tabulator { font-size: 13px; }
}

/* Profielcompatibiliteit voor browsers zonder ondersteuning voor CSS @scope. */
body.portal-profile-page {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    background: #f8fafc;
    color: #1f2937;
    font-family: Arial, sans-serif;
}
body.portal-profile-page .profile-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 700px;
    margin: 0 auto 20px;
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
}
body.portal-profile-page h2 {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    color: #1e3a8a;
    font-size: 1.4rem;
}
body.portal-profile-page .info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}
body.portal-profile-page .info-group { margin-bottom: 5px; }
body.portal-profile-page .info-label {
    margin-bottom: 6px;
    color: #6b7280;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
}
body.portal-profile-page .form-control {
    box-sizing: border-box;
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 1rem;
}
body.portal-profile-page .form-control:focus {
    outline: none;
    border-color: #2563eb;
}
body.portal-profile-page textarea.form-control {
    min-height: 150px;
    resize: vertical;
}
body.portal-profile-page .file-input-wrapper {
    margin-top: 6px;
    padding: 15px;
    border: 2px dashed #cbd5e1;
    border-radius: 6px;
    background: #f9fafb;
    text-align: center;
    cursor: pointer;
}
body.portal-profile-page .btn-submit {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 14px;
    border: 0;
    border-radius: 6px;
    background: #1e3a8a;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
body.portal-profile-page .btn-submit:hover { background: #1d4ed8; }
body.portal-profile-page .btn-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: .7;
}
body.portal-profile-page .alert {
    display: none;
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 6px;
    font-size: .95rem;
}
body.portal-profile-page .alert-danger {
    border: 1px solid #f8b4b4;
    background: #fde8e8;
    color: #9b1c1c;
}
body.portal-profile-page .alert-success {
    border: 1px solid #a2f1cc;
    background: #e1fbf1;
    color: #0d5c3a;
}
body.portal-profile-page .info-value,
body.portal-profile-page .badge-container {
    padding: 12px;
    border: 1px solid #f3f4f6;
    border-radius: 6px;
    background: #f9fafb;
}
body.portal-profile-page .info-value {
    color: #1f2937;
    font-size: 1rem;
    word-break: break-word;
}
body.portal-profile-page .badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
body.portal-profile-page .badge {
    padding: 6px 12px;
    border-radius: 4px;
    background: #d1e7dd;
    color: #0f5132;
    font-size: .85rem;
    font-weight: 500;
}
body.portal-profile-page .badge-admin { background: #f8d7da; color: #842029; }
body.portal-profile-page .admin-tools {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 15px;
}
body.portal-profile-page .admin-link {
    display: block;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
}
body.portal-profile-page .admin-link:hover { background: #dbeafe; }
body.portal-profile-page pre {
    overflow-x: auto;
    padding: 15px;
    border-radius: 6px;
    background: #1e293b;
    color: #38bdf8;
    font-size: .85rem;
}
@media (min-width: 600px) {
    body.portal-profile-page .profile-card { padding: 30px; }
    body.portal-profile-page .info-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    body.portal-profile-page .admin-tools { grid-template-columns: 1fr 1fr; }
    body.portal-profile-page h2 { font-size: 1.6rem; }
}

/* De mailpagina wordt via AJAX in het dashboard geplaatst. De body van het
 * ingeladen document bestaat dan niet, dus deze opmaak hangt aan de kaart zelf. */
.manual-mail-card {
    box-sizing: border-box;
    width: calc(100% - 24px);
    max-width: 700px;
    margin: 12px auto 20px;
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
    color: #1f2937;
    font-family: Arial, sans-serif;
}
.manual-mail-card h2 {
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    color: #1e3a8a;
    font-size: 1.4rem;
}
.manual-mail-card .info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}
.manual-mail-card .info-group { margin-bottom: 5px; }
.manual-mail-card .info-label {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
}
.manual-mail-card .form-control {
    box-sizing: border-box;
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 1rem;
}
.manual-mail-card .form-control:focus {
    outline: none;
    border-color: #2563eb;
}
.manual-mail-card textarea.form-control {
    min-height: 150px;
    resize: vertical;
}
.manual-mail-card .file-input-wrapper {
    box-sizing: border-box;
    margin-top: 6px;
    padding: 15px;
    border: 2px dashed #cbd5e1;
    border-radius: 6px;
    background: #f9fafb;
    text-align: center;
}
.manual-mail-card .btn-submit {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin-top: 15px;
    padding: 14px;
    border: 0;
    border-radius: 6px;
    background: #1e3a8a;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}
.manual-mail-card .btn-submit:hover { background: #1d4ed8; }
.manual-mail-card .btn-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: .7;
}
.manual-mail-card .alert {
    display: none;
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 6px;
    font-size: .95rem;
}
.manual-mail-card .alert-danger {
    border: 1px solid #f8b4b4;
    background: #fde8e8;
    color: #9b1c1c;
}
.manual-mail-card .alert-success {
    border: 1px solid #a2f1cc;
    background: #e1fbf1;
    color: #0d5c3a;
}
.manual-mail-card .admin-tools {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 15px;
}
.manual-mail-card .admin-link {
    display: block;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
}
.manual-mail-card .admin-link:hover { background: #dbeafe; }
@media (min-width: 600px) {
    .manual-mail-card { padding: 30px; }
    .manual-mail-card .info-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .manual-mail-card h2 { font-size: 1.6rem; }
}
