/* ==================================================
   STIE TOTALWIN - Mobile Responsive & Custom Styles
   ================================================== */

/* CSS Variables */
:root {
	--primary-color: #183661;
	--primary-gradient: linear-gradient(135deg, #183661 0%, #2c5282 100%);
	--secondary-color: #f8fafc;
	--accent-color: #e2e8f0;
	--text-primary: #2d3748;
	--text-secondary: #718096;
	--shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	--shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	--border-radius: 12px;
}

/* Base Styles */
body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: #E9E7D6;
	min-height: 100vh;
	margin: 0;
}

/* Main layout for sticky footer */
.site-wrap {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.content-wrapper {
	flex: 1;
	display: flex;
	flex-direction: column;
}

/* Bootstrap 4 Card Enhancement */
.card.shadow-lg {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	border-radius: var(--border-radius);
}

/* Bootstrap 4 Button Primary Enhancement */
.btn-primary {
	background: var(--primary-gradient);
	border: none;
	padding: 12px 24px;
	border-radius: 8px;
	font-weight: 500;
	transition: all 0.3s ease;
	text-transform: none;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
	background: var(--primary-gradient);
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(24, 54, 97, 0.3);
	border: none;
}

/* Animations */
@keyframes spin {
	to { transform: rotate(360deg); }
}

/* Preloader */
.modern-preloader {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #183661 0%, #2c5282 100%);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.modern-spinner {
	width: 50px;
	height: 50px;
	border: 3px solid rgba(255,255,255,0.3);
	border-radius: 50%;
	border-top-color: white;
	animation: spin 1s ease-in-out infinite;
}

.preloader-text {
	color: white;
	margin-top: 20px;
	font-weight: 500;
}

/* Header Styles */
.compact-header {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	box-shadow: 0 2px 12px rgba(0,0,0,0.08);
	position: sticky;
	top: 0;
	z-index: 1000;
	border-bottom: 1px solid rgba(233, 231, 214, 0.3);
	transition: all 0.3s ease;
}

.header-main {
	padding: 8px 0;
}

.brand-logo {
	height: 42px;
	margin-right: 10px;
}

/* Social Links Hover */
.social-compact a:hover {
	opacity: 1 !important;
	color: var(--primary-color) !important;
	transform: translateY(-1px);
}


/* Compact Navigation */
.nav-compact-item {
	display: flex;
	align-items: center;
	padding: 6px 12px;
	margin: 0 2px;
	color: var(--text-primary);
	text-decoration: none;
	border-radius: 6px;
	font-weight: 500;
	font-size: 13px;
	transition: all 0.3s ease;
	border: 1px solid transparent;
}

.nav-compact-item i {
	margin-right: 4px;
	font-size: 12px;
}

.nav-compact-item.active {
	background: rgba(24, 54, 97, 0.1);
	color: var(--primary-color);
	border-color: rgba(24, 54, 97, 0.2);
}

.nav-compact-item:hover {
	background: rgba(24, 54, 97, 0.15) !important;
	color: var(--primary-color) !important;
	transform: translateY(-1px);
	border-color: rgba(24, 54, 97, 0.3);
}

/* Mobile Menu Button */
.mobile-menu-compact {
	background: var(--primary-color);
	color: white;
	border: none;
	padding: 6px 10px;
	border-radius: 4px;
	font-size: 14px;
	transition: all 0.3s ease;
}

.mobile-menu-compact:hover,
.mobile-menu-compact:focus {
	background: #0f2847;
	transform: translateY(-1px);
	color: white;
	outline: none;
}

/* Mobile Navigation */
.mobile-nav-compact {
	margin: 8px 0;
}

.mobile-nav-wrapper {
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(10px);
	border-radius: 8px;
	padding: 12px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.mobile-nav-compact-item {
	display: flex;
	align-items: center;
	padding: 8px 12px;
	margin-bottom: 4px;
	color: var(--text-primary);
	text-decoration: none;
	border-radius: 6px;
	font-weight: 500;
	font-size: 13px;
	transition: all 0.3s ease;
	background: rgba(255, 255, 255, 0.8);
	border: 1px solid rgba(233, 231, 214, 0.3);
}

.mobile-nav-compact-item.active {
	background: var(--primary-color);
	color: white;
	border-color: var(--primary-color);
}

.mobile-nav-compact-item i {
	margin-right: 8px;
	width: 14px;
	text-align: center;
	font-size: 12px;
}

.mobile-nav-compact-item:hover:not(.active) {
	background: rgba(24, 54, 97, 0.1);
	color: var(--primary-color);
	transform: translateX(2px);
}

/* Footer Styles */
.compact-footer {
	background: var(--primary-gradient);
	color: white;
	padding: 1.5rem 0 0.8rem;
	margin-top: auto;
	transition: all 0.3s ease;
}

.footer-info {
	color: rgba(255,255,255,0.9);
	font-size: 12px;
	line-height: 1.3;
	gap: 1rem;
}

.footer-info span {
	white-space: nowrap;
}

.footer-follow-text {
	font-size: 12px;
	color: rgba(255,255,255,0.8);
}

.footer-hr {
	border-color: rgba(255,255,255,0.2);
	margin: 1rem 0 0.5rem;
}

.footer-copyright {
	font-size: 12px;
}

.footer-copyright-text {
	color: rgba(255,255,255,0.8);
}

.footer-version {
	color: rgba(255,255,255,0.6);
}

/* Social Buttons */
.social-compact-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0 3px;
	background: rgba(255,255,255,0.1);
	color: white;
	border-radius: 50%;
	text-decoration: none;
	font-size: 14px;
	transition: all 0.3s ease;
	border: 1px solid rgba(255,255,255,0.2);
}

.social-compact-btn:hover {
	background: rgba(255,255,255,0.2);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	border-color: rgba(255,255,255,0.4);
}

/* ==================================================
   RESPONSIVE MOBILE LAYOUT
   ================================================== */

/* AGGRESSIVE mobile layout fix for all devices */
@media (max-width: 991px) {
	/* Nuclear option - completely remove navigation */
	.nav-compact {
		display: none !important;
		width: 0 !important;
		height: 0 !important;
		visibility: hidden !important;
		position: absolute !important;
		left: -9999px !important;
	}
	
	/* Force 2-element horizontal layout */
	.header-main {
		display: flex !important;
		flex-direction: row !important;
		justify-content: space-between !important;
		align-items: center !important;
		flex-wrap: nowrap !important;
		width: 100% !important;
		box-sizing: border-box !important;
	}
	
	.brand-compact {
		display: flex !important;
		flex: 1 1 auto !important;
		min-width: 0 !important;
		order: 1 !important;
	}
	
	.mobile-menu-compact {
		display: flex !important;
		flex: 0 0 auto !important;
		margin-left: auto !important;
		order: 2 !important;
	}
	
	.brand-logo {
		height: 36px !important;
		margin-right: 8px !important;
	}
}

@media (max-width: 767px) {
	/* FORCE horizontal layout on mobile */
	.header-main {
		padding: 8px 0 !important;
		display: flex !important;
		flex-direction: row !important;
		justify-content: space-between !important;
		align-items: center !important;
		flex-wrap: nowrap !important;
		width: 100% !important;
		min-height: 48px !important;
	}
	
	.brand-compact {
		display: flex !important;
		align-items: center !important;
		flex: 1 1 auto !important;
		min-width: 0 !important;
		max-width: calc(100% - 60px) !important;
	}
	
	.brand-compact a {
		display: flex !important;
		align-items: center !important;
		width: auto !important;
	}
	
	.brand-logo {
		height: 32px !important;
		width: auto !important;
		flex-shrink: 0 !important;
	}
	
	.mobile-menu-compact {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		padding: 8px 10px !important;
		font-size: 16px !important;
		flex: 0 0 auto !important;
		margin-left: auto !important;
		order: 2 !important;
	}
	
	/* Ensure navigation is completely hidden */
	.nav-compact {
		display: none !important;
		visibility: hidden !important;
		position: absolute !important;
		left: -9999px !important;
	}
	
	/* Footer responsive */
	.compact-footer {
		padding: 1rem 0 0.6rem !important;
	}
	
	.footer-info {
		font-size: 11px !important;
		text-align: center !important;
		margin-top: 8px;
		justify-content: center !important;
	}
	
	.footer-info .d-flex {
		flex-direction: column;
		text-align: center;
		justify-content: center;
	}
	
	.social-compact-btn {
		width: 28px;
		height: 28px;
		font-size: 12px;
	}
}

@media (max-width: 576px) {
	.compact-header {
		box-shadow: 0 1px 8px rgba(0,0,0,0.08);
	}
	
	.header-main {
		padding: 6px 0 !important;
		min-height: 44px !important;
	}
	
	.brand-compact {
		max-width: calc(100% - 50px) !important;
	}
	
	.brand-logo {
		height: 28px !important;
	}
	
	.mobile-menu-compact {
		padding: 6px 8px !important;
		font-size: 14px !important;
		min-width: 42px !important;
		min-height: 42px !important;
	}
	
	/* Footer responsive */
	.footer-copyright {
		flex-direction: column;
		text-align: center;
		gap: 4px;
	}
	
	.footer-info span {
		font-size: 10px !important;
	}
}

@media (max-width: 390px) {
	.header-main {
		min-height: 40px !important;
	}
	
	.brand-compact {
		max-width: calc(100% - 44px) !important;
	}
	
	.brand-logo {
		height: 24px !important;
	}
	
	.mobile-menu-compact {
		padding: 6px 8px !important;
		min-width: 36px !important;
		min-height: 36px !important;
		font-size: 14px !important;
	}
}

/* Footer Responsive */
@media (max-width: 991px) {
	.footer-info {
		font-size: 12px !important;
		text-align: center !important;
		justify-content: center !important;
	}
	
	.footer-info .d-flex {
		flex-direction: column;
		text-align: center;
		justify-content: center;
	}
	
	.footer-info span {
		margin-bottom: 4px;
		margin-right: 0 !important;
		text-align: center;
	}
	
	.compact-footer img {
		height: 35px !important;
	}
	
	/* Center footer content on mobile */
	.compact-footer .row {
		justify-content: center;
		text-align: center;
	}
	
	.compact-footer .col-lg-8,
	.compact-footer .col-lg-4 {
		text-align: center !important;
		justify-content: center !important;
	}
	
	.compact-footer .d-flex {
		justify-content: center !important;
	}
}

/* ==================================================
   AUTH PAGES - RESET PASSWORD & LOGIN FORMS
   ================================================== */

/* Centralized Auth Page Layout - Body Classes for Vertical Centering */
body.auth-page,
body.login-page {
	min-height: 100vh;
	min-height: -webkit-fill-available; /* For iOS Safari */
	display: flex;
	flex-direction: column;
	background: #E9E7D6;
}

/* Fallback for browsers that don't support flexbox */
.no-flexbox body.auth-page,
.no-flexbox body.login-page {
	min-height: 100vh;
	background: #E9E7D6;
}

.no-flexbox body.auth-page .site-wrap,
.no-flexbox body.login-page .site-wrap {
	display: table;
	width: 100%;
	height: 100vh;
}

.no-flexbox body.auth-page .container-fluid,
.no-flexbox body.login-page .container-fluid {
	display: table-cell;
	vertical-align: middle;
}

body.auth-page .site-wrap,
body.login-page .site-wrap {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 0;
}

/* Auth Page Wrapper - Container Level */
.auth-page-wrapper {
	min-height: 95vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 0;
}

/* Legacy auth container for backwards compatibility */
.auth-container {
	min-height: 95vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 0;
}

/* Auth Page Layout - Using Bootstrap 4 utilities instead of .auth-container */

.auth-left-panel {
	background: var(--primary-gradient);
	color: white;
	min-height: 500px;
	display: flex;
	align-items: center;
}

.auth-icon {
	font-size: 4rem;
	color: rgba(255,255,255,0.9);
}

.auth-title {
	margin-bottom: 1rem;
	color: white;
	font-weight: 700;
}

.auth-description {
	color: rgba(255,255,255,0.8);
	font-size: 1.1rem;
	line-height: 1.6;
}

.auth-divider {
	width: 60px;
	height: 3px;
	background: rgba(255,255,255,0.3);
	border-radius: 2px;
	margin: 0 auto;
}

.auth-right-panel {
	padding: 3rem;
}

.auth-logo {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
	padding: 8px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
}

.auth-form-title {
	color: var(--primary-color);
	font-weight: 700;
	margin-top: 1rem;
	margin-bottom: 0.5rem;
}

.auth-form-subtitle {
	color: var(--text-secondary);
	font-weight: 500;
	margin-bottom: 2rem;
}

.auth-label {
	color: var(--text-primary);
	font-weight: 600;
	margin-bottom: 0.5rem;
}

/* Bootstrap 4 Form Control Enhancement */
.form-control {
	padding: 12px 16px;
	border: 2px solid rgba(233, 231, 214, 0.5);
	border-radius: 8px;
	font-size: 16px;
	transition: all 0.3s ease;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(5px);
}

.form-control:focus {
	border-color: var(--primary-color) !important;
	box-shadow: 0 0 0 3px rgba(24, 54, 97, 0.15) !important;
	background: rgba(255, 255, 255, 0.95) !important;
	backdrop-filter: blur(10px);
}

/* Bootstrap 4 Alert Danger Enhancement */
.alert-danger {
	background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
	color: #c53030;
	border: none;
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 1.5rem;
}

.border-left-danger {
	border-left: 4px solid #e53e3e;
}

.auth-back-link {
	color: var(--text-secondary);
	font-size: 0.875rem;
}

.auth-back-link a {
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 500;
	transition: all 0.3s ease;
}

.auth-back-link a:hover {
	color: #0f2847;
	text-decoration: underline;
}

/* Auth Responsive Design */
@media (max-width: 991px) {
	/* Hide left panel on mobile for cleaner look */
	.auth-left-panel {
		display: none !important;
	}
	
	/* Ensure proper container behavior on mobile */
	.container.py-4.d-flex.align-items-center.justify-content-center {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}
	
	.auth-right-panel {
		padding: 2rem 1.5rem;
	}
	
	/* Center the card and limit width for better mobile UX */
	.col-lg-10.col-md-8.col-sm-10 {
		max-width: 500px;
		margin: 0 auto;
	}
	
	/* Make form take full width since left panel is hidden */
	.col-lg-6:last-child {
		flex: 0 0 100% !important;
		max-width: 100% !important;
	}
	
	/* When left panel is hidden, ensure right panel takes full width */
	.card .row.g-0 .col-lg-6:not(.auth-left-panel) {
		flex: 0 0 100% !important;
		max-width: 100% !important;
	}
	
	/* Additional rule to force the form panel to full width */
	.card .row.g-0 .col-lg-6:nth-child(2) {
		flex: 0 0 100% !important;
		max-width: 100% !important;
		width: 100% !important;
	}
	
	/* Ensure the card row takes full width when left panel is hidden */
	.card .row.g-0 {
		margin: 0 !important;
	}
	
	/* Center the card content */
	.row {
		justify-content: center;
	}
	
	.auth-logo {
		width: 60px;
		height: 60px;
	}
	
	/* Auth page body adjustments for mobile */
	body.auth-page .site-wrap,
	body.login-page .site-wrap {
		padding: 0.5rem 0;
		min-height: auto;
	}
	
	/* Ensure auth pages still center content properly on mobile */
	body.auth-page,
	body.login-page {
		min-height: 100vh;
		min-height: -webkit-fill-available; /* For iOS Safari */
	}
}

@media (max-width: 767px) {
	/* Responsive padding and height adjustments via inline styles or utility classes */

	/* Further limit width on smaller screens */
	.col-lg-10.col-md-8.col-sm-10 {
		max-width: 400px;
	}
	
	.auth-right-panel {
		padding: 1.5rem 1rem;
	}
	
	.auth-logo {
		width: 50px;
		height: 50px;
	}
	
	.auth-form-title {
		font-size: 1.25rem;
	}
	
	.form-control {
		padding: 10px 14px;
		font-size: 14px;
	}
	
	.card.shadow-lg {
		margin: 0.5rem;
		border-radius: 8px;
	}
}

@media (max-width: 576px) {
	/* Responsive padding and height adjustments via inline styles or utility classes */
	
	/* Optimal width for small mobile screens */
	.col-lg-10.col-md-8.col-sm-10 {
		max-width: 350px;
	}
	
	.auth-right-panel {
		padding: 1.25rem 0.75rem;
	}
	
	.auth-logo {
		width: 40px;
		height: 40px;
	}
	
	.auth-form-title {
		font-size: 1.1rem;
	}
	
	.form-control {
		padding: 8px 12px;
		font-size: 14px;
	}
	
	.btn-primary {
		padding: 10px 20px;
		font-size: 14px;
	}
	
	.container {
		padding-left: 0.5rem;
		padding-right: 0.5rem;
	}
}

/* Loading animation for better UX */
.btn-blue.loading {
	pointer-events: none;
	opacity: 0.7;
}

.btn-blue.loading svg {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}