.swal-toast {
	background: #ffffff !important;
	border-radius: 0.3rem !important;
	padding: 0.75rem 1rem 0.75rem 0.75rem !important;
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
	font-family:
		-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ===== TEXT ===== */

.swal2-title {
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	color: #212529 !important;
	margin: 0 0 0 0.25rem !important;
}

.swal2-html-container {
	font-size: 0.875rem !important;
	color: #6c757d !important;
	margin: 0.25rem 0 0 0.25rem !important;
}

/* ===== PROGRESS BAR ===== */

.toast-success .swal2-timer-progress-bar {
	background-color: #28a745 !important;
}

.toast-danger .swal2-timer-progress-bar {
	background-color: #dc3545 !important;
}

.toast-warning .swal2-timer-progress-bar {
	background-color: #ffc107 !important;
}

.toast-info .swal2-timer-progress-bar {
	background-color: #17a2b8 !important;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
	overflow-x: hidden;
}

html {
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

/* Background dengan animasi gradient */
.bg-image {
	background: linear-gradient(-45deg, #0b1f3a, #1e3a5f, #2a5a8f, #1e3a5f);
	background-size: 400% 400%;
	animation: gradientShift 15s ease infinite;
	position: relative;
	overflow: hidden;
}

.bg-image::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url("<?= base_url('assets/image/logos/bgLogin.png') ?>")
		center/cover no-repeat;
	opacity: 0.1;
	z-index: 0;
}

/* Floating particles effect */
.bg-image::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image:
		radial-gradient(2px 2px at 20% 30%, white, transparent),
		radial-gradient(2px 2px at 60% 70%, white, transparent),
		radial-gradient(1px 1px at 50% 50%, white, transparent),
		radial-gradient(1px 1px at 80% 10%, white, transparent),
		radial-gradient(2px 2px at 90% 60%, white, transparent),
		radial-gradient(1px 1px at 33% 80%, white, transparent);
	background-size: 200% 200%;
	animation: floatParticles 20s ease-in-out infinite;
	opacity: 0.3;
	z-index: 0;
}

@keyframes gradientShift {
	0% {
		background-position: 0% 50%;
	}

	50% {
		background-position: 100% 50%;
	}

	100% {
		background-position: 0% 50%;
	}
}

@keyframes floatParticles {
	0%,
	100% {
		transform: translate(0, 0);
	}

	33% {
		transform: translate(30px, -30px);
	}

	66% {
		transform: translate(-20px, 20px);
	}
}

/* Card dengan efek glassmorphism */
.login-card {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(20px);
	border-radius: 24px;
	box-shadow:
		0 8px 32px 0 rgba(31, 38, 135, 0.37),
		0 0 0 1px rgba(255, 255, 255, 0.18);
	overflow: hidden;
	position: relative;
	z-index: 1;
	animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(50px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Left side dengan gradient modern */
.left-panel {
	background: linear-gradient(135deg, #0b1f3a 0%, #1e3a5f 50%, #2a5a8f 100%);
	position: relative;
	overflow: hidden;
}

.left-panel::before {
	content: "";
	position: absolute;
	top: -50%;
	right: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(
		circle,
		rgba(255, 255, 255, 0.1) 0%,
		transparent 70%
	);
	animation: rotate 30s linear infinite;
}

@keyframes rotate {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}

/* Logo dengan efek glow */
.logo-glow {
	filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
	animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
	0%,
	100% {
		transform: scale(1);
	}

	50% {
		transform: scale(1.05);
	}
}

/* Typography */
.brand-title {
	font-size: clamp(1.8rem, 4vw, 2.5rem);
	font-weight: 800;
	letter-spacing: 2px;
	text-transform: uppercase;
	background: linear-gradient(to right, #fff, #a3c6ff);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom: 1rem;
}

.brand-tagline {
	font-size: clamp(0.9rem, 2vw, 1.1rem);
	line-height: 1.6;
	opacity: 0.95;
}

.divider {
	width: 60px;
	height: 4px;
	background: linear-gradient(to right, transparent, #fff, transparent);
	margin: 1.5rem auto;
	border-radius: 2px;
}

/* Form styling dengan efek modern */
.form-control {
	font-size: 15px;
	transition: all 0.3s ease;
	background: #ffffff;
}

.form-control:focus {
	border-color: #1e3a5f;
	background: white;

	/* shadow atas, bawah, kanan (tanpa kiri) */
	box-shadow:
		0 -4px 6px rgba(30, 58, 95, 0.15),
		/* atas */ 0 4px 6px rgba(30, 58, 95, 0.15),
		/* bawah */ 4px 0 6px rgba(30, 58, 95, 0.15);
	/* kanan */
}

.form-control.is-invalid {
	border-color: #dc3545;
	animation: shake 0.5s;
}

@keyframes shake {
	0%,
	100% {
		transform: translateX(0);
	}

	25% {
		transform: translateX(-10px);
	}

	75% {
		transform: translateX(10px);
	}
}

.input-group .form-control.is-invalid {
	background-image: none !important;
}

.form-control:focus.is-invalid {
	border-color: #dc3545;
	box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

/* Password toggle */
.toggle-password {
	position: absolute;
	top: 50%;
	right: 18px;
	transform: translateY(-50%);
	cursor: pointer;
	color: #6c757d;
	transition: all 0.3s ease;
	z-index: 10;
}

.toggle-password:hover {
	color: #1e3a5f;
	transform: translateY(-50%) scale(1.1);
}

/* Captcha container */
.captcha-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 1.5rem;
}

#captcha-container {
	background: white;
	border-radius: 8px;
	padding: 8px;
}

#refresh-captcha {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #6c757d;
	border: none;
	color: white;
	font-size: 20px;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

#refresh-captcha:hover {
	background: #1e3a5f;
	transform: rotate(180deg);
}

/* Button dengan efek modern */
.btn-primary-color {
	background: linear-gradient(135deg, #1e3a5f 0%, #0b1f3a 100%);
	color: white;
	border: none;
	font-weight: 600;
	font-size: 16px;
	letter-spacing: 0.5px;
	position: relative;
	overflow: hidden;
	transition: all 0.3s ease;
}

.btn-primary-color::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	transform: translate(-50%, -50%);
	transition:
		width 0.6s,
		height 0.6s;
}

.btn-primary-color:hover::before {
	width: 300px;
	height: 300px;
}

.btn-primary-color:hover {
	transform: translateY(-3px);
	color: #fff;
	box-shadow: 0 10px 25px rgba(30, 58, 95, 0.3);
}

.btn-primary-color:active {
	transform: translateY(-1px);
}

/* Invalid feedback */
.invalid-feedback {
	color: #dc3545;
	font-size: 0.85rem;
	margin-top: 0.5rem;
	display: flex;
	align-items: center;
	gap: 5px;
}

.invalid-feedback::before {
	font-size: 1rem;
}

/* Logo responsive */
.logo-responsive {
	max-width: 100px;
	transition: all 0.3s ease;
}

@media (min-width: 768px) {
	.logo-responsive {
		max-width: 130px;
	}
}

@media (min-width: 992px) {
	.logo-responsive {
		max-width: 150px;
	}
}

@media (min-width: 1200px) {
	.logo-responsive {
		max-width: 180px;
	}
}

/* Mobile logo */
.mobile-logo {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid #1e3a5f;
	box-shadow: 0 8px 16px rgba(30, 58, 95, 0.2);
	animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
	from {
		opacity: 0;
		transform: translateY(-30px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.login-header h2 {
	font-size: clamp(1.8rem, 4vw, 2.2rem);
	font-weight: 700;
	color: #1e3a5f;
}

.login-header p {
	color: #6c757d;
	font-size: clamp(0.9rem, 2vw, 1rem);
}

/* Footer */
.login-footer {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e0e0e0;
}

.login-footer small {
	color: #6c757d;
	font-size: 0.85rem;
	letter-spacing: 0.5px;
}

/* Form group spacing */
.form-group {
	margin-bottom: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 767px) {
	.login-card {
		margin: 1rem;
		border-radius: 20px;
	}

	.form-control {
		font-size: 16px;
		/* Prevents zoom on iOS */
	}

	.left-panel {
		min-height: 0 !important;
		padding: 2rem 1rem !important;
	}

	.brand-title {
		font-size: 1.5rem;
	}

	.brand-tagline {
		font-size: 0.85rem;
	}
}

@media (min-width: 768px) {
	.left-panel {
		min-height: 600px;
	}
}

.input-group-modern {
	transition: transform 0.3s ease;
}

.input-group-modern .input-group-text {
	transition: all 0.3s ease;
}

.input-group-modern:focus-within .input-group-text {
	background-color: #1e3a5f;
	border-color: #1e3a5f;
	color: #fff;
	box-shadow:
		-4px 0 6px rgba(30, 58, 95, 0.15),
		0 -4px 6px rgba(30, 58, 95, 0.15),
		0 4px 6px rgba(30, 58, 95, 0.15);
}

/* INVALID STATE */
.input-group-modern.is-invalid .input-group-text,
.input-group-modern:has(.form-control.is-invalid) .input-group-text {
	background-color: #dc3545;
	border-color: #dc3545;
	color: #fff;

	/* shadow kiri, atas, bawah */
	box-shadow:
		-4px 0 6px rgba(220, 53, 69, 0.25),
		0 -4px 6px rgba(220, 53, 69, 0.25),
		0 4px 6px rgba(220, 53, 69, 0.25);
}

.input-group {
	position: relative;
}

.toggle-password {
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
	cursor: pointer;
	color: #6c757d;
	transition: all 0.3s ease;
	z-index: 10;
}

/* hover */
.toggle-password:hover {
	color: #1e3a5f;
	transform: translateY(-50%) scale(1.1);
}

/* INPUT invalid */
.input-group-modern .form-control.is-invalid {
	border-color: #dc3545;

	/* shadow atas, bawah, kanan */
	box-shadow:
		0 -4px 6px rgba(220, 53, 69, 0.25),
		0 4px 6px rgba(220, 53, 69, 0.25),
		4px 0 6px rgba(220, 53, 69, 0.25);
}

/* Loading animation untuk form submit */
.btn-primary-color.loading {
	pointer-events: none;
	position: relative;
}

.btn-primary-color.loading::after {
	content: "";
	position: absolute;
	width: 20px;
	height: 20px;
	top: 50%;
	left: 50%;
	margin-left: -10px;
	margin-top: -10px;
	border: 2px solid #ffffff;
	border-radius: 50%;
	border-top-color: transparent;
	animation: spin 0.6s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Smooth scroll */
html {
	scroll-behavior: smooth;
}

/* Focus visible untuk accessibility */
*:focus-visible {
	outline: 2px solid #1e3a5f;
	outline-offset: 2px;
}

/* Container positioning */
.container-fluid {
	position: relative;
	z-index: 1;
}
