/* ================================================================
   SYSPROFILER ADMIN THEME
   Bootstrap 5.3 is the base UI framework.
   ================================================================ */

:root {
	/* General */
	--color-page: #f7f8f7;
	--color-header: #fff;
	--color-header-border: rgba(15, 39, 61, 0.1);
	--color-text: #142536;
	--color-muted: #667481;
	--color-nav: #142536;
	--color-primary: #0b1f33;
	--color-primary-dark: #082a40;
	--color-secondary: #123e5a;
	--color-accent: #287c91;

	/* Layout */
	--container-width: 1600px;
	--header-height: 88px;
	--container-gutter: 48px;

	/* Spacing */
	--section-padding: 72px;
	--section-padding-large: 104px;
	--section-header-gap: 48px;
	--content-gap: 24px;
	--grid-gap: 18px;

	/* Cards / borders */
	--color-card: #fff;
	--color-border: rgba(11, 31, 51, 0.12);
	--shadow: 0 20px 60px rgba(7, 31, 50, 0.14);

	/* Button */
	--color-button-text: #fff;
	--color-button-hover-bg: rgba(255, 255, 255, 0.04);

	/* Icons */
	--color-icon-border: rgba(40, 124, 145, 0.48);
	--color-icon-border-light: rgba(40, 124, 145, 0.35);
	--color-icon-bg: rgba(40, 124, 145, 0.05);

	/* Extended content */
	--color-section-text: #5d6670;
	--color-section-text-secondary: rgba(255, 255, 255, 0.62);
	--color-highlight-bg: #f4f8fa;

	/* Dark surfaces */
	--color-hero-bg: #0b1f33;
	--color-hero-text: #fff;
	--color-hero-muted: rgba(255, 255, 255, 0.82);
	--color-hero-overlay: linear-gradient(
		90deg,
		rgba(7, 28, 45, 0.94),
		rgba(7, 28, 45, 0.7) 46%,
		rgba(7, 28, 45, 0.22)
	);
	--color-hero-overlay-mobile: linear-gradient(
		90deg,
		rgba(7, 28, 45, 0.92),
		rgba(7, 28, 45, 0.62)
	);

	/* Sections */
	--color-services-bg: #0b1f33;
	--color-services-text: #fff;
	--color-services-muted: rgba(255, 255, 255, 0.7);
	--color-service-border: rgba(255, 255, 255, 0.16);
	--color-service-icon-bg: rgba(41, 169, 214, 0.16);
	--color-claim-bg: #f7f8f7;
	--color-about-bg: #e9eef0;
	--color-references-bg: #f7f8f7;

	/* Contact */
	--color-contact-bg: #071f32;
	--color-contact-card: rgba(11, 31, 51, 0.12);
	--color-contact-border: rgba(255, 255, 255, 0.32);
	--color-contact-heading: #fff;
	--color-contact-text: rgba(255, 255, 255, 0.86);
	--color-contact-muted: rgba(255, 255, 255, 0.68);
	--color-contact-icon-bg: rgba(41, 169, 214, 0.16);
	--color-contact-line: rgba(255, 255, 255, 0.22);

	/* Footer */
	--color-footer-bg: #061522;
	--color-footer-text: rgba(255, 255, 255, 0.65);
	--color-footer-muted: rgba(255, 255, 255, 0.62);
	--color-footer-border: rgba(255, 255, 255, 0.14);

	/* Admin */
	--admin-success: #159a6b;
	--admin-warning: #c98200;
	--admin-danger: #c84a4a;

	--admin-success-subtle: #e9f8f2;
	--admin-warning-subtle: #fff4df;
	--admin-danger-subtle: rgba(200, 74, 74, 0.12);
	--admin-info-subtle: rgba(40, 124, 145, 0.12);
	--admin-secondary-subtle: #eef2f5;

	--admin-radius: 12px;
	--admin-radius-sm: 8px;
	--admin-shadow: 0 10px 30px rgba(7, 31, 50, 0.08);
}

/* ================================================================
   Base
   ================================================================ */

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

body.sp-body {
	margin: 0;
	background: var(--color-page);
	color: var(--color-text);
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 0.9rem;
	-webkit-font-smoothing: antialiased;
}

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

a:hover {
	color: var(--color-secondary);
}

.text-primary {
	color: var(--color-accent) !important;
}

.bg-primary {
	background-color: var(--color-primary) !important;
}

/* ================================================================
   Application / Header
   ================================================================ */

.sp-app-shell {
	min-height: 100vh;
}

.sp-topbar {
	z-index: 1030;
	background: var(--color-hero-bg);
	border-bottom: 1px solid rgba(255, 255, 255, 0.10);
	box-shadow: 0 8px 24px rgba(7, 31, 50, 0.12);
}

.sp-navbar {
	min-height: var(--header-height);
	padding: 0.55rem 0;
	background: transparent;
}

.sp-layout-width,
.sp-content-width {
	width: 100%;
	max-width: var(--container-width);
	margin-inline: auto;
	padding-inline: 28px;
}

.sp-brand {
	display: flex;
	align-items: center;
	min-width: 150px;
	margin-right: 24px;
}

.sp-brand-logo {
	display: block;
	width: auto;
	max-width: 165px;
	max-height: 38px;
}

.sp-main-nav {
	gap: 4px;
}

.sp-main-nav > .nav-item > .nav-link {
	padding: 0.68rem 0.82rem;
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.78);
	font-weight: 600;
}

.sp-main-nav > .nav-item > .nav-link:hover,
.sp-main-nav > .nav-item > .nav-link:focus,
.sp-main-nav > .nav-item > .nav-link.active,
.sp-main-nav > .nav-item.show > .nav-link {
	color: #fff;
	background: rgba(255, 255, 255, 0.09);
}

.sp-main-nav > .nav-item > .nav-link.active {
	box-shadow: inset 0 -2px 0 var(--color-accent);
}

.sp-nav-dropdown {
	min-width: 220px;
	padding: 7px;
	border: 1px solid var(--color-border);
	border-radius: 10px;
	box-shadow: 0 14px 40px rgba(7, 31, 54, 0.16);
}

.sp-nav-dropdown .dropdown-item {
	padding: 0.58rem 0.7rem;
	border-radius: 7px;
	color: #334a60;
	font-size: 0.86rem;
}

.sp-nav-dropdown .dropdown-item:hover,
.sp-nav-dropdown .dropdown-item:focus {
	color: var(--color-primary);
	background: var(--color-highlight-bg);
}

.sp-user-tools {
	color: #fff;
}

.sp-icon-button {
	display: inline-flex;
	width: 38px;
	height: 38px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

.sp-icon-button:hover,
.sp-icon-button:focus {
	border-color: rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

.sp-icon-button-light {
	border-color: var(--color-border);
	background: #fff;
	color: var(--color-primary);
}

.sp-user-button,
.sp-user-button:hover,
.sp-user-button:focus {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 0.3rem 0.45rem;
	border: 0;
	background: transparent;
	color: #fff;
	box-shadow: none;
}

.sp-user-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	line-height: 1.15;
}

.sp-user-meta strong {
	color: #fff;
	font-size: 0.8rem;
}

.sp-user-meta small {
	color: rgba(255, 255, 255, 0.68);
	font-size: 0.7rem;
	margin-top: 3px;
}

.sp-user-tools-label,
.sp-tool-label {
	display: none;
}

/* ================================================================
   User Icons / Avatar
   ================================================================ */

.sp-avatar {
	--sp-avatar-size: 40px;
	--sp-avatar-radius: 50%;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--sp-avatar-size);
	height: var(--sp-avatar-size);
	min-width: var(--sp-avatar-size);
	flex: 0 0 var(--sp-avatar-size);
	overflow: hidden;
	border-radius: var(--sp-avatar-radius);
	background: #fff;
	border: 1px solid rgba(11, 31, 51, 0.12);
	color: var(--color-primary);
	vertical-align: middle;
}

.sp-avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	border-radius: inherit;
}

/* Sizes */
.sp-avatar-xs {
	--sp-avatar-size: 28px;
}

.sp-avatar-sm {
	--sp-avatar-size: 36px;
}

.sp-avatar-lg {
	--sp-avatar-size: 56px;
}

.sp-avatar-xl {
	--sp-avatar-size: 96px;
}

/* Fallback / Logo instead of person photo */
.sp-avatar.is-fallback {
	background: var(--color-primary);
	padding: calc(var(--sp-avatar-size) * 0.18);
}

.sp-avatar.is-fallback img {
	object-fit: contain;
}

/* Optional initials fallback */
.sp-avatar .sp-avatar-initials {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: calc(var(--sp-avatar-size) * 0.34);
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
}

/* XL variant for detail/profile views */
.sp-avatar-xl {
	border-width: 1px;
	box-shadow: 0 8px 24px rgba(11, 31, 51, 0.08);
}

/* ================================================================
   Content
   ================================================================ */

.sp-main-content,
.main-content {
	min-height: calc(100vh - var(--header-height));
}

.sp-page-content,
.page-content {
	padding: 30px 0 54px;
}

.sp-page-title {
	color: var(--color-text);
	font-size: 1.65rem;
	font-weight: 760;
	letter-spacing: -0.035em;
}

.sp-page-subtitle {
	color: var(--color-muted);
}

.sp-eyebrow {
	color: var(--color-accent);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* ================================================================
   Hero / Page headers
   ================================================================ */

.sp-dashboard-hero,
.sp-page-hero-content {
	position: relative;
	margin-bottom: 18px;
	padding: 25px;
	overflow: hidden;
	border: 1px solid var(--color-border);
	border-radius: var(--admin-radius);
	background: linear-gradient(135deg, var(--color-card) 0%, var(--color-highlight-bg) 100%);
	box-shadow: var(--admin-shadow);
}

.sp-dashboard-hero::after,
.sp-page-hero-content::after {
	content: "";
	position: absolute;
	top: -100px;
	right: -70px;
	width: 290px;
	height: 290px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(40, 124, 145, 0.10), transparent 70%);
	pointer-events: none;
}

.sp-page-hero-content {
	position: relative;
	z-index: 1;
}

.sp-page-icon,
.avatar-title {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border: 1px solid var(--color-icon-border-light);
	border-radius: 15px;
	background: var(--color-icon-bg) !important;
	color: var(--color-accent) !important;
	font-size: 1.65rem;
}

.sp-page-hero-content .text-white,
.sp-page-hero-content h3.text-white {
	color: var(--color-text) !important;
}

.sp-page-hero-content .text-white-50 {
	color: var(--color-muted) !important;
}

.sp-dashboard-meta {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: stretch;
	gap: 10px;
}

.sp-meta-item {
	display: flex;
	min-width: 140px;
	flex-direction: column;
	padding: 10px 13px;
	border: 1px solid var(--color-border);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.82);
}

.sp-meta-item span {
	color: var(--color-muted);
	font-size: 0.72rem;
}

.sp-meta-item strong {
	margin-top: 2px;
	font-size: 0.95rem;
}

/* ================================================================
   Cards
   ================================================================ */

.card {
	border: 1px solid var(--color-border);
	border-radius: var(--admin-radius);
	background: var(--color-card);
	box-shadow: var(--admin-shadow);
}

.card-header {
	padding: 1rem 1.15rem;
	border-bottom: 1px solid var(--color-border);
	background: var(--color-card);
}

.card-header-title {
	margin: 0;
	color: var(--color-muted);
	font-size: 0.75rem;
	font-weight: 750;
	letter-spacing: 0.045em;
	text-transform: uppercase;
}

.card-body {
	 padding: 25px;
}

/* ------------------------------------------------------------
   Information list
   ------------------------------------------------------------ */

.card-body .sp-info {
	margin: 0;
}

.card-body .sp-info-row {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(11, 31, 51, 0.08);
}

.card-body .sp-info-row:last-child {
	border-bottom: 0;
}

.card-body .sp-info dt {
	margin: 0;
	color: var(--color-muted);
	font-size: 0.74rem;
	font-weight: 700;
}

.card-body .sp-info dd {
	margin: 0;
	color: var(--color-text);
	font-size: 0.82rem;
	overflow-wrap: anywhere;
}

.card-body .sp-info-icon {
	display: inline-flex;
	width: 18px;
	align-items: center;
	justify-content: center;
	margin-right: 5px;
	color: var(--color-accent);
}

.card-footer {
	border-top: 1px solid var(--color-border);
	background: var(--color-card);
}

.sp-widget {
	overflow: hidden;
}

/* ================================================================
   Buttons
   ================================================================ */

.btn {
	border-radius: 8px;
	font-weight: 650;
	transition: background-color 0.16s ease,
	border-color 0.16s ease,
	color 0.16s ease,
	box-shadow 0.16s ease;
}

.btn-primary {
	--bs-btn-color: #fff;
	--bs-btn-bg: var(--color-primary);
	--bs-btn-border-color: var(--color-primary);
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: var(--color-primary-dark);
	--bs-btn-hover-border-color: var(--color-primary-dark);
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: var(--color-primary-dark);
	--bs-btn-active-border-color: var(--color-primary-dark);
	--bs-btn-disabled-color: rgba(255, 255, 255, 0.72);
	--bs-btn-disabled-bg: var(--color-secondary);
	--bs-btn-disabled-border-color: var(--color-secondary);
}

.btn-outline-primary {
	--bs-btn-color: var(--color-primary);
	--bs-btn-border-color: rgba(11, 31, 51, 0.30);
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: var(--color-primary);
	--bs-btn-hover-border-color: var(--color-primary);
}

.btn-outline-secondary {
	--bs-btn-color: var(--color-secondary);
	--bs-btn-bg: #fff;
	--bs-btn-border-color: rgba(11, 31, 51, 0.18);
	--bs-btn-hover-color: var(--color-primary);
	--bs-btn-hover-bg: var(--color-highlight-bg);
	--bs-btn-hover-border-color: rgba(40, 124, 145, 0.35);
}

.btn-light {
	border-color: rgba(11, 31, 51, 0.10);
	background: var(--color-highlight-bg);
	color: var(--color-primary);
}

.btn-light:hover {
	border-color: rgba(40, 124, 145, 0.28);
	background: #e9f0f3;
	color: var(--color-primary);
}

.btn-info {
	border-color: var(--color-accent);
	background: var(--color-accent);
	color: #fff;
}

.btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
}

.btn-sm {
	height: 32px;
}

.btn-sm.btn-icon {
	width: 32px;
	padding: 0;
}

/* Compatibility enforcement:
   keeps legacy/table/modal button variants on the sysProfiler primary palette. */
.btn-primary,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle,
table .btn-primary,
.modal .btn-primary {
	--bs-btn-color: #fff;
	--bs-btn-bg: var(--color-primary);
	--bs-btn-border-color: var(--color-primary);
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: var(--color-primary-dark);
	--bs-btn-hover-border-color: var(--color-primary-dark);
	--bs-btn-focus-shadow-rgb: 11, 31, 51;
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: var(--color-primary-dark);
	--bs-btn-active-border-color: var(--color-primary-dark);
	--bs-btn-disabled-color: rgba(255,255,255,.72);
	--bs-btn-disabled-bg: var(--color-secondary);
	--bs-btn-disabled-border-color: var(--color-secondary);
	background-color: var(--color-primary) !important;
	border-color: var(--color-primary) !important;
	color: #fff !important;
}

.btn-primary:hover,
table .btn-primary:hover,
.modal .btn-primary:hover {
	background-color: var(--color-primary-dark) !important;
	border-color: var(--color-primary-dark) !important;
	color: #fff !important;
}

.btn-outline-primary {
	color: var(--color-primary) !important;
	border-color: rgba(11,31,51,.30) !important;
	background-color: #fff !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
	color: #fff !important;
	border-color: var(--color-primary) !important;
	background-color: var(--color-primary) !important;
}

.btn-card-action {
	width: 16px;
	height: 16px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	line-height: 1;
}

.btn-card-action i {
	font-size: 8px;
	line-height: 1;
}

/* ================================================================
   Forms
   ================================================================ */

.form-label {
	color: #536577;
	font-size: 0.79rem;
	font-weight: 700;
}

.form-control,
.form-select {
	min-height: 46px;
	padding: 0.68rem 0.82rem;
	border: 1px solid rgba(11, 31, 51, 0.22);
	border-radius: 8px;
	background-color: #fff;
	color: var(--color-text);
	box-shadow: 0 1px 2px rgba(7, 31, 50, 0.03);
}

.form-select-sm {
	min-height: 34px;
	padding: 0.35rem 2rem 0.35rem 0.65rem;
	border-radius: 7px;
	font-size: 0.8rem;
}

textarea.form-control {
	min-height: 110px;
}

.form-control::placeholder {
	color: #8a95a2;
	opacity: 1;
}

.form-control:hover,
.form-select:hover {
	border-color: rgba(40, 124, 145, 0.52);
}

.form-control:focus,
.form-select:focus {
	border-color: var(--color-accent);
	background: #fff;
	box-shadow: 0 0 0 0.2rem rgba(40, 124, 145, 0.13);
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
	background-color: var(--color-highlight-bg);
	color: var(--color-muted);
}

.form-floating > .form-control,
.form-floating > .form-select {
	min-height: 56px;
	height: 56px;
}

.form-floating > label {
	color: #71808d;
}

.form-check-input:checked {
	border-color: var(--color-accent);
	background-color: var(--color-accent);
}

.input-group-text {
	border-color: rgba(11, 31, 51, 0.22);
	background: var(--color-highlight-bg);
	color: var(--color-primary);
}

/* ================================================================
   Tag Input
   ================================================================ */
.sp-tag-input {
	min-height: 42px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	padding: 6px 10px;
	background: #fff;
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-border-radius);
	transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
	cursor: text;
}

.sp-tag-input:focus-within {
	border-color: var(--color-accent);
	box-shadow: 0 0 0 .2rem rgba(40, 124, 145, .15);
}

.sp-tag-input-items {
	display: contents;
}

.sp-tag-input-item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 4px 8px 4px 11px;
	background: rgba(40, 124, 145, .08);
	border: 1px solid rgba(40, 124, 145, .22);
	border-radius: 999px;
	color: var(--color-primary);
	font-size: .875rem;
	line-height: 1.4;
	white-space: nowrap;
}

.sp-tag-input-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--color-muted);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.sp-tag-input-remove:hover {
	color: var(--color-primary);
}

.sp-tag-input-field {
	flex: 1 1 180px;
	min-width: 180px;
	padding: 4px 2px;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--color-text);
	font: inherit;
}

.sp-tag-input-field::placeholder {
	color: var(--color-muted);
}

/* ================================================================
   Choices.js
   Behaviour comes from official choices.min.css.
   These rules are visual overrides only.
   ================================================================ */

.choices {
	margin-bottom: 0;
	color: var(--color-text);
}

.choices__inner {
	min-height: 46px;
	padding: 0.62rem 2.4rem 0.62rem 0.82rem;
	border: 1px solid rgba(11, 31, 51, 0.22);
	border-radius: 8px;
	background: #fff;
	color: var(--color-text);
	box-shadow: 0 1px 2px rgba(7, 31, 50, 0.03);
}

.choices:hover .choices__inner {
	border-color: rgba(40, 124, 145, 0.52);
}

.choices.is-focused .choices__inner,
.choices.is-open .choices__inner {
	border-color: var(--color-accent);
	box-shadow: 0 0 0 0.2rem rgba(40, 124, 145, 0.13);
}

.choices__placeholder {
	color: #8793a0;
	opacity: 1;
}

.choices__list--single {
	padding: 0;
}

.choices__list--dropdown,
.choices__list[aria-expanded] {
	z-index: 1095;
	margin-top: 6px;
	overflow: hidden;
	border: 1px solid rgba(11, 31, 51, 0.16);
	border-radius: 10px;
	background: #fff;
	color: var(--color-text);
	box-shadow: 0 18px 45px rgba(7, 31, 50, 0.16);
}

.choices__list--dropdown .choices__list,
.choices__list[aria-expanded] .choices__list {
	max-height: 310px;
}

.choices__list--dropdown .choices__item,
.choices__list[aria-expanded] .choices__item {
	padding: 11px 14px;
	color: var(--color-text);
	font-size: 0.93rem;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
	background: var(--color-highlight-bg);
	color: var(--color-primary);
}

.choices__list--dropdown .choices__item--selectable::after,
.choices__list[aria-expanded] .choices__item--selectable::after {
	display: none;
}

.choices__input {
	width: calc(100% - 20px);
	margin: 10px;
	padding: 0.65rem 0.78rem;
	border: 1px solid rgba(11, 31, 51, 0.22);
	border-radius: 8px;
	background: #fff;
	color: var(--color-text);
}

.choices__input:focus {
	border-color: var(--color-accent);
	outline: 0;
	box-shadow: 0 0 0 0.18rem rgba(40, 124, 145, 0.10);
}

.choices__list--multiple .choices__item {
	margin: 2px 4px 2px 0;
	padding: 5px 9px;
	border: 1px solid rgba(40, 124, 145, 0.24);
	border-radius: 999px;
	background: rgba(40, 124, 145, 0.10);
	color: var(--color-secondary);
	font-size: 0.78rem;
	font-weight: 600;
}

/* ================================================================
   Tables
   ================================================================ */

.table {
	--bs-table-bg: transparent;
	--bs-table-striped-bg: #f9fbfd;
	--bs-table-hover-bg: #f8fbff;
	margin-bottom: 0;
}

.table > :not(caption) > * > * {
	padding: 0.78rem 0.72rem;
	border-bottom-color: #e8edf3;
}

.table thead th {
	color: #708195;
	font-size: 0.71rem;
	font-weight: 750;
	letter-spacing: 0.045em;
	text-transform: uppercase;
	white-space: nowrap;
}

.table td {
	font-size: 0.86rem;
}

.sp-table-wrap {
	overflow: hidden;
	border: 1px solid var(--color-border);
	border-radius: 10px;
}

.table-nowrap {
	white-space: nowrap;
}

.table-centered td,
.table-centered th {
	vertical-align: middle;
}

.table-scroll {
	max-height: 300px;
	overflow-y: auto;
}

.table-scroll thead {
	position: sticky;
	top: 0;
	z-index: 2;
}

/* ================================================================
   Pagination
   ================================================================ */

.pagination {
	--bs-pagination-color: var(--color-primary);
	--bs-pagination-bg: #fff;
	--bs-pagination-border-color: var(--color-border);

	--bs-pagination-hover-color: #fff;
	--bs-pagination-hover-bg: var(--color-accent);
	--bs-pagination-hover-border-color: var(--color-accent);

	--bs-pagination-focus-color: var(--color-primary);
	--bs-pagination-focus-bg: var(--color-highlight-bg);
	--bs-pagination-focus-box-shadow: none;

	--bs-pagination-active-color: #fff;
	--bs-pagination-active-bg: var(--color-primary);
	--bs-pagination-active-border-color: var(--color-primary);

	--bs-pagination-disabled-color: var(--color-muted);
	--bs-pagination-disabled-bg: #fff;
	--bs-pagination-disabled-border-color: var(--color-border);
}

.pagination .page-link {
	color: var(--color-primary);
	background-color: #fff;
	border-color: var(--color-border);
	font-weight: 650;
}

.pagination .page-link:hover {
	color: #fff;
	background-color: var(--color-accent);
	border-color: var(--color-accent);
}

.pagination .page-link:focus {
	color: var(--color-primary);
	background-color: var(--color-highlight-bg);
	border-color: var(--color-accent);
	box-shadow: none;
}

.pagination .page-item.active .page-link {
	color: #fff;
	background-color: var(--color-primary);
	border-color: var(--color-primary);
}

.pagination .page-item.disabled .page-link {
	color: var(--color-muted);
	background-color: #fff;
	border-color: var(--color-border);
}

.pagination-sm .page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0.3rem 0.55rem;
}

/* ================================================================
   Tabs
   ================================================================ */

.sp-section-tabs,
.nav-pills,
.sp-tabs {
	gap: 4px;
	border-bottom: 1px solid var(--color-border);
}

.nav-pills .nav-link,
.sp-tabs .nav-link,
.sp-section-tabs .nav-link {
	position: relative;
	margin-bottom: -1px;
	padding: 0.78rem 0.95rem;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--color-muted);
	font-weight: 650;
	box-shadow: none;
}

.nav-pills .nav-link:hover,
.sp-tabs .nav-link:hover,
.sp-section-tabs .nav-link:hover {
	background: transparent;
	color: var(--color-primary);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link,
.sp-tabs .nav-link.active,
.sp-section-tabs .nav-link.active {
	background: transparent;
	color: var(--color-primary);
}

.nav-pills .nav-link.active::after,
.nav-pills .show > .nav-link::after,
.sp-tabs .nav-link.active::after,
.sp-section-tabs .nav-link.active::after {
	content: "";
	position: absolute;
	right: 0.75rem;
	bottom: -1px;
	left: 0.75rem;
	height: 2px;
	border-radius: 999px;
	background: var(--color-accent);
}

.nav-tabs {
	border-color: var(--color-border);
}

.nav-tabs .nav-link {
	border: 0;
	border-bottom: 2px solid transparent;
	color: var(--color-muted);
	font-weight: 650;
}

.nav-tabs .nav-link.active {
	border-bottom-color: var(--color-accent);
	background: transparent;
	color: var(--color-primary);
}

/* ================================================================
   Dropdown / Accordion / Modal
   ================================================================ */

.dropdown-menu {
	border-color: var(--color-border);
	border-radius: 10px;
	box-shadow: 0 12px 35px rgba(17, 42, 67, 0.13);
}

.dropdown-item {
	font-size: 0.86rem;
}

.accordion-item {
	border-color: var(--color-border);
}

.accordion-button:not(.collapsed) {
	background: var(--color-icon-bg);
	color: var(--color-primary);
	box-shadow: none;
}

.modal-backdrop.show {
	opacity: 0.48;
}

.modal-content {
	overflow: hidden;
	border: 1px solid var(--color-border);
	border-radius: 14px;
	box-shadow: var(--shadow);
}

.modal-header,
.sp-modal-header {
	padding: 1.1rem 1.25rem;
	border-bottom: 1px solid var(--color-border);
	background: #fff;
	color: var(--color-text);
}

.modal-title {
	color: var(--color-text);
	font-weight: 750;
}

.modal-body {
	padding: 1.25rem;
}

.modal-footer {
	padding: 1rem 1.25rem;
	border-top: 1px solid var(--color-border);
}

.modal-dialog-right {
	margin-right: 1.25rem;
	margin-left: auto;
}

.modal-dialog-right .modal-content {
	min-height: calc(100vh - 3.5rem);
}


/* ================================================================
   Status / Notifications
   ================================================================ */

.badge {
	padding: 0.42em 0.7em;
	border-radius: 999px;
	font-weight: 700;
}

/* ------------------------------------------------------------
   Status colors
   ------------------------------------------------------------ */

.text-success {
	color: var(--admin-success) !important;
}

.text-warning {
	color: var(--admin-warning) !important;
}

.text-danger {
	color: var(--admin-danger) !important;
}

.text-info,
.text-accent {
	color: var(--color-accent) !important;
}

.bg-success {
	background-color: var(--admin-success) !important;
}

.bg-warning {
	background-color: var(--admin-warning) !important;
}

.bg-danger {
	background-color: var(--admin-danger) !important;
}

.bg-info,
.bg-accent {
	background-color: var(--color-accent) !important;
}

/* ------------------------------------------------------------
   Subtle status colors
   ------------------------------------------------------------ */

.bg-success-subtle {
	background-color: var(--admin-success-subtle) !important;
}

.bg-warning-subtle {
	background-color: var(--admin-warning-subtle) !important;
}

.bg-danger-subtle {
	background-color: var(--admin-danger-subtle) !important;
}

.bg-info-subtle,
.bg-accent-subtle {
	background-color: var(--admin-info-subtle) !important;
}

.bg-primary-subtle {
	background-color: var(--color-icon-bg) !important;
}

.bg-secondary-subtle {
	background-color: var(--admin-secondary-subtle) !important;
}

.toast-container {
	position: fixed !important;
	z-index: 1090;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.toast {
	border: 1px solid var(--color-border);
	border-radius: 10px;
	box-shadow: var(--shadow);
}

.toast-border-success {
	border-left: 4px solid var(--admin-success);
}

.toast-border-danger {
	border-left: 4px solid var(--admin-danger);
}

.toast-border-warning {
	border-left: 4px solid var(--admin-warning);
}

.toast-border-info {
	border-left: 4px solid var(--color-accent);
}

/* ================================================================
   Authentication
   ================================================================ */

.sp-auth-page {
	position: relative;
	display: flex;
	min-height: 100vh;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 40px 0;
	background: radial-gradient(circle at 80% 10%, #174b74 0, #092744 42%, #061b30 100%);
}

.sp-auth-page::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(
		135deg,
		transparent 0 48%,
		rgba(255, 255, 255, 0.025) 48% 49%,
		transparent 49% 100%
	);
	background-size: 46px 46px;
}

.sp-auth-content {
	position: relative;
	z-index: 1;
	width: 100%;
}

.sp-auth-logo img {
	max-width: 210px;
	max-height: 64px;
}

.sp-auth-card {
	border: 0;
	border-radius: 16px;
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26);
}

.sp-auth-card .card-body {
	padding: 2rem !important;
}

.auth-pass-inputgroup .password-addon {
	z-index: 3;
	height: 46px;
}

/* ================================================================
   Third-party UI
   ================================================================ */

.trumbowyg-box,
.trumbowyg-editor {
	border-color: var(--color-border) !important;
}

.dropzone {
	border: 1px dashed rgba(40, 124, 145, 0.40) !important;
	border-radius: 10px !important;
	background: #fbfdff !important;
}

.flatpickr-calendar {
	border-color: var(--color-border);
	border-radius: 10px;
	box-shadow: 0 14px 40px rgba(7, 31, 50, 0.14);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
	border-color: var(--color-primary);
	background: var(--color-primary);
}

/* ================================================================
   Runtime helpers
   ================================================================ */

#preloader {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(247, 248, 247, 0.94);
	opacity: 1;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

#preloader .sp-preloader-content {
	display: grid;
	justify-items: center;
	align-items: center;
	width: max-content;
	margin: 0;
	padding: 0;
}

#preloader .spinner-border {
	margin: 0;
}

#preloader .sp-preloader-text {
	margin: 12px 0 0 0;
	padding: 0;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1;
	text-align: center;
	color: var(--color-accent);
}

#preloader.sp-preloader-hidden {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

#back-to-top {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 1020;
	display: none;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
}

/* ================================================================
   Small compatibility helpers still used by current PHP views
   ================================================================ */

.fs-14 {
	font-size: 0.875rem !important;
}

.fs-16 {
	font-size: 1rem !important;
}

.fw-medium {
	font-weight: 600 !important;
}

.avatar-lg {
	width: 72px;
	height: 72px;
}


/* ------------------------------------------------------------
   User Menu – Desktop
   ------------------------------------------------------------ */
/* Matches the header-tool visual language; mobile uses the responsive navigation treatment below. */

@media (min-width: 992px) {
	.sp-user-menu {
		min-width: 290px;
		padding: 8px;
	}

	.sp-user-menu .dropdown-header {
		padding: 7px 12px 8px;
		color: var(--color-muted);
		font-size: 0.68rem;
		font-weight: 750;
		letter-spacing: 0.06em;
		text-transform: uppercase;
	}

	.sp-user-menu .dropdown-item {
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 10px 12px;
		border-radius: 8px;
		color: var(--color-text);
	}

	.sp-user-menu .dropdown-item + .dropdown-item {
		margin-top: 3px;
	}

	.sp-user-menu .dropdown-item:hover,
	.sp-user-menu .dropdown-item:focus {
		background: var(--color-highlight-bg);
		color: var(--color-primary);
	}

	.sp-user-menu-icon {
		display: inline-flex;
		width: 34px;
		height: 34px;
		flex: 0 0 34px;
		align-items: center;
		justify-content: center;
		border-radius: 50%;
		background: var(--color-icon-bg);
		color: var(--color-accent);
		font-size: 1.05rem;
	}

	.sp-user-menu-text {
		display: flex;
		min-width: 0;
		flex-direction: column;
	}

	.sp-user-menu-text strong {
		color: var(--color-text);
		font-size: 0.86rem;
		font-weight: 700;
	}

	.sp-user-menu-text small {
		margin-top: 2px;
		color: var(--color-muted);
		font-size: 0.72rem;
	}

	.sp-user-menu .dropdown-divider {
		margin: 7px 8px;
		border-color: var(--color-border);
	}

	.sp-user-menu .sp-user-menu-logout {
		color: var(--admin-danger);
	}

	.sp-user-menu .sp-user-menu-logout .sp-user-menu-icon {
		background: rgba(200, 74, 74, 0.08);
		color: var(--admin-danger);
	}

	.sp-user-menu .sp-user-menu-logout .sp-user-menu-text strong {
		color: var(--admin-danger);
	}

	.sp-user-menu .sp-user-menu-logout:hover,
	.sp-user-menu .sp-user-menu-logout:focus {
		background: rgba(200, 74, 74, 0.06);
		color: var(--admin-danger);
	}
}


/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 991.98px) {
	.sp-layout-width,
	.sp-content-width {
		padding-inline: 16px;
	}

	.sp-navbar {
		min-height: 64px;
	}

	.sp-brand-logo {
		max-height: 34px;
	}

	.sp-main-nav {
		padding-top: 0.6rem;
	}

	.sp-user-tools {
		display: flex !important;
		width: 100%;
		flex-direction: column;
		align-items: stretch !important;
		gap: 4px !important;
		margin-top: 24px;
		padding: 20px 0 0.8rem;
		border-top: 1px solid rgba(255, 255, 255, 0.14);
	}

	.sp-user-tools-label {
		display: block;

		margin: 0 0 6px;
		padding: 0 10px;

		color: rgba(255, 255, 255, 0.5);

		font-size: 0.68rem;
		font-weight: 700;
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}


	.sp-user-tools-label-user {
		margin-top: 18px;
		padding-top: 18px;

		border-top: 1px solid rgba(255, 255, 255, 0.14);
	}


	.sp-tool-button {
		display: flex;
		width: 100%;
		height: auto;

		align-items: center;
		justify-content: flex-start;

		gap: 14px;

		padding: 11px 10px;

		border: 0;
		border-radius: 8px;

		background: transparent;

		color: rgba(255, 255, 255, 0.82);
		text-align: left;
	}


	.sp-tool-button:hover,
	.sp-tool-button:focus {
		background: rgba(255, 255, 255, 0.06);
		color: #fff;
	}


	.sp-tool-button > i {
		width: 24px;

		color: #fff;
		font-size: 1.15rem;
		text-align: center;
	}


	.sp-tool-label {
		display: inline;
		font-size: 0.9rem;
		font-weight: 500;
	}



	.sp-user-dropdown {
		width: 100%;
	}


	.sp-user-button {
		width: 100%;

		justify-content: flex-start;

		padding: 10px;

		border-radius: 10px;

		background: rgba(255, 255, 255, 0.06);
	}

	.sp-user-button .sp-user-meta {
		flex: 1 1 auto;
		min-width: 0;

		text-align: left;
	}

	/* Bootstrap dropdown arrow to the far right */
	.sp-user-button.dropdown-toggle::after {
		margin-left: auto;
	}

	.sp-user-dropdown > .sp-user-menu {
		position: static !important;

		width: 100%;
		min-width: 0;

		margin-top: 6px;
		padding: 6px;

		transform: none !important;

		border: 1px solid rgba(255, 255, 255, 0.08);
		border-radius: 10px;

		background: rgba(255, 255, 255, 0.04);

		box-shadow: none;
	}


	.sp-user-menu .dropdown-header {
		color: rgba(255, 255, 255, 0.45);
	}


	.sp-user-menu .dropdown-item {
		color: rgba(255, 255, 255, 0.82);
	}


	.sp-user-menu .dropdown-item:hover,
	.sp-user-menu .dropdown-item:focus {
		background: rgba(255, 255, 255, 0.06);
		color: #fff;
	}


	.sp-user-menu .dropdown-divider {
		border-color: rgba(255, 255, 255, 0.14);
	}

	.sp-dashboard-meta {
		flex-wrap: wrap;
	}

	.sp-page-content,
	.page-content {
		padding-top: 20px;
	}

	.sp-dashboard-hero,
	.sp-page-hero-content {
		padding: 20px;
	}

	.modal-dialog-right {
		margin: 0.5rem;
	}
}

@media (max-width: 575.98px) {
	.sp-content-width {
		padding-inline: 12px;
	}

	.sp-dashboard-hero,
	.sp-page-hero-content {
		padding: 18px;
	}

	.sp-page-title {
		font-size: 1.35rem;
	}

	.sp-meta-item {
		min-width: calc(50% - 5px);
		flex: 1;
	}

	.card-body {
		padding: 1rem;
	}

	.table > :not(caption) > * > * {
		padding: 0.65rem 0.55rem;
	}
}
