/* =============================================
   Login Page Styles
   ============================================= */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d7c8f 0%, #1a2332 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

/* Background decoration */
.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(13, 124, 143, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(26, 188, 156, 0.1) 0%, transparent 50%);
    animation: bgFloat 15s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, -20px); }
}

/* Floating particles */
.login-wrapper::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(13, 124, 143, 0.08);
    border-radius: 50%;
    top: 10%;
    right: 15%;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(5deg); }
    66% { transform: translateY(10px) rotate(-3deg); }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 28px 26px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
    animation: cardIn 0.6s ease-out;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 18px;
}

.login-logo-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0d7c8f, #11a3ba);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin-bottom: 10px;
    box-shadow: 0 6px 18px rgba(13, 124, 143, 0.32);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.login-logo h1 {
    font-size: 20px;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 2px;
    line-height: 1.2;
}

.login-logo p {
    font-size: 12px;
    color: #64748b;
    line-height: 1.35;
}

.login-form .form-group {
    margin-bottom: 12px;
}

.login-form .form-label {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 5px;
    display: block;
}

.login-form .form-control {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border: 1px solid #d6dee9;
    border-radius: 10px;
    font-family: 'Sarabun', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.login-form .form-control:focus {
    outline: none;
    border-color: #0d7c8f;
    box-shadow: 0 0 0 3px rgba(13, 124, 143, 0.09);
    background: white;
}

.login-form .input-group {
    position: relative;
}

.login-form .input-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #94a3b8;
    z-index: 2;
    transition: color 0.3s ease;
}

.login-form .input-group:focus-within .input-icon {
    color: #0d7c8f;
}

.login-form .remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.login-form .remember-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    cursor: pointer;
}

.login-form .remember-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #0d7c8f;
    cursor: pointer;
}

.login-form .forgot-link {
    font-size: 13px;
    color: #0d7c8f;
    font-weight: 500;
}

.login-form .forgot-link:hover {
    color: #095e6e;
}

.btn-login {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d7c8f, #11a3ba);
    color: white;
    font-family: 'Sarabun', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    background: linear-gradient(135deg, #095e6e, #0d7c8f);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(13, 124, 143, 0.3);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(13, 124, 143, 0.25);
}

/* Loading state */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.login-footer {
    text-align: center;
    margin-top: 14px;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.35;
}

/* Login Error */
.login-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        margin: 10px;
        padding: 20px 16px;
        border-radius: 14px;
        max-width: 340px;
    }
    
    .login-logo-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .login-logo h1 {
        font-size: 18px;
    }

    .login-logo p {
        font-size: 11px;
    }

    .login-form .form-group {
        margin-bottom: 10px;
    }

    .btn-login {
        padding: 9px 10px;
        font-size: 13px;
    }
}
