@media (max-width: 1399px) {
	.crm-dashboard-grid--analytics {
		grid-template-columns: minmax(250px, 0.9fr) minmax(360px, 1.4fr);
	}

	.crm-recent-panel {
		grid-column: 1 / -1;
	}

	.crm-activity-list {
		display: grid;
		min-height: 0;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 20px;
	}
}

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

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

	.crm-upcoming-list {
		display: grid;
		min-height: 0;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 20px;
	}

	.crm-user-copy {
		display: none;
	}
}

@media (max-width: 991px) {
	body.crm-themed:not(.crm-auth-page),
	body.crm-themed.crm-sidebar-collapsed:not(.crm-auth-page) {
		padding-left: 0;
	}

	body.crm-themed > .users-area.container,
	body.crm-themed .users-area.container {
		width: 100%;
		margin-left: 0;
		padding-inline: 16px;
	}

	.crm-sidebar,
	body.crm-sidebar-collapsed .crm-sidebar {
		width: min(var(--crm-sidebar-width), calc(100vw - 54px));
		transform: translateX(-105%);
	}

	body.crm-sidebar-open {
		overflow: hidden;
	}

	body.crm-sidebar-open .crm-sidebar {
		transform: translateX(0);
		box-shadow: 18px 0 45px rgba(7, 20, 38, 0.24);
	}

	body.crm-sidebar-collapsed .crm-nav-label,
	body.crm-sidebar-collapsed .crm-sidebar-user-copy,
	body.crm-sidebar-collapsed .crm-version,
	body.crm-sidebar-collapsed .crm-sidebar-brand img {
		display: initial;
	}

	body.crm-sidebar-collapsed .crm-sidebar-brand a::after {
		display: none;
	}

	body.crm-sidebar-collapsed .crm-nav-item,
	body.crm-sidebar-collapsed .crm-sidebar-user {
		justify-content: flex-start;
		padding-inline: 12px;
	}

	.crm-topbar,
	body.crm-sidebar-collapsed .crm-topbar {
		left: 0;
		padding-inline: 14px;
	}

	.crm-site-footer,
	body.crm-sidebar-collapsed .crm-site-footer {
		margin-left: 0;
	}

	.crm-global-search {
		width: min(300px, 38vw);
	}

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

	.crm-recent-panel {
		grid-column: auto;
	}

	.crm-activity-list {
		display: block;
	}

	.crm-status-list,
	.crm-chart-wrap,
	.crm-activity-list {
		min-height: 250px;
	}

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

	body.crm-auth-page {
		padding: 18px;
	}

	body.crm-auth-page #login_splash,
	body.crm-auth-page #login_splash + div {
		min-height: 460px;
	}

	body.crm-auth-page #login_splash + div {
		padding: 26px;
	}

	#login_splash .crm-auth-brand.is-mounted {
		padding: 30px;
	}
}

@media (max-width: 767px) {
	body.crm-themed .users-area.container {
		padding-top: calc(var(--crm-topbar-height) + 15px);
	}

	.crm-topbar-actions {
		gap: 4px;
	}

	.crm-global-search {
		width: min(230px, 38vw);
	}

	.crm-global-search input {
		font-size: 12px;
	}

	.crm-user-menu-button {
		padding-right: 5px;
	}

	.crm-user-menu-button > .caret {
		display: none;
	}

	.crm-quick-action .btn {
		width: 42px;
		padding: 0;
		justify-content: center;
	}

	.crm-quick-action .btn > span,
	.crm-quick-action .btn > .caret {
		display: none;
	}

	.crm-page-heading {
		min-height: 0;
		margin-bottom: 14px;
	}

	.crm-heading-line {
		align-items: flex-start;
		flex-direction: column;
		gap: 1px;
	}

	.crm-heading-line h1 {
		font-size: 25px;
	}

	.crm-kpi-card {
		min-height: 108px;
	}

	.crm-dashboard-grid,
	.crm-kpi-grid {
		gap: 13px;
		margin-bottom: 13px;
	}

	.crm-panel-header {
		padding-inline: 14px;
	}

	.crm-upcoming-list {
		display: block;
	}

	body.crm-themed .table-responsive {
		width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	body.crm-themed #top_buttons .btn-group-vertical,
	body.crm-themed #top_buttons .btn-group-vertical > .btn {
		width: 100%;
	}

	body.crm-themed .detail_view .form-group {
		padding: 0 3px;
	}

	body.crm-themed .detail_view .form-group > [class*="col-"] {
		padding-inline: 8px;
	}

	.crm-search-hero-control {
		flex-wrap: wrap;
	}

	.crm-search-hero-control input {
		width: 100%;
		flex-basis: calc(100% - 52px);
	}

	.crm-search-hero-control .btn {
		width: 100%;
	}

	body.crm-auth-page {
		display: block;
		padding: 12px;
	}

	body.crm-auth-page #login_splash {
		min-height: 230px;
		border-radius: 16px 16px 0 0;
	}

	body.crm-auth-page #login_splash + div {
		min-height: 0;
		padding: 24px;
		border: 1px solid var(--crm-border);
		border-top: 0;
		border-radius: 0 0 16px 16px;
	}

	#login_splash .crm-auth-brand.is-mounted {
		min-height: 230px;
		padding: 24px;
	}

	#login_splash .crm-auth-brand img {
		width: min(260px, 85%);
	}

	#login_splash .crm-auth-brand p {
		font-size: 15px;
	}
}

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

	.crm-kpi-card {
		min-height: 100px;
		padding: 15px;
	}

	.crm-kpi-icon {
		width: 52px;
		height: 52px;
		flex-basis: 52px;
	}

	.crm-kpi-value {
		font-size: 27px;
	}

	.crm-global-search {
		width: 42px;
	}

	.crm-global-search input {
		padding: 0;
		border-color: transparent;
		color: transparent;
		background: transparent;
		cursor: pointer;
	}

	.crm-global-search input::placeholder {
		color: transparent;
		opacity: 0;
	}

	.crm-global-search .crm-search-icon {
		left: 12px;
	}

	.crm-global-search:focus-within {
		position: absolute;
		inset: 14px 10px 14px 58px;
		z-index: 4;
		width: auto;
		height: 44px;
	}

	.crm-global-search:focus-within input {
		padding: 0 14px 0 42px;
		border-color: var(--crm-primary);
		color: var(--crm-text);
		background: #fff;
		cursor: text;
		box-shadow: 0 4px 16px rgba(15, 23, 42, 0.16);
	}

	.crm-global-search:focus-within input::placeholder {
		color: var(--crm-text-muted);
		opacity: 1;
	}

	.crm-user-menu .crm-avatar {
		width: 35px;
		height: 35px;
	}

	.crm-notification-button,
	.crm-menu-toggle,
	.crm-quick-action .btn {
		width: 39px;
		height: 39px;
		min-height: 39px;
	}

	.crm-panel-link {
		display: none;
	}

	.crm-filter-chip {
		padding: 6px 8px;
	}

	.crm-chart-wrap {
		height: 240px;
		min-height: 240px;
	}

	.crm-status-list,
	.crm-activity-list {
		min-height: 0;
	}

	.crm-site-footer {
		padding-inline: 12px;
	}
}

@media (max-width: 380px) {
	.crm-notification-button {
		display: none;
	}

	.crm-topbar {
		padding-inline: 9px;
	}

	body.crm-themed .users-area.container {
		padding-inline: 11px;
	}
}

/* Responsive rules for AppGini's native menu. */
@media (min-width: 768px) and (max-width: 1199px) {
	.crm-native-search {
		width: min(220px, 25vw);
	}

	body.crm-themed.crm-native-navigation .main-content {
		padding-inline: 20px;
	}
}

@media (max-width: 767px) {
	body.crm-themed.crm-native-navigation,
	body.crm-themed.crm-native-navigation .users-area.container,
	body.crm-themed.crm-native-navigation .users-area.container-fluid {
		padding: 0;
	}

	body.crm-themed.crm-native-navigation .navbar-fixed-top,
	body.crm-themed.crm-native-navigation .navbar-fixed-top .navbar-header {
		min-height: 60px;
	}

	body.crm-themed.crm-native-navigation .navbar-fixed-top .navbar-brand {
		height: 60px;
		max-width: calc(100vw - 70px);
		padding: 9px 13px;
	}

	body.crm-themed.crm-native-navigation .navbar-fixed-top .navbar-brand img {
		max-width: min(195px, calc(100vw - 92px));
		height: 35px !important;
	}

	body.crm-themed.crm-native-navigation .navbar-toggle {
		margin-top: 12px;
		border-color: var(--crm-border);
		color: #40516b;
		background: #fff;
	}

	body.crm-themed.crm-native-navigation .navbar-collapse {
		border-color: var(--crm-border);
		background: #fff;
		box-shadow: 0 14px 24px rgba(15, 23, 42, .08);
	}

	body.crm-themed.crm-native-navigation .top-margin-adjuster {
		min-height: 68px !important;
	}

	body.crm-themed.crm-native-navigation .main-content {
		min-height: calc(100vh - 68px);
		padding: 15px 12px 24px;
	}

	.crm-native-search {
		width: calc(100% - 30px);
		margin: 8px 15px 12px;
		padding: 0;
	}

	.crm-native-search .crm-search-icon {
		top: 11px;
		left: 13px;
	}

	body.crm-themed.crm-native-navigation .navbar-fixed-top .navbar-nav > li > a {
		margin: 3px 8px;
	}

	body.crm-themed.crm-native-navigation .horizontal-navlinks .dropdown-menu > li > a {
		padding: 10px 18px;
		font-size: 15px;
	}
}
