/*
 * Responsive foundation for the legacy Yii/Bootstrap CRM.
 * Loaded after the historical styles so the application can be improved
 * incrementally without changing business views or generated PDF layouts.
 */
:root {
	--crm-navy-950: #102a43;
	--crm-navy-800: #243b53;
	--crm-blue-600: #0875c1;
	--crm-blue-100: #e6f4ff;
	--crm-slate-900: #243b53;
	--crm-slate-600: #627d98;
	--crm-slate-300: #bcccdc;
	--crm-slate-200: #d9e2ec;
	--crm-slate-100: #f0f4f8;
	--crm-white: #fff;
	--crm-danger: #c53030;
	--crm-success: #2f855a;
	--crm-warning: #b7791f;
	--crm-radius: 10px;
	--crm-shadow: 0 8px 24px rgba(16, 42, 67, 0.08);
}

html {
	box-sizing: border-box;
	min-width: 320px;
	-webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

body,
html {
	color: var(--crm-slate-900);
	font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
	font-size: 14px !important;
	background: var(--crm-slate-100);
}

body {
	min-height: 100vh;
}

#container {
	display: block;
	min-height: calc(100vh - 56px);
}

#header {
	min-height: 82px;
	background: var(--crm-navy-950);
}

#logo {
	padding: 10px clamp(15px, 3vw, 32px);
}

#logo img {
	display: block;
	width: auto;
	max-width: 100%;
	height: 62px;
	object-fit: contain;
}

#menu-top.navbar {
	min-height: 50px;
	margin: 0 0 16px;
	border: 0;
	border-radius: 0;
	background: var(--crm-white);
	box-shadow: 0 2px 10px rgba(16, 42, 67, 0.08);
}

#menu-top .navbar-nav > li > a {
	color: var(--crm-navy-800);
	font-weight: 600;
}

#menu-top .navbar-nav > .active > a,
#menu-top .navbar-nav > .active > a:hover,
#menu-top .navbar-nav > .open > a,
#menu-top .navbar-nav > li > a:hover {
	color: var(--crm-blue-600);
	background: var(--crm-blue-100);
}

#menu-top .navbar-toggle {
	min-width: 44px;
	min-height: 44px;
	margin-top: 3px;
	border-color: var(--crm-slate-300);
}

#menu-top .navbar-toggle .icon-bar {
	background: var(--crm-navy-800);
}

#app-content {
	display: flow-root;
	width: 100%;
	padding: 0 clamp(12px, 2vw, 28px) 24px;
}

.breadcrumb {
	margin: 0 clamp(12px, 2vw, 28px) 16px !important;
	padding: 10px 14px;
	border: 1px solid var(--crm-slate-200);
	border-radius: var(--crm-radius);
	box-shadow: 0 2px 8px rgba(16, 42, 67, 0.04);
}

.breadcrumb > li {
	font-size: 12px;
}

h1,
#content-page h1 {
	color: var(--crm-navy-950);
	font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: clamp(24px, 3vw, 34px);
	font-weight: 700;
	line-height: 1.25;
}

.panel,
.well,
div.view {
	border-color: var(--crm-slate-200);
	border-radius: var(--crm-radius);
	box-shadow: var(--crm-shadow);
}

.panel-heading {
	border-radius: var(--crm-radius) var(--crm-radius) 0 0;
	font-weight: 700;
}

.form-control {
	min-height: 38px;
	border-color: var(--crm-slate-300);
	border-radius: 7px;
	box-shadow: none;
}

.form-control:focus {
	border-color: var(--crm-blue-600);
	box-shadow: 0 0 0 3px rgba(8, 117, 193, 0.14);
}

.btn {
	border-radius: 7px;
	font-weight: 600;
}

.btn-primary {
	border-color: var(--crm-blue-600);
	background: var(--crm-blue-600);
}

.grid-view,
.table-responsive,
.wrap-table-task-list,
.wrap-client-profits {
	max-width: 100%;
}

.grid-view table.items,
.table {
	background: var(--crm-white);
}

.grid-view table.items th,
.grid-view table.items td,
.table th,
.table td {
	vertical-align: middle;
}

.grid-view table.items tr:hover,
.table > tbody > tr:hover {
	background-color: #fff7d6 !important;
}

.pagination > li > a,
.pagination > li > span {
	min-width: 36px;
	min-height: 36px;
	text-align: center;
}

.modal-dialog,
.modalFormClientPotential .modal-dialog,
.modalFormNewEquipment .modal-dialog,
.modalFormViewReservation .modal-dialog,
.modalFormUpdateReservation .modal-dialog,
.modalViewHistory .modal-dialog,
.modalFormHistoryActionView .modal-dialog {
	width: min(92vw, 1100px);
	max-width: 1100px;
	margin-right: auto;
	margin-left: auto;
}

#sidebar {
	padding: 0 0 20px;
}

#sidebar .list-group-item {
	min-height: 40px;
	border-color: var(--crm-slate-200);
}

#footer {
	margin: 0;
	padding: 18px 12px;
	color: var(--crm-slate-600);
	border-color: var(--crm-slate-200);
	background: var(--crm-white);
}

@media (min-width: 768px) {
	.dropdown:hover > .dropdown-menu {
		display: block;
	}
}

@media (max-width: 991px) {
	.wrap-client-profits {
		float: none;
		width: 100%;
		margin-right: 0;
	}

	#sidebar {
		clear: both;
		padding: 10px 0 20px;
	}
}

@media (max-width: 767px) {
	#header {
		min-height: 64px;
	}

	#logo {
		padding: 8px 15px;
	}

	#logo img {
		height: 48px;
	}

	#menu-top .navbar-collapse {
		max-height: calc(100vh - 132px);
		padding-bottom: 10px;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	#menu-top .navbar-nav {
		margin-top: 4px;
		margin-bottom: 4px;
	}

	#menu-top .navbar-nav > li > a,
	#menu-top .dropdown-menu > li > a {
		min-height: 44px;
		padding-top: 12px;
		padding-bottom: 12px;
	}

	#menu-top .dropdown:hover > .dropdown-menu {
		display: none;
	}

	#menu-top .dropdown.open > .dropdown-menu {
		display: block;
	}

	#app-content {
		padding-right: 10px;
		padding-left: 10px;
	}

	.breadcrumb {
		margin-right: 10px !important;
		margin-left: 10px !important;
		overflow-x: auto;
		white-space: nowrap;
	}

	.row {
		margin-right: -8px;
		margin-left: -8px;
	}

	[class*="col-"] {
		padding-right: 8px;
		padding-left: 8px;
	}

	.dashboard {
		padding: 8px !important;
	}

	.wide.form,
	#login-form {
		width: 100% !important;
		max-width: 100%;
	}

	.form-control,
	select,
	textarea,
	input[type="text"],
	input[type="email"],
	input[type="password"],
	input[type="number"],
	input[type="tel"] {
		max-width: 100%;
		font-size: 16px !important;
	}

	.btn,
	button,
	input[type="button"],
	input[type="submit"] {
		min-height: 42px;
	}

	.grid-view,
	.table-responsive,
	.wrap-table-task-list,
	table.profits-new-current {
		width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.grid-view table.items,
	.wrap-table-task-list table,
	table.profits-new-current {
		min-width: 680px;
	}

	.detail-view {
		table-layout: fixed;
	}

	.detail-view th,
	.detail-view td {
		width: auto !important;
		overflow-wrap: anywhere;
	}

	.popover,
	.popover-content {
		width: auto;
		max-width: calc(100vw - 24px) !important;
	}

	.ui-dialog,
	.jPicker.Container,
	table.jPicker {
		max-width: calc(100vw - 20px) !important;
	}

	.modal-dialog,
	.modalFormClientPotential .modal-dialog,
	.modalFormNewEquipment .modal-dialog,
	.modalFormViewReservation .modal-dialog,
	.modalFormUpdateReservation .modal-dialog,
	.modalViewHistory .modal-dialog,
	.modalFormHistoryActionView .modal-dialog {
		width: auto;
		max-width: none;
		margin: 10px;
	}

	.modalForm .modal-content {
		padding: 10px;
	}

	.fc-header td {
		display: block;
		width: 100%;
		padding: 4px 0;
		text-align: center;
	}

	.ui-autocomplete-input {
		width: 100%;
		margin-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Authenticated home dashboard */
.crm-dashboard {
	width: 100%;
	max-width: 1680px;
	margin: 0 auto;
}

.crm-dashboard-hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 18px;
	padding: clamp(22px, 3vw, 34px);
	color: var(--crm-white);
	border-radius: 16px;
	background:
		radial-gradient(circle at 85% 15%, rgba(72, 187, 255, 0.24), transparent 34%),
		linear-gradient(125deg, #102a43 0%, #164e77 100%);
	box-shadow: 0 16px 38px rgba(16, 42, 67, 0.18);
}

.crm-dashboard-hero__copy {
	display: flex;
	align-items: flex-start;
	flex-direction: column;
	min-width: 0;
}

.crm-dashboard-eyebrow,
.crm-dashboard-card__eyebrow {
	display: block;
	margin-bottom: 5px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.crm-dashboard-eyebrow {
	color: #9bd7ff;
}

#content-page .crm-dashboard-hero h1 {
	position: static;
	display: block;
	margin: 0 0 7px;
	color: #f7fbff;
	font-size: clamp(26px, 3vw, 38px);
	line-height: 1.2;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.crm-dashboard-hero p {
	margin: 0;
	color: #d9eaf7;
	font-size: 14px;
}

.crm-quick-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 9px;
}

.crm-quick-actions .btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 10px 15px;
	border-color: rgba(255, 255, 255, 0.32);
}

.crm-quick-actions .btn-primary {
	color: var(--crm-navy-950);
	border-color: var(--crm-white);
	background: var(--crm-white);
}

.crm-quick-actions .btn-default {
	color: var(--crm-white);
	background: rgba(255, 255, 255, 0.08);
}

.crm-quick-actions .btn:hover,
.crm-quick-actions .btn:focus {
	color: var(--crm-navy-950);
	border-color: var(--crm-white);
	background: #e6f4ff;
}

.crm-kpi-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 18px;
}

.crm-kpi-card {
	display: flex;
	align-items: center;
	gap: 15px;
	min-width: 0;
	padding: 18px;
	border: 1px solid var(--crm-slate-200);
	border-radius: 13px;
	background: var(--crm-white);
	box-shadow: 0 5px 18px rgba(16, 42, 67, 0.06);
}

.crm-kpi-card__icon {
	display: inline-flex;
	flex: 0 0 46px;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	font-size: 18px;
	border-radius: 12px;
}

.crm-kpi-card > div {
	display: grid;
	min-width: 0;
}

.crm-kpi-card__label,
.crm-kpi-card small {
	overflow: hidden;
	color: var(--crm-slate-600);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.crm-kpi-card__label {
	font-size: 12px;
	font-weight: 700;
}

.crm-kpi-card strong {
	margin: 2px 0 1px;
	color: var(--crm-navy-950);
	font-size: 28px;
	line-height: 1.1;
}

.crm-kpi-card strong.crm-kpi-card__amount {
	font-size: clamp(17px, 1.6vw, 23px);
}

.crm-kpi-card--blue .crm-kpi-card__icon { color: #0868ac; background: #e3f3ff; }
.crm-kpi-card--green .crm-kpi-card__icon { color: #26734d; background: #e2f6ec; }
.crm-kpi-card--amber .crm-kpi-card__icon { color: #946200; background: #fff2cc; }
.crm-kpi-card--violet .crm-kpi-card__icon { color: #6941a5; background: #f0e7ff; }
.crm-kpi-card--red .crm-kpi-card__icon { color: #b83232; background: #ffe8e8; }
.crm-kpi-card--slate .crm-kpi-card__icon { color: #486581; background: #edf2f7; }

.crm-dashboard-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
	align-items: start;
	gap: 18px;
}

.crm-dashboard-grid--single {
	grid-template-columns: minmax(0, 1fr);
}

.crm-dashboard-main,
.crm-dashboard-sidebar {
	display: grid;
	gap: 18px;
	min-width: 0;
}

.crm-dashboard-card {
	overflow: hidden;
	border: 1px solid var(--crm-slate-200);
	border-radius: 14px;
	background: var(--crm-white);
	box-shadow: 0 5px 18px rgba(16, 42, 67, 0.06);
}

.crm-dashboard-card--today {
	border-top: 3px solid var(--crm-blue-600);
}

.crm-dashboard-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 18px 20px 15px;
	border-bottom: 1px solid var(--crm-slate-200);
}

.crm-dashboard-card__eyebrow {
	color: var(--crm-blue-600);
}

.crm-dashboard-card__header h2 {
	margin: 0;
	color: var(--crm-navy-950);
	font-size: 19px;
	font-weight: 700;
}

.crm-dashboard-card__body {
	padding: 18px 20px 20px;
}

.crm-count-badge {
	flex: 0 0 auto;
	padding: 6px 10px;
	color: #075985;
	font-size: 11px;
	font-weight: 700;
	border-radius: 999px;
	background: #e0f2fe;
}

.crm-count-badge--muted {
	color: #526778;
	background: #edf2f7;
}

.crm-card-link {
	flex: 0 0 auto;
	color: var(--crm-blue-600);
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

.crm-card-link:hover,
.crm-card-link:focus {
	color: var(--crm-navy-950);
	text-decoration: underline;
}

.crm-schedule-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.crm-schedule-group {
	min-width: 0;
}

.crm-schedule-group__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	padding: 0 2px;
	color: var(--crm-navy-800);
	font-size: 12px;
	font-weight: 700;
}

.crm-schedule-group__header span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.crm-schedule-group__header strong {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 25px;
	height: 25px;
	border-radius: 8px;
	background: var(--crm-slate-100);
}

.crm-schedule-group--delivery .crm-schedule-group__header i { color: #0875c1; }
.crm-schedule-group--return .crm-schedule-group__header i { color: #2f855a; }

.crm-event-list,
.crm-contact-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.crm-event-list li,
.crm-contact-list li {
	display: flex;
	align-items: center;
	gap: 11px;
	min-width: 0;
	padding: 11px 8px;
	border-bottom: 1px solid var(--crm-slate-200);
}

.crm-event-list li:last-child,
.crm-contact-list li:last-child {
	border-bottom: 0;
}

.crm-event-list time {
	display: grid;
	flex: 0 0 50px;
	place-items: center;
	min-height: 47px;
	padding: 5px;
	color: var(--crm-navy-950);
	border-radius: 9px;
	background: var(--crm-slate-100);
}

.crm-event-list time strong {
	font-size: 15px;
}

.crm-event-list time span {
	color: var(--crm-slate-600);
	font-size: 10px;
}

.crm-event-list__content,
.crm-contact-list__content {
	display: grid;
	flex: 1 1 auto;
	min-width: 0;
}

.crm-event-list__content strong,
.crm-contact-list__content strong {
	overflow: hidden;
	color: var(--crm-navy-950);
	font-size: 13px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.crm-event-list__client {
	display: flex;
	align-items: center;
	min-width: 0;
}

.crm-event-list__client > strong {
	min-width: 0;
}

.crm-event-list__content span,
.crm-contact-list__content span {
	margin-top: 2px;
	color: var(--crm-slate-600);
	font-size: 11px;
}

.crm-icon-action {
	display: inline-flex;
	flex: 0 0 38px;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	color: var(--crm-blue-600);
	text-decoration: none;
	border-radius: 10px;
	background: var(--crm-blue-100);
}

.crm-icon-action:hover,
.crm-icon-action:focus {
	color: var(--crm-white);
	text-decoration: none;
	background: var(--crm-blue-600);
}

.crm-contact-list__avatar {
	display: inline-flex;
	flex: 0 0 39px;
	align-items: center;
	justify-content: center;
	width: 39px;
	height: 39px;
	color: #6941a5;
	font-weight: 700;
	border-radius: 50%;
	background: #f0e7ff;
}

.crm-contact-list li.is-overdue {
	margin: 3px 0;
	padding-right: 10px;
	padding-left: 10px;
	border: 1px solid #ffc9c9;
	border-radius: 10px;
	background: #fff5f5;
}

.crm-contact-list li.is-overdue .crm-contact-list__avatar {
	color: #b83232;
	background: #ffe3e3;
}

.crm-contact-list__content a {
	color: inherit;
}

.crm-empty-state {
	display: grid;
	place-items: center;
	gap: 5px;
	min-height: 120px;
	padding: 18px;
	color: var(--crm-slate-600);
	text-align: center;
	border: 1px dashed var(--crm-slate-300);
	border-radius: 11px;
	background: #f8fafc;
}

.crm-empty-state i {
	color: var(--crm-success);
	font-size: 22px;
}

.crm-empty-state strong {
	color: var(--crm-navy-800);
}

.crm-empty-state--compact {
	display: flex;
	min-height: 62px;
	padding: 12px;
}

.crm-empty-state--compact i {
	font-size: 14px;
}

.crm-finance-summary {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.crm-finance-metric {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	padding: 13px;
	border-radius: 11px;
}

.crm-finance-metric--danger { background: #fff1f1; }
.crm-finance-metric--success { background: #edf9f2; }

.crm-finance-metric__icon {
	display: inline-flex;
	flex: 0 0 34px;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.75);
}

.crm-finance-metric--danger .crm-finance-metric__icon { color: var(--crm-danger); }
.crm-finance-metric--success .crm-finance-metric__icon { color: var(--crm-success); }

.crm-finance-metric > div {
	display: grid;
	min-width: 0;
}

.crm-finance-metric span,
.crm-finance-metric small {
	color: var(--crm-slate-600);
	font-size: 10px;
}

.crm-finance-metric strong {
	margin: 2px 0;
	color: var(--crm-navy-950);
	font-size: clamp(14px, 1.4vw, 18px);
	white-space: nowrap;
}

.crm-sales-block {
	margin-top: 18px;
}

.crm-sales-block h3 {
	margin: 0 0 8px;
	color: var(--crm-navy-800);
	font-size: 12px;
	font-weight: 700;
}

.crm-mini-table-wrap {
	max-width: 100%;
	overflow-x: auto;
}

.crm-mini-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
}

.crm-mini-table th,
.crm-mini-table td {
	padding: 9px 7px;
	font-size: 11px;
	text-align: right;
	border-bottom: 1px solid var(--crm-slate-200);
}

.crm-mini-table th:first-child,
.crm-mini-table td:first-child {
	text-align: left;
}

.crm-mini-table th {
	color: var(--crm-slate-600);
	font-weight: 700;
	background: transparent;
}

.crm-mini-table tr:last-child td {
	border-bottom: 0;
}

.crm-mini-table tr.is-below-target td:first-child {
	color: var(--crm-danger);
}

@media (max-width: 1199px) {
	.crm-kpi-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.crm-dashboard-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 767px) {
	.crm-dashboard-hero {
		align-items: flex-start;
		flex-direction: column;
		padding: 22px 18px;
		border-radius: 13px;
	}

	.crm-quick-actions {
		width: 100%;
		justify-content: flex-start;
	}

	.crm-quick-actions .btn {
		flex: 1 1 auto;
		justify-content: center;
	}

	.crm-kpi-grid,
	.crm-schedule-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.crm-kpi-card {
		padding: 14px;
	}

	.crm-dashboard-card__header {
		align-items: flex-start;
		padding: 16px 14px 13px;
	}

	.crm-dashboard-card__body {
		padding: 14px;
	}

	.crm-finance-summary {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 430px) {
	.crm-kpi-grid {
		gap: 9px;
	}

	.crm-kpi-card__icon {
		flex-basis: 40px;
		width: 40px;
		height: 40px;
	}

	.crm-kpi-card strong {
		font-size: 24px;
	}

	.crm-card-link {
		max-width: 92px;
		text-align: right;
	}
}

/* Reservation details and edit modals */
.crm-reservation-modal .modal-dialog {
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	margin-top: 20px;
	margin-bottom: 20px;
}

.crm-reservation-modal .modal-content {
	display: flex;
	flex-direction: column;
	max-width: 100%;
	max-height: inherit;
	overflow: hidden;
	padding: 0;
	border: 0;
	border-radius: 16px;
	background: #f3f7fa;
	box-shadow: 0 24px 70px rgba(16, 42, 67, 0.26);
}

/* The details view grows with its content. Only the edit form uses an
 * internally scrollable, viewport-height dialog. */
.modalFormViewReservation.crm-reservation-modal .modal-dialog,
.modalFormViewReservation.crm-reservation-modal .modal-content,
.modalFormViewReservation.crm-reservation-modal .crm-modal-shell {
	max-height: none;
}

.modalFormViewReservation.crm-reservation-modal .crm-modal-shell {
	overflow: visible;
}

.modalFormViewReservation.crm-reservation-modal .crm-modal-body {
	flex: none;
	grid-auto-rows: max-content;
	overflow: visible;
}

.modalFormViewReservation.crm-reservation-modal .crm-modal-section {
	min-height: max-content;
	flex-shrink: 0;
}

.crm-modal-shell {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	max-width: 100%;
	max-height: inherit;
	overflow: hidden;
	color: var(--crm-slate-900);
	background: #f3f7fa;
}

.crm-modal-header {
	position: relative;
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 15px;
	padding: 20px 22px;
	color: var(--crm-white);
	background:
		radial-gradient(circle at 88% 15%, rgba(118, 224, 170, 0.2), transparent 31%),
		linear-gradient(125deg, #123d32 0%, #23845e 100%);
}

.crm-modal-header--edit {
	background:
		radial-gradient(circle at 88% 15%, rgba(72, 187, 255, 0.22), transparent 31%),
		linear-gradient(125deg, #102a43 0%, #164e77 100%);
}

.crm-modal-header__icon {
	display: inline-flex;
	flex: 0 0 48px;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	font-size: 19px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 13px;
	background: rgba(255, 255, 255, 0.1);
}

.crm-modal-header__copy {
	flex: 1 1 auto;
	min-width: 0;
}

.crm-modal-eyebrow,
.crm-modal-section__eyebrow {
	display: block;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.crm-modal-eyebrow {
	margin-bottom: 3px;
	color: #c9e9dc;
}

.crm-modal-header--edit .crm-modal-eyebrow {
	color: #aadcf8;
}

.crm-modal-header h1,
#content-page .crm-modal-header h1,
.crm-reservation-modal .modal-content .crm-modal-header h1 {
	margin: 0 0 6px;
	padding: 0;
	color: #ffffff;
	font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: clamp(22px, 2.4vw, 30px);
	font-weight: 700;
	line-height: 1.18;
	text-overflow: ellipsis;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
}

.crm-modal-dates {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px 10px;
	color: #e4f2ed;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

.crm-modal-header--edit .crm-modal-dates {
	color: #d9eaf7;
}

.crm-modal-dates span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.crm-modal-dates__arrow {
	opacity: 0.65;
}

.crm-modal-header__actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
}

.crm-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	padding: 7px 10px;
	font-size: 11px;
	font-weight: 800;
	border: 1px solid transparent;
	border-radius: 999px;
}

.crm-status-badge--success {
	color: #e8fff4;
	border-color: rgba(190, 255, 219, 0.32);
	background: rgba(9, 72, 48, 0.36);
}

.crm-status-badge--warning {
	color: #fff5d7;
	border-color: rgba(255, 226, 142, 0.34);
	background: rgba(114, 68, 0, 0.34);
}

.crm-modal-close {
	display: inline-flex;
	flex: 0 0 38px;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	color: var(--crm-white);
	border: 1px solid rgba(255, 255, 255, 0.26);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.08);
	transition: color 0.18s ease, background 0.18s ease;
}

.crm-modal-close:hover,
.crm-modal-close:focus {
	color: var(--crm-navy-950);
	outline: 0;
	background: var(--crm-white);
}

.crm-modal-body {
	display: grid;
	flex: 1 1 auto;
	gap: 14px;
	min-width: 0;
	min-height: 0;
	max-width: 100%;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 16px;
	overscroll-behavior: contain;
	scrollbar-gutter: stable;
}

.crm-modal-section {
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	border: 1px solid var(--crm-slate-200);
	border-radius: 12px;
	background: var(--crm-white);
	box-shadow: 0 3px 12px rgba(16, 42, 67, 0.04);
}

.crm-modal-section__header {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 14px 16px 12px;
	border-bottom: 1px solid #e8eef3;
	background: #fbfcfd;
}

.crm-modal-section__icon {
	display: inline-flex;
	flex: 0 0 36px;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	color: var(--crm-blue-600);
	border-radius: 9px;
	background: var(--crm-blue-100);
}

.crm-modal-section__eyebrow {
	margin-bottom: 2px;
	color: var(--crm-blue-600);
}

.crm-reservation-modal .modal-content .crm-modal-section h2 {
	margin: 0;
	padding: 0;
	color: var(--crm-navy-950);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;
}

.crm-modal-detail-view {
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
	table-layout: auto;
}

.crm-modal-detail-view tbody {
	display: grid;
	width: 100%;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 18px;
}

.crm-modal-detail-view tbody tr {
	display: grid;
	grid-template-columns: minmax(145px, 36%) minmax(0, 1fr);
	min-width: 0;
	background: var(--crm-white) !important;
}

@media (min-width: 768px) {
	.crm-modal-detail-view tbody tr.crm-modal-detail-row--left {
		grid-column: 1;
	}

	.crm-modal-detail-view tbody tr.crm-modal-detail-row--right {
		grid-column: 2;
	}

	.crm-modal-detail-view tbody tr.crm-modal-detail-row--wide {
		width: 100%;
		grid-column: 1 / -1 !important;
		grid-template-columns: minmax(145px, 18%) minmax(0, 1fr);
		justify-self: stretch;
	}
}

.crm-modal-detail-view tbody tr:nth-child(4n + 3),
.crm-modal-detail-view tbody tr:nth-child(4n + 4) {
	background: #f8fafc !important;
}

.crm-modal-detail-view tbody tr.crm-modal-detail-row--green {
	background: #eff8f2 !important;
	box-shadow: inset 3px 0 0 #b9dec8;
}

.crm-modal-detail-view th,
.crm-modal-detail-view td {
	width: 100% !important;
	max-width: none !important;
	padding: 10px 12px;
	line-height: 1.4;
	border: 0;
	border-bottom: 1px solid #edf2f6;
	background: transparent !important;
	overflow-wrap: anywhere;
}

.crm-modal-detail-view th {
	color: var(--crm-slate-600);
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
}

.crm-modal-detail-view td {
	color: var(--crm-navy-800);
	font-size: 13px;
	font-weight: 600;
}

.crm-modal-table-wrap {
	width: 100%;
	padding: 12px 14px 14px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.crm-modal-table-wrap .grid-view {
	padding: 0;
}

.crm-modal-table-wrap table.items {
	width: 100%;
	margin: 0;
	border: 1px solid var(--crm-slate-200);
	border-radius: 8px;
	background: var(--crm-white);
}

.crm-modal-table-wrap table.items th {
	padding: 9px 10px;
	color: #486581;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-color: var(--crm-slate-200);
	background: #f5f8fb !important;
}

.crm-modal-table-wrap table.items th a,
.crm-modal-table-wrap table.items th a:hover,
.crm-modal-table-wrap table.items th a:focus {
	color: #486581 !important;
	text-decoration: none;
}

.crm-modal-table-wrap table.items td {
	padding: 9px 10px;
	font-size: 12px;
	border-color: #e8eef3;
}

.crm-modal-table-wrap table.items th.crm-equipment-col-select,
.crm-modal-table-wrap table.items td.crm-equipment-col-select {
	width: 42px;
	min-width: 42px;
	padding-right: 7px;
	padding-left: 7px;
	text-align: center;
	white-space: nowrap;
}

.crm-modal-table-wrap table.items th.crm-equipment-col-signature,
.crm-modal-table-wrap table.items td.crm-equipment-col-signature {
	width: 18%;
	min-width: 180px;
	white-space: nowrap;
}

.crm-modal-table-wrap table.items th.crm-equipment-col-name,
.crm-modal-table-wrap table.items td.crm-equipment-col-name {
	width: 20%;
	min-width: 190px;
	white-space: nowrap;
}

.crm-modal-table-wrap table.items th.crm-equipment-col-description,
.crm-modal-table-wrap table.items td.crm-equipment-col-description {
	width: auto;
	min-width: 250px;
}

.crm-modal-table-wrap table.items th.crm-equipment-col-serial,
.crm-modal-table-wrap table.items td.crm-equipment-col-serial {
	width: 1%;
	min-width: 100px;
	white-space: nowrap;
}

.crm-modal-table-wrap table.items th.crm-equipment-col-value,
.crm-modal-table-wrap table.items td.crm-equipment-col-value {
	width: 1%;
	min-width: 68px;
	padding-right: 8px;
	padding-left: 8px;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.crm-modal-table-wrap table.items tr.odd,
.crm-modal-table-wrap table.items tr.even {
	background: var(--crm-white) !important;
}

.crm-modal-table-wrap table.items tr:not(.groupheader):hover {
	background: #fff0f0 !important;
	box-shadow: inset 0 0 0 3px var(--crm-danger);
}

.crm-modal-table-wrap table.items tr.groupheader {
	background-color: var(--category-color, #d9e2ec) !important;
}

.crm-modal-table-wrap table.items tr.groupheader:hover {
	background-color: var(--category-color, #d9e2ec) !important;
	box-shadow: inset 0 0 0 3px var(--crm-danger);
	filter: brightness(0.96);
}

.crm-modal-table-wrap table.items th.crm-equipment-row-actions,
.crm-modal-table-wrap table.items td.crm-equipment-row-actions {
	width: 54px;
	min-width: 54px;
	padding: 5px 10px;
	text-align: center;
	white-space: nowrap;
}

.crm-equipment-row-actions .crm-equipment-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0 2px;
	color: #b42318;
	font-size: 14px;
	line-height: 1;
	text-decoration: none;
	vertical-align: middle;
	border: 1px solid #fecaca;
	border-radius: 8px;
	background: #fff5f5;
	transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
	cursor: pointer;
}

.crm-equipment-row-actions .crm-equipment-action.is-hidden {
	display: none;
}

.crm-equipment-row-actions .crm-equipment-action:hover,
.crm-equipment-row-actions .crm-equipment-action:focus {
	color: var(--crm-white);
	text-decoration: none;
	border-color: #dc2626;
	background: #dc2626;
	box-shadow: 0 3px 8px rgba(220, 38, 38, 0.22);
	outline: none;
}

.crm-equipment-row-actions .crm-equipment-action:active {
	transform: translateY(1px);
}

.crm-modal-footer {
	position: sticky;
	z-index: 4;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 13px 16px;
	border-top: 1px solid var(--crm-slate-200);
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 -5px 16px rgba(16, 42, 67, 0.07);
	backdrop-filter: blur(8px);
}

.crm-modal-footer__documents {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.crm-modal-footer .btn,
.crm-modal-form__footer .btn,
.crm-modal-form__top-actions .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
}

.crm-modal-footer .crm-btn-edit-reservation {
	color: #166534;
	font-weight: 700;
	border: 1px solid #a7d7b6;
	background: #eff8f2;
}

.crm-modal-footer .crm-btn-edit-reservation:hover,
.crm-modal-footer .crm-btn-edit-reservation:focus {
	color: #14532d;
	border-color: #78bf90;
	background: #dff2e5;
	box-shadow: 0 3px 8px rgba(22, 101, 52, 0.14);
	outline: none;
}

.crm-modal-form-wrap,
.crm-modal-form {
	width: 100% !important;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.crm-modal-form__top-actions {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 8px;
}

.crm-modal-required-note {
	margin: 0 2px 12px;
	color: var(--crm-slate-600);
	font-size: 12px;
}

.crm-modal-form .errorSummary {
	margin-bottom: 14px;
	border-radius: 9px;
}

.crm-modal-form-section {
	margin-bottom: 14px;
	padding-bottom: 14px;
}

.crm-modal-form-section > .row,
.crm-modal-form-section > .form-group,
.crm-modal-form-section > .control-group {
	margin-right: 0;
	margin-left: 0;
	padding-right: 15px;
	padding-left: 15px;
}

.crm-modal-form-section .form-group {
	margin-bottom: 13px;
}

.crm-modal-form-section .form-group > [class*="col-"],
.crm-additional-equipment-fields > [id^="additional-"] {
	min-width: 0;
	max-width: 100%;
}

.crm-modal-form-section .form-control,
.crm-modal-form-section .select2-container,
.crm-additional-equipment-fields .form-control {
	width: 100% !important;
	max-width: 100%;
}

.crm-modal-form-section .control-label {
	padding-top: 9px;
	color: #486581;
	font-size: 12px;
	font-weight: 700;
}

.crm-modal-form-section textarea.form-control {
	min-height: 110px;
	resize: vertical;
}

.crm-additional-equipment-fields {
	display: flow-root;
	padding: 14px 15px 4px;
	text-align: center;
}

.crm-additional-equipment-fields > [id^="additional-"] {
	margin-bottom: 12px;
	padding: 12px;
	border: 1px solid var(--crm-slate-200);
	border-radius: 9px;
	background: #f8fafc;
}

.crm-equipment-validation {
	clear: both;
	padding: 0 15px;
	text-align: center;
}

.crm-equipment-picker {
	padding-top: 4px;
}

.crm-uncheck-all {
	margin-bottom: 10px;
}

.crm-equipment-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
	text-align: left;
}

.crm-equipment-actions .btn {
	white-space: nowrap;
}

.crm-equipment-actions__feedback {
	min-height: 20px;
	margin-left: 4px;
	color: var(--crm-slate-600);
	font-size: 13px;
	font-weight: 600;
}

.crm-equipment-actions__feedback.is-success {
	color: #166534;
}

.crm-equipment-actions__feedback.is-error {
	color: #b42318;
}

.crm-bulk-equipment-modal .modal-dialog {
	max-width: 520px;
}

.crm-bulk-equipment-modal .modal-content {
	overflow: hidden;
	border: 1px solid var(--crm-slate-200);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 18px 45px rgba(16, 42, 67, 0.18);
}

.crm-bulk-equipment-modal .modal-header,
.crm-bulk-equipment-modal .modal-footer {
	border-color: var(--crm-slate-200);
}

.crm-bulk-equipment-modal .modal-title {
	color: var(--crm-slate-900);
	font-size: 19px;
	font-weight: 700;
}

.crm-bulk-equipment-modal__intro {
	margin: 0 0 18px;
	color: var(--crm-slate-600);
}

.crm-bulk-equipment-modal label {
	display: block;
	margin-bottom: 6px;
	color: #334e68;
	font-size: 13px;
	font-weight: 700;
}

.crm-bulk-equipment-modal .form-control {
	height: 42px;
	border-color: #bcccdc;
	border-radius: 8px;
	color: var(--crm-slate-900);
	box-shadow: none;
}

.crm-bulk-equipment-modal .form-control:focus {
	border-color: #1976b9;
	box-shadow: 0 0 0 3px rgba(25, 118, 185, 0.16);
}

.crm-bulk-equipment-modal .help-block {
	margin: 6px 0 0;
	color: #526d82;
	font-size: 12px;
}

.crm-bulk-equipment-modal__message {
	display: none;
	margin-top: 6px;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
}

.crm-bulk-equipment-modal__message.is-error,
.crm-bulk-equipment-modal__message.is-success {
	display: block;
}

.crm-bulk-equipment-modal__message.is-error {
	border: 1px solid #f2b8b5;
	background: #fff4f3;
	color: #9b1c1c;
}

.crm-bulk-equipment-modal__message.is-success {
	border: 1px solid #a7d7b6;
	background: #f0fdf4;
	color: #166534;
}

.crm-bulk-equipment-inline {
	margin: 0 0 12px;
	padding: 14px;
	border: 1px solid #b8cce0;
	border-radius: 10px;
	background: #f5f9fc;
	text-align: left;
}

.crm-bulk-equipment-inline__header {
	margin-bottom: 12px;
}

.crm-bulk-equipment-inline__header h3 {
	margin: 0 0 3px;
	color: var(--crm-slate-900);
	font-size: 16px;
	font-weight: 700;
}

.crm-bulk-equipment-inline__header p {
	margin: 0;
	color: var(--crm-slate-600);
	font-size: 13px;
}

.crm-bulk-equipment-inline__fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 130px;
	gap: 12px;
}

.crm-modal-form-section .crm-bulk-equipment-inline .form-group {
	margin: 0;
	padding: 0;
}

.crm-bulk-equipment-inline label {
	display: block;
	margin-bottom: 6px;
	color: #334e68;
	font-size: 12px;
	font-weight: 700;
}

.crm-bulk-equipment-inline .form-control {
	height: 40px;
	border-color: #9fb3c8;
	border-radius: 8px;
	color: var(--crm-slate-900);
	box-shadow: none;
}

.crm-bulk-equipment-inline .form-control:focus {
	border-color: #1976b9;
	box-shadow: 0 0 0 3px rgba(25, 118, 185, 0.16);
}

.crm-bulk-equipment-inline .help-block {
	margin: 5px 0 0;
	color: #526d82;
	font-size: 11px;
}

.crm-bulk-equipment-inline .crm-bulk-equipment-modal__message {
	margin: 10px 0 0;
}

.crm-bulk-equipment-inline__actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 12px;
}

.crm-modal-form__footer {
	position: sticky;
	z-index: 4;
	bottom: -16px;
	display: flex;
	justify-content: flex-end;
	margin: 0 -16px -16px;
	padding: 12px 16px;
	border-top: 1px solid var(--crm-slate-200);
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 -5px 16px rgba(16, 42, 67, 0.07);
}

.crm-modal-form__footer .btn-primary,
.crm-modal-form__top-actions .btn-primary {
	min-width: 135px;
}

@media (max-width: 767px) {
	.crm-equipment-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.crm-equipment-actions .btn {
		width: 100%;
	}

	.crm-equipment-actions__feedback {
		margin: 2px 0 0;
	}

	.crm-bulk-equipment-modal .modal-dialog {
		margin: 12px;
	}

	.crm-bulk-equipment-inline__fields {
		grid-template-columns: 1fr;
	}

	.crm-bulk-equipment-inline__actions {
		align-items: stretch;
		flex-direction: column-reverse;
	}

	.crm-bulk-equipment-inline__actions .btn {
		width: 100%;
	}

	.crm-reservation-modal .modal-content {
		padding: 0;
		border-radius: 13px;
	}

	.crm-reservation-modal .modal-dialog {
		max-height: calc(100vh - 20px);
		max-height: calc(100dvh - 20px);
		margin-top: 10px;
		margin-bottom: 10px;
	}

	.crm-modal-header {
		align-items: flex-start;
		padding: 16px;
	}

	.crm-modal-header__icon {
		display: none;
	}

	.crm-modal-header__actions {
		align-items: flex-end;
		flex-direction: column-reverse;
	}

	.crm-modal-dates {
		align-items: flex-start;
		flex-direction: column;
		gap: 4px;
	}

	.crm-modal-dates__arrow {
		display: none;
	}

	.crm-status-badge {
		min-height: 28px;
		padding: 5px 8px;
		font-size: 10px;
	}

	.crm-modal-body {
		gap: 10px;
		padding: 10px;
	}

	.crm-modal-detail-view tbody {
		grid-template-columns: minmax(0, 1fr);
		column-gap: 0;
	}

	.crm-modal-detail-view tbody tr,
	.crm-modal-detail-view tbody tr:nth-child(4n + 3),
	.crm-modal-detail-view tbody tr:nth-child(4n + 4) {
		background: var(--crm-white) !important;
	}

	.crm-modal-detail-view tbody tr:nth-child(even) {
		background: #f8fafc !important;
	}

	.crm-modal-detail-view tbody tr.crm-modal-detail-row--green {
		background: #eff8f2 !important;
	}

	.crm-modal-table-wrap table.items {
		min-width: 620px;
	}

	.crm-modal-footer {
		position: static;
		align-items: stretch;
		flex-direction: column;
		padding: 12px 10px;
	}

	.crm-modal-footer__documents {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.crm-modal-footer .btn {
		white-space: normal;
	}

	.crm-modal-form-section > .row,
	.crm-modal-form-section > .form-group,
	.crm-modal-form-section > .control-group {
		padding-right: 10px;
		padding-left: 10px;
	}

	.crm-modal-form-section .control-label {
		text-align: left;
	}

	.crm-modal-form__top-actions {
		display: none;
	}

	.crm-modal-form__footer {
		bottom: -10px;
		margin: 0 -10px -10px;
	}
}

@media (max-width: 430px) {
	.crm-modal-header {
		gap: 9px;
		padding: 14px 12px;
	}

	.crm-reservation-modal .modal-content .crm-modal-header h1 {
		font-size: 20px;
	}

	.crm-modal-header__actions .crm-status-badge {
		display: none;
	}

	.crm-modal-section__header {
		padding: 12px;
	}

	.crm-modal-detail-view tbody tr {
		grid-template-columns: minmax(105px, 40%) minmax(0, 1fr);
	}

	.crm-modal-detail-view th,
	.crm-modal-detail-view td {
		padding: 9px 10px;
	}

	.crm-modal-footer__documents {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Active reservations workspace */
.crm-reservation-page {
	width: 100%;
	max-width: 1680px;
	margin: 0 auto;
}

.crm-reservation-hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 14px;
	padding: clamp(16px, 2vw, 22px);
	color: var(--crm-white);
	border-radius: 16px;
	background:
		radial-gradient(circle at 88% 20%, rgba(72, 187, 255, 0.23), transparent 32%),
		linear-gradient(125deg, #102a43 0%, #164e77 100%);
	box-shadow: 0 16px 38px rgba(16, 42, 67, 0.16);
}

.crm-reservation-hero--green {
	background:
		radial-gradient(circle at 88% 20%, rgba(118, 224, 170, 0.24), transparent 32%),
		linear-gradient(125deg, #123d32 0%, #23845e 100%);
	box-shadow: 0 16px 38px rgba(18, 82, 60, 0.18);
}

.crm-reservation-hero--amber {
	background:
		radial-gradient(circle at 88% 20%, rgba(255, 225, 148, 0.28), transparent 32%),
		linear-gradient(125deg, #5b3a08 0%, #b87816 100%);
	box-shadow: 0 16px 38px rgba(125, 78, 10, 0.2);
}

.crm-reservation-hero__copy {
	min-width: 0;
}

#content-page .crm-reservation-hero h1 {
	position: static;
	margin: 0;
	color: #f7fbff;
	font-size: clamp(26px, 3vw, 36px);
	line-height: 1.2;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.reservation-links {
	display: flex;
	overflow-x: auto;
	gap: 7px;
	margin: 0 0 14px;
	padding: 5px;
	border: 1px solid var(--crm-slate-200);
	border-radius: 12px;
	background: var(--crm-white);
	box-shadow: 0 3px 12px rgba(16, 42, 67, 0.05);
	-webkit-overflow-scrolling: touch;
}

.reservation-links .reservation-link {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 9px 14px;
	color: var(--crm-slate-600);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	border-radius: 8px;
	transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.reservation-links .reservation-link:hover,
.reservation-links .reservation-link:focus {
	color: var(--crm-blue-600);
	text-decoration: none;
	background: var(--crm-blue-100);
}

.reservation-links .reservation-link.active {
	color: var(--crm-white);
	background: var(--crm-blue-600);
	box-shadow: 0 4px 10px rgba(8, 117, 193, 0.22);
}

.reservation-links--green .reservation-link.active {
	background: #23845e;
	box-shadow: 0 4px 10px rgba(35, 132, 94, 0.24);
}

.reservation-links--amber .reservation-link.active {
	background: #b87816;
	box-shadow: 0 4px 10px rgba(184, 120, 22, 0.24);
}

.crm-reservation-kpis {
	margin-bottom: 14px;
}

.crm-reservation-kpis .crm-kpi-card {
	padding: 15px 17px;
}

.crm-realisations-card {
	overflow: hidden;
	border: 1px solid var(--crm-slate-200);
	border-radius: 14px;
	background: var(--crm-white);
	box-shadow: 0 5px 18px rgba(16, 42, 67, 0.06);
}

.crm-realisations-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 18px 20px 15px;
	border-bottom: 1px solid var(--crm-slate-200);
}

.crm-realisations-card__header h2 {
	margin: 0;
	color: var(--crm-navy-950);
	font-size: 20px;
	font-weight: 700;
}

.crm-realisations-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px 16px;
	color: var(--crm-slate-600);
	font-size: 12px;
}

.crm-realisations-legend span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.crm-legend-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

.crm-legend-dot--overdue { background: #dc4c4c; }
.crm-legend-dot--billed { background: #38a169; }
.crm-legend-dot--prepared { background: #38a169; }
.crm-legend-dot--waiting { background: #d69e2e; }
.crm-legend-dot--unbilled { background: #dc4c4c; }

.crm-realisations-table {
	padding: 0 20px 20px;
}

.crm-reservation-data-grid.crm-realisations-grid {
	padding: 0;
}

.crm-reservation-data-grid .summary {
	margin: 0;
	padding: 13px 0 10px;
	color: var(--crm-slate-600);
	font-size: 12px;
	text-align: right;
}

.crm-reservation-data-grid table.items {
	width: 100%;
	margin: 0;
	border: 1px solid var(--crm-slate-200);
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 10px;
	background: var(--crm-white);
}

.crm-reservation-data-grid table.items thead th,
.crm-reservation-data-grid table.items thead th:first-child,
.crm-reservation-data-grid table.items thead th:last-child {
	padding: 11px 10px;
	color: #486581;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.045em;
	text-align: left;
	text-transform: uppercase;
	border: 0;
	border-bottom: 1px solid var(--crm-slate-200);
	background: #f5f8fb !important;
}

.crm-reservation-data-grid table.items thead th:first-child {
	border-radius: 9px 0 0;
}

.crm-reservation-data-grid table.items thead th:last-child {
	text-align: center;
	border-radius: 0 9px 0 0;
}

.crm-reservation-data-grid table.items thead th a {
	color: inherit;
}

.crm-reservation-data-grid table.items tbody tr {
	transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.crm-reservation-data-grid table.items tbody tr.odd,
.crm-reservation-data-grid table.items tbody tr.even {
	background: var(--crm-white) !important;
}

.crm-reservation-data-grid table.items tbody tr:hover {
	background: #f7fbff !important;
	box-shadow: inset 3px 0 0 var(--crm-blue-600);
}

.crm-reservation-data-grid table.items tbody tr.crm-row-overdue {
	box-shadow: inset 3px 0 0 #dc4c4c;
}

.crm-reservation-data-grid table.items tbody tr.crm-row-billed {
	box-shadow: inset 3px 0 0 #38a169;
}

.crm-reservation-data-grid table.items tbody tr.crm-row-prepared {
	box-shadow: inset 3px 0 0 #38a169;
}

.crm-reservation-data-grid table.items tbody tr.crm-row-waiting {
	box-shadow: inset 3px 0 0 #d69e2e;
}

.crm-reservation-data-grid table.items tbody tr.crm-row-unbilled {
	box-shadow: inset 3px 0 0 #dc4c4c;
}

.crm-reservation-data-grid table.items tbody td {
	padding: 13px 10px;
	color: var(--crm-slate-900);
	font-size: 13px;
	line-height: 1.45;
	vertical-align: middle;
	border: 0;
	border-bottom: 1px solid #e8eef3;
	background: transparent;
}

.crm-reservation-data-grid table.items tbody tr:last-child td {
	border-bottom: 0;
}

.crm-reservation-data-grid td.view-item {
	cursor: pointer;
}

.crm-reservation-data-grid td.crm-cell-number {
	width: 48px;
	color: var(--crm-slate-600);
	text-align: center;
}

.crm-reservation-data-grid td.crm-cell-company {
	min-width: 150px;
	font-weight: 700;
}

.crm-reservation-data-grid td.crm-cell-place {
	min-width: 150px;
}

.crm-delivery-place {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
}

.crm-delivery-place__icon {
	display: inline-flex;
	flex: 0 0 25px;
	align-items: center;
	justify-content: center;
	width: 25px;
	height: 25px;
	margin-right: 7px;
	color: #075985;
	font-size: 12px;
	border: 1px solid #bae6fd;
	border-radius: 7px;
	background: #e0f2fe;
}

.crm-delivery-place__icon--after {
	margin-right: 0;
	margin-left: 7px;
}

.crm-delivery-place__text {
	min-width: 0;
}

/* Login */
.crm-login-page {
	display: grid;
	min-height: calc(100vh - 184px);
	place-items: center;
	padding: clamp(18px, 4vw, 52px) 0;
}

#login-form.crm-login-form {
	width: 100%;
	max-width: none;
	margin: 0;
}

.crm-login-shell {
	display: grid;
	width: min(100%, 940px);
	grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
	overflow: hidden;
	border: 1px solid var(--crm-slate-200);
	border-radius: 18px;
	background: var(--crm-white);
	box-shadow: 0 24px 70px rgba(16, 42, 67, 0.16);
}

.crm-login-intro {
	position: relative;
	display: flex;
	min-height: 510px;
	align-items: center;
	overflow: hidden;
	padding: clamp(34px, 5vw, 58px);
	color: var(--crm-white);
	background:
		radial-gradient(circle at 8% 92%, rgba(56, 189, 248, 0.25), transparent 34%),
		radial-gradient(circle at 91% 11%, rgba(96, 165, 250, 0.25), transparent 28%),
		linear-gradient(145deg, #102a43 0%, #075985 100%);
}

.crm-login-intro__content {
	position: relative;
	z-index: 2;
}

.crm-login-intro__eyebrow,
.crm-login-card__eyebrow {
	display: block;
	margin-bottom: 8px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}

.crm-login-intro__eyebrow {
	color: #bae6fd;
}

#content-page .crm-login-intro h1,
.crm-login-intro h1 {
	max-width: 380px;
	margin: 0;
	color: var(--crm-white);
	font-size: clamp(27px, 3.4vw, 38px);
	line-height: 1.15;
}

.crm-login-intro p {
	max-width: 360px;
	margin: 18px 0 0;
	color: #d9effc;
	font-size: 14px;
	line-height: 1.65;
}

.crm-login-benefits {
	display: grid;
	gap: 12px;
	margin: 30px 0 0;
	padding: 0;
	list-style: none;
}

.crm-login-benefits li {
	display: flex;
	align-items: center;
	color: #f0f9ff;
	font-size: 12px;
	font-weight: 600;
}

.crm-login-benefits i {
	display: inline-flex;
	flex: 0 0 30px;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin-right: 10px;
	color: #bae6fd;
	border: 1px solid rgba(186, 230, 253, 0.27);
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.08);
}

.crm-login-intro__decoration span {
	position: absolute;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 50%;
}

.crm-login-intro__decoration span:nth-child(1) {
	right: -72px;
	bottom: -82px;
	width: 230px;
	height: 230px;
}

.crm-login-intro__decoration span:nth-child(2) {
	right: -30px;
	bottom: -40px;
	width: 150px;
	height: 150px;
}

.crm-login-intro__decoration span:nth-child(3) {
	top: -60px;
	left: -62px;
	width: 150px;
	height: 150px;
}

.crm-login-card {
	display: flex;
	min-width: 0;
	justify-content: center;
	flex-direction: column;
	padding: clamp(34px, 5vw, 58px);
}

.crm-login-card__header {
	display: flex;
	align-items: center;
}

.crm-login-card__icon {
	display: inline-flex;
	flex: 0 0 46px;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin-right: 13px;
	color: var(--crm-blue-600);
	font-size: 17px;
	border-radius: 13px;
	background: var(--crm-blue-100);
}

.crm-login-card__eyebrow {
	margin: 0 0 3px;
	color: var(--crm-blue-600);
}

.crm-login-card__header h2 {
	margin: 0;
	color: var(--crm-navy-950);
	font-size: 27px;
	font-weight: 700;
}

.crm-login-card__lead {
	margin: 18px 0 24px;
	color: var(--crm-slate-600);
	font-size: 13px;
}

.crm-login-field {
	margin-bottom: 17px;
}

.crm-login-field > label {
	display: block;
	margin-bottom: 7px;
	color: var(--crm-navy-800);
	font-size: 12px;
	font-weight: 700;
}

.crm-login-input {
	position: relative;
}

.crm-login-input > i {
	position: absolute;
	z-index: 2;
	top: 50%;
	left: 15px;
	color: #829ab1;
	font-size: 14px;
	transform: translateY(-50%);
	pointer-events: none;
}

.crm-login-input .form-control {
	width: 100%;
	height: 48px;
	padding: 10px 14px 10px 43px;
	color: var(--crm-navy-950);
	font-size: 14px;
	border: 1px solid var(--crm-slate-300);
	border-radius: 10px;
	background: #fbfdff;
}

.crm-login-input .form-control:focus {
	border-color: var(--crm-blue-600);
	background: var(--crm-white);
	box-shadow: 0 0 0 4px rgba(8, 117, 193, 0.12);
}

.crm-login-input .form-control.error {
	border-color: #dc6060;
	background: #fffafa;
}

.crm-login-field .errorMessage {
	margin-top: 5px;
	color: var(--crm-danger);
	font-size: 11px;
	font-weight: 600;
}

.crm-login-remember {
	display: inline-flex;
	align-items: center;
	margin: 0 0 20px;
	color: #486581;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.crm-login-remember input {
	width: 16px;
	height: 16px;
	margin: 0 8px 0 0;
	accent-color: var(--crm-blue-600);
}

.crm-login-submit {
	display: flex;
	width: 100%;
	min-height: 48px;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	border-radius: 10px;
	box-shadow: 0 8px 18px rgba(8, 117, 193, 0.22);
}

.crm-login-submit i {
	margin-left: 9px;
}

.crm-login-submit:hover,
.crm-login-submit:focus {
	border-color: #0663a3;
	background: #0663a3;
	box-shadow: 0 10px 22px rgba(8, 117, 193, 0.28);
}

.crm-login-security {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 19px 0 0;
	color: #829ab1;
	font-size: 10px;
	text-align: center;
}

.crm-login-security i {
	margin-right: 6px;
}

@media (max-width: 767px) {
	.crm-login-page {
		min-height: calc(100vh - 142px);
		padding: 16px 0 24px;
	}

	.crm-login-shell {
		grid-template-columns: minmax(0, 1fr);
		border-radius: 15px;
	}

	.crm-login-intro {
		min-height: 0;
		padding: 25px 24px 27px;
	}

	#content-page .crm-login-intro h1,
	.crm-login-intro h1 {
		font-size: 25px;
	}

	.crm-login-intro p {
		margin-top: 10px;
		line-height: 1.5;
	}

	.crm-login-benefits {
		display: none;
	}

	.crm-login-card {
		padding: 29px 24px 26px;
	}
}

@media (max-width: 390px) {
	.crm-login-intro,
	.crm-login-card {
		padding-right: 18px;
		padding-left: 18px;
	}

	.crm-login-card__icon {
		flex-basis: 42px;
		width: 42px;
		height: 42px;
	}

	.crm-login-card__header h2 {
		font-size: 24px;
	}
}

.crm-reservation-data-grid td.crm-cell-date {
	min-width: 118px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.crm-reservation-data-grid td.crm-cell-equipment {
	min-width: 155px;
	color: #486581;
	font-size: 12px;
}

.crm-reservation-data-grid td.overdue {
	color: #a82525;
	font-weight: 700;
	background: #fff0f0;
}

.crm-reservation-data-grid td.billed {
	color: #26734d;
	font-weight: 700;
	background: #edf9f2;
}

.crm-reservation-data-grid td.crm-cell-actions {
	min-width: 116px;
	text-align: center;
	white-space: nowrap;
}

.crm-reservation-data-grid td.crm-cell-actions--wide {
	min-width: 150px;
}

.crm-reservation-data-grid .crm-grid-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0 2px;
	color: #486581;
	text-decoration: none;
	border: 1px solid var(--crm-slate-200);
	border-radius: 7px;
	background: var(--crm-white);
}

.crm-reservation-data-grid .crm-grid-action:hover,
.crm-reservation-data-grid .crm-grid-action:focus {
	color: var(--crm-blue-600);
	border-color: #9ccceb;
	background: var(--crm-blue-100);
}

.crm-reservation-data-grid .crm-grid-action--complete:hover,
.crm-reservation-data-grid .crm-grid-action--complete:focus {
	color: var(--crm-success);
	border-color: #9ed8b8;
	background: #edf9f2;
}

.crm-reservation-data-grid .crm-grid-action--delete:hover,
.crm-reservation-data-grid .crm-grid-action--delete:focus {
	color: var(--crm-danger);
	border-color: #e8aaaa;
	background: #fff0f0;
}

@media (max-width: 991px) {
	.crm-reservation-hero {
		align-items: flex-start;
	}

	.crm-reservation-kpis {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.crm-reservation-hero {
		flex-direction: column;
		padding: 18px;
		border-radius: 13px;
	}

	.crm-reservation-hero .crm-quick-actions {
		width: 100%;
	}

	.crm-reservation-kpis {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 9px;
	}

	.crm-reservation-kpis .crm-kpi-card {
		align-items: flex-start;
		gap: 10px;
		padding: 13px;
	}

	.crm-reservation-kpis .crm-kpi-card__icon {
		flex-basis: 38px;
		width: 38px;
		height: 38px;
	}

	.crm-reservation-kpis .crm-kpi-card strong {
		font-size: 23px;
	}

	.crm-reservation-kpis .crm-kpi-card small {
		white-space: normal;
	}

	.crm-realisations-card__header {
		align-items: flex-start;
		flex-direction: column;
		padding: 16px 14px 13px;
	}

	.crm-realisations-legend {
		justify-content: flex-start;
	}

	.crm-realisations-table {
		padding: 0 10px 12px;
	}

	.crm-reservation-data-grid .summary {
		padding: 11px 2px 8px;
		text-align: left;
	}

	.crm-reservation-data-grid table.items,
	.crm-reservation-data-grid table.items tbody,
	.crm-reservation-data-grid table.items tr,
	.crm-reservation-data-grid table.items td {
		display: block;
		width: 100%;
	}

	.crm-reservation-data-grid table.items {
		min-width: 0;
		border: 0;
		background: transparent;
	}

	.crm-reservation-data-grid table.items thead {
		position: absolute;
		overflow: hidden;
		width: 1px;
		height: 1px;
		clip: rect(0 0 0 0);
		white-space: nowrap;
		clip-path: inset(50%);
	}

	.crm-reservation-data-grid table.items tbody tr,
	.crm-reservation-data-grid table.items tbody tr:hover {
		overflow: hidden;
		margin-bottom: 10px;
		border: 1px solid var(--crm-slate-200);
		border-radius: 10px;
		background: var(--crm-white) !important;
		box-shadow: 0 3px 12px rgba(16, 42, 67, 0.05);
	}

	.crm-reservation-data-grid table.items tbody tr.crm-row-overdue {
		border-left: 3px solid #dc4c4c;
	}

	.crm-reservation-data-grid table.items tbody tr.crm-row-billed {
		border-left: 3px solid #38a169;
	}

	.crm-reservation-data-grid table.items tbody tr.crm-row-prepared {
		border-left: 3px solid #38a169;
	}

	.crm-reservation-data-grid table.items tbody tr.crm-row-waiting {
		border-left: 3px solid #d69e2e;
	}

	.crm-reservation-data-grid table.items tbody tr.crm-row-unbilled {
		border-left: 3px solid #dc4c4c;
	}

	.crm-reservation-data-grid table.items tbody td {
		display: grid;
		grid-template-columns: minmax(105px, 36%) minmax(0, 1fr);
		gap: 12px;
		min-width: 0;
		padding: 10px 12px;
		text-align: left;
		white-space: normal;
	}

	.crm-reservation-data-grid table.items tbody td::before {
		content: attr(data-label);
		color: var(--crm-slate-600);
		font-size: 10px;
		font-weight: 800;
		letter-spacing: 0.04em;
		text-transform: uppercase;
	}

	.crm-reservation-data-grid td.crm-cell-number {
		display: none;
	}

	.crm-reservation-data-grid td.crm-cell-company {
		padding-top: 13px;
		font-size: 15px;
	}

	.crm-reservation-data-grid td.crm-cell-actions {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: 4px;
		padding: 11px 12px 13px;
		background: #f8fafc;
	}

	.crm-reservation-data-grid td.crm-cell-actions::before {
		margin-right: auto;
	}
}

@media (max-width: 430px) {
	.reservation-links .reservation-link {
		padding: 9px 11px;
	}

	.crm-reservation-kpis .crm-kpi-card__icon {
		display: none;
	}

	.crm-reservation-data-grid table.items tbody td {
		grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
		gap: 9px;
	}
}
