* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.login-wrapper {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
}

.login-container {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    background: transparent;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* Logo Section */
.logo-section {
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.logo-circle {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: fadeIn 1s ease-out;
}

.logo-circle img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Login Title */
.login-title {
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.login-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4696d1;
    margin-bottom: 0.5rem;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Form */
.login-form {
    max-width: 480px;
    margin: 0 auto;
    animation: slideUp 0.8s ease-out 0.2s backwards;
    flex-shrink: 0;
}

/* Alert Messages */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: left;
    animation: slideDown 0.5s ease-out;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
    position: relative;
    width: 100%;
}

.form-control {
    width: 100%;
    padding: 1.1rem 1.5rem;
    border: 2px solid #e3f2fd;
    border-radius: 16px;
    font-size: 1rem;
    background: #f8fbff;
    transition: all 0.3s ease;
    height: 58px;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #5face4;
    background: white;
    box-shadow: 0 4px 12px rgba(95, 172, 228, 0.15);
}

.form-control::placeholder {
    color: #a4d2f4;
    opacity: 0.8;
    font-size: 0.98rem;
}

/* Password Toggle */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 1.2rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a4d2f4;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #5face4;
    transform: translateY(-50%) scale(1.1);
}

/* Back Button */
.back-button {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #5face4 0%, #4696d1 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(95, 172, 228, 0.3);
    z-index: 1000;
    text-decoration: none;
    color: white;
    font-size: 1.3rem;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(95, 172, 228, 0.4);
}

.back-button:active {
    transform: translateY(0);
}

/* Login Button */
.btn-login {
    display: block;
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(135deg, #5face4 0%, #4696d1 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(95, 172, 228, 0.3);
    cursor: pointer;
    position: relative;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(95, 172, 228, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    cursor: not-allowed;
}

.btn-text,
.btn-loader {
    display: inline-block;
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-loader .dot {
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    animation: dotFlashing 1s infinite linear alternate;
}

.btn-loader .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.btn-loader .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotFlashing {
    0% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    50%, 100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Register Link */
.register-link {
    margin-top: 1.2rem;
    font-size: 0.95rem;
    color: #a4d2f4;
}

.register-link a {
    color: #5face4;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: #4696d1;
    text-decoration: underline;
}

/* Hide number input arrows */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Responsive Design */

/* Desktop - Large screens */
@media (min-width: 1200px) {
    .login-wrapper {
        padding: 0;
    }

    .login-container {
        padding: 2rem;
    }

    .logo-circle {
        width: 180px;
        height: 180px;
    }

    .logo-section {
        margin-bottom: 1.5rem;
    }

    .login-title {
        margin-bottom: 2rem;
    }

    .login-title h1 {
        font-size: 2.2rem;
        margin-bottom: 0.5rem;
    }

    .login-form {
        max-width: 600px;
    }

    .form-control {
        height: 62px;
        font-size: 1.05rem;
        padding: 1.2rem 1.8rem;
    }

    .form-control::placeholder {
        font-size: 1.02rem;
    }

    .btn-login {
        height: 62px;
        font-size: 1.15rem;
        padding: 1.2rem;
    }

    .toggle-password {
        font-size: 1.4rem;
    }
}

/* Desktop - Medium screens */
@media (min-width: 992px) and (max-width: 1199px) {
    .login-wrapper {
        padding: 0;
    }

    .login-container {
        padding: 2rem;
    }

    .logo-circle {
        width: 170px;
        height: 170px;
    }

    .logo-section {
        margin-bottom: 1.5rem;
    }

    .login-title {
        margin-bottom: 1.8rem;
    }

    .login-title h1 {
        font-size: 2rem;
    }

    .login-form {
        max-width: 600px;
    }

    .form-control {
        height: 60px;
        font-size: 1.02rem;
        padding: 1.15rem 1.7rem;
    }

    .form-control::placeholder {
        font-size: 1rem;
    }

    .btn-login {
        height: 60px;
        font-size: 1.12rem;
        padding: 1.15rem;
    }

    .toggle-password {
        font-size: 1.35rem;
    }
}

/* Tablet - Landscape */
@media (min-width: 769px) and (max-width: 991px) {
    .login-wrapper {
        padding: 0;
    }

    .login-container {
        padding: 2rem;
    }

    .logo-circle {
        width: 160px;
        height: 160px;
    }

    .logo-section {
        margin-bottom: 1.5rem;
    }

    .login-title {
        margin-bottom: 1.8rem;
    }

    .login-title h1 {
        font-size: 1.8rem;
    }

    .login-form {
        max-width: 500px;
    }

    .form-control {
        height: 58px;
        font-size: 1rem;
    }
}

/* Tablet - Portrait */
@media (max-width: 768px) {
    .login-container {
        padding: 2rem 1.5rem;
    }

    .logo-circle {
        width: 140px;
        height: 140px;
    }

    .login-title h1 {
        font-size: 1.6rem;
    }

    .login-form {
        max-width: 420px;
    }
}

/* Mobile - Large */
@media (max-width: 576px) {
    .login-wrapper {
        padding: 20px;
    }

    .login-container {
        padding: 1rem 0.5rem;
    }

    .login-form {
        max-width: 100%;
        width: 100%;
    }

    .logo-circle {
        width: 160px;
        height: 160px;
    }

    .logo-section {
        margin-bottom: 1rem;
    }

    .login-title {
        margin-bottom: 1.2rem;
    }

    .login-title h1 {
        font-size: 1.4rem;
    }

    .form-control {
        font-size: 0.95rem;
        padding: 1rem 1.2rem;
        height: 54px;
    }

    .toggle-password {
        right: 1rem;
        font-size: 1.2rem;
    }

    .btn-login {
        font-size: 1rem;
        padding: 0.9rem;
    }

    .register-link {
        font-size: 0.9rem;
        margin-top: 1.2rem;
    }

    .back-button {
        width: 40px;
        height: 40px;
        top: 1rem;
        left: 1rem;
        font-size: 1.1rem;
    }
}

/* Mobile - Small */
@media (max-width: 400px) {
    .login-wrapper {
        padding: 0 0.75rem;
    }

    .login-container {
        padding: 1rem 0.25rem;
    }

    .logo-circle {
        width: 140px;
        height: 140px;
    }

    .login-title h1 {
        font-size: 1.3rem;
    }

    .form-control {
        font-size: 0.9rem;
        padding: 0.95rem 1.1rem;
        height: 52px;
    }

    .toggle-password {
        right: 0.9rem;
        font-size: 1.1rem;
    }

    .btn-login {
        font-size: 0.95rem;
        padding: 0.85rem;
    }

    .register-link {
        font-size: 0.85rem;
    }

    .back-button {
        width: 38px;
        height: 38px;
        top: 0.75rem;
        left: 0.75rem;
        font-size: 1rem;
    }
}

/* Smooth page load animation */
@keyframes pageLoad {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.login-wrapper {
    animation: pageLoad 0.5s ease-out;
}