:root {
	--cx-primary:#af2400;
	--cx-primary-2:#d74b1f;
	--cx-secondary:#2c3e55;
	--cx-secondary-2:#405672;
	--cx-text:#14202d;
	--cx-muted:#6f7c89;
	--cx-border:rgba(44,62,85,.12);
	--cx-bg:#f3f5f8;
	--cx-white:#fff;
	--cx-shadow:0 16px 40px rgba(24,39,58,.08);
	--cx-shadow-hover:0 20px 50px rgba(175,36,0,.14);
	--cx-radius-xl:24px;
	--cx-radius-lg:18px;
	--cx-radius-md:14px;
	--cx-radius-sm:12px;
}

#cx-app {
	font-family: inherit;
	color: var(--cx-text);
	margin: 0 auto;
	max-width: 100%;
	padding: 18px 20px 26px;
	font-size: 13px;
	font-weight: 400;
	margin-left: 280px;
	box-sizing: border-box;
}

.cx-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 18px;
}

.cx-header h2 {
	margin: 0 0 4px;
	font-size: 22px;
	line-height: 1.25;
	color: var(--cx-text);
	font-weight: 600;
}

.cx-header p {
	margin: 0;
	color: var(--cx-muted);
	font-size: 13px;
	line-height: 1.5;
	font-weight: 400;
}


.cx-filters,
.cx-table-wrap,
.cx-modal-box {
	background: var(--cx-white);
	border: 1px solid var(--cx-border);
	box-shadow: var(--cx-shadow);
}

.cx-filters {
	display: grid;
	grid-template-columns: 1.1fr 1.1fr 1fr 1fr 1fr auto;
	gap: 14px;
	align-items: end;
	padding: 18px;
	border-radius: var(--cx-radius-lg);
	margin-bottom: 18px;
	position: relative;
}

.cx-filters .cx-field {
	min-width: 0;
}

.cx-filters .cx-field label {
	white-space: nowrap;
}

.cx-filters .cx-field input,
.cx-filters .cx-field select {
	width: 100%;
}

.cx-field label {
	display: block;
	font-size: 13px;
	text-transform: capitalize;
	letter-spacing: .02em;
	font-weight: 600;
	color: #111;
	margin-bottom: 6px;
}

.cx-field input,
.cx-field select,
.cx-field textarea,
.cx-status-select {
	width: 100% !important;
	border: 1px solid var(--cx-border) !important;
	border-radius: 12px !important;
	height: 42px !important;
	margin: 0 !important;
	padding: 0 14px !important;
	background: var(--cx-white) !important;
	color: var(--cx-text) !important;
	font-size: 13px !important;
	outline: none !important;
	box-sizing: border-box !important;
	font-weight: 400 !important;
}

.cx-field textarea {
	height: 96px !important;
	min-height: 96px;
	padding: 12px 14px !important;
	resize: vertical;
}

.cx-modal-body .cx-field input,
.cx-modal-body .cx-field select,
.cx-modal-body .cx-field textarea {
	margin-bottom: 10px !important;
}

.cx-field input:focus,
.cx-field select:focus,
.cx-field textarea:focus,
.cx-status-select:focus {
	border-color: rgba(175, 36, 0, 0.35) !important;
	box-shadow: 0 0 0 3px rgba(175, 36, 0, 0.07);
}

.cx-reset-filter {
	position: static;
	align-self: end;
	height: 42px;
	padding: 0 16px !important;
	line-height: 1;
	border: none;
	background: linear-gradient(135deg, var(--cx-primary), var(--cx-primary-2));
	color: #fff;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: all .22s ease;
	box-shadow: 0 12px 28px rgba(175,36,0,.22);
	white-space: nowrap;
}

.cx-reset-filter:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 30px rgba(175,36,0,.22);
}

.cx-reset-filter:active {
	transform: translateY(0);
}

.cx-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	align-items: center;
	margin: 6px 0 14px;
	padding: 0 4px;
	color: var(--cx-secondary);
	font-weight: 500;
	font-size: 12px;
}

.cx-legend span {
	display: flex;
	align-items: center;
	gap: 8px;
}

.cx-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	display: inline-block;
	vertical-align: middle;
	background: #cbd5e1;
	flex: 0 0 10px;
}

.cx-dot-chua_xac_nhan { background: #3b82f6; }
.cx-dot-da_xac_nhan { background: #22c55e; }
.cx-dot-qua_chuyen { background: #9ca3af; }
.cx-dot-sap_toi_chuyen { background: #f97316; }
.cx-dot-da_huy { background: #ef4444; }

.cx-table-wrap {
	border-radius: var(--cx-radius-lg);
	overflow: auto;
	padding-bottom: 20px;
}

.cx-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 1100px;
}

.cx-table thead th {
	background: #f8fafc;
	color: var(--cx-secondary-2);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	padding: 12px 14px;
	white-space: nowrap;
	text-align: left;
	letter-spacing: .04em;
}
.cx-table thead th:nth-child(10) {
	width: 170px;
}
.cx-table tbody td {
	padding: 12px 14px;
	border-top: 1px solid rgba(44, 62, 85, 0.08);
	vertical-align: middle;
	white-space: nowrap;
	font-size: 13px;
	color: #111;
	font-weight: 400;
}

.cx-table tbody tr:hover {
	background: rgba(175, 36, 0, 0.025);
}

.cx-empty-row td {
	text-align: center;
	padding: 24px;
	color: var(--cx-muted);
}

.cx-status-select {
	height: 34px !important;
	min-width: 148px;
	border-radius: 999px !important;
	padding: 0 12px !important;
	font-weight: 500 !important;
	font-size: 12px !important;
}

.cx-source-tag,
.cx-trip-code {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 26px;
	padding: 0 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .02em;
}

.cx-source-web {
	background: #e8f0ff;
	color: #2563eb;
	border: 1px solid rgba(37, 99, 235, 0.12);
}

.cx-source-internal {
	background: #f3e8ff;
	color: #9333ea;
	border: 1px solid rgba(147, 51, 234, 0.12);
}

.cx-trip-code {
	background: #eef2ff;
	color: #4f46e5;
}

.cx-check-trip-btn,
.cx-view-note-btn,
.cx-edit-customer-btn,
.cx-seat-detail-btn,
.cx-toggle-sidebar-btn {
	appearance: none;
	border: none;
	background: linear-gradient(135deg, var(--cx-primary), var(--cx-primary-2));
	color: #fff !important;
	padding: 7px 12px !important;
	text-transform: none;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 10px 22px rgba(175,36,0,.18);
	transition: all .22s ease;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	line-height: 1;
}

.cx-check-trip-btn:hover,
.cx-view-note-btn:hover,
.cx-edit-customer-btn:hover,
.cx-seat-detail-btn:hover,
.cx-toggle-sidebar-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 26px rgba(175,36,0,.24);
}

.cx-check-trip-btn:focus,
.cx-view-note-btn:focus,
.cx-edit-customer-btn:focus,
.cx-seat-detail-btn:focus,
.cx-toggle-sidebar-btn:focus {
	outline: none;
	box-shadow:
		0 0 0 3px rgba(175,36,0,.12),
		0 12px 26px rgba(175,36,0,.24);
}

.cx-view-note-btn,
.cx-edit-customer-btn {
	min-height: 32px;
}

.cx-empty-note {
	color: var(--cx-muted);
	font-style: italic;
}

.cx-table td:last-child,
.cx-table td:nth-last-child(2) {
	white-space: nowrap;
}
.cx-modal {
	position: fixed;
	inset: 0;
	background: rgba(20, 32, 45, 0.42);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 9999;
	backdrop-filter: blur(4px);
}

.cx-modal.is-open {
	display: flex;
}

.cx-modal-box {
	width: 100%;
	max-width: 620px;
	border-radius: var(--cx-radius-xl);
	overflow: hidden;
}

.cx-modal-lg {
	max-width: 760px;
}

.cx-modal-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 18px;
	padding: 20px 22px 14px;
	border-bottom: 1px solid rgba(44, 62, 85, 0.08);
}

.cx-modal-head h3 {
	margin: 0;
	font-size: 20px;
	line-height: 1.25;
	color: var(--cx-text);
	font-weight: 600;
}

.cx-modal-sub {
	margin: 4px 0 0;
	color: var(--cx-muted);
	font-size: 12px;
	font-weight: 400;
}

.cx-close {
	appearance: none;
	border: none;
	background: none;
	font-size: 30px;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
	padding: 0;
}

.cx-modal-body {
	padding: 18px 22px;
}

.cx-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	padding: 0 22px 22px;
}

.cx-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}

.cx-route-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 18px;
	border: 1px solid var(--cx-border);
	border-radius: var(--cx-radius-md);
	padding: 14px 16px;
	margin-bottom: 12px;
	background: linear-gradient(180deg, #fff, #fff8f6);
}

.cx-route-left {
	display: flex;
	align-items: center;
	gap: 14px;
}

.cx-route-icon {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: rgba(175, 36, 0, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--cx-primary);
	font-size: 18px;
	font-weight: 700;
}

.cx-route-code {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 16px;
	font-weight: 600;
	color: var(--cx-secondary);
}

.cx-seat-badge {
	display: inline-flex;
	align-items: center;
	height: 24px;
	padding: 0 8px;
	border-radius: 999px;
	background: #f3e8ff;
	color: #6d28d9;
	font-size: 11px;
	font-weight: 600;
}

.cx-route-meta {
	margin-top: 4px;
	color: var(--cx-muted);
	font-weight: 400;
	font-size: 12px;
}

.cx-companion-card {
	border: 1px solid var(--cx-border);
	border-radius: var(--cx-radius-md);
	padding: 14px;
	margin-bottom: 12px;
	background: #fbfdff;
}

.cx-companion-card h4 {
	margin: 0 0 12px;
	color: var(--cx-primary-2);
	font-size: 15px;
	font-weight: 600;
}

.cx-empty-box {
	text-align: center;
	color: var(--cx-muted);
	padding: 18px;
	font-size: 13px;
}

.swal2-popup {
	border-radius: 18px !important;
	font-size: 13px !important;
}

.swal2-title {
	font-size: 18px !important;
	font-weight: 600 !important;
}

.swal2-html-container {
	font-size: 13px !important;
}

.swal2-confirm {
	background: linear-gradient(135deg, var(--cx-primary), var(--cx-primary-2)) !important;
	border-radius: 10px !important;
	font-size: 13px !important;
	padding: 10px 16px !important;
}

.swal2-cancel {
	border-radius: 10px !important;
	font-size: 13px !important;
	padding: 10px 16px !important;
}

@media (max-width: 1280px) {
	#cx-app {
		margin-left: 0;
	}

	.cx-filters {
		grid-template-columns: repeat(3, 1fr);
	}

	.cx-reset-filter {
		width: fit-content;
	}
}

@media (max-width: 820px) {

	#cx-app {
		margin-left: 0;
		padding: 14px;
	}

	.cx-header {
		flex-direction: column;
	}

	.cx-filters,
	.cx-grid-2 {
		grid-template-columns: 1fr;
	}

	.cx-reset-filter {
		width: 100%;
	}

	.cx-route-card {
		flex-direction: column;
		align-items: flex-start;
	}

	.cx-actions {
		flex-direction: column;
	}

	.cx-actions .cx-btn {
		width: 100%;
	}
}

/* MOBILE FILTER COLLAPSE */
.cx-toggle-filter {
	display: none;
	margin-bottom: 20px !important;
	width: 100%;
	margin-bottom: 10px;
	height: 42px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--cx-primary), var(--cx-primary-2));
	color: #fff;
	font-weight: 600;
	border: none;
}

/* mobile */
@media (max-width: 768px) {
	.cx-btn-primary {
		width: 100%;
		line-height: 1.3;
	}
	.cx-toggle-filter {
		display: block;
	}

	.cx-filters {
		display: none;
		grid-template-columns: 1fr;
	}

	.cx-filters.active {
		display: grid;
	}

	#cx-app {
		margin-left: 0; /* fix sidebar mobile */
	}
}

.cx-trip-type-badge{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-height:28px;
	padding:0 10px;
	border-radius:999px;
	font-size:11px;
	font-weight:700;
	letter-spacing:.02em;
	white-space:nowrap;
}

.cx-trip-type-badge.is-round{
	background:#fff3e8;
	color:#c2410c;
	border:1px solid rgba(194,65,12,.16);
}

.cx-trip-type-badge.is-oneway{
	background:#eef2ff;
	color:#4338ca;
	border:1px solid rgba(67,56,202,.14);
}

.cx-empty-note{
	color:var(--cx-muted);
	font-style:italic;
}

.cx-view-note-btn,
.cx-edit-customer-btn{
	padding:6px 10px !important;
	font-size:12px;
	border-radius:999px;
	white-space:nowrap;
}

.cx-inline-check{
	display:inline-flex;
	align-items:center;
	gap:8px;
	min-height:42px;
	cursor:pointer;
	font-weight:600;
}

.cx-inline-check input{
	width:16px !important;
	height:16px !important;
	margin:0 !important;
}

#cx-modal-edit .cx-modal-box{
	max-width:760px;
}

.cx-status-select {
	border-radius: 10px;
	padding: 8px 12px;
	font-weight: 600;
	border: 1px solid #dcdcdc;
	outline: none;
	min-width: 140px;
}

.cx-status-select.is-pending {
	background: #fff7e6;
	color: #9a6700;
	border-color: #f2d38b;
}

.cx-status-select.is-confirmed {
	background: #ecfdf3;
	color: #027a48;
	border-color: #a6f4c5;
}

.cx-status-select.is-cancelled {
	background: #fef3f2;
	color: #b42318;
	border-color: #fecdca;
}

.cx-trip-type-badge {
	display: inline-block;
	padding: 6px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.cx-trip-type-badge.is-oneway {
	background: #eff8ff;
	color: #175cd3;
}

.cx-trip-type-badge.is-round {
	background: #fdf2fa;
	color: #c11574;
}

.cx-empty-note {
	color: #98a2b3;
	font-style: italic;
}

.cx-modal {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 16px;
}

.cx-modal.is-open {
	display: flex;
}

.cx-modal-box {
	width: 100%;
	max-width: 900px;
	max-height: 90vh;
	overflow: auto;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}

.cx-modal-lg {
	max-width: 1100px;
}

.cx-modal-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	border-bottom: 1px solid #eee;
}

.cx-modal-head h3 {
	margin: 0 0 4px;
	font-size: 22px;
}

.cx-modal-sub {
	margin: 0;
	color: #667085;
	font-size: 14px;
}

.cx-modal-body {
	padding: 24px;
}

.cx-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding: 18px 24px 24px;
}

.cx-close {
	border: none;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

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

.cx-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cx-field label {
	font-weight: 600;
	color: #344054;
	font-size: 14px;
}

.cx-field input,
.cx-field select,
.cx-field textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid #d0d5dd;
	border-radius: 12px;
	background: #fff;
	box-sizing: border-box;
}

.cx-field textarea {
	min-height: 110px;
	resize: vertical;
}

.cx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: unset !important;
    line-height: 1.3;
	padding: 10px 14px !important;
	border-radius: 12px;
	border: 1px solid #d0d5dd;
	background: #fff;
	cursor: pointer;
	font-weight: 600;
}

.cx-btn-primary {
	background: #af2400;
	border-color: #af2400;
	color: #fff;
}

.cx-table-wrap {
	width: 100%;
	overflow-x: auto;
	border-radius: 16px;
	background: #fff;
}

.cx-table {
	width: 100%;
	min-width: 1400px;
	border-collapse: collapse;
}

.cx-table th,
.cx-table td {
	padding: 12px 10px;
	border-bottom: 1px solid #eaecf0;
	vertical-align: middle;
	white-space: nowrap;
}

.cx-table th {
	background: #f8fafc;
	font-size: 13px;
	color: #475467;
	text-align: left;
}

.cx-pagination {
	margin-top: 16px;
	display: flex;
	justify-content: center;
}

.cx-pagination-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: center;
}

@media (max-width: 768px) {
	.cx-header {
		display: flex;
		flex-direction: column;
		gap: 12px;
		align-items: stretch;
	}

	.cx-grid-2 {
		grid-template-columns: 1fr;
	}

	.cx-modal {
		padding: 10px;
	}

	.cx-modal-box,
	.cx-modal-lg {
		max-width: 100%;
		max-height: 95vh;
		border-radius: 16px;
	}

	.cx-modal-head,
	.cx-modal-body,
	.cx-actions {
		padding-left: 16px;
		padding-right: 16px;
	}

	.cx-actions {
		flex-direction: column-reverse;
	}

	.cx-actions .cx-btn {
		width: 100%;
	}

	.cx-filters {
		display: none;
	}

	.cx-filters.active {
		display: block;
	}

	.cx-table {
		min-width: 1200px;
	}
}


.cx-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.cx-swal-popup {
	border-radius: 18px !important;
	background: #fff !important;
	border: 1px solid rgba(175,36,0,.10) !important;
	box-shadow: 0 16px 40px rgba(24,39,58,.16) !important;
	padding: 18px !important;
}

.cx-swal-popup-title {
	font-size: 20px !important;
	font-weight: 700 !important;
	color: var(--cx-text) !important;
}

#cx-app {
	transition: margin-left .25s ease, width .25s ease, max-width .25s ease;
}

body.cx-sidebar-collapsed #cx-app {
	margin-left: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
}

/* bắt nhiều kiểu sidebar custom */
body.cx-sidebar-collapsed .btm-sidebar,
body.cx-sidebar-collapsed .bus-ticket-sidebar,
body.cx-sidebar-collapsed .sidebar,
body.cx-sidebar-collapsed .main-sidebar,
body.cx-sidebar-collapsed .app-sidebar,
body.cx-sidebar-collapsed .left-sidebar,
body.cx-sidebar-collapsed aside:first-of-type,
body.cx-sidebar-collapsed nav.sidebar {
	transform: translateX(-100%) !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.btm-sidebar,
.bus-ticket-sidebar,
.sidebar,
.main-sidebar,
.app-sidebar,
.left-sidebar,
aside:first-of-type,
nav.sidebar {
	transition: transform .25s ease, opacity .25s ease, visibility .25s ease !important;
}