body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #fcfcfc;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding-right: 12px;
}

.login-box {
    background: #ffffff;
    padding: 42px 35px;
    width: 100%;
    max-width: 380px;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.15);
    text-align: center;
    animation: fadeIn 1s ease-in-out;
}

.logo img {
    width: 120px;
    max-width: 60%;
    height: auto;
    margin-bottom: 28px;
    animation: logoFade 1.2s ease-in-out;
}

/* INPUT FIELD */
.field {
    position: relative;
    margin-bottom: 22px;
}

.field input {
    width: 100%;
    padding: 14px 44px 14px 44px; /* equal left & right padding */
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 14px;
    outline: none;
    text-align: start;
    box-sizing: border-box;
}

/* Password eye icon */
.password-field i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 16px;
}

/* Ensure password field matches others */
.password-field input {
    padding-right: 44px; /* space for eye */
    padding-left: 44px;  /* visual balance */
}


/* FLOAT LABEL */
.field label {
    position: absolute;
    top: 50%;
    left: 14px;
    color: #888;
    font-size: 13px;
    transform: translateY(-50%);
    pointer-events: none;
    transition: 0.3s ease;
    background: #fff;
    padding: 0 6px;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label {
    top: -8px;
    font-size: 12px;
    color: #000;
}

/* PASSWORD EYE */
.password-field i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
}

/* BUTTON */
button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: #119411;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

button:hover {
    background: #32d56c;
}

/* MESSAGES */
.msg {
    margin-bottom: 12px;
    font-size: 14px;
    color: red;
}

.success {
    color: green;
}

.error {
    font-size: 12px;
    color: red;
    margin-top: 5px;
    text-align: left;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes logoFade {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 480px) {
    .login-box {
        margin: 15px;
        padding: 35px 25px;
    }

    .logo img {
        width: 100px;
    }
}
