/* Footer padding replacement for .py-3 with mobile adjustment */
.footer-safe {
	padding-top: 1rem;
	padding-bottom: 1rem;
}

/* Bottom Navigation for Mobile */
.bottom-nav {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: #fff;
	border-top: 1px solid #e9ecef;
	z-index: 9999;
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
	width: 100vw;
	padding-bottom: max(0px, env(safe-area-inset-bottom));
}

.bottom-nav-container {
	display: flex;
	justify-content: space-around;
	align-items: center;
	height: 70px;
	width: 100%;
	margin: 0;
	padding: 0;
}

.bottom-nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	color: #6c757d;
	text-decoration: none !important;
	transition: all 0.3s ease;
	flex: 1;
	height: 100%;
	font-size: 11px;
	border: none;
	background: transparent;
}

.bottom-nav-item i {
	font-size: 24px;
	display: block;
	margin-bottom: 4px;
}

.bottom-nav-label {
	font-size: 11px;
	font-weight: 500;
	text-align: center;
	line-height: 1.2;
	display: block;
}

.bottom-nav-item:hover,
.bottom-nav-item:focus {
	color: #0066CC !important;
	background-color: rgba(0, 102, 204, 0.1);
	text-decoration: none !important;
}

.bottom-nav-item.active {
	color: #0066CC;
}

.show-mobile-only {
	display: none !important;
}

/* Hide navbar at small screens, show bottom nav instead */
@media (max-width: 991px) {
	.navbar {
		display: none;
	}

	.bottom-nav {
		display: block !important;
	}

	.show-mobile-only {
		display: block !important;
	}

	.show-desktop-only {
		display: none !important;
	}

	body {
		padding-bottom: calc(70px + max(0px, env(safe-area-inset-bottom)));
	}

	.footer-safe {
		padding-top: 100px;
		padding-bottom: 86px;
	}

	.container-small {
		max-width: 540px;
	}

	.table-hide-small {
		display: none;
	}

	#col_1_head,
	#col_2_head,
	#col_3_head,
	#col_4_head,
	#col_5_head,
	#col_6_head {
		display: none;
	}

	.col_1,
	.col_2,
	.col_3,
	.col_4,
	.col_5,
	.col_6 {
		display: none;
	}
}

/* Show navbar at larger screens, hide bottom nav */
@media (min-width: 992px) {
	.bottom-nav {
		display: none !important;
	}

	.navbar {
		display: block;
	}

	.container-small {
		max-width: 960px;
	}

	.show-mobile-only {
		display: none;
	}

	.show-desktop-only {
		display: flex;
	}

	.table-hide-small {
		display: table;
	}

	#col_1_head,
	#col_2_head,
	#col_3_head,
	#col_4_head,
	#col_5_head,
	#col_6_head {
		display: table-cell;
	}

	.col_1,
	.col_2,
	.col_3,
	.col_4,
	.col_5,
	.col_6 {
		display: table-cell;
	}
}

.lead-small {
	font-size: 1rem;
}

.image-container {
	display: flex;
	justify-content: center;
}

.form-signin {
	max-width: 330px;
	padding: 1rem;
}

/* Accent color (Blue) */
.text-accent {
	color: #0066CC !important;
}

.btn-accent {
	color: #fff;
	background-color: #0066CC;
	border-color: #0066CC;
}

.btn-accent:hover {
	color: #fff;
	background-color: #0052A3;
	border-color: #0052A3;
}

.btn-accent:active,
.btn-accent.active,
.btn-accent:focus,
.btn-accent.focus {
	color: #fff;
	background-color: #003d7a;
	border-color: #003d7a;
	box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.5);
}

.btn-accent:disabled,
.btn-accent.disabled {
	color: #fff;
	background-color: #0066CC;
	border-color: #0066CC;
}

.bg-accent {
	background-color: #0066CC !important;
}

/* Active nav-link styling */
.navbar-nav .nav-link.active {
	border-bottom: 3px solid #0066CC;
}

.form-calculation {
	max-width: 800px;
	padding: 1rem;
}

.navbar-nav .nav-link.active, .navbar-nav .nav-link.show {
	color: var(--bs-navbar-active-color);
	border-bottom-color: #0066CC;
	border-bottom-style: solid;
	border-bottom-width: medium;
  }

/* ===== Modern Login ===== */
.login-page {
	min-height: 100vh;
	min-height: 100dvh;
	background: linear-gradient(135deg, #0066CC 0%, #003d7a 100%);
	background-attachment: fixed;
}

.login-wrapper {
	flex: 1 1 auto;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 1.5rem;
	padding-top: max(10vh, env(safe-area-inset-top));
	padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

.login-card {
	width: 100%;
	max-width: 400px;
	background: #fff;
	border-radius: 1.25rem;
	padding: 2.5rem 2rem;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.login-title {
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 0.25rem;
	font-size: 1.9rem;
}

.login-subtitle {
	color: #6c757d;
	font-size: 0.95rem;
	margin-bottom: 2rem;
}

.login-field {
	position: relative;
	margin-bottom: 1.1rem;
}

.login-field .field-icon {
	position: absolute;
	top: 1.05rem;
	left: 1rem;
	color: #9aa0a6;
	pointer-events: none;
	display: flex;
	transition: color 0.2s ease;
}

.login-input {
	width: 100%;
	border: 1.5px solid #e3e6ea;
	border-radius: 50rem;
	padding: 0.85rem 1rem 0.85rem 2.9rem;
	font-size: 1rem;
	color: #1a1a1a;
	background: #f8f9fb;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.login-input.has-toggle {
	padding-right: 3rem;
}

.login-input::placeholder {
	color: #9aa0a6;
}

.login-input:focus {
	outline: none;
	border-color: #0066CC;
	background: #fff;
	box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.15);
}

.login-field:focus-within .field-icon {
	color: #0066CC;
}

.password-toggle {
	position: absolute;
	top: 1.05rem;
	right: 0.9rem;
	border: none;
	background: transparent;
	color: #9aa0a6;
	padding: 0;
	cursor: pointer;
	display: flex;
	line-height: 0;
	transition: color 0.2s ease;
}

.password-toggle:hover {
	color: #0066CC;
}

.password-toggle .icon-eye-off {
	display: none;
}

.password-toggle.showing .icon-eye {
	display: none;
}

.password-toggle.showing .icon-eye-off {
	display: block;
}

.btn-login {
	border-radius: 50rem;
	padding: 0.85rem 1rem;
	font-weight: 600;
	font-size: 1.05rem;
	margin-top: 0.5rem;
}

.field-error {
	display: none;
	color: #dc3545;
	font-size: 0.85rem;
	margin: 0.4rem 0 0 1rem;
}

.was-validated .login-input:invalid {
	border-color: #dc3545;
	background: #fff;
}

.was-validated .login-input:invalid ~ .field-error {
	display: block;
}

.login-alert {
	border-radius: 0.85rem;
	font-size: 0.9rem;
	margin-bottom: 1.25rem;
}