/**
 * TripFusion — premium admin shell (Bootstrap 5)
 * Overrides legacy Bootstrap 3 patterns without renaming IDs/classes used by app JS.
 */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
	--tf-sidebar-bg: #0f172a;
	--tf-sidebar-border: rgba(255, 255, 255, 0.08);
	--tf-accent: #2563eb;
	--tf-accent-soft: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 55%, #0ea5e9 100%);
	--tf-radius: 0.65rem;
	--tf-shadow: 0 0.35rem 1.25rem rgba(15, 23, 42, 0.08);
	--tf-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.tf-body {
	font-family: var(--tf-font);
	background-color: #f4f6fb;
	color: #1e293b;
}

.tf-app {
	min-height: 100vh;
}

.tf-topbar {
	background: var(--tf-sidebar-bg) !important;
	border-color: var(--tf-sidebar-border) !important;
	z-index: 1030;
}

.tf-topbar .navbar-brand img {
	max-height: 36px;
	width: auto;
}

.tf-topbar .tf-topbar-meta {
	font-size: 0.875rem;
	opacity: 0.92;
}

.tf-topbar .tf-topbar-meta a {
	color: rgba(255, 255, 255, 0.88) !important;
	text-decoration: none;
}

.tf-topbar .tf-topbar-meta a:hover {
	color: #fff !important;
	text-decoration: underline;
}

.tf-body-row {
	min-height: 0;
}

/* Responsive sidebar: offcanvas on small, static panel on lg+ */
.tf-menu.offcanvas-lg {
	--bs-offcanvas-width: min(280px, 88vw);
	background-color: var(--tf-sidebar-bg) !important;
	border-right: 1px solid var(--tf-sidebar-border);
}

.tf-menu .offcanvas-header {
	border-bottom: 1px solid var(--tf-sidebar-border);
}

.tf-menu .nav-link {
	color: rgba(255, 255, 255, 0.82) !important;
	border-radius: 0.4rem;
	padding: 0.45rem 0.65rem;
	font-size: 0.875rem;
}

.tf-menu .nav-link:hover,
.tf-menu .nav-link:focus {
	color: #fff !important;
	background: rgba(255, 255, 255, 0.06);
}

.tf-menu .dropdown-menu {
	font-size: 0.875rem;
	border: none;
	box-shadow: var(--tf-shadow);
	border-radius: var(--tf-radius);
}

.tf-menu .dropdown-item {
	padding: 0.4rem 0.85rem;
}

.tf-menu .dropdown-item:hover {
	background: rgba(37, 99, 235, 0.08);
}

.tf-menu .dropdown-header,
.tf-menu .tf-nav-heading {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.45) !important;
	padding: 0.75rem 0.65rem 0.35rem;
}

.tf-menu .navbar-nav .nav-item.dropdown {
	position: relative;
}

/* Vertical sidebar: submenus stack instead of fly-out */
.tf-menu .navbar-nav > .dropdown > .dropdown-menu,
.tf-menu .dropdown-menu .dropdown-menu {
	position: static !important;
	transform: none !important;
	float: none;
	width: 100%;
	margin: 0.2rem 0 0.35rem;
	border: 0;
	background: rgba(0, 0, 0, 0.18);
	box-shadow: none;
}

.tf-menu .dropdown-menu > li > a,
.tf-menu .dropdown-menu .dropdown-item {
	color: rgba(255, 255, 255, 0.92) !important;
	white-space: normal;
}

.tf-menu .dropdown-menu > li > a:hover,
.tf-menu .dropdown-menu .dropdown-item:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff !important;
}

.tf-menu .caret,
.tf-menu .caret::before {
	border: none !important;
}

/* Nested submenus (legacy dropdown-submenu) */
.tf-menu .dropdown-submenu {
	position: relative;
}

.tf-menu .dropdown-submenu > .dropdown-menu {
	top: 0;
	left: 100%;
	margin-top: -0.25rem;
	margin-left: 0.125rem;
}

.tf-menu .dropdown-submenu > a.dropdown-toggle::after,
.tf-menu .dropdown-submenu > a.dropdown-toggle .caret {
	margin-left: auto;
}

@media (min-width: 992px) {
	.tf-menu .dropdown-submenu:hover > .dropdown-menu {
		display: block;
	}
}

.tf-main {
	background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
	min-width: 0;
}

.tf-main > .container,
.tf-main > .container-fluid {
	max-width: 100%;
}

/* Page chrome */
.tf-page-header {
	border: none;
	background: #fff;
	border-radius: var(--tf-radius);
	box-shadow: var(--tf-shadow);
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
}

.tf-page-header h1,
.tf-page-header h2,
.tf-page-header h3,
.tf-page-header h4 {
	margin: 0;
	font-weight: 600;
	color: #0f172a;
}

.tf-card {
	background: #fff;
	border-radius: var(--tf-radius);
	box-shadow: var(--tf-shadow);
	border: 1px solid rgba(15, 23, 42, 0.06);
}

.tf-card .table {
	margin-bottom: 0;
}

/* Tables */
.table-responsive.tf-table-wrap {
	border-radius: var(--tf-radius);
	box-shadow: var(--tf-shadow);
	background: #fff;
}

.tf-table-wrap .table thead th {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #64748b;
	border-bottom-width: 1px;
	white-space: nowrap;
}

.tf-table-wrap .table tbody tr:hover {
	background-color: rgba(37, 99, 235, 0.04);
}

/* Legacy Bootstrap 3 grid inside main */
.tf-main .container {
	padding-left: 1rem;
	padding-right: 1rem;
}

@media (min-width: 1200px) {
	.tf-main .container {
		max-width: 1320px;
	}
}

/* Buttons touched by legacy btn-default → neutral */
.btn-default,
.btn-secondary {
	--bs-btn-border-color: #cbd5e1;
}

/* Alerts popover / tasks */
.tf-topbar .d-status {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.tf-topbar .d-tas {
	display: inline-flex;
	min-width: 1.25rem;
	height: 1.25rem;
	align-items: center;
	justify-content: center;
	font-size: 0.65rem;
	font-weight: 600;
	background: #ef4444;
	color: #fff;
	border-radius: 999px;
	margin-left: 0.25rem;
}

.tf-topbar .popwidth > a {
	color: rgba(255, 255, 255, 0.9) !important;
	text-decoration: none;
}

/* Close buttons in legacy modals */
.tf-main .close,
.modal .close {
	filter: none;
	opacity: 0.55;
}

.modal-header .btn-close {
	filter: invert(1) grayscale(1);
}

/* Nav tabs legacy */
.tf-main .nav-tabs .nav-link {
	border-radius: var(--tf-radius) var(--tf-radius) 0 0;
}

.tf-main .nav-tabs .nav-link.active {
	font-weight: 600;
	color: var(--tf-accent);
	border-color: #e2e8f0 #e2e8f0 #fff;
}

/* Loading shimmer (optional class for wrappers) */
.tf-loading {
	position: relative;
	min-height: 3rem;
}

.tf-loading::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(37, 99, 235, 0.06) 50%,
		rgba(255, 255, 255, 0) 100%
	);
	animation: tf-shimmer 1.2s infinite;
	pointer-events: none;
}

@keyframes tf-shimmer {
	0% {
		transform: translateX(-40%);
	}
	100% {
		transform: translateX(40%);
	}
}

/* --- Login (login-fullwidith / login-wrap: sizing via initialize-loginpage.js; margins cleared on .tf-login-page) --- */
.tf-login-page {
	--tf-login-font: "Plus Jakarta Sans", system-ui, sans-serif;
	--tf-login-display: "Fraunces", Georgia, serif;
	font-family: var(--tf-login-font);
	background-color: #050816;
	min-height: 100vh;
	overflow-x: hidden;
}

.tf-login-page::before {
	content: "";
	position: fixed;
	inset: 0;
	background:
		radial-gradient(ellipse 80% 55% at 20% 20%, rgba(59, 130, 246, 0.45), transparent 55%),
		radial-gradient(ellipse 60% 50% at 85% 10%, rgba(14, 165, 233, 0.28), transparent 50%),
		radial-gradient(ellipse 50% 40% at 50% 100%, rgba(99, 102, 241, 0.2), transparent 45%),
		linear-gradient(165deg, #030712 0%, #0f172a 38%, #020617 100%);
	pointer-events: none;
	z-index: 0;
}

.tf-login-page::after {
	content: "";
	position: fixed;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
	opacity: 0.5;
	pointer-events: none;
	z-index: 0;
}

.tf-login-page .login-fullwidith {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(1rem, 4vw, 2.5rem);
	box-sizing: border-box;
}

.tf-login-shell {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 1040px;
	gap: 0;
	border-radius: 1.35rem;
	overflow: hidden;
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.06),
		0 2.5rem 5rem -1rem rgba(0, 0, 0, 0.55),
		0 0 80px -20px rgba(59, 130, 246, 0.35);
}

@media (min-width: 992px) {
	.tf-login-shell {
		flex-direction: row;
		align-items: stretch;
		min-height: min(560px, calc(100vh - 3rem));
	}
}

/* Brand column */
.tf-login-hero {
	position: relative;
	flex: 1 1 46%;
	min-height: 220px;
	padding: clamp(1.75rem, 4vw, 3rem);
	background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 58, 138, 0.55) 100%);
	color: #f8fafc;
	display: none;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
}

@media (min-width: 992px) {
	.tf-login-hero {
		display: flex;
	}
}

.tf-login-hero__mesh {
	position: absolute;
	inset: 0;
	background-image: radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.06) 1px, transparent 0);
	background-size: 28px 28px;
	opacity: 0.5;
	pointer-events: none;
}

.tf-login-hero__glow {
	position: absolute;
	width: 140%;
	height: 80%;
	top: -30%;
	left: -20%;
	background: radial-gradient(ellipse, rgba(56, 189, 248, 0.25), transparent 70%);
	pointer-events: none;
}

.tf-login-hero__content {
	position: relative;
	z-index: 2;
	max-width: 26rem;
}

.tf-login-hero__eyebrow {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-weight: 600;
	color: rgba(147, 197, 253, 0.95);
	margin-bottom: 1rem;
}

.tf-login-hero__title {
	font-family: var(--tf-login-display);
	font-size: clamp(1.65rem, 2.8vw, 2.35rem);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.02em;
	margin-bottom: 1rem;
	background: linear-gradient(120deg, #fff 0%, #bae6fd 55%, #e0f2fe 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.tf-login-hero__lead {
	font-size: 0.95rem;
	line-height: 1.55;
	color: rgba(226, 232, 240, 0.88);
	margin-bottom: 1.5rem;
}

.tf-login-hero__ticks {
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 0.85rem;
	color: rgba(203, 213, 225, 0.95);
}

.tf-login-hero__ticks li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.tf-login-hero__ticks i {
	color: #34d399;
	font-size: 1rem;
}

/* Form card */
.tf-login-page form#fm_login,
.tf-login-page .tf-login-form {
	flex: 1 1 54%;
	display: flex;
	margin: 0;
}

.tf-login-page .login-wrap {
	position: relative;
	width: 100%;
	max-width: none;
	margin: 0 !important;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-radius: 0;
	box-shadow: none;
	border: none;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

@media (min-width: 992px) {
	.tf-login-page .login-wrap {
		border-radius: 0;
		min-width: 0;
	}
}

@media (max-width: 991.98px) {
	.tf-login-shell {
		border-radius: 1.25rem;
		max-width: 440px;
	}
	.tf-login-page .login-wrap {
		border-radius: 1.25rem;
	}
}

.tf-login-card-accent {
	height: 4px;
	width: 100%;
	background: linear-gradient(90deg, #1d4ed8, #3b82f6, #06b6d4, #6366f1);
	background-size: 200% 100%;
	animation: tf-login-accent-shift 8s ease infinite;
}

@keyframes tf-login-accent-shift {
	0%,
	100% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
}

.tf-login-card-body {
	padding: clamp(1.75rem, 4vw, 2.75rem);
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.tf-login-brand-mark {
	width: 4.5rem;
	height: 4.5rem;
	border-radius: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(14, 165, 233, 0.1));
	border: 1px solid rgba(37, 99, 235, 0.15);
	box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.tf-login-page .login-img {
	max-height: 42px;
	width: auto;
	margin: 0;
}

.tf-login-card-title {
	font-family: var(--tf-login-display);
	font-size: 1.65rem;
	font-weight: 600;
	color: #0f172a;
	letter-spacing: -0.02em;
}

.tf-login-mobile-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.68rem !important;
}

.tf-login-mobile-brand__logo {
	border-radius: 10px;
	display: block;
	margin: 0 auto 0.75rem;
	max-width: 120px;
	height: auto;
}

.tf-login-mobile-brand__title {
	font-family: var(--tf-login-display);
	font-size: 1.35rem;
	font-weight: 600;
	color: #0f172a;
	letter-spacing: -0.02em;
}

.tf-login-mobile-brand__about {
	font-size: 0.875rem;
	line-height: 1.5;
	max-width: 20rem;
	margin-left: auto;
	margin-right: auto;
}

.tf-login-label {
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #64748b;
	margin-bottom: 0.35rem;
}

.tf-login-input-group .input-group-text {
	background: #f8fafc;
	border-color: #e2e8f0;
	color: #64748b;
	border-right: 0;
	padding-left: 1rem;
}

.tf-login-input-group .form-control {
	border-left: 0;
	border-color: #e2e8f0;
	font-size: 1rem;
	padding-top: 0.65rem;
	padding-bottom: 0.65rem;
}

.tf-login-input-group .form-control:focus {
	border-color: #93c5fd;
	box-shadow: none;
}

.tf-login-input-group:focus-within .input-group-text {
	border-color: #93c5fd;
	background: #eff6ff;
	color: #2563eb;
}

.tf-login-link {
	color: #2563eb;
	font-weight: 600;
	text-decoration: none;
}

.tf-login-link:hover {
	color: #1d4ed8;
	text-decoration: underline;
}

.tf-login-page #error.tf-login-alert {
	min-height: 0;
	border-radius: 0.65rem;
	font-size: 0.875rem;
}

.tf-login-submit {
	position: relative;
	overflow: hidden;
	border: none !important;
	border-radius: 0.75rem !important;
	padding: 0.85rem 1.25rem !important;
	font-weight: 700 !important;
	font-size: 1rem !important;
	letter-spacing: 0.02em;
	background: linear-gradient(135deg, #1e40af 0%, #2563eb 45%, #0891b2 100%) !important;
	color: #fff !important;
	box-shadow: 0 10px 28px -8px rgba(37, 99, 235, 0.55);
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.tf-login-submit::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 45%, transparent 70%);
	transform: translateX(-100%);
	transition: transform 0.5s ease;
}

.tf-login-submit:hover {
	transform: translateY(-1px);
	filter: brightness(1.04);
	box-shadow: 0 14px 36px -8px rgba(37, 99, 235, 0.6);
}

.tf-login-submit:hover::before {
	transform: translateX(100%);
}

.tf-login-submit:active {
	transform: translateY(0);
}

.tf-login-submit__icon {
	opacity: 0.95;
}

.tf-login-footer.login-c3 {
	border-top: 1px solid rgba(226, 232, 240, 0.95);
	padding: 1rem 1.5rem 1.25rem;
	margin-top: 0;
	font-size: 0.78rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	background: rgba(248, 250, 252, 0.65);
}

.tf-login-footlink.whitelink {
	color: #64748b !important;
	font-weight: 500;
}

.tf-login-footlink.whitelink:hover {
	color: #0f172a !important;
}

/* ---- Estimation listing (compact professional table) ---- */
.tf-estimation-page {
	max-width: 1600px;
	margin-left: auto;
	margin-right: auto;
}

.tf-estimation-page .tf-estimation-card {
	background: #fff;
	overflow: hidden;
}

.tf-estimation-page .tf-estimation-tabs {
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0 !important;
}

.tf-estimation-page .tf-estimation-tabs .nav-link {
	font-size: 0.8125rem;
	font-weight: 500;
	color: #64748b;
	border: 1px solid transparent;
	padding: 0.45rem 0.85rem;
	margin-bottom: -1px;
}

.tf-estimation-page .tf-estimation-tabs .nav-link:hover {
	color: #0f172a;
	border-color: #e2e8f0 #e2e8f0 #fff;
	background: rgba(255, 255, 255, 0.85);
}

.tf-estimation-page .tf-estimation-tabs .nav-link.active {
	color: #1e40af;
	background: #fff;
	border-color: #e2e8f0 #e2e8f0 #fff;
	font-weight: 600;
}

.tf-estimation-page .tf-estimation-tab-content {
	background: #fff;
}

.tf-estimation-page .tf-estimation-table-wrap {
	padding: 0.5rem 0.65rem 0.65rem;
}

@media (min-width: 992px) {
	.tf-estimation-page .tf-estimation-table-wrap {
		padding: 0.65rem 1rem 0.85rem;
	}
}

.tf-estimation-page table.table {
	font-size: 0.78rem;
	line-height: 1.35;
}

.tf-estimation-page table.table > :not(caption) > * > * {
	padding: 0.28rem 0.45rem;
	vertical-align: middle;
}

.tf-estimation-page table.table thead th {
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #64748b;
	background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
	border-bottom: 1px solid #e2e8f0;
	white-space: nowrap;
}

.tf-estimation-page .tf-est-name {
	max-width: 14rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tf-estimation-page .tf-est-link {
	font-weight: 600;
	text-decoration: none;
	color: #1d4ed8;
}

.tf-estimation-page .tf-est-link:hover {
	color: #1e3a8a;
	text-decoration: underline;
}

.tf-estimation-page .tf-est-code {
	font-weight: 500;
	font-size: 0.76rem;
}

.tf-estimation-page .tf-est-status {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 600;
	padding: 0.12rem 0.4rem;
	border-radius: 999px;
	background: #f1f5f9;
	color: #475569;
	line-height: 1.2;
}

.tf-estimation-page .dataTables_wrapper {
	font-size: 0.78rem;
	padding: 0.35rem 0.5rem 0.5rem;
}

.tf-estimation-page .dataTables_wrapper .dataTables_filter {
	float: none;
	text-align: right;
	margin-bottom: 0.35rem;
}

.tf-estimation-page .dataTables_wrapper .dataTables_filter label {
	font-weight: 500;
	color: #64748b;
	margin-bottom: 0;
}

.tf-estimation-page .dataTables_wrapper .dataTables_filter input {
	display: inline-block;
	width: 12rem;
	max-width: 100%;
	margin-left: 0.35rem;
	padding: 0.22rem 0.45rem;
	font-size: 0.78rem;
	border: 1px solid #cbd5e1;
	border-radius: 0.35rem;
}

.tf-estimation-page .dataTables_wrapper .dataTables_info {
	padding-top: 0.4rem;
	color: #64748b;
}

.tf-estimation-page .dataTables_wrapper .dataTables_paginate {
	padding-top: 0.35rem;
}

.tf-estimation-page .dataTables_wrapper .dataTables_paginate .paginate_button {
	padding: 0.15rem 0.45rem !important;
	font-size: 0.75rem !important;
	margin: 0 1px !important;
	border-radius: 0.3rem !important;
}

.tf-estimation-page .dataTables_wrapper .dataTables_paginate .paginate_button.current {
	background: #1d4ed8 !important;
	border-color: #1d4ed8 !important;
	color: #fff !important;
}

/* ---- Estimation add / edit: narrow glass card, tour hero background, motion ---- */
@keyframes tf-est-hero-drift {
	0% {
		transform: scale(1.05) translate(0, 0);
	}
	100% {
		transform: scale(1.12) translate(-2.5%, -1.5%);
	}
}

@keyframes tf-est-fade-up {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes tf-est-card-glow {
	from {
		box-shadow: 0 0.4rem 1.25rem rgba(15, 23, 42, 0.1);
	}
	to {
		box-shadow: 0 0.75rem 2rem rgba(37, 99, 235, 0.14);
	}
}

.tf-estimation-add {
	position: relative;
	min-height: min(90vh, 980px);
	margin: -0.35rem -0.25rem 1rem;
	padding: 1.15rem 0.5rem 2rem;
	border-radius: 1rem;
	overflow: hidden;
	isolation: isolate;
}

@media (min-width: 992px) {
	.tf-estimation-add {
		margin: -0.15rem -0.35rem 1.25rem;
		padding: 1.35rem 0.75rem 2.25rem;
	}
}

.tf-estimation-add::before {
	content: "";
	position: absolute;
	inset: -8%;
	background-image: url("https://images.unsplash.com/photo-1476514525535-07fb3b4ae5f1?auto=format&fit=crop&w=2000&q=80");
	background-size: cover;
	background-position: 52% 40%;
	animation: tf-est-hero-drift 42s ease-in-out infinite alternate;
	z-index: 0;
	will-change: transform;
}

.tf-estimation-add::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		128deg,
		rgba(15, 23, 42, 0.78) 0%,
		rgba(30, 58, 138, 0.48) 42%,
		rgba(8, 145, 178, 0.38) 100%
	);
	pointer-events: none;
}

.tf-estimation-add-content {
	position: relative;
	z-index: 2;
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 0.2rem;
}

.tf-estimation-add-anim {
	opacity: 0;
	animation: tf-est-fade-up 0.68s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.tf-estimation-add-anim-1 {
	animation-delay: 0.05s;
}

.tf-estimation-add-anim-2 {
	animation-delay: 0.14s;
}

.tf-estimation-add-anim-4 {
	animation-delay: 0.34s;
}

.tf-estimation-add .tf-estimation-add-breadcrumb {
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.55);
	margin-bottom: 0.75rem;
	font-size: 0.8125rem;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.tf-estimation-add .tf-estimation-add-breadcrumb:hover {
	box-shadow: 0 6px 26px rgba(0, 0, 0, 0.1);
	transform: translateY(-1px);
}

.tf-estimation-add .tf-estimation-add-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
	color: #94a3b8;
}

.tf-estimation-add-anim-2 h1,
.tf-estimation-add-anim-2 .text-muted {
	color: #f8fafc !important;
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.tf-estimation-add-anim-2 .text-muted {
	opacity: 0.92 !important;
}

.tf-estimation-add .tf-estimation-add-card {
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.6);
	opacity: 0;
	animation: tf-est-fade-up 0.72s 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards,
		tf-est-card-glow 7s ease-in-out 0.9s infinite alternate;
	box-shadow: 0 0.4rem 1.25rem rgba(15, 23, 42, 0.1);
	transition: transform 0.25s ease;
}

.tf-estimation-add .tf-estimation-add-card:hover {
	transform: translateY(-2px);
}

.tf-estimation-add .tf-estimation-add-form fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.tf-estimation-add .form-group {
	margin-bottom: 0.85rem;
}

.tf-estimation-add .form-horizontal .control-label,
.tf-estimation-add .form-label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #475569;
	text-align: left;
	padding-left: 0;
	margin-bottom: 0.25rem;
}

.tf-estimation-add .form-control,
.tf-estimation-add select.form-control,
.tf-estimation-add textarea.form-control {
	max-width: 100%;
	width: 100%;
	font-size: 0.875rem;
	padding: 0.35rem 0.55rem;
	border-radius: 0.35rem;
	border: 1px solid #cbd5e1;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tf-estimation-add .form-control:focus,
.tf-estimation-add select:focus,
.tf-estimation-add textarea:focus {
	border-color: #3b82f6;
	box-shadow: 0 0 0 0.15rem rgba(59, 130, 246, 0.18);
}

.tf-estimation-add select:not(.form-control) {
	max-width: 100%;
	width: 100%;
	min-height: calc(1.5em + 0.7rem);
	font-size: 0.875rem;
	padding: 0.35rem 0.55rem;
	border-radius: 0.35rem;
	border: 1px solid #cbd5e1;
	background-color: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tf-estimation-add textarea {
	min-height: 5rem;
	width: 100%;
	max-width: 100%;
}

.tf-estimation-add .row {
	--bs-gutter-x: 0.85rem;
	--bs-gutter-y: 0.45rem;
}

.tf-estimation-add [class*="col-md"] {
	padding-bottom: 0.12rem;
}

.tf-estimation-add .alert {
	border-radius: 0.4rem;
	font-size: 0.875rem;
	border: 1px solid transparent;
}

.tf-estimation-add .alert-block {
	display: block;
	padding: 0.55rem 0.75rem;
}

.tf-estimation-add .alert-info {
	background: rgba(239, 246, 255, 0.95);
	border-color: #bfdbfe;
	color: #1e3a8a;
}

.tf-estimation-add .radio-inline,
.tf-estimation-add .checkbox {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-right: 1rem;
	font-size: 0.875rem;
	vertical-align: middle;
}

.tf-estimation-add .btn {
	border-radius: 0.35rem;
	font-weight: 500;
	font-size: 0.8125rem;
	transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.tf-estimation-add .btn:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

.tf-estimation-add .btn-mini,
.tf-estimation-add .btn-sm {
	padding: 0.25rem 0.55rem;
	font-size: 0.75rem;
}

.tf-estimation-add .glyphicon {
	margin-left: 0.15rem;
	cursor: pointer;
	color: #2563eb;
	text-decoration: none;
	font-size: 1rem;
	transition: color 0.18s ease, transform 0.18s ease;
}

.tf-estimation-add .glyphicon:hover {
	color: #1d4ed8;
	transform: scale(1.08);
}

.modal .glyphicon {
	cursor: pointer;
	color: #2563eb;
	font-size: 1rem;
}

.modal .glyphicon:hover {
	color: #1d4ed8;
}

.modal .modal-footer {
	border-top: 1px solid #e2e8f0;
	padding: 0.75rem 1rem;
	background: #f8fafc;
	border-radius: 0 0 0.5rem 0.5rem;
}

.tf-estimation-add .table {
	font-size: 0.8125rem;
}

.tf-estimation-add .table > :not(caption) > * > * {
	padding: 0.35rem 0.5rem;
	vertical-align: middle;
}

.tf-estimation-add .well {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 0.4rem;
	padding: 0.75rem 1rem;
}

@media (prefers-reduced-motion: reduce) {
	.tf-estimation-add::before {
		animation: none !important;
		transform: scale(1.06);
	}

	.tf-estimation-add .tf-estimation-add-card {
		animation: none !important;
		opacity: 1;
		box-shadow: 0 0.4rem 1.25rem rgba(15, 23, 42, 0.1);
	}

	.tf-estimation-add .tf-estimation-add-card:hover {
		transform: none;
	}

	.tf-estimation-add-anim {
		animation: none !important;
		opacity: 1;
	}

	.tf-estimation-add .btn:hover:not(:disabled),
	.tf-estimation-add .glyphicon:hover,
	.tf-estimation-add .tf-estimation-add-breadcrumb:hover {
		transform: none;
	}
}

/* —— Estimation main: workflow heading (top tabs) —— */
.tf-est-main-workspace {
	padding-top: 0.15rem;
}

.tf-est-workflow-toolbar {
	margin-bottom: 0.85rem;
}

.tf-est-workflow-toolbar-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem;
	margin-bottom: 0.55rem;
}

.tf-est-workflow-context {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
}

.tf-est-workflow-context-label {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #64748b;
}

.tf-est-workflow-code {
	font-size: 1.05rem;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: 0.02em;
}

.tf-est-workflow-summary-btn .glyphicon {
	margin-right: 0.35rem;
}

.tf-est-workflow-nav {
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(226, 232, 240, 0.95);
	border-radius: 0.7rem;
	padding: 0.4rem;
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.tf-est-workflow-nav-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	border: none !important;
	margin: 0 !important;
}

.tf-est-workflow-nav-list > li {
	float: none !important;
	margin: 0 !important;
}

.tf-est-workflow-nav-list > li > a.tf-est-workflow-link {
	display: inline-block;
	border-radius: 0.45rem !important;
	border: 1px solid transparent !important;
	padding: 0.42rem 0.65rem !important;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.25;
	color: #475569 !important;
	background: #f1f5f9;
	margin: 0 !important;
	transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease,
		transform 0.18s ease;
}

.tf-est-workflow-nav-list > li > a.tf-est-workflow-link:hover {
	background: #e2e8f0;
	color: #0f172a !important;
	text-decoration: none !important;
}

.tf-est-workflow-nav-list > li.active > a.tf-est-workflow-link {
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.25) !important;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.tf-est-workflow-pending img {
	width: 14px;
	height: 14px;
	vertical-align: text-top;
	margin-left: 0.25rem;
}

.tf-est-tabbed {
	margin-top: 0.25rem;
}

@media (max-width: 575.98px) {
	.tf-est-workflow-nav-list > li > a.tf-est-workflow-link {
		font-size: 0.72rem;
		padding: 0.35rem 0.5rem !important;
	}
}

/* —— Estimation main: services sidebar + content —— */
.tf-estimation-services-layout {
	align-items: flex-start;
}

.tf-services-sidebar {
	position: sticky;
	top: 0.75rem;
	border-radius: 0.85rem;
	padding: 1rem 0.85rem 1.15rem;
	overflow: hidden;
	isolation: isolate;
	border: 1px solid rgba(148, 163, 184, 0.4);
	box-shadow: 0 0.55rem 1.6rem rgba(15, 23, 42, 0.12);
	background: rgba(248, 250, 252, 0.55);
}

.tf-services-sidebar::before {
	content: "";
	position: absolute;
	inset: -12%;
	background-image: url("https://images.unsplash.com/photo-1469854523086-cc02fe5d8800?auto=format&fit=crop&w=1600&q=80");
	background-size: cover;
	background-position: 50% 42%;
	opacity: 0.28;
	z-index: 0;
	pointer-events: none;
}

.tf-services-sidebar::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		165deg,
		rgba(255, 255, 255, 0.88) 0%,
		rgba(241, 245, 249, 0.92) 38%,
		rgba(248, 250, 252, 0.96) 100%
	);
}

.tf-services-sidebar-head,
.tf-services-sidebar .tf-services-nav {
	position: relative;
	z-index: 2;
}

.tf-services-sidebar-head {
	margin-bottom: 0.65rem;
	padding-bottom: 0.65rem;
	border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.tf-services-sidebar-kicker {
	display: block;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #64748b;
	margin-bottom: 0.2rem;
}

.tf-services-sidebar-title {
	font-size: 1.15rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 0.35rem;
	line-height: 1.2;
}

.tf-services-sidebar-desc {
	font-size: 0.78rem;
	color: #475569;
	margin: 0;
	line-height: 1.45;
}

.tf-services-nav-list {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.tf-services-nav-thumb {
	width: 2.55rem;
	height: 2.55rem;
	flex-shrink: 0;
	border-radius: 0.5rem;
	background-size: cover;
	background-position: center;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 2px 8px rgba(15, 23, 42, 0.12);
}

.tf-svc-t--1 .tf-services-nav-thumb {
	background-image: url("https://images.unsplash.com/photo-1566073771259-6a8506099945?auto=format&fit=crop&w=400&q=80");
}

.tf-svc-t--2 .tf-services-nav-thumb {
	background-image: url("https://images.unsplash.com/photo-1449965408869-eaa3f087e58f?auto=format&fit=crop&w=400&q=80");
}

.tf-svc-t--3 .tf-services-nav-thumb {
	background-image: url("https://images.unsplash.com/photo-1566127440899-44201b14d2e7?auto=format&fit=crop&w=400&q=80");
}

.tf-svc-t--4 .tf-services-nav-thumb {
	background-image: url("https://images.unsplash.com/photo-1414235077428-338989a2e8c0?auto=format&fit=crop&w=400&q=80");
}

.tf-svc-t--5 .tf-services-nav-thumb {
	background-image: url("https://images.unsplash.com/photo-1530549387789-4c1017266635?auto=format&fit=crop&w=400&q=80");
}

.tf-svc-t--6 .tf-services-nav-thumb {
	background-image: url("https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?auto=format&fit=crop&w=400&q=80");
}

.tf-svc-t--7 .tf-services-nav-thumb {
	background-image: url("https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?auto=format&fit=crop&w=400&q=80");
}

.tf-svc-t--9 .tf-services-nav-thumb {
	background-image: url("https://images.unsplash.com/photo-1504609773096-104ff2c73ba4?auto=format&fit=crop&w=400&q=80");
}

.tf-svc-t--10 .tf-services-nav-thumb {
	background-image: url("https://images.unsplash.com/photo-1524661135-423995f22d0b?auto=format&fit=crop&w=400&q=80");
}

.tf-svc-t--11 .tf-services-nav-thumb {
	background-image: url("https://images.unsplash.com/photo-1436491865332-7a61a109cc05?auto=format&fit=crop&w=400&q=80");
}

.tf-services-nav-thumb ~ .tf-services-nav-icon {
	display: none;
}

.tf-services-nav-link {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.5rem 0.55rem;
	border-radius: 0.55rem;
	text-decoration: none !important;
	color: #0f172a !important;
	font-size: 0.84rem;
	font-weight: 600;
	border: 1px solid rgba(226, 232, 240, 0.85);
	background: rgba(255, 255, 255, 0.82);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.tf-services-nav-link:hover {
	background: rgba(255, 255, 255, 0.96);
	border-color: rgba(59, 130, 246, 0.35);
	box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
	transform: translateY(-1px);
}

.tf-services-nav-link:active {
	transform: translateY(0);
}

.tf-services-nav-item.is-active .tf-services-nav-link {
	background: linear-gradient(90deg, rgba(37, 99, 235, 0.14) 0%, rgba(255, 255, 255, 0.96) 100%);
	border-color: rgba(37, 99, 235, 0.45);
	box-shadow: 0 4px 18px rgba(37, 99, 235, 0.18);
	color: #0f172a !important;
}

.tf-services-nav-item.is-active .tf-services-nav-thumb {
	box-shadow: inset 0 0 0 2px #2563eb, 0 2px 10px rgba(37, 99, 235, 0.25);
}

.tf-services-nav-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 0.45rem;
	background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
	color: #1d4ed8;
	flex-shrink: 0;
}

.tf-services-nav-icon .glyphicon {
	font-size: 0.95rem;
	margin: 0 !important;
}

.tf-services-nav-label {
	flex: 1;
	min-width: 0;
	line-height: 1.3;
}

.tf-services-content {
	min-height: 12rem;
	border-radius: 0.75rem;
	padding: 0.25rem;
	background: rgba(248, 250, 252, 0.92);
	border: 1px solid rgba(226, 232, 240, 0.95);
}

.tf-services-content:empty {
	min-height: 8rem;
}

@media (max-width: 991.98px) {
	.tf-services-sidebar {
		position: relative;
		top: 0;
		margin-bottom: 0.25rem;
	}

	.tf-services-nav-list {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 0.4rem;
	}

	.tf-services-nav-item {
		flex: 1 1 calc(50% - 0.25rem);
		min-width: 140px;
	}

	.tf-services-nav-link {
		height: 100%;
	}
}

/* —— Transport grid (loaded inside Services workspace) —— */
.tf-estimation-transport {
	position: relative;
	margin: -0.25rem -0.15rem 0.5rem;
	padding: 1rem 0.5rem 1.25rem;
	border-radius: 0.85rem;
	overflow: hidden;
	isolation: isolate;
	min-height: min(70vh, 720px);
}

.tf-estimation-transport::before {
	content: "";
	position: absolute;
	inset: -8%;
	background-image: url("https://images.unsplash.com/photo-1449965408869-eaa3f087e58f?auto=format&fit=crop&w=2000&q=80");
	background-size: cover;
	background-position: 50% 55%;
	animation: tf-est-hero-drift 38s ease-in-out infinite alternate;
	z-index: 0;
	will-change: transform;
}

.tf-estimation-transport::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		118deg,
		rgba(15, 23, 42, 0.82) 0%,
		rgba(30, 41, 59, 0.72) 38%,
		rgba(30, 64, 175, 0.45) 100%
	);
	pointer-events: none;
}

.tf-estimation-transport-content {
	position: relative;
	z-index: 2;
	max-width: 100%;
	padding: 0 0.15rem;
}

.tf-estimation-transport-head {
	margin-bottom: 0.75rem;
}

.tf-estimation-transport-title {
	color: #f8fafc;
	font-size: 1.35rem;
	font-weight: 700;
	margin: 0 0 0.25rem;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.tf-estimation-transport-lead {
	color: rgba(226, 232, 240, 0.92);
	font-size: 0.875rem;
	margin: 0;
	max-width: 42rem;
	line-height: 1.45;
}

.tf-estimation-transport-anim {
	opacity: 0;
	animation: tf-est-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.tf-estimation-transport-head.tf-estimation-transport-anim {
	animation-delay: 0.06s;
}

.tf-estimation-transport-card {
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border: 1px solid rgba(255, 255, 255, 0.65);
	border-radius: 0.65rem;
	box-shadow: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.12);
	padding: 0.5rem 0.35rem 0.65rem;
}

.tf-estimation-transport-card.tf-estimation-transport-anim {
	animation-delay: 0.16s;
}

.tf-estimation-transport-table-wrap {
	max-height: min(68vh, 640px);
	overflow: auto;
	border-radius: 0.45rem;
	border: 1px solid #e2e8f0;
}

.tf-estimation-transport .table {
	font-size: 0.78rem;
	margin-bottom: 0;
	white-space: nowrap;
}

.tf-estimation-transport .table thead th {
	position: sticky;
	top: 0;
	z-index: 3;
	background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
	color: #0f172a;
	font-weight: 600;
	vertical-align: middle;
	box-shadow: 0 1px 0 rgba(148, 163, 184, 0.6);
}

.tf-estimation-transport .table > :not(caption) > * > * {
	padding: 0.3rem 0.4rem;
	vertical-align: middle;
}

.tf-estimation-transport .city_list,
.tf-estimation-transport input.input-small {
	min-width: 4.5rem;
	max-width: 7rem;
	font-size: 0.75rem;
}

.tf-estimation-transport textarea {
	max-width: 100%;
	font-size: 0.8rem;
}

.tf-estimation-transport .btn-mini {
	border-radius: 0.35rem;
}

.tf-estimation-transport .tf-transport-add-cell {
	text-align: center;
	vertical-align: middle;
	white-space: nowrap;
}

.tf-estimation-transport .tf-btn-add-city {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.28rem;
	padding: 0.22rem 0.5rem;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.15;
	color: #fff !important;
	background: linear-gradient(145deg, #2563eb 0%, #1d4ed8 55%, #1e40af 100%);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 0.4rem;
	box-shadow: 0 2px 6px rgba(30, 64, 175, 0.35);
	white-space: nowrap;
	transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tf-estimation-transport .tf-btn-add-city:hover:not(:disabled) {
	filter: brightness(1.05);
	box-shadow: 0 3px 10px rgba(30, 64, 175, 0.45);
	transform: translateY(-1px);
}

.tf-estimation-transport .tf-btn-add-city:active:not(:disabled) {
	transform: translateY(0);
}

.tf-estimation-transport .tf-btn-add-city-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1rem;
	font-size: 0.95rem;
	font-weight: 800;
	line-height: 1;
}

.tf-estimation-transport .tf-btn-add-city-text {
	letter-spacing: 0.02em;
}

.tf-estimation-transport .tf-transport-update-btn {
	font-weight: 600;
	padding: 0.4rem 1rem;
	border-radius: 0.45rem;
	border: none;
	box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
	transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tf-estimation-transport .tf-transport-update-btn:hover:not(:disabled) {
	filter: brightness(1.06);
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38);
	transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
	.tf-estimation-transport::before {
		animation: none !important;
		transform: scale(1.05);
	}

	.tf-estimation-transport-anim {
		animation: none !important;
		opacity: 1;
	}

	.tf-estimation-transport .tf-btn-add-city:hover:not(:disabled),
	.tf-estimation-transport .tf-transport-update-btn:hover:not(:disabled) {
		transform: none;
	}
}

/* Legacy screen-reader utility used in modals */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
