/*
 * Securelogx People portal. Same console look as the SX CRM: white sidebar with
 * sections, white top bar, light gray page, flat white cards, pill buttons.
 * One weight (400) everywhere, no shadows, light theme only, logical properties so the
 * same rules serve Arabic (right to left) and English (left to right).
 */
@font-face { font-family: "Almarai"; font-weight: 400; font-display: swap; src: url("../fonts/Almarai-Regular.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/Barlow-Regular.ttf") format("truetype"); }

:root {
	--slp-brand: #048238;
	--slp-brand-dark: #036a2e;
	--slp-brand-soft: #e8f5ec;
	--slp-bg: #f5f5f5;
	--slp-ink: #17201b;
	--slp-text: #17201b;
	--slp-ink-2: #3d4451;
	--slp-muted: #5b6472;
	--slp-faint: #8a919e;
	--slp-surface: #f5f5f5;
	--slp-border: #e6e9ef;
	--slp-border-2: #d5d9e0;
	--slp-bad: #c62828;
	--slp-bad-soft: #fdecea;
	--slp-warn: #a15c00;
	--slp-warn-soft: #fff4e0;
	--slp-info: #1d6fb8;
	--slp-info-soft: #e8f1fb;
	--slp-side: 272px;
	--slp-head: "Thmanyah Serif", "Barlow", "Almarai", system-ui, -apple-system, "Segoe UI", sans-serif;
	color-scheme: light only;
}

*, *::before, *::after { box-sizing: border-box; box-shadow: none !important; text-shadow: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--slp-bg); }
body.slp {
	margin: 0;
	background: var(--slp-bg);
	color: var(--slp-text);
	font: 400 15px/1.55 "Barlow", "Almarai", system-ui, -apple-system, "Segoe UI", sans-serif;
}
html[dir="rtl"] body.slp { font-family: "Almarai", "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif; }
html[dir="rtl"] { --slp-head: "Thmanyah Serif", "Almarai", "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif; }
.slp, .slp * { font-weight: 400 !important; }
.slp h1, .slp h2, .slp h3 { color: var(--slp-text); margin: 0; letter-spacing: 0; }
/* Headings: the site's heading font (Thmanyah Serif, loaded by Portal::brand_css()); the page font when the site does not ship it. */
.slp h1, .slp h2, .slp h3, .slp h4 { font-family: var(--slp-head); }
.slp p { margin: 0; }
.slp a { color: inherit; }
.slp button, .slp input, .slp select, .slp textarea { font: inherit; color: inherit; }
.slp :focus-visible { outline: 2px solid var(--slp-brand); outline-offset: 2px; }
.slp [hidden] { display: none !important; }

.slp-boot, .slp-loading { padding: 48px 24px; text-align: center; color: var(--slp-faint); }

/* ------------------------------------------------------------------ sidebar */
.slp-app { min-height: 100vh; }
.slp-side {
	position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 30; width: var(--slp-side);
	display: flex; flex-direction: column; gap: 10px; padding: 20px 14px 14px;
	background: #fff; color: var(--slp-ink-2); border-inline-end: 1px solid var(--slp-border);
	transition: transform .2s ease;
}
.slp-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 10px 12px; color: var(--slp-text); text-align: center; text-decoration: none; }
.slp-brand__img { display: block; width: auto; height: auto; max-width: 190px; max-height: 48px; object-fit: contain; }
.slp-brand__mark { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--slp-brand); color: #fff; font-size: 15px; letter-spacing: .5px; }
.slp-brand__sub { display: block; font-size: 14px; line-height: 1.4; color: var(--slp-ink-2); }
.slp-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 2px; margin: 0 -2px; scrollbar-width: thin; display: flex; flex-direction: column; gap: 2px; }
.slp-nav__group { flex: none; font-size: 11px; color: var(--slp-faint); padding: 14px 12px 6px; letter-spacing: .4px; }
html[dir="rtl"] .slp-nav__group { letter-spacing: 0; }
.slp-nav__group:first-child { padding-top: 4px; }
.slp-nav__item {
	flex: none; display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: none;
	color: var(--slp-ink-2); font-size: 14px; line-height: 1.3; text-decoration: none; text-align: start; cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.slp-nav__item .slp-ic { width: 19px; height: 19px; }
.slp-nav__item:hover { background: #f5f5f5; color: var(--slp-text); }
.slp-nav__item.is-active, .slp-nav__item.is-active:hover { background: var(--slp-brand-soft); color: var(--slp-brand); }
.slp-nav__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slp-nav__n { flex: none; background: var(--slp-brand); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; line-height: 1.6; }
.slp-nav__foot { flex: none; padding: 10px 0 0; border-top: 1px solid var(--slp-border); display: flex; flex-direction: column; gap: 2px; }
.slp-nav__foot .slp-nav__item { color: var(--slp-muted); }
.slp-nav__foot .slp-nav__item.is-out { color: #c62828; }
.slp-nav__foot .slp-nav__item.is-out:hover { background: #fdf1f1; color: #b71c1c; }
.slp-ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html[dir="rtl"] .slp-ic-back, html[dir="rtl"] .slp-ic-arrow, html[dir="rtl"] .slp-ic-logout { transform: scaleX(-1); }
.slp-scrim { display: none; }

/* ------------------------------------------------------------------ top bar */
.slp-content { margin-inline-start: var(--slp-side); min-height: 100vh; display: flex; flex-direction: column; }
.slp-top {
	position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
	min-height: 76px; padding: 12px 32px; background: #fff; border-bottom: 1px solid var(--slp-border);
}
.slp-top__actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.slp-iconbtn {
	position: relative; display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0;
	border: 1px solid var(--slp-border); border-radius: 10px; background: #fff; color: var(--slp-ink-2); cursor: pointer;
}
.slp-iconbtn:hover { border-color: var(--slp-brand); color: var(--slp-brand); }
.slp-menubtn { display: none; }
.slp-bell { width: 42px; height: 42px; border-radius: 50%; }
.slp-bell__n { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--slp-bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.slp-langbtn { flex: none; border: 1px solid var(--slp-border); background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 13px; line-height: 1.3; color: var(--slp-ink-2); cursor: pointer; }
.slp-langbtn:hover { border-color: var(--slp-brand); color: var(--slp-brand); }
.slp-avatar { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--slp-brand-soft); color: var(--slp-brand); font-size: 14px; text-decoration: none; }
.slp-avatar img { width: 36px; height: 36px; border-radius: 50%; display: block; object-fit: cover; }

.slp-gsearch { position: relative; flex: 1 1 auto; max-width: 520px; margin-inline-end: auto; }
.slp-gsearch > .slp-ic { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--slp-muted); pointer-events: none; }
.slp-gsearch__input { width: 100%; padding: 9px 14px; padding-inline-start: 36px; border: 1px solid var(--slp-border); border-radius: 999px; background: #f5f5f5; color: var(--slp-text); }
.slp-gsearch__input::placeholder { color: var(--slp-faint); }
.slp-gsearch__input:focus { background: #fff; border-color: var(--slp-brand); outline: 3px solid var(--slp-brand-soft); outline-offset: 0; }
.slp-gsearch__panel { position: absolute; top: calc(100% + 6px); inset-inline: 0; z-index: 40; max-height: 70vh; overflow: auto; padding: 6px; background: #fff; border: 1px solid var(--slp-border); border-radius: 14px; }
.slp-gsearch__group { padding: 8px 10px 4px; font-size: 11px; color: var(--slp-muted); }
.slp-gsearch__item { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; color: var(--slp-text); text-decoration: none; }
.slp-gsearch__item:hover, .slp-gsearch__item:focus { background: var(--slp-brand-soft); }
.slp-gsearch__item small { color: var(--slp-muted); font-size: 12px; unicode-bidi: plaintext; text-align: start; }
.slp-gsearch__empty { padding: 10px; color: var(--slp-faint); font-size: 14px; }

.slp-notif { position: fixed; top: 64px; inset-inline-end: 16px; z-index: 40; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--slp-border); border-radius: 14px; }
.slp-notif__head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--slp-border); background: #fff; }
.slp-notif__list { list-style: none; margin: 0; padding: 0; }
.slp-notif__row { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--slp-border); background: #fff; color: var(--slp-text); font-size: 14px; text-align: start; cursor: pointer; }
.slp-notif__row:hover { background: #fafbfc; }
.slp-notif__row.is-unread { background: var(--slp-brand-soft); }
.slp-notif__row small { color: var(--slp-muted); font-size: 12px; unicode-bidi: plaintext; text-align: start; }
.slp-notif__list li:last-child .slp-notif__row { border-bottom: 0; }
.slp-notif__foot { display: block; padding: 12px 16px; border-top: 1px solid var(--slp-border); text-align: center; }
.slp-linkbtn { border: 0; padding: 0; background: none; color: var(--slp-brand); font-size: 13px; cursor: pointer; text-decoration: none; }
.slp-linkbtn:hover { color: var(--slp-brand-dark); }

/* ------------------------------------------------------------------ page */
.slp-main { width: 100%; min-width: 0; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 18px; outline: none; }
.slp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.slp-head h1 { font-size: 26px; line-height: 1.3; letter-spacing: -.3px; overflow-wrap: anywhere; }
html[dir="rtl"] .slp-head h1 { letter-spacing: 0; }
.slp-head p { margin-top: 4px; color: var(--slp-muted); font-size: 13px; }
.slp-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slp-view { display: flex; flex-direction: column; gap: 18px; }
.slp-tabbody { display: flex; flex-direction: column; gap: 18px; }

/* ------------------------------------------------------------------ buttons */
.slp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 9px 18px; border: 1px solid var(--slp-border-2); border-radius: 999px;
	background: #fff; color: var(--slp-text); font-size: 14px; line-height: 1.3; cursor: pointer; text-decoration: none; white-space: nowrap;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.slp-btn:hover { border-color: var(--slp-brand); color: var(--slp-brand); }
.slp-btn--primary { background: var(--slp-brand); border-color: var(--slp-brand); color: #fff; }
.slp-btn--primary:hover { background: var(--slp-brand-dark); border-color: var(--slp-brand-dark); color: #fff; }
.slp-btn--ghost { border-color: transparent; background: none; color: var(--slp-muted); padding-inline: 12px; }
.slp-btn--ghost:hover { border-color: transparent; background: #f5f5f5; color: var(--slp-text); }
.slp-btn--danger { border-color: #f3c7cd; color: #c62828; }
.slp-btn--danger:hover { background: #fdf1f1; border-color: #e2445c; color: #b71c1c; }
.slp-modal__foot .slp-btn--danger { background: #c62828; border-color: #c62828; color: #fff; }
.slp-modal__foot .slp-btn--danger:hover { background: #b71c1c; border-color: #b71c1c; color: #fff; }
.slp-btn--sm { padding: 6px 12px; font-size: 13px; }
.slp-btn--icon { padding: 8px; }
.slp-btn--icon.slp-btn--sm { padding: 6px; }
.slp-btn:disabled { opacity: .45; cursor: not-allowed; }
.slp-btn .slp-ic { width: 18px; height: 18px; }
.slp-btn--sm .slp-ic { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ cards, facts */
.slp-card { border: 1px solid var(--slp-border); border-radius: 16px; padding: 20px 22px; background: #fff; min-width: 0; }
.slp-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.slp-card__title { font-size: 17px; line-height: 1.4; }
.slp-card__body { display: flex; flex-direction: column; gap: 14px; }
.slp-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.slp-note { color: var(--slp-muted); font-size: 13px; }
.slp-note--bad { color: var(--slp-bad); }
.slp-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px 32px; margin: 0; font-size: 14px; }
.slp-fact { display: grid; grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 12px; align-items: baseline; }
.slp-fact dt { color: var(--slp-muted); }
.slp-fact dd { margin: 0; color: var(--slp-text); overflow-wrap: anywhere; }
.slp-fact dd.is-blank { color: #a0a8b3; }
.slp-states { display: flex; gap: 8px 24px; flex-wrap: wrap; color: var(--slp-muted); font-size: 13px; }
.slp-inline { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slp-iban { letter-spacing: .04em; }
.slp-code { font: 12px/1.5 ui-monospace, Consolas, monospace; color: var(--slp-muted); overflow-wrap: anywhere; display: inline-block; max-width: 420px; text-align: left; }

.slp-badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; line-height: 1.7; background: #f5f5f5; color: var(--slp-muted); white-space: nowrap; }
.slp-badge--ok { background: var(--slp-brand-soft); color: var(--slp-brand); }
.slp-badge--warn { background: var(--slp-warn-soft); color: var(--slp-warn); }
.slp-badge--bad { background: var(--slp-bad-soft); color: var(--slp-bad); }
.slp-badge--info { background: var(--slp-info-soft); color: var(--slp-info); }
.slp-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.slp-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.slp-stats--3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.slp-card .slp-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.slp-stat { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 18px 20px; border: 1px solid var(--slp-border); border-radius: 16px; background: #fff; text-align: start; cursor: pointer; transition: border-color .15s ease; }
.slp-stat--plain { cursor: default; }
button.slp-stat:hover { border-color: var(--slp-brand); }
.slp-stat__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.slp-stat__icon { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--slp-brand-soft); color: var(--slp-brand); }
.slp-stat__icon .slp-ic { width: 18px; height: 18px; }
.slp-stat__l { min-width: 0; font-size: 13px; color: var(--slp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slp-stat__n { font-size: 26px; line-height: 1.15; letter-spacing: -.3px; color: var(--slp-text); overflow-wrap: anywhere; unicode-bidi: plaintext; text-align: start; }

.slp-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.slp-steps li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.slp-steps__n { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--slp-brand-soft); color: var(--slp-brand); font-size: 13px; }
.slp-steps__t { flex: 1 1 240px; font-size: 14px; }

.slp-empty { padding: 32px 8px; border: 1px solid var(--slp-border); border-radius: 16px; background: #fff; text-align: center; font-size: 14px; color: var(--slp-faint); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.slp-card .slp-empty, .slp-modal .slp-empty { padding: 20px 8px; border: 0; border-radius: 0; background: none; }

/* ------------------------------------------------------------------ tabs, toolbar */
.slp-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--slp-border); scrollbar-width: none; }
.slp-tabs::-webkit-scrollbar { display: none; }
.slp-tab { flex: none; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--slp-muted); font-size: 14px; cursor: pointer; white-space: nowrap; }
.slp-tab:hover { color: var(--slp-text); }
.slp-tab.is-active { color: var(--slp-brand); border-bottom-color: var(--slp-brand); }
.slp-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.slp-toolbar .slp-input { width: auto; flex: 0 1 220px; }
.slp-toolbar input[type="search"] { flex: 1 1 260px; max-width: 420px; }
.slp-toolbar--split { justify-content: space-between; }

/* ------------------------------------------------------------------ tables */
.slp-tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--slp-border); border-radius: 16px; }
.slp-card .slp-tablewrap, .slp-modal .slp-tablewrap { background: none; border: 0; border-radius: 0; }
.slp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.slp-table th { padding: 12px 16px; text-align: start; font-size: 12px; color: var(--slp-muted); background: #fafbfc; border-bottom: 1px solid var(--slp-border); white-space: nowrap; }
.slp-table td { padding: 12px 16px; text-align: start; vertical-align: middle; border-bottom: 1px solid #eef0f3; color: var(--slp-text); }
.slp-table th:first-child, .slp-table td:first-child { padding-inline-start: 18px; }
.slp-table th:last-child, .slp-table td:last-child { padding-inline-end: 18px; }
.slp-table tbody tr:last-child td { border-bottom: 0; }
.slp-table tr.is-link { cursor: pointer; }
.slp-table tr.is-link:hover td { background: #fafbfc; }
.slp-col-acts { width: 1%; white-space: nowrap; }
.slp-rowacts { display: flex; gap: 2px; justify-content: flex-end; }
.slp-person { display: flex; flex-direction: column; align-items: flex-start; }
.slp-person__no { font-size: 12px; color: var(--slp-muted); direction: ltr; unicode-bidi: plaintext; text-align: start; }
.slp-pager { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.slp-count { color: var(--slp-muted); font-size: 13px; }
.slp-matrix td.is-na { background: #fafbfc; }
.slp-matrix th[scope="row"] { color: var(--slp-text); font-size: 14px; white-space: normal; background: none; }

.slp-timeline { list-style: none; margin: 0; padding: 0; }
.slp-timeline li { position: relative; padding: 0 0 20px; padding-inline-start: 24px; border-inline-start: 1px solid var(--slp-border); margin-inline-start: 6px; }
.slp-timeline li:last-child { padding-bottom: 0; }
.slp-timeline li::before { content: ""; position: absolute; top: 6px; inset-inline-start: -6px; width: 11px; height: 11px; border-radius: 50%; background: var(--slp-brand); }
.slp-timeline__t { color: var(--slp-text); font-size: 14px; }
.slp-timeline__m { font-size: 12px; color: var(--slp-muted); }

/* ------------------------------------------------------------------ forms */
.slp-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.slp-modal:not(.slp-modal--wide) .slp-form { grid-template-columns: minmax(0, 1fr); }
.slp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.slp-field--full, .slp-form__heading, .slp-form__error { grid-column: 1 / -1; }
.slp-field > label { font-size: 13px; color: var(--slp-muted); }
.slp-field--check { flex-direction: row; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; cursor: pointer; }
.slp-field--check input { width: 18px; height: 18px; accent-color: var(--slp-brand); flex: none; }
.slp-input {
	width: 100%; padding: 10px 12px; border: 1px solid var(--slp-border-2); border-radius: 10px; background: #fff; color: var(--slp-text); font-size: 14px; line-height: 1.4;
}
.slp-input:focus { border-color: var(--slp-brand); outline: 3px solid var(--slp-brand-soft); outline-offset: 0; }
.slp-input:disabled { background: var(--slp-surface); color: var(--slp-muted); }
.slp-input--sm { padding: 6px 10px; font-size: 13px; min-width: 96px; }
textarea.slp-input { resize: vertical; }
.slp-help { font-size: 12px; color: var(--slp-muted); }
.slp-form__heading { font-size: 15px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--slp-border); }
.slp-form__error { padding: 10px 14px; border-radius: 8px; background: var(--slp-bad-soft); color: var(--slp-bad); font-size: 14px; }
.slp-form__error:empty { display: none; }
.slp-picker { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; align-items: center; }
.slp-picker__list { grid-column: 1 / -1; display: flex; flex-direction: column; border: 1px solid var(--slp-border); border-radius: 10px; overflow: hidden; }
.slp-picker__list:empty { display: none; }
.slp-picker__item { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--slp-border); background: #fff; font-size: 14px; text-align: start; cursor: pointer; }
.slp-picker__item:last-child { border-bottom: 0; }
.slp-picker__item:hover { background: var(--slp-brand-soft); }
.slp-picker__item:disabled { color: var(--slp-muted); cursor: not-allowed; background: #fff; }
.slp-picker__none { padding: 10px 12px; color: var(--slp-muted); font-size: 13px; }

/* ------------------------------------------------------------------ modal, toast */
.slp-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; background: rgba(23, 32, 27, .35); overflow-y: auto; }
.slp-modal { width: 100%; max-width: 480px; max-height: 88vh; display: flex; flex-direction: column; border: 1px solid var(--slp-border); border-radius: 18px; background: #fff; }
.slp-modal--wide { max-width: 760px; }
.slp-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--slp-border); }
.slp-modal__head h2 { font-size: 19px; line-height: 1.4; }
.slp-modal__body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.slp-modal__intro { color: var(--slp-muted); font-size: 13px; }
.slp-modal__foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--slp-border); }
.slp-confirm { color: var(--slp-text); font-size: 14px; }
.slp-toasts { position: fixed; z-index: 100; bottom: 24px; inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.slp-toast { max-width: 520px; padding: 10px 18px; border-radius: 999px; background: #17201b; color: #fff; font-size: 14px; }
.slp-toast--bad { background: var(--slp-bad); border-radius: 16px; }

/* ------------------------------------------------------------------ requests, leave, notifications */
.slp-flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.slp-flow__step { display: flex; align-items: flex-start; gap: 12px; }
.slp-flow__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.slp-flow__t { color: var(--slp-text); font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slp-flow__c { padding: 8px 12px; border-radius: 10px; background: #fafbfc; border: 1px solid var(--slp-border); color: var(--slp-text); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.slp-flow__step.is-waiting .slp-steps__n, .slp-flow__step.is-void .slp-steps__n { background: #f5f5f5; color: var(--slp-muted); }
.slp-flow__step.is-rejected .slp-steps__n { background: var(--slp-bad-soft); color: var(--slp-bad); }
.slp-flow__step.is-returned .slp-steps__n { background: var(--slp-warn-soft); color: var(--slp-warn); }
.slp-yearnav { display: inline-flex; align-items: center; gap: 8px; }
.slp-yearnav__y { min-width: 72px; text-align: center; color: var(--slp-text); font-size: 17px; }
.slp-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--slp-brand); }
.slp-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; }
.slp-pathedit { display: flex; flex-direction: column; gap: 12px; }
.slp-pathedit__row { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--slp-border); border-radius: 12px; background: #fafbfc; }
.slp-pathedit__head { display: flex; align-items: center; gap: 8px; }
.slp-pathedit__head .slp-input { flex: 1 1 auto; }
.slp-letter { padding: 32px; border: 1px solid var(--slp-border); border-radius: 12px; color: var(--slp-text); background: #fff; }
.slp-letter__head { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--slp-border); }
.slp-letter__head img { height: 48px; width: auto; }
.slp-letter__co { font-size: 19px; }
.slp-letter__meta { font-size: 13px; color: var(--slp-muted); unicode-bidi: plaintext; text-align: start; }
.slp-letter__body { white-space: pre-wrap; line-height: 2; overflow-wrap: anywhere; }
.slp-code--key { display: block; max-width: none; padding: 12px; border: 1px solid var(--slp-border); border-radius: 10px; background: #fafbfc; font-size: 14px; color: var(--slp-text); user-select: all; }
.slp-print { display: none; }
@media print {
	html, body.slp { background: #fff; }
	html.slp-printing body > *:not(.slp-print) { display: none !important; }
	html.slp-printing .slp-print { display: block; }
	html.slp-printing .slp-letter { border: 0; padding: 16mm 12mm; }
}

.slp-gate { max-width: 420px; margin: 15vh auto; padding: 32px 24px; border: 1px solid var(--slp-border); border-radius: 16px; background: #fff; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.slp-gate h1 { font-size: 22px; }
.slp-gate p { color: var(--slp-muted); font-size: 14px; }

/* ------------------------------------------------------------------ sign-in page (same look as the CRM sign-in page) */
body.slp-signin { background: #fff; }
.slp-auth { display: grid; grid-template-columns: 46fr 54fr; min-height: 100vh; min-height: 100dvh; background: #fff; }
.slp-auth__form { display: flex; align-items: center; justify-content: center; padding: 56px 24px; background: #fff; }
.slp-auth__inner { width: 100%; max-width: 380px; text-align: center; }
.slp-auth__logo { display: inline-block; margin-bottom: 34px; text-decoration: none; }
.slp-auth__logo img { display: block; width: 247px; max-width: 100%; height: auto; }
.slp-auth__logo .slp-brand__mark { width: 56px; height: 56px; font-size: 18px; border-radius: 14px; }
.slp .slp-auth__title { margin: 0 0 14px; font-family: var(--slp-head); font-size: 38px; line-height: 1.18; letter-spacing: 0; color: #14201a; }
.slp .slp-auth__sub { margin: 0 auto 34px; max-width: 340px; font-size: 16px; line-height: 1.7; color: #8a919e; }
.slp-auth__msg { margin: 0 0 18px; padding: 10px 14px; border-radius: 10px; background: var(--slp-brand-soft); color: var(--slp-brand); font-size: 14px; text-align: start; }
.slp-auth__msg.is-error { background: #fdecea; color: var(--slp-bad); }
.slp-auth__fields { display: flex; flex-direction: column; gap: 16px; text-align: start; }
.slp-auth__field { display: flex; flex-direction: column; gap: 6px; }
.slp-auth__field label { font-size: 13px; color: #5b6472; }
.slp-auth__field input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #d2ddd6; border-radius: 10px; background: #fff; color: #17201b; font-size: 15px; }
.slp-auth__field input::placeholder { color: #a0a8b3; }
.slp-auth__field input:focus { outline: 3px solid var(--slp-brand-soft); outline-offset: 0; border-color: var(--slp-brand); }
.slp-auth__pwd { position: relative; }
.slp-auth__pwd input { padding-inline-end: 70px; }
.slp-auth__toggle { position: absolute; inset-block: 0; inset-inline-end: 6px; margin: auto 0; height: 30px; padding: 0 6px; border: 0; background: transparent; color: var(--slp-brand); font-size: 13px; cursor: pointer; }
.slp-auth__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #5b6472; }
.slp-auth__row a { color: var(--slp-brand); text-decoration: none; }
.slp-auth__check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.slp-auth__check input { accent-color: var(--slp-brand); }
.slp-auth__btn { width: 100%; height: 48px; margin-top: 4px; border: 0; border-radius: 10px; background: var(--slp-brand); color: #fff; font-size: 15px; cursor: pointer; transition: background .15s ease; }
.slp-auth__btn:hover { background: var(--slp-brand-dark); }
.slp-auth__btn:disabled { opacity: .7; cursor: default; }
.slp .slp-auth__note { margin: 0; font-size: 12px; line-height: 1.6; color: #8a919e; text-align: center; }
.slp-auth__links { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 40px; }
.slp-auth__links a { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: #5b6472; text-decoration: none; }
.slp-auth__links a:hover { color: var(--slp-brand); }
.slp-auth__links .slp-ic { width: 15px; height: 15px; }
.slp .slp-auth__foot { margin: 22px 0 0; font-size: 12px; color: #a0a8b3; }
.slp-auth__side { background-color: #067a3e; background-position: center; background-size: cover; background-repeat: no-repeat; }
@media (max-width: 900px) {
	.slp-auth { grid-template-columns: minmax(0, 1fr); }
	.slp-auth__side { display: none; }
	.slp-auth__form { padding: 40px 20px; }
	.slp .slp-auth__title { font-size: 32px; }
}

/* ------------------------------------------------------------------ tablet and phone */
@media (max-width: 1100px) {
	.slp-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.slp-stats--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.slp-grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
	.slp-side { width: min(300px, 86vw); transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
	html[dir="rtl"] .slp-side { transform: translateX(100%); }
	.slp-app.is-open .slp-side { transform: none; visibility: visible; transition: transform .2s ease, visibility 0s; }
	.slp-app.is-open .slp-scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(23, 32, 27, .35); }
	.slp-content { margin-inline-start: 0; }
	.slp-menubtn { display: inline-grid; }
	.slp-top { min-height: 64px; padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
	.slp-main { padding: 18px 16px 48px; }
	.slp-head h1 { font-size: 20px; }
	.slp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.slp-card { padding: 16px; }
	.slp-form { grid-template-columns: minmax(0, 1fr); }
	.slp-card .slp-stats--3 { grid-template-columns: minmax(0, 1fr); }
	.slp-overlay { padding: 0; align-items: flex-end; }
	.slp-modal, .slp-modal--wide { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; }
	.slp-toolbar .slp-input, .slp-toolbar input[type="search"] { flex: 1 1 100%; max-width: none; }
	.slp-facts { grid-template-columns: minmax(0, 1fr); }
	/* Tables become one card per row, each value under its own label. */
	.slp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.slp-table, .slp-table tbody, .slp-table tr, .slp-table td, .slp-table th[scope="row"] { display: block; width: 100%; }
	.slp-table tr { padding: 12px 16px; border-bottom: 1px solid #eef0f3; }
	.slp-card .slp-table tr { padding-inline: 0; }
	.slp-table tbody tr:last-child { border-bottom: 0; }
	.slp-table td, .slp-table td:first-child, .slp-table td:last-child { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 12px; padding: 4px 0; border: 0; }
	.slp-table td::before { content: attr(data-label); font-size: 12px; color: var(--slp-muted); }
	.slp-table td:empty, .slp-table td.is-na { display: none; }
	.slp-table td.slp-col-acts { display: block; }
	.slp-table td.slp-col-acts::before { content: none; }
	.slp-rowacts { justify-content: flex-start; }
	.slp-table tr.is-link:hover td { background: none; }
	.slp-matrix th[scope="row"] { padding: 0 0 4px; border: 0; }
	.slp-code { max-width: 100%; }
}
@media (max-width: 640px) {
	.slp-gsearch { order: 3; flex-basis: 100%; max-width: none; }
}
@media (max-width: 520px) {
	.slp-stats, .slp-stats--3 { grid-template-columns: minmax(0, 1fr); }
	.slp-head .slp-actions, .slp-head .slp-actions .slp-btn { width: 100%; }
	.slp-fact { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.slp-fact dd { margin-bottom: 6px; }
	.slp-langbtn { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.slp *, .slp *::before, .slp *::after { transition: none !important; }
}
