@import url("https://font.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

	*{
		margin: 0;
		padding: 0;
		box-sizing: border-box;
		font-family: "Poppins", sans-serif;
	}

	body{
		display: flex;
		justify-content: center;
		align-items: center;
		min-height: 100vh;
		background: url('img.jpg') no-repeat center/cover;
		background-position: center;
	}

	.wrapper {
		width: 420px;
		background: transparent;
		border: 2px solid rgba(255, 255, 255, .2);
		backdrop-filter: blur(40px);
		box-shadow: 0 0 10px rgba(0, 0, 0, .2);
		color: #fff;
		border-radius: 10px;
		padding: 50px 40px;
	}

	.wrapper img {
		position: relative;
		width: 100px;
        height: auto;
		display: block;
		margin: 0 auto;
	}

	.wrapper h1 {
		font-size: 30px;
		text-align: center;
		color: #162938;
	}

	.wrapper .input-box {
		position: relative;
		width: 100%;
		height: 50px;
		margin: 30px 0;
		border-bottom: 2px solid #162938;
		transform: translateY(-0%);
	}

	.input-box label{
		position: absolute;
		top:50%;
		left: 5px;
		transform: translateY(-50%);
		font-size: 1em;
		font-weight: 500;
		pointer-events: none;
		transition: .5s;
	}

	.input-box input:focus~label,
	.input-box input:valid~label{
		top: 2px;
	}
	
	.input-box input {
		width: 100%;
		height: 100%;
		background: transparent;
		border: none;
		outline: none;
		border-radius: 40px;
		font-size: 16px;
		color: #162938;
		padding: 25px 45px 5px 20px;
	}

	.input-box input:-webkit-autofill,
	.input-box input:-webkit-autofill:hover,
	.input-box input:-webkit-autofill:focus,
	.input-box input:-webkit-autofill:active {
    	background-color: transparent !important;
    	-webkit-background-clip: text;
    	-webkit-text-fill-color: #162938 !important;
    	caret-color: #162938;
    	box-shadow: 0 0 0 1000px transparent inset !important;
		transition: background-color 9999s ease-in-out 0s;
	}

	.input-box input:-webkit-autofill {
    color: #162938 !important;
	}

	.input-box i {
			position: absolute;
			right: 20px;
			top: 50%;
			font-size: 20px;
			color:#162938;
	}

	.password-toggle {
		right: 50px !important;
		cursor: pointer;
	}

	/* Hide built-in password reveal button */
	input[type="password"]::-ms-reveal,
	input[type="password"]::-ms-clear {
    display: none;
	} 

	.wrapper .btn {
		width: 50%;
		height: 45px;
		background: #162938;
		border: none;
		outline: none;
		border-radius: 10px;
		box-shadow: 0 0 10px rgba(0, 0, 0, .1);
		cursor: pointer;
		font-size: 16px;
		color: #fff;
		font-weight: 600;
		transition: background 0.3s;
		margin: 0% 25% 0 25%;
	}

	.wrapper .btn:hover { 
            background-color: #186873; 
    }

	label{
		color:#162938;
		pointer-events: none;
	}

	.remember-forgot{
		font-weight: 500;
		margin: -15px 0 15px;
		display: flex;
		justify-content: space-between;
	}

	.remember-forgot label {
    pointer-events: auto;
    cursor: pointer; 
    }

    .remember-forgot label input{
        accent-color: #fff;
        margin-right: 3px;
    }

    .remember-forgot a{
        color:#162938;
        text-decoration: none;
    }

    .remember-forgot a:hover{
        text-decoration: underline;
    }

	.spinner {
    width: 30px;
    height: 30px;
    border: 4px solid rgba(0,0,0,0.1);
    border-top: 4px solid #162938;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 15px auto;
	}

	@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
	}

	.update-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.update-box {
    position: relative;
    background: white;
    color: #162938;
    width: 90%;
    max-width: 380px;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0,0,0,0.25);
}

.close-btn {
    position: absolute;
    right: 12px;
    top: 8px;
    border: none;
	width: 25px;
	height: 25px;
	padding: 0;
	border-radius: 5px;
    background: coral;
	color: #fff;
    font-size: 25px;
    cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.update-btn {
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
	background: #162938;
	color: #fff;
}

.update-btn:hover {
    background: #186873;
    color: #fff;
}

.close-btn:hover {
	background: #186873;
	color: #fff;
}

/* Mobile layout only. Load AFTER the original style.css. */
@media screen and (max-width: 850px) {
    body {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 12px;
    }

    .wrapper {
        width: min(420px, 100%);
        min-width: 0;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        padding: 32px 20px 20px;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: coral transparent;
    }

    .wrapper img { max-width: 100%; }
    .wrapper .input-box { min-width: 0; }
    .input-box input { font-size: 16px; }

    .remember-forgot {
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        font-size: 14px;
    }

    .remember-forgot label,
    .remember-forgot a {
        display: inline-flex;
        align-items: center;
        min-height: 36px;
    }

    .wrapper .btn {
        position: sticky;
        bottom: 0;
        min-height: 45px;
        z-index: 1;
    }

    #message { overflow-wrap: anywhere; }

    .update-popup {
        height: 100vh;
        height: 100dvh;
        padding: 12px;
    }

    .update-box {
        display: flex;
        flex-direction: column;
        width: min(380px, 100%);
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        padding: 12px 20px 20px;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: coral transparent;
    }

    .update-box > :is(h3, p, br) { flex-shrink: 0; }

    .update-box .close-btn {
        position: sticky;
        top: 0;
        right: auto;
        flex: 0 0 44px;
        align-self: flex-end;
        width: 44px;
        height: 44px;
        margin-bottom: 10px;
        font-size: 28px;
        z-index: 2;
    }

    .update-box .update-btn {
        position: sticky;
        bottom: 0;
        flex-shrink: 0;
        align-self: center;
        min-height: 44px;
        z-index: 1;
    }
}